Server : Apache System : Linux 122.228.205.92.host.secureserver.net 5.14.0-362.18.1.el9_3.x86_64 #1 SMP PREEMPT_DYNAMIC Mon Jan 29 07:05:48 EST 2024 x86_64 User : ondostategov ( 1002) PHP Version : 8.1.33 Disable Function : NONE Directory : /home/ondostategov/public_html/wp-includes/js/dist/ |
/*! This file is auto-generated */
(()=>{"use strict";var e,t,n={3533:e=>{e.exports=window.wp.latexToMathml}},o={};function a(e){var t=o[e];if(void 0!==t)return t.exports;var r=o[e]={exports:{}};return n[e](r,r.exports,a),r.exports}t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,a.t=function(n,o){if(1&o&&(n=this(n)),8&o)return n;if("object"==typeof n&&n){if(4&o&&n.__esModule)return n;if(16&o&&"function"==typeof n.then)return n}var r=Object.create(null);a.r(r);var s={};e=e||[null,t({}),t([]),t(t)];for(var i=2&o&&n;"object"==typeof i&&!~e.indexOf(i);i=t(i))Object.getOwnPropertyNames(i).forEach((e=>s[e]=()=>n[e]));return s.default=()=>n,a.d(r,s),r},a.d=(e,t)=>{for(var n in t)a.o(t,n)&&!a.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),a.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};const r=window.wp.richText,s=window.ReactJSXRuntime,i=window.wp.i18n,l=window.wp.blockEditor,c=window.wp.primitives;var u=(0,s.jsx)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,s.jsx)(c.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 h=window.wp.privateApis,{lock:p,unlock:m}=(0,h.__dangerousOptInToUnstableAPIsOnlyForCoreModules)("I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.","@wordpress/format-library"),{essentialFormatKey:d}=m(l.privateApis),g="core/bold",x=(0,i.__)("Bold"),v={name:g,title:x,tagName:"strong",className:null,[d]:!0,edit({isActive:e,value:t,onChange:n,onFocus:o}){function a(){n((0,r.toggleFormat)(t,{type:g,title:x}))}return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(l.RichTextShortcut,{type:"primary",character:"b",onUse:a}),(0,s.jsx)(l.RichTextToolbarButton,{name:"bold",icon:u,title:x,onClick:function(){n((0,r.toggleFormat)(t,{type:g})),o()},isActive:e,shortcutType:"primary",shortcutCharacter:"b"}),(0,s.jsx)(l.__unstableRichTextInputEvent,{inputType:"formatBold",onInput:a})]})}};var f=(0,s.jsx)(c.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,s.jsx)(c.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 b="core/code",_=(0,i.__)("Inline code"),w={name:b,title:_,tagName:"code",className:null,__unstableInputRule(e){const{start:t,text:n}=e;if("`"!==n[t-1])return e;if(t-2<0)return e;const o=n.lastIndexOf("`",t-2);if(-1===o)return e;const a=o,s=t-2;return a===s?e:(e=(0,r.remove)(e,a,a+1),e=(0,r.remove)(e,s,s+1),e=(0,r.applyFormat)(e,{type:b},a,s))},edit({value:e,onChange:t,onFocus:n,isActive:o}){function a(){t((0,r.toggleFormat)(e,{type:b,title:_})),n()}return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(l.RichTextShortcut,{type:"access",character:"x",onUse:a}),(0,s.jsx)(l.RichTextToolbarButton,{icon:f,title:_,onClick:a,isActive:o,role:"menuitemcheckbox"})]})}},y=window.wp.components,j=window.wp.element,C=["image"],k="core/image",S=(0,i.__)("Inline image");function T(e){if(!e?.className)return;const[,t]=e.className.match(/wp-image-(\d+)/)??[];return t?parseInt(t,10):void 0}const A={name:k,title:S,keywords:[(0,i.__)("photo"),(0,i.__)("media")],object:!0,tagName:"img",className:null,attributes:{className:"class",style:"style",url:"src",alt:"alt"},edit:function({value:e,onChange:t,onFocus:n,isObjectActive:o,activeObjectAttributes:a,contentRef:c}){return(0,s.jsxs)(l.MediaUploadCheck,{children:[(0,s.jsx)(l.MediaUpload,{allowedTypes:C,value:T(a),onSelect:({id:o,url:a,alt:s,width:i})=>{t((0,r.insertObject)(e,{type:k,attributes:{className:`wp-image-${o}`,style:`width: ${Math.min(i,150)}px;`,url:a,alt:s}})),n()},render:({open:e})=>(0,s.jsx)(l.RichTextToolbarButton,{icon:(0,s.jsx)(y.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,s.jsx)(y.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:o?(0,i.__)("Replace image"):S,onClick:e,isActive:o})}),o&&(0,s.jsx)(F,{value:e,onChange:t,activeObjectAttributes:a,contentRef:c})]})}};function F({value:e,onChange:t,activeObjectAttributes:n,contentRef:o}){const{style:a,alt:l}=n,c=a?.replace(/\D/g,""),[u,h]=(0,j.useState)(c),[p,m]=(0,j.useState)(l),d=u!==c||p!==l,g=(0,r.useAnchor)({editableContentElement:o.current,settings:A});return(0,s.jsx)(y.Popover,{placement:"bottom",focusOnMount:!1,anchor:g,className:"block-editor-format-toolbar__image-popover",children:(0,s.jsx)("form",{className:"block-editor-format-toolbar__image-container-content",onSubmit:o=>{const a=e.replacements.slice();a[e.start]={type:k,attributes:{...n,style:u?`width: ${u}px;`:"",alt:p}},t({...e,replacements:a}),o.preventDefault()},children:(0,s.jsxs)(y.__experimentalVStack,{spacing:4,children:[(0,s.jsx)(y.__experimentalNumberControl,{__next40pxDefaultSize:!0,label:(0,i.__)("Width"),value:u,min:1,onChange:e=>{h(e)}}),(0,s.jsx)(y.TextareaControl,{label:(0,i.__)("Alternative text"),__nextHasNoMarginBottom:!0,value:p,onChange:e=>{m(e)},help:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(y.ExternalLink,{href:(0,i.__)("https://www.w3.org/WAI/tutorials/images/decision-tree/"),children:(0,i.__)("Describe the purpose of the image.")}),(0,s.jsx)("br",{}),(0,i.__)("Leave empty if decorative.")]})}),(0,s.jsx)(y.__experimentalHStack,{justify:"right",children:(0,s.jsx)(y.Button,{disabled:!d,accessibleWhenDisabled:!0,variant:"primary",type:"submit",size:"compact",children:(0,i.__)("Apply")})})]})})})}var N=(0,s.jsx)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,s.jsx)(c.Path,{d:"M12.5 5L10 19h1.9l2.5-14z"})});const{essentialFormatKey:M}=m(l.privateApis),R="core/italic",V=(0,i.__)("Italic"),P={name:R,title:V,tagName:"em",className:null,[M]:!0,edit({isActive:e,value:t,onChange:n,onFocus:o}){function a(){n((0,r.toggleFormat)(t,{type:R,title:V}))}return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(l.RichTextShortcut,{type:"primary",character:"i",onUse:a}),(0,s.jsx)(l.RichTextToolbarButton,{name:"italic",icon:N,title:V,onClick:function(){n((0,r.toggleFormat)(t,{type:R})),o()},isActive:e,shortcutType:"primary",shortcutCharacter:"i"}),(0,s.jsx)(l.__unstableRichTextInputEvent,{inputType:"formatItalic",onInput:a})]})}},B=window.wp.url,L=window.wp.htmlEntities;var O=(0,s.jsx)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,s.jsx)(c.Path,{d:"M10 17.389H8.444A5.194 5.194 0 1 1 8.444 7H10v1.5H8.444a3.694 3.694 0 0 0 0 7.389H10v1.5ZM14 7h1.556a5.194 5.194 0 0 1 0 10.39H14v-1.5h1.556a3.694 3.694 0 0 0 0-7.39H14V7Zm-4.5 6h5v-1.5h-5V13Z"})});const I=window.wp.a11y,H=window.wp.data;function z(e){if(!e)return!1;const t=e.trim();if(!t)return!1;if(/^\S+:/.test(t)){const e=(0,B.getProtocol)(t);if(!(0,B.isValidProtocol)(e))return!1;if(e.startsWith("http")&&!/^https?:\/\/[^\/\s]/i.test(t))return!1;const n=(0,B.getAuthority)(t);if(!(0,B.isValidAuthority)(n))return!1;const o=(0,B.getPath)(t);if(o&&!(0,B.isValidPath)(o))return!1;const a=(0,B.getQueryString)(t);if(a&&!(0,B.isValidQueryString)(a))return!1;const r=(0,B.getFragment)(t);if(r&&!(0,B.isValidFragment)(r))return!1}return!(t.startsWith("#")&&!(0,B.isValidFragment)(t))}function E(e,t,n=e.start,o=e.end){const a={start:null,end:null},{formats:r}=e;let s,i;if(!r?.length)return a;const l=r.slice(),c=l[n]?.find((({type:e})=>e===t.type)),u=l[o]?.find((({type:e})=>e===t.type)),h=l[o-1]?.find((({type:e})=>e===t.type));if(c)s=c,i=n;else if(u)s=u,i=o;else{if(!h)return a;s=h,i=o-1}const p=l[i].indexOf(s),m=[l,i,s,p];return{start:n=(n=G(...m))<0?0:n,end:o=W(...m)}}function U(e,t,n,o,a){let r=t;const s={forwards:1,backwards:-1}[a]||1,i=-1*s;for(;e[r]&&e[r][o]===n;)r+=s;return r+=i,r}const D=(e,...t)=>(...n)=>e(...n,...t),G=D(U,"backwards"),W=D(U,"forwards"),Z=window.wp.compose,$=({setting:e,value:t,onChange:n})=>{const o=!!t&&t?.cssClasses?.length>0,[a,r]=(0,j.useState)(o),l=`css-classes-setting-${(0,Z.useInstanceId)($)}`,c=o=>{const a="string"==typeof o?o.replace(/,/g," ").replace(/\s+/g," ").trim():o;n({...t,[e.id]:a})};return(0,s.jsxs)("fieldset",{children:[(0,s.jsx)(y.VisuallyHidden,{as:"legend",children:e.title}),(0,s.jsxs)(y.__experimentalVStack,{spacing:3,children:[(0,s.jsx)(y.CheckboxControl,{__nextHasNoMarginBottom:!0,label:e.title,onChange:()=>{a?(o&&c(""),r(!1)):r(!0)},checked:a||o,"aria-expanded":a,"aria-controls":a?l:void 0}),a&&(0,s.jsx)("div",{id:l,children:(0,s.jsx)(y.__experimentalInputControl,{label:(0,i.__)("CSS classes"),value:t?.cssClasses,onChange:c,help:(0,i.__)("Separate multiple classes with spaces."),__unstableInputWidth:"100%",__next40pxDefaultSize:!0})})]})]})};var K=$;const Q=[...l.LinkControl.DEFAULT_LINK_SETTINGS,{id:"nofollow",title:(0,i.__)("Mark as nofollow")},{id:"cssClasses",title:(0,i.__)("Additional CSS class(es)"),render:(e,t,n)=>(0,s.jsx)(K,{setting:e,value:t,onChange:n})}];var X=function({isActive:e,activeAttributes:t,value:n,onChange:o,onFocusOutside:a,stopAddingLink:c,contentRef:u,focusOnMount:h}){const p=function(e,t){let n=e.start,o=e.end;if(t){const t=E(e,{type:"core/link"});n=t.start,o=t.end+1}return(0,r.slice)(e,n,o)}(n,e).text,{selectionChange:m}=(0,H.useDispatch)(l.store),{createPageEntity:d,userCanCreatePages:g,selectionStart:x}=(0,H.useSelect)((e=>{const{getSettings:t,getSelectionStart:n}=e(l.store),o=t();return{createPageEntity:o.__experimentalCreatePageEntity,userCanCreatePages:o.__experimentalUserCanCreatePages,selectionStart:n()}}),[]),v=(0,j.useMemo)((()=>({url:t.url,type:t.type,id:t.id,opensInNewTab:"_blank"===t.target,nofollow:t.rel?.includes("nofollow"),title:p,cssClasses:t.class})),[t.class,t.id,t.rel,t.target,t.type,t.url,p]),f=(0,r.useAnchor)({editableContentElement:u.current,settings:{...ee,isActive:e}});return(0,s.jsx)(y.Popover,{anchor:f,animate:!1,onClose:c,onFocusOutside:a,placement:"bottom",offset:8,shift:!0,focusOnMount:h,constrainTabbing:!0,children:(0,s.jsx)(l.LinkControl,{value:v,onChange:function(t){const a=v?.url,s=!a;t={...v,...t};const l=(0,B.prependHTTP)(t.url),u=function({url:e,type:t,id:n,opensInNewWindow:o,nofollow:a,cssClasses:r}){const s={type:"core/link",attributes:{url:e}};t&&(s.attributes.type=t),n&&(s.attributes.id=n),o&&(s.attributes.target="_blank",s.attributes.rel=s.attributes.rel?s.attributes.rel+" noreferrer noopener":"noreferrer noopener"),a&&(s.attributes.rel=s.attributes.rel?s.attributes.rel+" nofollow":"nofollow");const i=r?.trim();return i?.length&&(s.attributes.class=i),s}({url:l,type:t.type,id:void 0!==t.id&&null!==t.id?String(t.id):void 0,opensInNewWindow:t.opensInNewTab,nofollow:t.nofollow,cssClasses:t.cssClasses}),h=t.title||l;let d;if((0,r.isCollapsed)(n)&&!e){const e=(0,r.insert)(n,h);return d=(0,r.applyFormat)(e,u,n.start,n.start+h.length),o(d),c(),void m({clientId:x.clientId,identifier:x.attributeKey,start:n.start+h.length+1})}if(h===p)d=(0,r.applyFormat)(n,u);else{d=(0,r.create)({text:h}),d=(0,r.applyFormat)(d,u,0,h.length);const e=E(n,{type:"core/link"}),[t,o]=(0,r.split)(n,e.start,e.start),a=(0,r.replace)(o,p,d);d=(0,r.concat)(t,a)}o(d),s||c(),z(l)?e?(0,I.speak)((0,i.__)("Link edited."),"assertive"):(0,I.speak)((0,i.__)("Link inserted."),"assertive"):(0,I.speak)((0,i.__)("Warning: the link has been inserted but may have errors. Please test it."),"assertive")},onRemove:function(){const e=(0,r.removeFormat)(n,"core/link");o(e),c(),(0,I.speak)((0,i.__)("Link removed."),"assertive")},hasRichPreviews:!0,createSuggestion:d&&async function(e){const t=await d({title:e,status:"draft"});return{id:t.id,type:t.type,title:t.title.rendered,url:t.link,kind:"post-type"}},withCreateSuggestion:g,createSuggestionButtonText:function(e){return(0,j.createInterpolateElement)((0,i.sprintf)((0,i.__)("Create page: <mark>%s</mark>"),e),{mark:(0,s.jsx)("mark",{})})},hasTextControl:!0,settings:Q,showInitialSuggestions:!0,suggestionsQuery:{initialSuggestionsSearchOptions:{type:"post",subtype:"page",perPage:20}}})})};const{essentialFormatKey:J}=m(l.privateApis),q="core/link",Y=(0,i.__)("Link");const ee={name:q,title:Y,tagName:"a",className:null,attributes:{url:"href",type:"data-type",id:"data-id",_id:"id",target:"target",rel:"rel",class:"class"},[J]:!0,__unstablePasteRule(e,{html:t,plainText:n}){const o=(t||n).replace(/<[^>]+>/g,"").trim();if(!(0,B.isURL)(o)||!/^https?:/.test(o))return e;window.console.log("Created link:\n\n",o);const a={type:q,attributes:{url:(0,L.decodeEntities)(o)}};return(0,r.isCollapsed)(e)?(0,r.insert)(e,(0,r.applyFormat)((0,r.create)({text:n}),a,0,n.length)):(0,r.applyFormat)(e,a)},edit:function({isActive:e,activeAttributes:t,value:n,onChange:o,onFocus:a,contentRef:c}){const[u,h]=(0,j.useState)(!1),[p,m]=(0,j.useState)(null);function d(t){const a=(0,r.getTextContent)((0,r.slice)(n));!e&&a&&(0,B.isURL)(a)&&z(a)?o((0,r.applyFormat)(n,{type:q,attributes:{url:a}})):!e&&a&&(0,B.isEmail)(a)?o((0,r.applyFormat)(n,{type:q,attributes:{url:`mailto:${a}`}})):!e&&a&&(0,B.isPhoneNumber)(a)?o((0,r.applyFormat)(n,{type:q,attributes:{url:`tel:${a.replace(/\D/g,"")}`}})):(t&&m({el:t,action:null}),h(!0))}(0,j.useEffect)((()=>{e||h(!1)}),[e]),(0,j.useLayoutEffect)((()=>{const t=c.current;if(t)return t.addEventListener("click",n),()=>{t.removeEventListener("click",n)};function n(t){const n=t.target.closest("[contenteditable] a");n&&e&&(h(!0),m({el:n,action:"click"}))}}),[c,e]);const g=!("A"===p?.el?.tagName&&"click"===p?.action),x=!(0,r.isCollapsed)(n);return(0,s.jsxs)(s.Fragment,{children:[x&&(0,s.jsx)(l.RichTextShortcut,{type:"primary",character:"k",onUse:d}),(0,s.jsx)(l.RichTextShortcut,{type:"primaryShift",character:"k",onUse:function(){o((0,r.removeFormat)(n,q)),(0,I.speak)((0,i.__)("Link removed."),"assertive")}}),(0,s.jsx)(l.RichTextToolbarButton,{name:"link",icon:O,title:e?(0,i.__)("Link"):Y,onClick:e=>{d(e.currentTarget)},isActive:e||u,shortcutType:"primary",shortcutCharacter:"k","aria-haspopup":"true","aria-expanded":u}),u&&(0,s.jsx)(X,{stopAddingLink:function(){h(!1),"BUTTON"===p?.el?.tagName?p.el.focus():a(),m(null)},onFocusOutside:function(){h(!1),m(null)},isActive:e,activeAttributes:t,value:n,onChange:o,contentRef:c,focusOnMount:!!g&&"firstElement"})]})}};var te=(0,s.jsx)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,s.jsx)(c.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 ne="core/strikethrough",oe=(0,i.__)("Strikethrough"),ae={name:ne,title:oe,tagName:"s",className:null,edit({isActive:e,value:t,onChange:n,onFocus:o}){function a(){n((0,r.toggleFormat)(t,{type:ne,title:oe})),o()}return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(l.RichTextShortcut,{type:"access",character:"d",onUse:a}),(0,s.jsx)(l.RichTextToolbarButton,{icon:te,title:oe,onClick:a,isActive:e,role:"menuitemcheckbox"})]})}},re="core/underline",se=(0,i.__)("Underline"),ie={name:re,title:se,tagName:"span",className:null,attributes:{style:"style"},edit({value:e,onChange:t}){const n=()=>{t((0,r.toggleFormat)(e,{type:re,attributes:{style:"text-decoration: underline;"},title:se}))};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(l.RichTextShortcut,{type:"primary",character:"u",onUse:n}),(0,s.jsx)(l.__unstableRichTextInputEvent,{inputType:"formatUnderline",onInput:n})]})}};var le=(0,j.forwardRef)((({icon:e,size:t=24,...n},o)=>(0,j.cloneElement)(e,{width:t,height:t,...n,ref:o}))),ce=(0,s.jsx)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,s.jsx)(c.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"})}),ue=(0,s.jsx)(c.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,s.jsx)(c.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"})});const{Tabs:he}=m(y.privateApis),pe=[{name:"color",title:(0,i.__)("Text")},{name:"backgroundColor",title:(0,i.__)("Background")}];function me(e=""){return e.split(";").reduce(((e,t)=>{if(t){const[n,o]=t.split(":");"color"===n&&(e.color=o),"background-color"===n&&o!==fe&&(e.backgroundColor=o)}return e}),{})}function de(e="",t){return e.split(" ").reduce(((e,n)=>{if(n.startsWith("has-")&&n.endsWith("-color")){const o=n.replace(/^has-/,"").replace(/-color$/,""),a=(0,l.getColorObjectByAttributeValues)(t,o);e.color=a.color}return e}),{})}function ge(e,t,n){const o=(0,r.getActiveFormat)(e,t);return o?{...me(o.attributes.style),...de(o.attributes.class,n)}:{}}function xe({name:e,property:t,value:n,onChange:o}){const a=(0,H.useSelect)((e=>{const{getSettings:t}=e(l.store);return t().colors??[]}),[]),i=(0,j.useMemo)((()=>ge(n,e,a)),[e,n,a]);return(0,s.jsx)(l.ColorPalette,{value:i[t],onChange:s=>{o(function(e,t,n,o){const{color:a,backgroundColor:s}={...ge(e,t,n),...o};if(!a&&!s)return(0,r.removeFormat)(e,t);const i=[],c=[],u={};if(s?i.push(["background-color",s].join(":")):i.push(["background-color",fe].join(":")),a){const e=(0,l.getColorObjectByColorValue)(n,a);e?c.push((0,l.getColorClassName)("color",e.slug)):i.push(["color",a].join(":"))}return i.length&&(u.style=i.join(";")),c.length&&(u.class=c.join(" ")),(0,r.applyFormat)(e,{type:t,attributes:u})}(n,e,a,{[t]:s}))},enableAlpha:!0,__experimentalIsRenderedInSidebar:!0})}function ve({name:e,value:t,onChange:n,onClose:o,contentRef:a,isActive:i}){const l=(0,r.useAnchor)({editableContentElement:a.current,settings:{...je,isActive:i}});return(0,s.jsx)(y.Popover,{onClose:o,className:"format-library__inline-color-popover",anchor:l,children:(0,s.jsxs)(he,{children:[(0,s.jsx)(he.TabList,{children:pe.map((e=>(0,s.jsx)(he.Tab,{tabId:e.name,children:e.title},e.name)))}),pe.map((o=>(0,s.jsx)(he.TabPanel,{tabId:o.name,focusable:!1,children:(0,s.jsx)(xe,{name:e,property:o.name,value:t,onChange:n})},o.name)))]})})}const fe="rgba(0, 0, 0, 0)",be="core/text-color",_e=(0,i.__)("Highlight"),we=[];function ye(e,t){const{ownerDocument:n}=e,{defaultView:o}=n,a=o.getComputedStyle(e).getPropertyValue(t);return"background-color"===t&&a===fe&&e.parentElement?ye(e.parentElement,t):a}const je={name:be,title:_e,tagName:"mark",className:"has-inline-color",attributes:{style:"style",class:"class"},edit:function({value:e,onChange:t,isActive:n,activeAttributes:o,contentRef:a}){const[i,c=we]=(0,l.useSettings)("color.custom","color.palette"),[u,h]=(0,j.useState)(!1),p=(0,j.useMemo)((()=>function(e,{color:t,backgroundColor:n}){if(t||n)return{color:t||ye(e,"color"),backgroundColor:n===fe?ye(e,"background-color"):n}}(a.current,ge(e,be,c))),[a,e,c]),m=!!c.length||i;return m||n?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(l.RichTextToolbarButton,{className:"format-library-text-color-button",isActive:n,icon:(0,s.jsx)(le,{icon:Object.keys(o).length?ce:ue,style:p}),title:_e,onClick:m?()=>h(!0):()=>t((0,r.removeFormat)(e,be)),role:"menuitemcheckbox"}),u&&(0,s.jsx)(ve,{name:be,onClose:()=>h(!1),activeAttributes:o,value:e,onChange:t,contentRef:a,isActive:n})]}):null}};var Ce=(0,s.jsx)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,s.jsx)(c.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 ke="core/subscript",Se=(0,i.__)("Subscript"),Te={name:ke,title:Se,tagName:"sub",className:null,edit:({isActive:e,value:t,onChange:n,onFocus:o})=>(0,s.jsx)(l.RichTextToolbarButton,{icon:Ce,title:Se,onClick:function(){n((0,r.toggleFormat)(t,{type:ke,title:Se})),o()},isActive:e,role:"menuitemcheckbox"})};var Ae=(0,s.jsx)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,s.jsx)(c.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 Fe="core/superscript",Ne=(0,i.__)("Superscript"),Me={name:Fe,title:Ne,tagName:"sup",className:null,edit:({isActive:e,value:t,onChange:n,onFocus:o})=>(0,s.jsx)(l.RichTextToolbarButton,{icon:Ae,title:Ne,onClick:function(){n((0,r.toggleFormat)(t,{type:Fe,title:Ne})),o()},isActive:e,role:"menuitemcheckbox"})};var Re=(0,s.jsx)(c.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,s.jsx)(c.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"})});const Ve="core/keyboard",Pe=(0,i.__)("Keyboard input"),Be={name:Ve,title:Pe,tagName:"kbd",className:null,edit:({isActive:e,value:t,onChange:n,onFocus:o})=>(0,s.jsx)(l.RichTextToolbarButton,{icon:Re,title:Pe,onClick:function(){n((0,r.toggleFormat)(t,{type:Ve,title:Pe})),o()},isActive:e,role:"menuitemcheckbox"})};var Le=(0,s.jsx)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,s.jsx)(c.Path,{d:"M12 4a8 8 0 1 1 .001 16.001A8 8 0 0 1 12 4Zm0 1.5a6.5 6.5 0 1 0-.001 13.001A6.5 6.5 0 0 0 12 5.5Zm.75 11h-1.5V15h1.5v1.5Zm-.445-9.234a3 3 0 0 1 .445 5.89V14h-1.5v-1.25c0-.57.452-.958.917-1.01A1.5 1.5 0 0 0 12 8.75a1.5 1.5 0 0 0-1.5 1.5H9a3 3 0 0 1 3.305-2.984Z"})});const Oe="core/unknown",Ie=(0,i.__)("Clear Unknown Formatting");const He={name:Oe,title:Ie,tagName:"*",className:null,edit({isActive:e,value:t,onChange:n,onFocus:o}){if(!e&&!function(e){return!(0,r.isCollapsed)(e)&&(0,r.slice)(e).formats.some((e=>e.some((e=>e.type===Oe))))}(t))return null;return(0,s.jsx)(l.RichTextToolbarButton,{name:"unknown",icon:Le,title:Ie,onClick:function(){n((0,r.removeFormat)(t,Oe)),o()},isActive:!0})}};var ze=(0,s.jsx)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,s.jsx)(c.Path,{d:"M17.5 10h-1.7l-3.7 10.5h1.7l.9-2.6h3.9l.9 2.6h1.7L17.5 10zm-2.2 6.3 1.4-4 1.4 4h-2.8zm-4.8-3.8c1.6-1.8 2.9-3.6 3.7-5.7H16V5.2h-5.8V3H8.8v2.2H3v1.5h9.6c-.7 1.6-1.8 3.1-3.1 4.6C8.6 10.2 7.8 9 7.2 8H5.6c.6 1.4 1.7 2.9 2.9 4.4l-2.4 2.4c-.3.4-.7.8-1.1 1.2l1 1 1.2-1.2c.8-.8 1.6-1.5 2.3-2.3.8.9 1.7 1.7 2.5 2.5l.6-1.5c-.7-.6-1.4-1.3-2.1-2z"})});const Ee="core/language",Ue=(0,i.__)("Language"),De={name:Ee,tagName:"bdo",className:null,edit:function({isActive:e,value:t,onChange:n,contentRef:o}){const[a,i]=(0,j.useState)(!1),c=()=>{i((e=>!e))};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(l.RichTextToolbarButton,{icon:ze,label:Ue,title:Ue,onClick:()=>{e?n((0,r.removeFormat)(t,Ee)):c()},isActive:e,role:"menuitemcheckbox"}),a&&(0,s.jsx)(Ge,{value:t,onChange:n,onClose:c,contentRef:o})]})},title:Ue};function Ge({value:e,contentRef:t,onChange:n,onClose:o}){const a=(0,r.useAnchor)({editableContentElement:t.current,settings:De}),[l,c]=(0,j.useState)(""),[u,h]=(0,j.useState)("ltr");return(0,s.jsx)(y.Popover,{className:"block-editor-format-toolbar__language-popover",anchor:a,onClose:o,children:(0,s.jsxs)(y.__experimentalVStack,{as:"form",spacing:4,className:"block-editor-format-toolbar__language-container-content",onSubmit:t=>{t.preventDefault(),n((0,r.applyFormat)(e,{type:Ee,attributes:{lang:l,dir:u}})),o()},children:[(0,s.jsx)(y.TextControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:Ue,value:l,onChange:e=>c(e),help:(0,i.__)('A valid language attribute, like "en" or "fr".')}),(0,s.jsx)(y.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,i.__)("Text direction"),value:u,options:[{label:(0,i.__)("Left to right"),value:"ltr"},{label:(0,i.__)("Right to left"),value:"rtl"}],onChange:e=>h(e)}),(0,s.jsx)(y.__experimentalHStack,{alignment:"right",children:(0,s.jsx)(y.Button,{__next40pxDefaultSize:!0,variant:"primary",type:"submit",text:(0,i.__)("Apply")})})]})})}var We=(0,s.jsx)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,s.jsx)(c.Path,{d:"M11.2 6.8c-.7 0-1.4.5-1.6 1.1l-2.8 7.5-1.2-1.8c-.1-.2-.4-.3-.6-.3H3v1.5h1.6l1.2 1.8c.6.9 1.9.7 2.2-.3l2.9-7.9s.1-.2.2-.2h7.8V6.7h-7.8Zm5.3 3.4-1.9 1.9-1.9-1.9-1.1 1.1 1.9 1.9-1.9 1.9 1.1 1.1 1.9-1.9 1.9 1.9 1.1-1.1-1.9-1.9 1.9-1.9-1.1-1.1Z"})});const{Badge:Ze}=m(y.privateApis),$e="core/math",Ke=(0,i.__)("Math");function Qe({value:e,onChange:t,activeAttributes:n,contentRef:o,latexToMathML:a}){const[l,c]=(0,j.useState)(n?.["data-latex"]||""),[u,h]=(0,j.useState)(null),p=(0,r.useAnchor)({editableContentElement:o.current,settings:Xe});return(0,s.jsx)(y.Popover,{placement:"bottom-start",offset:8,focusOnMount:!1,anchor:p,className:"block-editor-format-toolbar__math-popover",children:(0,s.jsx)("div",{style:{minWidth:"300px",padding:"4px"},children:(0,s.jsxs)(y.__experimentalVStack,{spacing:1,children:[(0,s.jsx)(y.TextControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,hideLabelFromVision:!0,label:(0,i.__)("LaTeX math syntax"),value:l,onChange:n=>{let o="";if(c(n),n)try{o=a(n,{displayMode:!1}),h(null)}catch(e){return h(e.message),void(0,I.speak)(e.message)}const r=e.replacements.slice();r[e.start]={type:$e,attributes:{"data-latex":n},innerHTML:o},t({...e,replacements:r})},placeholder:(0,i.__)("e.g., x^2, \\frac{a}{b}"),autoComplete:"off",className:"block-editor-format-toolbar__math-input"}),u&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(Ze,{intent:"error",className:"wp-block-math__error",children:u}),(0,s.jsx)("style",{children:".wp-block-math__error .components-badge__content{white-space:normal}"})]})]})})})}const Xe={name:$e,title:Ke,tagName:"math",className:null,attributes:{"data-latex":"data-latex"},contentEditable:!1,edit:function({value:e,onChange:t,onFocus:n,isObjectActive:o,activeObjectAttributes:i,contentRef:c}){const[u,h]=(0,j.useState)();return(0,j.useEffect)((()=>{Promise.resolve().then(a.t.bind(a,3533,23)).then((e=>{h((()=>e.default))}))}),[]),(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(l.RichTextToolbarButton,{icon:We,title:Ke,onClick:()=>{const o=(0,r.insertObject)(e,{type:$e,attributes:{"data-latex":""},innerHTML:""});o.start=o.end-1,t(o),n()},isActive:o}),o&&(0,s.jsx)(Qe,{value:e,onChange:t,activeAttributes:i,contentRef:c,latexToMathML:u})]})}},Je=(0,i.__)("Non breaking space");[v,w,A,P,ee,ae,ie,je,Te,Me,Be,He,De,Xe,{name:"core/non-breaking-space",title:Je,tagName:"nbsp",className:null,edit:({value:e,onChange:t})=>(0,s.jsx)(l.RichTextShortcut,{type:"primaryShift",character:" ",onUse:function(){t((0,r.insert)(e," "))}})}].forEach((({name:e,...t})=>(0,r.registerFormatType)(e,t))),(window.wp=window.wp||{}).formatLibrary={}})();