WordPress/wp-includes/js/dist/edit-site.min.js

7 lines
103 KiB
JavaScript

/*! This file is auto-generated */
this.wp=this.wp||{},this.wp.editSite=function(e){var t={};function n(r){if(t[r])return t[r].exports;var c=t[r]={i:r,l:!1,exports:{}};return e[r].call(c.exports,c,c.exports,n),c.l=!0,c.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var c in e)n.d(r,c,function(t){return e[t]}.bind(null,c));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s="IqXm")}({"1ZqX":function(e,t){e.exports=window.wp.data},"1iEr":function(e,t,n){"use strict";var r=n("GRId"),c=n("Tqx9");const a=Object(r.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(c.Path,{d:"M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z"}));t.a=a},"2gm7":function(e,t,n){"use strict";var r=n("GRId"),c=n("Tqx9");const a=Object(r.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(c.Path,{d:"M14.6 7l-1.2-1L8 12l5.4 6 1.2-1-4.6-5z"}));t.a=a},"51Zz":function(e,t){e.exports=window.wp.dataControls},"6aBm":function(e,t){e.exports=window.wp.mediaUtils},B9Az:function(e,t,n){"use strict";var r=n("GRId"),c=n("Tqx9");var a=Object(r.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(c.Path,{d:"M20.1 5.1L16.9 2 6.2 12.7l-1.3 4.4 4.5-1.3L20.1 5.1zM4 20.8h8v-1.5H4v1.5z"}));t.a=a},Cg8A:function(e,t,n){"use strict";var r=n("GRId"),c=n("Tqx9");const a=Object(r.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(c.Path,{fillRule:"evenodd",d:"M10.289 4.836A1 1 0 0111.275 4h1.306a1 1 0 01.987.836l.244 1.466c.787.26 1.503.679 2.108 1.218l1.393-.522a1 1 0 011.216.437l.653 1.13a1 1 0 01-.23 1.273l-1.148.944a6.025 6.025 0 010 2.435l1.149.946a1 1 0 01.23 1.272l-.653 1.13a1 1 0 01-1.216.437l-1.394-.522c-.605.54-1.32.958-2.108 1.218l-.244 1.466a1 1 0 01-.987.836h-1.306a1 1 0 01-.986-.836l-.244-1.466a5.995 5.995 0 01-2.108-1.218l-1.394.522a1 1 0 01-1.217-.436l-.653-1.131a1 1 0 01.23-1.272l1.149-.946a6.026 6.026 0 010-2.435l-1.148-.944a1 1 0 01-.23-1.272l.653-1.131a1 1 0 011.217-.437l1.393.522a5.994 5.994 0 012.108-1.218l.244-1.466zM14.929 12a3 3 0 11-6 0 3 3 0 016 0z",clipRule:"evenodd"}));t.a=a},Civd:function(e,t,n){"use strict";var r=n("GRId"),c=n("Tqx9");const a=Object(r.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(c.Path,{d:"M18 5.5H6a.5.5 0 00-.5.5v3h13V6a.5.5 0 00-.5-.5zm.5 5H10v8h8a.5.5 0 00.5-.5v-7.5zm-10 0h-3V18a.5.5 0 00.5.5h2.5v-8zM6 4h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2V6a2 2 0 012-2z"}));t.a=a},GRId:function(e,t){e.exports=window.wp.element},HSyU:function(e,t){e.exports=window.wp.blocks},IqXm:function(e,t,n){"use strict";n.r(t),n.d(t,"reinitializeEditor",(function(){return kr})),n.d(t,"initialize",(function(){return Ir})),n.d(t,"__experimentalMainDashboardButton",(function(){return yr})),n.d(t,"__experimentalNavigationToggle",(function(){return Sr})),n.d(t,"PluginSidebar",(function(){return wr})),n.d(t,"PluginSidebarMoreMenuItem",(function(){return xr})),n.d(t,"PluginMoreMenuItem",(function(){return Tr}));var r={};n.r(r),n.d(r,"toggleFeature",(function(){return G})),n.d(r,"__experimentalSetPreviewDeviceType",(function(){return z})),n.d(r,"setTemplate",(function(){return U})),n.d(r,"addTemplate",(function(){return H})),n.d(r,"removeTemplate",(function(){return q})),n.d(r,"setTemplatePart",(function(){return W})),n.d(r,"pushTemplatePart",(function(){return $})),n.d(r,"setHomeTemplateId",(function(){return X})),n.d(r,"setPage",(function(){return Y})),n.d(r,"goBack",(function(){return K})),n.d(r,"showHomepage",(function(){return Q})),n.d(r,"setNavigationPanelActiveMenu",(function(){return Z})),n.d(r,"openNavigationPanelToMenu",(function(){return J})),n.d(r,"setIsNavigationPanelOpened",(function(){return ee})),n.d(r,"setIsInserterOpened",(function(){return te})),n.d(r,"updateSettings",(function(){return ne})),n.d(r,"setIsListViewOpened",(function(){return re})),n.d(r,"revertTemplate",(function(){return ce})),n.d(r,"openGeneralSidebar",(function(){return ae})),n.d(r,"closeGeneralSidebar",(function(){return oe}));var c={};n.r(c),n.d(c,"isFeatureActive",(function(){return ue})),n.d(c,"__experimentalGetPreviewDeviceType",(function(){return de})),n.d(c,"getCanUserCreateMedia",(function(){return me})),n.d(c,"getSettings",(function(){return be})),n.d(c,"getHomeTemplateId",(function(){return pe})),n.d(c,"getEditedPostType",(function(){return je})),n.d(c,"getEditedPostId",(function(){return Ee})),n.d(c,"getPreviousEditedPostType",(function(){return fe})),n.d(c,"getPreviousEditedPostId",(function(){return ge})),n.d(c,"getPage",(function(){return he})),n.d(c,"getNavigationPanelActiveMenu",(function(){return ve})),n.d(c,"getCurrentTemplateNavigationPanelSubMenu",(function(){return ye})),n.d(c,"isNavigationOpened",(function(){return Se})),n.d(c,"isInserterOpened",(function(){return we})),n.d(c,"__experimentalGetInsertionPoint",(function(){return xe})),n.d(c,"isListViewOpened",(function(){return Te})),n.d(c,"getCurrentTemplateTemplateParts",(function(){return ke}));var a=n("GRId"),o=n("HSyU"),l=n("QyPg"),i=n("1ZqX"),s=n("jZUy"),u=n("rrFr"),d=n.n(u),m=n("tI+e"),b=n("l3Sj"),p=n("TvNi"),O=n("ywyh"),_=n.n(O),j=n("Tqx9");var E=Object(a.createElement)(j.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(a.createElement)(j.Path,{d:"M18 11.3l-1-1.1-4 4V3h-1.5v11.3L7 10.2l-1 1.1 6.2 5.8 5.8-5.8zm.5 3.7v3.5h-13V15H4v5h16v-5h-1.5z"})),f=n("YLtl");const{Fill:g,Slot:h}=Object(m.createSlotFill)("ToolsMoreMenuGroup");g.Slot=({fillProps:e})=>Object(a.createElement)(h,{fillProps:e},e=>!Object(f.isEmpty)(e)&&Object(a.createElement)(m.MenuGroup,{label:Object(b.__)("Tools")},e));var v=g;Object(p.registerPlugin)("edit-site",{render:()=>Object(a.createElement)(a.Fragment,null,Object(a.createElement)(v,null,Object(a.createElement)(m.MenuItem,{role:"menuitem",icon:E,onClick:()=>_()({path:"/__experimental/edit-site/v1/export",parse:!1}).then(e=>e.blob()).then(e=>d()(e,"edit-site-export.zip","application/zip")),info:Object(b.__)("Download your templates and template parts.")},Object(b.__)("Export"))))});var y=n("g56x"),S=n("6aBm");Object(y.addFilter)("editor.MediaUpload","core/edit-site/components/media-upload",()=>S.MediaUpload);var w=n("51Zz");const x={},T="core/edit-site",k={header:Object(b.__)("Header"),footer:Object(b.__)("Footer"),sidebar:Object(b.__)("Sidebar"),uncategorized:Object(b.__)("General")},I=["index","singular","archive","single","page","home","404","search","author","category","taxonomy","date","tag","attachment","single-post","front-page"],C=["page-home"],P=["post-","author-","single-post-","tag-"],N=["page-"],R={singular:["single","page"],index:["archive","404","search","singular","home"],home:["front-page"]},M=[{area:"header",menu:"template-parts-headers",title:Object(b.__)("headers")},{area:"footer",menu:"template-parts-footers",title:Object(b.__)("footers")},{area:"sidebar",menu:"template-parts-sidebars",title:Object(b.__)("sidebars")},{area:"uncategorized",menu:"template-parts-general",title:Object(b.__)("general")}],A=Object(i.combineReducers)({features(e=x,t){switch(t.type){case"TOGGLE_FEATURE":return{...e,[t.feature]:!e[t.feature]};default:return e}}});var B=Object(i.combineReducers)({preferences:A,deviceType:function(e="Desktop",t){switch(t.type){case"SET_PREVIEW_DEVICE_TYPE":return t.deviceType}return e},settings:function(e={},t){switch(t.type){case"UPDATE_SETTINGS":return{...e,...t.settings}}return e},editedPost:function(e=[],t){switch(t.type){case"SET_TEMPLATE":case"SET_PAGE":return[{type:"wp_template",id:t.templateId,page:t.page}];case"SET_TEMPLATE_PART":return[{type:"wp_template_part",id:t.templatePartId}];case"PUSH_TEMPLATE_PART":return[...e,{type:"wp_template_part",id:t.templatePartId}];case"GO_BACK":return e.slice(0,-1)}return e},homeTemplateId:function(e,t){switch(t.type){case"SET_HOME_TEMPLATE":return t.homeTemplateId}return e},navigationPanel:function(e={menu:"root",isOpen:!1},t){switch(t.type){case"SET_NAVIGATION_PANEL_ACTIVE_MENU":return{...e,menu:t.menu};case"OPEN_NAVIGATION_PANEL_TO_MENU":return{...e,isOpen:!0,menu:t.menu};case"SET_IS_NAVIGATION_PANEL_OPENED":return{...e,menu:t.isOpen?e.menu:"root",isOpen:t.isOpen};case"SET_IS_LIST_VIEW_OPENED":return{...e,menu:e.isOpen&&t.isOpen?"root":e.menu,isOpen:!t.isOpen&&e.isOpen};case"SET_IS_INSERTER_OPENED":return{...e,menu:e.isOpen&&t.value?"root":e.menu,isOpen:!t.value&&e.isOpen}}return e},blockInserterPanel:function(e=!1,t){switch(t.type){case"OPEN_NAVIGATION_PANEL_TO_MENU":return!1;case"SET_IS_NAVIGATION_PANEL_OPENED":case"SET_IS_LIST_VIEW_OPENED":return!t.isOpen&&e;case"SET_IS_INSERTER_OPENED":return t.value}return e},listViewPanel:function(e=!1,t){switch(t.type){case"OPEN_NAVIGATION_PANEL_TO_MENU":return!1;case"SET_IS_NAVIGATION_PANEL_OPENED":return!t.isOpen&&e;case"SET_IS_INSERTER_OPENED":return!t.value&&e;case"SET_IS_LIST_VIEW_OPENED":return t.isOpen}return e}}),L=n("Mmq9"),D=n("onLe"),F=n("U60i");function V(e){return!!e&&("custom"===(null==e?void 0:e.source)&&(null==e?void 0:e.has_theme_file))}function G(e){return{type:"TOGGLE_FEATURE",feature:e}}function z(e){return{type:"SET_PREVIEW_DEVICE_TYPE",deviceType:e}}function*U(e,t){const n={templateSlug:t};if(!t){const t=yield i.controls.resolveSelect(s.store,"getEntityRecord","postType","wp_template",e);n.templateSlug=null==t?void 0:t.slug}return{type:"SET_TEMPLATE",templateId:e,page:{context:n}}}function*H(e){const t=yield i.controls.dispatch(s.store,"saveEntityRecord","postType","wp_template",e);return e.content&&(yield i.controls.dispatch(s.store,"editEntityRecord","postType","wp_template",t.id,{blocks:Object(o.parse)(e.content)},{undoIgnore:!0})),{type:"SET_TEMPLATE",templateId:t.id,page:{context:{templateSlug:t.slug}}}}function*q(e){yield Object(w.apiFetch)({path:"/wp/v2/templates/"+e,method:"DELETE"});const t=yield i.controls.select(T,"getPage");yield i.controls.dispatch(T,"setPage",t)}function W(e){return{type:"SET_TEMPLATE_PART",templatePartId:e}}function $(e){return{type:"PUSH_TEMPLATE_PART",templatePartId:e}}function X(e){return{type:"SET_HOME_TEMPLATE",homeTemplateId:e}}function*Y(e){var t;if(!e.path&&null!==(t=e.context)&&void 0!==t&&t.postId){const t=yield i.controls.resolveSelect(s.store,"getEntityRecord","postType",e.context.postType||"post",e.context.postId);e.path=Object(L.getPathAndQueryString)(t.link)}const{id:n,slug:r}=yield i.controls.resolveSelect(s.store,"__experimentalGetTemplateForLink",e.path);return yield{type:"SET_PAGE",page:r?{...e,context:{...e.context,templateSlug:r}}:e,templateId:n},n}function K(){return{type:"GO_BACK"}}function*Q(){const{show_on_front:e,page_on_front:t}=yield i.controls.resolveSelect(s.store,"getEntityRecord","root","site"),{siteUrl:n}=yield i.controls.select(T,"getSettings"),r={path:n,context:"page"===e?{postType:"page",postId:t}:{}},c=yield*Y(r);yield X(c)}function Z(e){return{type:"SET_NAVIGATION_PANEL_ACTIVE_MENU",menu:e}}function J(e){return{type:"OPEN_NAVIGATION_PANEL_TO_MENU",menu:e}}function ee(e){return{type:"SET_IS_NAVIGATION_PANEL_OPENED",isOpen:e}}function te(e){return{type:"SET_IS_INSERTER_OPENED",value:e}}function ne(e){return{type:"UPDATE_SETTINGS",settings:e}}function re(e){return{type:"SET_IS_LIST_VIEW_OPENED",isOpen:e}}function*ce(e){if(V(e))try{var t;const n=yield i.controls.select(s.store,"getEntity","postType",e.type);if(!n)return void(yield i.controls.dispatch(D.store,"createErrorNotice",Object(b.__)("The editor has encountered an unexpected error. Please reload."),{type:"snackbar"}));const r=Object(L.addQueryArgs)(`${n.baseURL}/${e.id}`,{context:"edit",source:"theme"}),c=yield Object(w.apiFetch)({path:r});if(!c)return void(yield i.controls.dispatch(D.store,"createErrorNotice",Object(b.__)("The editor has encountered an unexpected error. Please reload."),{type:"snackbar"}));const a=({blocks:e=[]})=>Object(o.__unstableSerializeAndClean)(e),l=yield i.controls.select(s.store,"getEditedEntityRecord","postType",e.type,e.id);yield i.controls.dispatch(s.store,"editEntityRecord","postType",e.type,e.id,{content:a,blocks:l.blocks,source:"custom"},{undoIgnore:!0});const u=Object(o.parse)(null==c||null===(t=c.content)||void 0===t?void 0:t.raw);yield i.controls.dispatch(s.store,"editEntityRecord","postType",e.type,c.id,{content:a,blocks:u,source:"theme"});const d=async()=>{await Object(i.dispatch)(s.store).editEntityRecord("postType",e.type,l.id,{content:a,blocks:l.blocks,source:"custom"})};yield i.controls.dispatch(D.store,"createSuccessNotice",Object(b.__)("Template reverted."),{type:"snackbar",actions:[{label:Object(b.__)("Undo"),onClick:d}]})}catch(e){const t=e.message&&"unknown_error"!==e.code?e.message:Object(b.__)("Template revert failed. Please reload.");yield i.controls.dispatch(D.store,"createErrorNotice",t,{type:"snackbar"})}else yield i.controls.dispatch(D.store,"createErrorNotice",Object(b.__)("This template is not revertable."),{type:"snackbar"})}function*ae(e){yield i.controls.dispatch(F.i,"enableComplementaryArea",T,e)}function*oe(){yield i.controls.dispatch(F.i,"disableComplementaryArea",T)}var le=n("pPDe");function ie(e,t,n){return!!R[e]&&("home"===e&&"posts"!==n||R[e].every(e=>t.includes(e)||ie(e,t,n)))}function se(e){if(I.includes(e))return"templates";if(C.includes(e))return"templates-general";if(P.some(t=>e.startsWith(t)))return"templates-posts";return N.some(t=>e.startsWith(t))?"templates-pages":"templates-general"}function ue(e,t){return Object(f.get)(e.preferences.features,[t],!1)}function de(e){return e.deviceType}const me=Object(i.createRegistrySelector)(e=>()=>e(s.store).canUser("create","media")),be=Object(le.a)((e,t)=>{const n={...e.settings,outlineMode:!0,focusMode:ue(e,"focusMode"),hasFixedToolbar:ue(e,"fixedToolbar"),__experimentalSetIsInserterOpened:t};return me(e)?(n.mediaUpload=({onError:t,...n})=>{Object(S.uploadMedia)({wpAllowedMimeTypes:e.settings.allowedMimeTypes,onError:({message:e})=>t(e),...n})},n):n},e=>[me(e),e.settings,ue(e,"focusMode"),ue(e,"fixedToolbar")]);function pe(e){return e.homeTemplateId}function Oe(e){return e.editedPost[e.editedPost.length-1]||{}}function _e(e){return e.editedPost[e.editedPost.length-2]||{}}function je(e){return Oe(e).type}function Ee(e){return Oe(e).id}function fe(e){return _e(e).type}function ge(e){return _e(e).id}function he(e){return Oe(e).page}function ve(e){return e.navigationPanel.menu}const ye=Object(i.createRegistrySelector)(e=>t=>{const n=je(t),r=Ee(t),c=r?e(s.store).getEntityRecord("postType",n,r):null;if(!c)return"root";var a;if("wp_template_part"===n)return(null===(a=M.find(e=>e.area===(null==c?void 0:c.area)))||void 0===a?void 0:a.menu)||"template-parts";const o=e(s.store).getEntityRecords("postType","wp_template"),l=e(s.store).getEditedEntityRecord("root","site").show_on_front;return ie(c.slug,Object(f.map)(o,"slug"),l)?"templates-unused":se(c.slug)});function Se(e){return e.navigationPanel.isOpen}function we(e){return!!e.blockInserterPanel}function xe(e){const{rootClientId:t,insertionIndex:n,filterValue:r}=e.blockInserterPanel;return{rootClientId:t,insertionIndex:n,filterValue:r}}function Te(e){return e.listViewPanel}const ke=Object(i.createRegistrySelector)(e=>t=>{var n;const r=je(t),c=Ee(t),a=e(s.store).getEditedEntityRecord("postType",r,c),l=e(s.store).getEntityRecords("postType","wp_template_part"),i=Object(f.keyBy)(l,e=>e.id);return(null!==(n=a.blocks)&&void 0!==n?n:[]).filter(e=>Object(o.isTemplatePart)(e)).map(e=>{const{attributes:{theme:t,slug:n}}=e;return{templatePart:i[`${t}//${n}`],block:e}}).filter(({templatePart:e})=>!!e)}),Ie={reducer:B,actions:r,selectors:c,controls:w.controls,persist:["preferences"]},Ce=Object(i.createReduxStore)(T,Ie);Object(i.registerStore)(T,Ie);var Pe=n("axFQ"),Ne=n("jSdM"),Re=n("hF7m"),Me=n("K9lf"),Ae=n("Q4Sy"),Be=n("OzlF"),Le=n("wduq");var De=function({icon:e}){const{isRequestingSiteIcon:t,siteIconUrl:n}=Object(i.useSelect)(e=>{const{getEntityRecord:t,isResolving:n}=e(s.store),r=t("root","__unstableBase",void 0)||{};return{isRequestingSiteIcon:n("core","getEntityRecord",["root","__unstableBase",void 0]),siteIconUrl:r.site_icon_url}},[]),r=Object(Me.useReducedMotion)();let c=Object(a.createElement)(m.Icon,{size:"36px",icon:Le.a});const o={expand:{scale:1.7,borderRadius:0,transition:{type:"tween",duration:"0.2"}}};return n?c=Object(a.createElement)(m.__unstableMotion.img,{variants:!r&&o,alt:Object(b.__)("Site Icon"),className:"edit-site-navigation-link__site-icon",src:n}):t?c=null:e&&(c=Object(a.createElement)(m.Icon,{size:"36px",icon:e})),Object(a.createElement)(m.__unstableMotion.div,{className:"edit-site-navigation-link",whileHover:"expand"},Object(a.createElement)(m.Button,{className:"edit-site-navigation-link__button has-icon",label:Object(b.__)("Dashboard"),href:"index.php"},c))},Fe=n("VKE3"),Ve=n("RMJe"),Ge=n("gdqT");function ze({feature:e,label:t,info:n,messageActivated:r,messageDeactivated:c}){const o=Object(i.useSelect)(t=>t(Ce).isFeatureActive(e),[]),{toggleFeature:l}=Object(i.useDispatch)(Ce);return Object(a.createElement)(m.MenuItem,{icon:o&&Ve.a,isSelected:o,onClick:Object(f.flow)(l.bind(null,e),()=>{o?Object(Ge.speak)(c||Object(b.__)("Feature deactivated")):Object(Ge.speak)(r||Object(b.__)("Feature activated"))}),role:"menuitemcheckbox",info:n},t)}const Ue={className:"edit-site-more-menu__content",position:"bottom left"},He={tooltipPosition:"bottom"};var qe=()=>Object(a.createElement)(m.DropdownMenu,{className:"edit-site-more-menu",icon:Fe.a,label:Object(b.__)("More tools & options"),popoverProps:Ue,toggleProps:He},({onClose:e})=>Object(a.createElement)(a.Fragment,null,Object(a.createElement)(m.MenuGroup,{label:Object(b._x)("View","noun")},Object(a.createElement)(ze,{feature:"fixedToolbar",label:Object(b.__)("Top toolbar"),info:Object(b.__)("Access all block and document tools in a single place"),messageActivated:Object(b.__)("Top toolbar activated"),messageDeactivated:Object(b.__)("Top toolbar deactivated")}),Object(a.createElement)(ze,{feature:"focusMode",label:Object(b.__)("Spotlight mode"),info:Object(b.__)("Focus on one block at a time"),messageActivated:Object(b.__)("Spotlight mode activated"),messageDeactivated:Object(b.__)("Spotlight mode deactivated")}),Object(a.createElement)(F.a.Slot,{name:"core/edit-site/plugin-more-menu",label:Object(b.__)("Plugins"),as:m.MenuGroup,fillProps:{onClick:e}})),Object(a.createElement)(v.Slot,{fillProps:{onClose:e}})));function We({openEntitiesSavedStates:e,isEntitiesSavedStatesOpen:t}){const{isDirty:n,isSaving:r}=Object(i.useSelect)(e=>{const{__experimentalGetDirtyEntityRecords:t,isSavingEntityRecord:n}=e(s.store),r=t();return{isDirty:r.length>0,isSaving:Object(f.some)(r,e=>n(e.kind,e.name,e.key))}},[]),c=!n||r;return Object(a.createElement)(a.Fragment,null,Object(a.createElement)(m.Button,{variant:"primary",className:"edit-site-save-button__button","aria-disabled":c,"aria-expanded":t,disabled:c,isBusy:r,onClick:c?void 0:e},Object(b.__)("Save")))}var $e=n("Ntru"),Xe=n("K2cm"),Ye=n("RxS6");function Ke(){const e=Object(i.useSelect)(e=>e(s.store).hasUndo(),[]),{undo:t}=Object(i.useDispatch)(s.store);return Object(a.createElement)(m.Button,{icon:Object(b.isRTL)()?Xe.a:$e.a,label:Object(b.__)("Undo"),shortcut:Ye.displayShortcut.primary("z"),"aria-disabled":!e,onClick:e?t:void 0})}function Qe(){const e=Object(i.useSelect)(e=>e(s.store).hasRedo(),[]),{redo:t}=Object(i.useDispatch)(s.store);return Object(a.createElement)(m.Button,{icon:Object(b.isRTL)()?$e.a:Xe.a,label:Object(b.__)("Redo"),shortcut:Ye.displayShortcut.primaryShift("z"),"aria-disabled":!e,onClick:e?t:void 0})}var Ze=n("TSYQ"),Je=n.n(Ze),et=n("NWDH");function tt(e){if(e){const t=Object(o.getBlockType)(e.name);return t?Object(o.__experimentalGetBlockLabel)(t,e.attributes):null}return null}function nt({entityTitle:e,entityLabel:t,isLoaded:n,children:r}){const{label:c}=function(){const{getBlock:e}=Object(i.useSelect)(Pe.store),t=Object(i.useSelect)(e=>e(Pe.store).__experimentalGetActiveBlockIdByBlockNames(["core/template-part"]),[]);return t?{label:tt(e(t)),isActive:!0}:{}}(),o=Object(a.useRef)();return n?e?Object(a.createElement)("div",{className:Je()("edit-site-document-actions",{"has-secondary-label":!!c})},Object(a.createElement)("div",{ref:o,className:"edit-site-document-actions__title-wrapper"},Object(a.createElement)(m.__experimentalText,{size:"body",className:"edit-site-document-actions__title-prefix"},Object(a.createElement)(m.VisuallyHidden,{as:"span"},Object(b.sprintf)(Object(b.__)("Editing %s:"),t))),Object(a.createElement)(m.__experimentalText,{size:"body",className:"edit-site-document-actions__title",as:"h1"},e),Object(a.createElement)(m.__experimentalText,{size:"body",className:"edit-site-document-actions__secondary-item"},null!=c?c:""),r&&Object(a.createElement)(m.Dropdown,{popoverProps:{anchorRef:o.current},position:"bottom center",renderToggle:({isOpen:e,onToggle:n})=>Object(a.createElement)(m.Button,{className:"edit-site-document-actions__get-info",icon:et.a,"aria-expanded":e,"aria-haspopup":"true",onClick:n,label:Object(b.sprintf)(Object(b.__)("Show %s details"),t)}),contentClassName:"edit-site-document-actions__info-dropdown",renderContent:r}))):Object(a.createElement)("div",{className:"edit-site-document-actions"},Object(b.__)("Template not found")):Object(a.createElement)("div",{className:"edit-site-document-actions"},Object(b.__)("Loading…"))}function rt({onClose:e,templatePart:t,closeTemplateDetailsDropdown:n}){var r;const{pushTemplatePart:c,revertTemplate:o}=Object(i.useDispatch)(Ce);return Object(a.createElement)(a.Fragment,null,Object(a.createElement)(m.MenuGroup,null,Object(a.createElement)(m.MenuItem,{onClick:function(){c(t.id),e(),n()}},Object(b.sprintf)(Object(b.__)("Edit %s"),null===(r=t.title)||void 0===r?void 0:r.rendered))),V(t)&&Object(a.createElement)(m.MenuGroup,null,Object(a.createElement)(m.MenuItem,{info:Object(b.__)("Restore template to theme default"),onClick:function(){o(t),e(),n()}},Object(b.__)("Clear customizations"))))}function ct({templatePart:e,clientId:t,closeTemplateDetailsDropdown:n}){const{selectBlock:r,toggleBlockHighlight:c}=Object(i.useDispatch)(Pe.store),o=()=>c(t,!0),l=()=>c(t,!1);return Object(a.createElement)("div",{role:"menuitem",className:"edit-site-template-details__template-areas-item"},Object(a.createElement)(m.MenuItem,{role:"button",icon:Object(Ne.getTemplatePartIcon)(e.area),iconPosition:"left",onClick:()=>{r(t)},onMouseOver:o,onMouseLeave:l,onFocus:o,onBlur:l},k[e.area]),Object(a.createElement)(m.DropdownMenu,{icon:Fe.a,label:Object(b.__)("More options"),className:"edit-site-template-details__template-areas-item-more"},({onClose:t})=>Object(a.createElement)(rt,{onClose:t,templatePart:e,closeTemplateDetailsDropdown:n})))}function at({closeTemplateDetailsDropdown:e}){const t=Object(i.useSelect)(e=>e(Ce).getCurrentTemplateTemplateParts(),[]);return t.length?Object(a.createElement)(m.MenuGroup,{label:Object(b.__)("Areas"),className:"edit-site-template-details__group edit-site-template-details__template-areas"},t.map(({templatePart:t,block:n})=>Object(a.createElement)(ct,{key:t.slug,clientId:n.clientId,templatePart:t,closeTemplateDetailsDropdown:e}))):null}function ot({template:e,onClose:t}){const{title:n,description:r}=Object(i.useSelect)(t=>t(Ne.store).__experimentalGetTemplateInfo(e),[]),{revertTemplate:c}=Object(i.useDispatch)(Ce),o=Object(a.useMemo)(()=>"wp_template"===(null==e?void 0:e.type)?{title:Object(b.__)("templates"),menu:"templates"}:M.find(({area:t})=>t===(null==e?void 0:e.area)),[e]);if(!e)return null;return Object(a.createElement)("div",{className:"edit-site-template-details"},Object(a.createElement)("div",{className:"edit-site-template-details__group"},Object(a.createElement)(m.__experimentalHeading,{level:4,weight:600,className:"edit-site-template-details__title"},n),r&&Object(a.createElement)(m.__experimentalText,{size:"body",className:"edit-site-template-details__description",as:"p"},r)),Object(a.createElement)(at,{closeTemplateDetailsDropdown:t}),V(e)&&Object(a.createElement)(m.MenuGroup,{className:"edit-site-template-details__group edit-site-template-details__revert"},Object(a.createElement)(m.MenuItem,{className:"edit-site-template-details__revert-button",info:Object(b.__)("Restore template to theme default"),onClick:()=>{c(e),t()}},Object(b.__)("Clear customizations"))),Object(a.createElement)(m.Button,{className:"edit-site-template-details__show-all-button",href:Object(L.addQueryArgs)("edit.php",{post_type:e.type})},Object(b.sprintf)(Object(b.__)("Browse all %s"),o.title)))}const lt=e=>{e.preventDefault()};function it({openEntitiesSavedStates:e,isEntitiesSavedStatesOpen:t}){const n=Object(a.useRef)(),{deviceType:r,entityTitle:c,template:o,templateType:l,isInserterOpen:u,isListViewOpen:d,listViewShortcut:p,isLoaded:O}=Object(i.useSelect)(e=>{const{__experimentalGetPreviewDeviceType:t,getEditedPostType:n,getEditedPostId:r,isInserterOpened:c,isListViewOpened:a}=e(Ce),{getEditedEntityRecord:o}=e(s.store),{__experimentalGetTemplateInfo:l}=e(Ne.store),{getShortcutRepresentation:i}=e(Re.store),u=n(),d=r(),m=o("postType",u,d),b=!!d;return{deviceType:t(),entityTitle:l(m).title,isLoaded:b,template:m,templateType:u,isInserterOpen:c(),isListViewOpen:a(),listViewShortcut:i("core/edit-site/toggle-list-view")}},[]),{__experimentalSetPreviewDeviceType:_,setIsInserterOpened:j,setIsListViewOpened:E}=Object(i.useDispatch)(Ce),f=Object(Me.useViewportMatch)("medium"),g=Object(a.useCallback)(()=>{u?n.current.focus():j(!0)},[u,j]),h=Object(a.useCallback)(()=>E(!d),[E,d]),v="wp_template_part"===l;return Object(a.createElement)("div",{className:"edit-site-header"},Object(a.createElement)("div",{className:"edit-site-header_start"},Object(a.createElement)(De,null),Object(a.createElement)("div",{className:"edit-site-header__toolbar"},Object(a.createElement)(m.Button,{ref:n,variant:"primary",isPressed:u,className:"edit-site-header-toolbar__inserter-toggle",onMouseDown:lt,onClick:g,icon:Ae.a,label:Object(b._x)("Toggle block inserter","Generic label for block inserter button")}),f&&Object(a.createElement)(a.Fragment,null,Object(a.createElement)(Pe.ToolSelector,null),Object(a.createElement)(Ke,null),Object(a.createElement)(Qe,null),Object(a.createElement)(m.Button,{className:"edit-site-header-toolbar__list-view-toggle",icon:Be.a,isPressed:d,label:Object(b.__)("List View"),onClick:h,shortcut:p})))),Object(a.createElement)("div",{className:"edit-site-header_center"},Object(a.createElement)(nt,{entityTitle:c,entityLabel:"wp_template_part"===l?"template part":"template",isLoaded:O},({onClose:e})=>Object(a.createElement)(ot,{template:o,onClose:e}))),Object(a.createElement)("div",{className:"edit-site-header_end"},Object(a.createElement)("div",{className:"edit-site-header__actions"},!v&&Object(a.createElement)(Pe.__experimentalPreviewOptions,{deviceType:r,setDeviceType:_}),Object(a.createElement)(We,{openEntitiesSavedStates:e,isEntitiesSavedStatesOpen:t}),Object(a.createElement)(F.h.Slot,{scope:"core/edit-site"}),Object(a.createElement)(qe,null))))}var st=n("Cg8A");function ut({className:e,identifier:t,title:n,icon:r,children:c,closeLabel:o,header:l,headerClassName:i}){return Object(a.createElement)(a.Fragment,null,Object(a.createElement)(F.b,{className:e,scope:"core/edit-site",identifier:t,title:n,icon:r,closeLabel:o,header:l,headerClassName:i},c),Object(a.createElement)(F.c,{scope:"core/edit-site",identifier:t,icon:r},n))}var dt=Object(a.createElement)(j.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(a.createElement)(j.Path,{d:"M12 4c-4.4 0-8 3.6-8 8v.1c0 4.1 3.2 7.5 7.2 7.9h.8c4.4 0 8-3.6 8-8s-3.6-8-8-8zm0 15V5c3.9 0 7 3.1 7 7s-3.1 7-7 7z"}));const mt=[{path:["color","palette"],valueKey:"color",cssVarInfix:"color",classes:[{classSuffix:"color",propertyName:"color"},{classSuffix:"background-color",propertyName:"background-color"},{classSuffix:"border-color",propertyName:"border-color"}]},{path:["color","gradients"],valueKey:"gradient",cssVarInfix:"gradient",classes:[{classSuffix:"gradient-background",propertyName:"background"}]},{path:["typography","fontSizes"],valueKey:"size",cssVarInfix:"font-size",classes:[{classSuffix:"font-size",propertyName:"font-size"}]},{path:["typography","fontFamilies"],valueKey:"fontFamily",cssVarInfix:"font-family",classes:[{classSuffix:"font-family",propertyName:"font-family"}]}],bt={"color.background":"color","color.text":"color","elements.link.color.text":"color","color.gradient":"gradient","typography.fontSize":"font-size","typography.fontFamily":"font-family"};function pt(e,t,n,r,c){const a=[Object(f.get)(e,["blocks",t,...n]),Object(f.get)(e,n)];for(const o of a)if(o){const a=["user","theme","core"];for(const l of a){const a=o[l];if(a){const o=Object(f.find)(a,e=>e[r]===c);if(o){if("slug"===r)return o;return pt(e,t,n,"slug",o.slug)[r]===o[r]?o:void 0}}}}}function Ot(e,t,n){if(!n||!Object(f.isString)(n))return n;let r;if(n.startsWith("var:"))r=n.slice("var:".length).split("|");else{if(!n.startsWith("var(--wp--")||!n.endsWith(")"))return n;r=n.slice("var(--wp--".length,-")".length).split("--")}const[c,...a]=r;return"preset"===c?function(e,t,n,[r,c]){const a=Object(f.find)(mt,["cssVarInfix",r]);if(!a)return n;const o=pt(e,t,a.path,"slug",c);if(o){const{valueKey:n}=a;return Ot(e,t,o[n])}return n}(e,t,n,a):"custom"===c?function(e,t,n,r){var c;const a=null!==(c=Object(f.get)(e,["blocks",t,"custom",...r]))&&void 0!==c?c:Object(f.get)(e,["custom",...r]);return a?Ot(e,t,a):n}(e,t,n,a):n}const _t=Object(a.createContext)({user:{},base:{},merged:{},setUserConfig:()=>{}}),jt={isGlobalStylesUserThemeJSON:!0,version:1};function Et(e,t,n="all"){var r;const{merged:c,base:l,user:i,setUserConfig:s}=Object(a.useContext)(_t),u=t?`settings.blocks.${t}.${e}`:"settings."+e,d=t=>{const r=t?`settings.blocks.${t}.${e}`:"settings."+e,a=t=>{const n=Object(f.get)(t,r);var c,a;return o.__EXPERIMENTAL_PATHS_WITH_MERGE[e]?null!==(c=null!==(a=null==n?void 0:n.user)&&void 0!==a?a:null==n?void 0:n.theme)&&void 0!==c?c:null==n?void 0:n.core:n};let s;switch(n){case"all":s=a(c);break;case"user":s=a(i);break;case"base":s=a(l);break;default:throw"Unsupported source"}return s};return[null!==(r=d(t))&&void 0!==r?r:d(),t=>{s(n=>{const r=Object(f.cloneDeep)(n),c=o.__EXPERIMENTAL_PATHS_WITH_MERGE[e]?u+".user":u;return Object(f.set)(r,c,t),r})}]}function ft(e,t,n="all"){var r;const{merged:c,base:o,user:l,setUserConfig:i}=Object(a.useContext)(_t),s=t?`styles.blocks.${t}.${e}`:"styles."+e;let u;switch(n){case"all":u=Ot(c.settings,t,null!==(r=Object(f.get)(l,s))&&void 0!==r?r:Object(f.get)(o,s));break;case"user":u=Ot(c.settings,t,Object(f.get)(l,s));break;case"base":u=Ot(o.settings,t,Object(f.get)(o,s));break;default:throw"Unsupported source"}return[u,n=>{i(r=>{const a=Object(f.cloneDeep)(r);return Object(f.set)(a,s,function(e,t,n,r){if(!r)return r;const c=bt[n],a=Object(f.find)(mt,["cssVarInfix",c]);if(!a)return r;const{valueKey:o,path:l}=a,i=pt(e,t,l,o,r);return i?`var:preset|${c}|${i.slug}`:r}(c.settings,t,e,n)),a})}]}const gt=["background","backgroundColor","color","linkColor","fontFamily","fontSize","fontStyle","fontWeight","lineHeight","textDecoration","textTransform","padding"];function ht(e){if(!e)return gt;const t=Object(o.getBlockType)(e);if(!t)return[];const n=[];return Object.keys(o.__EXPERIMENTAL_STYLE_PROPERTY).forEach(e=>{if(o.__EXPERIMENTAL_STYLE_PROPERTY[e].support)return o.__EXPERIMENTAL_STYLE_PROPERTY[e].requiresOptOut&&Object(f.has)(t.supports,o.__EXPERIMENTAL_STYLE_PROPERTY[e].support[0])&&!1!==Object(f.get)(t.supports,o.__EXPERIMENTAL_STYLE_PROPERTY[e].support)||Object(f.get)(t.supports,o.__EXPERIMENTAL_STYLE_PROPERTY[e].support,!1)?n.push(e):void 0}),n}function vt(e){const[t]=Et("color.palette.user",e),[n]=Et("color.palette.theme",e),[r]=Et("color.palette.core",e);return Object(a.useMemo)(()=>{const e=[];return r&&r.length&&e.push({name:Object(b.__)("Core"),colors:r}),n&&n.length&&e.push({name:Object(b.__)("Theme"),colors:n}),t&&t.length&&e.push({name:Object(b.__)("User"),colors:t}),e},[t,n,r])}var yt=()=>{const[e="serif"]=ft("typography.fontFamily"),[t="black"]=ft("color.text"),[n="blue"]=ft("elements.link.color.text"),[r="white"]=ft("color.background"),[c]=ft("color.gradient");return Object(a.createElement)(m.Card,{className:"edit-site-global-styles-preview",style:{background:null!=c?c:r}},Object(a.createElement)(m.__experimentalHStack,{spacing:5},Object(a.createElement)("div",{style:{fontFamily:e,fontSize:"80px",color:t}},"Aa"),Object(a.createElement)(m.__experimentalVStack,{spacing:2},Object(a.createElement)(m.ColorIndicator,{colorValue:t}),Object(a.createElement)(m.ColorIndicator,{colorValue:n}))))},St=n("wx14"),wt=n("iClF");var xt=function({path:e,icon:t,children:n,isBack:r=!1,...c}){const o=Object(m.__experimentalUseNavigator)();return Object(a.createElement)(m.__experimentalItem,Object(St.a)({onClick:()=>o.push(e,{isBack:r})},c),t&&Object(a.createElement)(m.__experimentalHStack,{justify:"flex-start"},Object(a.createElement)(m.FlexItem,null,Object(a.createElement)(wt.a,{icon:t,size:24})),Object(a.createElement)(m.FlexItem,null,n)),!t&&n)};var Tt=Object(a.createElement)(j.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(a.createElement)(j.Path,{d:"M6.9 7L3 17.8h1.7l1-2.8h4.1l1 2.8h1.7L8.6 7H6.9zm-.7 6.6l1.5-4.3 1.5 4.3h-3zM21.6 17c-.1.1-.2.2-.3.2-.1.1-.2.1-.4.1s-.3-.1-.4-.2c-.1-.1-.1-.3-.1-.6V12c0-.5 0-1-.1-1.4-.1-.4-.3-.7-.5-1-.2-.2-.5-.4-.9-.5-.4 0-.8-.1-1.3-.1s-1 .1-1.4.2c-.4.1-.7.3-1 .4-.2.2-.4.3-.6.5-.1.2-.2.4-.2.7 0 .3.1.5.2.8.2.2.4.3.8.3.3 0 .6-.1.8-.3.2-.2.3-.4.3-.7 0-.3-.1-.5-.2-.7-.2-.2-.4-.3-.6-.4.2-.2.4-.3.7-.4.3-.1.6-.1.8-.1.3 0 .6 0 .8.1.2.1.4.3.5.5.1.2.2.5.2.9v1.1c0 .3-.1.5-.3.6-.2.2-.5.3-.9.4-.3.1-.7.3-1.1.4-.4.1-.8.3-1.1.5-.3.2-.6.4-.8.7-.2.3-.3.7-.3 1.2 0 .6.2 1.1.5 1.4.3.4.9.5 1.6.5.5 0 1-.1 1.4-.3.4-.2.8-.6 1.1-1.1 0 .4.1.7.3 1 .2.3.6.4 1.2.4.4 0 .7-.1.9-.2.2-.1.5-.3.7-.4h-.3zm-3-.9c-.2.4-.5.7-.8.8-.3.2-.6.2-.8.2-.4 0-.6-.1-.9-.3-.2-.2-.3-.6-.3-1.1 0-.5.1-.9.3-1.2s.5-.5.8-.7c.3-.2.7-.3 1-.5.3-.1.6-.3.7-.6v3.4z"}));var kt=Object(a.createElement)(j.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(a.createElement)(j.Path,{d:"M17.2 10.9c-.5-1-1.2-2.1-2.1-3.2-.6-.9-1.3-1.7-2.1-2.6L12 4l-1 1.1c-.6.9-1.3 1.7-2 2.6-.8 1.2-1.5 2.3-2 3.2-.6 1.2-1 2.2-1 3 0 3.4 2.7 6.1 6.1 6.1s6.1-2.7 6.1-6.1c0-.8-.3-1.8-1-3zm-5.1 7.6c-2.5 0-4.6-2.1-4.6-4.6 0-.3.1-1 .8-2.3.5-.9 1.1-1.9 2-3.1.7-.9 1.3-1.7 1.8-2.3.7.8 1.3 1.6 1.8 2.3.8 1.1 1.5 2.2 2 3.1.7 1.3.8 2 .8 2.3 0 2.5-2.1 4.6-4.6 4.6z"})),It=n("Civd");const Ct=[];function Pt(e){return[Nt(e),Rt(e),Mt(e),At(e)].some(Boolean)}function Nt(e){const t=ht(e);return Et("border.color",e)[0]&&t.includes("borderColor")}function Rt(e){const t=ht(e);return Et("border.radius",e)[0]&&t.includes("borderRadius")}function Mt(e){const t=ht(e);return Et("border.style",e)[0]&&t.includes("borderStyle")}function At(e){const t=ht(e);return Et("border.width",e)[0]&&t.includes("borderWidth")}function Bt({name:e}){const t=Object(m.__experimentalUseCustomUnits)({availableUnits:Et("spacing.units")[0]||["px","em","rem"]}),n=At(e),[r,c]=ft("border.width",e),o=Mt(e),[l,i]=ft("border.style",e),[s=Ct]=Et("color.palette"),u=!Et("color.custom")[0],d=!Et("color.customGradient")[0],p=Nt(e),[O,_]=ft("border.color",e),j=Rt(e),[E,f]=ft("border.radius",e);return Object(a.createElement)(m.PanelBody,{title:Object(b.__)("Border"),initialOpen:!0},(n||o)&&Object(a.createElement)("div",{className:"edit-site-global-styles-sidebar__border-controls-row"},n&&Object(a.createElement)(m.__experimentalUnitControl,{value:r,label:Object(b.__)("Width"),min:0,onChange:e=>{c(e||void 0)},units:t}),o&&Object(a.createElement)(Pe.__experimentalBorderStyleControl,{value:l,onChange:i})),p&&Object(a.createElement)(Pe.__experimentalColorGradientControl,{label:Object(b.__)("Color"),colorValue:O,colors:s,gradients:void 0,disableCustomColors:u,disableCustomGradients:d,onColorChange:_}),j&&Object(a.createElement)(Pe.__experimentalBorderRadiusControl,{values:E,onChange:f}))}function Lt(e){const t=ht(e);return t.includes("color")||t.includes("backgroundColor")||t.includes("background")||t.includes("linkColor")}const Dt=["horizontal","vertical"];function Ft(e){const t=Vt(e),n=Gt(e),r=zt(e);return t||n||r}function Vt(e){const t=ht(e),[n]=Et("spacing.padding",e);return n&&t.includes("padding")}function Gt(e){const t=ht(e),[n]=Et("spacing.margin",e);return n&&t.includes("margin")}function zt(e){const t=ht(e),[n]=Et("spacing.blockGap",e);return n&&t.includes("--wp--style--block-gap")}function Ut(e,t){if(!t)return e;const n={};return t.forEach(t=>{"vertical"===t&&(n.top=e.top,n.bottom=e.bottom),"horizontal"===t&&(n.left=e.left,n.right=e.right),n[t]=e[t]}),n}function Ht(e){return e&&"string"==typeof e?{top:e,right:e,bottom:e,left:e}:e}function qt({name:e}){const t=Vt(e),n=Gt(e),r=zt(e),c=Object(m.__experimentalUseCustomUnits)({availableUnits:Et("spacing.units",e)[0]||["%","px","em","rem","vw"]}),[o,l]=ft("spacing.padding",e),i=Ht(o),s=Object(Pe.__experimentalUseCustomSides)(e,"padding"),u=s&&s.some(e=>Dt.includes(e)),d=e=>{const t=Ut(e,s);l(t)},p=()=>d({}),[O,_]=ft("spacing.margin",e),j=Ht(O),E=Object(Pe.__experimentalUseCustomSides)(e,"margin"),f=E&&E.some(e=>Dt.includes(e)),g=e=>{const t=Ut(e,E);_(t)},h=()=>g({}),[v,y]=ft("spacing.blockGap",e),S=()=>y(void 0);return Object(a.createElement)(m.__experimentalToolsPanel,{label:Object(b.__)("Dimensions"),resetAll:()=>{p(),h(),S()}},t&&Object(a.createElement)(m.__experimentalToolsPanelItem,{hasValue:()=>!!i&&Object.keys(i).length,label:Object(b.__)("Padding"),onDeselect:p,isShownByDefault:!0},Object(a.createElement)(m.__experimentalBoxControl,{values:i,onChange:d,label:Object(b.__)("Padding"),sides:s,units:c,allowReset:!1,splitOnAxis:u})),n&&Object(a.createElement)(m.__experimentalToolsPanelItem,{hasValue:()=>!!j&&Object.keys(j).length,label:Object(b.__)("Margin"),onDeselect:h,isShownByDefault:!0},Object(a.createElement)(m.__experimentalBoxControl,{values:j,onChange:g,label:Object(b.__)("Margin"),sides:E,units:c,allowReset:!1,splitOnAxis:f})),r&&Object(a.createElement)(m.__experimentalToolsPanelItem,{hasValue:()=>!!v,label:Object(b.__)("Block spacing"),onDeselect:S,isShownByDefault:!0},Object(a.createElement)(m.__experimentalUnitControl,{label:Object(b.__)("Block spacing"),__unstableInputWidth:"80px",min:0,onChange:y,units:c,value:v})))}function Wt(e){const t=$t(e),n=Xt(e),r=Yt(e),c=ht(e);return t||n||r||c.includes("fontSize")}function $t(e){const t=ht(e);return Et("typography.lineHeight",e)[0]&&t.includes("lineHeight")}function Xt(e){const t=ht(e),n=Et("typography.fontStyle",e)[0]&&t.includes("fontStyle"),r=Et("typography.fontWeight",e)[0]&&t.includes("fontWeight");return n||r}function Yt(e){const t=ht(e);return Et("typography.letterSpacing",e)[0]&&t.includes("letterSpacing")}function Kt({name:e}){const t=ht(e),[n]=Et("typography.fontSizes",e),r=!Et("typography.customFontSize",e)[0],[c]=Et("typography.fontFamilies",e),o=Et("typography.fontStyle",e)[0]&&t.includes("fontStyle"),l=Et("typography.fontWeight",e)[0]&&t.includes("fontWeight"),i=$t(e),s=Xt(e),u=Yt(e),[d,b]=ft("typography.fontFamily",e),[p,O]=ft("typography.fontSize",e),[_,j]=ft("typography.fontStyle",e),[E,f]=ft("typography.fontWeight",e),[g,h]=ft("typography.lineHeight",e),[v,y]=ft("typography.letterSpacing",e);return Object(a.createElement)(m.PanelBody,{className:"edit-site-typography-panel",initialOpen:!0},t.includes("fontFamily")&&Object(a.createElement)(Pe.__experimentalFontFamilyControl,{fontFamilies:c,value:d,onChange:b}),t.includes("fontSize")&&Object(a.createElement)(m.FontSizePicker,{value:p,onChange:O,fontSizes:n,disableCustomFontSizes:r}),i&&Object(a.createElement)(Pe.LineHeightControl,{value:g,onChange:h}),s&&Object(a.createElement)(Pe.__experimentalFontAppearanceControl,{value:{fontStyle:_,fontWeight:E},onChange:({fontStyle:e,fontWeight:t})=>{j(e),f(t)},hasFontStyles:o,hasFontWeights:l}),u&&Object(a.createElement)(Pe.__experimentalLetterSpacingControl,{value:v,onChange:y}))}var Qt=function({name:e,parentMenu:t=""}){const n=Wt(e),r=Lt(e),c=Pt(e),o=Ft(e),l=c||o;return Object(a.createElement)(m.__experimentalItemGroup,null,n&&Object(a.createElement)(xt,{icon:Tt,path:t+"/typography"},Object(b.__)("Typography")),r&&Object(a.createElement)(xt,{icon:kt,path:t+"/colors"},Object(b.__)("Colors")),l&&Object(a.createElement)(xt,{icon:It.a,path:t+"/layout"},Object(b.__)("Layout")))};var Zt=function(){return Object(a.createElement)(m.Card,{size:"small"},Object(a.createElement)(m.CardBody,null,Object(a.createElement)(yt,null)),Object(a.createElement)(m.CardBody,null,Object(a.createElement)(Qt,null)),Object(a.createElement)(m.CardDivider,null),Object(a.createElement)(m.CardBody,null,Object(a.createElement)(m.__experimentalItemGroup,null,Object(a.createElement)(m.__experimentalItem,null,Object(a.createElement)("p",null,Object(b.__)("Customize the appearance of specific blocks for the whole site."))),Object(a.createElement)(xt,{path:"/blocks"},Object(b.__)("Blocks")))))},Jt=n("1iEr"),en=n("2gm7");var tn=function({back:e,title:t,description:n}){return Object(a.createElement)(m.__experimentalVStack,{spacing:2},Object(a.createElement)(m.__experimentalHStack,{spacing:2},Object(a.createElement)(m.__experimentalView,null,Object(a.createElement)(xt,{path:e,icon:Object(a.createElement)(wt.a,{icon:Object(b.isRTL)()?Jt.a:en.a,variant:"muted"}),size:"small",isBack:!0,"aria-label":Object(b.__)("Navigate to the previous view")})),Object(a.createElement)(m.__experimentalSpacer,null,Object(a.createElement)(m.__experimentalHeading,{level:5},t))),n&&Object(a.createElement)("p",{className:"edit-site-global-styles-header__description"},n))};function nn({block:e}){const t=Wt(e.name),n=Lt(e.name),r=Pt(e.name),c=Ft(e.name);return t||n||(r||c)?Object(a.createElement)(xt,{path:"/blocks/"+e.name},e.title):null}var rn=function(){return Object(a.createElement)(a.Fragment,null,Object(a.createElement)(tn,{back:"/",title:Object(b.__)("Blocks"),description:Object(b.__)("Customize the appearance of specific blocks and for the whole site.")}),Object(o.getBlockTypes)().map(e=>Object(a.createElement)(nn,{block:e,key:"menu-itemblock-"+e.name})))};var cn=function({name:e}){const t=Object(o.getBlockType)(e);return Object(a.createElement)(a.Fragment,null,Object(a.createElement)(tn,{back:"/blocks",title:t.title}),Object(a.createElement)(Qt,{parentMenu:"/blocks/"+e,name:e}))};var an=function({name:e}){const t=void 0===e?"":"/blocks/"+e;return Object(a.createElement)(a.Fragment,null,Object(a.createElement)(tn,{back:t||"/",title:Object(b.__)("Typography"),description:Object(b.__)("Manage the fonts used on the website and the default aspect of different global elements.")}),Object(a.createElement)(Kt,{name:e}))};var on=function({children:e}){return Object(a.createElement)(m.__experimentalHeading,{className:"edit-site-global-styles-subtitle",level:2},e)};const ln=[];var sn=function({name:e}){const[t]=Et("color.palette.user",e),n=t||ln,r=e?"/blocks/"+e+"/colors/palette":"/colors/palette";return Object(a.createElement)(m.__experimentalVStack,{spacing:3},Object(a.createElement)(on,null,Object(b.__)("Palette")),Object(a.createElement)(m.__experimentalItemGroup,{isBordered:!0,isSeparated:!0},Object(a.createElement)(xt,{path:r},Object(a.createElement)(m.__experimentalHStack,null,Object(a.createElement)(m.FlexBlock,null,Object(a.createElement)(m.__experimentalZStack,{isLayered:!1,offset:-8},n.slice(0,5).map(({color:e})=>Object(a.createElement)(m.ColorIndicator,{key:e,colorValue:e})))),Object(a.createElement)(m.FlexItem,null,Object(b.sprintf)(Object(b._n)("%d color","%d colors",n.length),n.length))))))};function un({name:e,parentMenu:t}){const n=ht(e),r=n.includes("backgroundColor")||n.includes("background"),[c]=ft("color.background",e),[o]=ft("color.gradient",e);return r?Object(a.createElement)(xt,{path:t+"/colors/background"},Object(a.createElement)(m.__experimentalHStack,{justify:"flex-start"},Object(a.createElement)(m.FlexItem,null,Object(a.createElement)(m.ColorIndicator,{colorValue:null!=o?o:c})),Object(a.createElement)(m.FlexItem,null,Object(b.__)("Background")))):null}function dn({name:e,parentMenu:t}){const n=ht(e).includes("color"),[r]=ft("color.text",e);return n?Object(a.createElement)(xt,{path:t+"/colors/text"},Object(a.createElement)(m.__experimentalHStack,{justify:"flex-start"},Object(a.createElement)(m.FlexItem,null,Object(a.createElement)(m.ColorIndicator,{colorValue:r})),Object(a.createElement)(m.FlexItem,null,Object(b.__)("Text")))):null}function mn({name:e,parentMenu:t}){const n=ht(e).includes("linkColor"),[r]=ft("elements.link.color.text",e);return n?Object(a.createElement)(xt,{path:t+"/colors/link"},Object(a.createElement)(m.__experimentalHStack,{justify:"flex-start"},Object(a.createElement)(m.FlexItem,null,Object(a.createElement)(m.ColorIndicator,{colorValue:r})),Object(a.createElement)(m.FlexItem,null,Object(b.__)("Links")))):null}var bn=function({name:e}){const t=void 0===e?"":"/blocks/"+e;return Object(a.createElement)(a.Fragment,null,Object(a.createElement)(tn,{back:t||"/",title:Object(b.__)("Colors"),description:Object(b.__)("Manage palettes and the default color of different global elements on the website.")}),Object(a.createElement)("div",{className:"edit-site-global-styles-screen-colors"},Object(a.createElement)(m.__experimentalVStack,{spacing:10},Object(a.createElement)(sn,{name:e}),Object(a.createElement)(m.__experimentalVStack,{spacing:3},Object(a.createElement)(on,null,Object(b.__)("Elements")),Object(a.createElement)(m.__experimentalItemGroup,{isBordered:!0,isSeparated:!0},Object(a.createElement)(un,{name:e,parentMenu:t}),Object(a.createElement)(dn,{name:e,parentMenu:t}),Object(a.createElement)(mn,{name:e,parentMenu:t}))))))};function pn({name:e}){const[t,n]=Et("color.palette",e,"user");return Object(a.createElement)("div",{className:"edit-site-global-styles-color-palette-panel"},Object(a.createElement)(m.__experimentalColorEdit,{colors:t,onChange:n}))}var On=function({name:e}){const t=void 0===e?"":"/blocks/"+e;return Object(a.createElement)(a.Fragment,null,Object(a.createElement)(tn,{back:t+"/colors",title:Object(b.__)("Color Palette"),description:Object(b.__)("Color palettes are used to provide default color options for blocks and various design tools. Here you can edit the colors with their labels.")}),Object(a.createElement)(pn,{name:e}))};var _n=function({name:e}){const t=void 0===e?"":"/blocks/"+e,n=ht(e),[r]=Et("color.palette",e),[c]=Et("color.gradients",e),[o]=Et("color.custom",e),[l]=Et("color.customGradient",e),i=vt(e),s=function(e){const[t]=Et("color.gradients.user",e),[n]=Et("color.gradients.theme",e),[r]=Et("color.gradients.core",e);return Object(a.useMemo)(()=>{const e=[];return r&&r.length&&e.push({name:Object(b.__)("Core"),gradients:r}),n&&n.length&&e.push({name:Object(b.__)("Theme"),gradients:n}),t&&t.length&&e.push({name:Object(b.__)("User"),gradients:t}),e},[t,n,r])}(e),[u]=Et("color.background",e),d=n.includes("backgroundColor")&&u&&(r.length>0||o),m=n.includes("background")&&(c.length>0||l),[p,O]=ft("color.background",e),[_]=ft("color.background",e,"user"),[j,E]=ft("color.gradient",e),[f]=ft("color.gradient",e,"user");if(!d&&!m)return null;const g=[];let h={};d&&(h={colorValue:p,onColorChange:O},p&&(h.clearable=p===_));let v={};return m&&(v={gradientValue:j,onGradientChange:E},j&&(v.clearable=j===f)),g.push({...h,...v,label:Object(b.__)("Background color")}),Object(a.createElement)(a.Fragment,null,Object(a.createElement)(tn,{back:t+"/colors",title:Object(b.__)("Background"),description:Object(b.__)("Set a background color or gradient for the whole website.")}),Object(a.createElement)(Pe.__experimentalPanelColorGradientSettings,{title:Object(b.__)("Color"),settings:g,colors:i,gradients:s,disableCustomColors:!o,disableCustomGradients:!l,__experimentalHasMultipleOrigins:!0,showTitle:!1}))};var jn=function({name:e}){const t=void 0===e?"":"/blocks/"+e,n=ht(e),[r]=Et("color.palette",e),[c]=Et("color.custom",e),[o]=Et("color.text",e),l=vt(e),i=n.includes("color")&&o&&(r.length>0||c),[s,u]=ft("color.text",e),[d]=ft("color.text",e,"user");if(!i)return null;const m=[{colorValue:s,onColorChange:u,label:Object(b.__)("Text color"),clearable:s===d}];return Object(a.createElement)(a.Fragment,null,Object(a.createElement)(tn,{back:t+"/colors",title:Object(b.__)("Text"),description:Object(b.__)("Set the default color used for text across the site.")}),Object(a.createElement)(Pe.__experimentalPanelColorGradientSettings,{title:Object(b.__)("Color"),settings:m,colors:l,disableCustomColors:!c,__experimentalHasMultipleOrigins:!0,showTitle:!1}))};var En=function({name:e}){const t=void 0===e?"":"/blocks/"+e,n=ht(e),[r]=Et("color.palette",e),[c]=Et("color.custom",e),o=vt(e),[l]=Et("color.link",e),i=n.includes("linkColor")&&l&&(r.length>0||c),[s,u]=ft("elements.link.color.text",e),[d]=ft("elements.link.color.text",e,"user");if(!i)return null;const m=[{colorValue:s,onColorChange:u,label:Object(b.__)("Link color"),clearable:s===d}];return Object(a.createElement)(a.Fragment,null,Object(a.createElement)(tn,{back:t+"/colors",title:Object(b.__)("Links"),description:Object(b.__)("Set the default color used for links across the site.")}),Object(a.createElement)(Pe.__experimentalPanelColorGradientSettings,{title:Object(b.__)("Color"),settings:m,colors:o,disableCustomColors:!c,__experimentalHasMultipleOrigins:!0,showTitle:!1}))};var fn=function({name:e}){const t=void 0===e?"":"/blocks/"+e,n=Pt(e),r=Ft(e);return Object(a.createElement)(a.Fragment,null,Object(a.createElement)(tn,{back:t||"/",title:Object(b.__)("Layout")}),r&&Object(a.createElement)(qt,{name:e}),n&&Object(a.createElement)(Bt,{name:e}))};function gn({name:e}){const t=void 0===e?"":"/blocks/"+e;return Object(a.createElement)(a.Fragment,null,Object(a.createElement)(m.__experimentalNavigatorScreen,{path:t+"/typography"},Object(a.createElement)(an,{name:e})),Object(a.createElement)(m.__experimentalNavigatorScreen,{path:t+"/colors"},Object(a.createElement)(bn,{name:e})),Object(a.createElement)(m.__experimentalNavigatorScreen,{path:t+"/colors/palette"},Object(a.createElement)(On,{name:e})),Object(a.createElement)(m.__experimentalNavigatorScreen,{path:t+"/colors/background"},Object(a.createElement)(_n,{name:e})),Object(a.createElement)(m.__experimentalNavigatorScreen,{path:t+"/colors/text"},Object(a.createElement)(jn,{name:e})),Object(a.createElement)(m.__experimentalNavigatorScreen,{path:t+"/colors/link"},Object(a.createElement)(En,{name:e})),Object(a.createElement)(m.__experimentalNavigatorScreen,{path:t+"/layout"},Object(a.createElement)(fn,{name:e})))}var hn=function(){const e=Object(o.getBlockTypes)();return Object(a.createElement)(m.__experimentalNavigatorProvider,{initialPath:"/"},Object(a.createElement)(m.__experimentalNavigatorScreen,{path:"/"},Object(a.createElement)(Zt,null)),Object(a.createElement)(m.__experimentalNavigatorScreen,{path:"/blocks"},Object(a.createElement)(rn,null)),e.map(e=>Object(a.createElement)(m.__experimentalNavigatorScreen,{key:"menu-block-"+e.name,path:"/blocks/"+e.name},Object(a.createElement)(cn,{name:e.name}))),Object(a.createElement)(gn,null),e.map(e=>Object(a.createElement)(gn,{key:"screens-block-"+e.name,name:e.name})))};function vn(e){if(Object(f.startsWith)(e,"var:")){return`var(--wp--${e.slice("var:".length).split("|").join("--")})`}return e}const yn=(e,t)=>{var n,r;const c=[];if(null==e||!e.settings)return c;const a=e=>{const t={};return mt.forEach(({path:n})=>{const r=Object(f.get)(e,n,!1);!1!==r&&Object(f.set)(t,n,r)}),t},o=a(e.settings),l=null===(n=e.settings)||void 0===n?void 0:n.custom;return Object(f.isEmpty)(o)&&!l||c.push({presets:o,custom:l,selector:"body"}),Object(f.forEach)(null===(r=e.settings)||void 0===r?void 0:r.blocks,(e,n)=>{const r=a(e),o=e.custom;Object(f.isEmpty)(r)&&!o||c.push({presets:r,custom:o,selector:t[n].selector})}),c},Sn=(e,t)=>{const n=yn(e,t);let r="";return n.forEach(({presets:e,custom:t,selector:n})=>{const c=function(e={}){return Object(f.reduce)(mt,(t,{path:n,valueKey:r,cssVarInfix:c})=>{const a=Object(f.get)(e,n,[]);return["core","theme","user"].forEach(e=>{a[e]&&a[e].forEach(e=>{t.push(`--wp--preset--${c}--${Object(f.kebabCase)(e.slug)}: ${e[r]}`)})}),t},[])}(e),a=function e(t={},n,r){let c=[];return Object.keys(t).forEach(a=>{const o=n+Object(f.kebabCase)(a.replace("/","-")),l=t[a];if(l instanceof Object){const t=o+r;c=[...c,...e(l,t,r)]}else c.push(`${o}: ${l}`)}),c}(t,"--wp--custom--","--");a.length>0&&c.push(...a),c.length>0&&(r+=`${n}{${c.join(";")};}`)}),r},wn=(e,t)=>{const n=((e,t)=>{var n,r;const c=[];if(null==e||!e.styles)return c;const a=e=>Object(f.pickBy)(e,(e,t)=>["border","color","spacing","typography"].includes(t)),l=a(e.styles);return l&&c.push({styles:l,selector:"body"}),Object(f.forEach)(null===(n=e.styles)||void 0===n?void 0:n.elements,(e,t)=>{e&&o.__EXPERIMENTAL_ELEMENTS[t]&&c.push({styles:e,selector:o.__EXPERIMENTAL_ELEMENTS[t]})}),Object(f.forEach)(null===(r=e.styles)||void 0===r?void 0:r.blocks,(e,n)=>{var r;const l=a(e);l&&null!=t&&null!==(r=t[n])&&void 0!==r&&r.selector&&c.push({styles:l,selector:t[n].selector}),Object(f.forEach)(null==e?void 0:e.elements,(e,r)=>{e&&null!=t&&t[n]&&null!==o.__EXPERIMENTAL_ELEMENTS&&void 0!==o.__EXPERIMENTAL_ELEMENTS&&o.__EXPERIMENTAL_ELEMENTS[r]&&c.push({styles:e,selector:t[n].selector.split(",").map(e=>e+" "+o.__EXPERIMENTAL_ELEMENTS[r]).join(",")})})}),c})(e,t),r=yn(e,t);let c=".wp-site-blocks > * { margin-top: 0; margin-bottom: 0; }.wp-site-blocks > * + * { margin-top: var( --wp--style--block-gap ); }";return n.forEach(({selector:e,styles:t})=>{const n=function(e={}){return Object(f.reduce)(o.__EXPERIMENTAL_STYLE_PROPERTY,(t,{value:n,properties:r},c)=>{const a=n;if("elements"===Object(f.first)(a))return t;const o=Object(f.get)(e,a);if(r&&!Object(f.isString)(o))Object.entries(r).forEach(e=>{const[n,r]=e;if(!Object(f.get)(o,[r],!1))return;const c=Object(f.kebabCase)(n);t.push(`${c}: ${vn(Object(f.get)(o,[r]))}`)});else if(Object(f.get)(e,a,!1)){const n=c.startsWith("--")?c:Object(f.kebabCase)(c);t.push(`${n}: ${vn(Object(f.get)(e,a))}`)}return t},[])}(t);0!==n.length&&(c+=`${e}{${n.join(";")};}`)}),r.forEach(({selector:e,presets:t})=>{"body"===e&&(e="");const n=function(e,t={}){return Object(f.reduce)(mt,(n,{path:r,cssVarInfix:c,classes:a})=>{if(!a)return n;const o=Object(f.get)(t,r,[]);return["core","theme","user"].forEach(t=>{o[t]&&o[t].forEach(({slug:t})=>{a.forEach(({classSuffix:r,propertyName:a})=>{const o=`.has-${Object(f.kebabCase)(t)}-${r}`,l=e.split(",").map(e=>`${e}${o}`).join(","),i=`var(--wp--preset--${c}--${Object(f.kebabCase)(t)})`;n+=`${l}{${a}: ${i} !important;}`})})}),n},"")}(e,t);Object(f.isEmpty)(n)||(c+=n)}),c};function xn(){const[e,t]=(()=>{const{user:e,setUserConfig:t}=Object(a.useContext)(_t);return[!!e&&!Object(f.isEqual)(e,jt),Object(a.useCallback)(()=>t(()=>jt),[t])]})();return Object(a.createElement)(ut,{className:"edit-site-global-styles-sidebar",identifier:"edit-site/global-styles",title:Object(b.__)("Styles"),icon:dt,closeLabel:Object(b.__)("Close global styles sidebar"),header:Object(a.createElement)(m.Flex,null,Object(a.createElement)(m.FlexBlock,null,Object(a.createElement)("strong",null,Object(b.__)("Styles")),Object(a.createElement)("span",{className:"edit-site-global-styles-sidebar__beta"},Object(b.__)("Beta"))),Object(a.createElement)(m.FlexItem,null,Object(a.createElement)(m.DropdownMenu,{icon:Fe.a,label:Object(b.__)("More Global Styles Actions"),toggleProps:{disabled:!e},controls:[{title:Object(b.__)("Reset to defaults"),onClick:t}]})))},Object(a.createElement)(hn,null))}const Tn="edit-site/template",kn="edit-site/block-inspector";var In=({sidebarName:e})=>{const{enableComplementaryArea:t}=Object(i.useDispatch)(F.i),[n,r]=e===Tn?[Object(b.__)("Template (selected)"),"is-active"]:[Object(b.__)("Template"),""],[c,o]=e===kn?[Object(b.__)("Block (selected)"),"is-active"]:[Object(b.__)("Block"),""];return Object(a.createElement)("ul",null,Object(a.createElement)("li",null,Object(a.createElement)(m.Button,{onClick:()=>t(T,Tn),className:"edit-site-sidebar__panel-tab "+r,"aria-label":n,"data-label":Object(b.__)("Template")},Object(b.__)("Template"))),Object(a.createElement)("li",null,Object(a.createElement)(m.Button,{onClick:()=>t(T,kn),className:"edit-site-sidebar__panel-tab "+o,"aria-label":c,"data-label":Object(b.__)("Block")},Object(b.__)("Block"))))};function Cn({area:e,clientId:t}){const{selectBlock:n,toggleBlockHighlight:r}=Object(i.useDispatch)(Pe.store),c=()=>r(t,!0),o=()=>r(t,!1);return Object(a.createElement)(m.Button,{className:"edit-site-template-card__template-areas-item",icon:Object(Ne.getTemplatePartIcon)(e),onMouseOver:c,onMouseLeave:o,onFocus:c,onBlur:o,onClick:()=>{n(t)}},k[e])}function Pn(){const e=Object(i.useSelect)(e=>e(Ce).getCurrentTemplateTemplateParts(),[]);return e.length?Object(a.createElement)("section",{className:"edit-site-template-card__template-areas"},Object(a.createElement)(m.__experimentalHeading,{level:3,className:"edit-site-template-card__template-areas-title"},Object(b.__)("Areas")),Object(a.createElement)("ul",{className:"edit-site-template-card__template-areas-list"},e.map(({templatePart:e,block:t})=>Object(a.createElement)("li",{key:e.slug},Object(a.createElement)(Cn,{area:e.area,clientId:t.clientId}))))):null}function Nn(){const{title:e,description:t,icon:n}=Object(i.useSelect)(e=>{const{getEditedPostType:t,getEditedPostId:n}=e(Ce),{getEntityRecord:r}=e(s.store),{__experimentalGetTemplateInfo:c}=e(Ne.store),a=r("postType",t(),n());return a?c(a):{}},[]);return e||t?Object(a.createElement)("div",{className:"edit-site-template-card"},Object(a.createElement)(m.Icon,{className:"edit-site-template-card__icon",icon:n}),Object(a.createElement)("div",{className:"edit-site-template-card__content"},Object(a.createElement)("h2",{className:"edit-site-template-card__title"},e),Object(a.createElement)("div",{className:"edit-site-template-card__description"},t),Object(a.createElement)(Pn,null))):null}const{Slot:Rn,Fill:Mn}=Object(m.createSlotFill)("EditSiteSidebarInspector"),An=Mn;function Bn(){const{sidebar:e,isEditorSidebarOpened:t,hasBlockSelection:n}=Object(i.useSelect)(e=>{const t=e(F.i).getActiveComplementaryArea(T);return{sidebar:t,isEditorSidebarOpened:[kn,Tn].includes(t),hasBlockSelection:!!e(Pe.store).getBlockSelectionStart()}},[]),{enableComplementaryArea:r}=Object(i.useDispatch)(F.i);Object(a.useEffect)(()=>{t&&r(T,n?kn:Tn)},[n,t]);let c=e;return t||(c=n?kn:Tn),Object(a.createElement)(a.Fragment,null,Object(a.createElement)(ut,{identifier:c,title:Object(b.__)("Settings"),icon:st.a,closeLabel:Object(b.__)("Close settings sidebar"),header:Object(a.createElement)(In,{sidebarName:c}),headerClassName:"edit-site-sidebar__panel-tabs"},c===Tn&&Object(a.createElement)(m.PanelBody,null,Object(a.createElement)(Nn,null)),c===kn&&Object(a.createElement)(Rn,{bubblesVirtually:!0})),Object(a.createElement)(xn,null))}function Ln({clientId:e}){const{getBlocks:t}=Object(i.useSelect)(Pe.store),{replaceBlocks:n}=Object(i.useDispatch)(Pe.store);return Object(a.createElement)(Pe.BlockSettingsMenuControls,null,({onClose:r})=>Object(a.createElement)(m.MenuItem,{onClick:()=>{n(e,t(e)),r()}},Object(b.__)("Detach blocks from template part")))}function Dn({clientIds:e,blocks:t}){const n=Object(Me.useInstanceId)(Dn),[r,c]=Object(a.useState)(!1),[l,u]=Object(a.useState)(""),{replaceBlocks:d}=Object(i.useDispatch)(Pe.store),{saveEntityRecord:p}=Object(i.useDispatch)(s.store),{createSuccessNotice:O}=Object(i.useDispatch)(D.store),[_,j]=Object(a.useState)("uncategorized"),E=Object(i.useSelect)(e=>e(Ne.store).__experimentalGetDefaultTemplatePartAreas(),[]);return Object(a.createElement)(Pe.BlockSettingsMenuControls,null,({onClose:i})=>Object(a.createElement)(a.Fragment,null,Object(a.createElement)(m.MenuItem,{onClick:()=>{c(!0)}},Object(b.__)("Make template part")),r&&Object(a.createElement)(m.Modal,{title:Object(b.__)("Create a template part"),closeLabel:Object(b.__)("Close"),onRequestClose:()=>{c(!1),u("")},overlayClassName:"edit-site-template-part-converter__modal"},Object(a.createElement)("form",{onSubmit:n=>{n.preventDefault(),(async n=>{const r=Object(b.__)("Untitled Template Part"),c=await p("postType","wp_template_part",{slug:Object(f.kebabCase)(n||r),title:n||r,content:Object(o.serialize)(t),area:_});d(e,Object(o.createBlock)("core/template-part",{slug:c.slug,theme:c.theme})),O(Object(b.__)("Template part created."),{type:"snackbar"})})(l),c(!1),u(""),i()}},Object(a.createElement)(m.TextControl,{label:Object(b.__)("Name"),value:l,onChange:u}),Object(a.createElement)(m.BaseControl,{label:Object(b.__)("Area"),id:"edit-site-template-part-converter__area-selection-"+n,className:"edit-site-template-part-converter__area-base-control"},Object(a.createElement)(m.__experimentalRadioGroup,{label:Object(b.__)("Area"),className:"edit-site-template-part-converter__area-radio-group",id:"edit-site-template-part-converter__area-selection-"+n,onChange:j,checked:_},E.map(({icon:e,label:t,area:n,description:r})=>Object(a.createElement)(m.__experimentalRadio,{key:t,value:n,className:"edit-site-template-part-converter__area-radio"},Object(a.createElement)(m.Flex,{align:"start",justify:"start"},Object(a.createElement)(m.FlexItem,null,Object(a.createElement)(m.Icon,{icon:e})),Object(a.createElement)(m.FlexBlock,{className:"edit-site-template-part-converter__option-label"},t,Object(a.createElement)("div",null,r)),Object(a.createElement)(m.FlexItem,{className:"edit-site-template-part-converter__checkbox"},_===n&&Object(a.createElement)(m.Icon,{icon:Ve.a}))))))),Object(a.createElement)(m.Flex,{className:"edit-site-template-part-converter__convert-modal-actions",justify:"flex-end"},Object(a.createElement)(m.FlexItem,null,Object(a.createElement)(m.Button,{variant:"secondary",onClick:()=>{c(!1),u("")}},Object(b.__)("Cancel"))),Object(a.createElement)(m.FlexItem,null,Object(a.createElement)(m.Button,{variant:"primary",type:"submit"},Object(b.__)("Create"))))))))}function Fn(){var e;const{clientIds:t,blocks:n}=Object(i.useSelect)(e=>{const{getSelectedBlockClientIds:t,getBlocksByClientId:n}=e(Pe.store),r=t();return{clientIds:r,blocks:n(r)}},[]);return 1===n.length&&"core/template-part"===(null===(e=n[0])||void 0===e?void 0:e.name)?Object(a.createElement)(Ln,{clientId:t[0]}):Object(a.createElement)(Dn,{clientIds:t,blocks:n})}var Vn=n("B9Az");function Gn({type:e,id:t,activePage:n,onActivePageChange:r}){const c=Object(i.useSelect)(n=>e&&t&&"URL"!==e&&n(s.store).getEntityRecord("postType",e,t),[e,t]),o=Object(a.useMemo)(()=>{if(null==c||!c.link)return null;const t=Object(L.getPathAndQueryString)(c.link);return t===(null==n?void 0:n.path)?null:()=>r({type:e,slug:c.slug,path:t,context:{postType:c.type,postId:c.id}})},[c,null==n?void 0:n.path,r]);return o&&Object(a.createElement)(m.Button,{icon:Vn.a,label:Object(b.__)("Edit Page Template"),onClick:o})}function zn({onClick:e=(()=>{})}){const{shortcut:t,isBlockInspectorOpen:n}=Object(i.useSelect)(e=>({shortcut:e(Re.store).getShortcutRepresentation("core/edit-site/toggle-block-settings-sidebar"),isBlockInspectorOpen:e(F.i).getActiveComplementaryArea(Ce.name)===kn}),[]),{enableComplementaryArea:r,disableComplementaryArea:c}=Object(i.useDispatch)(F.i),o=n?Object(b.__)("Hide more settings"):Object(b.__)("Show more settings");return Object(a.createElement)(m.MenuItem,{onClick:()=>{n?(c(T),Object(Ge.speak)(Object(b.__)("Block settings closed"))):(r(T,kn),Object(Ge.speak)(Object(b.__)("Additional settings are now available in the Editor block settings sidebar"))),e()},shortcut:t},o)}function Un(){return Object(a.createElement)(Pe.BlockSettingsMenuControls,null,({selectedClientIds:e,onClose:t})=>Object(a.createElement)(Hn,{selectedClientId:e[0],onClose:t}))}function Hn({selectedClientId:e,onClose:t}){const n=Object(i.useSelect)(t=>{const n=t(Pe.store).getBlock(e);if(n&&Object(o.isTemplatePart)(n)){const{theme:e,slug:r}=n.attributes;return t(s.store).getEntityRecord("postType","wp_template_part",`${e}//${r}`)}},[e]),{pushTemplatePart:r}=Object(i.useDispatch)(Ce);return n?Object(a.createElement)(m.MenuItem,{onClick:()=>{r(n.id),t()}},Object(b.sprintf)(Object(b.__)("Edit %s"),n.slug)):null}var qn=n("cjQ8");var Wn=function(){const{isTemplatePart:e,previousTemplateId:t}=Object(i.useSelect)(e=>{const{getEditedPostType:t,getPreviousEditedPostId:n}=e(Ce);return{isTemplatePart:"wp_template_part"===t(),previousTemplateId:n()}},[]),{goBack:n}=Object(i.useDispatch)(Ce);return e&&t?Object(a.createElement)(m.Button,{className:"edit-site-visual-editor__back-button",icon:qn.a,onClick:()=>{n()}},Object(b.__)("Back")):null};function $n({direction:e,resizeWidthBy:t}){return Object(a.createElement)(a.Fragment,null,Object(a.createElement)("button",{className:"resizable-editor__drag-handle is-"+e,"aria-label":Object(b.__)("Drag to resize"),"aria-describedby":"resizable-editor__resize-help-"+e,onKeyDown:function(n){const{keyCode:r}=n;"left"===e&&r===Ye.LEFT||"right"===e&&r===Ye.RIGHT?t(20):("left"===e&&r===Ye.RIGHT||"right"===e&&r===Ye.LEFT)&&t(-20)}}),Object(a.createElement)(m.VisuallyHidden,{id:"resizable-editor__resize-help-"+e},Object(b.__)("Use left and right arrow keys to resize the canvas.")))}const Xn="100%",Yn="100%",Kn={position:void 0,userSelect:void 0,cursor:void 0,width:void 0,height:void 0,top:void 0,right:void 0,bottom:void 0,left:void 0};var Qn=function({enableResizing:e,settings:t,...n}){const r=Object(i.useSelect)(e=>e(Ce).__experimentalGetPreviewDeviceType(),[]),c=Object(Pe.__experimentalUseResizeCanvas)(r),[o,l]=Object(a.useState)(Xn),[s,u]=Object(a.useState)(Yn),d=Object(a.useRef)(),b=Object(Pe.__unstableUseMouseMoveTypingReset)(),p=Object(Me.useMergeRefs)([d,b]);Object(a.useEffect)((function(){const t=d.current;if(!t||!e)return;const n=new t.contentWindow.ResizeObserver(()=>{u(t.contentDocument.querySelector(".edit-site-block-editor__block-list").offsetHeight)});return n.observe(t.contentDocument.documentElement),()=>{n.disconnect()}}),[e]);const O=Object(a.useCallback)(e=>{d.current&&l(d.current.offsetWidth+e)},[]);return Object(a.createElement)(m.ResizableBox,{size:{width:o,height:s},onResizeStop:(e,t,n)=>{l(n.style.width)},minWidth:300,maxWidth:"100%",maxHeight:"100%",enable:{right:e,left:e},showHandle:e,resizeRatio:2,handleComponent:{left:Object(a.createElement)($n,{direction:"left",resizeWidthBy:O}),right:Object(a.createElement)($n,{direction:"right",resizeWidthBy:O})},handleClasses:void 0,handleStyles:{left:Kn,right:Kn}},Object(a.createElement)(Pe.__unstableIframe,Object(St.a)({style:e?void 0:c,head:Object(a.createElement)(a.Fragment,null,Object(a.createElement)(Pe.__unstableEditorStyles,{styles:t.styles}),Object(a.createElement)("style",null,".edit-site-block-editor__block-list { display: flow-root; }")),ref:p,name:"editor-canvas",className:"edit-site-visual-editor__editor-canvas"},n)))};const Zn={type:"default",alignments:[]};function Jn({setIsInserterOpen:e}){const{settings:t,templateType:n,templateId:r,page:c}=Object(i.useSelect)(t=>{const{getSettings:n,getEditedPostType:r,getEditedPostId:c,getPage:a}=t(Ce);return{settings:n(e),templateType:r(),templateId:c(),page:a()}},[e]),[o,l,u]=Object(s.useEntityBlockEditor)("postType",n),{setPage:d}=Object(i.useDispatch)(Ce),m=Object(a.useRef)(),b=Object(Me.useMergeRefs)([m,Object(Pe.__unstableUseTypingObserver)()]),p=Object(Me.useViewportMatch)("small","<"),{clearSelectedBlock:O}=Object(i.useDispatch)(Pe.store),_="wp_template_part"===n;return Object(a.createElement)(Pe.BlockEditorProvider,{settings:t,value:o,onInput:l,onChange:u,useSubRegistry:!1},Object(a.createElement)(Un,null),Object(a.createElement)(Fn,null),Object(a.createElement)(Pe.__experimentalLinkControl.ViewerFill,null,Object(a.useCallback)(e=>Object(a.createElement)(Gn,Object(St.a)({},e,{activePage:c,onActivePageChange:d})),[c])),Object(a.createElement)(An,null,Object(a.createElement)(Pe.BlockInspector,null)),Object(a.createElement)(Pe.BlockTools,{className:Je()("edit-site-visual-editor",{"is-focus-mode":_}),__unstableContentRef:m,onClick:e=>{e.target===e.currentTarget&&O()}},Object(a.createElement)(Wn,null),Object(a.createElement)(Qn,{key:r,enableResizing:_&&!p,settings:t,contentRef:b},Object(a.createElement)(Pe.BlockList,{className:"edit-site-block-editor__block-list wp-site-blocks",__experimentalLayout:Zn})),Object(a.createElement)(Pe.__unstableBlockSettingsMenuFirstItem,null,({onClose:e})=>Object(a.createElement)(zn,{onClick:e}))))}function er({openEntitiesSavedStates:e}){const{__experimentalGetDirtyEntityRecords:t,isSavingEntityRecord:n}=Object(i.useSelect)(s.store),r=Object(i.useSelect)(e=>e(Ce).isListViewOpened(),[]),c=Object(i.useSelect)(e=>e(F.i).getActiveComplementaryArea(Ce.name)===kn,[]),{redo:a,undo:o}=Object(i.useDispatch)(s.store),{setIsListViewOpened:l}=Object(i.useDispatch)(Ce),{enableComplementaryArea:u,disableComplementaryArea:d}=Object(i.useDispatch)(F.i);return Object(Re.useShortcut)("core/edit-site/save",r=>{r.preventDefault();const c=t(),a=!!c.length;!c.some(e=>n(e.kind,e.name,e.key))&&a&&e()}),Object(Re.useShortcut)("core/edit-site/undo",e=>{o(),e.preventDefault()}),Object(Re.useShortcut)("core/edit-site/redo",e=>{a(),e.preventDefault()}),Object(Re.useShortcut)("core/edit-site/toggle-list-view",()=>{l(!r)}),Object(Re.useShortcut)("core/edit-site/toggle-block-settings-sidebar",e=>{e.preventDefault(),c?d(T):u(T,kn)}),null}er.Register=function(){const{registerShortcut:e}=Object(i.useDispatch)(Re.store);return Object(a.useEffect)(()=>{e({name:"core/edit-site/save",category:"global",description:Object(b.__)("Save your changes."),keyCombination:{modifier:"primary",character:"s"}}),e({name:"core/edit-site/undo",category:"global",description:Object(b.__)("Undo your last changes."),keyCombination:{modifier:"primary",character:"z"}}),e({name:"core/edit-site/redo",category:"global",description:Object(b.__)("Redo your last undo."),keyCombination:{modifier:"primaryShift",character:"z"}}),e({name:"core/edit-site/toggle-list-view",category:"global",description:Object(b.__)("Open the block list view."),keyCombination:{modifier:"access",character:"o"}}),e({name:"core/edit-site/toggle-block-settings-sidebar",category:"global",description:Object(b.__)("Show or hide the block settings sidebar."),keyCombination:{modifier:"primaryShift",character:","}})},[e]),null};var tr=er;function nr(){const{setTemplate:e,setTemplatePart:t,showHomepage:n,setPage:r}=Object(i.useDispatch)(Ce);Object(a.useEffect)(()=>{const c=window.location.href,a=Object(L.getQueryArg)(c,"postId");if(!a)return void n();const o=Object(L.getQueryArg)(c,"postType");"page"===o||"post"===o?r({context:{postType:o,postId:a}}):"wp_template"===o?e(a):"wp_template_part"===o?t(a):n()},[]);const c=Object(i.useSelect)(e=>{var t,n;const{getEditedPostType:r,getEditedPostId:c,getPage:a}=e(Ce),o=a();let l=c(),i=r();return null!=o&&null!==(t=o.context)&&void 0!==t&&t.postId&&null!=o&&null!==(n=o.context)&&void 0!==n&&n.postType&&(l=o.context.postId,i=o.context.postType),l&&i?{postId:l,postType:i}:null},[]);return Object(a.useEffect)(()=>{const e=c?Object(L.addQueryArgs)(window.location.href,c):Object(L.removeQueryArgs)(window.location.href,"postType","postId");window.history.replaceState({},"",e)},[c]),null}var rr=n("w95h");function cr(){const{setIsInserterOpened:e}=Object(i.useDispatch)(Ce),t=Object(i.useSelect)(e=>e(Ce).__experimentalGetInsertionPoint(),[]),n=Object(Me.useViewportMatch)("medium","<"),[r,c]=Object(Me.__experimentalUseDialog)({onClose:()=>e(!1)});return Object(a.createElement)("div",Object(St.a)({ref:r},c,{className:"edit-site-editor__inserter-panel"}),Object(a.createElement)("div",{className:"edit-site-editor__inserter-panel-header"},Object(a.createElement)(m.Button,{icon:rr.a,onClick:()=>e(!1)})),Object(a.createElement)("div",{className:"edit-site-editor__inserter-panel-content"},Object(a.createElement)(Pe.__experimentalLibrary,{showInserterHelpPanel:!0,shouldFocusBlock:n,rootClientId:t.rootClientId,__experimentalInsertionIndex:t.insertionIndex,__experimentalFilterValue:t.filterValue})))}var ar=n("bWcr");function or(){const{setIsListViewOpened:e}=Object(i.useDispatch)(Ce),{clearSelectedBlock:t,selectBlock:n}=Object(i.useDispatch)(Pe.store);const r=Object(Me.useFocusOnMount)("firstElement"),c=Object(Me.useFocusReturn)();const o="edit-site-editor__list-view-panel-label-"+Object(Me.useInstanceId)(or);return Object(a.createElement)("div",{"aria-labelledby":o,className:"edit-site-editor__list-view-panel",onKeyDown:function(t){t.keyCode!==Ye.ESCAPE||t.defaultPrevented||e(!1)}},Object(a.createElement)("div",{className:"edit-site-editor__list-view-panel-header"},Object(a.createElement)("strong",{id:o},Object(b.__)("List view")),Object(a.createElement)(m.Button,{icon:ar.a,label:Object(b.__)("Close list view sidebar"),onClick:()=>e(!1)})),Object(a.createElement)("div",{className:"edit-site-editor__list-view-panel-content",ref:Object(Me.useMergeRefs)([c,r])},Object(a.createElement)(Pe.__experimentalListView,{onSelect:async function(e){await t(),n(e,-1)},showNestedBlocks:!0,__experimentalFeatures:!0,__experimentalPersistentListViewFeatures:!0})))}function lr({text:e,children:t}){const n=Object(Me.useCopyToClipboard)(e);return Object(a.createElement)(m.Button,{variant:"secondary",ref:n},t)}class ir extends a.Component{constructor(){super(...arguments),this.reboot=this.reboot.bind(this),this.state={error:null}}static getDerivedStateFromError(e){return{error:e}}reboot(){this.props.onError()}render(){const{error:e}=this.state;return e?Object(a.createElement)(Pe.Warning,{className:"editor-error-boundary",actions:[Object(a.createElement)(m.Button,{key:"recovery",onClick:this.reboot,variant:"secondary"},Object(b.__)("Attempt Recovery")),Object(a.createElement)(lr,{key:"copy-error",text:e.stack},Object(b.__)("Copy Error"))]},Object(b.__)("The editor has encountered an unexpected error.")):this.props.children}}function sr(){const[e,t]=function(){const[e,t]=Object(a.useState)([]),[n,r]=Object(a.useState)({}),{merged:c}=Object(a.useContext)(_t);return Object(a.useEffect)(()=>{if(null==c||!c.styles||null==c||!c.settings)return;const e=(e=>{const t={};return e.forEach(e=>{var n,r;const c=e.name,a=null!==(n=null==e||null===(r=e.supports)||void 0===r?void 0:r.__experimentalSelector)&&void 0!==n?n:".wp-block-"+c.replace("core/","").replace("/","-");t[c]={name:c,selector:a}}),t})(Object(o.getBlockTypes)()),n=Sn(c,e),a=wn(c,e);t([{css:n,isGlobalStyles:!0,__experimentalNoWrapper:!0},{css:a,isGlobalStyles:!0}]),r(c.settings)},[c]),[e,n]}(),{getSettings:n}=Object(i.useSelect)(Ce),{updateSettings:r}=Object(i.useDispatch)(Ce);Object(a.useEffect)(()=>{var c;if(!e||!t)return;const a=n(),o=null==a||null===(c=a.styles)||void 0===c?void 0:c.filter(e=>!e.isGlobalStyles);r({...a,styles:[...o,...e],__experimentalFeatures:t})},[e,t])}function ur(){return sr(),null}function dr(e,t){if(Array.isArray(t))return t}function mr(e){const t=Object(f.cloneDeep)(e);return mt.forEach(({path:e})=>{const n=Object(f.get)(t,e);n&&Object(f.set)(t,e,{user:n})}),t}function br(e){const t=Object(f.cloneDeep)(e);return mt.forEach(({path:e})=>{const n=Object(f.get)(t,e);n&&Object(f.set)(t,e,(null!=n?n:{}).user)}),t}const pr=e=>{if(!Object(f.isObject)(e)||Array.isArray(e))return e;const t=Object(f.pickBy)(Object(f.mapValues)(e,pr),f.identity);return Object(f.isEmpty)(t)?void 0:t};function Or(){const[e,t,n]=function(){const{globalStylesId:e,settings:t,styles:n}=Object(i.useSelect)(e=>{const t=e(s.store).__experimentalGetCurrentGlobalStylesId(),n=t?e(s.store).getEditedEntityRecord("root","globalStyles",t):void 0;return{globalStylesId:t,settings:null==n?void 0:n.settings,styles:null==n?void 0:n.styles}},[]),{getEditedEntityRecord:r}=Object(i.useSelect)(s.store),{editEntityRecord:c}=Object(i.useDispatch)(s.store),o=Object(a.useMemo)(()=>({settings:mr(null!=t?t:{}),styles:null!=n?n:{}}),[t,n]),l=Object(a.useCallback)(t=>{var n,a;const o=r("root","globalStyles",e),l=t({styles:null!==(n=null==o?void 0:o.styles)&&void 0!==n?n:{},settings:mr(null!==(a=null==o?void 0:o.settings)&&void 0!==a?a:{})});c("root","globalStyles",e,{styles:pr(l.styles)||{},settings:pr(br(l.settings))||{}})},[e]);return[!!t||!!n,o,l]}(),r=Object(i.useSelect)(e=>e(s.store).__experimentalGetCurrentThemeBaseGlobalStyles(),[]),c=Object(a.useMemo)(()=>{return r&&t?(e=r,n=t,Object(f.mergeWith)({},e,n,dr)):{};var e,n},[t,r]);return Object(a.useMemo)(()=>({isReady:e,user:t,base:r,merged:c,setUserConfig:n}),[c,t,r,n,e])}function _r({children:e}){const t=Or();return t.isReady?Object(a.createElement)(_t.Provider,{value:t},e):null}const jr={secondarySidebar:Object(b.__)("Block Library")};var Er=function({initialSettings:e,onError:t}){const{isInserterOpen:n,isListViewOpen:r,sidebarIsOpened:c,settings:o,entityId:l,templateType:u,page:d,template:O,templateResolved:_,isNavigationOpen:j}=Object(i.useSelect)(e=>{const{isInserterOpened:t,isListViewOpened:n,getSettings:r,getEditedPostType:c,getEditedPostId:a,getPage:o,isNavigationOpened:l}=e(Ce),{hasFinishedResolution:i,getEntityRecord:u}=e(s.store),d=c(),m=a();return{isInserterOpen:t(),isListViewOpen:n(),sidebarIsOpened:!!e(F.i).getActiveComplementaryArea(Ce.name),settings:r(),templateType:d,page:o(),template:m?u("postType",d,m):null,templateResolved:!!m&&i("getEntityRecord",["postType",d,m]),entityId:m,isNavigationOpen:l()}},[]),{updateEditorSettings:E}=Object(i.useDispatch)(Ne.store),{setPage:f,setIsInserterOpened:g,updateSettings:h}=Object(i.useDispatch)(Ce),{enableComplementaryArea:v}=Object(i.useDispatch)(F.i);Object(a.useEffect)(()=>{h(e)},[]);const{defaultTemplateTypes:y,defaultTemplatePartAreas:S}=o;Object(a.useEffect)(()=>{E({defaultTemplateTypes:y,defaultTemplatePartAreas:S})},[y,S]);const[w,x]=Object(a.useState)(!1),T=Object(a.useCallback)(()=>x(!0),[]),k=Object(a.useCallback)(()=>{x(!1)},[]),I=Object(a.useMemo)(()=>({...null==d?void 0:d.context,queryContext:[(null==d?void 0:d.context.queryContext)||{page:1},e=>f({...d,context:{...null==d?void 0:d.context,queryContext:{...null==d?void 0:d.context.queryContext,...e}}})]}),[null==d?void 0:d.context]);Object(a.useEffect)(()=>{j?document.body.classList.add("is-navigation-sidebar-open"):document.body.classList.remove("is-navigation-sidebar-open")},[j]),Object(a.useEffect)((function(){"open"===new URLSearchParams(window.location.search).get("styles")&&v("core/edit-site","edit-site/global-styles")}),[v]);const C=(null==o?void 0:o.siteUrl)&&void 0!==u&&void 0!==l;return Object(a.createElement)(a.Fragment,null,Object(a.createElement)(nr,null),C&&Object(a.createElement)(Re.ShortcutProvider,null,Object(a.createElement)(m.SlotFillProvider,null,Object(a.createElement)(s.EntityProvider,{kind:"root",type:"site"},Object(a.createElement)(s.EntityProvider,{kind:"postType",type:u,id:l},Object(a.createElement)(_r,null,Object(a.createElement)(Pe.BlockContextProvider,{value:I},Object(a.createElement)(ur,null),Object(a.createElement)(ir,{onError:t},Object(a.createElement)(F.d,{isActive:!0}),Object(a.createElement)(Ne.UnsavedChangesWarning,null),Object(a.createElement)(tr.Register,null),Object(a.createElement)(Bn,null),Object(a.createElement)(F.e,{labels:jr,secondarySidebar:n?Object(a.createElement)(cr,null):r?Object(a.createElement)(or,null):null,sidebar:c&&Object(a.createElement)(F.b.Slot,{scope:"core/edit-site"}),header:Object(a.createElement)(it,{openEntitiesSavedStates:T}),notices:Object(a.createElement)(Ne.EditorSnackbars,null),content:Object(a.createElement)(a.Fragment,null,Object(a.createElement)(Ne.EditorNotices,null),O&&Object(a.createElement)(Jn,{setIsInserterOpen:g}),_&&!O&&(null==o?void 0:o.siteUrl)&&l&&Object(a.createElement)(m.Notice,{status:"warning",isDismissible:!1},Object(b.__)("You attempted to edit an item that doesn't exist. Perhaps it was deleted?")),Object(a.createElement)(tr,{openEntitiesSavedStates:T})),actions:Object(a.createElement)(a.Fragment,null,w?Object(a.createElement)(Ne.EntitiesSavedStates,{close:k}):Object(a.createElement)("div",{className:"edit-site-editor__toggle-save-panel"},Object(a.createElement)(m.Button,{variant:"secondary",className:"edit-site-editor__toggle-save-panel-button",onClick:T,"aria-expanded":!1},Object(b.__)("Open save panel")))),footer:Object(a.createElement)(Pe.BlockBreadcrumb,null)}),Object(a.createElement)(m.Popover.Slot,null),Object(a.createElement)(p.PluginArea,null)))))))))};const fr="__experimentalMainDashboardButton",{Fill:gr,Slot:hr}=Object(m.createSlotFill)(fr),vr=gr;vr.Slot=({children:e})=>{const t=Object(m.__experimentalUseSlot)(fr);return Boolean(t.fills&&t.fills.length)?Object(a.createElement)(hr,{bubblesVirtually:!0}):e};var yr=vr;var Sr=function({icon:e,isOpen:t}){const{isRequestingSiteIcon:n,navigationPanelMenu:r,siteIconUrl:c}=Object(i.useSelect)(e=>{const{getCurrentTemplateNavigationPanelSubMenu:t}=e(Ce),{getEntityRecord:n,isResolving:r}=e(s.store),c=n("root","__unstableBase",void 0)||{};return{isRequestingSiteIcon:r("core","getEntityRecord",["root","__unstableBase",void 0]),navigationPanelMenu:t(),siteIconUrl:c.site_icon_url}},[]),{openNavigationPanelToMenu:o,setIsNavigationPanelOpened:l}=Object(i.useDispatch)(Ce),u=Object(Me.useReducedMotion)();let d=Object(a.createElement)(m.Icon,{size:"36px",icon:Le.a});const p={expand:{scale:1.7,borderRadius:0,transition:{type:"tween",duration:"0.2"}}};return c?d=Object(a.createElement)(m.__unstableMotion.img,{variants:!u&&p,alt:Object(b.__)("Site Icon"),className:"edit-site-navigation-toggle__site-icon",src:c}):n?d=null:e&&(d=Object(a.createElement)(m.Icon,{size:"36px",icon:e})),Object(a.createElement)(m.__unstableMotion.div,{className:"edit-site-navigation-toggle"+(t?" is-open":""),whileHover:"expand"},Object(a.createElement)(m.Button,{className:"edit-site-navigation-toggle__button has-icon",label:Object(b.__)("Toggle navigation"),onClick:()=>{t?l(!1):o(r)},showTooltip:!0},d))};function wr({className:e,...t}){return Object(a.createElement)(F.b,Object(St.a)({panelClassName:e,className:"edit-site-sidebar",scope:"core/edit-site"},t))}function xr(e){return Object(a.createElement)(F.c,Object(St.a)({__unstableExplicitMenuItem:!0,scope:"core/edit-site"},e))}var Tr=Object(Me.compose)(Object(p.withPluginContext)((e,t)=>({icon:t.icon||e.icon,name:"core/edit-site/plugin-more-menu"})))(F.a);function kr(e,t){Object(a.unmountComponentAtNode)(e);const n=kr.bind(null,e,t);Object(a.render)(Object(a.createElement)(Er,{initialSettings:t,onError:n}),e)}function Ir(e,t){t.__experimentalFetchLinkSuggestions=(e,n)=>Object(s.__experimentalFetchLinkSuggestions)(e,n,t),t.__experimentalFetchRichUrlData=s.__experimentalFetchUrlData,t.__experimentalSpotlightEntityBlocks=["core/template-part"];const n=document.getElementById(e),r=kr.bind(null,n,t);Object(i.dispatch)(o.store).__experimentalReapplyBlockTypeFilters(),Object(l.registerCoreBlocks)(),Object(a.render)(Object(a.createElement)(Er,{initialSettings:t,onError:r}),n)}},K2cm:function(e,t,n){"use strict";var r=n("GRId"),c=n("Tqx9");const a=Object(r.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(c.Path,{d:"M15.6 6.5l-1.1 1 2.9 3.3H8c-.9 0-1.7.3-2.3.9-1.4 1.5-1.4 4.2-1.4 5.6v.2h1.5v-.3c0-1.1 0-3.5 1-4.5.3-.3.7-.5 1.3-.5h9.2L14.5 15l1.1 1.1 4.6-4.6-4.6-5z"}));t.a=a},K9lf:function(e,t){e.exports=window.wp.compose},KEfo:function(e,t){e.exports=window.wp.viewport},Mmq9:function(e,t){e.exports=window.wp.url},NWDH:function(e,t,n){"use strict";var r=n("GRId"),c=n("Tqx9");const a=Object(r.createElement)(c.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(r.createElement)(c.Path,{d:"M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z"}));t.a=a},Ntru:function(e,t,n){"use strict";var r=n("GRId"),c=n("Tqx9");const a=Object(r.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(c.Path,{d:"M18.3 11.7c-.6-.6-1.4-.9-2.3-.9H6.7l2.9-3.3-1.1-1-4.5 5L8.5 16l1-1-2.7-2.7H16c.5 0 .9.2 1.3.5 1 1 1 3.4 1 4.5v.3h1.5v-.2c0-1.5 0-4.3-1.5-5.7z"}));t.a=a},OzlF:function(e,t,n){"use strict";var r=n("GRId"),c=n("Tqx9");const a=Object(r.createElement)(c.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(r.createElement)(c.Path,{d:"M13.8 5.2H3v1.5h10.8V5.2zm-3.6 12v1.5H21v-1.5H10.2zm7.2-6H6.6v1.5h10.8v-1.5z"}));t.a=a},Q4Sy:function(e,t,n){"use strict";var r=n("GRId"),c=n("Tqx9");const a=Object(r.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(c.Path,{d:"M18 11.2h-5.2V6h-1.6v5.2H6v1.6h5.2V18h1.6v-5.2H18z"}));t.a=a},QyPg:function(e,t){e.exports=window.wp.blockLibrary},RMJe:function(e,t,n){"use strict";var r=n("GRId"),c=n("Tqx9");const a=Object(r.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(c.Path,{d:"M16.7 7.1l-6.3 8.5-3.3-2.5-.9 1.2 4.5 3.4L17.9 8z"}));t.a=a},RxS6:function(e,t){e.exports=window.wp.keycodes},TSYQ:function(e,t,n){var r;
/*!
Copyright (c) 2018 Jed Watson.
Licensed under the MIT License (MIT), see
http://jedwatson.github.io/classnames
*/!function(){"use strict";var n={}.hasOwnProperty;function c(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var a=typeof r;if("string"===a||"number"===a)e.push(r);else if(Array.isArray(r)){if(r.length){var o=c.apply(null,r);o&&e.push(o)}}else if("object"===a)if(r.toString===Object.prototype.toString)for(var l in r)n.call(r,l)&&r[l]&&e.push(l);else e.push(r.toString())}}return e.join(" ")}e.exports?(c.default=c,e.exports=c):void 0===(r=function(){return c}.apply(t,[]))||(e.exports=r)}()},Tqx9:function(e,t){e.exports=window.wp.primitives},TvNi:function(e,t){e.exports=window.wp.plugins},U60i:function(e,t,n){"use strict";n.d(t,"b",(function(){return $})),n.d(t,"c",(function(){return z})),n.d(t,"d",(function(){return X})),n.d(t,"e",(function(){return K})),n.d(t,"h",(function(){return H})),n.d(t,"f",(function(){return Z})),n.d(t,"g",(function(){return ee})),n.d(t,"a",(function(){return V})),n.d(t,"i",(function(){return M}));var r={};n.r(r),n.d(r,"enableComplementaryArea",(function(){return y})),n.d(r,"disableComplementaryArea",(function(){return S})),n.d(r,"pinItem",(function(){return x})),n.d(r,"unpinItem",(function(){return T})),n.d(r,"toggleFeature",(function(){return k})),n.d(r,"setFeatureValue",(function(){return I})),n.d(r,"setFeatureDefaults",(function(){return C}));var c={};n.r(c),n.d(c,"getActiveComplementaryArea",(function(){return P})),n.d(c,"isItemPinned",(function(){return N})),n.d(c,"isFeatureActive",(function(){return R}));var a=n("wx14"),o=n("GRId"),l=n("TSYQ"),i=n.n(l),s=n("tI+e"),u=n("1ZqX"),d=n("l3Sj"),m=n("RMJe"),b=n("URob"),p=n("Xxwi"),O=n("KEfo"),_=n("bWcr"),j=n("YLtl");const E=Object(u.combineReducers)({features(e={},t){if("SET_FEATURE_DEFAULTS"===t.type){const{scope:n,defaults:r}=t;return{...e,[n]:{...e[n],...r}}}return e}}),f=Object(u.combineReducers)({features(e={},t){if("SET_FEATURE_VALUE"===t.type){const{scope:n,featureName:r,value:c}=t;return{...e,[n]:{...e[n],[r]:c}}}return e}}),g=Object(u.combineReducers)({singleEnableItems:function(e={},{type:t,itemType:n,scope:r,item:c}){return"SET_SINGLE_ENABLE_ITEM"===t&&n&&r?{...e,[n]:{...e[n],[r]:c||null}}:e},multipleEnableItems:function(e={},{type:t,itemType:n,scope:r,item:c,isEnable:a}){if("SET_MULTIPLE_ENABLE_ITEM"!==t||!n||!r||!c||Object(j.get)(e,[n,r,c])===a)return e;const o=e[n]||{},l=o[r]||{};return{...e,[n]:{...o,[r]:{...l,[c]:a||!1}}}}});var h=Object(u.combineReducers)({enableItems:g,preferenceDefaults:E,preferences:f});function v(e,t,n){return{type:"SET_SINGLE_ENABLE_ITEM",itemType:e,scope:t,item:n}}function y(e,t){return v("complementaryArea",e,t)}function S(e){return v("complementaryArea",e,void 0)}function w(e,t,n,r){return{type:"SET_MULTIPLE_ENABLE_ITEM",itemType:e,scope:t,item:n,isEnable:r}}function x(e,t){return w("pinnedItems",e,t,!0)}function T(e,t){return w("pinnedItems",e,t,!1)}function k(e,t){return function({select:n,dispatch:r}){const c=n.isFeatureActive(e,t);r.setFeatureValue(e,t,!c)}}function I(e,t,n){return{type:"SET_FEATURE_VALUE",scope:e,featureName:t,value:!!n}}function C(e,t){return{type:"SET_FEATURE_DEFAULTS",scope:e,defaults:t}}function P(e,t){return function(e,t,n){return Object(j.get)(e.enableItems.singleEnableItems,[t,n])}(e,"complementaryArea",t)}function N(e,t,n){return!1!==function(e,t,n,r){return Object(j.get)(e.enableItems.multipleEnableItems,[t,n,r])}(e,"pinnedItems",t,n)}function R(e,t,n){var r,c;const a=null===(r=e.preferences.features[t])||void 0===r?void 0:r[n];return!!(void 0!==a?a:null===(c=e.preferenceDefaults.features[t])||void 0===c?void 0:c[n])}const M=Object(u.createReduxStore)("core/interface",{reducer:h,actions:r,selectors:c,persist:["enableItems","preferences"],__experimentalUseThunks:!0});Object(u.registerStore)("core/interface",{reducer:h,actions:r,selectors:c,persist:["enableItems","preferences"],__experimentalUseThunks:!0});var A=n("TvNi"),B=Object(A.withPluginContext)((e,t)=>({icon:t.icon||e.icon,identifier:t.identifier||`${e.name}/${t.name}`}));var L=B((function({as:e=s.Button,scope:t,identifier:n,icon:r,selectedIcon:c,...l}){const i=e,d=Object(u.useSelect)(e=>e(M).getActiveComplementaryArea(t)===n,[n]),{enableComplementaryArea:m,disableComplementaryArea:b}=Object(u.useDispatch)(M);return Object(o.createElement)(i,Object(a.a)({icon:c&&d?c:r,onClick:()=>{d?b(t):m(t,n)}},Object(j.omit)(l,["name"])))}));var D=({smallScreenTitle:e,children:t,className:n,toggleButtonProps:r})=>{const c=Object(o.createElement)(L,Object(a.a)({icon:_.a},r));return Object(o.createElement)(o.Fragment,null,Object(o.createElement)("div",{className:"components-panel__header interface-complementary-area-header__small"},e&&Object(o.createElement)("span",{className:"interface-complementary-area-header__small-title"},e),c),Object(o.createElement)("div",{className:i()("components-panel__header","interface-complementary-area-header",n),tabIndex:-1},t,c))};function F({name:e,as:t=s.Button,onClick:n,...r}){return Object(o.createElement)(s.Fill,{name:e},({onClick:e})=>Object(o.createElement)(t,Object(a.a)({onClick:n||e?(...t)=>{(n||j.noop)(...t),(e||j.noop)(...t)}:void 0},r)))}F.Slot=function({name:e,as:t=s.ButtonGroup,fillProps:n={},bubblesVirtually:r,...c}){return Object(o.createElement)(s.Slot,{name:e,bubblesVirtually:r,fillProps:n},e=>{if(Object(j.isEmpty)(o.Children.toArray(e)))return null;const n=[];o.Children.forEach(e,({props:{__unstableExplicitMenuItem:e,__unstableTarget:t}})=>{t&&e&&n.push(t)});const r=o.Children.map(e,e=>!e.props.__unstableExplicitMenuItem&&n.includes(e.props.__unstableTarget)?null:e);return Object(o.createElement)(t,c,r)})};var V=F;const G=e=>Object(o.createElement)(s.MenuItem,Object(j.omit)(e,["__unstableExplicitMenuItem","__unstableTarget"]));function z({scope:e,target:t,__unstableExplicitMenuItem:n,...r}){return Object(o.createElement)(L,Object(a.a)({as:r=>Object(o.createElement)(V,Object(a.a)({__unstableExplicitMenuItem:n,__unstableTarget:`${e}/${t}`,as:G,name:e+"/plugin-more-menu"},r)),role:"menuitemcheckbox",selectedIcon:m.a,name:t,scope:e},r))}function U({scope:e,...t}){return Object(o.createElement)(s.Fill,Object(a.a)({name:"PinnedItems/"+e},t))}U.Slot=function({scope:e,className:t,...n}){return Object(o.createElement)(s.Slot,Object(a.a)({name:"PinnedItems/"+e},n),e=>!Object(j.isEmpty)(e)&&Object(o.createElement)("div",{className:i()(t,"interface-pinned-items")},e))};var H=U;function q({scope:e,children:t,className:n}){return Object(o.createElement)(s.Fill,{name:"ComplementaryArea/"+e},Object(o.createElement)("div",{className:n},t))}const W=B((function({children:e,className:t,closeLabel:n=Object(d.__)("Close plugin"),identifier:r,header:c,headerClassName:a,icon:l,isPinnable:_=!0,panelClassName:j,scope:E,name:f,smallScreenTitle:g,title:h,toggleShortcut:v,isActiveByDefault:y,showIconLabels:S=!1}){const{isActive:w,isPinned:x,activeArea:T,isSmall:k,isLarge:I}=Object(u.useSelect)(e=>{const{getActiveComplementaryArea:t,isItemPinned:n}=e(M),c=t(E);return{isActive:c===r,isPinned:n(E,r),activeArea:c,isSmall:e(O.store).isViewportMatch("< medium"),isLarge:e(O.store).isViewportMatch("large")}},[r,E]);!function(e,t,n,r,c){const a=Object(o.useRef)(!1),l=Object(o.useRef)(!1),{enableComplementaryArea:i,disableComplementaryArea:s}=Object(u.useDispatch)(M);Object(o.useEffect)(()=>{r&&c&&!a.current?(s(e),l.current=!0):l.current&&!c&&a.current?(l.current=!1,i(e,t)):l.current&&n&&n!==t&&(l.current=!1),c!==a.current&&(a.current=c)},[r,c,e,t,n])}(E,r,T,w,k);const{enableComplementaryArea:C,disableComplementaryArea:P,pinItem:N,unpinItem:R}=Object(u.useDispatch)(M);return Object(o.useEffect)(()=>{y&&void 0===T&&!k&&C(E,r)},[T,y,E,r,k]),Object(o.createElement)(o.Fragment,null,_&&Object(o.createElement)(H,{scope:E},x&&Object(o.createElement)(L,{scope:E,identifier:r,isPressed:w&&(!S||I),"aria-expanded":w,label:h,icon:S?m.a:l,showTooltip:!S,variant:S?"tertiary":void 0})),f&&_&&Object(o.createElement)(z,{target:f,scope:E,icon:l},h),w&&Object(o.createElement)(q,{className:i()("interface-complementary-area",t),scope:E},Object(o.createElement)(D,{className:a,closeLabel:n,onClose:()=>P(E),smallScreenTitle:g,toggleButtonProps:{label:n,shortcut:v,scope:E,identifier:r}},c||Object(o.createElement)(o.Fragment,null,Object(o.createElement)("strong",null,h),_&&Object(o.createElement)(s.Button,{className:"interface-complementary-area__pin-unpin-item",icon:x?b.a:p.a,label:x?Object(d.__)("Unpin from toolbar"):Object(d.__)("Pin to toolbar"),onClick:()=>(x?R:N)(E,r),isPressed:x,"aria-expanded":x}))),Object(o.createElement)(s.Panel,{className:j},e)))}));W.Slot=function({scope:e,...t}){return Object(o.createElement)(s.Slot,Object(a.a)({name:"ComplementaryArea/"+e},t))};var $=W;var X=({isActive:e})=>(Object(o.useEffect)(()=>{let e=!1;return document.body.classList.contains("sticky-menu")&&(e=!0,document.body.classList.remove("sticky-menu")),()=>{e&&document.body.classList.add("sticky-menu")}},[]),Object(o.useEffect)(()=>(e?document.body.classList.add("is-fullscreen-mode"):document.body.classList.remove("is-fullscreen-mode"),()=>{e&&document.body.classList.remove("is-fullscreen-mode")}),[e]),null),Y=n("K9lf");var K=Object(o.forwardRef)((function({footer:e,header:t,sidebar:n,secondarySidebar:r,notices:c,content:l,drawer:u,actions:m,labels:b,className:p,shortcuts:O},_){const j=Object(s.__unstableUseNavigateRegions)(O);!function(e){Object(o.useEffect)(()=>{const t=document&&document.querySelector(`html:not(.${e})`);if(t)return t.classList.toggle(e),()=>{t.classList.toggle(e)}},[e])}("interface-interface-skeleton__html-container");const E={...{drawer:Object(d.__)("Drawer"),header:Object(d.__)("Header"),body:Object(d.__)("Content"),secondarySidebar:Object(d.__)("Block Library"),sidebar:Object(d.__)("Settings"),actions:Object(d.__)("Publish"),footer:Object(d.__)("Footer")},...b};return Object(o.createElement)("div",Object(a.a)({},j,{ref:Object(Y.useMergeRefs)([_,j.ref]),className:i()(p,"interface-interface-skeleton",j.className,!!e&&"has-footer")}),!!u&&Object(o.createElement)("div",{className:"interface-interface-skeleton__drawer",role:"region","aria-label":E.drawer},u),Object(o.createElement)("div",{className:"interface-interface-skeleton__editor"},!!t&&Object(o.createElement)("div",{className:"interface-interface-skeleton__header",role:"region","aria-label":E.header,tabIndex:"-1"},t),Object(o.createElement)("div",{className:"interface-interface-skeleton__body"},!!r&&Object(o.createElement)("div",{className:"interface-interface-skeleton__secondary-sidebar",role:"region","aria-label":E.secondarySidebar,tabIndex:"-1"},r),!!c&&Object(o.createElement)("div",{className:"interface-interface-skeleton__notices"},c),Object(o.createElement)("div",{className:"interface-interface-skeleton__content",role:"region","aria-label":E.body,tabIndex:"-1"},l),!!n&&Object(o.createElement)("div",{className:"interface-interface-skeleton__sidebar",role:"region","aria-label":E.sidebar,tabIndex:"-1"},n),!!m&&Object(o.createElement)("div",{className:"interface-interface-skeleton__actions",role:"region","aria-label":E.actions,tabIndex:"-1"},m))),!!e&&Object(o.createElement)("div",{className:"interface-interface-skeleton__footer",role:"region","aria-label":E.footer,tabIndex:"-1"},e))})),Q=n("VKE3");function Z({as:e=s.DropdownMenu,className:t,label:n=Object(d.__)("Options"),popoverProps:r,toggleProps:c,children:a}){return Object(o.createElement)(e,{className:i()("interface-more-menu-dropdown",t),icon:Q.a,label:n,popoverProps:{position:"bottom left",...r,className:i()("interface-more-menu-dropdown__content",null==r?void 0:r.className)},toggleProps:{tooltipPosition:"bottom",...c}},e=>a(e))}var J=n("gdqT");function ee({scope:e,label:t,info:n,messageActivated:r,messageDeactivated:c,shortcut:a,feature:l}){const i=Object(u.useSelect)(t=>t(M).isFeatureActive(e,l),[l]),{toggleFeature:b}=Object(u.useDispatch)(M);return Object(o.createElement)(s.MenuItem,{icon:i&&m.a,isSelected:i,onClick:()=>{b(e,l),i?Object(J.speak)(c||Object(d.__)("Feature deactivated")):Object(J.speak)(r||Object(d.__)("Feature activated"))},role:"menuitemcheckbox",info:n,shortcut:a},t)}},URob:function(e,t,n){"use strict";var r=n("GRId"),c=n("Tqx9");const a=Object(r.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(c.Path,{d:"M11.776 4.454a.25.25 0 01.448 0l2.069 4.192a.25.25 0 00.188.137l4.626.672a.25.25 0 01.139.426l-3.348 3.263a.25.25 0 00-.072.222l.79 4.607a.25.25 0 01-.362.263l-4.138-2.175a.25.25 0 00-.232 0l-4.138 2.175a.25.25 0 01-.363-.263l.79-4.607a.25.25 0 00-.071-.222L4.754 9.881a.25.25 0 01.139-.426l4.626-.672a.25.25 0 00.188-.137l2.069-4.192z"}));t.a=a},VKE3:function(e,t,n){"use strict";var r=n("GRId"),c=n("Tqx9");const a=Object(r.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(c.Path,{d:"M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z"}));t.a=a},Xxwi:function(e,t,n){"use strict";var r=n("GRId"),c=n("Tqx9");const a=Object(r.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(c.Path,{fillRule:"evenodd",d:"M9.706 8.646a.25.25 0 01-.188.137l-4.626.672a.25.25 0 00-.139.427l3.348 3.262a.25.25 0 01.072.222l-.79 4.607a.25.25 0 00.362.264l4.138-2.176a.25.25 0 01.233 0l4.137 2.175a.25.25 0 00.363-.263l-.79-4.607a.25.25 0 01.072-.222l3.347-3.262a.25.25 0 00-.139-.427l-4.626-.672a.25.25 0 01-.188-.137l-2.069-4.192a.25.25 0 00-.448 0L9.706 8.646zM12 7.39l-.948 1.921a1.75 1.75 0 01-1.317.957l-2.12.308 1.534 1.495c.412.402.6.982.503 1.55l-.362 2.11 1.896-.997a1.75 1.75 0 011.629 0l1.895.997-.362-2.11a1.75 1.75 0 01.504-1.55l1.533-1.495-2.12-.308a1.75 1.75 0 01-1.317-.957L12 7.39z",clipRule:"evenodd"}));t.a=a},YLtl:function(e,t){e.exports=window.lodash},axFQ:function(e,t){e.exports=window.wp.blockEditor},bWcr:function(e,t,n){"use strict";var r=n("GRId"),c=n("Tqx9");const a=Object(r.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(c.Path,{d:"M12 13.06l3.712 3.713 1.061-1.06L13.061 12l3.712-3.712-1.06-1.06L12 10.938 8.288 7.227l-1.061 1.06L10.939 12l-3.712 3.712 1.06 1.061L12 13.061z"}));t.a=a},cjQ8:function(e,t,n){"use strict";var r=n("GRId"),c=n("Tqx9");const a=Object(r.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(c.Path,{d:"M20 10.8H6.7l4.1-4.5-1.1-1.1-5.8 6.3 5.8 5.8 1.1-1.1-4-3.9H20z"}));t.a=a},g56x:function(e,t){e.exports=window.wp.hooks},gdqT:function(e,t){e.exports=window.wp.a11y},hF7m:function(e,t){e.exports=window.wp.keyboardShortcuts},iClF:function(e,t,n){"use strict";var r=n("GRId");t.a=function({icon:e,size:t=24,...n}){return Object(r.cloneElement)(e,{width:t,height:t,...n})}},jSdM:function(e,t){e.exports=window.wp.editor},jZUy:function(e,t){e.exports=window.wp.coreData},l3Sj:function(e,t){e.exports=window.wp.i18n},onLe:function(e,t){e.exports=window.wp.notices},pPDe:function(e,t,n){"use strict";var r,c;function a(e){return[e]}function o(){var e={clear:function(){e.head=null}};return e}function l(e,t,n){var r;if(e.length!==t.length)return!1;for(r=n;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}r={},c="undefined"!=typeof WeakMap,t.a=function(e,t){var n,i;function s(){n=c?new WeakMap:o()}function u(){var n,r,c,a,o,s=arguments.length;for(a=new Array(s),c=0;c<s;c++)a[c]=arguments[c];for(o=t.apply(null,a),(n=i(o)).isUniqueByDependants||(n.lastDependants&&!l(o,n.lastDependants,0)&&n.clear(),n.lastDependants=o),r=n.head;r;){if(l(r.args,a,1))return r!==n.head&&(r.prev.next=r.next,r.next&&(r.next.prev=r.prev),r.next=n.head,r.prev=null,n.head.prev=r,n.head=r),r.val;r=r.next}return r={val:e.apply(null,a)},a[0]=null,r.args=a,n.head&&(n.head.prev=r,r.next=n.head),n.head=r,r.val}return t||(t=a),i=c?function(e){var t,c,a,l,i,s=n,u=!0;for(t=0;t<e.length;t++){if(c=e[t],!(i=c)||"object"!=typeof i){u=!1;break}s.has(c)?s=s.get(c):(a=new WeakMap,s.set(c,a),s=a)}return s.has(r)||((l=o()).isUniqueByDependants=u,s.set(r,l)),s.get(r)}:function(){return n},u.getDependants=t,u.clear=s,s(),u}},rrFr:function(e,t,n){var r,c,a;c=[],void 0===(a="function"==typeof(r=function(){return function e(t,n,r){var c,a,o=window,l="application/octet-stream",i=r||l,s=t,u=!n&&!r&&s,d=document.createElement("a"),m=function(e){return String(e)},b=o.Blob||o.MozBlob||o.WebKitBlob||m,p=n||"download";if(b=b.call?b.bind(o):Blob,"true"===String(this)&&(i=(s=[s,i])[0],s=s[1]),u&&u.length<2048&&(p=u.split("/").pop().split("?")[0],d.href=u,-1!==d.href.indexOf(u))){var O=new XMLHttpRequest;return O.open("GET",u,!0),O.responseType="blob",O.onload=function(t){e(t.target.response,p,l)},setTimeout((function(){O.send()}),0),O}if(/^data:([\w+-]+\/[\w+.-]+)?[,;]/.test(s)){if(!(s.length>2096103.424&&b!==m))return navigator.msSaveBlob?navigator.msSaveBlob(f(s),p):g(s);i=(s=f(s)).type||l}else if(/([\x80-\xff])/.test(s)){for(var _=0,j=new Uint8Array(s.length),E=j.length;_<E;++_)j[_]=s.charCodeAt(_);s=new b([j],{type:i})}function f(e){for(var t=e.split(/[:;,]/),n=t[1],r=("base64"==t[2]?atob:decodeURIComponent)(t.pop()),c=r.length,a=0,o=new Uint8Array(c);a<c;++a)o[a]=r.charCodeAt(a);return new b([o],{type:n})}function g(e,t){if("download"in d)return d.href=e,d.setAttribute("download",p),d.className="download-js-link",d.innerHTML="downloading...",d.style.display="none",document.body.appendChild(d),setTimeout((function(){d.click(),document.body.removeChild(d),!0===t&&setTimeout((function(){o.URL.revokeObjectURL(d.href)}),250)}),66),!0;if(/(Version)\/(\d+)\.(\d+)(?:\.(\d+))?.*Safari\//.test(navigator.userAgent))return/^data:/.test(e)&&(e="data:"+e.replace(/^data:([\w\/\-\+]+)/,l)),window.open(e)||confirm("Displaying New Document\n\nUse Save As... to download, then click back to return to this page.")&&(location.href=e),!0;var n=document.createElement("iframe");document.body.appendChild(n),!t&&/^data:/.test(e)&&(e="data:"+e.replace(/^data:([\w\/\-\+]+)/,l)),n.src=e,setTimeout((function(){document.body.removeChild(n)}),333)}if(c=s instanceof b?s:new b([s],{type:i}),navigator.msSaveBlob)return navigator.msSaveBlob(c,p);if(o.URL)g(o.URL.createObjectURL(c),!0);else{if("string"==typeof c||c.constructor===m)try{return g("data:"+i+";base64,"+o.btoa(c))}catch(e){return g("data:"+i+","+encodeURIComponent(c))}(a=new FileReader).onload=function(e){g(this.result)},a.readAsDataURL(c)}return!0}})?r.apply(t,c):r)||(e.exports=a)},"tI+e":function(e,t){e.exports=window.wp.components},w95h:function(e,t,n){"use strict";var r=n("GRId"),c=n("Tqx9");const a=Object(r.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(c.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"}));t.a=a},wduq:function(e,t,n){"use strict";var r=n("GRId"),c=n("Tqx9");const a=Object(r.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},Object(r.createElement)(c.Path,{d:"M20 10c0-5.51-4.49-10-10-10C4.48 0 0 4.49 0 10c0 5.52 4.48 10 10 10 5.51 0 10-4.48 10-10zM7.78 15.37L4.37 6.22c.55-.02 1.17-.08 1.17-.08.5-.06.44-1.13-.06-1.11 0 0-1.45.11-2.37.11-.18 0-.37 0-.58-.01C4.12 2.69 6.87 1.11 10 1.11c2.33 0 4.45.87 6.05 2.34-.68-.11-1.65.39-1.65 1.58 0 .74.45 1.36.9 2.1.35.61.55 1.36.55 2.46 0 1.49-1.4 5-1.4 5l-3.03-8.37c.54-.02.82-.17.82-.17.5-.05.44-1.25-.06-1.22 0 0-1.44.12-2.38.12-.87 0-2.33-.12-2.33-.12-.5-.03-.56 1.2-.06 1.22l.92.08 1.26 3.41zM17.41 10c.24-.64.74-1.87.43-4.25.7 1.29 1.05 2.71 1.05 4.25 0 3.29-1.73 6.24-4.4 7.78.97-2.59 1.94-5.2 2.92-7.78zM6.1 18.09C3.12 16.65 1.11 13.53 1.11 10c0-1.3.23-2.48.72-3.59C3.25 10.3 4.67 14.2 6.1 18.09zm4.03-6.63l2.58 6.98c-.86.29-1.76.45-2.71.45-.79 0-1.57-.11-2.29-.33.81-2.38 1.62-4.74 2.42-7.1z"}));t.a=a},wx14:function(e,t,n){"use strict";function r(){return(r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}n.d(t,"a",(function(){return r}))},ywyh:function(e,t){e.exports=window.wp.apiFetch}});