wp/wp-includes/js/dist/format-library.min.js
changeset 19 3d72ae0968f4
parent 18 be944660c56a
child 21 48c4eec2b7e6
--- a/wp/wp-includes/js/dist/format-library.min.js	Wed Sep 21 18:19:35 2022 +0200
+++ b/wp/wp-includes/js/dist/format-library.min.js	Tue Sep 27 16:37:53 2022 +0200
@@ -1,2 +1,2 @@
 /*! This file is auto-generated */
-this.wp=this.wp||{},this.wp.formatLibrary=function(e){var t={};function c(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,c),o.l=!0,o.exports}return c.m=e,c.c=t,c.d=function(e,t,n){c.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},c.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},c.t=function(e,t){if(1&t&&(e=c(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(c.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)c.d(n,o,function(t){return e[t]}.bind(null,o));return n},c.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return c.d(t,"a",t),t},c.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},c.p="",c(c.s="t1DA")}({"1Yn1":function(e,t,c){"use strict";var n=c("GRId"),o=c("Tqx9");const r=Object(n.createElement)(o.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(n.createElement)(o.Path,{d:"M20.8 10.7l-4.3-4.3-1.1 1.1 4.3 4.3c.1.1.1.3 0 .4l-4.3 4.3 1.1 1.1 4.3-4.3c.7-.8.7-1.9 0-2.6zM4.2 11.8l4.3-4.3-1-1-4.3 4.3c-.7.7-.7 1.8 0 2.5l4.3 4.3 1.1-1.1-4.3-4.3c-.2-.1-.2-.3-.1-.4z"}));t.a=r},"1ZqX":function(e,t){e.exports=window.wp.data},Bpkj:function(e,t,c){"use strict";var n=c("GRId"),o=c("Tqx9");const r=Object(n.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(n.createElement)(o.Path,{d:"M15.6 7.2H14v1.5h1.6c2 0 3.7 1.7 3.7 3.7s-1.7 3.7-3.7 3.7H14v1.5h1.6c2.8 0 5.2-2.3 5.2-5.2 0-2.9-2.3-5.2-5.2-5.2zM4.7 12.4c0-2 1.7-3.7 3.7-3.7H10V7.2H8.4c-2.9 0-5.2 2.3-5.2 5.2 0 2.9 2.3 5.2 5.2 5.2H10v-1.5H8.4c-2 0-3.7-1.7-3.7-3.7zm4.6.9h5.3v-1.5H9.3v1.5z"}));t.a=r},Crq9:function(e,t,c){"use strict";var n=c("GRId"),o=c("Tqx9");const r=Object(n.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(n.createElement)(o.Path,{d:"M9.1 9v-.5c0-.6.2-1.1.7-1.4.5-.3 1.2-.5 2-.5.7 0 1.4.1 2.1.3.7.2 1.4.5 2.1.9l.2-1.9c-.6-.3-1.2-.5-1.9-.7-.8-.1-1.6-.2-2.4-.2-1.5 0-2.7.3-3.6 1-.8.7-1.2 1.5-1.2 2.6V9h2zM20 12H4v1h8.3c.3.1.6.2.8.3.5.2.9.5 1.1.8.3.3.4.7.4 1.2 0 .7-.2 1.1-.8 1.5-.5.3-1.2.5-2.1.5-.8 0-1.6-.1-2.4-.3-.8-.2-1.5-.5-2.2-.8L7 18.1c.5.2 1.2.4 2 .6.8.2 1.6.3 2.4.3 1.7 0 3-.3 3.9-1 .9-.7 1.3-1.6 1.3-2.8 0-.9-.2-1.7-.7-2.2H20v-1z"}));t.a=r},GRId:function(e,t){e.exports=window.wp.element},Mmq9:function(e,t){e.exports=window.wp.url},Mp0b:function(e,t,c){"use strict";var n=c("GRId"),o=c("Tqx9");const r=Object(n.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(n.createElement)(o.Path,{d:"M15.6 7.3h-.7l1.6-3.5-.9-.4-3.9 8.5H9v1.5h2l-1.3 2.8H8.4c-2 0-3.7-1.7-3.7-3.7s1.7-3.7 3.7-3.7H10V7.3H8.4c-2.9 0-5.2 2.3-5.2 5.2 0 2.9 2.3 5.2 5.2 5.2H9l-1.4 3.2.9.4 5.7-12.5h1.4c2 0 3.7 1.7 3.7 3.7s-1.7 3.7-3.7 3.7H14v1.5h1.6c2.9 0 5.2-2.3 5.2-5.2 0-2.9-2.4-5.2-5.2-5.2z"}));t.a=r},Tqx9:function(e,t){e.exports=window.wp.primitives},YLtl:function(e,t){e.exports=window.lodash},axFQ:function(e,t){e.exports=window.wp.blockEditor},btIw:function(e,t,c){"use strict";var n=c("GRId"),o=c("Tqx9");const r=Object(n.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},Object(n.createElement)(o.Path,{d:"M6.734 16.106l2.176-2.38-1.093-1.028-3.846 4.158 3.846 4.157 1.093-1.027-2.176-2.38h2.811c1.125 0 2.25.03 3.374 0 1.428-.001 3.362-.25 4.963-1.277 1.66-1.065 2.868-2.906 2.868-5.859 0-2.479-1.327-4.896-3.65-5.93-1.82-.813-3.044-.8-4.806-.788l-.567.002v1.5c.184 0 .368 0 .553-.002 1.82-.007 2.704-.014 4.21.657 1.854.827 2.76 2.657 2.76 4.561 0 2.472-.973 3.824-2.178 4.596-1.258.807-2.864 1.04-4.163 1.04h-.02c-1.115.03-2.229 0-3.344 0H6.734z"}));t.a=r},gdqT:function(e,t){e.exports=window.wp.a11y},iClF:function(e,t,c){"use strict";var n=c("GRId");t.a=function({icon:e,size:t=24,...c}){return Object(n.cloneElement)(e,{width:t,height:t,...c})}},l3Sj:function(e,t){e.exports=window.wp.i18n},oMoS:function(e,t,c){"use strict";var n=c("GRId"),o=c("Tqx9");const r=Object(n.createElement)(o.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(n.createElement)(o.Path,{d:"M19 6.5H5c-1.1 0-2 .9-2 2v7c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-7c0-1.1-.9-2-2-2zm.5 9c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5v-7c0-.3.2-.5.5-.5h14c.3 0 .5.2.5.5v7zM8 12.8h8v-1.5H8v1.5z"}));t.a=r},qRz9:function(e,t){e.exports=window.wp.richText},rmEH:function(e,t){e.exports=window.wp.htmlEntities},t1DA:function(e,t,c){"use strict";c.r(t);var n=c("qRz9"),o=c("GRId"),r=c("l3Sj"),a=c("axFQ"),i=c("Tqx9");var l=Object(o.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(o.createElement)(i.Path,{d:"M14.7 11.3c1-.6 1.5-1.6 1.5-3 0-2.3-1.3-3.4-4-3.4H7v14h5.8c1.4 0 2.5-.3 3.3-1 .8-.7 1.2-1.7 1.2-2.9.1-1.9-.8-3.1-2.6-3.7zm-5.1-4h2.3c.6 0 1.1.1 1.4.4.3.3.5.7.5 1.2s-.2 1-.5 1.2c-.3.3-.8.4-1.4.4H9.6V7.3zm4.6 9c-.4.3-1 .4-1.7.4H9.6v-3.9h2.9c.7 0 1.3.2 1.7.5.4.3.6.8.6 1.5s-.2 1.2-.6 1.5z"}));const s=Object(r.__)("Bold"),u={name:"core/bold",title:s,tagName:"strong",className:null,edit({isActive:e,value:t,onChange:c,onFocus:r}){function i(){c(Object(n.toggleFormat)(t,{type:"core/bold"}))}return Object(o.createElement)(o.Fragment,null,Object(o.createElement)(a.RichTextShortcut,{type:"primary",character:"b",onUse:i}),Object(o.createElement)(a.RichTextToolbarButton,{name:"bold",icon:l,title:s,onClick:function(){i(),r()},isActive:e,shortcutType:"primary",shortcutCharacter:"b"}),Object(o.createElement)(a.__unstableRichTextInputEvent,{inputType:"formatBold",onInput:i}))}};var b=c("1Yn1");const m=Object(r.__)("Inline code"),p={name:"core/code",title:m,tagName:"code",className:null,__unstableInputRule(e){const{start:t,text:c}=e;if("`"!==c.slice(t-1,t))return e;const o=c.slice(0,t-1).lastIndexOf("`");if(-1===o)return e;const r=o,a=t-2;return r===a?e:(e=Object(n.remove)(e,r,r+1),e=Object(n.remove)(e,a,a+1),e=Object(n.applyFormat)(e,{type:"core/code"},r,a))},edit:({value:e,onChange:t,onFocus:c,isActive:r})=>Object(o.createElement)(a.RichTextToolbarButton,{icon:b.a,title:m,onClick:function(){t(Object(n.toggleFormat)(e,{type:"core/code"})),c()},isActive:r})};var h=c("tI+e"),j=c("btIw");const O=["image"],v=Object(r.__)("Inline image"),d={name:"core/image",title:v,keywords:[Object(r.__)("photo"),Object(r.__)("media")],object:!0,tagName:"img",className:null,attributes:{className:"class",style:"style",url:"src",alt:"alt"},edit:function({value:e,onChange:t,onFocus:c,isObjectActive:r,activeObjectAttributes:i,contentRef:l}){const[s,u]=Object(o.useState)(!1);function b(){u(!1)}return Object(o.createElement)(a.MediaUploadCheck,null,Object(o.createElement)(a.RichTextToolbarButton,{icon:Object(o.createElement)(h.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(o.createElement)(h.Path,{d:"M4 18.5h16V17H4v1.5zM16 13v1.5h4V13h-4zM5.1 15h7.8c.6 0 1.1-.5 1.1-1.1V6.1c0-.6-.5-1.1-1.1-1.1H5.1C4.5 5 4 5.5 4 6.1v7.8c0 .6.5 1.1 1.1 1.1zm.4-8.5h7V10l-1-1c-.3-.3-.8-.3-1 0l-1.6 1.5-1.2-.7c-.3-.2-.6-.2-.9 0l-1.3 1V6.5zm0 6.1l1.8-1.3 1.3.8c.3.2.7.2.9-.1l1.5-1.4 1.5 1.4v1.5h-7v-.9z"})),title:v,onClick:function(){u(!0)},isActive:r}),s&&Object(o.createElement)(a.MediaUpload,{allowedTypes:O,onSelect:({id:o,url:r,alt:a,width:i})=>{b(),t(Object(n.insertObject)(e,{type:"core/image",attributes:{className:"wp-image-"+o,style:`width: ${Math.min(i,150)}px;`,url:r,alt:a}})),c()},onClose:b,render:({open:e})=>(e(),null)}),r&&Object(o.createElement)(g,{value:e,onChange:t,activeObjectAttributes:i,contentRef:l}))}};function g({value:e,onChange:t,activeObjectAttributes:c,contentRef:a}){const{style:i}=c,[l,s]=Object(o.useState)(null==i?void 0:i.replace(/\D/g,"")),u=Object(n.useAnchorRef)({ref:a,value:e,settings:d});return Object(o.createElement)(h.Popover,{position:"bottom center",focusOnMount:!1,anchorRef:u,className:"block-editor-format-toolbar__image-popover"},Object(o.createElement)("form",{className:"block-editor-format-toolbar__image-container-content",onSubmit:n=>{const o=e.replacements.slice();o[e.start]={type:"core/image",attributes:{...c,style:`width: ${l}px;`}},t({...e,replacements:o}),n.preventDefault()}},Object(o.createElement)(h.TextControl,{className:"block-editor-format-toolbar__image-container-value",type:"number",label:Object(r.__)("Width"),value:l,min:1,onChange:e=>s(e)}),Object(o.createElement)(h.Button,{icon:j.a,label:Object(r.__)("Apply"),type:"submit"})))}var f=Object(o.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(o.createElement)(i.Path,{d:"M12.5 5L10 19h1.9l2.5-14z"}));const w=Object(r.__)("Italic"),y={name:"core/italic",title:w,tagName:"em",className:null,edit({isActive:e,value:t,onChange:c,onFocus:r}){function i(){c(Object(n.toggleFormat)(t,{type:"core/italic"}))}return Object(o.createElement)(o.Fragment,null,Object(o.createElement)(a.RichTextShortcut,{type:"primary",character:"i",onUse:i}),Object(o.createElement)(a.RichTextToolbarButton,{name:"italic",icon:f,title:w,onClick:function(){i(),r()},isActive:e,shortcutType:"primary",shortcutCharacter:"i"}),Object(o.createElement)(a.__unstableRichTextInputEvent,{inputType:"formatItalic",onInput:i}))}};var x=c("Mmq9"),E=c("rmEH"),_=c("Mp0b"),C=c("Bpkj"),T=c("gdqT"),k=c("YLtl");var R=Object(h.withSpokenMessages)((function({isActive:e,activeAttributes:t,addingLink:c,value:i,onChange:l,speak:s,stopAddingLink:u,contentRef:b}){const[m,p]=Object(o.useState)(),j={url:t.url,type:t.type,id:t.id,opensInNewTab:"_blank"===t.target,...m},O=Object(n.useAnchorRef)({ref:b,value:i,settings:F}),v=Object(o.useRef)(!!c&&"firstElement");return Object(o.createElement)(h.Popover,{anchorRef:O,focusOnMount:v.current,onClose:u,position:"bottom center"},Object(o.createElement)(a.__experimentalLinkControl,{value:j,onChange:function(t){t={...m,...t};const c=j.opensInNewTab!==t.opensInNewTab&&j.url===t.url,o=c&&void 0===t.url;if(p(o?t:void 0),o)return;const a=Object(x.prependHTTP)(t.url),b=function({url:e,type:t,id:c,opensInNewWindow:n}){const o={type:"core/link",attributes:{url:e}};return t&&(o.attributes.type=t),c&&(o.attributes.id=c),n&&(o.attributes.target="_blank",o.attributes.rel="noreferrer noopener"),o}({url:a,type:t.type,id:void 0!==t.id&&null!==t.id?String(t.id):void 0,opensInNewWindow:t.opensInNewTab});if(Object(n.isCollapsed)(i)&&!e){const e=t.title||a,c=Object(n.applyFormat)(Object(n.create)({text:e}),b,0,e.length);l(Object(n.insert)(i,c))}else{const e=Object(n.applyFormat)(i,b);e.start=e.end,e.activeFormats=[],l(e)}c||u(),!function(e){if(!e)return!1;const t=e.trim();if(!t)return!1;if(/^\S+:/.test(t)){const e=Object(x.getProtocol)(t);if(!Object(x.isValidProtocol)(e))return!1;if(Object(k.startsWith)(e,"http")&&!/^https?:\/\/[^\/\s]/i.test(t))return!1;const c=Object(x.getAuthority)(t);if(!Object(x.isValidAuthority)(c))return!1;const n=Object(x.getPath)(t);if(n&&!Object(x.isValidPath)(n))return!1;const o=Object(x.getQueryString)(t);if(o&&!Object(x.isValidQueryString)(o))return!1;const r=Object(x.getFragment)(t);if(r&&!Object(x.isValidFragment)(r))return!1}return!(Object(k.startsWith)(t,"#")&&!Object(x.isValidFragment)(t))}(a)?s(Object(r.__)("Warning: the link has been inserted but may have errors. Please test it."),"assertive"):s(e?Object(r.__)("Link edited."):Object(r.__)("Link inserted."),"assertive")},forceIsEditingLink:c}))}));const S=Object(r.__)("Link");const F={name:"core/link",title:S,tagName:"a",className:null,attributes:{url:"href",type:"data-type",id:"data-id",target:"target"},__unstablePasteRule(e,{html:t,plainText:c}){if(Object(n.isCollapsed)(e))return e;const o=(t||c).replace(/<[^>]+>/g,"").trim();return Object(x.isURL)(o)?(window.console.log("Created link:\n\n",o),Object(n.applyFormat)(e,{type:"core/link",attributes:{url:Object(E.decodeEntities)(o)}})):e},edit:function({isActive:e,activeAttributes:t,value:c,onChange:i,onFocus:l,contentRef:s}){const[u,b]=Object(o.useState)(!1);function m(){const e=Object(n.getTextContent)(Object(n.slice)(c));e&&Object(x.isURL)(e)?i(Object(n.applyFormat)(c,{type:"core/link",attributes:{url:e}})):e&&Object(x.isEmail)(e)?i(Object(n.applyFormat)(c,{type:"core/link",attributes:{url:"mailto:"+e}})):b(!0)}function p(){i(Object(n.removeFormat)(c,"core/link")),Object(T.speak)(Object(r.__)("Link removed."),"assertive")}return Object(o.createElement)(o.Fragment,null,Object(o.createElement)(a.RichTextShortcut,{type:"primary",character:"k",onUse:m}),Object(o.createElement)(a.RichTextShortcut,{type:"primaryShift",character:"k",onUse:p}),e&&Object(o.createElement)(a.RichTextToolbarButton,{name:"link",icon:_.a,title:Object(r.__)("Unlink"),onClick:p,isActive:e,shortcutType:"primaryShift",shortcutCharacter:"k"}),!e&&Object(o.createElement)(a.RichTextToolbarButton,{name:"link",icon:C.a,title:S,onClick:m,isActive:e,shortcutType:"primary",shortcutCharacter:"k"}),(u||e)&&Object(o.createElement)(R,{addingLink:u,stopAddingLink:function(){b(!1),l()},isActive:e,activeAttributes:t,value:c,onChange:i,contentRef:s}))}};var A=c("Crq9");const M=Object(r.__)("Strikethrough"),N={name:"core/strikethrough",title:M,tagName:"s",className:null,edit:({isActive:e,value:t,onChange:c,onFocus:r})=>Object(o.createElement)(a.RichTextToolbarButton,{icon:A.a,title:M,onClick:function(){c(Object(n.toggleFormat)(t,{type:"core/strikethrough"})),r()},isActive:e})},I={name:"core/underline",title:Object(r.__)("Underline"),tagName:"span",className:null,attributes:{style:"style"},edit({value:e,onChange:t}){const c=()=>{t(Object(n.toggleFormat)(e,{type:"core/underline",attributes:{style:"text-decoration: underline;"}}))};return Object(o.createElement)(o.Fragment,null,Object(o.createElement)(a.RichTextShortcut,{type:"primary",character:"u",onUse:c}),Object(o.createElement)(a.__unstableRichTextInputEvent,{inputType:"formatUnderline",onInput:c}))}};var z=c("iClF"),B=c("uGfJ"),V=c("1ZqX");function P(e,t,c){const o=Object(n.getActiveFormat)(t,e);if(!o)return;const r=o.attributes.style;if(r)return r.replace(new RegExp("^color:\\s*"),"");const i=o.attributes.class;if(i){const e=i.replace(/.*has-([^\s]*)-color.*/,"$1");return Object(a.getColorObjectByAttributeValues)(c,e).color}}const H=({name:e,value:t,onChange:c})=>{const r=Object(V.useSelect)(e=>{const{getSettings:t}=e(a.store);return Object(k.get)(t(),["colors"],[])}),i=Object(o.useCallback)(o=>{if(o){const i=Object(a.getColorObjectByColorValue)(r,o);c(Object(n.applyFormat)(t,{type:e,attributes:i?{class:Object(a.getColorClassName)("color",i.slug)}:{style:"color:"+o}}))}else c(Object(n.removeFormat)(t,e))},[r,c]),l=Object(o.useMemo)(()=>P(e,t,r),[e,t,r]);return Object(o.createElement)(a.ColorPalette,{value:l,onChange:i})};function G({name:e,value:t,onChange:c,onClose:r,contentRef:i}){const l=Object(n.useAnchorRef)({ref:i,value:t,settings:U});return Object(o.createElement)(a.URLPopover,{value:t,onClose:r,className:"components-inline-color-popover",anchorRef:l},Object(o.createElement)(H,{name:e,value:t,onChange:c}))}const L=Object(r.__)("Text color"),q=[];const U={name:"core/text-color",title:L,tagName:"span",className:"has-inline-color",attributes:{style:"style",class:"class"},edit:function({value:e,onChange:t,isActive:c,activeAttributes:r,contentRef:i}){const l=Object(a.useSetting)("color.custom"),s=Object(a.useSetting)("color.palette")||q,[u,b]=Object(o.useState)(!1),m=Object(o.useCallback)(()=>b(!0),[b]),p=Object(o.useCallback)(()=>b(!1),[b]),h=Object(o.useMemo)(()=>{const t=P("core/text-color",e,s);if(t)return{backgroundColor:t}},[e,s]),j=!Object(k.isEmpty)(s)||!l;return j||c?Object(o.createElement)(o.Fragment,null,Object(o.createElement)(a.RichTextToolbarButton,{key:c?"text-color":"text-color-not-active",className:"format-library-text-color-button",name:c?"text-color":void 0,icon:Object(o.createElement)(o.Fragment,null,Object(o.createElement)(z.a,{icon:B.a}),c&&Object(o.createElement)("span",{className:"format-library-text-color-button__indicator",style:h})),title:L,onClick:j?m:()=>t(Object(n.removeFormat)(e,"core/text-color"))}),u&&Object(o.createElement)(G,{name:"core/text-color",onClose:p,activeAttributes:r,value:e,onChange:t,contentRef:i})):null}};var W=Object(o.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(o.createElement)(i.Path,{d:"M16.9 18.3l.8-1.2c.4-.6.7-1.2.9-1.6.2-.4.3-.8.3-1.2 0-.3-.1-.7-.2-1-.1-.3-.4-.5-.6-.7-.3-.2-.6-.3-1-.3s-.8.1-1.1.2c-.3.1-.7.3-1 .6l.2 1.3c.3-.3.5-.5.8-.6s.6-.2.9-.2c.3 0 .5.1.7.2.2.2.2.4.2.7 0 .3-.1.5-.2.8-.1.3-.4.7-.8 1.3L15 19.4h4.3v-1.2h-2.4zM14.1 7.2h-2L9.5 11 6.9 7.2h-2l3.6 5.3L4.7 18h2l2.7-4 2.7 4h2l-3.8-5.5 3.8-5.3z"}));const D=Object(r.__)("Subscript"),Q={name:"core/subscript",title:D,tagName:"sub",className:null,edit:({isActive:e,value:t,onChange:c,onFocus:r})=>Object(o.createElement)(a.RichTextToolbarButton,{icon:W,title:D,onClick:function(){c(Object(n.toggleFormat)(t,{type:"core/subscript"})),r()},isActive:e})};var Y=Object(o.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(o.createElement)(i.Path,{d:"M16.9 10.3l.8-1.3c.4-.6.7-1.2.9-1.6.2-.4.3-.8.3-1.2 0-.3-.1-.7-.2-1-.2-.2-.4-.4-.7-.6-.3-.2-.6-.3-1-.3s-.8.1-1.1.2c-.3.1-.7.3-1 .6l.1 1.3c.3-.3.5-.5.8-.6s.6-.2.9-.2c.3 0 .5.1.7.2.2.2.2.4.2.7 0 .3-.1.5-.2.8-.1.3-.4.7-.8 1.3l-1.8 2.8h4.3v-1.2h-2.2zm-2.8-3.1h-2L9.5 11 6.9 7.2h-2l3.6 5.3L4.7 18h2l2.7-4 2.7 4h2l-3.8-5.5 3.8-5.3z"}));const $=Object(r.__)("Superscript"),J={name:"core/superscript",title:$,tagName:"sup",className:null,edit:({isActive:e,value:t,onChange:c,onFocus:r})=>Object(o.createElement)(a.RichTextToolbarButton,{icon:Y,title:$,onClick:function(){c(Object(n.toggleFormat)(t,{type:"core/superscript"})),r()},isActive:e})};var X=c("oMoS");const Z=Object(r.__)("Keyboard input");[u,p,d,y,F,N,I,U,Q,J,{name:"core/keyboard",title:Z,tagName:"kbd",className:null,edit:({isActive:e,value:t,onChange:c,onFocus:r})=>Object(o.createElement)(a.RichTextToolbarButton,{icon:X.a,title:Z,onClick:function(){c(Object(n.toggleFormat)(t,{type:"core/keyboard"})),r()},isActive:e})}].forEach(({name:e,...t})=>Object(n.registerFormatType)(e,t))},"tI+e":function(e,t){e.exports=window.wp.components},uGfJ:function(e,t,c){"use strict";var n=c("GRId"),o=c("Tqx9");const r=Object(n.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(n.createElement)(o.Path,{d:"M12.9 6h-2l-4 11h1.9l1.1-3h4.2l1.1 3h1.9L12.9 6zm-2.5 6.5l1.5-4.9 1.7 4.9h-3.2z"}));t.a=r}});
\ No newline at end of file
+!function(){"use strict";var e={r:function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};e.r(t);var n=window.wp.richText,r=window.wp.element,o=window.wp.i18n,a=window.wp.blockEditor,l=window.wp.primitives;var i=(0,r.createElement)(l.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(l.Path,{d:"M14.7 11.3c1-.6 1.5-1.6 1.5-3 0-2.3-1.3-3.4-4-3.4H7v14h5.8c1.4 0 2.5-.3 3.3-1 .8-.7 1.2-1.7 1.2-2.9.1-1.9-.8-3.1-2.6-3.7zm-5.1-4h2.3c.6 0 1.1.1 1.4.4.3.3.5.7.5 1.2s-.2 1-.5 1.2c-.3.3-.8.4-1.4.4H9.6V7.3zm4.6 9c-.4.3-1 .4-1.7.4H9.6v-3.9h2.9c.7 0 1.3.2 1.7.5.4.3.6.8.6 1.5s-.2 1.2-.6 1.5z"}));const c="core/bold",s=(0,o.__)("Bold"),u={name:c,title:s,tagName:"strong",className:null,edit(e){let{isActive:t,value:o,onChange:l,onFocus:u}=e;function m(){l((0,n.toggleFormat)(o,{type:c,title:s}))}return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(a.RichTextShortcut,{type:"primary",character:"b",onUse:m}),(0,r.createElement)(a.RichTextToolbarButton,{name:"bold",icon:i,title:s,onClick:function(){l((0,n.toggleFormat)(o,{type:c})),u()},isActive:t,shortcutType:"primary",shortcutCharacter:"b"}),(0,r.createElement)(a.__unstableRichTextInputEvent,{inputType:"formatBold",onInput:m}))}};var m=(0,r.createElement)(l.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,r.createElement)(l.Path,{d:"M20.8 10.7l-4.3-4.3-1.1 1.1 4.3 4.3c.1.1.1.3 0 .4l-4.3 4.3 1.1 1.1 4.3-4.3c.7-.8.7-1.9 0-2.6zM4.2 11.8l4.3-4.3-1-1-4.3 4.3c-.7.7-.7 1.8 0 2.5l4.3 4.3 1.1-1.1-4.3-4.3c-.2-.1-.2-.3-.1-.4z"}));const h="core/code",p=(0,o.__)("Inline code"),g={name:h,title:p,tagName:"code",className:null,__unstableInputRule(e){const{start:t,text:r}=e;if("`"!==r.slice(t-1,t))return e;const o=r.slice(0,t-1).lastIndexOf("`");if(-1===o)return e;const a=o,l=t-2;return a===l?e:(e=(0,n.remove)(e,a,a+1),e=(0,n.remove)(e,l,l+1),e=(0,n.applyFormat)(e,{type:h},a,l))},edit(e){let{value:t,onChange:o,onFocus:l,isActive:i}=e;return(0,r.createElement)(a.RichTextToolbarButton,{icon:m,title:p,onClick:function(){o((0,n.toggleFormat)(t,{type:h,title:p})),l()},isActive:i,role:"menuitemcheckbox"})}};var d=window.wp.components;var v=(0,r.createElement)(l.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},(0,r.createElement)(l.Path,{d:"M6.734 16.106l2.176-2.38-1.093-1.028-3.846 4.158 3.846 4.157 1.093-1.027-2.176-2.38h2.811c1.125 0 2.25.03 3.374 0 1.428-.001 3.362-.25 4.963-1.277 1.66-1.065 2.868-2.906 2.868-5.859 0-2.479-1.327-4.896-3.65-5.93-1.82-.813-3.044-.8-4.806-.788l-.567.002v1.5c.184 0 .368 0 .553-.002 1.82-.007 2.704-.014 4.21.657 1.854.827 2.76 2.657 2.76 4.561 0 2.472-.973 3.824-2.178 4.596-1.258.807-2.864 1.04-4.163 1.04h-.02c-1.115.03-2.229 0-3.344 0H6.734z"}));const w=["image"],f="core/image",b=(0,o.__)("Inline image"),y={name:f,title:b,keywords:[(0,o.__)("photo"),(0,o.__)("media")],object:!0,tagName:"img",className:null,attributes:{className:"class",style:"style",url:"src",alt:"alt"},edit:function(e){let{value:t,onChange:o,onFocus:l,isObjectActive:i,activeObjectAttributes:c,contentRef:s}=e;const[u,m]=(0,r.useState)(!1);function h(){m(!1)}return(0,r.createElement)(a.MediaUploadCheck,null,(0,r.createElement)(a.RichTextToolbarButton,{icon:(0,r.createElement)(d.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(d.Path,{d:"M4 18.5h16V17H4v1.5zM16 13v1.5h4V13h-4zM5.1 15h7.8c.6 0 1.1-.5 1.1-1.1V6.1c0-.6-.5-1.1-1.1-1.1H5.1C4.5 5 4 5.5 4 6.1v7.8c0 .6.5 1.1 1.1 1.1zm.4-8.5h7V10l-1-1c-.3-.3-.8-.3-1 0l-1.6 1.5-1.2-.7c-.3-.2-.6-.2-.9 0l-1.3 1V6.5zm0 6.1l1.8-1.3 1.3.8c.3.2.7.2.9-.1l1.5-1.4 1.5 1.4v1.5h-7v-.9z"})),title:b,onClick:function(){m(!0)},isActive:i}),u&&(0,r.createElement)(a.MediaUpload,{allowedTypes:w,onSelect:e=>{let{id:r,url:a,alt:i,width:c}=e;h(),o((0,n.insertObject)(t,{type:f,attributes:{className:`wp-image-${r}`,style:`width: ${Math.min(c,150)}px;`,url:a,alt:i}})),l()},onClose:h,render:e=>{let{open:t}=e;return t(),null}}),i&&(0,r.createElement)(k,{value:t,onChange:o,activeObjectAttributes:c,contentRef:s}))}};function k(e){let{value:t,onChange:a,activeObjectAttributes:l,contentRef:i}=e;const{style:c}=l,[s,u]=(0,r.useState)(null==c?void 0:c.replace(/\D/g,"")),m=(0,n.useAnchorRef)({ref:i,value:t,settings:y});return(0,r.createElement)(d.Popover,{position:"bottom center",focusOnMount:!1,anchorRef:m,className:"block-editor-format-toolbar__image-popover"},(0,r.createElement)("form",{className:"block-editor-format-toolbar__image-container-content",onSubmit:e=>{const n=t.replacements.slice();n[t.start]={type:f,attributes:{...l,style:s?`width: ${s}px;`:""}},a({...t,replacements:n}),e.preventDefault()}},(0,r.createElement)(d.TextControl,{className:"block-editor-format-toolbar__image-container-value",type:"number",label:(0,o.__)("Width"),value:s,min:1,onChange:e=>u(e)}),(0,r.createElement)(d.Button,{icon:v,label:(0,o.__)("Apply"),type:"submit"})))}var E=(0,r.createElement)(l.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(l.Path,{d:"M12.5 5L10 19h1.9l2.5-14z"}));const C="core/italic",_=(0,o.__)("Italic"),x={name:C,title:_,tagName:"em",className:null,edit(e){let{isActive:t,value:o,onChange:l,onFocus:i}=e;function c(){l((0,n.toggleFormat)(o,{type:C,title:_}))}return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(a.RichTextShortcut,{type:"primary",character:"i",onUse:c}),(0,r.createElement)(a.RichTextToolbarButton,{name:"italic",icon:E,title:_,onClick:function(){l((0,n.toggleFormat)(o,{type:C})),i()},isActive:t,shortcutType:"primary",shortcutCharacter:"i"}),(0,r.createElement)(a.__unstableRichTextInputEvent,{inputType:"formatItalic",onInput:c}))}};var T=window.wp.url,S=window.wp.htmlEntities;var F=(0,r.createElement)(l.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(l.Path,{d:"M15.6 7.3h-.7l1.6-3.5-.9-.4-3.9 8.5H9v1.5h2l-1.3 2.8H8.4c-2 0-3.7-1.7-3.7-3.7s1.7-3.7 3.7-3.7H10V7.3H8.4c-2.9 0-5.2 2.3-5.2 5.2 0 2.9 2.3 5.2 5.2 5.2H9l-1.4 3.2.9.4 5.7-12.5h1.4c2 0 3.7 1.7 3.7 3.7s-1.7 3.7-3.7 3.7H14v1.5h1.6c2.9 0 5.2-2.3 5.2-5.2 0-2.9-2.4-5.2-5.2-5.2z"}));var R=(0,r.createElement)(l.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(l.Path,{d:"M15.6 7.2H14v1.5h1.6c2 0 3.7 1.7 3.7 3.7s-1.7 3.7-3.7 3.7H14v1.5h1.6c2.8 0 5.2-2.3 5.2-5.2 0-2.9-2.3-5.2-5.2-5.2zM4.7 12.4c0-2 1.7-3.7 3.7-3.7H10V7.2H8.4c-2.9 0-5.2 2.3-5.2 5.2 0 2.9 2.3 5.2 5.2 5.2H10v-1.5H8.4c-2 0-3.7-1.7-3.7-3.7zm4.6.9h5.3v-1.5H9.3v1.5z"})),A=window.wp.a11y,N=window.wp.data,P=window.lodash;function V(e){if(!e)return!1;const t=e.trim();if(!t)return!1;if(/^\S+:/.test(t)){const e=(0,T.getProtocol)(t);if(!(0,T.isValidProtocol)(e))return!1;if((0,P.startsWith)(e,"http")&&!/^https?:\/\/[^\/\s]/i.test(t))return!1;const n=(0,T.getAuthority)(t);if(!(0,T.isValidAuthority)(n))return!1;const r=(0,T.getPath)(t);if(r&&!(0,T.isValidPath)(r))return!1;const o=(0,T.getQueryString)(t);if(o&&!(0,T.isValidQueryString)(o))return!1;const a=(0,T.getFragment)(t);if(a&&!(0,T.isValidFragment)(a))return!1}return!((0,P.startsWith)(t,"#")&&!(0,T.isValidFragment)(t))}function B(e,t,n,r,o){let a=t;const l={forwards:1,backwards:-1}[o]||1,i=-1*l;for(;e[a]&&e[a][r]===n;)a+=l;return a+=i,a}const M=(0,P.partialRight)(B,"backwards"),z=(0,P.partialRight)(B,"forwards"),H=new WeakMap;let L=-1;function I(e){return`link-control-instance-${e}`}var j=function(e){if(e)return H.has(e)?I(H.get(e)):(L+=1,H.set(e,L),I(L))};var O=(0,d.withSpokenMessages)((function(e){let{isActive:t,activeAttributes:l,addingLink:i,value:c,onChange:s,speak:u,stopAddingLink:m,contentRef:h}=e;const p=function(e,t){let r=e.start,o=e.end;if(t){const t=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.start,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:e.end;const o={start:null,end:null},{formats:a}=e;let l,i;if(null==a||!a.length)return o;const c=a.slice(),s=(0,P.find)(c[n],{type:t.type}),u=(0,P.find)(c[r],{type:t.type}),m=(0,P.find)(c[r-1],{type:t.type});if(s)l=s,i=n;else if(u)l=u,i=r;else{if(!m)return o;l=m,i=r-1}const h=c[i].indexOf(l),p=[c,i,l,h];return n=M(...p),r=z(...p),n=n<0?0:n,{start:n,end:r}}(e,{type:"core/link"});r=t.start,o=t.end+1}return(0,n.slice)(e,r,o)}(c,t),g=p.text,[v,w]=(0,r.useState)(),{createPageEntity:f,userCanCreatePages:b}=(0,N.useSelect)((e=>{const{getSettings:t}=e(a.store),n=t();return{createPageEntity:n.__experimentalCreatePageEntity,userCanCreatePages:n.__experimentalUserCanCreatePages}}),[]),y={url:l.url,type:l.type,id:l.id,opensInNewTab:"_blank"===l.target,title:g,...v},k=(0,n.useAnchorRef)({ref:h,value:c,settings:W}),E=j(k),C=(0,r.useRef)(!!i&&"firstElement");return(0,r.createElement)(d.Popover,{anchorRef:k,focusOnMount:C.current,onClose:m,position:"bottom center"},(0,r.createElement)(a.__experimentalLinkControl,{key:E,value:y,onChange:function(e){e={...v,...e};const r=y.opensInNewTab!==e.opensInNewTab&&y.url===e.url,a=r&&void 0===e.url;if(w(a?e:void 0),a)return;const l=(0,T.prependHTTP)(e.url),i=function(e){let{url:t,type:n,id:r,opensInNewWindow:o}=e;const a={type:"core/link",attributes:{url:t}};return n&&(a.attributes.type=n),r&&(a.attributes.id=r),o&&(a.attributes.target="_blank",a.attributes.rel="noreferrer noopener"),a}({url:l,type:e.type,id:void 0!==e.id&&null!==e.id?String(e.id):void 0,opensInNewWindow:e.opensInNewTab}),h=e.title||l;if((0,n.isCollapsed)(c)&&!t){const e=(0,n.applyFormat)((0,n.create)({text:h}),i,0,h.length);s((0,n.insert)(c,e))}else{let e;h===g?e=(0,n.applyFormat)(c,i):(e=(0,n.create)({text:h}),e=(0,n.applyFormat)(e,i,0,h.length),e=(0,n.replace)(c,g,e)),e.start=e.end,e.activeFormats=[],s(e)}r||m(),V(l)?u(t?(0,o.__)("Link edited."):(0,o.__)("Link inserted."),"assertive"):u((0,o.__)("Warning: the link has been inserted but may have errors. Please test it."),"assertive")},onRemove:function(){const e=(0,n.removeFormat)(c,"core/link");s(e),m(),u((0,o.__)("Link removed."),"assertive")},forceIsEditingLink:i,hasRichPreviews:!0,createSuggestion:f&&async function(e){const t=await f({title:e,status:"draft"});return{id:t.id,type:t.type,title:t.title.rendered,url:t.link,kind:"post-type"}},withCreateSuggestion:b,createSuggestionButtonText:function(e){return(0,r.createInterpolateElement)((0,o.sprintf)((0,o.__)("Create Page: <mark>%s</mark>"),e),{mark:(0,r.createElement)("mark",null)})},hasTextControl:!0}))}));const U="core/link",G=(0,o.__)("Link");const W={name:U,title:G,tagName:"a",className:null,attributes:{url:"href",type:"data-type",id:"data-id",target:"target"},__unstablePasteRule(e,t){let{html:r,plainText:o}=t;if((0,n.isCollapsed)(e))return e;const a=(r||o).replace(/<[^>]+>/g,"").trim();return(0,T.isURL)(a)?(window.console.log("Created link:\n\n",a),(0,n.applyFormat)(e,{type:U,attributes:{url:(0,S.decodeEntities)(a)}})):e},edit:function(e){let{isActive:t,activeAttributes:l,value:i,onChange:c,onFocus:s,contentRef:u}=e;const[m,h]=(0,r.useState)(!1);function p(){const e=(0,n.getTextContent)((0,n.slice)(i));e&&(0,T.isURL)(e)&&V(e)?c((0,n.applyFormat)(i,{type:U,attributes:{url:e}})):e&&(0,T.isEmail)(e)?c((0,n.applyFormat)(i,{type:U,attributes:{url:`mailto:${e}`}})):h(!0)}function g(){c((0,n.removeFormat)(i,U)),(0,A.speak)((0,o.__)("Link removed."),"assertive")}return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(a.RichTextShortcut,{type:"primary",character:"k",onUse:p}),(0,r.createElement)(a.RichTextShortcut,{type:"primaryShift",character:"k",onUse:g}),t&&(0,r.createElement)(a.RichTextToolbarButton,{name:"link",icon:F,title:(0,o.__)("Unlink"),onClick:g,isActive:t,shortcutType:"primaryShift",shortcutCharacter:"k"}),!t&&(0,r.createElement)(a.RichTextToolbarButton,{name:"link",icon:R,title:G,onClick:p,isActive:t,shortcutType:"primary",shortcutCharacter:"k"}),(m||t)&&(0,r.createElement)(O,{addingLink:m,stopAddingLink:function(){h(!1),s()},isActive:t,activeAttributes:l,value:i,onChange:c,contentRef:u}))}};var $=(0,r.createElement)(l.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(l.Path,{d:"M9.1 9v-.5c0-.6.2-1.1.7-1.4.5-.3 1.2-.5 2-.5.7 0 1.4.1 2.1.3.7.2 1.4.5 2.1.9l.2-1.9c-.6-.3-1.2-.5-1.9-.7-.8-.1-1.6-.2-2.4-.2-1.5 0-2.7.3-3.6 1-.8.7-1.2 1.5-1.2 2.6V9h2zM20 12H4v1h8.3c.3.1.6.2.8.3.5.2.9.5 1.1.8.3.3.4.7.4 1.2 0 .7-.2 1.1-.8 1.5-.5.3-1.2.5-2.1.5-.8 0-1.6-.1-2.4-.3-.8-.2-1.5-.5-2.2-.8L7 18.1c.5.2 1.2.4 2 .6.8.2 1.6.3 2.4.3 1.7 0 3-.3 3.9-1 .9-.7 1.3-1.6 1.3-2.8 0-.9-.2-1.7-.7-2.2H20v-1z"}));const D="core/strikethrough",Q=(0,o.__)("Strikethrough"),K={name:D,title:Q,tagName:"s",className:null,edit(e){let{isActive:t,value:o,onChange:l,onFocus:i}=e;return(0,r.createElement)(a.RichTextToolbarButton,{icon:$,title:Q,onClick:function(){l((0,n.toggleFormat)(o,{type:D,title:Q})),i()},isActive:t,role:"menuitemcheckbox"})}},q="core/underline",J=(0,o.__)("Underline"),X={name:q,title:J,tagName:"span",className:null,attributes:{style:"style"},edit(e){let{value:t,onChange:o}=e;const l=()=>{o((0,n.toggleFormat)(t,{type:q,attributes:{style:"text-decoration: underline;"},title:J}))};return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(a.RichTextShortcut,{type:"primary",character:"u",onUse:l}),(0,r.createElement)(a.__unstableRichTextInputEvent,{inputType:"formatUnderline",onInput:l}))}};var Y=function(e){let{icon:t,size:n=24,...o}=e;return(0,r.cloneElement)(t,{width:n,height:n,...o})};var Z=(0,r.createElement)(l.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(l.Path,{d:"M12.9 6h-2l-4 11h1.9l1.1-3h4.2l1.1 3h1.9L12.9 6zm-2.5 6.5l1.5-4.9 1.7 4.9h-3.2z"}));function ee(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return e.split(";").reduce(((e,t)=>{if(t){const[n,r]=t.split(":");"color"===n&&(e.color=r),"background-color"===n&&r!==ae&&(e.backgroundColor=r)}return e}),{})}function te(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1?arguments[1]:void 0;return e.split(" ").reduce(((e,n)=>{if(n.startsWith("has-")&&n.endsWith("-color")){const r=n.replace(/^has-/,"").replace(/-color$/,""),o=(0,a.getColorObjectByAttributeValues)(t,r);e.color=o.color}return e}),{})}function ne(e,t,r){const o=(0,n.getActiveFormat)(e,t);return o?{...ee(o.attributes.style),...te(o.attributes.class,r)}:{}}function re(e){let{name:t,property:o,value:l,onChange:i}=e;const c=(0,N.useSelect)((e=>{const{getSettings:t}=e(a.store);return(0,P.get)(t(),["colors"],[])}),[]),s=(0,r.useCallback)((e=>{i(function(e,t,r,o){const{color:l,backgroundColor:i}={...ne(e,t,r),...o};if(!l&&!i)return(0,n.removeFormat)(e,t);const c=[],s=[],u={};if(i?c.push(["background-color",i].join(":")):c.push(["background-color",ae].join(":")),l){const e=(0,a.getColorObjectByColorValue)(r,l);e?s.push((0,a.getColorClassName)("color",e.slug)):c.push(["color",l].join(":"))}return c.length&&(u.style=c.join(";")),s.length&&(u.class=s.join(" ")),(0,n.applyFormat)(e,{type:t,attributes:u})}(l,t,c,{[o]:e}))}),[c,i,o]),u=(0,r.useMemo)((()=>ne(l,t,c)),[t,l,c]);return(0,r.createElement)(a.ColorPalette,{value:u[o],onChange:s})}function oe(e){let{name:t,value:l,onChange:i,onClose:c,contentRef:s}=e;const u=(0,a.useCachedTruthy)((0,n.useAnchorRef)({ref:s,value:l,settings:ue}));return(0,r.createElement)(d.Popover,{onClose:c,className:"components-inline-color-popover",anchorRef:u},(0,r.createElement)(d.TabPanel,{tabs:[{name:"color",title:(0,o.__)("Text")},{name:"backgroundColor",title:(0,o.__)("Background")}]},(e=>(0,r.createElement)(re,{name:t,property:e.name,value:l,onChange:i}))))}const ae="rgba(0, 0, 0, 0)",le="core/text-color",ie=(0,o.__)("Highlight"),ce=[];function se(e,t){const{ownerDocument:n}=e,{defaultView:r}=n,o=r.getComputedStyle(e).getPropertyValue(t);return"background-color"===t&&o===ae&&e.parentElement?se(e.parentElement,t):o}const ue={name:le,title:ie,tagName:"mark",className:"has-inline-color",attributes:{style:"style",class:"class"},__unstableFilterAttributeValue(e,t){if("style"!==e)return t;if(t&&t.includes("background-color"))return t;const n=["background-color",ae].join(":");return t?[n,t].join(";"):n},edit:function(e){let{value:t,onChange:o,isActive:l,activeAttributes:i,contentRef:c}=e;const s=(0,a.useSetting)("color.custom"),u=(0,a.useSetting)("color.palette")||ce,[m,h]=(0,r.useState)(!1),p=(0,r.useCallback)((()=>h(!0)),[h]),g=(0,r.useCallback)((()=>h(!1)),[h]),d=(0,r.useMemo)((()=>function(e,t){let{color:n,backgroundColor:r}=t;if(n||r)return{color:n||se(e,"color"),backgroundColor:r===ae?se(e,"background-color"):r}}(c.current,ne(t,le,u))),[t,u]),v=!(0,P.isEmpty)(u)||!s;return v||l?(0,r.createElement)(r.Fragment,null,(0,r.createElement)(a.RichTextToolbarButton,{className:"format-library-text-color-button",isActive:l,icon:(0,r.createElement)(Y,{icon:Z,style:d}),title:ie,onClick:v?p:()=>o((0,n.removeFormat)(t,le)),role:"menuitemcheckbox"}),m&&(0,r.createElement)(oe,{name:le,onClose:g,activeAttributes:i,value:t,onChange:o,contentRef:c})):null}};var me=(0,r.createElement)(l.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(l.Path,{d:"M16.9 18.3l.8-1.2c.4-.6.7-1.2.9-1.6.2-.4.3-.8.3-1.2 0-.3-.1-.7-.2-1-.1-.3-.4-.5-.6-.7-.3-.2-.6-.3-1-.3s-.8.1-1.1.2c-.3.1-.7.3-1 .6l.2 1.3c.3-.3.5-.5.8-.6s.6-.2.9-.2c.3 0 .5.1.7.2.2.2.2.4.2.7 0 .3-.1.5-.2.8-.1.3-.4.7-.8 1.3L15 19.4h4.3v-1.2h-2.4zM14.1 7.2h-2L9.5 11 6.9 7.2h-2l3.6 5.3L4.7 18h2l2.7-4 2.7 4h2l-3.8-5.5 3.8-5.3z"}));const he="core/subscript",pe=(0,o.__)("Subscript"),ge={name:he,title:pe,tagName:"sub",className:null,edit(e){let{isActive:t,value:o,onChange:l,onFocus:i}=e;return(0,r.createElement)(a.RichTextToolbarButton,{icon:me,title:pe,onClick:function(){l((0,n.toggleFormat)(o,{type:he,title:pe})),i()},isActive:t,role:"menuitemcheckbox"})}};var de=(0,r.createElement)(l.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(l.Path,{d:"M16.9 10.3l.8-1.3c.4-.6.7-1.2.9-1.6.2-.4.3-.8.3-1.2 0-.3-.1-.7-.2-1-.2-.2-.4-.4-.7-.6-.3-.2-.6-.3-1-.3s-.8.1-1.1.2c-.3.1-.7.3-1 .6l.1 1.3c.3-.3.5-.5.8-.6s.6-.2.9-.2c.3 0 .5.1.7.2.2.2.2.4.2.7 0 .3-.1.5-.2.8-.1.3-.4.7-.8 1.3l-1.8 2.8h4.3v-1.2h-2.2zm-2.8-3.1h-2L9.5 11 6.9 7.2h-2l3.6 5.3L4.7 18h2l2.7-4 2.7 4h2l-3.8-5.5 3.8-5.3z"}));const ve="core/superscript",we=(0,o.__)("Superscript"),fe={name:ve,title:we,tagName:"sup",className:null,edit(e){let{isActive:t,value:o,onChange:l,onFocus:i}=e;return(0,r.createElement)(a.RichTextToolbarButton,{icon:de,title:we,onClick:function(){l((0,n.toggleFormat)(o,{type:ve,title:we})),i()},isActive:t,role:"menuitemcheckbox"})}};var be=(0,r.createElement)(l.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,r.createElement)(l.Path,{d:"M19 6.5H5c-1.1 0-2 .9-2 2v7c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-7c0-1.1-.9-2-2-2zm.5 9c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5v-7c0-.3.2-.5.5-.5h14c.3 0 .5.2.5.5v7zM8 12.8h8v-1.5H8v1.5z"}));const ye="core/keyboard",ke=(0,o.__)("Keyboard input");[u,g,y,x,W,K,X,ue,ge,fe,{name:ye,title:ke,tagName:"kbd",className:null,edit(e){let{isActive:t,value:o,onChange:l,onFocus:i}=e;return(0,r.createElement)(a.RichTextToolbarButton,{icon:be,title:ke,onClick:function(){l((0,n.toggleFormat)(o,{type:ye,title:ke})),i()},isActive:t,role:"menuitemcheckbox"})}}].forEach((e=>{let{name:t,...r}=e;return(0,n.registerFormatType)(t,r)})),(window.wp=window.wp||{}).formatLibrary=t}();
\ No newline at end of file