Read more: %1$s"),t||(0,Ye.__)("(no title)")),{a:(0,je.createElement)("a",{className:"wp-block-latest-posts__read-more",href:e.link,rel:"noopener noreferrer",onClick:M}),span:(0,je.createElement)("span",{className:"screen-reader-text"})})):n;return(0,je.createElement)("li",{key:e.id},s&&(0,je.createElement)("div",{className:i},x?(0,je.createElement)("a",{className:"wp-block-latest-posts__post-title",href:e.link,rel:"noreferrer noopener",onClick:M},c):c),(0,je.createElement)("a",{href:e.link,rel:"noreferrer noopener",dangerouslySetInnerHTML:t?{__html:t}:void 0,onClick:M},t?null:(0,Ye.__)("(no title)")),g&&a&&(0,je.createElement)("div",{className:"wp-block-latest-posts__post-author"},(0,Ye.sprintf)((0,Ye.__)("by %s"),a.name)),d&&e.date_gmt&&(0,je.createElement)("time",{dateTime:(0,_o.format)("c",e.date_gmt),className:"wp-block-latest-posts__post-date"},(0,_o.dateI18n)(F,e.date_gmt)),p&&"excerpt"===m&&(0,je.createElement)("div",{className:"wp-block-latest-posts__post-excerpt"},h),p&&"full_post"===m&&(0,je.createElement)("div",{className:"wp-block-latest-posts__post-full-content",dangerouslySetInnerHTML:{__html:e.content.raw.trim()}}))}))))},deprecated:Bm},Rm=()=>Qe({name:Mm,metadata:Im,settings:zm}),Hm={A:"upper-alpha",a:"lower-alpha",I:"upper-roman",i:"lower-roman"};function Am(e){const{values:t,start:n,reversed:a,ordered:o,type:r,...l}=e,i=document.createElement(o?"ol":"ul");i.innerHTML=t,n&&i.setAttribute("start",n),a&&i.setAttribute("reversed",!0),r&&i.setAttribute("type",r);const[s]=(0,qe.rawHandler)({HTML:i.outerHTML});return[{...l,...s.attributes},s.innerBlocks]}const Lm={attributes:{ordered:{type:"boolean",default:!1,__experimentalRole:"content"},values:{type:"string",source:"html",selector:"ol,ul",multiline:"li",__unstableMultilineWrapperTags:["ol","ul"],default:"",__experimentalRole:"content"},type:{type:"string"},start:{type:"number"},reversed:{type:"boolean"},placeholder:{type:"string"}},supports:{anchor:!0,className:!1,typography:{fontSize:!0,__experimentalFontFamily:!0},color:{gradients:!0,link:!0},__unstablePasteTextInline:!0,__experimentalSelector:"ol,ul",__experimentalSlashInserter:!0},save({attributes:e}){const{ordered:t,values:n,type:a,reversed:o,start:r}=e,l=t?"ol":"ul";return(0,je.createElement)(l,{...Je.useBlockProps.save({type:a,reversed:o,start:r})},(0,je.createElement)(Je.RichText.Content,{value:n,multiline:"li"}))},migrate:en,isEligible({style:e}){return e?.typography?.fontFamily}},Dm={attributes:{ordered:{type:"boolean",default:!1,__experimentalRole:"content"},values:{type:"string",source:"html",selector:"ol,ul",multiline:"li",__unstableMultilineWrapperTags:["ol","ul"],default:"",__experimentalRole:"content"},type:{type:"string"},start:{type:"number"},reversed:{type:"boolean"},placeholder:{type:"string"}},supports:{anchor:!0,className:!1,typography:{fontSize:!0,__experimentalFontFamily:!0,lineHeight:!0,__experimentalFontStyle:!0,__experimentalFontWeight:!0,__experimentalLetterSpacing:!0,__experimentalTextTransform:!0,__experimentalDefaultControls:{fontSize:!0}},color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0}},__unstablePasteTextInline:!0,__experimentalSelector:"ol,ul",__experimentalSlashInserter:!0},save({attributes:e}){const{ordered:t,values:n,type:a,reversed:o,start:r}=e,l=t?"ol":"ul";return(0,je.createElement)(l,{...Je.useBlockProps.save({type:a,reversed:o,start:r})},(0,je.createElement)(Je.RichText.Content,{value:n,multiline:"li"}))},migrate:Am},Vm={attributes:{ordered:{type:"boolean",default:!1,__experimentalRole:"content"},values:{type:"string",source:"html",selector:"ol,ul",multiline:"li",__unstableMultilineWrapperTags:["ol","ul"],default:"",__experimentalRole:"content"},type:{type:"string"},start:{type:"number"},reversed:{type:"boolean"},placeholder:{type:"string"}},supports:{anchor:!0,className:!1,typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0}},spacing:{margin:!0,padding:!0,__experimentalDefaultControls:{margin:!1,padding:!1}},__unstablePasteTextInline:!0,__experimentalSelector:"ol,ul",__experimentalSlashInserter:!0},isEligible({type:e}){return!!e},save({attributes:e}){const{ordered:t,type:n,reversed:a,start:o}=e,r=t?"ol":"ul";return(0,je.createElement)(r,{...Je.useBlockProps.save({type:n,reversed:a,start:o})},(0,je.createElement)(Je.InnerBlocks.Content,null))},migrate:function(e){const{type:t}=e;return t&&Hm[t]?{...e,type:Hm[t]}:e}};var Fm=[Vm,Dm,Lm];var $m=(0,je.createElement)(We.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,je.createElement)(We.Path,{d:"M20 5.5H4V4H20V5.5ZM12 12.5H4V11H12V12.5ZM20 20V18.5H4V20H20ZM15.4697 14.9697L18.4393 12L15.4697 9.03033L16.5303 7.96967L20.0303 11.4697L20.5607 12L20.0303 12.5303L16.5303 16.0303L15.4697 14.9697Z"}));var Gm=(0,je.createElement)(We.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,je.createElement)(We.Path,{d:"M4 7.2v1.5h16V7.2H4zm8 8.6h8v-1.5h-8v1.5zm-4-4.6l-4 4 4 4 1-1-3-3 3-3-1-1z"}));var Om=(0,je.createElement)(We.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,je.createElement)(We.Path,{d:"M4 8.8h8.9V7.2H4v1.6zm0 7h8.9v-1.5H4v1.5zM18 13c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0-3c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2z"}));var Um=(0,je.createElement)(We.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,je.createElement)(We.Path,{d:"M11.1 15.8H20v-1.5h-8.9v1.5zm0-8.6v1.5H20V7.2h-8.9zM6 13c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0-7c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"}));var qm=(0,je.createElement)(We.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,je.createElement)(We.Path,{d:"M3.8 15.8h8.9v-1.5H3.8v1.5zm0-7h8.9V7.2H3.8v1.6zm14.7-2.1V10h1V5.3l-2.2.7.3 1 .9-.3zm1.2 6.1c-.5-.6-1.2-.5-1.7-.4-.3.1-.5.2-.7.3l.1 1.1c.2-.2.5-.4.8-.5.3-.1.6 0 .7.1.2.3 0 .8-.2 1.1-.5.8-.9 1.6-1.4 2.5H20v-1h-.9c.3-.6.8-1.4.9-2.1 0-.3 0-.8-.3-1.1z"}));var jm=(0,je.createElement)(We.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,je.createElement)(We.Path,{d:"M11.1 15.8H20v-1.5h-8.9v1.5zm0-8.6v1.5H20V7.2h-8.9zM5 6.7V10h1V5.3L3.8 6l.4 1 .8-.3zm-.4 5.7c-.3.1-.5.2-.7.3l.1 1.1c.2-.2.5-.4.8-.5.3-.1.6 0 .7.1.2.3 0 .8-.2 1.1-.5.8-.9 1.6-1.4 2.5h2.7v-1h-1c.3-.6.8-1.4.9-2.1.1-.3 0-.8-.2-1.1-.5-.6-1.3-.5-1.7-.4z"})),Wm=window.wp.deprecated,Zm=n.n(Wm);var Qm=({setAttributes:e,reversed:t,start:n,type:a})=>(0,je.createElement)(Je.InspectorControls,null,(0,je.createElement)(Ke.PanelBody,{title:(0,Ye.__)("Ordered list settings")},(0,je.createElement)(Ke.TextControl,{__nextHasNoMarginBottom:!0,label:(0,Ye.__)("Start value"),type:"number",onChange:t=>{const n=parseInt(t,10);e({start:isNaN(n)?void 0:n})},value:Number.isInteger(n)?n.toString(10):"",step:"1"}),(0,je.createElement)(Ke.SelectControl,{__nextHasNoMarginBottom:!0,label:(0,Ye.__)("Numbering style"),options:[{label:(0,Ye.__)("Numbers"),value:"decimal"},{label:(0,Ye.__)("Uppercase letters"),value:"upper-alpha"},{label:(0,Ye.__)("Lowercase letters"),value:"lower-alpha"},{label:(0,Ye.__)("Uppercase Roman numerals"),value:"upper-roman"},{label:(0,Ye.__)("Lowercase Roman numerals"),value:"lower-roman"}],value:a,onChange:t=>e({type:t})}),(0,je.createElement)(Ke.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,Ye.__)("Reverse list numbering"),checked:t||!1,onChange:t=>{e({reversed:t||void 0})}})));var Km=(0,je.forwardRef)((function(e,t){const{ordered:n,...a}=e,o=n?"ol":"ul";return(0,je.createElement)(o,{ref:t,...a})}));const Ym=[["core/list-item"]];function Jm({clientId:e}){const[t,n]=function(e){const{canOutdent:t}=(0,ut.useSelect)((t=>{const{getBlockRootClientId:n,getBlock:a}=t(Je.store),o=n(e);return{canOutdent:!!o&&"core/list-item"===a(o).name}}),[e]),{replaceBlocks:n,selectionChange:a}=(0,ut.useDispatch)(Je.store),{getBlockRootClientId:o,getBlockAttributes:r,getBlock:l}=(0,ut.useSelect)(Je.store);return[t,(0,je.useCallback)((()=>{const t=o(e),i=r(t),s=(0,qe.createBlock)("core/list-item",i),{innerBlocks:c}=l(e);n([t],[s,...c]),a(c[c.length-1].clientId)}),[e])]}(e);return(0,je.createElement)(je.Fragment,null,(0,je.createElement)(Ke.ToolbarButton,{icon:(0,Ye.isRTL)()?$m:Gm,title:(0,Ye.__)("Outdent"),describedBy:(0,Ye.__)("Outdent list item"),disabled:!t,onClick:n}))}function Xm({phrasingContentSchema:e}){const t={...e,ul:{},ol:{attributes:["type","start","reversed"]}};return["ul","ol"].forEach((e=>{t[e].children={li:{children:t}}})),t}function ep(e){return e.flatMap((({name:e,attributes:t,innerBlocks:n=[]})=>"core/list-item"===e?[t.content,...ep(n)]:ep(n)))}const tp={from:[{type:"block",isMultiBlock:!0,blocks:["core/paragraph","core/heading"],transform:e=>{let t=[];if(e.length>1)t=e.map((({content:e})=>(0,qe.createBlock)("core/list-item",{content:e})));else if(1===e.length){const n=(0,En.create)({html:e[0].content});t=(0,En.split)(n,"\n").map((e=>(0,qe.createBlock)("core/list-item",{content:(0,En.toHTMLString)({value:e})})))}return(0,qe.createBlock)("core/list",{anchor:e.anchor},t)}},{type:"raw",selector:"ol,ul",schema:e=>({ol:Xm(e).ol,ul:Xm(e).ul}),transform:function e(t){const n=t.getAttribute("type"),a={ordered:"OL"===t.tagName,anchor:""===t.id?void 0:t.id,start:t.getAttribute("start")?parseInt(t.getAttribute("start"),10):void 0,reversed:!!t.hasAttribute("reversed")||void 0,type:n&&Hm[n]?Hm[n]:void 0},o=Array.from(t.children).map((t=>{const n=Array.from(t.childNodes).filter((e=>e.nodeType!==e.TEXT_NODE||0!==e.textContent.trim().length));n.reverse();const[a,...o]=n;if(!("UL"===a?.tagName||"OL"===a?.tagName))return(0,qe.createBlock)("core/list-item",{content:t.innerHTML});const r=o.map((e=>e.nodeType===e.TEXT_NODE?e.textContent:e.outerHTML));r.reverse();const l={content:r.join("").trim()},i=[e(a)];return(0,qe.createBlock)("core/list-item",l,i)}));return(0,qe.createBlock)("core/list",a,o)}},...["*","-"].map((e=>({type:"prefix",prefix:e,transform(e){return(0,qe.createBlock)("core/list",{},[(0,qe.createBlock)("core/list-item",{content:e})])}}))),...["1.","1)"].map((e=>({type:"prefix",prefix:e,transform(e){return(0,qe.createBlock)("core/list",{ordered:!0},[(0,qe.createBlock)("core/list-item",{content:e})])}})))],to:[...["core/paragraph","core/heading"].map((e=>({type:"block",blocks:[e],transform:(t,n)=>ep(n).map((t=>(0,qe.createBlock)(e,{content:t})))})))]};var np=tp;const ap={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/list",title:"List",category:"text",description:"Create a bulleted or numbered list.",keywords:["bullet list","ordered list","numbered list"],textdomain:"default",attributes:{ordered:{type:"boolean",default:!1,__experimentalRole:"content"},values:{type:"string",source:"html",selector:"ol,ul",multiline:"li",__unstableMultilineWrapperTags:["ol","ul"],default:"",__experimentalRole:"content"},type:{type:"string"},start:{type:"number"},reversed:{type:"boolean"},placeholder:{type:"string"}},supports:{anchor:!0,className:!1,typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0}},spacing:{margin:!0,padding:!0,__experimentalDefaultControls:{margin:!1,padding:!1}},__unstablePasteTextInline:!0,__experimentalSelector:"ol,ul",__experimentalOnMerge:!0,__experimentalSlashInserter:!0},editorStyle:"wp-block-list-editor",style:"wp-block-list"},{name:op}=ap,rp={icon:Tm,example:{innerBlocks:[{name:"core/list-item",attributes:{content:(0,Ye.__)("Alice.")}},{name:"core/list-item",attributes:{content:(0,Ye.__)("The White Rabbit.")}},{name:"core/list-item",attributes:{content:(0,Ye.__)("The Cheshire Cat.")}},{name:"core/list-item",attributes:{content:(0,Ye.__)("The Mad Hatter.")}},{name:"core/list-item",attributes:{content:(0,Ye.__)("The Queen of Hearts.")}}]},transforms:np,edit:function({attributes:e,setAttributes:t,clientId:n,style:a}){const{ordered:o,type:r,reversed:l,start:i}=e,s=(0,Je.useBlockProps)({style:{...je.Platform.isNative&&a,listStyleType:o&&"decimal"!==r?r:void 0}}),c=(0,Je.useInnerBlocksProps)(s,{allowedBlocks:["core/list-item"],template:Ym,templateLock:!1,templateInsertUpdatesSelection:!0,...je.Platform.isNative&&{marginVertical:8,marginHorizontal:8,renderAppender:!1},__experimentalCaptureToolbars:!0});!function(e,t){const n=(0,ut.useRegistry)(),{updateBlockAttributes:a,replaceInnerBlocks:o}=(0,ut.useDispatch)(Je.store);(0,je.useEffect)((()=>{if(!e.values)return;const[r,l]=Am(e);Zm()("Value attribute on the list block",{since:"6.0",version:"6.5",alternative:"inner blocks"}),n.batch((()=>{a(t,r),o(t,l)}))}),[e.values])}(e,n);const u=(0,je.createElement)(Je.BlockControls,{group:"block"},(0,je.createElement)(Ke.ToolbarButton,{icon:(0,Ye.isRTL)()?Om:Um,title:(0,Ye.__)("Unordered"),describedBy:(0,Ye.__)("Convert to unordered list"),isActive:!1===o,onClick:()=>{t({ordered:!1})}}),(0,je.createElement)(Ke.ToolbarButton,{icon:(0,Ye.isRTL)()?qm:jm,title:(0,Ye.__)("Ordered"),describedBy:(0,Ye.__)("Convert to ordered list"),isActive:!0===o,onClick:()=>{t({ordered:!0})}}),(0,je.createElement)(Jm,{clientId:n}));return(0,je.createElement)(je.Fragment,null,(0,je.createElement)(Km,{ordered:o,reversed:l,start:i,...c}),u,o&&(0,je.createElement)(Qm,{setAttributes:t,reversed:l,start:i,type:r}))},save:function({attributes:e}){const{ordered:t,type:n,reversed:a,start:o}=e,r=t?"ol":"ul";return(0,je.createElement)(r,{...Je.useBlockProps.save({reversed:a,start:o,style:{listStyleType:t&&"decimal"!==n?n:void 0}})},(0,je.createElement)(Je.InnerBlocks.Content,null))},deprecated:Fm},lp=()=>Qe({name:op,metadata:ap,settings:rp});var ip=(0,je.createElement)(We.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,je.createElement)(We.Path,{d:"M12 11v1.5h8V11h-8zm-6-1c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"}));var sp=(0,je.createElement)(We.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,je.createElement)(We.Path,{d:"M20 5.5H4V4H20V5.5ZM12 12.5H4V11H12V12.5ZM20 20V18.5H4V20H20ZM20.0303 9.03033L17.0607 12L20.0303 14.9697L18.9697 16.0303L15.4697 12.5303L14.9393 12L15.4697 11.4697L18.9697 7.96967L20.0303 9.03033Z"}));var cp=(0,je.createElement)(We.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,je.createElement)(We.Path,{d:"M4 7.2v1.5h16V7.2H4zm8 8.6h8v-1.5h-8v1.5zm-8-3.5l3 3-3 3 1 1 4-4-4-4-1 1z"}));function up(e){const t=(0,ut.useSelect)((t=>t(Je.store).getBlockIndex(e)>0),[e]),{replaceBlocks:n,selectionChange:a,multiSelect:o}=(0,ut.useDispatch)(Je.store),{getBlock:r,getPreviousBlockClientId:l,getSelectionStart:i,getSelectionEnd:s,hasMultiSelection:c,getMultiSelectedBlockClientIds:u}=(0,ut.useSelect)(Je.store);return[t,(0,je.useCallback)((()=>{const t=c(),m=t?u():[e],p=m.map((e=>(0,qe.cloneBlock)(r(e)))),d=l(e),g=(0,qe.cloneBlock)(r(d));g.innerBlocks?.length||(g.innerBlocks=[(0,qe.createBlock)("core/list")]),g.innerBlocks[g.innerBlocks.length-1].innerBlocks.push(...p);const h=i(),_=s();n([d,...m],[g]),t?o(p[0].clientId,p[p.length-1].clientId):a(p[0].clientId,_.attributeKey,_.clientId===h.clientId?h.offset:_.offset,_.offset)}),[e])]}function mp(e){const t=(0,ut.useRegistry)(),{canOutdent:n}=(0,ut.useSelect)((t=>{const{getBlockRootClientId:n,getBlockName:a}=t(Je.store);return{canOutdent:"core/list-item"===a(n(n(e)))}}),[e]),{moveBlocksToPosition:a,removeBlock:o,insertBlock:r,updateBlockListSettings:l}=(0,ut.useDispatch)(Je.store),{getBlockRootClientId:i,getBlockName:s,getBlockOrder:c,getBlockIndex:u,getSelectedBlockClientIds:m,getBlock:p,getBlockListSettings:d}=(0,ut.useSelect)(Je.store);return[n,(0,je.useCallback)(((e=m())=>{if(Array.isArray(e)||(e=[e]),!e.length)return;const n=e[0];if("core/list-item"!==s(n))return;const g=function(e){const t=i(e),n=i(t);if(n&&"core/list-item"===s(n))return n}(n);if(!g)return;const h=i(n),_=e[e.length-1],b=c(h).slice(u(_)+1);t.batch((()=>{if(b.length){let e=c(n)[0];if(!e){const t=(0,qe.cloneBlock)(p(h),{},[]);e=t.clientId,r(t,0,n,!1),l(e,d(h))}a(b,h,e)}if(a(e,h,i(g),u(g)+1),!c(h).length){o(h,!1)}}))}),[])]}function pp(e){const{getBlockRootClientId:t,getBlockName:n,getBlockAttributes:a}=(0,ut.useSelect)(Je.store);return(0,Tt.useRefEffect)((o=>{function r(o){if(o.clipboardData.getData("__unstableWrapperBlockName"))return;const r=t(e);o.clipboardData.setData("__unstableWrapperBlockName",n(r)),o.clipboardData.setData("__unstableWrapperBlockAttributes",JSON.stringify(a(r)))}return o.addEventListener("copy",r),o.addEventListener("cut",r),()=>{o.removeEventListener("copy",r),o.removeEventListener("cut",r)}}),[])}function dp(e,t){const n=(0,ut.useRegistry)(),{getPreviousBlockClientId:a,getNextBlockClientId:o,getBlockOrder:r,getBlockRootClientId:l,getBlockName:i}=(0,ut.useSelect)(Je.store),{mergeBlocks:s,moveBlocksToPosition:c}=(0,ut.useDispatch)(Je.store),[,u]=mp(e);function m(e){const t=r(e);return t.length?m(t[t.length-1]):e}function p(e){const t=l(e),n=l(t);if(n&&"core/list-item"===i(n))return n}function d(e){const t=o(e);if(t)return t;const n=p(e);return n?d(n):void 0}function g(e){const t=r(e);return t.length?r(t[0])[0]:d(e)}return o=>{function i(e,t){n.batch((()=>{const[n]=r(t);n&&c(r(n),n,l(e)),s(e,t)}))}if(o){const n=g(e);if(!n)return void t(o);p(n)?u(n):i(e,n)}else{const n=a(e);if(p(e))u(e);else if(n){i(m(n),e)}else t(o)}}}function gp(e){const t=(0,qe.switchToBlockType)(e,"core/list");if(t)return t;const n=(0,qe.switchToBlockType)(e,"core/paragraph");return n?(0,qe.switchToBlockType)(n,"core/list"):null}function hp({clientId:e}){const[t,n]=up(e),[a,o]=mp(e);return(0,je.createElement)(je.Fragment,null,(0,je.createElement)(Ke.ToolbarButton,{icon:(0,Ye.isRTL)()?$m:Gm,title:(0,Ye.__)("Outdent"),describedBy:(0,Ye.__)("Outdent list item"),disabled:!a,onClick:()=>o()}),(0,je.createElement)(Ke.ToolbarButton,{icon:(0,Ye.isRTL)()?sp:cp,title:(0,Ye.__)("Indent"),describedBy:(0,Ye.__)("Indent list item"),isDisabled:!t,onClick:()=>n()}))}const _p={to:[{type:"block",blocks:["core/paragraph"],transform:(e,t=[])=>[(0,qe.createBlock)("core/paragraph",e),...t.map((e=>(0,qe.cloneBlock)(e)))]}]};var bp=_p;const fp={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/list-item",title:"List item",category:"text",parent:["core/list"],description:"Create a list item.",textdomain:"default",attributes:{placeholder:{type:"string"},content:{type:"string",source:"html",selector:"li",default:"",__experimentalRole:"content"}},supports:{className:!1,__experimentalSelector:"li",typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}}}},{name:vp}=fp,yp={icon:ip,edit:function({attributes:e,setAttributes:t,onReplace:n,clientId:a,mergeBlocks:o}){const{placeholder:r,content:l}=e,i=(0,Je.useBlockProps)({ref:pp(a)}),s=(0,Je.useInnerBlocksProps)(i,{allowedBlocks:["core/list"],renderAppender:!1,__unstableDisableDropZone:!0}),c=function(e){const{replaceBlocks:t,selectionChange:n}=(0,ut.useDispatch)(Je.store),{getBlock:a,getBlockRootClientId:o,getBlockIndex:r}=(0,ut.useSelect)(Je.store),l=(0,je.useRef)(e);l.current=e;const[i,s]=mp(l.current.clientId);return(0,Tt.useRefEffect)((e=>{function c(e){if(e.defaultPrevented||e.keyCode!==un.ENTER)return;const{content:c,clientId:u}=l.current;if(c.length)return;if(e.preventDefault(),i)return void s();const m=a(o(u)),p=r(u),d=(0,qe.cloneBlock)({...m,innerBlocks:m.innerBlocks.slice(0,p)}),g=(0,qe.createBlock)((0,qe.getDefaultBlockName)()),h=[...m.innerBlocks[p].innerBlocks[0]?.innerBlocks||[],...m.innerBlocks.slice(p+1)],_=h.length?[(0,qe.cloneBlock)({...m,innerBlocks:h})]:[];t(m.clientId,[d,g,..._],1),n(g.clientId)}return e.addEventListener("keydown",c),()=>{e.removeEventListener("keydown",c)}}),[i])}({content:l,clientId:a}),u=function(e){const{getSelectionStart:t,getSelectionEnd:n}=(0,ut.useSelect)(Je.store),[a,o]=up(e);return(0,Tt.useRefEffect)((e=>{function r(e){const{keyCode:r,shiftKey:l,altKey:i,metaKey:s,ctrlKey:c}=e;if(e.defaultPrevented||!a||r!==un.SPACE||l||i||s||c)return;const u=t(),m=n();0===u.offset&&0===m.offset&&(e.preventDefault(),o())}return e.addEventListener("keydown",r),()=>{e.removeEventListener("keydown",r)}}),[a,o])}(a),m=function(e){const t=(0,je.useRef)(!1),{getBlock:n}=(0,ut.useSelect)(Je.store);return(0,je.useCallback)((a=>{const o=n(e);return t.current?(0,qe.cloneBlock)(o,{content:a}):(t.current=!0,(0,qe.createBlock)(o.name,{...o.attributes,content:a}))}),[e,n])}(a),p=dp(a,o);return(0,je.createElement)(je.Fragment,null,(0,je.createElement)("li",{...s},(0,je.createElement)(Je.RichText,{ref:(0,Tt.useMergeRefs)([c,u]),identifier:"content",tagName:"div",onChange:e=>t({content:e}),value:l,"aria-label":(0,Ye.__)("List text"),placeholder:r||(0,Ye.__)("List"),onSplit:m,onMerge:p,onReplace:n?(e,...t)=>{n(function(e){const t=[];for(let n of e)if("core/list-item"===n.name)t.push(n);else if("core/list"===n.name)t.push(...n.innerBlocks);else if(n=gp(n))for(const{innerBlocks:e}of n)t.push(...e);return t}(e),...t)}:void 0}),s.children),(0,je.createElement)(Je.BlockControls,{group:"block"},(0,je.createElement)(hp,{clientId:a})))},save:function({attributes:e}){return(0,je.createElement)("li",{...Je.useBlockProps.save()},(0,je.createElement)(Je.RichText.Content,{value:e.content}),(0,je.createElement)(Je.InnerBlocks.Content,null))},merge(e,t){return{...e,content:e.content+t.content}},transforms:bp},kp=()=>Qe({name:vp,metadata:fp,settings:yp});var xp=(0,je.createElement)(We.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,je.createElement)(We.Path,{d:"M11 14.5l1.1 1.1 3-3 .5-.5-.6-.6-3-3-1 1 1.7 1.7H5v1.5h7.7L11 14.5zM16.8 5h-7c-1.1 0-2 .9-2 2v1.5h1.5V7c0-.3.2-.5.5-.5h7c.3 0 .5.2.5.5v10c0 .3-.2.5-.5.5h-7c-.3 0-.5-.2-.5-.5v-1.5H7.8V17c0 1.1.9 2 2 2h7c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2z"}));const wp={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/loginout",title:"Login/out",category:"theme",description:"Show login & logout links.",keywords:["login","logout","form"],textdomain:"default",attributes:{displayLoginAsForm:{type:"boolean",default:!1},redirectToCurrent:{type:"boolean",default:!0}},supports:{className:!0,typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}}}},{name:Ep}=wp,Cp={icon:xp,edit:function({attributes:e,setAttributes:t}){const{displayLoginAsForm:n,redirectToCurrent:a}=e;return(0,je.createElement)(je.Fragment,null,(0,je.createElement)(Je.InspectorControls,null,(0,je.createElement)(Ke.PanelBody,{title:(0,Ye.__)("Settings")},(0,je.createElement)(Ke.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,Ye.__)("Display login as form"),checked:n,onChange:()=>t({displayLoginAsForm:!n})}),(0,je.createElement)(Ke.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,Ye.__)("Redirect to current URL"),checked:a,onChange:()=>t({redirectToCurrent:!a})}))),(0,je.createElement)("div",{...(0,Je.useBlockProps)({className:"logged-in"})},(0,je.createElement)("a",{href:"#login-pseudo-link"},(0,Ye.__)("Log out"))))}},Sp=()=>Qe({name:Ep,metadata:wp,settings:Cp});var Bp=(0,je.createElement)(We.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,je.createElement)(We.Path,{d:"M3 6v11.5h8V6H3Zm11 3h7V7.5h-7V9Zm7 3.5h-7V11h7v1.5ZM14 16h7v-1.5h-7V16Z"}));const Tp="full",Np="media",Pp="attachment",Ip=[["core/paragraph",{placeholder:(0,Ye._x)("Content…","content placeholder")}]],Mp=(e,t)=>e?{backgroundImage:`url(${e})`,backgroundPosition:t?`${100*t.x}% ${100*t.y}%`:"50% 50%"}:{},zp=50,Rp=()=>{},Hp=e=>{if(!e.customBackgroundColor)return e;const t={color:{background:e.customBackgroundColor}},{customBackgroundColor:n,...a}=e;return{...a,style:t}},Ap=e=>e.align?e:{...e,align:"wide"},Lp={align:{type:"string",default:"wide"},mediaAlt:{type:"string",source:"attribute",selector:"figure img",attribute:"alt",default:""},mediaPosition:{type:"string",default:"left"},mediaId:{type:"number"},mediaType:{type:"string"},mediaWidth:{type:"number",default:50},isStackedOnMobile:{type:"boolean",default:!1}},Dp={...Lp,isStackedOnMobile:{type:"boolean",default:!0},mediaUrl:{type:"string",source:"attribute",selector:"figure video,figure img",attribute:"src"},mediaLink:{type:"string"},linkDestination:{type:"string"},linkTarget:{type:"string",source:"attribute",selector:"figure a",attribute:"target"},href:{type:"string",source:"attribute",selector:"figure a",attribute:"href"},rel:{type:"string",source:"attribute",selector:"figure a",attribute:"rel"},linkClass:{type:"string",source:"attribute",selector:"figure a",attribute:"class"},mediaSizeSlug:{type:"string"},verticalAlignment:{type:"string"},imageFill:{type:"boolean"},focalPoint:{type:"object"}},Vp={anchor:!0,align:["wide","full"],html:!1,color:{gradients:!0,link:!0}},Fp={attributes:{...Dp,mediaAlt:{type:"string",source:"attribute",selector:"figure img",attribute:"alt",default:"",__experimentalRole:"content"},mediaId:{type:"number",__experimentalRole:"content"},mediaUrl:{type:"string",source:"attribute",selector:"figure video,figure img",attribute:"src",__experimentalRole:"content"},href:{type:"string",source:"attribute",selector:"figure a",attribute:"href",__experimentalRole:"content"},mediaType:{type:"string",__experimentalRole:"content"}},supports:{...Vp,color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0}},spacing:{margin:!0,padding:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}}},save({attributes:e}){const{isStackedOnMobile:t,mediaAlt:n,mediaPosition:a,mediaType:o,mediaUrl:r,mediaWidth:l,mediaId:i,verticalAlignment:s,imageFill:c,focalPoint:u,linkClass:m,href:p,linkTarget:d,rel:g}=e,h=e.mediaSizeSlug||Tp,_=g||void 0,b=it()({[`wp-image-${i}`]:i&&"image"===o,[`size-${h}`]:i&&"image"===o});let f=(0,je.createElement)("img",{src:r,alt:n,className:b||null});p&&(f=(0,je.createElement)("a",{className:m,href:p,target:d,rel:_},f));const v={image:()=>f,video:()=>(0,je.createElement)("video",{controls:!0,src:r})},y=it()({"has-media-on-the-right":"right"===a,"is-stacked-on-mobile":t,[`is-vertically-aligned-${s}`]:s,"is-image-fill":c}),k=c?((e,t)=>e?{backgroundImage:`url(${e})`,backgroundPosition:t?`${Math.round(100*t.x)}% ${Math.round(100*t.y)}%`:"50% 50%"}:{})(r,u):{};let x;l!==zp&&(x="right"===a?`auto ${l}%`:`${l}% auto`);const w={gridTemplateColumns:x};return"right"===a?(0,je.createElement)("div",{...Je.useBlockProps.save({className:y,style:w})},(0,je.createElement)("div",{...Je.useInnerBlocksProps.save({className:"wp-block-media-text__content"})}),(0,je.createElement)("figure",{className:"wp-block-media-text__media",style:k},(v[o]||Rp)())):(0,je.createElement)("div",{...Je.useBlockProps.save({className:y,style:w})},(0,je.createElement)("figure",{className:"wp-block-media-text__media",style:k},(v[o]||Rp)()),(0,je.createElement)("div",{...Je.useInnerBlocksProps.save({className:"wp-block-media-text__content"})}))},migrate:Ap,isEligible(e,t,{block:n}){const{attributes:a}=n;return void 0===e.align&&!!a.className?.includes("alignwide")}},$p={attributes:Dp,supports:Vp,save({attributes:e}){const{isStackedOnMobile:t,mediaAlt:n,mediaPosition:a,mediaType:o,mediaUrl:r,mediaWidth:l,mediaId:i,verticalAlignment:s,imageFill:c,focalPoint:u,linkClass:m,href:p,linkTarget:d,rel:g}=e,h=e.mediaSizeSlug||Tp,_=g||void 0,b=it()({[`wp-image-${i}`]:i&&"image"===o,[`size-${h}`]:i&&"image"===o});let f=(0,je.createElement)("img",{src:r,alt:n,className:b||null});p&&(f=(0,je.createElement)("a",{className:m,href:p,target:d,rel:_},f));const v={image:()=>f,video:()=>(0,je.createElement)("video",{controls:!0,src:r})},y=it()({"has-media-on-the-right":"right"===a,"is-stacked-on-mobile":t,[`is-vertically-aligned-${s}`]:s,"is-image-fill":c}),k=c?Mp(r,u):{};let x;l!==zp&&(x="right"===a?`auto ${l}%`:`${l}% auto`);const w={gridTemplateColumns:x};return"right"===a?(0,je.createElement)("div",{...Je.useBlockProps.save({className:y,style:w})},(0,je.createElement)("div",{...Je.useInnerBlocksProps.save({className:"wp-block-media-text__content"})}),(0,je.createElement)("figure",{className:"wp-block-media-text__media",style:k},(v[o]||Rp)())):(0,je.createElement)("div",{...Je.useBlockProps.save({className:y,style:w})},(0,je.createElement)("figure",{className:"wp-block-media-text__media",style:k},(v[o]||Rp)()),(0,je.createElement)("div",{...Je.useInnerBlocksProps.save({className:"wp-block-media-text__content"})}))},migrate:Ap},Gp={attributes:Dp,supports:Vp,save({attributes:e}){const{isStackedOnMobile:t,mediaAlt:n,mediaPosition:a,mediaType:o,mediaUrl:r,mediaWidth:l,mediaId:i,verticalAlignment:s,imageFill:c,focalPoint:u,linkClass:m,href:p,linkTarget:d,rel:g}=e,h=e.mediaSizeSlug||Tp,_=g||void 0,b=it()({[`wp-image-${i}`]:i&&"image"===o,[`size-${h}`]:i&&"image"===o});let f=(0,je.createElement)("img",{src:r,alt:n,className:b||null});p&&(f=(0,je.createElement)("a",{className:m,href:p,target:d,rel:_},f));const v={image:()=>f,video:()=>(0,je.createElement)("video",{controls:!0,src:r})},y=it()({"has-media-on-the-right":"right"===a,"is-stacked-on-mobile":t,[`is-vertically-aligned-${s}`]:s,"is-image-fill":c}),k=c?Mp(r,u):{};let x;l!==zp&&(x="right"===a?`auto ${l}%`:`${l}% auto`);const w={gridTemplateColumns:x};return(0,je.createElement)("div",{...Je.useBlockProps.save({className:y,style:w})},(0,je.createElement)("figure",{className:"wp-block-media-text__media",style:k},(v[o]||Rp)()),(0,je.createElement)("div",{...Je.useInnerBlocksProps.save({className:"wp-block-media-text__content"})}))},migrate:Ap},Op={attributes:{...Lp,isStackedOnMobile:{type:"boolean",default:!0},backgroundColor:{type:"string"},customBackgroundColor:{type:"string"},mediaLink:{type:"string"},linkDestination:{type:"string"},linkTarget:{type:"string",source:"attribute",selector:"figure a",attribute:"target"},href:{type:"string",source:"attribute",selector:"figure a",attribute:"href"},rel:{type:"string",source:"attribute",selector:"figure a",attribute:"rel"},linkClass:{type:"string",source:"attribute",selector:"figure a",attribute:"class"},verticalAlignment:{type:"string"},imageFill:{type:"boolean"},focalPoint:{type:"object"}},migrate:(0,Tt.compose)(Hp,Ap),save({attributes:e}){const{backgroundColor:t,customBackgroundColor:n,isStackedOnMobile:a,mediaAlt:o,mediaPosition:r,mediaType:l,mediaUrl:i,mediaWidth:s,mediaId:c,verticalAlignment:u,imageFill:m,focalPoint:p,linkClass:d,href:g,linkTarget:h,rel:_}=e,b=_||void 0;let f=(0,je.createElement)("img",{src:i,alt:o,className:c&&"image"===l?`wp-image-${c}`:null});g&&(f=(0,je.createElement)("a",{className:d,href:g,target:h,rel:b},f));const v={image:()=>f,video:()=>(0,je.createElement)("video",{controls:!0,src:i})},y=(0,Je.getColorClassName)("background-color",t),k=it()({"has-media-on-the-right":"right"===r,"has-background":y||n,[y]:y,"is-stacked-on-mobile":a,[`is-vertically-aligned-${u}`]:u,"is-image-fill":m}),x=m?Mp(i,p):{};let w;s!==zp&&(w="right"===r?`auto ${s}%`:`${s}% auto`);const E={backgroundColor:y?void 0:n,gridTemplateColumns:w};return(0,je.createElement)("div",{className:k,style:E},(0,je.createElement)("figure",{className:"wp-block-media-text__media",style:x},(v[l]||Rp)()),(0,je.createElement)("div",{className:"wp-block-media-text__content"},(0,je.createElement)(Je.InnerBlocks.Content,null)))}},Up={attributes:{...Lp,backgroundColor:{type:"string"},customBackgroundColor:{type:"string"},mediaUrl:{type:"string",source:"attribute",selector:"figure video,figure img",attribute:"src"},verticalAlignment:{type:"string"},imageFill:{type:"boolean"},focalPoint:{type:"object"}},migrate:(0,Tt.compose)(Hp,Ap),save({attributes:e}){const{backgroundColor:t,customBackgroundColor:n,isStackedOnMobile:a,mediaAlt:o,mediaPosition:r,mediaType:l,mediaUrl:i,mediaWidth:s,mediaId:c,verticalAlignment:u,imageFill:m,focalPoint:p}=e,d={image:()=>(0,je.createElement)("img",{src:i,alt:o,className:c&&"image"===l?`wp-image-${c}`:null}),video:()=>(0,je.createElement)("video",{controls:!0,src:i})},g=(0,Je.getColorClassName)("background-color",t),h=it()({"has-media-on-the-right":"right"===r,[g]:g,"is-stacked-on-mobile":a,[`is-vertically-aligned-${u}`]:u,"is-image-fill":m}),_=m?Mp(i,p):{};let b;s!==zp&&(b="right"===r?`auto ${s}%`:`${s}% auto`);const f={backgroundColor:g?void 0:n,gridTemplateColumns:b};return(0,je.createElement)("div",{className:h,style:f},(0,je.createElement)("figure",{className:"wp-block-media-text__media",style:_},(d[l]||Rp)()),(0,je.createElement)("div",{className:"wp-block-media-text__content"},(0,je.createElement)(Je.InnerBlocks.Content,null)))}},qp={attributes:{...Lp,backgroundColor:{type:"string"},customBackgroundColor:{type:"string"},mediaUrl:{type:"string",source:"attribute",selector:"figure video,figure img",attribute:"src"}},migrate:Ap,save({attributes:e}){const{backgroundColor:t,customBackgroundColor:n,isStackedOnMobile:a,mediaAlt:o,mediaPosition:r,mediaType:l,mediaUrl:i,mediaWidth:s}=e,c={image:()=>(0,je.createElement)("img",{src:i,alt:o}),video:()=>(0,je.createElement)("video",{controls:!0,src:i})},u=(0,Je.getColorClassName)("background-color",t),m=it()({"has-media-on-the-right":"right"===r,[u]:u,"is-stacked-on-mobile":a});let p;s!==zp&&(p="right"===r?`auto ${s}%`:`${s}% auto`);const d={backgroundColor:u?void 0:n,gridTemplateColumns:p};return(0,je.createElement)("div",{className:m,style:d},(0,je.createElement)("figure",{className:"wp-block-media-text__media"},(c[l]||Rp)()),(0,je.createElement)("div",{className:"wp-block-media-text__content"},(0,je.createElement)(Je.InnerBlocks.Content,null)))}};var jp=[Fp,$p,Gp,Op,Up,qp];var Wp=(0,je.createElement)(We.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,je.createElement)(We.Path,{d:"M4 18h6V6H4v12zm9-9.5V10h7V8.5h-7zm0 7h7V14h-7v1.5z"}));var Zp=(0,je.createElement)(We.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,je.createElement)(We.Path,{d:"M14 6v12h6V6h-6zM4 10h7V8.5H4V10zm0 5.5h7V14H4v1.5z"}));var Qp=(0,je.createElement)(We.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,je.createElement)(We.Path,{d:"m7 6.5 4 2.5-4 2.5z"}),(0,je.createElement)(We.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"m5 3c-1.10457 0-2 .89543-2 2v14c0 1.1046.89543 2 2 2h14c1.1046 0 2-.8954 2-2v-14c0-1.10457-.8954-2-2-2zm14 1.5h-14c-.27614 0-.5.22386-.5.5v10.7072l3.62953-2.6465c.25108-.1831.58905-.1924.84981-.0234l2.92666 1.8969 3.5712-3.4719c.2911-.2831.7545-.2831 1.0456 0l2.9772 2.8945v-9.3568c0-.27614-.2239-.5-.5-.5zm-14.5 14.5v-1.4364l4.09643-2.987 2.99567 1.9417c.2936.1903.6798.1523.9307-.0917l3.4772-3.3806 3.4772 3.3806.0228-.0234v2.5968c0 .2761-.2239.5-.5.5h-14c-.27614 0-.5-.2239-.5-.5z"}));const Kp=["image","video"],Yp=()=>{};function Jp(e,t){return e?{backgroundImage:`url(${e})`,backgroundPosition:t?`${Math.round(100*t.x)}% ${Math.round(100*t.y)}%`:"50% 50%"}:{}}const Xp=(0,je.forwardRef)((({isSelected:e,isStackedOnMobile:t,...n},a)=>{const o=(0,Tt.useViewportMatch)("small","<");return(0,je.createElement)(Ke.ResizableBox,{ref:a,showHandle:e&&(!o||!t),...n})}));function ed({mediaId:e,mediaUrl:t,onSelectMedia:n}){return(0,je.createElement)(Je.BlockControls,{group:"other"},(0,je.createElement)(Je.MediaReplaceFlow,{mediaId:e,mediaURL:t,allowedTypes:Kp,accept:"image/*,video/*",onSelect:n}))}function td({className:e,mediaUrl:t,onSelectMedia:n}){const{createErrorNotice:a}=(0,ut.useDispatch)(Bt.store);return(0,je.createElement)(Je.MediaPlaceholder,{icon:(0,je.createElement)(Je.BlockIcon,{icon:Qp}),labels:{title:(0,Ye.__)("Media area")},className:e,onSelect:n,accept:"image/*,video/*",allowedTypes:Kp,onError:e=>{a(e,{type:"snackbar"})},disableMediaButtons:t})}var nd=(0,je.forwardRef)((function(e,t){const{className:n,commitWidthChange:a,focalPoint:o,imageFill:r,isSelected:l,isStackedOnMobile:i,mediaAlt:s,mediaId:c,mediaPosition:u,mediaType:m,mediaUrl:p,mediaWidth:d,onSelectMedia:g,onWidthChange:h,enableResize:_}=e,b=!c&&(0,Ct.isBlobURL)(p),{toggleSelection:f}=(0,ut.useDispatch)(Je.store);if(p){const v=()=>{f(!1)},y=(e,t,n)=>{h(parseInt(n.style.width))},k=(e,t,n)=>{f(!0),a(parseInt(n.style.width))},x={right:_&&"left"===u,left:_&&"right"===u},w="image"===m&&r?Jp(p,o):{},E={image:()=>(0,je.createElement)("img",{src:p,alt:s}),video:()=>(0,je.createElement)("video",{controls:!0,src:p})};return(0,je.createElement)(Xp,{as:"figure",className:it()(n,"editor-media-container__resizer",{"is-transient":b}),style:w,size:{width:d+"%"},minWidth:"10%",maxWidth:"100%",enable:x,onResizeStart:v,onResize:y,onResizeStop:k,axis:"x",isSelected:l,isStackedOnMobile:i,ref:t},(0,je.createElement)(ed,{onSelectMedia:g,mediaUrl:p,mediaId:c}),(E[m]||Yp)(),b&&(0,je.createElement)(Ke.Spinner,null),(0,je.createElement)(td,{...e}))}return(0,je.createElement)(td,{...e})}));const ad=e=>Math.max(15,Math.min(e,85));function od(e,t){return e?.media_details?.sizes?.[t]?.source_url}var rd=function({attributes:e,isSelected:t,setAttributes:n}){const{focalPoint:a,href:o,imageFill:r,isStackedOnMobile:l,linkClass:i,linkDestination:s,linkTarget:c,mediaAlt:u,mediaId:m,mediaPosition:p,mediaType:d,mediaUrl:g,mediaWidth:h,rel:_,verticalAlignment:b,allowedBlocks:f}=e,v=e.mediaSizeSlug||Tp,{imageSizes:y,image:k}=(0,ut.useSelect)((e=>{const{getSettings:n}=e(Je.store);return{image:m&&t?e(ct.store).getMedia(m,{context:"view"}):null,imageSizes:n()?.imageSizes}}),[t,m]),x=(0,je.useRef)(),w=e=>{const{style:t}=x.current.resizable,{x:n,y:a}=e;t.backgroundPosition=`${100*n}% ${100*a}%`},[E,C]=(0,je.useState)(null),S=function({attributes:{linkDestination:e,href:t},setAttributes:n}){return a=>{if(!a||!a.url)return void n({mediaAlt:void 0,mediaId:void 0,mediaType:void 0,mediaUrl:void 0,mediaLink:void 0,href:void 0,focalPoint:void 0});let o,r;(0,Ct.isBlobURL)(a.url)&&(a.type=(0,Ct.getBlobTypeByURL)(a.url)),o=a.media_type?"image"===a.media_type?"image":"video":a.type,"image"===o&&(r=a.sizes?.large?.url||a.media_details?.sizes?.large?.source_url);let l=t;e===Np&&(l=a.url),e===Pp&&(l=a.link),n({mediaAlt:a.alt,mediaId:a.id,mediaType:o,mediaUrl:r||a.url,mediaLink:a.link||void 0,href:l,focalPoint:void 0})}}({attributes:e,setAttributes:n}),B=e=>{n({mediaWidth:ad(e)}),C(null)},T=it()({"has-media-on-the-right":"right"===p,"is-selected":t,"is-stacked-on-mobile":l,[`is-vertically-aligned-${b}`]:b,"is-image-fill":r}),N=`${E||h}%`,P="right"===p?`1fr ${N}`:`${N} 1fr`,I={gridTemplateColumns:P,msGridColumns:P},M=y.filter((({slug:e})=>od(k,e))).map((({name:e,slug:t})=>({value:t,label:e}))),z=(0,je.createElement)(Ke.PanelBody,{title:(0,Ye.__)("Settings")},(0,je.createElement)(Ke.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,Ye.__)("Stack on mobile"),checked:l,onChange:()=>n({isStackedOnMobile:!l})}),"image"===d&&(0,je.createElement)(Ke.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,Ye.__)("Crop image to fill entire column"),checked:!!r,onChange:()=>n({imageFill:!r})}),r&&g&&"image"===d&&(0,je.createElement)(Ke.FocalPointPicker,{__nextHasNoMarginBottom:!0,label:(0,Ye.__)("Focal point picker"),url:g,value:a,onChange:e=>n({focalPoint:e}),onDragStart:w,onDrag:w}),"image"===d&&(0,je.createElement)(Ke.TextareaControl,{__nextHasNoMarginBottom:!0,label:(0,Ye.__)("Alternative text"),value:u,onChange:e=>{n({mediaAlt:e})},help:(0,je.createElement)(je.Fragment,null,(0,je.createElement)(Ke.ExternalLink,{href:"https://www.w3.org/WAI/tutorials/images/decision-tree"},(0,Ye.__)("Describe the purpose of the image.")),(0,je.createElement)("br",null),(0,Ye.__)("Leave empty if decorative."))}),"image"===d&&(0,je.createElement)(Je.__experimentalImageSizeControl,{onChangeImage:e=>{const t=od(k,e);if(!t)return null;n({mediaUrl:t,mediaSizeSlug:e})},slug:v,imageSizeOptions:M,isResizable:!1,imageSizeHelp:(0,Ye.__)("Select the size of the source image.")}),g&&(0,je.createElement)(Ke.RangeControl,{__nextHasNoMarginBottom:!0,label:(0,Ye.__)("Media width"),value:E||h,onChange:B,min:15,max:85})),R=(0,Je.useBlockProps)({className:T,style:I}),H=(0,Je.useInnerBlocksProps)({className:"wp-block-media-text__content"},{template:Ip,allowedBlocks:f}),A=(0,Je.useBlockEditingMode)();return(0,je.createElement)(je.Fragment,null,(0,je.createElement)(Je.InspectorControls,null,z),(0,je.createElement)(Je.BlockControls,{group:"block"},"default"===A&&(0,je.createElement)(je.Fragment,null,(0,je.createElement)(Je.BlockVerticalAlignmentControl,{onChange:e=>{n({verticalAlignment:e})},value:b}),(0,je.createElement)(Ke.ToolbarButton,{icon:Wp,title:(0,Ye.__)("Show media on left"),isActive:"left"===p,onClick:()=>n({mediaPosition:"left"})}),(0,je.createElement)(Ke.ToolbarButton,{icon:Zp,title:(0,Ye.__)("Show media on right"),isActive:"right"===p,onClick:()=>n({mediaPosition:"right"})})),"image"===d&&(0,je.createElement)(Je.__experimentalImageURLInputUI,{url:o||"",onChangeUrl:e=>{n(e)},linkDestination:s,mediaType:d,mediaUrl:k&&k.source_url,mediaLink:k&&k.link,linkTarget:c,linkClass:i,rel:_})),(0,je.createElement)("div",{...R},"right"===p&&(0,je.createElement)("div",{...H}),(0,je.createElement)(nd,{className:"wp-block-media-text__media",onSelectMedia:S,onWidthChange:e=>{C(ad(e))},commitWidthChange:B,ref:x,enableResize:"default"===A,focalPoint:a,imageFill:r,isSelected:t,isStackedOnMobile:l,mediaAlt:u,mediaId:m,mediaPosition:p,mediaType:d,mediaUrl:g,mediaWidth:h}),"right"!==p&&(0,je.createElement)("div",{...H})))};const ld=()=>{};const id={from:[{type:"block",blocks:["core/image"],transform:({alt:e,url:t,id:n,anchor:a})=>(0,qe.createBlock)("core/media-text",{mediaAlt:e,mediaId:n,mediaUrl:t,mediaType:"image",anchor:a})},{type:"block",blocks:["core/video"],transform:({src:e,id:t,anchor:n})=>(0,qe.createBlock)("core/media-text",{mediaId:t,mediaUrl:e,mediaType:"video",anchor:n})},{type:"block",blocks:["core/cover"],transform:({align:e,alt:t,anchor:n,backgroundType:a,customGradient:o,customOverlayColor:r,gradient:l,id:i,overlayColor:s,style:c,textColor:u,url:m},p)=>{let d={};return o?d={style:{color:{gradient:o}}}:r&&(d={style:{color:{background:r}}}),c?.color?.text&&(d.style={color:{...d.style?.color,text:c.color.text}}),(0,qe.createBlock)("core/media-text",{align:e,anchor:n,backgroundColor:s,gradient:l,mediaAlt:t,mediaId:i,mediaType:a,mediaUrl:m,textColor:u,...d},p)}}],to:[{type:"block",blocks:["core/image"],isMatch:({mediaType:e,mediaUrl:t})=>!t||"image"===e,transform:({mediaAlt:e,mediaId:t,mediaUrl:n,anchor:a})=>(0,qe.createBlock)("core/image",{alt:e,id:t,url:n,anchor:a})},{type:"block",blocks:["core/video"],isMatch:({mediaType:e,mediaUrl:t})=>!t||"video"===e,transform:({mediaId:e,mediaUrl:t,anchor:n})=>(0,qe.createBlock)("core/video",{id:e,src:t,anchor:n})},{type:"block",blocks:["core/cover"],transform:({align:e,anchor:t,backgroundColor:n,focalPoint:a,gradient:o,mediaAlt:r,mediaId:l,mediaType:i,mediaUrl:s,style:c,textColor:u},m)=>{const p={};c?.color?.gradient?p.customGradient=c.color.gradient:c?.color?.background&&(p.customOverlayColor=c.color.background),c?.color?.text&&(p.style={color:{text:c.color.text}});const d={align:e,alt:r,anchor:t,backgroundType:i,dimRatio:s?50:100,focalPoint:a,gradient:o,id:l,overlayColor:n,textColor:u,url:s,...p};return(0,qe.createBlock)("core/cover",d,m)}}]};var sd=id;const cd={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/media-text",title:"Media & Text",category:"media",description:"Set media and words side-by-side for a richer layout.",keywords:["image","video"],textdomain:"default",attributes:{align:{type:"string",default:"none"},mediaAlt:{type:"string",source:"attribute",selector:"figure img",attribute:"alt",default:"",__experimentalRole:"content"},mediaPosition:{type:"string",default:"left"},mediaId:{type:"number",__experimentalRole:"content"},mediaUrl:{type:"string",source:"attribute",selector:"figure video,figure img",attribute:"src",__experimentalRole:"content"},mediaLink:{type:"string"},linkDestination:{type:"string"},linkTarget:{type:"string",source:"attribute",selector:"figure a",attribute:"target"},href:{type:"string",source:"attribute",selector:"figure a",attribute:"href",__experimentalRole:"content"},rel:{type:"string",source:"attribute",selector:"figure a",attribute:"rel"},linkClass:{type:"string",source:"attribute",selector:"figure a",attribute:"class"},mediaType:{type:"string",__experimentalRole:"content"},mediaWidth:{type:"number",default:50},mediaSizeSlug:{type:"string"},isStackedOnMobile:{type:"boolean",default:!0},verticalAlignment:{type:"string"},imageFill:{type:"boolean"},focalPoint:{type:"object"},allowedBlocks:{type:"array"}},supports:{anchor:!0,align:["wide","full"],html:!1,color:{gradients:!0,heading:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0}},spacing:{margin:!0,padding:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}}},editorStyle:"wp-block-media-text-editor",style:"wp-block-media-text"},{name:ud}=cd,md={icon:Bp,example:{viewportWidth:601,attributes:{mediaType:"image",mediaUrl:"https://s.w.org/images/core/5.3/Biologia_Centrali-Americana_-_Cantorchilus_semibadius_1902.jpg"},innerBlocks:[{name:"core/paragraph",attributes:{content:(0,Ye.__)("The wren
Earns his living
Noiselessly.")}},{name:"core/paragraph",attributes:{content:(0,Ye.__)("— Kobayashi Issa (一茶)")}}]},transforms:sd,edit:rd,save:function({attributes:e}){const{isStackedOnMobile:t,mediaAlt:n,mediaPosition:a,mediaType:o,mediaUrl:r,mediaWidth:l,mediaId:i,verticalAlignment:s,imageFill:c,focalPoint:u,linkClass:m,href:p,linkTarget:d,rel:g}=e,h=e.mediaSizeSlug||Tp,_=g||void 0,b=it()({[`wp-image-${i}`]:i&&"image"===o,[`size-${h}`]:i&&"image"===o});let f=(0,je.createElement)("img",{src:r,alt:n,className:b||null});p&&(f=(0,je.createElement)("a",{className:m,href:p,target:d,rel:_},f));const v={image:()=>f,video:()=>(0,je.createElement)("video",{controls:!0,src:r})},y=it()({"has-media-on-the-right":"right"===a,"is-stacked-on-mobile":t,[`is-vertically-aligned-${s}`]:s,"is-image-fill":c}),k=c?Jp(r,u):{};let x;50!==l&&(x="right"===a?`auto ${l}%`:`${l}% auto`);const w={gridTemplateColumns:x};return"right"===a?(0,je.createElement)("div",{...Je.useBlockProps.save({className:y,style:w})},(0,je.createElement)("div",{...Je.useInnerBlocksProps.save({className:"wp-block-media-text__content"})}),(0,je.createElement)("figure",{className:"wp-block-media-text__media",style:k},(v[o]||ld)())):(0,je.createElement)("div",{...Je.useBlockProps.save({className:y,style:w})},(0,je.createElement)("figure",{className:"wp-block-media-text__media",style:k},(v[o]||ld)()),(0,je.createElement)("div",{...Je.useInnerBlocksProps.save({className:"wp-block-media-text__content"})}))},deprecated:jp},pd=()=>Qe({name:ud,metadata:cd,settings:md});var dd=window.wp.dom;const gd=(0,ut.withDispatch)(((e,{clientId:t,attributes:n})=>{const{replaceBlock:a}=e(Je.store);return{convertToHTML(){a(t,(0,qe.createBlock)("core/html",{content:n.originalUndelimitedContent}))}}}))((function({attributes:e,convertToHTML:t,clientId:n}){const{originalName:a,originalUndelimitedContent:o}=e,r=!!o,{hasFreeformBlock:l,hasHTMLBlock:i}=(0,ut.useSelect)((e=>{const{canInsertBlockType:t,getBlockRootClientId:a}=e(Je.store);return{hasFreeformBlock:t("core/freeform",a(n)),hasHTMLBlock:t("core/html",a(n))}}),[n]),s=[];let c;const u=(0,je.createElement)(Ke.Button,{key:"convert",onClick:t,variant:"primary"},(0,Ye.__)("Keep as HTML"));return!r||l||a?r&&i?(c=(0,Ye.sprintf)((0,Ye.__)('Your site doesn’t include support for the "%s" block. You can leave this block intact, convert its content to a Custom HTML block, or remove it entirely.'),a),s.push(u)):c=(0,Ye.sprintf)((0,Ye.__)('Your site doesn’t include support for the "%s" block. You can leave this block intact or remove it entirely.'),a):i?(c=(0,Ye.__)("It appears you are trying to use the deprecated Classic block. You can leave this block intact, convert its content to a Custom HTML block, or remove it entirely. Alternatively, you can refresh the page to use the Classic block."),s.push(u)):c=(0,Ye.__)("It appears you are trying to use the deprecated Classic block. You can leave this block intact, or remove it entirely. Alternatively, you can refresh the page to use the Classic block."),(0,je.createElement)("div",{...(0,Je.useBlockProps)({className:"has-warning"})},(0,je.createElement)(Je.Warning,{actions:s},c),(0,je.createElement)(je.RawHTML,null,(0,dd.safeHTML)(o)))}));var hd=gd;const _d={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/missing",title:"Unsupported",category:"text",description:"Your site doesn’t include support for this block.",textdomain:"default",attributes:{originalName:{type:"string"},originalUndelimitedContent:{type:"string"},originalContent:{type:"string",source:"html"}},supports:{className:!1,customClassName:!1,inserter:!1,html:!1,reusable:!1}},{name:bd}=_d,fd={name:bd,__experimentalLabel(e,{context:t}){if("accessibility"===t){const{originalName:t}=e,n=t?(0,qe.getBlockType)(t):void 0;return n?n.settings.title||t:""}},edit:hd,save:function({attributes:e}){return(0,je.createElement)(je.RawHTML,null,e.originalContent)}},vd=()=>Qe({name:bd,metadata:_d,settings:fd});var yd=(0,je.createElement)(We.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,je.createElement)(We.Path,{d:"M4 9v1.5h16V9H4zm12 5.5h4V13h-4v1.5zm-6 0h4V13h-4v1.5zm-6 0h4V13H4v1.5z"}));const kd=(0,Ye.__)("Read more");var xd={from:[{type:"raw",schema:{"wp-block":{attributes:["data-block"]}},isMatch:e=>e.dataset&&"core/more"===e.dataset.block,transform(e){const{customText:t,noTeaser:n}=e.dataset,a={};return t&&(a.customText=t),""===n&&(a.noTeaser=!0),(0,qe.createBlock)("core/more",a)}}]};const wd={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/more",title:"More",category:"design",description:"Content before this block will be shown in the excerpt on your archives page.",keywords:["read more"],textdomain:"default",attributes:{customText:{type:"string"},noTeaser:{type:"boolean",default:!1}},supports:{customClassName:!1,className:!1,html:!1,multiple:!1},editorStyle:"wp-block-more-editor"},{name:Ed}=wd,Cd={icon:yd,example:{},__experimentalLabel(e,{context:t}){if("accessibility"===t)return e.customText},transforms:xd,edit:function({attributes:{customText:e,noTeaser:t},insertBlocksAfter:n,setAttributes:a}){const o={width:`${(e||kd).length+1.2}em`};return(0,je.createElement)(je.Fragment,null,(0,je.createElement)(Je.InspectorControls,null,(0,je.createElement)(Ke.PanelBody,null,(0,je.createElement)(Ke.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,Ye.__)("Hide the excerpt on the full content page"),checked:!!t,onChange:()=>a({noTeaser:!t}),help:e=>e?(0,Ye.__)("The excerpt is hidden."):(0,Ye.__)("The excerpt is visible.")}))),(0,je.createElement)("div",{...(0,Je.useBlockProps)()},(0,je.createElement)("input",{"aria-label":(0,Ye.__)("“Read more” link text"),type:"text",value:e,placeholder:kd,onChange:e=>{a({customText:""!==e.target.value?e.target.value:void 0})},onKeyDown:({keyCode:e})=>{e===un.ENTER&&n([(0,qe.createBlock)((0,qe.getDefaultBlockName)())])},style:o})))},save:function({attributes:{customText:e,noTeaser:t}}){const n=e?`\x3c!--more ${e}--\x3e`:"\x3c!--more--\x3e",a=t?"\x3c!--noteaser--\x3e":"";return(0,je.createElement)(je.RawHTML,null,[n,a].filter(Boolean).join("\n"))}},Sd=()=>Qe({name:Ed,metadata:wd,settings:Cd});var Bd=(0,je.createElement)(We.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,je.createElement)(We.Path,{d:"M12 4c-4.4 0-8 3.6-8 8s3.6 8 8 8 8-3.6 8-8-3.6-8-8-8zm0 14.5c-3.6 0-6.5-2.9-6.5-6.5S8.4 5.5 12 5.5s6.5 2.9 6.5 6.5-2.9 6.5-6.5 6.5zM9 16l4.5-3L15 8.4l-4.5 3L9 16z"})),Td=window.wp.a11y;var Nd=(0,je.forwardRef)((function({icon:e,size:t=24,...n},a){return(0,je.cloneElement)(e,{width:t,height:t,...n,ref:a})}));var Pd=(0,je.createElement)(We.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,je.createElement)(We.Path,{d:"M13 11.8l6.1-6.3-1-1-6.1 6.2-6.1-6.2-1 1 6.1 6.3-6.5 6.7 1 1 6.5-6.6 6.5 6.6 1-1z"}));const Id={name:"core/navigation-link"},Md=["core/navigation-link","core/search","core/social-links","core/page-list","core/spacer","core/home-link","core/site-title","core/site-logo","core/navigation-submenu","core/loginout","core/buttons"],zd=["core/navigation-link/page","core/navigation-link"],Rd={per_page:100,status:["publish","draft"],order:"desc",orderby:"date"},Hd=["postType","wp_navigation",Rd];function Ad(e){const t=(0,ct.useResourcePermissions)("navigation",e),{navigationMenu:n,isNavigationMenuResolved:a,isNavigationMenuMissing:o}=(0,ut.useSelect)((t=>function(e,t){if(!t)return{isNavigationMenuResolved:!1,isNavigationMenuMissing:!0};const{getEntityRecord:n,getEditedEntityRecord:a,hasFinishedResolution:o}=e(ct.store),r=["postType","wp_navigation",t],l=n(...r),i=a(...r),s=o("getEditedEntityRecord",r),c="publish"===i.status||"draft"===i.status;return{isNavigationMenuResolved:s,isNavigationMenuMissing:s&&(!l||!c),navigationMenu:c?i:null}}(t,e)),[e]),{canCreate:r,canUpdate:l,canDelete:i,isResolving:s,hasResolved:c}=t,{records:u,isResolving:m,hasResolved:p}=(0,ct.useEntityRecords)("postType","wp_navigation",Rd);return{navigationMenu:n,isNavigationMenuResolved:a,isNavigationMenuMissing:o,navigationMenus:u,isResolvingNavigationMenus:m,hasResolvedNavigationMenus:p,canSwitchNavigationMenu:e?u?.length>1:u?.length>0,canUserCreateNavigationMenu:r,isResolvingCanUserCreateNavigationMenu:s,hasResolvedCanUserCreateNavigationMenu:c,canUserUpdateNavigationMenu:l,hasResolvedCanUserUpdateNavigationMenu:e?c:void 0,canUserDeleteNavigationMenu:i,hasResolvedCanUserDeleteNavigationMenu:e?c:void 0}}function Ld(e){const{records:t,isResolving:n,hasResolved:a}=(0,ct.useEntityRecords)("root","menu",{per_page:-1,context:"view"}),{records:o,isResolving:r,hasResolved:l}=(0,ct.useEntityRecords)("postType","page",{parent:0,order:"asc",orderby:"id",per_page:-1,context:"view"}),{records:i,hasResolved:s}=(0,ct.useEntityRecords)("root","menuItem",{menus:e,per_page:-1,context:"view"},{enabled:!!e});return{pages:o,isResolvingPages:r,hasResolvedPages:l,hasPages:!(!l||!o?.length),menus:t,isResolvingMenus:n,hasResolvedMenus:a,hasMenus:!(!a||!t?.length),menuItems:i,hasResolvedMenuItems:s}}var Dd=({isVisible:e=!0})=>(0,je.createElement)("div",{"aria-hidden":!e||void 0,className:"wp-block-navigation-placeholder__preview"},(0,je.createElement)("div",{className:"wp-block-navigation-placeholder__actions__indicator"},(0,je.createElement)(Nd,{icon:Bd}),(0,Ye.__)("Navigation")));var Vd=(0,je.createElement)(We.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,je.createElement)(We.Path,{d:"M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z"}));var Fd=function({currentMenuId:e,onSelectNavigationMenu:t,onSelectClassicMenu:n,onCreateNew:a,actionLabel:o,createNavigationMenuIsSuccess:r,createNavigationMenuIsError:l}){const i=(0,Ye.__)("Create from '%s'"),[s,c]=(0,je.useState)(!1);o=o||i;const{menus:u}=Ld(),{navigationMenus:m,isResolvingNavigationMenus:p,hasResolvedNavigationMenus:d,canUserCreateNavigationMenu:g,canSwitchNavigationMenu:h}=Ad(),[_]=(0,ct.useEntityProp)("postType","wp_navigation","title"),b=(0,je.useMemo)((()=>m?.map((({id:e,title:t,status:n},a)=>{const r=function(e,t,n){return e?"publish"===n?(0,Gn.decodeEntities)(e):(0,Ye.sprintf)((0,Ye.__)("%1$s (%2$s)"),(0,Gn.decodeEntities)(e),n):(0,Ye.sprintf)((0,Ye.__)("(no title %s)"),t)}(t?.rendered,a+1,n);return{value:e,label:r,ariaLabel:(0,Ye.sprintf)(o,r)}}))||[]),[m,o]),f=!!m?.length,v=!!u?.length,y=!!h,k=!!g,x=f&&!e,w=!f&&d,E=d&&null===e;let C="";C=s||p?(0,Ye.__)("Loading…"):x||w||E?(0,Ye.__)("Choose or create a Navigation menu"):_,(0,je.useEffect)((()=>{s&&(r||l)&&c(!1)}),[d,r,g,l,s,E,w,x]);const S=(0,je.createElement)(Ke.DropdownMenu,{label:C,icon:Vd,toggleProps:{isSmall:!0}},(({onClose:o})=>(0,je.createElement)(je.Fragment,null,y&&f&&(0,je.createElement)(Ke.MenuGroup,{label:(0,Ye.__)("Menus")},(0,je.createElement)(Ke.MenuItemsChoice,{value:e,onSelect:e=>{c(!0),t(e),o()},choices:b,disabled:s})),k&&v&&(0,je.createElement)(Ke.MenuGroup,{label:(0,Ye.__)("Import Classic Menus")},u?.map((e=>{const t=(0,Gn.decodeEntities)(e.name);return(0,je.createElement)(Ke.MenuItem,{onClick:()=>{c(!0),n(e),o()},key:e.id,"aria-label":(0,Ye.sprintf)(i,t),disabled:s},t)}))),g&&(0,je.createElement)(Ke.MenuGroup,{label:(0,Ye.__)("Tools")},(0,je.createElement)(Ke.MenuItem,{disabled:s,onClick:()=>{o(),a(),c(!0)}},(0,Ye.__)("Create new menu"))))));return S};function $d({isSelected:e,currentMenuId:t,clientId:n,canUserCreateNavigationMenu:a=!1,isResolvingCanUserCreateNavigationMenu:o,onSelectNavigationMenu:r,onSelectClassicMenu:l,onCreateEmpty:i}){const{isResolvingMenus:s,hasResolvedMenus:c}=Ld();(0,je.useEffect)((()=>{e&&(s&&(0,Td.speak)((0,Ye.__)("Loading navigation block setup options…")),c&&(0,Td.speak)((0,Ye.__)("Navigation block setup options ready.")))}),[c,s,e]);const u=s&&o;return(0,je.createElement)(je.Fragment,null,(0,je.createElement)(Ke.Placeholder,{className:"wp-block-navigation-placeholder"},(0,je.createElement)(Dd,{isVisible:!e}),(0,je.createElement)("div",{"aria-hidden":!e||void 0,className:"wp-block-navigation-placeholder__controls"},(0,je.createElement)("div",{className:"wp-block-navigation-placeholder__actions"},(0,je.createElement)("div",{className:"wp-block-navigation-placeholder__actions__indicator"},(0,je.createElement)(Nd,{icon:Bd})," ",(0,Ye.__)("Navigation")),(0,je.createElement)("hr",null),u&&(0,je.createElement)(Ke.Spinner,null),(0,je.createElement)(Fd,{currentMenuId:t,clientId:n,onSelectNavigationMenu:r,onSelectClassicMenu:l}),(0,je.createElement)("hr",null),a&&(0,je.createElement)(Ke.Button,{variant:"tertiary",onClick:i},(0,Ye.__)("Start empty"))))))}var Gd=(0,je.createElement)(We.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,je.createElement)(We.Path,{d:"M5 5v1.5h14V5H5zm0 7.8h14v-1.5H5v1.5zM5 19h14v-1.5H5V19z"}));function Od({icon:e}){return"menu"===e?(0,je.createElement)(Nd,{icon:Gd}):(0,je.createElement)(We.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24","aria-hidden":"true",focusable:"false"},(0,je.createElement)(We.Rect,{x:"4",y:"7.5",width:"16",height:"1.5"}),(0,je.createElement)(We.Rect,{x:"4",y:"15",width:"16",height:"1.5"}))}function Ud({children:e,id:t,isOpen:n,isResponsive:a,onToggle:o,isHiddenByDefault:r,overlayBackgroundColor:l,overlayTextColor:i,hasIcon:s,icon:c}){if(!a)return e;const u=it()("wp-block-navigation__responsive-container",{"has-text-color":!!i.color||!!i?.class,[(0,Je.getColorClassName)("color",i?.slug)]:!!i?.slug,"has-background":!!l.color||l?.class,[(0,Je.getColorClassName)("background-color",l?.slug)]:!!l?.slug,"is-menu-open":n,"hidden-by-default":r}),m={color:!i?.slug&&i?.color,backgroundColor:!l?.slug&&l?.color&&l.color},p=it()("wp-block-navigation__responsive-container-open",{"always-shown":r}),d=`${t}-modal`,g={className:"wp-block-navigation__responsive-dialog",...n&&{role:"dialog","aria-modal":!0,"aria-label":(0,Ye.__)("Menu")}};return(0,je.createElement)(je.Fragment,null,!n&&(0,je.createElement)(Ke.Button,{"aria-haspopup":"true","aria-label":s&&(0,Ye.__)("Open menu"),className:p,onClick:()=>o(!0)},s&&(0,je.createElement)(Od,{icon:c}),!s&&(0,Ye.__)("Menu")),(0,je.createElement)("div",{className:u,style:m,id:d},(0,je.createElement)("div",{className:"wp-block-navigation__responsive-close",tabIndex:"-1"},(0,je.createElement)("div",{...g},(0,je.createElement)(Ke.Button,{className:"wp-block-navigation__responsive-container-close","aria-label":s&&(0,Ye.__)("Close menu"),onClick:()=>o(!1)},s&&(0,je.createElement)(Nd,{icon:Pd}),!s&&(0,Ye.__)("Close")),(0,je.createElement)("div",{className:"wp-block-navigation__responsive-container-content",id:`${d}-content`},e)))))}function qd({clientId:e,hasCustomPlaceholder:t,orientation:n,templateLock:a}){const{isImmediateParentOfSelectedBlock:o,selectedBlockHasChildren:r,isSelected:l}=(0,ut.useSelect)((t=>{const{getBlockCount:n,hasSelectedInnerBlock:a,getSelectedBlockClientId:o}=t(Je.store),r=o();return{isImmediateParentOfSelectedBlock:a(e,!1),selectedBlockHasChildren:!!n(r),isSelected:r===e}}),[e]),[i,s,c]=(0,ct.useEntityBlockEditor)("postType","wp_navigation"),u=(0,je.useMemo)((()=>i.every((({name:e})=>"core/navigation-link"===e||"core/navigation-submenu"===e||"core/page-list"===e))),[i]),m=l||o&&!r,p=(0,je.useMemo)((()=>(0,je.createElement)(Dd,null)),[]),d=!t&&!!!i?.length&&!l,g=(0,Je.useInnerBlocksProps)({className:"wp-block-navigation__container"},{value:i,onInput:s,onChange:c,allowedBlocks:Md,prioritizedInserterBlocks:zd,defaultBlock:Id,directInsert:u,orientation:n,templateLock:a,renderAppender:!!(l||o&&!r||m)&&Je.InnerBlocks.ButtonBlockAppender,placeholder:d?p:void 0,__experimentalCaptureToolbars:!0,__unstableDisableLayoutClassNames:!0});return(0,je.createElement)("div",{...g})}function jd(){const[e,t]=(0,ct.useEntityProp)("postType","wp_navigation","title");return(0,je.createElement)(Ke.TextControl,{__nextHasNoMarginBottom:!0,label:(0,Ye.__)("Menu name"),value:e,onChange:t})}const Wd=(e,t,n)=>{if(e===t)return!0;if("object"==typeof e&&null!=e&&"object"==typeof t&&null!=t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const a in e){if(!t.hasOwnProperty(a))return!1;if(n&&n(a,e))return!0;if(!Wd(e[a],t[a],n))return!1}return!0}return!1},Zd={};function Qd({blocks:e,createNavigationMenu:t,hasSelection:n}){const a=(0,je.useRef)();(0,je.useEffect)((()=>{a?.current||(a.current=e)}),[e]);const o=function(e,t){return!Wd(e,t,((e,t)=>{if("core/page-list"===t?.name&&"innerBlocks"===e)return!0}))}(a?.current,e),r=(0,je.useMemo)((()=>e.every((({name:e})=>"core/navigation-link"===e||"core/navigation-submenu"===e||"core/page-list"===e))),[e]),l=(0,je.useContext)(Ke.Disabled.Context),i=(0,Je.useInnerBlocksProps)({className:"wp-block-navigation__container"},{renderAppender:!!n&&void 0,allowedBlocks:Md,defaultBlock:Id,directInsert:r}),{isSaving:s,hasResolvedAllNavigationMenus:c}=(0,ut.useSelect)((e=>{if(l)return Zd;const{hasFinishedResolution:t,isSavingEntityRecord:n}=e(ct.store);return{isSaving:n("postType","wp_navigation"),hasResolvedAllNavigationMenus:t("getEntityRecords",Hd)}}),[l]);(0,je.useEffect)((()=>{!l&&!s&&c&&n&&o&&t(null,e)}),[e,t,l,s,c,o,n]);const u=s?Ke.Disabled:"div";return(0,je.createElement)(u,{...i})}function Kd({onDelete:e}){const[t,n]=(0,je.useState)(!1),a=(0,ct.useEntityId)("postType","wp_navigation"),[o]=(0,ct.useEntityProp)("postType","wp_navigation","title"),{deleteEntityRecord:r}=(0,ut.useDispatch)(ct.store);return(0,je.createElement)(je.Fragment,null,(0,je.createElement)(Ke.Button,{className:"wp-block-navigation-delete-menu-button",variant:"secondary",isDestructive:!0,onClick:()=>{n(!0)}},(0,Ye.__)("Delete menu")),t&&(0,je.createElement)(Ke.Modal,{title:(0,Ye.sprintf)((0,Ye.__)("Delete %s"),o),onRequestClose:()=>n(!1)},(0,je.createElement)("p",null,(0,Ye.__)("Are you sure you want to delete this navigation menu?")),(0,je.createElement)(Ke.__experimentalHStack,{justify:"right"},(0,je.createElement)(Ke.Button,{variant:"tertiary",onClick:()=>{n(!1)}},(0,Ye.__)("Cancel")),(0,je.createElement)(Ke.Button,{variant:"primary",onClick:()=>{r("postType","wp_navigation",a,{force:!0}),e(o)}},(0,Ye.__)("Confirm")))))}var Yd=function({name:e,message:t=""}={}){const n=(0,je.useRef)(),{createWarningNotice:a,removeNotice:o}=(0,ut.useDispatch)(Bt.store);return[(0,je.useCallback)((o=>{n.current||(n.current=e,a(o||t,{id:n.current,type:"snackbar"}))}),[n,a,t,e]),(0,je.useCallback)((()=>{n.current&&(o(n.current),n.current=null)}),[n,o])]};function Jd({setAttributes:e,hasIcon:t,icon:n}){return(0,je.createElement)(je.Fragment,null,(0,je.createElement)(Ke.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,Ye.__)("Show icon button"),help:(0,Ye.__)("Configure the visual appearance of the button opening the overlay menu."),onChange:t=>e({hasIcon:t}),checked:t}),(0,je.createElement)(Ke.__experimentalToggleGroupControl,{__nextHasNoMarginBottom:!0,label:(0,Ye.__)("Icon"),value:n,onChange:t=>e({icon:t}),isBlock:!0},(0,je.createElement)(Ke.__experimentalToggleGroupControlOption,{value:"handle","aria-label":(0,Ye.__)("handle"),label:(0,je.createElement)(Od,{icon:"handle"})}),(0,je.createElement)(Ke.__experimentalToggleGroupControlOption,{value:"menu","aria-label":(0,Ye.__)("menu"),label:(0,je.createElement)(Od,{icon:"menu"})})))}function Xd(e){if(!e)return null;const t=eg(function(e,t="id",n="parent"){const a=Object.create(null),o=[];for(const r of e)a[r[t]]={...r,children:[]},r[n]?(a[r[n]]=a[r[n]]||{},a[r[n]].children=a[r[n]].children||[],a[r[n]].children.push(a[r[t]])):o.push(a[r[t]]);return o}(e));return(0,yl.applyFilters)("blocks.navigation.__unstableMenuItemsToBlocks",t,e)}function eg(e,t=0){let n={};const a=[...e].sort(((e,t)=>e.menu_order-t.menu_order)),o=a.map((e=>{if("block"===e.type){const[t]=(0,qe.parse)(e.content.raw);return t||(0,qe.createBlock)("core/freeform",{content:e.content})}const a=e.children?.length?"core/navigation-submenu":"core/navigation-link",o=function({title:e,xfn:t,classes:n,attr_title:a,object:o,object_id:r,description:l,url:i,type:s,target:c},u,m){o&&"post_tag"===o&&(o="tag");return{label:e?.rendered||"",...o?.length&&{type:o},kind:s?.replace("_","-")||"custom",url:i||"",...t?.length&&t.join(" ").trim()&&{rel:t.join(" ").trim()},...n?.length&&n.join(" ").trim()&&{className:n.join(" ").trim()},...a?.length&&{title:a},...r&&"custom"!==o&&{id:r},...l?.length&&{description:l},..."_blank"===c&&{opensInNewTab:!0},..."core/navigation-submenu"===u&&{isTopLevelItem:0===m},..."core/navigation-link"===u&&{isTopLevelLink:0===m}}}(e,a,t),{innerBlocks:r=[],mapping:l={}}=e.children?.length?eg(e.children,t+1):{};n={...n,...l};const i=(0,qe.createBlock)(a,o,r);return n[e.id]=i.clientId,i}));return{innerBlocks:o,mapping:n}}const tg="success",ng="error",ag="pending";let og=null;var rg=function(e,{throwOnError:t=!1}={}){const n=(0,ut.useRegistry)(),{editEntityRecord:a}=(0,ut.useDispatch)(ct.store),[o,r]=(0,je.useState)("idle"),[l,i]=(0,je.useState)(null),s=(0,je.useCallback)((async(t,o,r="publish")=>{let l,i;try{i=await n.resolveSelect(ct.store).getMenuItems({menus:t,per_page:-1,context:"view"})}catch(e){throw new Error((0,Ye.sprintf)((0,Ye.__)('Unable to fetch classic menu "%s" from API.'),o),{cause:e})}if(null===i)throw new Error((0,Ye.sprintf)((0,Ye.__)('Unable to fetch classic menu "%s" from API.'),o));const{innerBlocks:s}=Xd(i);try{l=await e(o,s,r),await a("postType","wp_navigation",l.id,{status:"publish"},{throwOnError:!0})}catch(e){throw new Error((0,Ye.sprintf)((0,Ye.__)('Unable to create Navigation Menu "%s".'),o),{cause:e})}return l}),[e,a,n]);return{convert:(0,je.useCallback)((async(e,n,a)=>{if(og!==e)return og=e,e&&n?(r(ag),i(null),await s(e,n,a).then((e=>(r(tg),og=null,e))).catch((e=>{if(i(e?.message),r(ng),og=null,t)throw new Error((0,Ye.sprintf)((0,Ye.__)('Unable to create Navigation Menu "%s".'),n),{cause:e})}))):(i("Unable to convert menu. Missing menu details."),void r(ng))}),[s,t]),status:o,error:l}};function lg(e,t){return e&&t?e+"//"+t:null}const ig=["postType","wp_navigation",{status:"draft",per_page:-1}],sg=["postType","wp_navigation",{per_page:-1,status:"publish"}];function cg(e){const t=(0,je.useContext)(Ke.Disabled.Context),n=function(e){return(0,ut.useSelect)((t=>{if(!e)return;const{getBlock:n,getBlockParentsByBlockName:a}=t(Je.store),o=a(e,"core/template-part",!0);if(!o?.length)return;const r=t("core/editor").__experimentalGetDefaultTemplatePartAreas(),{getEditedEntityRecord:l}=t(ct.store);for(const e of o){const t=n(e),{theme:a,slug:o}=t.attributes,i=l("postType","wp_template_part",lg(a,o));if(i?.area)return r.find((e=>"uncategorized"!==e.area&&e.area===i.area))?.label}}),[e])}(t?void 0:e),a=(0,ut.useRegistry)();return(0,je.useCallback)((async()=>{if(t)return"";const{getEntityRecords:e}=a.resolveSelect(ct.store),[o,r]=await Promise.all([e(...ig),e(...sg)]),l=n?(0,Ye.sprintf)((0,Ye.__)("%s navigation"),n):(0,Ye.__)("Navigation"),i=[...o,...r].reduce(((e,t)=>t?.title?.raw?.startsWith(l)?e+1:e),0);return(i>0?`${l} ${i+1}`:l)||""}),[t,n,a])}const ug="success",mg="error",pg="pending",dg="idle";const gg=[];function hg(e){return e.ownerDocument.defaultView.getComputedStyle(e)}function _g(e,t,n){if(!e)return;t(hg(e).color);let a=e,o=hg(a).backgroundColor;for(;"rgba(0, 0, 0, 0)"===o&&a.parentNode&&a.parentNode.nodeType===a.parentNode.ELEMENT_NODE;)a=a.parentNode,o=hg(a).backgroundColor;n(o)}function bg(e,t){const{textColor:n,customTextColor:a,backgroundColor:o,customBackgroundColor:r,overlayTextColor:l,customOverlayTextColor:i,overlayBackgroundColor:s,customOverlayBackgroundColor:c,style:u}=e,m={};return t&&i?m.customTextColor=i:t&&l?m.textColor=l:a?m.customTextColor=a:n?m.textColor=n:u?.color?.text&&(m.customTextColor=u.color.text),t&&c?m.customBackgroundColor=c:t&&s?m.backgroundColor=s:r?m.customBackgroundColor=r:o?m.backgroundColor=o:u?.color?.background&&(m.customTextColor=u.color.background),m}function fg(e){return{className:it()("wp-block-navigation__submenu-container",{"has-text-color":!(!e.textColor&&!e.customTextColor),[`has-${e.textColor}-color`]:!!e.textColor,"has-background":!(!e.backgroundColor&&!e.customBackgroundColor),[`has-${e.backgroundColor}-background-color`]:!!e.backgroundColor}),style:{color:e.customTextColor,backgroundColor:e.customBackgroundColor}}}var vg=({className:e="",disabled:t,isMenuItem:n=!1})=>{let a=Ke.Button;return n&&(a=Ke.MenuItem),(0,je.createElement)(a,{variant:"link",disabled:t,className:e,href:(0,st.addQueryArgs)("edit.php",{post_type:"wp_navigation"})},(0,Ye.__)("Manage menus"))};var yg=function({onCreateNew:e}){return(0,je.createElement)(Je.Warning,null,(0,je.createInterpolateElement)((0,Ye.__)("Navigation menu has been deleted or is unavailable. "),{button:(0,je.createElement)(Ke.Button,{onClick:e,variant:"link"})}))};var kg=(0,je.createElement)(We.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,je.createElement)(We.Path,{d:"M2 12c0 3.6 2.4 5.5 6 5.5h.5V19l3-2.5-3-2.5v2H8c-2.5 0-4.5-1.5-4.5-4s2-4.5 4.5-4.5h3.5V6H8c-3.6 0-6 2.4-6 6zm19.5-1h-8v1.5h8V11zm0 5h-8v1.5h8V16zm0-10h-8v1.5h8V6z"}));var xg=(0,je.createElement)(We.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,je.createElement)(We.Path,{d:"M6.5 12.4L12 8l5.5 4.4-.9 1.2L12 10l-4.5 3.6-1-1.2z"}));var wg=(0,je.createElement)(We.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,je.createElement)(We.Path,{d:"M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z"}));const Eg={className:"block-editor-block-settings-menu__popover",placement:"bottom-start"},Cg=["core/navigation-link","core/navigation-submenu"];function Sg({block:e,onClose:t,expandedState:n,expand:a,setInsertedBlock:o}){const{insertBlock:r,replaceBlock:l,replaceInnerBlocks:i}=(0,ut.useDispatch)(Je.store),s=e.clientId,c=!Cg.includes(e.name);return(0,je.createElement)(Ke.MenuItem,{icon:kg,disabled:c,onClick:()=>{const c=(0,qe.createBlock)("core/navigation-link");if("core/navigation-submenu"===e.name)r(c,e.innerBlocks.length,s,false);else{const t=(0,qe.createBlock)("core/navigation-submenu",e.attributes,e.innerBlocks);l(s,t),i(t.clientId,[c],false)}o(c),n[e.clientId]||a(e.clientId),t()}},(0,Ye.__)("Add submenu link"))}function Bg(e){const{block:t}=e,{clientId:n}=t,{moveBlocksDown:a,moveBlocksUp:o,removeBlocks:r}=(0,ut.useDispatch)(Je.store),l=(0,Ye.sprintf)((0,Ye.__)("Remove %s"),(0,Je.BlockTitle)({clientId:n,maximumLength:25})),i=(0,ut.useSelect)((e=>{const{getBlockRootClientId:t}=e(Je.store);return t(n)}),[n]);return(0,je.createElement)(Ke.DropdownMenu,{icon:Vd,label:(0,Ye.__)("Options"),className:"block-editor-block-settings-menu",popoverProps:Eg,noIcons:!0,...e},(({onClose:s})=>(0,je.createElement)(je.Fragment,null,(0,je.createElement)(Ke.MenuGroup,null,(0,je.createElement)(Ke.MenuItem,{icon:xg,onClick:()=>{o([n],i),s()}},(0,Ye.__)("Move up")),(0,je.createElement)(Ke.MenuItem,{icon:wg,onClick:()=>{a([n],i),s()}},(0,Ye.__)("Move down")),(0,je.createElement)(Sg,{block:t,onClose:s,expanded:!0,expandedState:e.expandedState,expand:e.expand,setInsertedBlock:e.setInsertedBlock})),(0,je.createElement)(Ke.MenuGroup,null,(0,je.createElement)(Ke.MenuItem,{onClick:()=>{r([n],!1),s()}},l)))))}var Tg=window.wp.escapeHtml;const Ng=(e={},t,n={})=>{const{label:a="",kind:o="",type:r=""}=n,{title:l="",url:i="",opensInNewTab:s,id:c,kind:u=o,type:m=r}=e,p=l.replace(/http(s?):\/\//gi,""),d=i.replace(/http(s?):\/\//gi,""),g=l&&l!==a&&p!==d?(0,Tg.escapeHTML)(l):a||(0,Tg.escapeHTML)(d),h="post_tag"===m?"tag":m.replace("-","_"),_=["post","page","tag","category"].indexOf(h)>-1,b=!u&&!_||"custom"===u?"custom":u;t({...i&&{url:encodeURI((0,st.safeDecodeURI)(i))},...g&&{label:g},...void 0!==s&&{opensInNewTab:s},...c&&Number.isInteger(c)&&{id:c},...b&&{kind:b},...h&&"URL"!==h&&{type:h}})};function Pg(e,t){switch(e){case"post":case"page":return{type:"post",subtype:e};case"category":return{type:"term",subtype:"category"};case"tag":return{type:"term",subtype:"post_tag"};case"post_format":return{type:"post-format"};default:return"taxonomy"===t?{type:"term",subtype:e}:"post-type"===t?{type:"post",subtype:e}:{}}}function Ig({clientId:e}){const{getBlock:t,blockTransforms:n}=(0,ut.useSelect)((t=>{const{getBlock:n,getBlockRootClientId:a,getBlockTransformItems:o}=t(Je.store);return{getBlock:n,blockTransforms:o(n(e),a(e))}}),[e]),{replaceBlock:a}=(0,ut.useDispatch)(Je.store),o=["core/page-list","core/site-logo","core/social-links","core/search"],r=n.filter((e=>o.includes(e.name)));return r?.length&&e?(0,je.createElement)("div",{className:"link-control-transform"},(0,je.createElement)("h3",{className:"link-control-transform__subheading"},(0,Ye.__)("Transform")),(0,je.createElement)("div",{className:"link-control-transform__items"},r.map(((n,o)=>(0,je.createElement)(Ke.Button,{key:`transform-${o}`,onClick:()=>a(e,(0,qe.switchToBlockType)(t(e),n.name)),className:"link-control-transform__item"},(0,je.createElement)(Je.BlockIcon,{icon:n.icon}),n.title))))):null}function Mg(e){const{saveEntityRecord:t}=(0,ut.useDispatch)(ct.store),n=(0,ct.useResourcePermissions)("pages"),a=(0,ct.useResourcePermissions)("posts");const{label:o,url:r,opensInNewTab:l,type:i,kind:s}=e.link;let c=!1;i&&"page"!==i?"post"===i&&(c=a.canCreate):c=n.canCreate;const u=(0,je.useMemo)((()=>({url:r,opensInNewTab:l,title:o&&(0,dd.__unstableStripHTML)(o)})),[o,l,r]);return(0,je.createElement)(Ke.Popover,{placement:"bottom",onClose:e.onClose,anchor:e.anchor,shift:!0},(0,je.createElement)(Je.__experimentalLinkControl,{hasTextControl:!0,hasRichPreviews:!0,value:u,showInitialSuggestions:!0,withCreateSuggestion:c,createSuggestion:async function(n){const a=e.link.type||"page",o=await t("postType",a,{title:n,status:"draft"});return{id:o.id,type:a,title:(0,Gn.decodeEntities)(o.title.rendered),url:o.link,kind:"post-type"}},createSuggestionButtonText:e=>{let t;return t="post"===i?(0,Ye.__)("Create draft post: %s"):(0,Ye.__)("Create draft page: %s"),(0,je.createInterpolateElement)((0,Ye.sprintf)(t,e),{mark:(0,je.createElement)("mark",null)})},noDirectEntry:!!i,noURLSuggestion:!!i,suggestionsQuery:Pg(i,s),onChange:e.onChange,onRemove:e.onRemove,onCancel:e.onCancel,renderControlBottom:r?null:()=>(0,je.createElement)(Ig,{clientId:e.clientId})}))}const zg=(0,Ye.__)("Switch to '%s'"),Rg=["core/navigation-link","core/navigation-submenu"],{PrivateListView:Hg}=At(Je.privateApis);function Ag({block:e,insertedBlock:t,setInsertedBlock:n}){const{updateBlockAttributes:a}=(0,ut.useDispatch)(Je.store),o=Rg?.includes(t?.name),r=t?.clientId===e.clientId;if(!(o&&r))return null;return(0,je.createElement)(Mg,{clientId:t?.clientId,link:t?.attributes,onClose:()=>{n(null)},onChange:e=>{var o;Ng(e,(o=t?.clientId,e=>{o&&a(o,e)}),t?.attributes),n(null)},onCancel:()=>{n(null)}})}const Lg=({clientId:e,currentMenuId:t,isLoading:n,isNavigationMenuMissing:a,onCreateNew:o})=>{const r=(0,ut.useSelect)((t=>!!t(Je.store).getBlockCount(e)),[e]),{navigationMenu:l}=Ad(t);if(t&&a)return(0,je.createElement)(yg,{onCreateNew:o});if(n)return(0,je.createElement)(Ke.Spinner,null);const i=l?(0,Ye.sprintf)((0,Ye.__)("Structure for navigation menu: %s"),l?.title||(0,Ye.__)("Untitled menu")):(0,Ye.__)("You have not yet created any menus. Displaying a list of your Pages");return(0,je.createElement)("div",{className:"wp-block-navigation__menu-inspector-controls"},!r&&(0,je.createElement)("p",{className:"wp-block-navigation__menu-inspector-controls__empty-message"},(0,Ye.__)("This navigation menu is empty.")),(0,je.createElement)(Hg,{rootClientId:e,isExpanded:!0,description:i,showAppender:!0,blockSettingsMenu:Bg,additionalBlockContent:Ag}))};var Dg=e=>{const{createNavigationMenuIsSuccess:t,createNavigationMenuIsError:n,currentMenuId:a=null,onCreateNew:o,onSelectClassicMenu:r,onSelectNavigationMenu:l,isManageMenusButtonDisabled:i,blockEditingMode:s}=e;return(0,je.createElement)(Je.InspectorControls,{group:"list"},(0,je.createElement)(Ke.PanelBody,{title:null},(0,je.createElement)(Ke.__experimentalHStack,{className:"wp-block-navigation-off-canvas-editor__header"},(0,je.createElement)(Ke.__experimentalHeading,{className:"wp-block-navigation-off-canvas-editor__title",level:2},(0,Ye.__)("Menu")),"default"===s&&(0,je.createElement)(Fd,{currentMenuId:a,onSelectClassicMenu:r,onSelectNavigationMenu:l,onCreateNew:o,createNavigationMenuIsSuccess:t,createNavigationMenuIsError:n,actionLabel:zg,isManageMenusButtonDisabled:i})),(0,je.createElement)(Lg,{...e})))};function Vg({id:e,children:t}){return(0,je.createElement)(Ke.VisuallyHidden,null,(0,je.createElement)("div",{id:e,className:"wp-block-navigation__description"},t))}function Fg({id:e}){const[t]=(0,ct.useEntityProp)("postType","wp_navigation","title"),n=(0,Ye.sprintf)((0,Ye.__)('Navigation menu: "%s"'),t);return(0,je.createElement)(Vg,{id:e},n)}var $g=(0,Je.withColors)({textColor:"color"},{backgroundColor:"color"},{overlayBackgroundColor:"color"},{overlayTextColor:"color"})((function({attributes:e,setAttributes:t,clientId:n,isSelected:a,className:o,backgroundColor:r,setBackgroundColor:l,textColor:i,setTextColor:s,overlayBackgroundColor:c,setOverlayBackgroundColor:u,overlayTextColor:m,setOverlayTextColor:p,hasSubmenuIndicatorSetting:d=!0,customPlaceholder:g=null,__unstableLayoutClassNames:h}){const{openSubmenusOnClick:_,overlayMenu:b,showSubmenuIcon:f,templateLock:v,layout:{justifyContent:y,orientation:k="horizontal",flexWrap:x="wrap"}={},hasIcon:w,icon:E="handle"}=e,C=e.ref,S=(0,je.useCallback)((e=>{t({ref:e})}),[t]),B=`navigationMenu/${C}`,T=(0,Je.__experimentalUseHasRecursion)(B),N=(0,Je.useBlockEditingMode)(),{menus:P}=Ld(),[I,M]=Yd({name:"block-library/core/navigation/status"}),[z,R]=Yd({name:"block-library/core/navigation/classic-menu-conversion"}),[H,A]=Yd({name:"block-library/core/navigation/permissions/update"}),{create:L,status:D,error:V,value:F,isPending:$,isSuccess:G,isError:O}=function(e){const[t,n]=(0,je.useState)(dg),[a,o]=(0,je.useState)(null),[r,l]=(0,je.useState)(null),{saveEntityRecord:i,editEntityRecord:s}=(0,ut.useDispatch)(ct.store),c=cg(e),u=(0,je.useCallback)((async(e=null,t=[],a)=>{if(e&&"string"!=typeof e)throw l("Invalid title supplied when creating Navigation Menu."),n(mg),new Error("Value of supplied title argument was not a string.");n(pg),o(null),l(null),e||(e=await c().catch((e=>{throw l(e?.message),n(mg),new Error("Failed to create title when saving new Navigation Menu.",{cause:e})})));const r={title:e,content:(0,qe.serialize)(t),status:a};return i("postType","wp_navigation",r).then((e=>(o(e),n(ug),"publish"!==a&&s("postType","wp_navigation",e.id,{status:"publish"}),e))).catch((e=>{throw l(e?.message),n(mg),new Error("Unable to save new Navigation Menu",{cause:e})}))}),[i,s,c]);return{create:u,status:t,value:a,error:r,isIdle:t===dg,isPending:t===pg,isSuccess:t===ug,isError:t===mg}}(n),U=()=>{L("")},{hasUncontrolledInnerBlocks:q,uncontrolledInnerBlocks:j,isInnerBlockSelected:W,innerBlocks:Z}=function(e){return(0,ut.useSelect)((t=>{const{getBlock:n,getBlocks:a,hasSelectedInnerBlock:o}=t(Je.store),r=n(e).innerBlocks,l=!!r?.length,i=l?gg:a(e);return{innerBlocks:l?r:i,hasUncontrolledInnerBlocks:l,uncontrolledInnerBlocks:r,controlledInnerBlocks:i,isInnerBlockSelected:o(e,!0)}}),[e])}(n),Q=!!Z.find((e=>"core/navigation-submenu"===e.name)),{replaceInnerBlocks:K,selectBlock:Y,__unstableMarkNextChangeAsNotPersistent:J}=(0,ut.useDispatch)(Je.store),[X,ee]=(0,je.useState)(!1),[te,ne]=(0,je.useState)(!1),{hasResolvedNavigationMenus:ae,isNavigationMenuResolved:oe,isNavigationMenuMissing:re,canUserUpdateNavigationMenu:le,hasResolvedCanUserUpdateNavigationMenu:ie,canUserDeleteNavigationMenu:se,hasResolvedCanUserDeleteNavigationMenu:ce,canUserCreateNavigationMenu:ue,isResolvingCanUserCreateNavigationMenu:me,hasResolvedCanUserCreateNavigationMenu:pe}=Ad(C),de=ae&&re,{convert:ge,status:he,error:_e}=rg(L),be=he===ag,fe=(0,je.useCallback)(((e,t={focusNavigationBlock:!1})=>{const{focusNavigationBlock:a}=t;S(e),a&&Y(n)}),[Y,n,S]),ve=!re&&oe,ye=q&&!ve,{getNavigationFallbackId:ke}=At((0,ut.useSelect)(ct.store)),xe=C||ye?null:ke();(0,je.useEffect)((()=>{C||ye||!xe||(J(),S(xe))}),[C,S,ye,xe,J]);const we=(0,je.useRef)(),Ee="nav",Ce=!C&&!$&&!be&&ae&&0===P?.length&&!q,Se=!ae||$||be||!(!C||ve||be),Be=e.style?.typography?.textDecoration,Te=(0,Je.__experimentalUseBlockOverlayActive)(n),Ne="never"!==b,Pe=(0,Je.useBlockProps)({ref:we,className:it()(o,{"items-justified-right":"right"===y,"items-justified-space-between":"space-between"===y,"items-justified-left":"left"===y,"items-justified-center":"center"===y,"is-vertical":"vertical"===k,"no-wrap":"nowrap"===x,"is-responsive":Ne,"has-text-color":!!i.color||!!i?.class,[(0,Je.getColorClassName)("color",i?.slug)]:!!i?.slug,"has-background":!!r.color||r.class,[(0,Je.getColorClassName)("background-color",r?.slug)]:!!r?.slug,[`has-text-decoration-${Be}`]:Be,"block-editor-block-content-overlay":Te},h),style:{color:!i?.slug&&i?.color,backgroundColor:!r?.slug&&r?.color}}),Ie="web"===je.Platform.OS,[Me,ze]=(0,je.useState)(),[Re,He]=(0,je.useState)(),[Ae,Le]=(0,je.useState)(),[De,Ve]=(0,je.useState)(),Fe=async e=>{const t=await ge(e.id,e.name,"draft");t&&fe(t.id,{focusNavigationBlock:!0})},$e=e=>{fe(e)};(0,je.useEffect)((()=>{M(),$&&(0,Td.speak)((0,Ye.__)("Creating Navigation Menu.")),G&&(fe(F?.id,{focusNavigationBlock:!0}),I((0,Ye.__)("Navigation Menu successfully created."))),O&&I((0,Ye.__)("Failed to create Navigation Menu."))}),[D,V,F?.id,O,G,$,fe,M,I]),(0,je.useEffect)((()=>{R(),he===ag&&(0,Td.speak)((0,Ye.__)("Classic menu importing.")),he===tg&&z((0,Ye.__)("Classic menu imported successfully.")),he===ng&&z((0,Ye.__)("Classic menu import failed."))}),[he,_e,R,z]),(0,je.useEffect)((()=>{if(!Ie)return;_g(we.current,He,ze);const e=we.current?.querySelector('[data-type="core/navigation-submenu"] [data-type="core/navigation-link"]');e&&(m.color||c.color)&&_g(e,Ve,Le)}),[Ie,m.color,c.color]),(0,je.useEffect)((()=>{a||W||A(),(a||W)&&(C&&!de&&ie&&!le&&H((0,Ye.__)("You do not have permission to edit this Menu. Any changes made will not be saved.")),C||!pe||ue||H((0,Ye.__)("You do not have permission to create Navigation Menus.")))}),[a,W,le,ie,ue,pe,C,A,H,de]);const Ge=ue||le,Oe=it()("wp-block-navigation__overlay-menu-preview",{open:te}),Ue=f||_?"":(0,Ye.__)('The current menu options offer reduced accessibility for users and are not recommended. Enabling either "Open on Click" or "Show arrow" offers enhanced accessibility by allowing keyboard users to browse submenus selectively.'),We=(0,je.useRef)(!0);(0,je.useEffect)((()=>{!We.current&&Ue&&(0,Td.speak)(Ue),We.current=!1}),[Ue]);const Ze=(0,Tt.useInstanceId)(Jd,"overlay-menu-preview"),Qe=(0,Je.__experimentalUseMultipleOriginColorsAndGradients)(),Xe=(0,je.createElement)(je.Fragment,null,(0,je.createElement)(Je.InspectorControls,null,d&&(0,je.createElement)(Ke.PanelBody,{title:(0,Ye.__)("Display")},Ne&&(0,je.createElement)(je.Fragment,null,(0,je.createElement)(Ke.Button,{className:Oe,onClick:()=>{ne(!te)},"aria-label":(0,Ye.__)("Overlay menu controls"),"aria-controls":Ze,"aria-expanded":te},w&&(0,je.createElement)(je.Fragment,null,(0,je.createElement)(Od,{icon:E}),(0,je.createElement)(Nd,{icon:Pd})),!w&&(0,je.createElement)(je.Fragment,null,(0,je.createElement)("span",null,(0,Ye.__)("Menu")),(0,je.createElement)("span",null,(0,Ye.__)("Close")))),(0,je.createElement)("div",{id:Ze},te&&(0,je.createElement)(Jd,{setAttributes:t,hasIcon:w,icon:E,hidden:!te}))),(0,je.createElement)("h3",null,(0,Ye.__)("Overlay Menu")),(0,je.createElement)(Ke.__experimentalToggleGroupControl,{__nextHasNoMarginBottom:!0,label:(0,Ye.__)("Configure overlay menu"),value:b,help:(0,Ye.__)("Collapses the navigation options in a menu icon opening an overlay."),onChange:e=>t({overlayMenu:e}),isBlock:!0,hideLabelFromVision:!0},(0,je.createElement)(Ke.__experimentalToggleGroupControlOption,{value:"never",label:(0,Ye.__)("Off")}),(0,je.createElement)(Ke.__experimentalToggleGroupControlOption,{value:"mobile",label:(0,Ye.__)("Mobile")}),(0,je.createElement)(Ke.__experimentalToggleGroupControlOption,{value:"always",label:(0,Ye.__)("Always")})),Q&&(0,je.createElement)(je.Fragment,null,(0,je.createElement)("h3",null,(0,Ye.__)("Submenus")),(0,je.createElement)(Ke.ToggleControl,{__nextHasNoMarginBottom:!0,checked:_,onChange:e=>{t({openSubmenusOnClick:e,...e&&{showSubmenuIcon:!0}})},label:(0,Ye.__)("Open on click")}),(0,je.createElement)(Ke.ToggleControl,{__nextHasNoMarginBottom:!0,checked:f,onChange:e=>{t({showSubmenuIcon:e})},disabled:e.openSubmenusOnClick,label:(0,Ye.__)("Show arrow")}),Ue&&(0,je.createElement)("div",null,(0,je.createElement)(Ke.Notice,{spokenMessage:null,status:"warning",isDismissible:!1},Ue))))),Qe.hasColorsOrGradients&&(0,je.createElement)(Je.InspectorControls,{group:"color"},(0,je.createElement)(Je.__experimentalColorGradientSettingsDropdown,{__experimentalIsRenderedInSidebar:!0,settings:[{colorValue:i.color,label:(0,Ye.__)("Text"),onColorChange:s,resetAllFilter:()=>s()},{colorValue:r.color,label:(0,Ye.__)("Background"),onColorChange:l,resetAllFilter:()=>l()},{colorValue:m.color,label:(0,Ye.__)("Submenu & overlay text"),onColorChange:p,resetAllFilter:()=>p()},{colorValue:c.color,label:(0,Ye.__)("Submenu & overlay background"),onColorChange:u,resetAllFilter:()=>u()}],panelId:n,...Qe,gradients:[],disableCustomGradients:!0}),Ie&&(0,je.createElement)(je.Fragment,null,(0,je.createElement)(Je.ContrastChecker,{backgroundColor:Me,textColor:Re}),(0,je.createElement)(Je.ContrastChecker,{backgroundColor:Ae,textColor:De})))),et=`${n}-desc`,tt=!Ge||!ae;if(ye&&!$)return(0,je.createElement)(Ee,{...Pe,"aria-describedby":Ce?void 0:et},(0,je.createElement)(Vg,{id:et},(0,Ye.__)("Unsaved Navigation Menu.")),(0,je.createElement)(Dg,{clientId:n,createNavigationMenuIsSuccess:G,createNavigationMenuIsError:O,currentMenuId:C,isNavigationMenuMissing:re,isManageMenusButtonDisabled:tt,onCreateNew:U,onSelectClassicMenu:Fe,onSelectNavigationMenu:$e,isLoading:Se,blockEditingMode:N}),"default"===N&&Xe,(0,je.createElement)(Ud,{id:n,onToggle:ee,isOpen:X,hasIcon:w,icon:E,isResponsive:Ne,isHiddenByDefault:"always"===b,overlayBackgroundColor:c,overlayTextColor:m},(0,je.createElement)(Qd,{createNavigationMenu:L,blocks:j,hasSelection:a||W})));if(C&&re)return(0,je.createElement)(Ee,{...Pe},(0,je.createElement)(Dg,{clientId:n,createNavigationMenuIsSuccess:G,createNavigationMenuIsError:O,currentMenuId:C,isNavigationMenuMissing:re,isManageMenusButtonDisabled:tt,onCreateNew:U,onSelectClassicMenu:Fe,onSelectNavigationMenu:$e,isLoading:Se,blockEditingMode:N}),(0,je.createElement)(yg,{onCreateNew:U}));if(ve&&T)return(0,je.createElement)("div",{...Pe},(0,je.createElement)(Je.Warning,null,(0,Ye.__)("Block cannot be rendered inside itself.")));const nt=g||$d;return Ce&&g?(0,je.createElement)(Ee,{...Pe},(0,je.createElement)(nt,{isSelected:a,currentMenuId:C,clientId:n,canUserCreateNavigationMenu:ue,isResolvingCanUserCreateNavigationMenu:me,onSelectNavigationMenu:$e,onSelectClassicMenu:Fe,onCreateEmpty:U})):(0,je.createElement)(ct.EntityProvider,{kind:"postType",type:"wp_navigation",id:C},(0,je.createElement)(Je.__experimentalRecursionProvider,{uniqueId:B},(0,je.createElement)(Dg,{clientId:n,createNavigationMenuIsSuccess:G,createNavigationMenuIsError:O,currentMenuId:C,isNavigationMenuMissing:re,isManageMenusButtonDisabled:tt,onCreateNew:U,onSelectClassicMenu:Fe,onSelectNavigationMenu:$e,isLoading:Se,blockEditingMode:N}),"default"===N&&Xe,"default"===N&&ve&&(0,je.createElement)(Je.InspectorControls,{group:"advanced"},ie&&le&&(0,je.createElement)(jd,null),ce&&se&&(0,je.createElement)(Kd,{onDelete:(e="")=>{K(n,[]),I((0,Ye.sprintf)((0,Ye.__)("Navigation menu %s successfully deleted."),e))}}),(0,je.createElement)(vg,{disabled:tt,className:"wp-block-navigation-manage-menus-button"})),Se&&(0,je.createElement)(Ee,{...Pe},(0,je.createElement)("div",{className:"wp-block-navigation__loading-indicator-container"},(0,je.createElement)(Ke.Spinner,{className:"wp-block-navigation__loading-indicator"}))),!Se&&(0,je.createElement)(Ee,{...Pe,"aria-describedby":Ce?void 0:et},(0,je.createElement)(Fg,{id:et}),(0,je.createElement)(Ud,{id:n,onToggle:ee,hasIcon:w,icon:E,isOpen:X,isResponsive:Ne,isHiddenByDefault:"always"===b,overlayBackgroundColor:c,overlayTextColor:m},ve&&(0,je.createElement)(qd,{clientId:n,hasCustomPlaceholder:!!g,templateLock:v,orientation:k})))))}));const Gg={fontStyle:"var:preset|font-style|",fontWeight:"var:preset|font-weight|",textDecoration:"var:preset|text-decoration|",textTransform:"var:preset|text-transform|"},Og=({navigationMenuId:e,...t})=>({...t,ref:e}),Ug=e=>{if(e.layout)return e;const{itemsJustification:t,orientation:n,...a}=e;return(t||n)&&Object.assign(a,{layout:{type:"flex",...t&&{justifyContent:t},...n&&{orientation:n}}}),a},qg={attributes:{navigationMenuId:{type:"number"},textColor:{type:"string"},customTextColor:{type:"string"},rgbTextColor:{type:"string"},backgroundColor:{type:"string"},customBackgroundColor:{type:"string"},rgbBackgroundColor:{type:"string"},showSubmenuIcon:{type:"boolean",default:!0},openSubmenusOnClick:{type:"boolean",default:!1},overlayMenu:{type:"string",default:"mobile"},__unstableLocation:{type:"string"},overlayBackgroundColor:{type:"string"},customOverlayBackgroundColor:{type:"string"},overlayTextColor:{type:"string"},customOverlayTextColor:{type:"string"}},supports:{align:["wide","full"],anchor:!0,html:!1,inserter:!0,typography:{fontSize:!0,lineHeight:!0,__experimentalFontStyle:!0,__experimentalFontWeight:!0,__experimentalTextTransform:!0,__experimentalFontFamily:!0,__experimentalTextDecoration:!0,__experimentalDefaultControls:{fontSize:!0}},spacing:{blockGap:!0,units:["px","em","rem","vh","vw"],__experimentalDefaultControls:{blockGap:!0}},layout:{allowSwitching:!1,allowInheriting:!1,default:{type:"flex"}}},save(){return(0,je.createElement)(Je.InnerBlocks.Content,null)},isEligible:({navigationMenuId:e})=>!!e,migrate:Og},jg={attributes:{navigationMenuId:{type:"number"},orientation:{type:"string",default:"horizontal"},textColor:{type:"string"},customTextColor:{type:"string"},rgbTextColor:{type:"string"},backgroundColor:{type:"string"},customBackgroundColor:{type:"string"},rgbBackgroundColor:{type:"string"},itemsJustification:{type:"string"},showSubmenuIcon:{type:"boolean",default:!0},openSubmenusOnClick:{type:"boolean",default:!1},overlayMenu:{type:"string",default:"never"},__unstableLocation:{type:"string"},overlayBackgroundColor:{type:"string"},customOverlayBackgroundColor:{type:"string"},overlayTextColor:{type:"string"},customOverlayTextColor:{type:"string"}},supports:{align:["wide","full"],anchor:!0,html:!1,inserter:!0,typography:{fontSize:!0,lineHeight:!0,__experimentalFontStyle:!0,__experimentalFontWeight:!0,__experimentalTextTransform:!0,__experimentalFontFamily:!0,__experimentalTextDecoration:!0,__experimentalDefaultControls:{fontSize:!0}},spacing:{blockGap:!0,units:["px","em","rem","vh","vw"],__experimentalDefaultControls:{blockGap:!0}}},save(){return(0,je.createElement)(Je.InnerBlocks.Content,null)},isEligible:({itemsJustification:e,orientation:t})=>!!e||!!t,migrate:(0,Tt.compose)(Og,Ug)},Wg={attributes:{orientation:{type:"string",default:"horizontal"},textColor:{type:"string"},customTextColor:{type:"string"},rgbTextColor:{type:"string"},backgroundColor:{type:"string"},customBackgroundColor:{type:"string"},rgbBackgroundColor:{type:"string"},itemsJustification:{type:"string"},showSubmenuIcon:{type:"boolean",default:!0},openSubmenusOnClick:{type:"boolean",default:!1},overlayMenu:{type:"string",default:"never"},__unstableLocation:{type:"string"},overlayBackgroundColor:{type:"string"},customOverlayBackgroundColor:{type:"string"},overlayTextColor:{type:"string"},customOverlayTextColor:{type:"string"}},supports:{align:["wide","full"],anchor:!0,html:!1,inserter:!0,typography:{fontSize:!0,lineHeight:!0,__experimentalFontStyle:!0,__experimentalFontWeight:!0,__experimentalTextTransform:!0,__experimentalFontFamily:!0,__experimentalTextDecoration:!0},spacing:{blockGap:!0,units:["px","em","rem","vh","vw"],__experimentalDefaultControls:{blockGap:!0}}},save(){return(0,je.createElement)(Je.InnerBlocks.Content,null)},migrate:(0,Tt.compose)(Og,Ug,en),isEligible({style:e}){return e?.typography?.fontFamily}},Zg=[qg,jg,Wg,{attributes:{orientation:{type:"string",default:"horizontal"},textColor:{type:"string"},customTextColor:{type:"string"},rgbTextColor:{type:"string"},backgroundColor:{type:"string"},customBackgroundColor:{type:"string"},rgbBackgroundColor:{type:"string"},itemsJustification:{type:"string"},showSubmenuIcon:{type:"boolean",default:!0},openSubmenusOnClick:{type:"boolean",default:!1},isResponsive:{type:"boolean",default:"false"},__unstableLocation:{type:"string"},overlayBackgroundColor:{type:"string"},customOverlayBackgroundColor:{type:"string"},overlayTextColor:{type:"string"},customOverlayTextColor:{type:"string"}},supports:{align:["wide","full"],anchor:!0,html:!1,inserter:!0,typography:{fontSize:!0,lineHeight:!0,__experimentalFontStyle:!0,__experimentalFontWeight:!0,__experimentalTextTransform:!0,__experimentalFontFamily:!0,__experimentalTextDecoration:!0}},isEligible(e){return e.isResponsive},migrate:(0,Tt.compose)(Og,Ug,en,(function(e){return delete e.isResponsive,{...e,overlayMenu:"mobile"}})),save(){return(0,je.createElement)(Je.InnerBlocks.Content,null)}},{attributes:{orientation:{type:"string"},textColor:{type:"string"},customTextColor:{type:"string"},rgbTextColor:{type:"string"},backgroundColor:{type:"string"},customBackgroundColor:{type:"string"},rgbBackgroundColor:{type:"string"},itemsJustification:{type:"string"},showSubmenuIcon:{type:"boolean",default:!0}},supports:{align:["wide","full"],anchor:!0,html:!1,inserter:!0,fontSize:!0,__experimentalFontStyle:!0,__experimentalFontWeight:!0,__experimentalTextTransform:!0,color:!0,__experimentalFontFamily:!0,__experimentalTextDecoration:!0},save(){return(0,je.createElement)(Je.InnerBlocks.Content,null)},isEligible(e){if(!e.style||!e.style.typography)return!1;for(const t in Gg){const n=e.style.typography[t];if(n&&n.startsWith(Gg[t]))return!0}return!1},migrate:(0,Tt.compose)(Og,Ug,en,(function(e){var t;return{...e,style:{...e.style,typography:Object.fromEntries(Object.entries(null!==(t=e.style.typography)&&void 0!==t?t:{}).map((([e,t])=>{const n=Gg[e];if(n&&t.startsWith(n)){const a=t.slice(n.length);return"textDecoration"===e&&"strikethrough"===a?[e,"line-through"]:[e,a]}return[e,t]})))}}}))},{attributes:{className:{type:"string"},textColor:{type:"string"},rgbTextColor:{type:"string"},backgroundColor:{type:"string"},rgbBackgroundColor:{type:"string"},fontSize:{type:"string"},customFontSize:{type:"number"},itemsJustification:{type:"string"},showSubmenuIcon:{type:"boolean"}},isEligible(e){return e.rgbTextColor||e.rgbBackgroundColor},supports:{align:["wide","full"],anchor:!0,html:!1,inserter:!0},migrate:(0,Tt.compose)(Og,(e=>{const{rgbTextColor:t,rgbBackgroundColor:n,...a}=e;return{...a,customTextColor:e.textColor?void 0:e.rgbTextColor,customBackgroundColor:e.backgroundColor?void 0:e.rgbBackgroundColor}})),save(){return(0,je.createElement)(Je.InnerBlocks.Content,null)}}];var Qg=Zg;const Kg={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/navigation",title:"Navigation",category:"theme",description:"A collection of blocks that allow visitors to get around your site.",keywords:["menu","navigation","links"],textdomain:"default",attributes:{ref:{type:"number"},textColor:{type:"string"},customTextColor:{type:"string"},rgbTextColor:{type:"string"},backgroundColor:{type:"string"},customBackgroundColor:{type:"string"},rgbBackgroundColor:{type:"string"},showSubmenuIcon:{type:"boolean",default:!0},openSubmenusOnClick:{type:"boolean",default:!1},overlayMenu:{type:"string",default:"mobile"},icon:{type:"string",default:"handle"},hasIcon:{type:"boolean",default:!0},__unstableLocation:{type:"string"},overlayBackgroundColor:{type:"string"},customOverlayBackgroundColor:{type:"string"},overlayTextColor:{type:"string"},customOverlayTextColor:{type:"string"},maxNestingLevel:{type:"number",default:5},templateLock:{type:["string","boolean"],enum:["all","insert","contentOnly",!1]}},providesContext:{textColor:"textColor",customTextColor:"customTextColor",backgroundColor:"backgroundColor",customBackgroundColor:"customBackgroundColor",overlayTextColor:"overlayTextColor",customOverlayTextColor:"customOverlayTextColor",overlayBackgroundColor:"overlayBackgroundColor",customOverlayBackgroundColor:"customOverlayBackgroundColor",fontSize:"fontSize",customFontSize:"customFontSize",showSubmenuIcon:"showSubmenuIcon",openSubmenusOnClick:"openSubmenusOnClick",style:"style",maxNestingLevel:"maxNestingLevel"},supports:{align:["wide","full"],ariaLabel:!0,html:!1,inserter:!0,typography:{fontSize:!0,lineHeight:!0,__experimentalFontStyle:!0,__experimentalFontWeight:!0,__experimentalTextTransform:!0,__experimentalFontFamily:!0,__experimentalLetterSpacing:!0,__experimentalTextDecoration:!0,__experimentalSkipSerialization:["textDecoration"],__experimentalDefaultControls:{fontSize:!0}},spacing:{blockGap:!0,units:["px","em","rem","vh","vw"],__experimentalDefaultControls:{blockGap:!0}},layout:{allowSwitching:!1,allowInheriting:!1,allowVerticalAlignment:!1,allowSizingOnChildren:!0,default:{type:"flex"}},__experimentalStyle:{elements:{link:{color:{text:"inherit"}}}},interactivity:!0},viewScript:"file:./view.min.js",editorStyle:"wp-block-navigation-editor",style:"wp-block-navigation"},{name:Yg}=Kg,Jg={icon:Bd,example:{attributes:{overlayMenu:"never"},innerBlocks:[{name:"core/navigation-link",attributes:{label:(0,Ye.__)("Home"),url:"https://make.wordpress.org/"}},{name:"core/navigation-link",attributes:{label:(0,Ye.__)("About"),url:"https://make.wordpress.org/"}},{name:"core/navigation-link",attributes:{label:(0,Ye.__)("Contact"),url:"https://make.wordpress.org/"}}]},edit:$g,save:function({attributes:e}){if(!e.ref)return(0,je.createElement)(Je.InnerBlocks.Content,null)},deprecated:Qg},Xg=()=>Qe({name:Yg,metadata:Kg,settings:Jg});var eh=(0,je.createElement)(We.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,je.createElement)(We.Path,{d:"M12.5 14.5h-1V16h1c2.2 0 4-1.8 4-4s-1.8-4-4-4h-1v1.5h1c1.4 0 2.5 1.1 2.5 2.5s-1.1 2.5-2.5 2.5zm-4 1.5v-1.5h-1C6.1 14.5 5 13.4 5 12s1.1-2.5 2.5-2.5h1V8h-1c-2.2 0-4 1.8-4 4s1.8 4 4 4h1zm-1-3.2h5v-1.5h-5v1.5zM18 4H9c-1.1 0-2 .9-2 2v.5h1.5V6c0-.3.2-.5.5-.5h9c.3 0 .5.2.5.5v12c0 .3-.2.5-.5.5H9c-.3 0-.5-.2-.5-.5v-.5H7v.5c0 1.1.9 2 2 2h9c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2z"}));var th=(0,je.createElement)(We.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,je.createElement)(We.Path,{d:"M7 5.5h10a.5.5 0 01.5.5v12a.5.5 0 01-.5.5H7a.5.5 0 01-.5-.5V6a.5.5 0 01.5-.5zM17 4H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V6a2 2 0 00-2-2zm-1 3.75H8v1.5h8v-1.5zM8 11h8v1.5H8V11zm6 3.25H8v1.5h6v-1.5z"}));var nh=(0,je.createElement)(We.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,je.createElement)(We.Path,{d:"M20.1 11.2l-6.7-6.7c-.1-.1-.3-.2-.5-.2H5c-.4-.1-.8.3-.8.7v7.8c0 .2.1.4.2.5l6.7 6.7c.2.2.5.4.7.5s.6.2.9.2c.3 0 .6-.1.9-.2.3-.1.5-.3.8-.5l5.6-5.6c.4-.4.7-1 .7-1.6.1-.6-.2-1.2-.6-1.6zM19 13.4L13.4 19c-.1.1-.2.1-.3.2-.2.1-.4.1-.6 0-.1 0-.2-.1-.3-.2l-6.5-6.5V5.8h6.8l6.5 6.5c.2.2.2.4.2.6 0 .1 0 .3-.2.5zM9 8c-.6 0-1 .4-1 1s.4 1 1 1 1-.4 1-1-.4-1-1-1z"}));var ah=(0,je.createElement)(We.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,je.createElement)(We.Path,{d:"M4 20h9v-1.5H4V20zm0-5.5V16h16v-1.5H4zm.8-4l.7.7 2-2V12h1V9.2l2 2 .7-.7-2-2H12v-1H9.2l2-2-.7-.7-2 2V4h-1v2.8l-2-2-.7.7 2 2H4v1h2.8l-2 2z"}));function oh(e){switch(e){case"post":return Cm;case"page":return th;case"tag":return nh;case"category":return $n;default:return ah}}function rh(e,t){if("core/navigation-link"!==t)return e;if(e.variations){const t=(e,t)=>e.type===t.type,n=e.variations.map((e=>({...e,...!e.icon&&{icon:oh(e.name)},...!e.isActive&&{isActive:t}})));return{...e,variations:n}}return e}const lh={from:[{type:"block",blocks:["core/site-logo"],transform:()=>(0,qe.createBlock)("core/navigation-link")},{type:"block",blocks:["core/spacer"],transform:()=>(0,qe.createBlock)("core/navigation-link")},{type:"block",blocks:["core/home-link"],transform:()=>(0,qe.createBlock)("core/navigation-link")},{type:"block",blocks:["core/social-links"],transform:()=>(0,qe.createBlock)("core/navigation-link")},{type:"block",blocks:["core/search"],transform:()=>(0,qe.createBlock)("core/navigation-link")},{type:"block",blocks:["core/page-list"],transform:()=>(0,qe.createBlock)("core/navigation-link")},{type:"block",blocks:["core/buttons"],transform:()=>(0,qe.createBlock)("core/navigation-link")}],to:[{type:"block",blocks:["core/navigation-submenu"],transform:(e,t)=>(0,qe.createBlock)("core/navigation-submenu",e,t)},{type:"block",blocks:["core/spacer"],transform:()=>(0,qe.createBlock)("core/spacer")},{type:"block",blocks:["core/site-logo"],transform:()=>(0,qe.createBlock)("core/site-logo")},{type:"block",blocks:["core/home-link"],transform:()=>(0,qe.createBlock)("core/home-link")},{type:"block",blocks:["core/social-links"],transform:()=>(0,qe.createBlock)("core/social-links")},{type:"block",blocks:["core/search"],transform:()=>(0,qe.createBlock)("core/search",{showLabel:!1,buttonUseIcon:!0,buttonPosition:"button-inside"})},{type:"block",blocks:["core/page-list"],transform:()=>(0,qe.createBlock)("core/page-list")},{type:"block",blocks:["core/buttons"],transform:({label:e,url:t,rel:n,title:a,opensInNewTab:o})=>(0,qe.createBlock)("core/buttons",{},[(0,qe.createBlock)("core/button",{text:e,url:t,rel:n,title:a,linkTarget:o?"_blank":void 0})])}]};var ih=lh;const sh={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/navigation-link",title:"Custom Link",category:"design",parent:["core/navigation"],description:"Add a page, link, or another item to your navigation.",textdomain:"default",attributes:{label:{type:"string"},type:{type:"string"},description:{type:"string"},rel:{type:"string"},id:{type:"number"},opensInNewTab:{type:"boolean",default:!1},url:{type:"string"},title:{type:"string"},kind:{type:"string"},isTopLevelLink:{type:"boolean"}},usesContext:["textColor","customTextColor","backgroundColor","customBackgroundColor","overlayTextColor","customOverlayTextColor","overlayBackgroundColor","customOverlayBackgroundColor","fontSize","customFontSize","showSubmenuIcon","maxNestingLevel","style"],supports:{reusable:!1,html:!1,__experimentalSlashInserter:!0,typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}}},editorStyle:"wp-block-navigation-link-editor",style:"wp-block-navigation-link"},{name:ch}=sh,uh={icon:eh,__experimentalLabel:({label:e})=>e,merge(e,{label:t=""}){return{...e,label:e.label+t}},edit:function({attributes:e,isSelected:t,setAttributes:n,insertBlocksAfter:a,mergeBlocks:o,onReplace:r,context:l,clientId:i}){const{id:s,label:c,type:u,url:m,description:p,rel:d,title:g,kind:h}=e,[_,b]=((e,t,n)=>{const a="post-type"===e||"post"===t||"page"===t,o=Number.isInteger(n),r=(0,ut.useSelect)((e=>{if(!a)return null;const{getEntityRecord:o}=e(ct.store);return o("postType",t,n)?.status}),[a,t,n]);return[a&&o&&r&&"trash"===r,"draft"===r]})(h,u,s),{maxNestingLevel:f}=l,{replaceBlock:v,__unstableMarkNextChangeAsNotPersistent:y}=(0,ut.useDispatch)(Je.store),[k,x]=(0,je.useState)(!1),[w,E]=(0,je.useState)(null),C=(0,je.useRef)(null),S=(e=>{const[t,n]=(0,je.useState)(!1);return(0,je.useEffect)((()=>{const{ownerDocument:t}=e.current;function a(e){r(e)}function o(){n(!1)}function r(t){e.current.contains(t.target)?n(!0):n(!1)}return t.addEventListener("dragstart",a),t.addEventListener("dragend",o),t.addEventListener("dragenter",r),()=>{t.removeEventListener("dragstart",a),t.removeEventListener("dragend",o),t.removeEventListener("dragenter",r)}}),[]),t})(C),B=(0,Ye.__)("Add label…"),T=(0,je.useRef)(),[N,P]=(0,je.useState)(!1),{innerBlocks:I,isAtMaxNesting:M,isTopLevelLink:z,isParentOfSelectedBlock:R,hasChildren:H}=(0,ut.useSelect)((e=>{const{getBlocks:t,getBlockCount:n,getBlockName:a,getBlockRootClientId:o,hasSelectedInnerBlock:r,getBlockParentsByBlockName:l}=e(Je.store);return{innerBlocks:t(i),isAtMaxNesting:l(i,["core/navigation-link","core/navigation-submenu"]).length>=f,isTopLevelLink:"core/navigation"===a(o(i)),isParentOfSelectedBlock:r(i,!0),hasChildren:!!n(i)}}),[i]);function A(){const t=(0,qe.createBlock)("core/navigation-submenu",e,I.length>0?I:[(0,qe.createBlock)("core/navigation-link")]);v(i,t)}(0,je.useEffect)((()=>{m||x(!0)}),[m]),(0,je.useEffect)((()=>{H&&(y(),A())}),[H]),(0,je.useEffect)((()=>{t||x(!1)}),[t]),(0,je.useEffect)((()=>{k&&m&&((0,st.isURL)((0,st.prependHTTP)(c))&&/^.+\.[a-z]+/.test(c)?function(){T.current.focus();const{ownerDocument:e}=T.current,{defaultView:t}=e,n=t.getSelection(),a=e.createRange();a.selectNodeContents(T.current),n.removeAllRanges(),n.addRange(a)}():(0,dd.placeCaretAtHorizontalEdge)(T.current,!0))}),[m]);const{textColor:L,customTextColor:D,backgroundColor:V,customBackgroundColor:F}=bg(l,!z),$=(0,Je.useBlockProps)({ref:(0,Tt.useMergeRefs)([E,C]),className:it()("wp-block-navigation-item",{"is-editing":t||R,"is-dragging-within":S,"has-link":!!m,"has-child":H,"has-text-color":!!L||!!D,[(0,Je.getColorClassName)("color",L)]:!!L,"has-background":!!V||F,[(0,Je.getColorClassName)("background-color",V)]:!!V}),style:{color:!L&&D,backgroundColor:!V&&F},onKeyDown:function(e){(un.isKeyboardEvent.primary(e,"k")||(!m||b||_)&&e.keyCode===un.ENTER)&&x(!0)}}),G=(0,Je.useInnerBlocksProps)({...$,className:"remove-outline"},{allowedBlocks:["core/navigation-link","core/navigation-submenu","core/page-list"],defaultBlock:{name:"core/navigation-link"},directInsert:!0,renderAppender:!1});(!m||_||b)&&($.onClick=()=>x(!0));const O=it()("wp-block-navigation-item__content",{"wp-block-navigation-link__placeholder":!m||_||b}),U=function(e){let t="";switch(e){case"post":t=(0,Ye.__)("Select post");break;case"page":t=(0,Ye.__)("Select page");break;case"category":t=(0,Ye.__)("Select category");break;case"tag":t=(0,Ye.__)("Select tag");break;default:t=(0,Ye.__)("Add link")}return t}(u),q=`(${_?(0,Ye.__)("Invalid"):(0,Ye.__)("Draft")})`,j=_||b?(0,Ye.__)("This item has been deleted, or is a draft"):(0,Ye.__)("This item is missing a link");return(0,je.createElement)(je.Fragment,null,(0,je.createElement)(Je.BlockControls,null,(0,je.createElement)(Ke.ToolbarGroup,null,(0,je.createElement)(Ke.ToolbarButton,{name:"link",icon:mn,title:(0,Ye.__)("Link"),shortcut:un.displayShortcut.primary("k"),onClick:()=>x(!0)}),!M&&(0,je.createElement)(Ke.ToolbarButton,{name:"submenu",icon:kg,title:(0,Ye.__)("Add submenu"),onClick:A}))),(0,je.createElement)(Je.InspectorControls,null,(0,je.createElement)(Ke.PanelBody,{title:(0,Ye.__)("Settings")},(0,je.createElement)(Ke.TextControl,{__nextHasNoMarginBottom:!0,value:c?(0,dd.__unstableStripHTML)(c):"",onChange:e=>{n({label:e})},label:(0,Ye.__)("Label"),autoComplete:"off",onFocus:()=>P(!0),onBlur:()=>P(!1)}),(0,je.createElement)(Ke.TextControl,{__nextHasNoMarginBottom:!0,value:m||"",onChange:t=>{Ng({url:t},n,e)},label:(0,Ye.__)("URL"),autoComplete:"off"}),(0,je.createElement)(Ke.TextareaControl,{__nextHasNoMarginBottom:!0,value:p||"",onChange:e=>{n({description:e})},label:(0,Ye.__)("Description"),help:(0,Ye.__)("The description will be displayed in the menu if the current theme supports it.")}),(0,je.createElement)(Ke.TextControl,{__nextHasNoMarginBottom:!0,value:g||"",onChange:e=>{n({title:e})},label:(0,Ye.__)("Title attribute"),autoComplete:"off",help:(0,Ye.__)("Additional information to help clarify the purpose of the link.")}),(0,je.createElement)(Ke.TextControl,{__nextHasNoMarginBottom:!0,value:d||"",onChange:e=>{n({rel:e})},label:(0,Ye.__)("Rel attribute"),autoComplete:"off",help:(0,Ye.__)("The relationship of the linked URL as space-separated link types.")}))),(0,je.createElement)("div",{...$},(0,je.createElement)("a",{className:O},m?(0,je.createElement)(je.Fragment,null,!_&&!b&&!N&&(0,je.createElement)(je.Fragment,null,(0,je.createElement)(Je.RichText,{ref:T,identifier:"label",className:"wp-block-navigation-item__label",value:c,onChange:e=>n({label:e}),onMerge:o,onReplace:r,__unstableOnSplitAtEnd:()=>a((0,qe.createBlock)("core/navigation-link")),"aria-label":(0,Ye.__)("Navigation link text"),placeholder:B,withoutInteractiveFormatting:!0,allowedFormats:["core/bold","core/italic","core/image","core/strikethrough"],onClick:()=>{m||x(!0)}}),p&&(0,je.createElement)("span",{className:"wp-block-navigation-item__description"},p)),(_||b||N)&&(0,je.createElement)("div",{className:"wp-block-navigation-link__placeholder-text wp-block-navigation-link__label"},(0,je.createElement)(Ke.Tooltip,{text:j},(0,je.createElement)("span",{"aria-label":(0,Ye.__)("Navigation link text")},`${(0,Gn.decodeEntities)(c)} ${_||b?q:""}`.trim())))):(0,je.createElement)("div",{className:"wp-block-navigation-link__placeholder-text"},(0,je.createElement)(Ke.Tooltip,{text:j},(0,je.createElement)("span",null,U))),k&&(0,je.createElement)(Mg,{clientId:i,link:e,onClose:()=>x(!1),anchor:w,onRemove:function(){n({url:void 0,label:void 0,id:void 0,kind:void 0,type:void 0,opensInNewTab:!1}),x(!1)},onChange:t=>{Ng(t,n,e)}})),(0,je.createElement)("div",{...G})))},save:function(){return(0,je.createElement)(Je.InnerBlocks.Content,null)},example:{attributes:{label:(0,Ye._x)("Example Link","navigation link preview example"),url:"https://example.com"}},deprecated:[{isEligible(e){return e.nofollow},attributes:{label:{type:"string"},type:{type:"string"},nofollow:{type:"boolean"},description:{type:"string"},id:{type:"number"},opensInNewTab:{type:"boolean",default:!1},url:{type:"string"}},migrate({nofollow:e,...t}){return{rel:e?"nofollow":"",...t}},save(){return(0,je.createElement)(Je.InnerBlocks.Content,null)}}],transforms:ih},mh=()=>((0,yl.addFilter)("blocks.registerBlockType","core/navigation-link",rh),Qe({name:ch,metadata:sh,settings:uh}));var ph=(0,je.createElement)(We.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,je.createElement)(We.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"m13.955 20.748 8-17.5-.91-.416L19.597 6H13.5v1.5h5.411l-1.6 3.5H13.5v1.5h3.126l-1.6 3.5H13.5l.028 1.5h.812l-1.295 2.832.91.416ZM17.675 16l-.686 1.5h4.539L21.5 16h-3.825Zm2.286-5-.686 1.5H21.5V11h-1.54ZM2 12c0 3.58 2.42 5.5 6 5.5h.5V19l3-2.5-3-2.5v2H8c-2.48 0-4.5-1.52-4.5-4S5.52 7.5 8 7.5h3.5V6H8c-3.58 0-6 2.42-6 6Z"}));const dh=()=>(0,je.createElement)(Ke.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 12 12",fill:"none"},(0,je.createElement)(Ke.Path,{d:"M1.50002 4L6.00002 8L10.5 4",strokeWidth:"1.5"})),gh=["core/navigation-link","core/navigation-submenu","core/page-list"],hh={name:"core/navigation-link"};const _h={to:[{type:"block",blocks:["core/navigation-link"],isMatch:(e,t)=>0===t?.innerBlocks?.length,transform:e=>(0,qe.createBlock)("core/navigation-link",e)},{type:"block",blocks:["core/spacer"],isMatch:(e,t)=>0===t?.innerBlocks?.length,transform:()=>(0,qe.createBlock)("core/spacer")},{type:"block",blocks:["core/site-logo"],isMatch:(e,t)=>0===t?.innerBlocks?.length,transform:()=>(0,qe.createBlock)("core/site-logo")},{type:"block",blocks:["core/home-link"],isMatch:(e,t)=>0===t?.innerBlocks?.length,transform:()=>(0,qe.createBlock)("core/home-link")},{type:"block",blocks:["core/social-links"],isMatch:(e,t)=>0===t?.innerBlocks?.length,transform:()=>(0,qe.createBlock)("core/social-links")},{type:"block",blocks:["core/search"],isMatch:(e,t)=>0===t?.innerBlocks?.length,transform:()=>(0,qe.createBlock)("core/search")}]};var bh=_h;const fh={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/navigation-submenu",title:"Submenu",category:"design",parent:["core/navigation"],description:"Add a submenu to your navigation.",textdomain:"default",attributes:{label:{type:"string"},type:{type:"string"},description:{type:"string"},rel:{type:"string"},id:{type:"number"},opensInNewTab:{type:"boolean",default:!1},url:{type:"string"},title:{type:"string"},kind:{type:"string"},isTopLevelItem:{type:"boolean"}},usesContext:["textColor","customTextColor","backgroundColor","customBackgroundColor","overlayTextColor","customOverlayTextColor","overlayBackgroundColor","customOverlayBackgroundColor","fontSize","customFontSize","showSubmenuIcon","maxNestingLevel","openSubmenusOnClick","style"],supports:{reusable:!1,html:!1},editorStyle:"wp-block-navigation-submenu-editor",style:"wp-block-navigation-submenu"},{name:vh}=fh,yh={icon:({context:e})=>"list-view"===e?th:kg,__experimentalLabel:({label:e})=>e,edit:function({attributes:e,isSelected:t,setAttributes:n,mergeBlocks:a,onReplace:o,context:r,clientId:l}){const{label:i,type:s,url:c,description:u,rel:m,title:p}=e,{showSubmenuIcon:d,maxNestingLevel:g,openSubmenusOnClick:h}=r,{__unstableMarkNextChangeAsNotPersistent:_,replaceBlock:b}=(0,ut.useDispatch)(Je.store),[f,v]=(0,je.useState)(!1),[y,k]=(0,je.useState)(null),x=(0,je.useRef)(null),w=(e=>{const[t,n]=(0,je.useState)(!1);return(0,je.useEffect)((()=>{const{ownerDocument:t}=e.current;function a(e){r(e)}function o(){n(!1)}function r(t){e.current.contains(t.target)?n(!0):n(!1)}return t.addEventListener("dragstart",a),t.addEventListener("dragend",o),t.addEventListener("dragenter",r),()=>{t.removeEventListener("dragstart",a),t.removeEventListener("dragend",o),t.removeEventListener("dragenter",r)}}),[]),t})(x),E=(0,Ye.__)("Add text…"),C=(0,je.useRef)(),S=(0,ct.useResourcePermissions)("pages"),B=(0,ct.useResourcePermissions)("posts"),{parentCount:T,isParentOfSelectedBlock:N,isImmediateParentOfSelectedBlock:P,hasChildren:I,selectedBlockHasChildren:M,onlyDescendantIsEmptyLink:z}=(0,ut.useSelect)((e=>{const{hasSelectedInnerBlock:t,getSelectedBlockClientId:n,getBlockParentsByBlockName:a,getBlock:o,getBlockCount:r,getBlockOrder:i}=e(Je.store);let s;const c=i(n());if(1===c?.length){const e=o(c[0]);s="core/navigation-link"===e?.name&&!e?.attributes?.label}return{parentCount:a(l,"core/navigation-submenu").length,isParentOfSelectedBlock:t(l,!0),isImmediateParentOfSelectedBlock:t(l,!1),hasChildren:!!r(l),selectedBlockHasChildren:!!c?.length,onlyDescendantIsEmptyLink:s}}),[l]),R=(0,Tt.usePrevious)(I);(0,je.useEffect)((()=>{h||c||v(!0)}),[]),(0,je.useEffect)((()=>{t||v(!1)}),[t]),(0,je.useEffect)((()=>{f&&c&&((0,st.isURL)((0,st.prependHTTP)(i))&&/^.+\.[a-z]+/.test(i)?function(){C.current.focus();const{ownerDocument:e}=C.current,{defaultView:t}=e,n=t.getSelection(),a=e.createRange();a.selectNodeContents(C.current),n.removeAllRanges(),n.addRange(a)}():(0,dd.placeCaretAtHorizontalEdge)(C.current,!0))}),[c]);let H=!1;s&&"page"!==s?"post"===s&&(H=B.canCreate):H=S.canCreate;const{textColor:A,customTextColor:L,backgroundColor:D,customBackgroundColor:V}=bg(r,T>0),F=(0,Je.useBlockProps)({ref:(0,Tt.useMergeRefs)([k,x]),className:it()("wp-block-navigation-item",{"is-editing":t||N,"is-dragging-within":w,"has-link":!!c,"has-child":I,"has-text-color":!!A||!!L,[(0,Je.getColorClassName)("color",A)]:!!A,"has-background":!!D||V,[(0,Je.getColorClassName)("background-color",D)]:!!D,"open-on-click":h}),style:{color:!A&&L,backgroundColor:!D&&V},onKeyDown:function(e){un.isKeyboardEvent.primary(e,"k")&&v(!0)}}),$=bg(r,!0),G=T>=g?gh.filter((e=>"core/navigation-submenu"!==e)):gh,O=fg($),U=(0,Je.useInnerBlocksProps)(O,{allowedBlocks:G,defaultBlock:hh,directInsert:!0,__experimentalCaptureToolbars:!0,renderAppender:!!(t||P&&!M||I)&&Je.InnerBlocks.ButtonBlockAppender}),q=h?"button":"a";function j(){const t=(0,qe.createBlock)("core/navigation-link",e);b(l,t)}(0,je.useEffect)((()=>{!I&&R&&(_(),j())}),[I,R]);const W=!M||z;return(0,je.createElement)(je.Fragment,null,(0,je.createElement)(Je.BlockControls,null,(0,je.createElement)(Ke.ToolbarGroup,null,!h&&(0,je.createElement)(Ke.ToolbarButton,{name:"link",icon:mn,title:(0,Ye.__)("Link"),shortcut:un.displayShortcut.primary("k"),onClick:()=>v(!0)}),(0,je.createElement)(Ke.ToolbarButton,{name:"revert",icon:ph,title:(0,Ye.__)("Convert to Link"),onClick:j,className:"wp-block-navigation__submenu__revert",isDisabled:!W}))),(0,je.createElement)(Je.InspectorControls,null,(0,je.createElement)(Ke.PanelBody,{title:(0,Ye.__)("Settings")},(0,je.createElement)(Ke.TextControl,{__nextHasNoMarginBottom:!0,value:i||"",onChange:e=>{n({label:e})},label:(0,Ye.__)("Label"),autoComplete:"off"}),(0,je.createElement)(Ke.TextControl,{__nextHasNoMarginBottom:!0,value:c||"",onChange:e=>{n({url:e})},label:(0,Ye.__)("URL"),autoComplete:"off"}),(0,je.createElement)(Ke.TextareaControl,{__nextHasNoMarginBottom:!0,value:u||"",onChange:e=>{n({description:e})},label:(0,Ye.__)("Description"),help:(0,Ye.__)("The description will be displayed in the menu if the current theme supports it.")}),(0,je.createElement)(Ke.TextControl,{__nextHasNoMarginBottom:!0,value:p||"",onChange:e=>{n({title:e})},label:(0,Ye.__)("Title attribute"),autoComplete:"off",help:(0,Ye.__)("Additional information to help clarify the purpose of the link.")}),(0,je.createElement)(Ke.TextControl,{__nextHasNoMarginBottom:!0,value:m||"",onChange:e=>{n({rel:e})},label:(0,Ye.__)("Rel attribute"),autoComplete:"off",help:(0,Ye.__)("The relationship of the linked URL as space-separated link types.")}))),(0,je.createElement)("div",{...F},(0,je.createElement)(q,{className:"wp-block-navigation-item__content"},(0,je.createElement)(Je.RichText,{ref:C,identifier:"label",className:"wp-block-navigation-item__label",value:i,onChange:e=>n({label:e}),onMerge:a,onReplace:o,"aria-label":(0,Ye.__)("Navigation link text"),placeholder:E,withoutInteractiveFormatting:!0,allowedFormats:["core/bold","core/italic","core/image","core/strikethrough"],onClick:()=>{h||c||v(!0)}}),!h&&f&&(0,je.createElement)(Mg,{clientId:l,link:e,onClose:()=>v(!1),anchor:y,hasCreateSuggestion:H,onRemove:()=>{n({url:""}),(0,Td.speak)((0,Ye.__)("Link removed."),"assertive")},onChange:t=>{Ng(t,n,e)}})),(d||h)&&(0,je.createElement)("span",{className:"wp-block-navigation__submenu-icon"},(0,je.createElement)(dh,null)),(0,je.createElement)("div",{...U})))},save:function(){return(0,je.createElement)(Je.InnerBlocks.Content,null)},transforms:bh},kh=()=>Qe({name:vh,metadata:fh,settings:yh});var xh=(0,je.createElement)(We.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,je.createElement)(We.Path,{d:"M17.5 9V6a2 2 0 0 0-2-2h-7a2 2 0 0 0-2 2v3H8V6a.5.5 0 0 1 .5-.5h7a.5.5 0 0 1 .5.5v3h1.5Zm0 6.5V18a2 2 0 0 1-2 2h-7a2 2 0 0 1-2-2v-2.5H8V18a.5.5 0 0 0 .5.5h7a.5.5 0 0 0 .5-.5v-2.5h1.5ZM4 13h16v-1.5H4V13Z"}));var wh={from:[{type:"raw",schema:{"wp-block":{attributes:["data-block"]}},isMatch:e=>e.dataset&&"core/nextpage"===e.dataset.block,transform(){return(0,qe.createBlock)("core/nextpage",{})}}]};const Eh={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/nextpage",title:"Page Break",category:"design",description:"Separate your content into a multi-page experience.",keywords:["next page","pagination"],parent:["core/post-content"],textdomain:"default",supports:{customClassName:!1,className:!1,html:!1},editorStyle:"wp-block-nextpage-editor"},{name:Ch}=Eh,Sh={icon:xh,example:{},transforms:wh,edit:function(){return(0,je.createElement)("div",{...(0,Je.useBlockProps)()},(0,je.createElement)("span",null,(0,Ye.__)("Page break")))},save:function(){return(0,je.createElement)(je.RawHTML,null,"\x3c!--nextpage--\x3e")}},Bh=()=>Qe({name:Ch,metadata:Eh,settings:Sh});var Th=({attributes:e,clientId:t})=>{const n=(0,ut.useSelect)((t=>t(Je.store).__experimentalGetParsedPattern(e.slug)),[e.slug]),a=(0,ut.useSelect)((e=>e(ct.store).getCurrentTheme().stylesheet)),{replaceBlocks:o,__unstableMarkNextChangeAsNotPersistent:r}=(0,ut.useDispatch)(Je.store),{setBlockEditingMode:l}=(0,ut.useDispatch)(Je.store),{getBlockRootClientId:i,getBlockEditingMode:s}=(0,ut.useSelect)(Je.store);(0,je.useEffect)((()=>{n?.blocks&&window.queueMicrotask((()=>{const e=i(t),c=n.blocks.map((e=>(0,qe.cloneBlock)(function(e){return e.innerBlocks.find((e=>"core/template-part"===e.name))&&(e.innerBlocks=e.innerBlocks.map((e=>("core/template-part"===e.name&&void 0===e.attributes.theme&&(e.attributes.theme=a),e)))),"core/template-part"===e.name&&void 0===e.attributes.theme&&(e.attributes.theme=a),e}(e)))),u=s(e);r(),l(e,"default"),r(),o(t,c),r(),l(e,u)}))}),[t,n?.blocks,r,o,s,l,i]);const c=(0,Je.useBlockProps)();return(0,je.createElement)("div",{...c})};const Nh={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/pattern",title:"Pattern placeholder",category:"theme",description:"Show a block pattern.",supports:{html:!1,inserter:!1},textdomain:"default",attributes:{slug:{type:"string"}}},{name:Ph}=Nh,Ih={edit:Th},Mh=()=>Qe({name:Ph,metadata:Nh,settings:Ih});var zh=(0,je.createElement)(We.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,je.createElement)(We.Path,{d:"M7 13.8h6v-1.5H7v1.5zM18 16V4c0-1.1-.9-2-2-2H6c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h10c1.1 0 2-.9 2-2zM5.5 16V4c0-.3.2-.5.5-.5h10c.3 0 .5.2.5.5v12c0 .3-.2.5-.5.5H6c-.3 0-.5-.2-.5-.5zM7 10.5h8V9H7v1.5zm0-3.3h8V5.8H7v1.4zM20.2 6v13c0 .7-.6 1.2-1.2 1.2H8v1.5h11c1.5 0 2.7-1.2 2.7-2.8V6h-1.5z"}));function Rh(e,t){for(const n of e){if(n.attributes.id===t)return n;if(n.innerBlocks&&n.innerBlocks.length){const e=Rh(n.innerBlocks,t);if(e)return e}}return null}function Hh(e=[],t=null){let n=function(e=[]){const t={},n=[];return e.forEach((({id:e,title:a,link:o,type:r,parent:l})=>{var i;const s=null!==(i=t[e]?.innerBlocks)&&void 0!==i?i:[];t[e]=(0,qe.createBlock)("core/navigation-link",{id:e,label:a.rendered,url:o,type:r,kind:"post-type"},s),l?(t[l]||(t[l]={innerBlocks:[]}),t[l].innerBlocks.push(t[e])):n.push(t[e])})),n}(e);if(t){const e=Rh(n,t);e&&e.innerBlocks&&(n=e.innerBlocks)}const a=e=>{e.forEach(((e,t,n)=>{const{attributes:o,innerBlocks:r}=e;if(0!==r.length){a(r);const e=(0,qe.createBlock)("core/navigation-submenu",o,r);n[t]=e}}))};return a(n),n}function Ah({clientId:e,pages:t,parentClientId:n,parentPageID:a}){const{replaceBlock:o,selectBlock:r}=(0,ut.useDispatch)(Je.store);return()=>{const l=Hh(t,a);o(e,l),r(n)}}const Lh=(0,Ye.__)("This page list is synced with the published pages on your site. Detach the page list to add, delete, or reorder pages yourself.");function Dh({onClick:e,onClose:t,disabled:n}){return(0,je.createElement)(Ke.Modal,{onRequestClose:t,title:(0,Ye.__)("Edit Page List"),className:"wp-block-page-list-modal",aria:{describedby:"wp-block-page-list-modal__description"}},(0,je.createElement)("p",{id:"wp-block-page-list-modal__description"},Lh),(0,je.createElement)("div",{className:"wp-block-page-list-modal-buttons"},(0,je.createElement)(Ke.Button,{variant:"tertiary",onClick:t},(0,Ye.__)("Cancel")),(0,je.createElement)(Ke.Button,{variant:"primary",disabled:n,onClick:e},(0,Ye.__)("Detach"))))}const Vh=()=>{};function Fh({blockProps:e,innerBlocksProps:t,hasResolvedPages:n,blockList:a,pages:o,parentPageID:r}){if(!n)return(0,je.createElement)("div",{...e},(0,je.createElement)("div",{className:"wp-block-page-list__loading-indicator-container"},(0,je.createElement)(Ke.Spinner,{className:"wp-block-page-list__loading-indicator"})));if(null===o)return(0,je.createElement)("div",{...e},(0,je.createElement)(Ke.Notice,{status:"warning",isDismissible:!1},(0,Ye.__)("Page List: Cannot retrieve Pages.")));if(0===o.length)return(0,je.createElement)("div",{...e},(0,je.createElement)(Ke.Notice,{status:"info",isDismissible:!1},(0,Ye.__)("Page List: Cannot retrieve Pages.")));if(0===a.length){const t=o.find((e=>e.id===r));return t?.title?.rendered?(0,je.createElement)("div",{...e},(0,je.createElement)(Je.Warning,null,(0,Ye.sprintf)((0,Ye.__)('Page List: "%s" page has no children.'),t.title.rendered))):(0,je.createElement)("div",{...e},(0,je.createElement)(Ke.Notice,{status:"warning",isDismissible:!1},(0,Ye.__)("Page List: Cannot retrieve Pages.")))}return o.length>0?(0,je.createElement)("ul",{...t}):void 0}const $h={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/page-list",title:"Page List",category:"widgets",description:"Display a list of all pages.",keywords:["menu","navigation"],textdomain:"default",attributes:{parentPageID:{type:"integer",default:0},isNested:{type:"boolean",default:!1}},usesContext:["textColor","customTextColor","backgroundColor","customBackgroundColor","overlayTextColor","customOverlayTextColor","overlayBackgroundColor","customOverlayBackgroundColor","fontSize","customFontSize","showSubmenuIcon","style","openSubmenusOnClick"],supports:{reusable:!1,html:!1,typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}}},editorStyle:"wp-block-page-list-editor",style:"wp-block-page-list"},{name:Gh}=$h,Oh={icon:zh,example:{},edit:function({context:e,clientId:t,attributes:n,setAttributes:a}){const{parentPageID:o}=n,[r,l]=(0,je.useState)(!1),i=(0,je.useCallback)((()=>l(!0)),[]),{records:s,hasResolved:c}=(0,ct.useEntityRecords)("postType","page",{per_page:100,_fields:["id","link","menu_order","parent","title","type"],orderby:"menu_order",order:"asc"}),u="showSubmenuIcon"in e&&s?.length>0&&s?.length<=100,m=(0,je.useMemo)((()=>{if(null===s)return new Map;const e=s.sort(((e,t)=>e.menu_order===t.menu_order?e.title.rendered.localeCompare(t.title.rendered):e.menu_order-t.menu_order));return e.reduce(((e,t)=>{const{parent:n}=t;return e.has(n)?e.get(n).push(t):e.set(n,[t]),e}),new Map)}),[s]),p=(0,Je.useBlockProps)({className:it()("wp-block-page-list",{"has-text-color":!!e.textColor,[(0,Je.getColorClassName)("color",e.textColor)]:!!e.textColor,"has-background":!!e.backgroundColor,[(0,Je.getColorClassName)("background-color",e.backgroundColor)]:!!e.backgroundColor}),style:{...e.style?.color}}),d=(0,je.useMemo)((function e(t=0,n=0){const a=m.get(t);return a?.length?a.reduce(((t,a)=>{const o=m.has(a.id),r={value:a.id,label:"— ".repeat(n)+a.title.rendered,rawName:a.title.rendered};return t.push(r),o&&t.push(...e(a.id,n+1)),t}),[]):[]}),[m]),g=(0,je.useMemo)((function e(t=o){const n=m.get(t);return n?.length?n.reduce(((t,n)=>{const a=m.has(n.id),o={id:n.id,label:""!==n.title?.rendered?.trim()?n.title?.rendered:(0,Ye.__)("(no title)"),title:n.title?.rendered,link:n.url,hasChildren:a};let r=null;const l=e(n.id);return r=(0,qe.createBlock)("core/page-list-item",o,l),t.push(r),t}),[]):[]}),[m,o]),{isNested:h,hasSelectedChild:_,parentClientId:b,hasDraggedChild:f,isChildOfNavigation:v}=(0,ut.useSelect)((e=>{const{getBlockParentsByBlockName:n,hasSelectedInnerBlock:a,hasDraggedInnerBlock:o}=e(Je.store),r=n(t,"core/navigation-submenu",!0),l=n(t,"core/navigation",!0);return{isNested:r.length>0,isChildOfNavigation:l.length>0,hasSelectedChild:a(t,!0),hasDraggedChild:o(t,!0),parentClientId:l[0]}}),[t]),y=Ah({clientId:t,pages:s,parentClientId:b,parentPageID:o}),k=(0,Je.useInnerBlocksProps)(p,{allowedBlocks:["core/page-list-item"],renderAppender:!1,__unstableDisableDropZone:!0,templateLock:!v&&"all",onInput:Vh,onChange:Vh,value:g}),{selectBlock:x}=(0,ut.useDispatch)(Je.store);return(0,je.useEffect)((()=>{(_||f)&&(i(),x(b))}),[_,f,b,x,i]),(0,je.useEffect)((()=>{a({isNested:h})}),[h,a]),(0,je.createElement)(je.Fragment,null,(0,je.createElement)(Je.InspectorControls,null,d.length>0&&(0,je.createElement)(Ke.PanelBody,null,(0,je.createElement)(Ke.ComboboxControl,{__next40pxDefaultSize:!0,className:"editor-page-attributes__parent",label:(0,Ye.__)("Parent"),value:o,options:d,onChange:e=>a({parentPageID:null!=e?e:0}),help:(0,Ye.__)("Choose a page to show only its subpages.")})),u&&(0,je.createElement)(Ke.PanelBody,{title:(0,Ye.__)("Edit this menu")},(0,je.createElement)("p",null,Lh),(0,je.createElement)(Ke.Button,{variant:"primary",disabled:!c,onClick:y},(0,Ye.__)("Edit")))),u&&(0,je.createElement)(je.Fragment,null,(0,je.createElement)(Je.BlockControls,{group:"other"},(0,je.createElement)(Ke.ToolbarButton,{title:(0,Ye.__)("Edit"),onClick:i},(0,Ye.__)("Edit"))),r&&(0,je.createElement)(Dh,{onClick:y,onClose:()=>l(!1),disabled:!c})),(0,je.createElement)(Fh,{blockProps:p,innerBlocksProps:k,hasResolvedPages:c,blockList:g,pages:s,parentPageID:o}))}},Uh=()=>Qe({name:Gh,metadata:$h,settings:Oh}),qh=()=>(0,je.createElement)(Ke.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 12 12",fill:"none"},(0,je.createElement)(Ke.Path,{d:"M1.50002 4L6.00002 8L10.5 4",strokeWidth:"1.5"}));const jh={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/page-list-item",title:"Page List Item",category:"widgets",parent:["core/page-list"],description:"Displays a page inside a list of all pages.",keywords:["page","menu","navigation"],textdomain:"default",attributes:{id:{type:"number"},label:{type:"string"},title:{type:"string"},link:{type:"string"},hasChildren:{type:"boolean"}},usesContext:["textColor","customTextColor","backgroundColor","customBackgroundColor","overlayTextColor","customOverlayTextColor","overlayBackgroundColor","customOverlayBackgroundColor","fontSize","customFontSize","showSubmenuIcon","style","openSubmenusOnClick"],supports:{reusable:!1,html:!1,lock:!1,inserter:!1,__experimentalToolbar:!1},editorStyle:"wp-block-page-list-editor",style:"wp-block-page-list"},{name:Wh}=jh,Zh={__experimentalLabel:({label:e})=>e,icon:th,example:{},edit:function({context:e,attributes:t}){const{id:n,label:a,link:o,hasChildren:r,title:l}=t,i="showSubmenuIcon"in e,s=(0,ut.useSelect)((e=>{if(!e(ct.store).canUser("read","settings"))return;const t=e(ct.store).getEntityRecord("root","site");return"page"===t?.show_on_front&&t?.page_on_front}),[]),c=fg(bg(e,!0)),u=(0,Je.useBlockProps)(c,{className:"wp-block-pages-list__item"}),m=(0,Je.useInnerBlocksProps)(u);return(0,je.createElement)("li",{key:n,className:it()("wp-block-pages-list__item",{"has-child":r,"wp-block-navigation-item":i,"open-on-click":e.openSubmenusOnClick,"open-on-hover-click":!e.openSubmenusOnClick&&e.showSubmenuIcon,"menu-item-home":n===s})},r&&e.openSubmenusOnClick?(0,je.createElement)(je.Fragment,null,(0,je.createElement)("button",{className:"wp-block-navigation-item__content wp-block-navigation-submenu__toggle","aria-expanded":"false"},(0,Gn.decodeEntities)(a)),(0,je.createElement)("span",{className:"wp-block-page-list__submenu-icon wp-block-navigation__submenu-icon"},(0,je.createElement)(qh,null))):(0,je.createElement)("a",{className:it()("wp-block-pages-list__item__link",{"wp-block-navigation-item__content":i}),href:o},(0,Gn.decodeEntities)(l)),r&&(0,je.createElement)(je.Fragment,null,!e.openSubmenusOnClick&&e.showSubmenuIcon&&(0,je.createElement)("button",{className:"wp-block-navigation-item__content wp-block-navigation-submenu__toggle wp-block-page-list__submenu-icon wp-block-navigation__submenu-icon","aria-expanded":"false"},(0,je.createElement)(qh,null)),(0,je.createElement)("ul",{...m})))}},Qh=()=>Qe({name:Wh,metadata:jh,settings:Zh});var Kh=(0,je.createElement)(We.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,je.createElement)(We.Path,{d:"m9.99609 14v-.2251l.00391.0001v6.225h1.5v-14.5h2.5v14.5h1.5v-14.5h3v-1.5h-8.50391c-2.76142 0-5 2.23858-5 5 0 2.7614 2.23858 5 5 5z"}));const Yh={className:!1},Jh={align:{type:"string"},content:{type:"string",source:"html",selector:"p",default:""},dropCap:{type:"boolean",default:!1},placeholder:{type:"string"},textColor:{type:"string"},backgroundColor:{type:"string"},fontSize:{type:"string"},direction:{type:"string",enum:["ltr","rtl"]},style:{type:"object"}},Xh=e=>{if(!e.customTextColor&&!e.customBackgroundColor&&!e.customFontSize)return e;const t={};(e.customTextColor||e.customBackgroundColor)&&(t.color={}),e.customTextColor&&(t.color.text=e.customTextColor),e.customBackgroundColor&&(t.color.background=e.customBackgroundColor),e.customFontSize&&(t.typography={fontSize:e.customFontSize});const{customTextColor:n,customBackgroundColor:a,customFontSize:o,...r}=e;return{...r,style:t}},{style:e_,...t_}=Jh,n_=[{supports:Yh,attributes:{...t_,customTextColor:{type:"string"},customBackgroundColor:{type:"string"},customFontSize:{type:"number"}},save({attributes:e}){const{align:t,content:n,dropCap:a,direction:o}=e,r=it()({"has-drop-cap":t!==((0,Ye.isRTL)()?"left":"right")&&"center"!==t&&a,[`has-text-align-${t}`]:t});return(0,je.createElement)("p",{...Je.useBlockProps.save({className:r,dir:o})},(0,je.createElement)(Je.RichText.Content,{value:n}))}},{supports:Yh,attributes:{...t_,customTextColor:{type:"string"},customBackgroundColor:{type:"string"},customFontSize:{type:"number"}},migrate:Xh,save({attributes:e}){const{align:t,content:n,dropCap:a,backgroundColor:o,textColor:r,customBackgroundColor:l,customTextColor:i,fontSize:s,customFontSize:c,direction:u}=e,m=(0,Je.getColorClassName)("color",r),p=(0,Je.getColorClassName)("background-color",o),d=(0,Je.getFontSizeClass)(s),g=it()({"has-text-color":r||i,"has-background":o||l,"has-drop-cap":a,[`has-text-align-${t}`]:t,[d]:d,[m]:m,[p]:p}),h={backgroundColor:p?void 0:l,color:m?void 0:i,fontSize:d?void 0:c};return(0,je.createElement)(Je.RichText.Content,{tagName:"p",style:h,className:g||void 0,value:n,dir:u})}},{supports:Yh,attributes:{...t_,customTextColor:{type:"string"},customBackgroundColor:{type:"string"},customFontSize:{type:"number"}},migrate:Xh,save({attributes:e}){const{align:t,content:n,dropCap:a,backgroundColor:o,textColor:r,customBackgroundColor:l,customTextColor:i,fontSize:s,customFontSize:c,direction:u}=e,m=(0,Je.getColorClassName)("color",r),p=(0,Je.getColorClassName)("background-color",o),d=(0,Je.getFontSizeClass)(s),g=it()({"has-text-color":r||i,"has-background":o||l,"has-drop-cap":a,[d]:d,[m]:m,[p]:p}),h={backgroundColor:p?void 0:l,color:m?void 0:i,fontSize:d?void 0:c,textAlign:t};return(0,je.createElement)(Je.RichText.Content,{tagName:"p",style:h,className:g||void 0,value:n,dir:u})}},{supports:Yh,attributes:{...t_,customTextColor:{type:"string"},customBackgroundColor:{type:"string"},customFontSize:{type:"number"},width:{type:"string"}},migrate:Xh,save({attributes:e}){const{width:t,align:n,content:a,dropCap:o,backgroundColor:r,textColor:l,customBackgroundColor:i,customTextColor:s,fontSize:c,customFontSize:u}=e,m=(0,Je.getColorClassName)("color",l),p=(0,Je.getColorClassName)("background-color",r),d=c&&`is-${c}-text`,g=it()({[`align${t}`]:t,"has-background":r||i,"has-drop-cap":o,[d]:d,[m]:m,[p]:p}),h={backgroundColor:p?void 0:i,color:m?void 0:s,fontSize:d?void 0:u,textAlign:n};return(0,je.createElement)(Je.RichText.Content,{tagName:"p",style:h,className:g||void 0,value:a})}},{supports:Yh,attributes:{...t_,fontSize:{type:"number"}},save({attributes:e}){const{width:t,align:n,content:a,dropCap:o,backgroundColor:r,textColor:l,fontSize:i}=e,s=it()({[`align${t}`]:t,"has-background":r,"has-drop-cap":o}),c={backgroundColor:r,color:l,fontSize:i,textAlign:n};return(0,je.createElement)("p",{style:c,className:s||void 0},a)},migrate(e){return Xh({...e,customFontSize:Number.isFinite(e.fontSize)?e.fontSize:void 0,customTextColor:e.textColor&&"#"===e.textColor[0]?e.textColor:void 0,customBackgroundColor:e.backgroundColor&&"#"===e.backgroundColor[0]?e.backgroundColor:void 0})}},{supports:Yh,attributes:{...Jh,content:{type:"string",source:"html",default:""}},save({attributes:e}){return(0,je.createElement)(je.RawHTML,null,e.content)},migrate(e){return e}}];var a_=n_;var o_=(0,je.createElement)(We.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},(0,je.createElement)(We.Path,{d:"M5.52 2h7.43c.55 0 1 .45 1 1s-.45 1-1 1h-1v13c0 .55-.45 1-1 1s-1-.45-1-1V5c0-.55-.45-1-1-1s-1 .45-1 1v12c0 .55-.45 1-1 1s-1-.45-1-1v-5.96h-.43C3.02 11.04 1 9.02 1 6.52S3.02 2 5.52 2zM14 14l5-4-5-4v8z"}));function r_(e){const{batch:t}=(0,ut.useRegistry)(),{moveBlocksToPosition:n,replaceInnerBlocks:a,duplicateBlocks:o,insertBlock:r}=(0,ut.useDispatch)(Je.store),{getBlockRootClientId:l,getBlockIndex:i,getBlockOrder:s,getBlockName:c,getBlock:u,getNextBlockClientId:m,canInsertBlockType:p}=(0,ut.useSelect)(Je.store),d=(0,je.useRef)(e);return d.current=e,(0,Tt.useRefEffect)((e=>{function g(e){if(e.defaultPrevented)return;if(e.keyCode!==un.ENTER)return;const{content:g,clientId:h}=d.current;if(g.length)return;const _=l(h);if(!(0,qe.hasBlockSupport)(c(_),"__experimentalOnEnter",!1))return;const b=s(_),f=b.indexOf(h);if(f===b.length-1){let t=_;for(;!p(c(h),l(t));)t=l(t);return void("string"==typeof t&&(e.preventDefault(),n([h],_,l(t),i(t)+1)))}const v=(0,qe.getDefaultBlockName)();if(!p(v,l(_)))return;e.preventDefault();const y=u(_);t((()=>{o([_]);const e=i(_);a(_,y.innerBlocks.slice(0,f)),a(m(_),y.innerBlocks.slice(f+1)),r((0,qe.createBlock)(v),e+1,l(_),!0)}))}return e.addEventListener("keydown",g),()=>{e.removeEventListener("keydown",g)}}),[])}function l_({direction:e,setDirection:t}){return(0,Ye.isRTL)()&&(0,je.createElement)(Ke.ToolbarButton,{icon:o_,title:(0,Ye._x)("Left to right","editor button"),isActive:"ltr"===e,onClick:()=>{t("ltr"===e?void 0:"ltr")}})}function i_(e){return e===((0,Ye.isRTL)()?"left":"right")||"center"===e}var s_=function({attributes:e,mergeBlocks:t,onReplace:n,onRemove:a,setAttributes:o,clientId:r}){const{align:l,content:i,direction:s,dropCap:c,placeholder:u}=e,m=(0,Je.useSetting)("typography.dropCap"),p=(0,Je.useBlockProps)({ref:r_({clientId:r,content:i}),className:it()({"has-drop-cap":!i_(l)&&c,[`has-text-align-${l}`]:l}),style:{direction:s}});let d;return d=i_(l)?(0,Ye.__)("Not available for aligned text."):c?(0,Ye.__)("Showing large initial letter."):(0,Ye.__)("Toggle to show a large initial letter."),(0,je.createElement)(je.Fragment,null,(0,je.createElement)(Je.BlockControls,{group:"block"},(0,je.createElement)(Je.AlignmentControl,{value:l,onChange:e=>o({align:e,dropCap:!i_(e)&&c})}),(0,je.createElement)(l_,{direction:s,setDirection:e=>o({direction:e})})),m&&(0,je.createElement)(Je.InspectorControls,{group:"typography"},(0,je.createElement)(Ke.__experimentalToolsPanelItem,{hasValue:()=>!!c,label:(0,Ye.__)("Drop cap"),onDeselect:()=>o({dropCap:void 0}),resetAllFilter:()=>({dropCap:void 0}),panelId:r},(0,je.createElement)(Ke.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,Ye.__)("Drop cap"),checked:!!c,onChange:()=>o({dropCap:!c}),help:d,disabled:!!i_(l)}))),(0,je.createElement)(Je.RichText,{identifier:"content",tagName:"p",...p,value:i,onChange:e=>o({content:e}),onSplit:(t,n)=>{let a;(n||t)&&(a={...e,content:t});const o=(0,qe.createBlock)("core/paragraph",a);return n&&(o.clientId=r),o},onMerge:t,onReplace:n,onRemove:a,"aria-label":i?(0,Ye.__)("Block: Paragraph"):(0,Ye.__)("Empty block; start writing or type forward slash to choose a block"),"data-empty":!i,placeholder:u||(0,Ye.__)("Type / to choose a block"),"data-custom-placeholder":!!u||void 0,__unstableEmbedURLOnPaste:!0,__unstableAllowPrefixTransformations:!0}))};const{name:c_}={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/paragraph",title:"Paragraph",category:"text",description:"Start with the basic building block of all narrative.",keywords:["text"],textdomain:"default",usesContext:["postId"],attributes:{align:{type:"string"},content:{type:"string",source:"html",selector:"p",default:"",__experimentalRole:"content"},dropCap:{type:"boolean",default:!1},placeholder:{type:"string"},direction:{type:"string",enum:["ltr","rtl"]}},supports:{anchor:!0,className:!1,color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0}},__experimentalConnections:!0,spacing:{margin:!0,padding:!0,__experimentalDefaultControls:{margin:!1,padding:!1}},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalTextDecoration:!0,__experimentalFontStyle:!0,__experimentalFontWeight:!0,__experimentalLetterSpacing:!0,__experimentalTextTransform:!0,__experimentalWritingMode:!0,__experimentalDefaultControls:{fontSize:!0}},__experimentalSelector:"p",__unstablePasteTextInline:!0},editorStyle:"wp-block-paragraph-editor",style:"wp-block-paragraph"},u_={from:[{type:"raw",priority:20,selector:"p",schema:({phrasingContentSchema:e,isPaste:t})=>({p:{children:e,attributes:t?[]:["style","id"]}}),transform(e){const t=(0,qe.getBlockAttributes)(c_,e.outerHTML),{textAlign:n}=e.style||{};return"left"!==n&&"center"!==n&&"right"!==n||(t.align=n),(0,qe.createBlock)(c_,t)}}]};var m_=u_;const p_={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/paragraph",title:"Paragraph",category:"text",description:"Start with the basic building block of all narrative.",keywords:["text"],textdomain:"default",usesContext:["postId"],attributes:{align:{type:"string"},content:{type:"string",source:"html",selector:"p",default:"",__experimentalRole:"content"},dropCap:{type:"boolean",default:!1},placeholder:{type:"string"},direction:{type:"string",enum:["ltr","rtl"]}},supports:{anchor:!0,className:!1,color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0}},__experimentalConnections:!0,spacing:{margin:!0,padding:!0,__experimentalDefaultControls:{margin:!1,padding:!1}},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalTextDecoration:!0,__experimentalFontStyle:!0,__experimentalFontWeight:!0,__experimentalLetterSpacing:!0,__experimentalTextTransform:!0,__experimentalWritingMode:!0,__experimentalDefaultControls:{fontSize:!0}},__experimentalSelector:"p",__unstablePasteTextInline:!0},editorStyle:"wp-block-paragraph-editor",style:"wp-block-paragraph"},{name:d_}=p_,g_={icon:Kh,example:{attributes:{content:(0,Ye.__)("In a village of La Mancha, the name of which I have no desire to call to mind, there lived not long since one of those gentlemen that keep a lance in the lance-rack, an old buckler, a lean hack, and a greyhound for coursing.")}},__experimentalLabel(e,{context:t}){if("accessibility"===t){const{content:t}=e;return t&&0!==t.length?t:(0,Ye.__)("Empty")}},transforms:m_,deprecated:a_,merge(e,t){return{content:(e.content||"")+(t.content||"")}},edit:s_,save:function({attributes:e}){const{align:t,content:n,dropCap:a,direction:o}=e,r=it()({"has-drop-cap":t!==((0,Ye.isRTL)()?"left":"right")&&"center"!==t&&a,[`has-text-align-${t}`]:t});return(0,je.createElement)("p",{...Je.useBlockProps.save({className:r,dir:o})},(0,je.createElement)(Je.RichText.Content,{value:n}))}},h_=()=>Qe({name:d_,metadata:p_,settings:g_});var __=(0,je.createElement)(We.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,je.createElement)(We.Path,{d:"M10 4.5a1 1 0 11-2 0 1 1 0 012 0zm1.5 0a2.5 2.5 0 11-5 0 2.5 2.5 0 015 0zm2.25 7.5v-1A2.75 2.75 0 0011 8.25H7A2.75 2.75 0 004.25 11v1h1.5v-1c0-.69.56-1.25 1.25-1.25h4c.69 0 1.25.56 1.25 1.25v1h1.5zM4 20h9v-1.5H4V20zm16-4H4v-1.5h16V16z",fillRule:"evenodd",clipRule:"evenodd"}));const b_={who:"authors",per_page:100};var f_=function({isSelected:e,context:{postType:t,postId:n,queryId:a},attributes:o,setAttributes:r}){const l=Number.isFinite(a),{authorId:i,authorDetails:s,authors:c}=(0,ut.useSelect)((e=>{const{getEditedEntityRecord:a,getUser:o,getUsers:r}=e(ct.store),l=a("postType",t,n)?.author;return{authorId:l,authorDetails:l?o(l):null,authors:r(b_)}}),[t,n]),{editEntityRecord:u}=(0,ut.useDispatch)(ct.store),{textAlign:m,showAvatar:p,showBio:d,byline:g,isLink:h,linkTarget:_}=o,b=[],f=s?.name||(0,Ye.__)("Post Author");s?.avatar_urls&&Object.keys(s.avatar_urls).forEach((e=>{b.push({value:e,label:`${e} x ${e}`})}));const v=(0,Je.useBlockProps)({className:it()({[`has-text-align-${m}`]:m})}),y=c?.length?c.map((({id:e,name:t})=>({value:e,label:t}))):[],k=e=>{u("postType",t,n,{author:e})},x=y.length>=25,w=!!n&&!l&&y.length>0;return(0,je.createElement)(je.Fragment,null,(0,je.createElement)(Je.InspectorControls,null,(0,je.createElement)(Ke.PanelBody,{title:(0,Ye.__)("Settings")},w&&(x&&(0,je.createElement)(Ke.ComboboxControl,{__nextHasNoMarginBottom:!0,label:(0,Ye.__)("Author"),options:y,value:i,onChange:k,allowReset:!1})||(0,je.createElement)(Ke.SelectControl,{__nextHasNoMarginBottom:!0,label:(0,Ye.__)("Author"),value:i,options:y,onChange:k})),(0,je.createElement)(Ke.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,Ye.__)("Show avatar"),checked:p,onChange:()=>r({showAvatar:!p})}),p&&(0,je.createElement)(Ke.SelectControl,{__nextHasNoMarginBottom:!0,label:(0,Ye.__)("Avatar size"),value:o.avatarSize,options:b,onChange:e=>{r({avatarSize:Number(e)})}}),(0,je.createElement)(Ke.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,Ye.__)("Show bio"),checked:d,onChange:()=>r({showBio:!d})}),(0,je.createElement)(Ke.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,Ye.__)("Link author name to author page"),checked:h,onChange:()=>r({isLink:!h})}),h&&(0,je.createElement)(Ke.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,Ye.__)("Open in new tab"),onChange:e=>r({linkTarget:e?"_blank":"_self"}),checked:"_blank"===_}))),(0,je.createElement)(Je.BlockControls,{group:"block"},(0,je.createElement)(Je.AlignmentControl,{value:m,onChange:e=>{r({textAlign:e})}})),(0,je.createElement)("div",{...v},p&&s?.avatar_urls&&(0,je.createElement)("div",{className:"wp-block-post-author__avatar"},(0,je.createElement)("img",{width:o.avatarSize,src:s.avatar_urls[o.avatarSize],alt:s.name})),(0,je.createElement)("div",{className:"wp-block-post-author__content"},(!Je.RichText.isEmpty(g)||e)&&(0,je.createElement)(Je.RichText,{className:"wp-block-post-author__byline",multiline:!1,"aria-label":(0,Ye.__)("Post author byline text"),placeholder:(0,Ye.__)("Write byline…"),value:g,onChange:e=>r({byline:e})}),(0,je.createElement)("p",{className:"wp-block-post-author__name"},h?(0,je.createElement)("a",{href:"#post-author-pseudo-link",onClick:e=>e.preventDefault()},f):f),d&&(0,je.createElement)("p",{className:"wp-block-post-author__bio",dangerouslySetInnerHTML:{__html:s?.description}}))))};const v_={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/post-author",title:"Author",category:"theme",description:"Display post author details such as name, avatar, and bio.",textdomain:"default",attributes:{textAlign:{type:"string"},avatarSize:{type:"number",default:48},showAvatar:{type:"boolean",default:!0},showBio:{type:"boolean"},byline:{type:"string"},isLink:{type:"boolean",default:!1},linkTarget:{type:"string",default:"_self"}},usesContext:["postType","postId","queryId"],supports:{html:!1,spacing:{margin:!0,padding:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},color:{gradients:!0,link:!0,__experimentalDuotone:".wp-block-post-author__avatar img",__experimentalDefaultControls:{background:!0,text:!0}}},style:"wp-block-post-author"},{name:y_}=v_,k_={icon:__,edit:f_},x_=()=>Qe({name:y_,metadata:v_,settings:k_});var w_=function({context:{postType:e,postId:t},attributes:{textAlign:n,isLink:a,linkTarget:o},setAttributes:r}){const{authorName:l}=(0,ut.useSelect)((n=>{const{getEditedEntityRecord:a,getUser:o}=n(ct.store),r=a("postType",e,t)?.author;return{authorName:r?o(r):null}}),[e,t]),i=(0,Je.useBlockProps)({className:it()({[`has-text-align-${n}`]:n})}),s=l?.name||(0,Ye.__)("Author Name"),c=a?(0,je.createElement)("a",{href:"#author-pseudo-link",onClick:e=>e.preventDefault(),className:"wp-block-post-author-name__link"},s):s;return(0,je.createElement)(je.Fragment,null,(0,je.createElement)(Je.BlockControls,{group:"block"},(0,je.createElement)(Je.AlignmentControl,{value:n,onChange:e=>{r({textAlign:e})}})),(0,je.createElement)(Je.InspectorControls,null,(0,je.createElement)(Ke.PanelBody,{title:(0,Ye.__)("Settings")},(0,je.createElement)(Ke.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,Ye.__)("Link to author archive"),onChange:()=>r({isLink:!a}),checked:a}),a&&(0,je.createElement)(Ke.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,Ye.__)("Open in new tab"),onChange:e=>r({linkTarget:e?"_blank":"_self"}),checked:"_blank"===o}))),(0,je.createElement)("div",{...i}," ",c," "))};var E_={from:[{type:"block",blocks:["core/post-author"],transform:({textAlign:e})=>(0,qe.createBlock)("core/post-author-name",{textAlign:e})}],to:[{type:"block",blocks:["core/post-author"],transform:({textAlign:e})=>(0,qe.createBlock)("core/post-author",{textAlign:e})}]};const C_={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/post-author-name",title:"Author Name",category:"theme",description:"The author name.",textdomain:"default",attributes:{textAlign:{type:"string"},isLink:{type:"boolean",default:!1},linkTarget:{type:"string",default:"_self"}},usesContext:["postType","postId"],supports:{html:!1,spacing:{margin:!0,padding:!0},color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0,link:!0}},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}}}},{name:S_}=C_,B_={icon:__,transforms:E_,edit:w_},T_=()=>Qe({name:S_,metadata:C_,settings:B_});var N_=function({context:{postType:e,postId:t},attributes:{textAlign:n},setAttributes:a}){const{authorDetails:o}=(0,ut.useSelect)((n=>{const{getEditedEntityRecord:a,getUser:o}=n(ct.store),r=a("postType",e,t)?.author;return{authorDetails:r?o(r):null}}),[e,t]),r=(0,Je.useBlockProps)({className:it()({[`has-text-align-${n}`]:n})}),l=o?.description||(0,Ye.__)("Author Biography");return(0,je.createElement)(je.Fragment,null,(0,je.createElement)(Je.BlockControls,{group:"block"},(0,je.createElement)(Je.AlignmentControl,{value:n,onChange:e=>{a({textAlign:e})}})),(0,je.createElement)("div",{...r,dangerouslySetInnerHTML:{__html:l}}))};const P_={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/post-author-biography",title:"Author Biography",category:"theme",description:"The author biography.",textdomain:"default",attributes:{textAlign:{type:"string"}},usesContext:["postType","postId"],supports:{spacing:{margin:!0,padding:!0},color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0}},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}}}},{name:I_}=P_,M_={icon:__,edit:N_},z_=()=>Qe({name:I_,metadata:P_,settings:M_});var R_=(0,je.createElement)(We.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,je.createElement)(We.Path,{d:"M19 8h-1V6h-5v2h-2V6H6v2H5c-1.1 0-2 .9-2 2v8c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-8c0-1.1-.9-2-2-2zm.5 10c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5v-8c0-.3.2-.5.5-.5h14c.3 0 .5.2.5.5v8z"}));const H_=["core/avatar","core/comment-author-name","core/comment-content","core/comment-date","core/comment-edit-link","core/comment-reply-link"],A_=[["core/avatar"],["core/comment-author-name"],["core/comment-date"],["core/comment-content"],["core/comment-reply-link"],["core/comment-edit-link"]];const L_={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,__experimental:"fse",name:"core/post-comment",title:"Comment (deprecated)",category:"theme",description:"This block is deprecated. Please use the Comments block instead.",textdomain:"default",attributes:{commentId:{type:"number"}},providesContext:{commentId:"commentId"},supports:{html:!1,inserter:!1}},{name:D_}=L_,V_={icon:ym,edit:function({attributes:{commentId:e},setAttributes:t}){const[n,a]=(0,je.useState)(e),o=(0,Je.useBlockProps)(),r=(0,Je.useInnerBlocksProps)(o,{template:A_,allowedBlocks:H_});return e?(0,je.createElement)("div",{...r}):(0,je.createElement)("div",{...o},(0,je.createElement)(Ke.Placeholder,{icon:R_,label:(0,Ye._x)("Post Comment","block title"),instructions:(0,Ye.__)("To show a comment, input the comment ID.")},(0,je.createElement)(Ke.TextControl,{__nextHasNoMarginBottom:!0,value:e,onChange:e=>a(parseInt(e))}),(0,je.createElement)(Ke.Button,{variant:"primary",onClick:()=>{t({commentId:n})}},(0,Ye.__)("Save"))))},save:function(){const e=Je.useBlockProps.save(),t=Je.useInnerBlocksProps.save(e);return(0,je.createElement)("div",{...t})}},F_=()=>Qe({name:D_,metadata:L_,settings:V_});var $_=(0,je.createElement)(We.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,je.createElement)(We.Path,{d:"M13 8H4v1.5h9V8zM4 4v1.5h16V4H4zm9 8H5c-.6 0-1 .4-1 1v8.3c0 .3.2.7.6.8.1.1.2.1.3.1.2 0 .5-.1.6-.3l1.8-1.8H13c.6 0 1-.4 1-1V13c0-.6-.4-1-1-1zm-2.2 6.6H7l1.6-2.2c.3-.4.5-.7.6-.9.1-.2.2-.4.2-.5 0-.2-.1-.3-.1-.4-.1-.1-.2-.1-.4-.1s-.4 0-.6.1c-.3.1-.5.3-.7.4l-.2.2-.2-1.2.1-.1c.3-.2.5-.3.8-.4.3-.1.6-.1.9-.1.3 0 .6.1.9.2.2.1.4.3.6.5.1.2.2.5.2.7 0 .3-.1.6-.2.9-.1.3-.4.7-.7 1.1l-.5.6h1.6v1.2z"}));const G_={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,__experimental:"fse",name:"core/post-comments-count",title:"Comments Count",category:"theme",description:"Display a post's comments count.",textdomain:"default",attributes:{textAlign:{type:"string"}},usesContext:["postId"],supports:{html:!1,color:{gradients:!0,__experimentalDefaultControls:{background:!0,text:!0}},spacing:{margin:!0,padding:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}}}},{name:O_}=G_,U_={icon:$_,edit:function({attributes:e,context:t,setAttributes:n}){const{textAlign:a}=e,{postId:o}=t,[r,l]=(0,je.useState)(),i=(0,Je.useBlockProps)({className:it()({[`has-text-align-${a}`]:a})});(0,je.useEffect)((()=>{if(!o)return;const e=o;Ao()({path:(0,st.addQueryArgs)("/wp/v2/comments",{post:o}),parse:!1}).then((t=>{e===o&&l(t.headers.get("X-WP-Total"))}))}),[o]);const s=o&&void 0!==r,c={...i.style,textDecoration:s?i.style?.textDecoration:void 0};return(0,je.createElement)(je.Fragment,null,(0,je.createElement)(Je.BlockControls,{group:"block"},(0,je.createElement)(Je.AlignmentControl,{value:a,onChange:e=>{n({textAlign:e})}})),(0,je.createElement)("div",{...i,style:c},s?r:(0,je.createElement)(Je.Warning,null,(0,Ye.__)("Post Comments Count block: post not found."))))}},q_=()=>Qe({name:O_,metadata:G_,settings:U_});var j_=(0,je.createElement)(We.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,je.createElement)(We.Path,{d:"M13 8H4v1.5h9V8zM4 4v1.5h16V4H4zm9 8H5c-.6 0-1 .4-1 1v8.3c0 .3.2.7.6.8.1.1.2.1.3.1.2 0 .5-.1.6-.3l1.8-1.8H13c.6 0 1-.4 1-1V13c0-.6-.4-1-1-1zm-.5 6.6H6.7l-1.2 1.2v-6.3h7v5.1z"}));const W_={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/post-comments-form",title:"Comments Form",category:"theme",description:"Display a post's comments form.",textdomain:"default",attributes:{textAlign:{type:"string"}},usesContext:["postId","postType"],supports:{html:!1,color:{gradients:!0,heading:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0}},spacing:{margin:!0,padding:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontStyle:!0,__experimentalFontWeight:!0,__experimentalLetterSpacing:!0,__experimentalTextTransform:!0,__experimentalDefaultControls:{fontSize:!0}}},editorStyle:"wp-block-post-comments-form-editor",style:["wp-block-post-comments-form","wp-block-buttons","wp-block-button"]},{name:Z_}=W_,Q_={icon:j_,edit:function e({attributes:t,context:n,setAttributes:a}){const{textAlign:o}=t,{postId:r,postType:l}=n,i=(0,Tt.useInstanceId)(e),s=(0,Ye.sprintf)("comments-form-edit-%d-desc",i),c=(0,Je.useBlockProps)({className:it()({[`has-text-align-${o}`]:o}),"aria-describedby":s});return(0,je.createElement)(je.Fragment,null,(0,je.createElement)(Je.BlockControls,{group:"block"},(0,je.createElement)(Je.AlignmentControl,{value:o,onChange:e=>{a({textAlign:e})}})),(0,je.createElement)("div",{...c},(0,je.createElement)(Ua,{postId:r,postType:l}),(0,je.createElement)(Ke.VisuallyHidden,{id:s},(0,Ye.__)("Comments form disabled in editor."))))}},K_=()=>Qe({name:Z_,metadata:W_,settings:Q_});var Y_=function({context:e,attributes:t,setAttributes:n}){const{textAlign:a}=t,{postType:o,postId:r}=e,[l,i]=(0,je.useState)(),s=(0,Je.useBlockProps)({className:it()({[`has-text-align-${a}`]:a})});(0,je.useEffect)((()=>{if(!r)return;const e=r;Ao()({path:(0,st.addQueryArgs)("/wp/v2/comments",{post:r}),parse:!1}).then((t=>{e===r&&i(t.headers.get("X-WP-Total"))}))}),[r]);const c=(0,ut.useSelect)((e=>e(ct.store).getEditedEntityRecord("postType",o,r)),[o,r]);if(!c)return null;const{link:u}=c;let m;if(void 0!==l){const e=parseInt(l);m=0===e?(0,Ye.__)("No comments"):(0,Ye.sprintf)((0,Ye._n)("%s comment","%s comments",e),e.toLocaleString())}return(0,je.createElement)(je.Fragment,null,(0,je.createElement)(Je.BlockControls,{group:"block"},(0,je.createElement)(Je.AlignmentControl,{value:a,onChange:e=>{n({textAlign:e})}})),(0,je.createElement)("div",{...s},u&&void 0!==m?(0,je.createElement)("a",{href:u+"#comments",onClick:e=>e.preventDefault()},m):(0,je.createElement)(Je.Warning,null,(0,Ye.__)("Post Comments Link block: post not found."))))};const J_={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,__experimental:"fse",name:"core/post-comments-link",title:"Comments Link",category:"theme",description:"Displays the link to the current post comments.",textdomain:"default",usesContext:["postType","postId"],attributes:{textAlign:{type:"string"}},supports:{html:!1,color:{link:!0,text:!1,__experimentalDefaultControls:{background:!0,link:!0}},spacing:{margin:!0,padding:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}}}},{name:X_}=J_,eb={edit:Y_,icon:$_},tb=()=>Qe({name:X_,metadata:J_,settings:eb});var nb=(0,je.createElement)(We.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,je.createElement)(We.Path,{d:"M4 6h12V4.5H4V6Zm16 4.5H4V9h16v1.5ZM4 15h16v-1.5H4V15Zm0 4.5h16V18H4v1.5Z"}));function ab(e,t,n){return(0,ut.useSelect)((a=>a(ct.store).canUserEditEntityRecord(e,t,n)),[e,t,n])}function ob({layoutClassNames:e,userCanEdit:t,postType:n,postId:a}){const[,,o]=(0,ct.useEntityProp)("postType",n,"content",a),r=(0,Je.useBlockProps)({className:e});return o?.protected&&!t?(0,je.createElement)("div",{...r},(0,je.createElement)(Je.Warning,null,(0,Ye.__)("This content is password protected."))):(0,je.createElement)("div",{...r,dangerouslySetInnerHTML:{__html:o?.rendered}})}function rb({context:e={}}){const{postType:t,postId:n}=e,[a,o,r]=(0,ct.useEntityBlockEditor)("postType",t,{id:n}),l=(0,ut.useSelect)((e=>e(ct.store).getEntityRecord("postType",t,n)),[t,n]),i=!!l?.content?.raw||a?.length,s=(0,Je.useInnerBlocksProps)((0,Je.useBlockProps)({className:"entry-content"}),{value:a,onInput:o,onChange:r,template:i?void 0:[["core/paragraph"]]});return(0,je.createElement)("div",{...s})}function lb(e){const{context:{queryId:t,postType:n,postId:a}={},layoutClassNames:o}=e,r=ab("postType",n,a);if(void 0===r)return null;const l=Number.isFinite(t);return r&&!l?(0,je.createElement)(rb,{...e}):(0,je.createElement)(ob,{layoutClassNames:o,userCanEdit:r,postType:n,postId:a})}function ib({layoutClassNames:e}){const t=(0,Je.useBlockProps)({className:e});return(0,je.createElement)("div",{...t},(0,je.createElement)("p",null,(0,Ye.__)("This is the Content block, it will display all the blocks in any single post or page.")),(0,je.createElement)("p",null,(0,Ye.__)("That might be a simple arrangement like consecutive paragraphs in a blog post, or a more elaborate composition that includes image galleries, videos, tables, columns, and any other block types.")),(0,je.createElement)("p",null,(0,Ye.__)("If there are any Custom Post Types registered at your site, the Content block can display the contents of those entries as well.")))}function sb(){const e=(0,Je.useBlockProps)();return(0,je.createElement)("div",{...e},(0,je.createElement)(Je.Warning,null,(0,Ye.__)("Block cannot be rendered inside itself.")))}const cb={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/post-content",title:"Content",category:"theme",description:"Displays the contents of a post or page.",textdomain:"default",usesContext:["postId","postType","queryId"],supports:{align:["wide","full"],html:!1,layout:!0,dimensions:{minHeight:!0},spacing:{blockGap:!0},color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!1,text:!1}},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}}},editorStyle:"wp-block-post-content-editor"},{name:ub}=cb,mb={icon:nb,edit:function({context:e,__unstableLayoutClassNames:t}){const{postId:n,postType:a}=e,o=(0,Je.__experimentalUseHasRecursion)(n);return n&&a&&o?(0,je.createElement)(sb,null):(0,je.createElement)(Je.__experimentalRecursionProvider,{uniqueId:n},n&&a?(0,je.createElement)(lb,{context:e,layoutClassNames:t}):(0,je.createElement)(ib,{layoutClassNames:t}))}},pb=()=>Qe({name:ub,metadata:cb,settings:mb});function db(e){return/(?:^|[^\\])[aAgh]/.test(e)}const gb={attributes:{textAlign:{type:"string"},format:{type:"string"},isLink:{type:"boolean",default:!1}},supports:{html:!1,color:{gradients:!0,link:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalLetterSpacing:!0}},save(){return null},migrate:en,isEligible({style:e}){return e?.typography?.fontFamily}};var hb=[gb];const _b=[{name:"post-date-modified",title:(0,Ye.__)("Modified Date"),description:(0,Ye.__)("Display a post's last updated date."),attributes:{displayType:"modified"},scope:["block","inserter"],isActive:e=>"modified"===e.displayType,icon:ho}];var bb=_b;const fb={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/post-date",title:"Date",category:"theme",description:"Display the publish date for an entry such as a post or page.",textdomain:"default",attributes:{textAlign:{type:"string"},format:{type:"string"},isLink:{type:"boolean",default:!1},displayType:{type:"string",default:"date"}},usesContext:["postId","postType","queryId"],supports:{html:!1,color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0,link:!0}},spacing:{margin:!0,padding:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}}}},{name:vb}=fb,yb={icon:ho,edit:function({attributes:{textAlign:e,format:t,isLink:n,displayType:a},context:{postId:o,postType:r,queryId:l},setAttributes:i}){const s=(0,Je.useBlockProps)({className:it()({[`has-text-align-${e}`]:e,"wp-block-post-date__modified-date":"modified"===a})}),[c,u]=(0,je.useState)(null),m=(0,je.useMemo)((()=>({anchor:c})),[c]),p=Number.isFinite(l),d=(0,_o.getSettings)(),[g=d.formats.date]=(0,ct.useEntityProp)("root","site","date_format"),[h=d.formats.time]=(0,ct.useEntityProp)("root","site","time_format"),[_,b]=(0,ct.useEntityProp)("postType",r,a,o),f=(0,ut.useSelect)((e=>r?e(ct.store).getPostType(r):null),[r]),v="date"===a?(0,Ye.__)("Post Date"):(0,Ye.__)("Post Modified Date");let y=_?(0,je.createElement)("time",{dateTime:(0,_o.dateI18n)("c",_),ref:u},(0,_o.dateI18n)(t||g,_)):v;return n&&_&&(y=(0,je.createElement)("a",{href:"#post-date-pseudo-link",onClick:e=>e.preventDefault()},y)),(0,je.createElement)(je.Fragment,null,(0,je.createElement)(Je.BlockControls,{group:"block"},(0,je.createElement)(Je.AlignmentControl,{value:e,onChange:e=>{i({textAlign:e})}}),_&&!p&&(0,je.createElement)(Ke.ToolbarGroup,null,(0,je.createElement)(Ke.Dropdown,{popoverProps:m,renderContent:({onClose:e})=>(0,je.createElement)(Je.__experimentalPublishDateTimePicker,{currentDate:_,onChange:b,is12Hour:db(h),onClose:e}),renderToggle:({isOpen:e,onToggle:t})=>(0,je.createElement)(Ke.ToolbarButton,{"aria-expanded":e,icon:xi,title:(0,Ye.__)("Change Date"),onClick:t,onKeyDown:n=>{e||n.keyCode!==un.DOWN||(n.preventDefault(),t())}})}))),(0,je.createElement)(Je.InspectorControls,null,(0,je.createElement)(Ke.PanelBody,{title:(0,Ye.__)("Settings")},(0,je.createElement)(Je.__experimentalDateFormatPicker,{format:t,defaultFormat:g,onChange:e=>i({format:e})}),(0,je.createElement)(Ke.ToggleControl,{__nextHasNoMarginBottom:!0,label:f?.labels.singular_name?(0,Ye.sprintf)((0,Ye.__)("Link to %s"),f.labels.singular_name.toLowerCase()):(0,Ye.__)("Link to post"),onChange:()=>i({isLink:!n}),checked:n}),(0,je.createElement)(Ke.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,Ye.__)("Display last modified date"),onChange:e=>i({displayType:e?"modified":"date"}),checked:"modified"===a,help:(0,Ye.__)("Only shows if the post has been modified")}))),(0,je.createElement)("div",{...s},y))},deprecated:hb,variations:bb},kb=()=>Qe({name:vb,metadata:fb,settings:yb});var xb=(0,je.createElement)(We.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,je.createElement)(We.Path,{d:"M12.75 9.333c0 .521-.102.977-.327 1.354-.23.386-.555.628-.893.774-.545.234-1.183.227-1.544.222l-.12-.001v-1.5h.123c.414.001.715.002.948-.099a.395.395 0 00.199-.166c.05-.083.114-.253.114-.584V7.2H8.8V4h3.95v5.333zM7.95 9.333c0 .521-.102.977-.327 1.354-.23.386-.555.628-.893.774-.545.234-1.183.227-1.544.222l-.12-.001v-1.5h.123c.414.001.715.002.948-.099a.394.394 0 00.198-.166c.05-.083.115-.253.115-.584V7.2H4V4h3.95v5.333zM13 20H4v-1.5h9V20zM20 16H4v-1.5h16V16z"}));var wb={from:[{type:"block",blocks:["core/post-content"],transform:()=>(0,qe.createBlock)("core/post-excerpt")}],to:[{type:"block",blocks:["core/post-content"],transform:()=>(0,qe.createBlock)("core/post-content")}]};const Eb={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/post-excerpt",title:"Excerpt",category:"theme",description:"Display the excerpt.",textdomain:"default",attributes:{textAlign:{type:"string"},moreText:{type:"string"},showMoreOnNewLine:{type:"boolean",default:!0},excerptLength:{type:"number",default:55}},usesContext:["postId","postType","queryId"],supports:{html:!1,color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0,link:!0}},spacing:{margin:!0,padding:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}}},editorStyle:"wp-block-post-excerpt-editor",style:"wp-block-post-excerpt"},{name:Cb}=Eb,Sb={icon:xb,transforms:wb,edit:function({attributes:{textAlign:e,moreText:t,showMoreOnNewLine:n,excerptLength:a},setAttributes:o,isSelected:r,context:{postId:l,postType:i,queryId:s}}){const c=Number.isFinite(s),u=ab("postType",i,l),[m,p,{rendered:d,protected:g}={}]=(0,ct.useEntityProp)("postType",i,"excerpt",l),h=(0,ut.useSelect)((e=>"page"===i||!!e(ct.store).getPostType(i)?.supports?.excerpt),[i]),_=u&&!c&&h,b=(0,Je.useBlockProps)({className:it()({[`has-text-align-${e}`]:e})}),f=(0,Ye._x)("words","Word count type. Do not translate!"),v=(0,je.useMemo)((()=>{if(!d)return"";const e=(new window.DOMParser).parseFromString(d,"text/html");return e.body.textContent||e.body.innerText||""}),[d]);if(!i||!l)return(0,je.createElement)(je.Fragment,null,(0,je.createElement)(Je.BlockControls,null,(0,je.createElement)(Je.AlignmentToolbar,{value:e,onChange:e=>o({textAlign:e})})),(0,je.createElement)("div",{...b},(0,je.createElement)("p",null,(0,Ye.__)("This block will display the excerpt."))));if(g&&!u)return(0,je.createElement)("div",{...b},(0,je.createElement)(Je.Warning,null,(0,Ye.__)("The content is currently protected and does not have the available excerpt.")));const y=(0,je.createElement)(Je.RichText,{className:"wp-block-post-excerpt__more-link",tagName:"a","aria-label":(0,Ye.__)("“Read more” link text"),placeholder:(0,Ye.__)('Add "read more" link text'),value:t,onChange:e=>o({moreText:e}),withoutInteractiveFormatting:!0}),k=it()("wp-block-post-excerpt__excerpt",{"is-inline":!n}),x=(m||v).trim();let w="";if("words"===f)w=x.split(" ",a).join(" ");else if("characters_excluding_spaces"===f){const e=x.split("",a).join(""),t=e.length-e.replaceAll(" ","").length;w=x.split("",a+t).join("")}else"characters_including_spaces"===f&&(w=x.split("",a).join(""));const E=w!==x,C=_?(0,je.createElement)(Je.RichText,{className:k,"aria-label":(0,Ye.__)("Excerpt text"),value:r?x:(E?w+"…":x)||(0,Ye.__)("No excerpt found"),onChange:p,tagName:"p"}):(0,je.createElement)("p",{className:k},E?w+"…":x||(0,Ye.__)("No excerpt found"));return(0,je.createElement)(je.Fragment,null,(0,je.createElement)(Je.BlockControls,null,(0,je.createElement)(Je.AlignmentToolbar,{value:e,onChange:e=>o({textAlign:e})})),(0,je.createElement)(Je.InspectorControls,null,(0,je.createElement)(Ke.PanelBody,{title:(0,Ye.__)("Settings")},(0,je.createElement)(Ke.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,Ye.__)("Show link on new line"),checked:n,onChange:e=>o({showMoreOnNewLine:e})}),(0,je.createElement)(Ke.RangeControl,{label:(0,Ye.__)("Max number of words"),value:a,onChange:e=>{o({excerptLength:e})},min:"10",max:"100"}))),(0,je.createElement)("div",{...b},C,!n&&" ",n?(0,je.createElement)("p",{className:"wp-block-post-excerpt__more-text"},y):y))}},Bb=()=>Qe({name:Cb,metadata:Eb,settings:Sb});var Tb=(0,je.createElement)(We.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,je.createElement)(We.Path,{d:"M19 3H5c-.6 0-1 .4-1 1v7c0 .5.4 1 1 1h14c.5 0 1-.4 1-1V4c0-.6-.4-1-1-1zM5.5 10.5v-.4l1.8-1.3 1.3.8c.3.2.7.2.9-.1L11 8.1l2.4 2.4H5.5zm13 0h-2.9l-4-4c-.3-.3-.8-.3-1.1 0L8.9 8l-1.2-.8c-.3-.2-.6-.2-.9 0l-1.3 1V4.5h13v6zM4 20h9v-1.5H4V20zm0-4h16v-1.5H4V16z"}));const Nb=(0,je.createElement)(je.Fragment,null,(0,je.createElement)(Ke.__experimentalToggleGroupControlOption,{value:"cover",label:(0,Ye._x)("Cover","Scale option for Image dimension control")}),(0,je.createElement)(Ke.__experimentalToggleGroupControlOption,{value:"contain",label:(0,Ye._x)("Contain","Scale option for Image dimension control")}),(0,je.createElement)(Ke.__experimentalToggleGroupControlOption,{value:"fill",label:(0,Ye._x)("Fill","Scale option for Image dimension control")})),Pb="cover",Ib={cover:(0,Ye.__)("Image is scaled and cropped to fill the entire space without being distorted."),contain:(0,Ye.__)("Image is scaled to fill the space without clipping nor distorting."),fill:(0,Ye.__)("Image will be stretched and distorted to completely fill the space.")};var Mb=({clientId:e,attributes:{aspectRatio:t,width:n,height:a,scale:o,sizeSlug:r},setAttributes:l,imageSizeOptions:i=[]})=>{const s=(0,Ke.__experimentalUseCustomUnits)({availableUnits:(0,Je.useSetting)("spacing.units")||["px","%","vw","em","rem"]}),c=(e,t)=>{const n=parseFloat(t);isNaN(n)&&t||l({[e]:n<0?"0":t})},u=(0,Ye._x)("Scale","Image scaling options"),m=a||t&&"auto"!==t;return(0,je.createElement)(Je.InspectorControls,{group:"dimensions"},(0,je.createElement)(Ke.__experimentalToolsPanelItem,{hasValue:()=>!!t,label:(0,Ye.__)("Aspect ratio"),onDeselect:()=>l({aspectRatio:void 0}),resetAllFilter:()=>({aspectRatio:void 0}),isShownByDefault:!0,panelId:e},(0,je.createElement)(Ke.SelectControl,{__nextHasNoMarginBottom:!0,label:(0,Ye.__)("Aspect ratio"),value:t,options:[{label:(0,Ye.__)("Original"),value:"auto"},{label:(0,Ye.__)("Square"),value:"1"},{label:(0,Ye.__)("16:9"),value:"16/9"},{label:(0,Ye.__)("4:3"),value:"4/3"},{label:(0,Ye.__)("3:2"),value:"3/2"},{label:(0,Ye.__)("9:16"),value:"9/16"},{label:(0,Ye.__)("3:4"),value:"3/4"},{label:(0,Ye.__)("2:3"),value:"2/3"}],onChange:e=>l({aspectRatio:e})})),(0,je.createElement)(Ke.__experimentalToolsPanelItem,{className:"single-column",hasValue:()=>!!a,label:(0,Ye.__)("Height"),onDeselect:()=>l({height:void 0}),resetAllFilter:()=>({height:void 0}),isShownByDefault:!0,panelId:e},(0,je.createElement)(Ke.__experimentalUnitControl,{label:(0,Ye.__)("Height"),labelPosition:"top",value:a||"",min:0,onChange:e=>c("height",e),units:s})),(0,je.createElement)(Ke.__experimentalToolsPanelItem,{className:"single-column",hasValue:()=>!!n,label:(0,Ye.__)("Width"),onDeselect:()=>l({width:void 0}),resetAllFilter:()=>({width:void 0}),isShownByDefault:!0,panelId:e},(0,je.createElement)(Ke.__experimentalUnitControl,{label:(0,Ye.__)("Width"),labelPosition:"top",value:n||"",min:0,onChange:e=>c("width",e),units:s})),m&&(0,je.createElement)(Ke.__experimentalToolsPanelItem,{hasValue:()=>!!o&&o!==Pb,label:u,onDeselect:()=>l({scale:Pb}),resetAllFilter:()=>({scale:Pb}),isShownByDefault:!0,panelId:e},(0,je.createElement)(Ke.__experimentalToggleGroupControl,{__nextHasNoMarginBottom:!0,label:u,value:o,help:Ib[o],onChange:e=>l({scale:e}),isBlock:!0},Nb)),!!i.length&&(0,je.createElement)(Ke.__experimentalToolsPanelItem,{hasValue:()=>!!r,label:(0,Ye.__)("Resolution"),onDeselect:()=>l({sizeSlug:void 0}),resetAllFilter:()=>({sizeSlug:void 0}),isShownByDefault:!1,panelId:e},(0,je.createElement)(Ke.SelectControl,{__nextHasNoMarginBottom:!0,label:(0,Ye.__)("Resolution"),value:r||"full",options:i,onChange:e=>l({sizeSlug:e}),help:(0,Ye.__)("Select the size of the source image.")})))};var zb=(0,Tt.compose)([(0,Je.withColors)({overlayColor:"background-color"})])((({clientId:e,attributes:t,setAttributes:n,overlayColor:a,setOverlayColor:o})=>{const{dimRatio:r}=t,{gradientClass:l,gradientValue:i,setGradient:s}=(0,Je.__experimentalUseGradient)(),c=(0,Je.__experimentalUseMultipleOriginColorsAndGradients)(),u=(0,Je.__experimentalUseBorderProps)(t),m={backgroundColor:a.color,backgroundImage:i,...u.style};return c.hasColorsOrGradients?(0,je.createElement)(je.Fragment,null,!!r&&(0,je.createElement)("span",{"aria-hidden":"true",className:it()("wp-block-post-featured-image__overlay",(p=r,void 0===p?null:"has-background-dim-"+10*Math.round(p/10)),{[a.class]:a.class,"has-background-dim":void 0!==r,"has-background-gradient":i,[l]:l},u.className),style:m}),(0,je.createElement)(Je.InspectorControls,{group:"color"},(0,je.createElement)(Je.__experimentalColorGradientSettingsDropdown,{__experimentalIsRenderedInSidebar:!0,settings:[{colorValue:a.color,gradientValue:i,label:(0,Ye.__)("Overlay"),onColorChange:o,onGradientChange:s,isShownByDefault:!0,resetAllFilter:()=>({overlayColor:void 0,customOverlayColor:void 0,gradient:void 0,customGradient:void 0})}],panelId:e,...c}),(0,je.createElement)(Ke.__experimentalToolsPanelItem,{hasValue:()=>void 0!==r,label:(0,Ye.__)("Overlay opacity"),onDeselect:()=>n({dimRatio:0}),resetAllFilter:()=>({dimRatio:0}),isShownByDefault:!0,panelId:e},(0,je.createElement)(Ke.RangeControl,{__nextHasNoMarginBottom:!0,label:(0,Ye.__)("Overlay opacity"),value:r,onChange:e=>n({dimRatio:e}),min:0,max:100,step:10,required:!0,__next40pxDefaultSize:!0})))):null;var p}));const Rb=["image"];const Hb={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/post-featured-image",title:"Featured Image",category:"theme",description:"Display a post's featured image.",textdomain:"default",attributes:{isLink:{type:"boolean",default:!1},aspectRatio:{type:"string"},width:{type:"string"},height:{type:"string"},scale:{type:"string",default:"cover"},sizeSlug:{type:"string"},rel:{type:"string",attribute:"rel",default:""},linkTarget:{type:"string",default:"_self"},overlayColor:{type:"string"},customOverlayColor:{type:"string"},dimRatio:{type:"number",default:0},gradient:{type:"string"},customGradient:{type:"string"}},usesContext:["postId","postType","queryId"],supports:{align:["left","right","center","wide","full"],color:{__experimentalDuotone:"img, .wp-block-post-featured-image__placeholder, .components-placeholder__illustration, .components-placeholder::before",text:!1,background:!1},__experimentalBorder:{color:!0,radius:!0,width:!0,__experimentalSelector:"img, .block-editor-media-placeholder, .wp-block-post-featured-image__overlay",__experimentalSkipSerialization:!0,__experimentalDefaultControls:{color:!0,radius:!0,width:!0}},html:!1,spacing:{margin:!0,padding:!0}},editorStyle:"wp-block-post-featured-image-editor",style:"wp-block-post-featured-image"},{name:Ab}=Hb,Lb={icon:Tb,edit:function({clientId:e,attributes:t,setAttributes:n,context:{postId:a,postType:o,queryId:r}}){const l=Number.isFinite(r),{isLink:i,aspectRatio:s,height:c,width:u,scale:m,sizeSlug:p,rel:d,linkTarget:g}=t,[h,_]=(0,ct.useEntityProp)("postType",o,"featured_media",a),{media:b,postType:f}=(0,ut.useSelect)((e=>{const{getMedia:t,getPostType:n}=e(ct.store);return{media:h&&t(h,{context:"view"}),postType:o&&n(o)}}),[h,o]),v=function(e,t){return e?.media_details?.sizes?.[t]?.source_url||e?.source_url}(b,p),y=(0,ut.useSelect)((e=>e(Je.store).getSettings().imageSizes),[]).filter((({slug:e})=>b?.media_details?.sizes?.[e]?.source_url)).map((({name:e,slug:t})=>({value:t,label:e}))),k=(0,Je.useBlockProps)({style:{width:u,height:c,aspectRatio:s}}),x=(0,Je.__experimentalUseBorderProps)(t),w=e=>(0,je.createElement)(Ke.Placeholder,{className:it()("block-editor-media-placeholder",x.className),withIllustration:!0,style:{height:!!s&&"100%",width:!!s&&"100%",...x.style}},e),E=e=>{e?.id&&_(e.id)},{createErrorNotice:C}=(0,ut.useDispatch)(Bt.store),S=e=>{C(e,{type:"snackbar"})},B=(0,je.createElement)(je.Fragment,null,(0,je.createElement)(Mb,{clientId:e,attributes:t,setAttributes:n,imageSizeOptions:y}),(0,je.createElement)(Je.InspectorControls,null,(0,je.createElement)(Ke.PanelBody,{title:(0,Ye.__)("Settings")},(0,je.createElement)(Ke.ToggleControl,{__nextHasNoMarginBottom:!0,label:f?.labels.singular_name?(0,Ye.sprintf)((0,Ye.__)("Link to %s"),f.labels.singular_name):(0,Ye.__)("Link to post"),onChange:()=>n({isLink:!i}),checked:i}),i&&(0,je.createElement)(je.Fragment,null,(0,je.createElement)(Ke.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,Ye.__)("Open in new tab"),onChange:e=>n({linkTarget:e?"_blank":"_self"}),checked:"_blank"===g}),(0,je.createElement)(Ke.TextControl,{__nextHasNoMarginBottom:!0,label:(0,Ye.__)("Link rel"),value:d,onChange:e=>n({rel:e})})))));let T;if(!h&&(l||!a))return(0,je.createElement)(je.Fragment,null,B,(0,je.createElement)("div",{...k},w(),(0,je.createElement)(zb,{attributes:t,setAttributes:n,clientId:e})));const N=(0,Ye.__)("Add a featured image"),P={...x.style,height:s?"100%":c,width:!!s&&"100%",objectFit:!(!c&&!s)&&m};return T=h?b?(0,je.createElement)("img",{className:x.className,src:v,alt:b.alt_text?(0,Ye.sprintf)((0,Ye.__)("Featured image: %s"),b.alt_text):(0,Ye.__)("Featured image"),style:P}):w():(0,je.createElement)(Je.MediaPlaceholder,{onSelect:E,accept:"image/*",allowedTypes:Rb,onError:S,placeholder:w,mediaLibraryButton:({open:e})=>(0,je.createElement)(Ke.Button,{icon:nm,variant:"primary",label:N,showTooltip:!0,tooltipPosition:"top center",onClick:()=>{e()}})}),(0,je.createElement)(je.Fragment,null,B,!!b&&!l&&(0,je.createElement)(Je.BlockControls,{group:"other"},(0,je.createElement)(Je.MediaReplaceFlow,{mediaId:h,mediaURL:v,allowedTypes:Rb,accept:"image/*",onSelect:E,onError:S},(0,je.createElement)(Ke.MenuItem,{onClick:()=>_(0)},(0,Ye.__)("Reset")))),(0,je.createElement)("figure",{...k},T,(0,je.createElement)(zb,{attributes:t,setAttributes:n,clientId:e})))}},Db=()=>Qe({name:Ab,metadata:Hb,settings:Lb});var Vb=(0,je.createElement)(We.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,je.createElement)(We.Path,{d:"M6.6 6L5.4 7l4.5 5-4.5 5 1.1 1 5.5-6-5.4-6zm6 0l-1.1 1 4.5 5-4.5 5 1.1 1 5.5-6-5.5-6z"}));var Fb=(0,je.createElement)(We.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,je.createElement)(We.Path,{d:"M11.6 7l-1.1-1L5 12l5.5 6 1.1-1L7 12l4.6-5zm6 0l-1.1-1-5.5 6 5.5 6 1.1-1-4.6-5 4.6-5z"}));const $b=[{isDefault:!0,name:"post-next",title:(0,Ye.__)("Next post"),description:(0,Ye.__)("Displays the post link that follows the current post."),icon:Vb,attributes:{type:"next"},scope:["inserter","transform"]},{name:"post-previous",title:(0,Ye.__)("Previous post"),description:(0,Ye.__)("Displays the post link that precedes the current post."),icon:Fb,attributes:{type:"previous"},scope:["inserter","transform"]}];$b.forEach((e=>{e.isActive||(e.isActive=(e,t)=>e.type===t.type)}));var Gb=$b;const Ob={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/post-navigation-link",title:"Post Navigation Link",category:"theme",description:"Displays the next or previous post link that is adjacent to the current post.",textdomain:"default",attributes:{textAlign:{type:"string"},type:{type:"string",default:"next"},label:{type:"string"},showTitle:{type:"boolean",default:!1},linkLabel:{type:"boolean",default:!1},arrow:{type:"string",default:"none"}},supports:{reusable:!1,html:!1,color:{link:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalWritingMode:!0,__experimentalDefaultControls:{fontSize:!0}}},style:"wp-block-post-navigation-link"},{name:Ub}=Ob,qb={edit:function({attributes:{type:e,label:t,showTitle:n,textAlign:a,linkLabel:o,arrow:r},setAttributes:l}){const i="next"===e;let s=i?(0,Ye.__)("Next"):(0,Ye.__)("Previous");const c={none:"",arrow:i?"→":"←",chevron:i?"»":"«"}[r];n&&(s=i?(0,Ye.__)("Next: "):(0,Ye.__)("Previous: "));const u=i?(0,Ye.__)("Next post"):(0,Ye.__)("Previous post"),m=(0,Je.useBlockProps)({className:it()({[`has-text-align-${a}`]:a})});return(0,je.createElement)(je.Fragment,null,(0,je.createElement)(Je.InspectorControls,null,(0,je.createElement)(Ke.PanelBody,null,(0,je.createElement)(Ke.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,Ye.__)("Display the title as a link"),help:(0,Ye.__)("If you have entered a custom label, it will be prepended before the title."),checked:!!n,onChange:()=>l({showTitle:!n})}),n&&(0,je.createElement)(Ke.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,Ye.__)("Include the label as part of the link"),checked:!!o,onChange:()=>l({linkLabel:!o})}),(0,je.createElement)(Ke.__experimentalToggleGroupControl,{__nextHasNoMarginBottom:!0,label:(0,Ye.__)("Arrow"),value:r,onChange:e=>{l({arrow:e})},help:(0,Ye.__)("A decorative arrow for the next and previous link."),isBlock:!0},(0,je.createElement)(Ke.__experimentalToggleGroupControlOption,{value:"none",label:(0,Ye._x)("None","Arrow option for Next/Previous link")}),(0,je.createElement)(Ke.__experimentalToggleGroupControlOption,{value:"arrow",label:(0,Ye._x)("Arrow","Arrow option for Next/Previous link")}),(0,je.createElement)(Ke.__experimentalToggleGroupControlOption,{value:"chevron",label:(0,Ye._x)("Chevron","Arrow option for Next/Previous link")})))),(0,je.createElement)(Je.BlockControls,null,(0,je.createElement)(Je.AlignmentToolbar,{value:a,onChange:e=>{l({textAlign:e})}})),(0,je.createElement)("div",{...m},!i&&c&&(0,je.createElement)("span",{className:`wp-block-post-navigation-link__arrow-previous is-arrow-${r}`},c),(0,je.createElement)(Je.RichText,{tagName:"a","aria-label":u,placeholder:s,value:t,allowedFormats:["core/bold","core/italic"],onChange:e=>l({label:e})}),n&&(0,je.createElement)("a",{href:"#post-navigation-pseudo-link",onClick:e=>e.preventDefault()},(0,Ye.__)("An example title")),i&&c&&(0,je.createElement)("span",{className:`wp-block-post-navigation-link__arrow-next is-arrow-${r}`,"aria-hidden":!0},c)))},variations:Gb},jb=()=>Qe({name:Ub,metadata:Ob,settings:qb}),Wb=[["core/post-title"],["core/post-date"],["core/post-excerpt"]];function Zb(){const e=(0,Je.useInnerBlocksProps)({className:"wp-block-post"},{template:Wb,__unstableDisableLayoutClassNames:!0});return(0,je.createElement)("li",{...e})}const Qb=(0,je.memo)((function({blocks:e,blockContextId:t,isHidden:n,setActiveBlockContextId:a}){const o=(0,Je.__experimentalUseBlockPreview)({blocks:e,props:{className:"wp-block-post"}}),r=()=>{a(t)},l={display:n?"none":void 0};return(0,je.createElement)("li",{...o,tabIndex:0,role:"button",onClick:r,onKeyPress:r,style:l})}));const Kb={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/post-template",title:"Post Template",category:"theme",parent:["core/query"],description:"Contains the block elements used to render a post, like the title, date, featured image, content or excerpt, and more.",textdomain:"default",usesContext:["queryId","query","queryContext","displayLayout","templateSlug","previewPostType","enhancedPagination"],supports:{reusable:!1,html:!1,align:["wide","full"],layout:!0,color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0}},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},spacing:{blockGap:{__experimentalDefault:"1.25em"},__experimentalDefaultControls:{blockGap:!0}}},style:"wp-block-post-template",editorStyle:"wp-block-post-template-editor"},{name:Yb}=Kb,Jb={icon:Ro,edit:function({setAttributes:e,clientId:t,context:{query:{perPage:n,offset:a=0,postType:o,order:r,orderBy:l,author:i,search:s,exclude:c,sticky:u,inherit:m,taxQuery:p,parents:d,pages:g,...h}={},queryContext:_=[{page:1}],templateSlug:b,previewPostType:f},attributes:{layout:v},__unstableLayoutClassNames:y}){const{type:k,columnCount:x=3}=v||{},[{page:w}]=_,[E,C]=(0,je.useState)(),{posts:S,blocks:B}=(0,ut.useSelect)((e=>{const{getEntityRecords:g,getTaxonomies:_}=e(ct.store),{getBlocks:v}=e(Je.store),y=_({type:o,per_page:-1,context:"view"}),k=m&&b?.startsWith("category-")&&g("taxonomy","category",{context:"view",per_page:1,_fields:["id"],slug:b.replace("category-","")}),x={offset:n?n*(w-1)+a:0,order:r,orderby:l};if(p&&!m){const e=Object.entries(p).reduce(((e,[t,n])=>{const a=y?.find((({slug:e})=>e===t));return a?.rest_base&&(e[a?.rest_base]=n),e}),{});Object.keys(e).length&&Object.assign(x,e)}n&&(x.per_page=n),i&&(x.author=i),s&&(x.search=s),c?.length&&(x.exclude=c),d?.length&&(x.parent=d),u&&(x.sticky="only"===u),m&&(b?.startsWith("archive-")?(x.postType=b.replace("archive-",""),o=x.postType):k&&(x.categories=k[0]?.id));return{posts:g("postType",f||o,{...x,...h}),blocks:v(t)}}),[n,w,a,r,l,t,i,s,o,c,u,m,b,p,d,h,f]),T=(0,je.useMemo)((()=>S?.map((e=>({postType:e.type,postId:e.id})))),[S]),N=(0,Je.useBlockProps)({className:it()(y,{[`columns-${x}`]:"grid"===k&&x})});if(!S)return(0,je.createElement)("p",{...N},(0,je.createElement)(Ke.Spinner,null));if(!S.length)return(0,je.createElement)("p",{...N}," ",(0,Ye.__)("No results found."));const P=t=>e({layout:{...v,...t}}),I=[{icon:Tm,title:(0,Ye.__)("List view"),onClick:()=>P({type:"default"}),isActive:"default"===k||"constrained"===k},{icon:Xc,title:(0,Ye.__)("Grid view"),onClick:()=>P({type:"grid",columnCount:x}),isActive:"grid"===k}];return(0,je.createElement)(je.Fragment,null,(0,je.createElement)(Je.BlockControls,null,(0,je.createElement)(Ke.ToolbarGroup,{controls:I})),(0,je.createElement)("ul",{...N},T&&T.map((e=>(0,je.createElement)(Je.BlockContextProvider,{key:e.postId,value:e},e.postId===(E||T[0]?.postId)?(0,je.createElement)(Zb,null):null,(0,je.createElement)(Qb,{blocks:B,blockContextId:e.postId,setActiveBlockContextId:C,isHidden:e.postId===(E||T[0]?.postId)}))))))},save:function(){return(0,je.createElement)(Je.InnerBlocks.Content,null)}},Xb=()=>Qe({name:Yb,metadata:Kb,settings:Jb});var ef=(0,je.createElement)(We.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,je.createElement)(We.Path,{d:"M20 4H4v1.5h16V4zm-2 9h-3c-1.1 0-2 .9-2 2v3c0 1.1.9 2 2 2h3c1.1 0 2-.9 2-2v-3c0-1.1-.9-2-2-2zm.5 5c0 .3-.2.5-.5.5h-3c-.3 0-.5-.2-.5-.5v-3c0-.3.2-.5.5-.5h3c.3 0 .5.2.5.5v3zM4 9.5h9V8H4v1.5zM9 13H6c-1.1 0-2 .9-2 2v3c0 1.1.9 2 2 2h3c1.1 0 2-.9 2-2v-3c0-1.1-.9-2-2-2zm.5 5c0 .3-.2.5-.5.5H6c-.3 0-.5-.2-.5-.5v-3c0-.3.2-.5.5-.5h3c.3 0 .5.2.5.5v3z",fillRule:"evenodd",clipRule:"evenodd"}));const tf=[];const nf=["core/bold","core/image","core/italic","core/link","core/strikethrough","core/text-color"];const af=(0,je.createElement)(We.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,je.createElement)(We.Path,{d:"M8.1 12.3c.1.1.3.3.5.3.2.1.4.1.6.1.2 0 .4 0 .6-.1.2-.1.4-.2.5-.3l3-3c.3-.3.5-.7.5-1.1 0-.4-.2-.8-.5-1.1L9.7 3.5c-.1-.2-.3-.3-.5-.3H5c-.4 0-.8.4-.8.8v4.2c0 .2.1.4.2.5l3.7 3.6zM5.8 4.8h3.1l3.4 3.4v.1l-3 3 .5.5-.7-.5-3.3-3.4V4.8zM4 20h9v-1.5H4V20zm0-5.5V16h16v-1.5H4z"}));const of={category:ef,post_tag:af};function rf(e,t){if("core/post-terms"!==t)return e;const n=e.variations.map((e=>{var t;return{...e,icon:null!==(t=of[e.name])&&void 0!==t?t:ef}}));return{...e,variations:n}}const lf={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/post-terms",title:"Post Terms",category:"theme",description:"Post terms.",textdomain:"default",attributes:{term:{type:"string"},textAlign:{type:"string"},separator:{type:"string",default:", "},prefix:{type:"string",default:""},suffix:{type:"string",default:""}},usesContext:["postId","postType"],supports:{html:!1,color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0,link:!0}},spacing:{margin:!0,padding:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}}},style:"wp-block-post-terms"},{name:sf}=lf,cf={icon:ef,edit:function({attributes:e,clientId:t,context:n,isSelected:a,setAttributes:o,insertBlocksAfter:r}){const{term:l,textAlign:i,separator:s,prefix:c,suffix:u}=e,{postId:m,postType:p}=n,d=(0,ut.useSelect)((e=>{if(!l)return{};const{getTaxonomy:t}=e(ct.store),n=t(l);return n?.visibility?.publicly_queryable?n:{}}),[l]),{postTerms:g,hasPostTerms:h,isLoading:_}=function({postId:e,term:t}){const{slug:n}=t;return(0,ut.useSelect)((a=>{const o=t?.visibility?.publicly_queryable;if(!o)return{postTerms:tf,isLoading:!1,hasPostTerms:!1};const{getEntityRecords:r,isResolving:l}=a(ct.store),i=["taxonomy",n,{post:e,per_page:-1,context:"view"}],s=r(...i);return{postTerms:s,isLoading:l("getEntityRecords",i),hasPostTerms:!!s?.length}}),[e,t?.visibility?.publicly_queryable,n])}({postId:m,term:d}),b=m&&p,f=(0,Je.useBlockDisplayInformation)(t),v=(0,Je.useBlockProps)({className:it()({[`has-text-align-${i}`]:i,[`taxonomy-${l}`]:l})});return(0,je.createElement)(je.Fragment,null,(0,je.createElement)(Je.BlockControls,null,(0,je.createElement)(Je.AlignmentToolbar,{value:i,onChange:e=>{o({textAlign:e})}})),(0,je.createElement)(Je.InspectorControls,{group:"advanced"},(0,je.createElement)(Ke.TextControl,{__nextHasNoMarginBottom:!0,autoComplete:"off",label:(0,Ye.__)("Separator"),value:s||"",onChange:e=>{o({separator:e})},help:(0,Ye.__)("Enter character(s) used to separate terms.")})),(0,je.createElement)("div",{...v},_&&b&&(0,je.createElement)(Ke.Spinner,null),!_&&h&&(a||c)&&(0,je.createElement)(Je.RichText,{allowedFormats:nf,className:"wp-block-post-terms__prefix",multiline:!1,"aria-label":(0,Ye.__)("Prefix"),placeholder:(0,Ye.__)("Prefix")+" ",value:c,onChange:e=>o({prefix:e}),tagName:"span"}),(!b||!l)&&(0,je.createElement)("span",null,f.title),b&&!_&&h&&g.map((e=>(0,je.createElement)("a",{key:e.id,href:e.link,onClick:e=>e.preventDefault()},(0,Gn.decodeEntities)(e.name)))).reduce(((e,t)=>(0,je.createElement)(je.Fragment,null,e,(0,je.createElement)("span",{className:"wp-block-post-terms__separator"},s||" "),t))),b&&!_&&!h&&(d?.labels?.no_terms||(0,Ye.__)("Term items not found.")),!_&&h&&(a||u)&&(0,je.createElement)(Je.RichText,{allowedFormats:nf,className:"wp-block-post-terms__suffix",multiline:!1,"aria-label":(0,Ye.__)("Suffix"),placeholder:" "+(0,Ye.__)("Suffix"),value:u,onChange:e=>o({suffix:e}),tagName:"span",__unstableOnSplitAtEnd:()=>r((0,qe.createBlock)((0,qe.getDefaultBlockName)()))})))}},uf=()=>((0,yl.addFilter)("blocks.registerBlockType","core/template-part",rf),Qe({name:sf,metadata:lf,settings:cf}));var mf=window.wp.wordcount;var pf=function({attributes:e,setAttributes:t,context:n}){const{textAlign:a}=e,{postId:o,postType:r}=n,[l]=(0,ct.useEntityProp)("postType",r,"content",o),[i]=(0,ct.useEntityBlockEditor)("postType",r,{id:o}),s=(0,je.useMemo)((()=>{let e;e=l instanceof Function?l({blocks:i}):i?(0,qe.__unstableSerializeAndClean)(i):l;const t=(0,Ye._x)("words","Word count type. Do not translate!"),n=Math.max(1,Math.round((0,mf.count)(e,t)/189));return(0,Ye.sprintf)((0,Ye._n)("%d minute","%d minutes",n),n)}),[l,i]),c=(0,Je.useBlockProps)({className:it()({[`has-text-align-${a}`]:a})});return(0,je.createElement)(je.Fragment,null,(0,je.createElement)(Je.BlockControls,{group:"block"},(0,je.createElement)(Je.AlignmentControl,{value:a,onChange:e=>{t({textAlign:e})}})),(0,je.createElement)("div",{...c},s))},df=(0,je.createElement)(Ke.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},(0,je.createElement)(Ke.Path,{d:"M12 3c-5 0-9 4-9 9s4 9 9 9 9-4 9-9-4-9-9-9zm0 16.5c-4.1 0-7.5-3.4-7.5-7.5S7.9 4.5 12 4.5s7.5 3.4 7.5 7.5-3.4 7.5-7.5 7.5zM12 7l-1 5c0 .3.2.6.4.8l4.2 2.8-2.7-4.1L12 7z"}));const gf={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,__experimental:!0,name:"core/post-time-to-read",title:"Time To Read",category:"theme",description:"Show minutes required to finish reading the post.",textdomain:"default",usesContext:["postId","postType"],attributes:{textAlign:{type:"string"}},supports:{color:{gradients:!0,__experimentalDefaultControls:{background:!0,text:!0}},html:!1,spacing:{margin:!0,padding:!0,__experimentalDefaultControls:{margin:!1,padding:!1}},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}}}},{name:hf}=gf,_f={icon:df,edit:pf},bf=()=>Qe({name:hf,metadata:gf,settings:_f});const ff={attributes:{textAlign:{type:"string"},level:{type:"number",default:2},isLink:{type:"boolean",default:!1},rel:{type:"string",attribute:"rel",default:""},linkTarget:{type:"string",default:"_self"}},supports:{align:["wide","full"],html:!1,color:{gradients:!0,link:!0},spacing:{margin:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0}},save(){return null},migrate:en,isEligible({style:e}){return e?.typography?.fontFamily}};var vf=[ff];const yf={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/post-title",title:"Title",category:"theme",description:"Displays the title of a post, page, or any other content-type.",textdomain:"default",usesContext:["postId","postType","queryId"],attributes:{textAlign:{type:"string"},level:{type:"number",default:2},isLink:{type:"boolean",default:!1},rel:{type:"string",attribute:"rel",default:""},linkTarget:{type:"string",default:"_self"}},supports:{align:["wide","full"],html:!1,color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0,link:!0}},spacing:{margin:!0,padding:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0,fontAppearance:!0,textTransform:!0}}},style:"wp-block-post-title"},{name:kf}=yf,xf={icon:fr,edit:function({attributes:{level:e,textAlign:t,isLink:n,rel:a,linkTarget:o},setAttributes:r,context:{postType:l,postId:i,queryId:s},insertBlocksAfter:c}){const u="h"+e,m=ab("postType",!Number.isFinite(s)&&l,i),[p="",d,g]=(0,ct.useEntityProp)("postType",l,"title",i),[h]=(0,ct.useEntityProp)("postType",l,"link",i),_=()=>{c((0,qe.createBlock)((0,qe.getDefaultBlockName)()))},b=(0,Je.useBlockProps)({className:it()({[`has-text-align-${t}`]:t})}),f=(0,Je.useBlockEditingMode)();let v=(0,je.createElement)(u,{...b},(0,Ye.__)("Title"));return l&&i&&(v=m?(0,je.createElement)(Je.PlainText,{tagName:u,placeholder:(0,Ye.__)("No Title"),value:p,onChange:d,__experimentalVersion:2,__unstableOnSplitAtEnd:_,...b}):(0,je.createElement)(u,{...b,dangerouslySetInnerHTML:{__html:g?.rendered}})),n&&l&&i&&(v=m?(0,je.createElement)(u,{...b},(0,je.createElement)(Je.PlainText,{tagName:"a",href:h,target:o,rel:a,placeholder:p.length?null:(0,Ye.__)("No Title"),value:p,onChange:d,__experimentalVersion:2,__unstableOnSplitAtEnd:_})):(0,je.createElement)(u,{...b},(0,je.createElement)("a",{href:h,target:o,rel:a,onClick:e=>e.preventDefault(),dangerouslySetInnerHTML:{__html:g?.rendered}}))),(0,je.createElement)(je.Fragment,null,"default"===f&&(0,je.createElement)(Je.BlockControls,{group:"block"},(0,je.createElement)(Je.HeadingLevelDropdown,{value:e,onChange:e=>r({level:e})}),(0,je.createElement)(Je.AlignmentControl,{value:t,onChange:e=>{r({textAlign:e})}})),(0,je.createElement)(Je.InspectorControls,null,(0,je.createElement)(Ke.PanelBody,{title:(0,Ye.__)("Settings")},(0,je.createElement)(Ke.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,Ye.__)("Make title a link"),onChange:()=>r({isLink:!n}),checked:n}),n&&(0,je.createElement)(je.Fragment,null,(0,je.createElement)(Ke.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,Ye.__)("Open in new tab"),onChange:e=>r({linkTarget:e?"_blank":"_self"}),checked:"_blank"===o}),(0,je.createElement)(Ke.TextControl,{__nextHasNoMarginBottom:!0,label:(0,Ye.__)("Link rel"),value:a,onChange:e=>r({rel:e})})))),v)},deprecated:vf},wf=()=>Qe({name:kf,metadata:yf,settings:xf});var Ef=(0,je.createElement)(We.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,je.createElement)(We.Path,{d:"M18 4H6c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm.5 14c0 .3-.2.5-.5.5H6c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h12c.3 0 .5.2.5.5v12zM7 16.5h6V15H7v1.5zm4-4h6V11h-6v1.5zM9 11H7v1.5h2V11zm6 5.5h2V15h-2v1.5z"}));const Cf={from:[{type:"block",blocks:["core/code","core/paragraph"],transform:({content:e,anchor:t})=>(0,qe.createBlock)("core/preformatted",{content:e,anchor:t})},{type:"raw",isMatch:e=>"PRE"===e.nodeName&&!(1===e.children.length&&"CODE"===e.firstChild.nodeName),schema:({phrasingContentSchema:e})=>({pre:{children:e}})}],to:[{type:"block",blocks:["core/paragraph"],transform:e=>(0,qe.createBlock)("core/paragraph",{...e,content:e.content.replace(/\n/g,"
")})},{type:"block",blocks:["core/code"],transform:e=>(0,qe.createBlock)("core/code",e)}]};var Sf=Cf;const Bf={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/preformatted",title:"Preformatted",category:"text",description:"Add text that respects your spacing and tabs, and also allows styling.",textdomain:"default",attributes:{content:{type:"string",source:"html",selector:"pre",default:"",__unstablePreserveWhiteSpace:!0,__experimentalRole:"content"}},supports:{anchor:!0,color:{gradients:!0,__experimentalDefaultControls:{background:!0,text:!0}},spacing:{padding:!0,margin:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}}},style:"wp-block-preformatted"},{name:Tf}=Bf,Nf={icon:Ef,example:{attributes:{content:(0,Ye.__)("EXT. XANADU - FAINT DAWN - 1940 (MINIATURE)\nWindow, very small in the distance, illuminated.\nAll around this is an almost totally black screen. Now, as the camera moves slowly towards the window which is almost a postage stamp in the frame, other forms appear;")}},transforms:Sf,edit:function({attributes:e,mergeBlocks:t,setAttributes:n,onRemove:a,insertBlocksAfter:o,style:r}){const{content:l}=e,i=(0,Je.useBlockProps)({style:r});return(0,je.createElement)(Je.RichText,{tagName:"pre",identifier:"content",preserveWhiteSpace:!0,value:l,onChange:e=>{n({content:e})},onRemove:a,"aria-label":(0,Ye.__)("Preformatted text"),placeholder:(0,Ye.__)("Write preformatted text…"),onMerge:t,...i,__unstablePastePlainText:!0,__unstableOnSplitAtDoubleLineEnd:()=>o((0,qe.createBlock)((0,qe.getDefaultBlockName)()))})},save:function({attributes:e}){const{content:t}=e;return(0,je.createElement)("pre",{...Je.useBlockProps.save()},(0,je.createElement)(Je.RichText.Content,{value:t}))},merge(e,t){return{content:e.content+"\n\n"+t.content}}},Pf=()=>Qe({name:Tf,metadata:Bf,settings:Nf});var If=(0,je.createElement)(We.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,je.createElement)(We.Path,{d:"M18 8H6c-1.1 0-2 .9-2 2v4c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2v-4c0-1.1-.9-2-2-2zm.5 6c0 .3-.2.5-.5.5H6c-.3 0-.5-.2-.5-.5v-4c0-.3.2-.5.5-.5h12c.3 0 .5.2.5.5v4zM4 4v1.5h16V4H4zm0 16h16v-1.5H4V20z"}));const Mf="is-style-solid-color",zf={value:{type:"string",source:"html",selector:"blockquote",multiline:"p"},citation:{type:"string",source:"html",selector:"cite",default:""},mainColor:{type:"string"},customMainColor:{type:"string"},textColor:{type:"string"},customTextColor:{type:"string"}};function Rf(e){if(!e)return;const t=e.match(/border-color:([^;]+)[;]?/);return t&&t[1]?t[1]:void 0}function Hf(e){const t=`${e=e||""}`.split("
");return t.shift(),t.pop(),t.join("
")}const Af={attributes:{value:{type:"string",source:"html",selector:"blockquote",multiline:"p",__experimentalRole:"content"},citation:{type:"string",source:"html",selector:"cite",default:"",__experimentalRole:"content"},textAlign:{type:"string"}},save({attributes:e}){const{textAlign:t,citation:n,value:a}=e,o=!Je.RichText.isEmpty(n);return(0,je.createElement)("figure",{...Je.useBlockProps.save({className:it()({[`has-text-align-${t}`]:t})})},(0,je.createElement)("blockquote",null,(0,je.createElement)(Je.RichText.Content,{value:a,multiline:!0}),o&&(0,je.createElement)(Je.RichText.Content,{tagName:"cite",value:n})))},migrate({value:e,...t}){return{value:Hf(e),...t}}},Lf={attributes:{...zf},save({attributes:e}){const{mainColor:t,customMainColor:n,customTextColor:a,textColor:o,value:r,citation:l,className:i}=e,s=i?.includes(Mf);let c,u;if(s){const e=(0,Je.getColorClassName)("background-color",t);c=it()({"has-background":e||n,[e]:e}),u={backgroundColor:e?void 0:n}}else n&&(u={borderColor:n});const m=(0,Je.getColorClassName)("color",o),p=it()({"has-text-color":o||a,[m]:m}),d=m?void 0:{color:a};return(0,je.createElement)("figure",{...Je.useBlockProps.save({className:c,style:u})},(0,je.createElement)("blockquote",{className:p,style:d},(0,je.createElement)(Je.RichText.Content,{value:r,multiline:!0}),!Je.RichText.isEmpty(l)&&(0,je.createElement)(Je.RichText.Content,{tagName:"cite",value:l})))},migrate({value:e,className:t,mainColor:n,customMainColor:a,customTextColor:o,...r}){const l=t?.includes(Mf);let i;return a&&(i=l?{color:{background:a}}:{border:{color:a}}),o&&i&&(i.color={...i.color,text:o}),{value:Hf(e),className:t,backgroundColor:l?n:void 0,borderColor:l?void 0:n,textAlign:l?"left":void 0,style:i,...r}}},Df={attributes:{...zf,figureStyle:{source:"attribute",selector:"figure",attribute:"style"}},save({attributes:e}){const{mainColor:t,customMainColor:n,textColor:a,customTextColor:o,value:r,citation:l,className:i,figureStyle:s}=e,c=i?.includes(Mf);let u,m;if(c){const e=(0,Je.getColorClassName)("background-color",t);u=it()({"has-background":e||n,[e]:e}),m={backgroundColor:e?void 0:n}}else if(n)m={borderColor:n};else if(t){m={borderColor:Rf(s)}}const p=(0,Je.getColorClassName)("color",a),d=(a||o)&&it()("has-text-color",{[p]:p}),g=p?void 0:{color:o};return(0,je.createElement)("figure",{className:u,style:m},(0,je.createElement)("blockquote",{className:d,style:g},(0,je.createElement)(Je.RichText.Content,{value:r,multiline:!0}),!Je.RichText.isEmpty(l)&&(0,je.createElement)(Je.RichText.Content,{tagName:"cite",value:l})))},migrate({value:e,className:t,figureStyle:n,mainColor:a,customMainColor:o,customTextColor:r,...l}){const i=t?.includes(Mf);let s;if(o&&(s=i?{color:{background:o}}:{border:{color:o}}),r&&s&&(s.color={...s.color,text:r}),!i&&a&&n){const a=Rf(n);if(a)return{value:Hf(e),...l,className:t,style:{border:{color:a}}}}return{value:Hf(e),className:t,backgroundColor:i?a:void 0,borderColor:i?void 0:a,textAlign:i?"left":void 0,style:s,...l}}},Vf={attributes:zf,save({attributes:e}){const{mainColor:t,customMainColor:n,textColor:a,customTextColor:o,value:r,citation:l,className:i}=e,s=i?.includes(Mf);let c,u;if(s)c=(0,Je.getColorClassName)("background-color",t),c||(u={backgroundColor:n});else if(n)u={borderColor:n};else if(t){var m;const e=null!==(m=(0,ut.select)(Je.store).getSettings().colors)&&void 0!==m?m:[];u={borderColor:(0,Je.getColorObjectByAttributeValues)(e,t).color}}const p=(0,Je.getColorClassName)("color",a),d=a||o?it()("has-text-color",{[p]:p}):void 0,g=p?void 0:{color:o};return(0,je.createElement)("figure",{className:c,style:u},(0,je.createElement)("blockquote",{className:d,style:g},(0,je.createElement)(Je.RichText.Content,{value:r,multiline:!0}),!Je.RichText.isEmpty(l)&&(0,je.createElement)(Je.RichText.Content,{tagName:"cite",value:l})))},migrate({value:e,className:t,mainColor:n,customMainColor:a,customTextColor:o,...r}){const l=t?.includes(Mf);let i={};return a&&(i=l?{color:{background:a}}:{border:{color:a}}),o&&i&&(i.color={...i.color,text:o}),{value:Hf(e),className:t,backgroundColor:l?n:void 0,borderColor:l?void 0:n,textAlign:l?"left":void 0,style:i,...r}}},Ff={attributes:{...zf},save({attributes:e}){const{value:t,citation:n}=e;return(0,je.createElement)("blockquote",null,(0,je.createElement)(Je.RichText.Content,{value:t,multiline:!0}),!Je.RichText.isEmpty(n)&&(0,je.createElement)(Je.RichText.Content,{tagName:"cite",value:n}))},migrate({value:e,...t}){return{value:Hf(e),...t}}},$f={attributes:{...zf,citation:{type:"string",source:"html",selector:"footer"},align:{type:"string",default:"none"}},save({attributes:e}){const{value:t,citation:n,align:a}=e;return(0,je.createElement)("blockquote",{className:`align${a}`},(0,je.createElement)(Je.RichText.Content,{value:t,multiline:!0}),!Je.RichText.isEmpty(n)&&(0,je.createElement)(Je.RichText.Content,{tagName:"footer",value:n}))},migrate({value:e,...t}){return{value:Hf(e),...t}}};var Gf=[Af,Lf,Df,Vf,Ff,$f];const Of="web"===je.Platform.OS;var Uf=function({attributes:e,setAttributes:t,isSelected:n,insertBlocksAfter:a}){const{textAlign:o,citation:r,value:l}=e,i=(0,Je.useBlockProps)({className:it()({[`has-text-align-${o}`]:o})}),s=!Je.RichText.isEmpty(r)||n;return(0,je.createElement)(je.Fragment,null,(0,je.createElement)(Je.BlockControls,{group:"block"},(0,je.createElement)(Je.AlignmentControl,{value:o,onChange:e=>{t({textAlign:e})}})),(0,je.createElement)("figure",{...i},(0,je.createElement)("blockquote",null,(0,je.createElement)(Je.RichText,{identifier:"value",tagName:"p",value:l,onChange:e=>t({value:e}),"aria-label":(0,Ye.__)("Pullquote text"),placeholder:(0,Ye.__)("Add quote"),textAlign:"center"}),s&&(0,je.createElement)(Je.RichText,{identifier:"citation",tagName:Of?"cite":void 0,style:{display:"block"},value:r,"aria-label":(0,Ye.__)("Pullquote citation text"),placeholder:(0,Ye.__)("Add citation"),onChange:e=>t({citation:e}),className:"wp-block-pullquote__citation",__unstableMobileNoFocusOnMount:!0,textAlign:"center",__unstableOnSplitAtEnd:()=>a((0,qe.createBlock)((0,qe.getDefaultBlockName)()))}))))};const qf={from:[{type:"block",isMultiBlock:!0,blocks:["core/paragraph"],transform:e=>(0,qe.createBlock)("core/pullquote",{value:(0,En.toHTMLString)({value:(0,En.join)(e.map((({content:e})=>(0,En.create)({html:e}))),"\n")}),anchor:e.anchor})},{type:"block",blocks:["core/heading"],transform:({content:e,anchor:t})=>(0,qe.createBlock)("core/pullquote",{value:e,anchor:t})}],to:[{type:"block",blocks:["core/paragraph"],transform:({value:e,citation:t})=>{const n=[];return e&&n.push((0,qe.createBlock)("core/paragraph",{content:e})),t&&n.push((0,qe.createBlock)("core/paragraph",{content:t})),0===n.length?(0,qe.createBlock)("core/paragraph",{content:""}):n}},{type:"block",blocks:["core/heading"],transform:({value:e,citation:t})=>{if(!e)return(0,qe.createBlock)("core/heading",{content:t});const n=(0,qe.createBlock)("core/heading",{content:e});return t?[n,(0,qe.createBlock)("core/heading",{content:t})]:n}}]};var jf=qf;const Wf={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:3,name:"core/pullquote",title:"Pullquote",category:"text",description:"Give special visual emphasis to a quote from your text.",textdomain:"default",attributes:{value:{type:"string",source:"html",selector:"p",__experimentalRole:"content"},citation:{type:"string",source:"html",selector:"cite",default:"",__experimentalRole:"content"},textAlign:{type:"string"}},supports:{anchor:!0,align:["left","right","wide","full"],color:{gradients:!0,background:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0}},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0,fontAppearance:!0}},__experimentalBorder:{color:!0,radius:!0,style:!0,width:!0,__experimentalDefaultControls:{color:!0,radius:!0,style:!0,width:!0}},__experimentalStyle:{typography:{fontSize:"1.5em",lineHeight:"1.6"}}},editorStyle:"wp-block-pullquote-editor",style:"wp-block-pullquote"},{name:Zf}=Wf,Qf={icon:If,example:{attributes:{value:(0,Ye.__)("One of the hardest things to do in technology is disrupt yourself."),citation:(0,Ye.__)("Matt Mullenweg")}},transforms:jf,edit:Uf,save:function({attributes:e}){const{textAlign:t,citation:n,value:a}=e,o=!Je.RichText.isEmpty(n);return(0,je.createElement)("figure",{...Je.useBlockProps.save({className:it()({[`has-text-align-${t}`]:t})})},(0,je.createElement)("blockquote",null,(0,je.createElement)(Je.RichText.Content,{tagName:"p",value:a}),o&&(0,je.createElement)(Je.RichText.Content,{tagName:"cite",value:n})))},deprecated:Gf},Kf=()=>Qe({name:Zf,metadata:Wf,settings:Qf});var Yf=(0,je.createElement)(We.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,je.createElement)(We.Path,{d:"M18.1823 11.6392C18.1823 13.0804 17.0139 14.2487 15.5727 14.2487C14.3579 14.2487 13.335 13.4179 13.0453 12.2922L13.0377 12.2625L13.0278 12.2335L12.3985 10.377L12.3942 10.3785C11.8571 8.64997 10.246 7.39405 8.33961 7.39405C5.99509 7.39405 4.09448 9.29465 4.09448 11.6392C4.09448 13.9837 5.99509 15.8843 8.33961 15.8843C8.88499 15.8843 9.40822 15.781 9.88943 15.5923L9.29212 14.0697C8.99812 14.185 8.67729 14.2487 8.33961 14.2487C6.89838 14.2487 5.73003 13.0804 5.73003 11.6392C5.73003 10.1979 6.89838 9.02959 8.33961 9.02959C9.55444 9.02959 10.5773 9.86046 10.867 10.9862L10.8772 10.9836L11.4695 12.7311C11.9515 14.546 13.6048 15.8843 15.5727 15.8843C17.9172 15.8843 19.8178 13.9837 19.8178 11.6392C19.8178 9.29465 17.9172 7.39404 15.5727 7.39404C15.0287 7.39404 14.5066 7.4968 14.0264 7.6847L14.6223 9.20781C14.9158 9.093 15.2358 9.02959 15.5727 9.02959C17.0139 9.02959 18.1823 10.1979 18.1823 11.6392Z"}));var Jf=(0,je.createElement)(We.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,je.createElement)(We.Path,{d:"m19 7.5h-7.628c-.3089-.87389-1.1423-1.5-2.122-1.5-.97966 0-1.81309.62611-2.12197 1.5h-2.12803v1.5h2.12803c.30888.87389 1.14231 1.5 2.12197 1.5.9797 0 1.8131-.62611 2.122-1.5h7.628z"}),(0,je.createElement)(We.Path,{d:"m19 15h-2.128c-.3089-.8739-1.1423-1.5-2.122-1.5s-1.8131.6261-2.122 1.5h-7.628v1.5h7.628c.3089.8739 1.1423 1.5 2.122 1.5s1.8131-.6261 2.122-1.5h2.128z"}));const Xf=e=>{const t=e?.reduce(((e,t)=>{const{mapById:n,mapByName:a,names:o}=e;return n[t.id]=t,a[t.name]=t,o.push(t.name),e}),{mapById:{},mapByName:{},names:[]});return{entities:e,...t}},ev=(e,t)=>{const n=t.split(".");let a=e;return n.forEach((e=>{a=a?.[e]})),a},tv=(e,t)=>(e||[]).map((e=>({...e,name:(0,Gn.decodeEntities)(ev(e,t))}))),nv=()=>{const e=(0,ut.useSelect)((e=>{const{getPostTypes:t}=e(ct.store),n=["attachment"],a=t({per_page:-1})?.filter((({viewable:e,slug:t})=>e&&!n.includes(t)));return a}),[]);return{postTypesTaxonomiesMap:(0,je.useMemo)((()=>{if(e?.length)return e.reduce(((e,t)=>(e[t.slug]=t.taxonomies,e)),{})}),[e]),postTypesSelectOptions:(0,je.useMemo)((()=>(e||[]).map((({labels:e,slug:t})=>({label:e.singular_name,value:t})))),[e])}},av=e=>(0,ut.useSelect)((t=>{const{getTaxonomies:n}=t(ct.store);return n({type:e,per_page:-1,context:"view"})}),[e]);function ov(e,t){return!e||e.includes(t)}function rv(e,t){const n=(0,ut.useSelect)((e=>e(qe.store).getActiveBlockVariation("core/query",t)?.name),[t]),a=`core/query/${n}`;return(0,ut.useSelect)((t=>{if(!n)return!1;const{getBlockRootClientId:o,getPatternsByBlockTypes:r}=t(Je.store),l=o(e);return r(a,l).length>0}),[e,n,a])?a:"core/query"}const lv=(e,t)=>(0,ut.useSelect)((n=>{const{getBlockRootClientId:a,getPatternsByBlockTypes:o}=n(Je.store),r=a(e);return o(t,r)}),[t,e]),iv=e=>(0,ut.useSelect)((t=>{const{getClientIdsOfDescendants:n,getBlockName:a}=t(Je.store);return n(e).filter((e=>{const t=a(e);return!t.startsWith("core/")||"core/post-content"===t||"core/template-part"===t||"core/block"===t}))}),[e]);function sv({attributes:{query:e},setQuery:t,openPatternSelectionModal:n,name:a,clientId:o}){const r=!!lv(o,a).length,l=(0,Tt.useInstanceId)(sv,"blocks-query-pagination-max-page-input");return(0,je.createElement)(je.Fragment,null,!e.inherit&&(0,je.createElement)(Ke.ToolbarGroup,null,(0,je.createElement)(Ke.Dropdown,{contentClassName:"block-library-query-toolbar__popover",renderToggle:({onToggle:e})=>(0,je.createElement)(Ke.ToolbarButton,{icon:Jf,label:(0,Ye.__)("Display settings"),onClick:e}),renderContent:()=>(0,je.createElement)(je.Fragment,null,(0,je.createElement)(Ke.BaseControl,null,(0,je.createElement)(Ke.__experimentalNumberControl,{__unstableInputWidth:"60px",label:(0,Ye.__)("Items per Page"),labelPosition:"edge",min:1,max:100,onChange:e=>{isNaN(e)||e<1||e>100||t({perPage:e})},step:"1",value:e.perPage,isDragEnabled:!1})),(0,je.createElement)(Ke.BaseControl,null,(0,je.createElement)(Ke.__experimentalNumberControl,{__unstableInputWidth:"60px",label:(0,Ye.__)("Offset"),labelPosition:"edge",min:0,max:100,onChange:e=>{isNaN(e)||e<0||e>100||t({offset:e})},step:"1",value:e.offset,isDragEnabled:!1})),(0,je.createElement)(Ke.BaseControl,{id:l,help:(0,Ye.__)("Limit the pages you want to show, even if the query has more results. To show all pages use 0 (zero).")},(0,je.createElement)(Ke.__experimentalNumberControl,{id:l,__unstableInputWidth:"60px",label:(0,Ye.__)("Max page to show"),labelPosition:"edge",min:0,onChange:e=>{isNaN(e)||e<0||t({pages:e})},step:"1",value:e.pages,isDragEnabled:!1})))})),r&&(0,je.createElement)(Ke.ToolbarGroup,{className:"wp-block-template-part__block-control-group"},(0,je.createElement)(Ke.ToolbarButton,{onClick:n},(0,Ye.__)("Replace"))))}const cv=[{label:(0,Ye.__)("Newest to oldest"),value:"date/desc"},{label:(0,Ye.__)("Oldest to newest"),value:"date/asc"},{label:(0,Ye.__)("A → Z"),value:"title/asc"},{label:(0,Ye.__)("Z → A"),value:"title/desc"}];var uv=function({order:e,orderBy:t,onChange:n}){return(0,je.createElement)(Ke.SelectControl,{__nextHasNoMarginBottom:!0,label:(0,Ye.__)("Order by"),value:`${t}/${e}`,options:cv,onChange:e=>{const[t,a]=e.split("/");n({order:a,orderBy:t})}})};const mv={who:"authors",per_page:-1,_fields:"id,name",context:"view"};var pv=function({value:e,onChange:t}){const n=(0,ut.useSelect)((e=>{const{getUsers:t}=e(ct.store);return t(mv)}),[]);if(!n)return null;const a=Xf(n),o=(e?e.toString().split(","):[]).reduce(((e,t)=>{const n=a.mapById[t];return n&&e.push({id:t,value:n.name}),e}),[]);return(0,je.createElement)(Ke.FormTokenField,{label:(0,Ye.__)("Authors"),value:o,suggestions:a.names,onChange:e=>{const n=Array.from(e.reduce(((e,t)=>{const n=((e,t)=>{const n=t?.id||e[t]?.id;if(n)return n})(a.mapByName,t);return n&&e.add(n),e}),new Set));t({author:n.join(",")})},__experimentalShowHowTo:!1})};const dv=[],gv={order:"asc",_fields:"id,title",context:"view"};var hv=function({parents:e,postType:t,onChange:n}){const[a,o]=(0,je.useState)(""),[r,l]=(0,je.useState)(dv),[i,s]=(0,je.useState)(dv),c=(0,Tt.useDebounce)(o,250),{searchResults:u,searchHasResolved:m}=(0,ut.useSelect)((n=>{if(!a)return{searchResults:dv,searchHasResolved:!0};const{getEntityRecords:o,hasFinishedResolution:r}=n(ct.store),l=["postType",t,{...gv,search:a,orderby:"relevance",exclude:e,per_page:20}];return{searchResults:o(...l),searchHasResolved:r("getEntityRecords",l)}}),[a,e]),p=(0,ut.useSelect)((n=>{if(!e?.length)return dv;const{getEntityRecords:a}=n(ct.store);return a("postType",t,{...gv,include:e,per_page:e.length})}),[e]);(0,je.useEffect)((()=>{if(e?.length||l(dv),!p?.length)return;const t=Xf(tv(p,"title.rendered")),n=e.reduce(((e,n)=>{const a=t.mapById[n];return a&&e.push({id:n,value:a.name}),e}),[]);l(n)}),[e,p]);const d=(0,je.useMemo)((()=>u?.length?Xf(tv(u,"title.rendered")):dv),[u]);return(0,je.useEffect)((()=>{m&&s(d.names)}),[d.names,m]),(0,je.createElement)(Ke.FormTokenField,{label:(0,Ye.__)("Parents"),value:r,onInputChange:c,suggestions:i,onChange:e=>{const t=Array.from(e.reduce(((e,t)=>{const n=((e,t)=>{const n=t?.id||e?.[t]?.id;if(n)return n})(d.mapByName,t);return n&&e.add(n),e}),new Set));s(dv),n({parents:t})},__experimentalShowHowTo:!1})};const _v=[],bv={order:"asc",_fields:"id,name",context:"view"},fv=(e,t)=>{const n=t?.id||e?.find((e=>e.name===t))?.id;if(n)return n;const a=t.toLocaleLowerCase();return e?.find((e=>e.name.toLocaleLowerCase()===a))?.id};function vv({onChange:e,query:t}){const{postType:n,taxQuery:a}=t,o=av(n);return o&&0!==o.length?(0,je.createElement)(je.Fragment,null,o.map((t=>{const n=a?.[t.slug]||[];return(0,je.createElement)(yv,{key:t.slug,taxonomy:t,termIds:n,onChange:n=>e({taxQuery:{...a,[t.slug]:n}})})}))):null}function yv({taxonomy:e,termIds:t,onChange:n}){const[a,o]=(0,je.useState)(""),[r,l]=(0,je.useState)(_v),[i,s]=(0,je.useState)(_v),c=(0,Tt.useDebounce)(o,250),{searchResults:u,searchHasResolved:m}=(0,ut.useSelect)((n=>{if(!a)return{searchResults:_v,searchHasResolved:!0};const{getEntityRecords:o,hasFinishedResolution:r}=n(ct.store),l=["taxonomy",e.slug,{...bv,search:a,orderby:"name",exclude:t,per_page:20}];return{searchResults:o(...l),searchHasResolved:r("getEntityRecords",l)}}),[a,t]),p=(0,ut.useSelect)((n=>{if(!t?.length)return _v;const{getEntityRecords:a}=n(ct.store);return a("taxonomy",e.slug,{...bv,include:t,per_page:t.length})}),[t]);(0,je.useEffect)((()=>{if(t?.length||l(_v),!p?.length)return;const e=t.reduce(((e,t)=>{const n=p.find((e=>e.id===t));return n&&e.push({id:t,value:n.name}),e}),[]);l(e)}),[t,p]),(0,je.useEffect)((()=>{m&&s(u.map((e=>e.name)))}),[u,m]);return(0,je.createElement)("div",{className:"block-library-query-inspector__taxonomy-control"},(0,je.createElement)(Ke.FormTokenField,{label:e.name,value:r,onInputChange:c,suggestions:i,onChange:e=>{const t=new Set;for(const n of e){const e=fv(u,n);e&&t.add(e)}s(_v),n(Array.from(t))},__experimentalShowHowTo:!1}))}const kv=[{label:(0,Ye.__)("Include"),value:""},{label:(0,Ye.__)("Exclude"),value:"exclude"},{label:(0,Ye.__)("Only"),value:"only"}];function xv({value:e,onChange:t}){return(0,je.createElement)(Ke.SelectControl,{__nextHasNoMarginBottom:!0,label:(0,Ye.__)("Sticky posts"),options:kv,value:e,onChange:t,help:(0,Ye.__)("Blog posts can be “stickied”, a feature that places them at the top of the front page of posts, keeping it there until new sticky posts are published.")})}function wv({enhancedPagination:e,setAttributes:t,clientId:n}){const a=iv(n);return(0,je.createElement)(je.Fragment,null,(0,je.createElement)(Ke.ToggleControl,{label:(0,Ye.__)("Enhanced pagination"),help:(0,Ye.__)("Browsing between pages won’t require a full page reload."),checked:!!e,disabled:a.length,onChange:e=>{t({enhancedPagination:!!e})}}),!!a.length&&(0,je.createElement)(Ke.Notice,{status:"warning",isDismissible:!1,className:"wp-block-query__enhanced-pagination-notice"},(0,Ye.__)("Enhanced pagination doesn't support the following blocks:"),(0,je.createElement)("ul",null,a.map((e=>(0,je.createElement)("li",{key:e},(0,je.createElement)(Je.BlockTitle,{clientId:e}))))),(0,Ye.__)("If you want to enable it, you have to remove all unsupported blocks first.")))}var Ev=({attributes:{query:{postType:e}={}}={}})=>{if(!e)return null;const t=(0,st.addQueryArgs)("post-new.php",{post_type:e});return(0,je.createElement)("div",{className:"wp-block-query__create-new-link"},(0,je.createInterpolateElement)((0,Ye.__)("Add new post"),{a:(0,je.createElement)("a",{href:t})}))};const{BlockInfo:Cv}=At(Je.privateApis);function Sv(e){const{attributes:t,setQuery:n,setDisplayLayout:a,setAttributes:o,clientId:r}=e,{query:l,displayLayout:i,enhancedPagination:s}=t,{order:c,orderBy:u,author:m,postType:p,sticky:d,inherit:g,taxQuery:h,parents:_}=l,b=function(e){return(0,ut.useSelect)((t=>t(qe.store).getActiveBlockVariation("core/query",e)?.allowedControls),[e])}(t),[f,v]=(0,je.useState)("post"===p),{postTypesTaxonomiesMap:y,postTypesSelectOptions:k}=nv(),x=av(p),w=function(e){return(0,ut.useSelect)((t=>{const n=t(ct.store).getPostType(e);return n?.viewable&&n?.hierarchical}),[e])}(p);(0,je.useEffect)((()=>{v("post"===p)}),[p]);const[E,C]=(0,je.useState)(l.search),S=(0,je.useCallback)((0,Tt.debounce)((()=>{l.search!==E&&n({search:E})}),250),[E,l.search]);(0,je.useEffect)((()=>(S(),S.cancel)),[E,S]);const B=ov(b,"inherit"),T=!g&&ov(b,"postType"),N=!g&&ov(b,"order"),P=!g&&f&&ov(b,"sticky"),I=B||T||N||P,M=!!x?.length&&ov(b,"taxQuery"),z=ov(b,"author"),R=ov(b,"search"),H=ov(b,"parents")&&w,A=M||z||R||H;return(0,je.createElement)(je.Fragment,null,(0,je.createElement)(Cv,null,(0,je.createElement)(Ev,{...e})),I&&(0,je.createElement)(Je.InspectorControls,null,(0,je.createElement)(Ke.PanelBody,{title:(0,Ye.__)("Settings")},B&&(0,je.createElement)(Ke.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,Ye.__)("Inherit query from template"),help:(0,Ye.__)("Toggle to use the global query context that is set with the current template, such as an archive or search. Disable to customize the settings independently."),checked:!!g,onChange:e=>n({inherit:!!e})}),T&&(0,je.createElement)(Ke.SelectControl,{__nextHasNoMarginBottom:!0,options:k,value:p,label:(0,Ye.__)("Post type"),onChange:e=>{const t={postType:e},a=y[e],o=Object.entries(h||{}).reduce(((e,[t,n])=>(a.includes(t)&&(e[t]=n),e)),{});t.taxQuery=Object.keys(o).length?o:void 0,"post"!==e&&(t.sticky=""),t.parents=[],n(t)},help:(0,Ye.__)("WordPress contains different types of content and they are divided into collections called “Post types”. By default there are a few different ones such as blog posts and pages, but plugins could add more.")}),false,N&&(0,je.createElement)(uv,{order:c,orderBy:u,onChange:n}),P&&(0,je.createElement)(xv,{value:d,onChange:e=>n({sticky:e})}),(0,je.createElement)(wv,{enhancedPagination:s,setAttributes:o,clientId:r}))),!g&&A&&(0,je.createElement)(Je.InspectorControls,null,(0,je.createElement)(Ke.__experimentalToolsPanel,{className:"block-library-query-toolspanel__filters",label:(0,Ye.__)("Filters"),resetAll:()=>{n({author:"",parents:[],search:"",taxQuery:null}),C("")}},M&&(0,je.createElement)(Ke.__experimentalToolsPanelItem,{label:(0,Ye.__)("Taxonomies"),hasValue:()=>Object.values(h||{}).some((e=>!!e.length)),onDeselect:()=>n({taxQuery:null})},(0,je.createElement)(vv,{onChange:n,query:l})),z&&(0,je.createElement)(Ke.__experimentalToolsPanelItem,{hasValue:()=>!!m,label:(0,Ye.__)("Authors"),onDeselect:()=>n({author:""})},(0,je.createElement)(pv,{value:m,onChange:n})),R&&(0,je.createElement)(Ke.__experimentalToolsPanelItem,{hasValue:()=>!!E,label:(0,Ye.__)("Keyword"),onDeselect:()=>C("")},(0,je.createElement)(Ke.TextControl,{__nextHasNoMarginBottom:!0,label:(0,Ye.__)("Keyword"),value:E,onChange:C})),H&&(0,je.createElement)(Ke.__experimentalToolsPanelItem,{hasValue:()=>!!_?.length,label:(0,Ye.__)("Parents"),onDeselect:()=>n({parents:[]})},(0,je.createElement)(hv,{parents:_,postType:p,onChange:n})))))}const Bv=(0,Ye.__)('You have added unsupported blocks. For the enhanced pagination to work, remove them, then re-enable "Enhanced pagination" in the Query Block settings.'),Tv="wp-block-query-enhanced-pagination-modal__description";function Nv({clientId:e,attributes:{enhancedPagination:t},setAttributes:n}){const[a,o]=(0,je.useState)(!1),r=iv(e);return(0,je.useEffect)((()=>{o(!!r.length&&t)}),[r.length,t,o]),a&&(0,je.createElement)(Ke.Modal,{title:(0,Ye.__)("Enhanced pagination will be disabled"),className:"wp-block-query__enhanced-pagination-modal",aria:{describedby:Tv},isDismissible:!1,shouldCloseOnEsc:!1,shouldCloseOnClickOutside:!1},(0,je.createElement)(Ke.__experimentalVStack,{alignment:"right",spacing:5},(0,je.createElement)("span",{id:Tv},Bv),(0,je.createElement)(Ke.Button,{variant:"primary",onClick:()=>{n({enhancedPagination:!1})}},(0,Ye.__)("OK"))))}const Pv=[["core/post-template"]];function Iv({attributes:e,setAttributes:t,openPatternSelectionModal:n,name:a,clientId:o}){const{queryId:r,query:l,displayLayout:i,tagName:s="div",query:{inherit:c}={}}=e,{__unstableMarkNextChangeAsNotPersistent:u}=(0,ut.useDispatch)(Je.store),m=(0,Tt.useInstanceId)(Iv),p=(0,Je.useBlockProps)(),d=(0,Je.useInnerBlocksProps)(p,{template:Pv}),{postsPerPage:g}=(0,ut.useSelect)((e=>{const{getSettings:t}=e(Je.store),{getEntityRecord:n,canUser:a}=e(ct.store);return{postsPerPage:(a("read","settings")?+n("root","site")?.posts_per_page:+t().postsPerPage)||3}}),[]);(0,je.useEffect)((()=>{const e={};(c&&l.perPage!==g||!l.perPage&&g)&&(e.perPage=g),Object.keys(e).length&&(u(),h(e))}),[l.perPage,g,c]),(0,je.useEffect)((()=>{Number.isFinite(r)||(u(),t({queryId:m}))}),[r,m]);const h=e=>t({query:{...l,...e}}),_={main:(0,Ye.__)("The element should be used for the primary content of your document only. "),section:(0,Ye.__)("The element should represent a standalone portion of the document that can't be better represented by another element."),aside:(0,Ye.__)("The