27 lines
96 KiB
JavaScript
27 lines
96 KiB
JavaScript
|
|
/*! This file is auto-generated */
|
||
|
|
(function() {
|
||
|
|
var wp;(wp||={}).formatLibrary=(()=>{var Tl=Object.create;var Qr=Object.defineProperty;var Cl=Object.getOwnPropertyDescriptor;var El=Object.getOwnPropertyNames;var kl=Object.getPrototypeOf,Nl=Object.prototype.hasOwnProperty;var Il=(t=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(t,{get:(e,r)=>(typeof require<"u"?require:e)[r]}):t)(function(t){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+t+'" is not supported')});var Z=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),to=(t,e)=>{for(var r in e)Qr(t,r,{get:e[r],enumerable:!0})},Pl=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of El(e))!Nl.call(t,o)&&o!==r&&Qr(t,o,{get:()=>e[o],enumerable:!(n=Cl(e,o))||n.enumerable});return t};var i=(t,e,r)=>(r=t!=null?Tl(kl(t)):{},Pl(e||!t||!t.__esModule?Qr(r,"default",{value:t,enumerable:!0}):r,t));var K=Z((hu,ea)=>{ea.exports=window.wp.richText});var U=Z((bu,ra)=>{ra.exports=window.wp.i18n});var G=Z((vu,oa)=>{oa.exports=window.wp.blockEditor});var W=Z((xu,na)=>{na.exports=window.wp.element});var J=Z((_u,aa)=>{aa.exports=window.wp.primitives});var R=Z((yu,ia)=>{ia.exports=window.ReactJSXRuntime});var Wt=Z((ad,ua)=>{ua.exports=window.wp.components});var N=Z((sd,ma)=>{ma.exports=window.React});var Ya=Z((Sm,Ka)=>{Ka.exports=window.ReactDOM});var ti=Z(Qa=>{"use strict";var le=N();function $f(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var Kf=typeof Object.is=="function"?Object.is:$f,Yf=le.useState,Gf=le.useEffect,qf=le.useLayoutEffect,Zf=le.useDebugValue;function Xf(t,e){var r=e(),n=Yf({inst:{value:r,getSnapshot:e}}),o=n[0].inst,a=n[1];return qf(function(){o.value=r,o.getSnapshot=e,rn(o)&&a({inst:o})},[t,r,e]),Gf(function(){return rn(o)&&a({inst:o}),t(function(){rn(o)&&a({inst:o})})},[t]),Zf(r),r}function rn(t){var e=t.getSnapshot;t=t.value;try{var r=e();return!Kf(t,r)}catch{return!0}}function Jf(t,e){return e()}var Qf=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?Jf:Xf;Qa.useSyncExternalStore=le.useSyncExternalStore!==void 0?le.useSyncExternalStore:Qf});var ri=Z((Fm,ei)=>{"use strict";ei.exports=ti()});var Nr=Z(($g,ki)=>{ki.exports=window.wp.a11y});var hn=Z((qg,Li)=>{Li.exports=window.wp.compose});var Ai=Z((Zg,Mi)=>{Mi.exports=window.wp.privateApis});var Or=Z((qh,fs)=>{fs.exports=window.wp.url});var us=Z((Zh,cs)=>{cs.exports=window.wp.htmlEntities});var Dn=Z((Xh,ds)=>{ds.exports=window.wp.data});var Rl=i(K(),1);var sa=i(U(),1),Mo=i(K(),1),ie=i(G(),1);var $e=i(W(),1),eo=(0,$e.forwardRef)(({icon:t,size:e=24,...r},n)=>(0,$e.cloneElement)(t,{width:e,height:e,...r,ref:n}));var Ke=i(J(),1),ro=i(R(),1),oo=(0,ro.jsx)(Ke.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,ro.jsx)(Ke.Path,{d:"M8 12.5h8V11H8v1.5Z M19 6.5H5a2 2 0 0 0-2 2V15a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V8.5a2 2 0 0 0-2-2ZM5 8h14a.5.5 0 0 1 .5.5V15a.5.5 0 0 1-.5.5H5a.5.5 0 0 1-.5-.5V8.5A.5.5 0 0 1 5 8Z"})});var Ye=i(J(),1),no=i(R(),1),ao=(0,no.jsx)(Ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,no.jsx)(Ye.Path,{d:"M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z"})});var Ge=i(J(),1),io=i(R(),1),so=(0,io.jsx)(Ge.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,io.jsx)(Ge.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"})});var qe=i(J(),1),lo=i(R(),1),fo=(0,lo.jsx)(qe.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,lo.jsx)(qe.Path,{d:"M17.2 10.9c-.5-1-1.2-2.1-2.1-3.2-.6-.9-1.3-1.7-2.1-2.6L12 4l-1 1.1c-.6.9-1.3 1.7-2 2.6-.8 1.2-1.5 2.3-2 3.2-.6 1.2-1 2.2-1 3 0 3.4 2.7 6.1 6.1 6.1s6.1-2.7 6.1-6.1c0-.8-.3-1.8-1-3zm-5.1 7.6c-2.5 0-4.6-2.1-4.6-4.6 0-.3.1-1 .8-2.3.5-.9 1.1-1.9 2-3.1.7-.9 1.3-1.7 1.8-2.3.7.8 1.3 1.6 1.8 2.3.8 1.1 1.5 2.2 2 3.1.7 1.3.8 2 .8 2.3 0 2.5-2.1 4.6-4.6 4.6z"})});var Ze=i(J(),1),co=i(R(),1),uo=(0,co.jsx)(Ze.SVG,{xmlns:"http://www
|
||
|
|
&[data-orientation=vertical]{border:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9));box-sizing:border-box}}.a5fd8814f195aa5e__tab{align-items:center;background:transparent;border:none;border-radius:0;box-shadow:none;color:var(--wpds-color-foreground-interactive-neutral,#1e1e1e);cursor:var(--wpds-cursor-control,pointer);display:flex;flex:1 0 auto;font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-typography-font-size-md,13px);font-weight:400;line-height:1.2;outline:none;padding:0;position:relative;white-space:nowrap;z-index:1;&[data-disabled]{color:var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d);cursor:default;@media (forced-colors:active){color:GrayText}}&:not([data-disabled]):is(:hover,:focus-visible){color:var(--wpds-color-foreground-interactive-neutral-active,#1e1e1e)}&:after{border-radius:var(--wpds-border-radius-sm,2px);opacity:0;outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9));pointer-events:none;position:absolute;z-index:-1;@media not (prefers-reduced-motion){transition:opacity .1s linear}}&:focus-visible:after{opacity:1}[data-orientation=horizontal] &{height:48px;padding-inline:var(--wpds-dimension-padding-lg,16px);scroll-margin:24px;&:after{content:"";inset:var(--wpds-dimension-padding-md,12px)}}._59228b5227f38a99__is-minimal-variant[data-orientation=horizontal] &{padding-inline:0;&:after{inset-inline:round(up,var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)),1px)}}[data-orientation=vertical] &{min-height:var(--wpds-dimension-size-lg,40px);padding:var(--wpds-dimension-padding-sm,8px) var(--wpds-dimension-padding-md,12px)}[data-orientation=vertical][data-select-on-move=false] &:after{content:"";inset:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px))}}._5dfc77e6edd345d4__tab-children{align-items:center;display:flex;flex-grow:1;[data-orientation=horizontal] &{justify-content:center}[data-orientation=vertical] &{justify-content:start}}._4a20e969d15e5ac1__tab-chevron{flex-shrink:0;margin-inline-end:calc(var(--wpds-dimension-gap-xs, 4px)*-1);opacity:0;[data-orientation=horizontal] &{display:none}[role=tab]:is([aria-selected=true],:focus-visible,:hover) &{opacity:1}@media not (prefers-reduced-motion){[data-select-on-move=true]
|
||
|
|
[role=tab]:is([aria-selected=true])
|
||
|
|
&{transition:opacity .15s linear .15s}}&:dir(rtl){rotate:180deg}}}}`);var Ve={tablist:"_7313adbc8a112e90__tablist","is-overflowing-first":"_9f2ac729c68a735a__is-overflowing-first","is-overflowing-last":"_81c799c1f3cdd261__is-overflowing-last","is-minimal-variant":"_59228b5227f38a99__is-minimal-variant",indicator:"_1c37dcfaa1ad8cda__indicator",tab:"a5fd8814f195aa5e__tab","tab-children":"_5dfc77e6edd345d4__tab-children","tab-chevron":"_4a20e969d15e5ac1__tab-chevron"},Ui=1,Ki=(0,Qt.forwardRef)(function({children:e,variant:r="default",className:n,activateOnFocus:o,...a},s){let[l,c]=(0,Qt.useState)(null),[f,d]=(0,Qt.useState)({first:!1,last:!1,isScrolling:!1});(0,Qt.useEffect)(()=>{if(!l)return;let S=()=>{let{scrollWidth:m,clientWidth:_,scrollLeft:u}=l,y=Math.max(m-_,0),E=(l.dir||(typeof window<"u"?window.getComputedStyle(l).direction:"ltr"))==="rtl"&&u<0?-u:u,I={first:E>Ui,last:E<y-Ui,isScrolling:m>_};d(k=>k.first===I.first&&k.last===I.last&&k.isScrolling===I.isScrolling?k:I)},b=new ResizeObserver(S),h=()=>{b.disconnect(),b.observe(l),l.querySelectorAll('[role="tab"]').forEach(m=>b.observe(m))},w=new MutationObserver(h);w.observe(l,{childList:!0,subtree:!0});let T=!1,v=()=>{T||(requestAnimationFrame(()=>{S(),T=!1}),T=!0)};return l.addEventListener("scroll",v,{passive:!0}),h(),S(),()=>{l.removeEventListener("scroll",v),b.disconnect(),w.disconnect()}},[l]);let g=(0,Wi.useMergeRefs)([s,S=>c(S)]);return(0,Lr.jsxs)(mt.List,{ref:g,activateOnFocus:o,"data-select-on-move":o?"true":"false",className:Lt(Ve.tablist,f.first&&Ve["is-overflowing-first"],f.last&&Ve["is-overflowing-last"],Ve[`is-${r}-variant`],n),...a,tabIndex:a.tabIndex??(f.isScrolling?-1:void 0),children:[e,(0,Lr.jsx)(mt.Indicator,{className:Ve.indicator})]})});var Zi=i(W(),1);var Q=i(W(),1);var je=i(R(),1),Mr=!1,En=Mr?(0,Q.createContext)(null):null;function Pc(){let t=(0,Q.useContext)(En);(0,Q.useEffect)(()=>{if(t)return t.registerTab()},[t])}function Lc(){}var Yi=Mr?Pc:Lc;function Mc(){let t=(0,Q.useContext)(En);(0,Q.useEffect)(()=>{if(t)return t.registerPanel()},[t])}function Ac(){}var Gi=Mr?Mc:Ac;function Oc({children:t}){let e=(0,Q.useRef)(0),r=(0,Q.useRef)(0),n=Vi(()=>{let l=e.current,c=r.current;if(l!==c)throw new Error(`Tabs: Tab/Panel count mismatch (${l} Tabs, ${c} Panels). Each Tab must be associated with exactly one Panel. Mismatched or missing associations can break screen reader navigation and violate WAI-ARIA Tabs pattern requirements.`)}),o=(0,Q.useCallback)(()=>(e.current+=1,n(),()=>{e.current-=1,n()}),[n]),a=(0,Q.useCallback)(()=>(r.current+=1,n(),()=>{r.current-=1,n()}),[n]),s=(0,Q.useMemo)(()=>({registerTab:o,registerPanel:a}),[o,a]);return(0,je.jsx)(En.Provider,{value:s,children:t})}function Bc({children:t}){return(0,je.jsx)(je.Fragment,{children:t})}var qi=Mr?Oc:Bc;var Qi=i(R(),1),kn="data-wp-hash";function Nn(){let t=globalThis;return t.__wpStyleRuntime||(t.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&jc(document)),t.__wpStyleRuntime}function Vc(t,e){if(!t.head)return!1;for(let r of t.head.querySelectorAll(`style[${kn}]`))if(r.getAttribute(kn)===e)return!0;return!1}function Xi(t,e,r){if(!t.head)return;let n=Nn(),o=n.injectedStyles.get(t);if(o||(o=new Set,n.injectedStyles.set(t,o)),o.has(e))return;if(Vc(t,e)){o.add(e);return}let a=t.createElement("style");a.setAttribute(kn,e),a.appendChild(t.createTextNode(r)),t.head.appendChild(a),o.add(e)}function jc(t){let e=Nn();e.documents.set(t,(e.documents.get(t)??0)+1);for(let[r,n]of e.styles)Xi(t,r,n);return()=>{let r=e.documents.get(t);if(r!==void 0){if(r<=1){e.documents.delete(t);return}e.documents.set(t,r-1)}}}function Ji(t,e){let r=Nn();r.styles.set(t,e);for(let n of r.documents.keys())Xi(n,t,e)}typeof process>"u",Ji("af6d9984a6","._6defc79820e382c6__button{box-sizing:var(--_gcd-button-box-sizing,border-box);font-family:var(--_gcd-button-font-family,inherit);font-size:var(--_gcd-button-font-size,inherit);font-weight:var(--_gcd-button-font-weight,inherit)}.d2cff2e5dea83bd1__input{box-sizing:var(--_gcd-input-box-sizing,border-box);font-family:var(
|
||
|
|
&[data-orientation=vertical]{border:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9));box-sizing:border-box}}.a5fd8814f195aa5e__tab{align-items:center;background:transparent;border:none;border-radius:0;box-shadow:none;color:var(--wpds-color-foreground-interactive-neutral,#1e1e1e);cursor:var(--wpds-cursor-control,pointer);display:flex;flex:1 0 auto;font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-typography-font-size-md,13px);font-weight:400;line-height:1.2;outline:none;padding:0;position:relative;white-space:nowrap;z-index:1;&[data-disabled]{color:var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d);cursor:default;@media (forced-colors:active){color:GrayText}}&:not([data-disabled]):is(:hover,:focus-visible){color:var(--wpds-color-foreground-interactive-neutral-active,#1e1e1e)}&:after{border-radius:var(--wpds-border-radius-sm,2px);opacity:0;outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9));pointer-events:none;position:absolute;z-index:-1;@media not (prefers-reduced-motion){transition:opacity .1s linear}}&:focus-visible:after{opacity:1}[data-orientation=horizontal] &{height:48px;padding-inline:var(--wpds-dimension-padding-lg,16px);scroll-margin:24px;&:after{content:"";inset:var(--wpds-dimension-padding-md,12px)}}._59228b5227f38a99__is-minimal-variant[data-orientation=horizontal] &{padding-inline:0;&:after{inset-inline:round(up,var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)),1px)}}[data-orientation=vertical] &{min-height:var(--wpds-dimension-size-lg,40px);padding:var(--wpds-dimension-padding-sm,8px) var(--wpds-dimension-padding-md,12px)}[data-orientation=vertical][data-select-on-move=false] &:after{content:"";inset:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px))}}._5dfc77e6edd345d4__tab-children{align-items:center;display:flex;flex-grow:1;[data-orientation=horizontal] &{justify-content:center}[data-orientation=vertical] &{justify-content:start}}._4a20e969d15e5ac1__tab-chevron{flex-shrink:0;margin-inline-end:calc(var(--wpds-dimension-gap-xs, 4px)*-1);opacity:0;[data-orientation=horizontal] &{display:none}[role=tab]:is([aria-selected=true],:focus-visible,:hover) &{opacity:1}@media not (prefers-reduced-motion){[data-select-on-move=true]
|
||
|
|
[role=tab]:is([aria-selected=true])
|
||
|
|
&{transition:opacity .15s linear .15s}}&:dir(rtl){rotate:180deg}}}}`);var Pn={tablist:"_7313adbc8a112e90__tablist","is-overflowing-first":"_9f2ac729c68a735a__is-overflowing-first","is-overflowing-last":"_81c799c1f3cdd261__is-overflowing-last","is-minimal-variant":"_59228b5227f38a99__is-minimal-variant",indicator:"_1c37dcfaa1ad8cda__indicator",tab:"a5fd8814f195aa5e__tab","tab-children":"_5dfc77e6edd345d4__tab-children","tab-chevron":"_4a20e969d15e5ac1__tab-chevron"},as=(0,os.forwardRef)(function({className:e,children:r,...n},o){return Yi(),(0,ze.jsxs)(mt.Tab,{ref:o,className:Lt(Pn.tab,e),...n,children:[(0,ze.jsx)("span",{className:Pn["tab-children"],children:r}),(0,ze.jsx)(gn,{icon:ao,className:Pn["tab-chevron"]})]})});var gt=i(U(),1),An=i(W(),1),Ar=i(K(),1),he=i(G(),1),$=i(R(),1),Wc=["image"],On="core/image",is=(0,gt.__)("Inline image");function $c(t){if(!t?.className)return;let[,e]=t.className.match(/wp-image-(\d+)/)??[];return e?parseInt(e,10):void 0}var Bn={name:On,title:is,keywords:[(0,gt.__)("photo"),(0,gt.__)("media")],object:!0,tagName:"img",className:null,attributes:{className:"class",style:"style",url:"src",alt:"alt"},edit:Yc};function Kc({value:t,onChange:e,activeObjectAttributes:r,contentRef:n}){let{style:o,alt:a}=r,s=o?.replace(/\D/g,""),[l,c]=(0,An.useState)(s),[f,d]=(0,An.useState)(a),g=l!==s||f!==a,S=(0,Ar.useAnchor)({editableContentElement:n.current,settings:Bn});return(0,$.jsx)(it.Popover,{focusOnMount:!1,anchor:S,className:"block-editor-format-toolbar__image-popover",children:(0,$.jsx)("form",{className:"block-editor-format-toolbar__image-container-content",onSubmit:b=>{let h=t.replacements.slice();h[t.start]={type:On,attributes:{...r,style:l?`width: ${l}px;`:"",alt:f}},e({...t,replacements:h}),b.preventDefault()},children:(0,$.jsxs)(pt,{direction:"column",gap:"lg",children:[(0,$.jsx)(it.__experimentalNumberControl,{label:(0,gt.__)("Width"),value:l,min:1,onChange:b=>{c(b)}}),(0,$.jsx)(it.TextareaControl,{label:(0,gt.__)("Alternative text"),value:f,onChange:b=>{d(b)},help:(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(Sn,{openInNewTab:!0,href:(0,gt.__)("https://www.w3.org/WAI/tutorials/images/decision-tree/"),children:(0,gt.__)("Describe the purpose of the image.")}),(0,$.jsx)("br",{}),(0,gt.__)("Leave empty if decorative.")]})}),(0,$.jsx)(pt,{justify:"right",children:(0,$.jsx)(it.Button,{disabled:!g,accessibleWhenDisabled:!0,variant:"primary",type:"submit",size:"compact",children:(0,gt.__)("Apply")})})]})})})}function Yc({value:t,onChange:e,onFocus:r,isObjectActive:n,activeObjectAttributes:o,contentRef:a}){return(0,$.jsxs)(he.MediaUploadCheck,{children:[(0,$.jsx)(he.MediaUpload,{allowedTypes:Wc,value:$c(o),onSelect:({id:s,url:l,alt:c,width:f})=>{e((0,Ar.insertObject)(t,{type:On,attributes:{className:`wp-image-${s}`,style:`width: ${Math.min(f,150)}px;`,url:l,alt:c}})),r()},render:({open:s})=>(0,$.jsx)(he.RichTextToolbarButton,{icon:(0,$.jsx)(it.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,$.jsx)(it.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:n?(0,gt.__)("Replace image"):is,onClick:s,isActive:n})}),n&&(0,$.jsx)(Kc,{value:t,onChange:e,activeObjectAttributes:o,contentRef:a})]})}var ss=i(U(),1),zn=i(K(),1),be=i(G(),1);var Vt=i(R(),1),Vn="core/italic",jn=(0,ss.__)("Italic"),ls={name:Vn,title:jn,tagName:"em",className:null,edit({isActive:t,value:e,onChange:r,onFocus:n,isVisible:o=!0}){function a(){r((0,zn.toggleFormat)(e,{type:Vn,title:jn}))}function s(){r((0,zn.toggleFormat)(e,{type:Vn})),n()}return(0,Vt.jsxs)(Vt.Fragment,{children:[(0,Vt.jsx)(be.RichTextShortcut,{type:"primary",character:"i",onUse:a}),o&&(0,Vt.jsx)(be.RichTextToolbarButton,{name:"italic",icon:po,title:jn,onClick:s,isActive:t,shortcutType:"primary",shortcutCharacter:"i"}),(0,Vt.jsx)(be.__unstableRichTextInputEvent,{inputType:"formatItalic",onInput:a})]})}};var
|
||
|
|
|
||
|
|
`,n);let o={type:xe,attributes:{url:(0,Rs.decodeEntities)(n)}};return(0,Y.isCollapsed)(t)?(0,Y.insert)(t,(0,Y.applyFormat)((0,Y.create)({text:r}),o,0,r.length)):(0,Y.applyFormat)(t,o)},edit:Qc};var Es=i(U(),1),ks=i(K(),1),Ur=i(G(),1);var oe=i(R(),1),Cs="core/strikethrough",Fn=(0,Es.__)("Strikethrough"),Ns={name:Cs,title:Fn,tagName:"s",className:null,edit({isActive:t,value:e,onChange:r,onFocus:n}){function o(){r((0,ks.toggleFormat)(e,{type:Cs,title:Fn})),n()}return(0,oe.jsxs)(oe.Fragment,{children:[(0,oe.jsx)(Ur.RichTextShortcut,{type:"access",character:"d",onUse:o}),(0,oe.jsx)(Ur.RichTextToolbarButton,{icon:ho,title:Fn,onClick:o,isActive:t,role:"menuitemcheckbox"})]})}};var Ls=i(U(),1),Ms=i(K(),1),Wr=i(G(),1),ne=i(R(),1),Is="core/underline",Ps=(0,Ls.__)("Underline"),As={name:Is,title:Ps,tagName:"span",className:null,attributes:{style:"style"},edit({value:t,onChange:e}){let r=()=>{e((0,Ms.toggleFormat)(t,{type:Is,attributes:{style:"text-decoration: underline;"},title:Ps}))};return(0,ne.jsxs)(ne.Fragment,{children:[(0,ne.jsx)(Wr.RichTextShortcut,{type:"primary",character:"u",onUse:r}),(0,ne.jsx)(Wr.__unstableRichTextInputEvent,{inputType:"formatUnderline",onInput:r})]})}};var zs=i(U(),1),Gr=i(W(),1),qr=i(G(),1);var Ds=i(K(),1);var Os=i(W(),1),Bs=i(Dn(),1),jt=i(K(),1),yt=i(G(),1),Vs=i(Wt(),1);var Wn=i(U(),1);var kt=i(R(),1),Un=[{name:"color",title:(0,Wn.__)("Text")},{name:"backgroundColor",title:(0,Wn.__)("Background")}];function tu(t=""){return t.split(";").reduce((e,r)=>{if(r){let[n,o]=r.split(":");n==="color"&&(e.color=o),n==="background-color"&&o!==Ue&&(e.backgroundColor=o)}return e},{})}function eu(t="",e){return t.split(" ").reduce((r,n)=>{if(n.startsWith("has-")&&n.endsWith("-color")){let o=n.replace(/^has-/,"").replace(/-color$/,""),a=(0,yt.getColorObjectByAttributeValues)(e,o);r.color=a.color}return r},{})}function $r(t,e,r){let n=(0,jt.getActiveFormat)(t,e);return n?{...tu(n.attributes.style),...eu(n.attributes.class,r)}:{}}function ru(t,e,r,n){let{color:o,backgroundColor:a}={...$r(t,e,r),...n};if(!o&&!a)return(0,jt.removeFormat)(t,e);let s=[],l=[],c={};if(a?s.push(["background-color",a].join(":")):s.push(["background-color",Ue].join(":")),o){let f=(0,yt.getColorObjectByColorValue)(r,o);f?l.push((0,yt.getColorClassName)("color",f.slug)):s.push(["color",o].join(":"))}return s.length&&(c.style=s.join(";")),l.length&&(c.class=l.join(" ")),(0,jt.applyFormat)(t,{type:e,attributes:c})}function ou({name:t,property:e,value:r,onChange:n}){let o=(0,Bs.useSelect)(s=>{let{getSettings:l}=s(yt.store);return l().colors??[]},[]),a=(0,Os.useMemo)(()=>$r(r,t,o),[t,r,o]);return(0,kt.jsx)(yt.ColorPalette,{value:a[e],onChange:s=>{n(ru(r,t,o,{[e]:s}))},enableAlpha:!0,__experimentalIsRenderedInSidebar:!0})}function js({name:t,value:e,onChange:r,onClose:n,contentRef:o,isActive:a}){let s=(0,jt.useAnchor)({editableContentElement:o.current,settings:{...Kr,isActive:a}});return(0,kt.jsx)(Vs.Popover,{onClose:n,className:"format-library__inline-color-popover",anchor:s,children:(0,kt.jsxs)(te.Root,{defaultValue:Un[0].name,children:[(0,kt.jsx)(te.List,{children:Un.map(l=>(0,kt.jsx)(te.Tab,{value:l.name,children:l.title},l.name))}),Un.map(l=>(0,kt.jsx)(te.Panel,{value:l.name,tabIndex:-1,children:(0,kt.jsx)(ou,{name:t,property:l.name,value:e,onChange:r})},l.name))]})})}var zt=i(R(),1),Ue="rgba(0, 0, 0, 0)",Yr="core/text-color",Hs=(0,zs.__)("Highlight"),nu=[];function $n(t,e){let{ownerDocument:r}=t,{defaultView:n}=r,a=n.getComputedStyle(t).getPropertyValue(e);return e==="background-color"&&a===Ue&&t.parentElement?$n(t.parentElement,e):a}function au(t,{color:e,backgroundColor:r}){if(!(!e&&!r))return{color:e||$n(t,"color"),backgroundColor:r===Ue?$n(t,"background-color"):r}}function iu({value:t,onChange:e,isActive:r,activeAttributes:n,contentRef:o}){let[a,s=nu]=(0,qr.useSettings)("color.custom","color.palette"),[l,c]=(0,Gr.useState)(!1),f=(0,Gr.useMemo)(()=>au(o.current,$r(t,Yr,s)),[o,t,s]),d=!!s.length||a;return!d&&!r?null:(0,zt.jsxs)(zt.Fragment,{children:[(0,zt.jsx)(qr.RichTextToolbarButton,{className:"format-library-text-color-button",isActive:r,i
|
||
|
|
/*! Bundled license information:
|
||
|
|
|
||
|
|
use-sync-external-store/cjs/use-sync-external-store-shim.production.js:
|
||
|
|
(**
|
||
|
|
* @license React
|
||
|
|
* use-sync-external-store-shim.production.js
|
||
|
|
*
|
||
|
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||
|
|
*
|
||
|
|
* This source code is licensed under the MIT license found in the
|
||
|
|
* LICENSE file in the root directory of this source tree.
|
||
|
|
*)
|
||
|
|
*/
|
||
|
|
(window.wp ||= {}).formatLibrary = wp.formatLibrary;
|
||
|
|
})();
|