text: !function(){var e={4403:function(e,t){var r;!function(){"use strict";var n={}.hasOwnProperty;function i(){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=i.apply(null,r);o&&e.push(o)}}else if("object"===a)if(r.toString===Object.prototype.toString)for(var s in r)n.call(r,s)&&r[s]&&e.push(s);else e.push(r.toString())}}return e.join(" ")}e.exports?(i.default=i,e.exports=i):void 0===(r=function(){return i}.apply(t,[]))||(e.exports=r)}()}},t={};function r(n){var i=t[n];if(void 0!==i)return i.exports;var a=t[n]={exports:{}};return e[n](a,a.exports,r),a.exports}r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,{a:t}),t},r.d=function(e,t){for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};!function(){"use strict";r.r(n),r.d(n,{initialize:function(){return ir},reinitializeEditor:function(){return nr}});var e={};r.r(e),r.d(e,{disableComplementaryArea:function(){return M},enableComplementaryArea:function(){return O},pinItem:function(){return V},setFeatureDefaults:function(){return H},setFeatureValue:function(){return z},toggleFeature:function(){return G},unpinItem:function(){return F}});var t={};r.r(t),r.d(t,{getActiveComplementaryArea:function(){return U},isFeatureActive:function(){return j},isItemPinned:function(){return $}});var i={};r.r(i),r.d(i,{closeGeneralSidebar:function(){return We},moveBlockToWidgetArea:function(){return Te},persistStubPost:function(){return ve},saveEditedWidgetAreas:function(){return ye},saveWidgetArea:function(){return Se},saveWidgetAreas:function(){return ke},setIsInserterOpened:function(){return Ce},setIsListViewOpened:function(){return xe},setIsWidgetAreaOpen:function(){return Ne},setWidgetAreasOpenState:function(){return Be},setWidgetIdForClientId:function(){return Ae}});var a={};r.r(a),r.d(a,{getWidgetAreas:function(){return Pe},getWidgets:function(){return Le}});var o={};r.r(o),r.d(o,{__experimentalGetInsertionPoint:function(){return $e},canInsertBlockInWidgetArea:function(){return je},getEditedWidgetAreas:function(){return Fe},getIsWidgetAreaOpen:function(){return He},getParentWidgetAreaBlock:function(){return Ve},getReferenceWidgetBlocks:function(){return Ge},getWidget:function(){return Oe},getWidgetAreaForWidgetId:function(){return De},getWidgetAreas:function(){return Me},getWidgets:function(){return Re},isInserterOpened:function(){return Ue},isListViewOpened:function(){return Ke},isSavingWidgetAreas:function(){return ze}});var s={};r.r(s),r.d(s,{metadata:function(){return tt},name:function(){return rt},settings:function(){return nt}});var l=window.wp.element,c=window.wp.blocks,d=window.wp.data,u=window.wp.blockLibrary,m=window.wp.coreData,g=window.wp.widgets,p=window.wp.preferences,_=window.wp.apiFetch,h=r.n(_),w=(0,d.combineReducers)({blockInserterPanel:function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SET_IS_LIST_VIEW_OPENED":return!t.isOpen&&e;case"SET_IS_INSERTER_OPENED":return t.value}return e},listViewPanel:function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SET_IS_INSERTER_OPENED":return!t.value&&e;case"SET_IS_LIST_VIEW_OPENED":return t.isOpen}return e},widgetAreasOpenState:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;const{type:r}=t;switch(r){case"SET_WIDGET_AREAS_OPEN_STATE":return t.widgetAreasOpenState;case"SET_IS_WIDGET_AREA_OPEN":{const{clientId:r,isOpen:n}=t;return{...e,[r]:n}}default:return e}}}),f=window.wp.i18n,E=window.wp.notices;function b(){return(b=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}var v=r(4403),y=r.n(v),k=window.wp.components,S=window.wp.primitives,I=(0,l.createElement)(S.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(S.Path,{d:"M16.7 7.1l-6.3 8.5-3.3-2.5-.9 1.2 4.5 3.4L17.9 8z"})),A=(0,l.createElement)(S.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(S.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"})),B=(0,l.createElement)(S.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(S.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"})),N=window.wp.viewport,C=(0,l.createElement)(S.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(S.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"})),x=window.lodash;const W=(0,d.combineReducers)({singleEnableItems:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{type:t,itemType:r,scope:n,item:i}=arguments.length>1?arguments[1]:void 0;return"SET_SINGLE_ENABLE_ITEM"===t&&r&&n?{...e,[r]:{...e[r],[n]:i||null}}:e},multipleEnableItems:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{type:t,itemType:r,scope:n,item:i,isEnable:a}=arguments.length>1?arguments[1]:void 0;if("SET_MULTIPLE_ENABLE_ITEM"!==t||!r||!n||!i||(0,x.get)(e,[r,n,i])===a)return e;const o=e[r]||{},s=o[n]||{};return{...e,[r]:{...o,[n]:{...s,[i]:a||!1}}}}});var T=(0,d.combineReducers)({enableItems:W}),P=window.wp.deprecated,L=r.n(P);function R(e,t,r){return{type:"SET_SINGLE_ENABLE_ITEM",itemType:e,scope:t,item:r}}function O(e,t){return R("complementaryArea",e,t)}function M(e){return R("complementaryArea",e,void 0)}function D(e,t,r,n){return{type:"SET_MULTIPLE_ENABLE_ITEM",itemType:e,scope:t,item:r,isEnable:n}}function V(e,t){return D("pinnedItems",e,t,!0)}function F(e,t){return D("pinnedItems",e,t,!1)}function G(e,t){return function(r){let{registry:n}=r;L()("wp.dispatch( 'core/interface' ).toggleFeature",{version:"6.0",alternative:"wp.dispatch( 'core/preferences' ).toggle"}),n.dispatch(p.store).toggle(e,t)}}function z(e,t,r){return function(n){let{registry:i}=n;L()("wp.dispatch( 'core/interface' ).setFeatureValue",{version:"6.0",alternative:"wp.dispatch( 'core/preferences' ).set"}),i.dispatch(p.store).set(e,t,!!r)}}function H(e,t){return function(r){let{registry:n}=r;L()("wp.dispatch( 'core/interface' ).setFeatureDefaults",{version:"6.0",alternative:"wp.dispatch( 'core/preferences' ).setDefaults"}),n.dispatch(p.store).setDefaults(e,t)}}function U(e,t){return function(e,t,r){return(0,x.get)(e.enableItems.singleEnableItems,["complementaryArea",r])}(e,0,t)}function $(e,t,r){return!1!==function(e,t,r,n){return(0,x.get)(e.enableItems.multipleEnableItems,["pinnedItems",r,n])}(e,0,t,r)}const j=(0,d.createRegistrySelector)((e=>(t,r,n)=>(L()("wp.select( 'core/interface' ).isFeatureActive( scope, featureName )",{version:"6.0",alternative:"!! wp.select( 'core/preferences' ).isFeatureActive( scope, featureName )"}),!!e(p.store).get(r,n)))),K="core/interface",Y={reducer:T,actions:e,selectors:t,persist:["enableItems"]},q=(0,d.createReduxStore)(K,Y);(0,d.registerStore)(K,Y);var Q=window.wp.plugins,J=(0,Q.withPluginContext)(((e,t)=>({icon:t.icon||e.icon,identifier:t.identifier||`${e.name}/${t.name}`}))),X=J((function(e){let{as:t=k.Button,scope:r,identifier:n,icon:i,selectedIcon:a,...o}=e;const s=t,c=(0,d.useSelect)((e=>e(q).getActiveComplementaryArea(r)===n),[n]),{enableComplementaryArea:u,disableComplementaryArea:m}=(0,d.useDispatch)(q);return(0,l.createElement)(s,b({icon:a&&c?a:i,onClick:()=>{c?m(r):u(r,n)}},(0,x.omit)(o,["name"])))})),Z=e=>{let{smallScreenTitle:t,children:r,className:n,toggleButtonProps:i}=e;const a=(0,l.createElement)(X,b({icon:C},i));return(0,l.createElement)(l.Fragment,null,(0,l.createElement)("div",{className:"components-panel__header interface-complementary-area-header__small"},t&&(0,l.createElement)("span",{className:"interface-complementary-area-header__small-title"},t),a),(0,l.createElement)("div",{className:y()("components-panel__header","interface-complementary-area-header",n),tabIndex:-1},r,a))};function ee(e){let{name:t,as:r=k.Button,onClick:n,...i}=e;return(0,l.createElement)(k.Fill,{name:t},(e=>{let{onClick:t}=e;return(0,l.createElement)(r,b({onClick:n||t?function(){(n||x.noop)(...arguments),(t||x.noop)(...arguments)}:void 0},i))}))}ee.Slot=function(e){let{name:t,as:r=k.ButtonGroup,fillProps:n={},bubblesVirtually:i,...a}=e;return(0,l.createElement)(k.Slot,{name:t,bubblesVirtually:i,fillProps:n},(e=>{if((0,x.isEmpty)(l.Children.toArray(e)))return null;const t=[];l.Children.forEach(e,(e=>{let{props:{__unstableExplicitMenuItem:r,__unstableTarget:n}}=e;n&&r&&t.push(n)}));const n=l.Children.map(e,(e=>!e.props.__unstableExplicitMenuItem&&t.includes(e.props.__unstableTarget)?null:e));return(0,l.createElement)(r,a,n)}))};var te=ee;const re=e=>(0,l.createElement)(k.MenuItem,(0,x.omit)(e,["__unstableExplicitMenuItem","__unstableTarget"]));function ne(e){let{scope:t,target:r,__unstableExplicitMenuItem:n,...i}=e;return(0,l.createElement)(X,b({as:e=>(0,l.createElement)(te,b({__unstableExplicitMenuItem:n,__unstableTarget:`${t}/${r}`,as:re,name:`${t}/plugin-more-menu`},e)),role:"menuitemcheckbox",selectedIcon:I,name:r,scope:t},i))}function ie(e){let{scope:t,...r}=e;return(0,l.createElement)(k.Fill,b({name:`PinnedItems/${t}`},r))}ie.Slot=function(e){let{scope:t,className:r,...n}=e;return(0,l.createElement)(k.Slot,b({name:`PinnedItems/${t}`},n),(e=>!(0,x.isEmpty)(e)&&(0,l.createElement)("div",{className:y()(r,"interface-pinned-items")},e)))};var ae=ie;function oe(e){let{scope:t,children:r,className:n}=e;return(0,l.createElement)(k.Fill,{name:`ComplementaryArea/${t}`},(0,l.createElement)("div",{className:n},r))}const se=J((function(e){let{children:t,className:r,closeLabel:n=(0,f.__)("Close plugin"),identifier:i,header:a,headerClassName:o,icon:s,isPinnable:c=!0,panelClassName:u,scope:m,name:g,smallScreenTitle:p,title:_,toggleShortcut:h,isActiveByDefault:w,showIconLabels:E=!1}=e;const{isActive:b,isPinned:v,activeArea:S,isSmall:C,isLarge:x}=(0,d.useSelect)((e=>{const{getActiveComplementaryArea:t,isItemPinned:r}=e(q),n=t(m);return{isActive:n===i,isPinned:r(m,i),activeArea:n,isSmall:e(N.store).isViewportMatch("< medium"),isLarge:e(N.store).isViewportMatch("large")}}),[i,m]);!function(e,t,r,n,i){const a=(0,l.useRef)(!1),o=(0,l.useRef)(!1),{enableComplementaryArea:s,disableComplementaryArea:c}=(0,d.useDispatch)(q);(0,l.useEffect)((()=>{n&&i&&!a.current?(c(e),o.current=!0):o.current&&!i&&a.current?(o.current=!1,s(e,t)):o.current&&r&&r!==t&&(o.current=!1),i!==a.current&&(a.current=i)}),[n,i,e,t,r])}(m,i,S,b,C);const{enableComplementaryArea:W,disableComplementaryArea:T,pinItem:P,unpinItem:L}=(0,d.useDispatch)(q);return(0,l.useEffect)((()=>{w&&void 0===S&&!C&&W(m,i)}),[S,w,m,i,C]),(0,l.createElement)(l.Fragment,null,c&&(0,l.createElement)(ae,{scope:m},v&&(0,l.createElement)(X,{scope:m,identifier:i,isPressed:b&&(!E||x),"aria-expanded":b,label:_,icon:E?I:s,showTooltip:!E,variant:E?"tertiary":void 0})),g&&c&&(0,l.createElement)(ne,{target:g,scope:m,icon:s},_),b&&(0,l.createElement)(oe,{className:y()("interface-complementary-area",r),scope:m},(0,l.createElement)(Z,{className:o,closeLabel:n,onClose:()=>T(m),smallScreenTitle:p,toggleButtonProps:{label:n,shortcut:h,scope:m,identifier:i}},a||(0,l.createElement)(l.Fragment,null,(0,l.createElement)("strong",null,_),c&&(0,l.createElement)(k.Button,{className:"interface-complementary-area__pin-unpin-item",icon:v?A:B,label:v?(0,f.__)("Unpin from toolbar"):(0,f.__)("Pin to toolbar"),onClick:()=>(v?L:P)(m,i),isPressed:v,"aria-expanded":v}))),(0,l.createElement)(k.Panel,{className:u},t)))}));se.Slot=function(e){let{scope:t,...r}=e;return(0,l.createElement)(k.Slot,b({name:`ComplementaryArea/${t}`},r))};var le=se,ce=window.wp.compose,de=(0,l.forwardRef)((function(e,t){let{footer:r,header:n,sidebar:i,secondarySidebar:a,notices:o,content:s,drawer:c,actions:d,labels:u,className:m,shortcuts:g}=e;const p=(0,k.__unstableUseNavigateRegions)(g);!function(e){(0,l.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 _={
  /* translators: accessibility text for the nav bar landmark region. */
  drawer:(0,f.__)("Drawer"),
  /* translators: accessibility text for the top bar landmark region. */
  header:(0,f.__)("Header"),
  /* translators: accessibility text for the content landmark region. */
  body:(0,f.__)("Content"),
  /* translators: accessibility text for the secondary sidebar landmark region. */
  secondarySidebar:(0,f.__)("Block Library"),
  /* translators: accessibility text for the settings landmark region. */
  sidebar:(0,f.__)("Settings"),
  /* translators: accessibility text for the publish landmark region. */
  actions:(0,f.__)("Publish"),
  /* translators: accessibility text for the footer landmark region. */
  footer:(0,f.__)("Footer"),...u};return(0,l.createElement)("div",b({},p,{ref:(0,ce.useMergeRefs)([t,p.ref]),className:y()(m,"interface-interface-skeleton",p.className,!!r&&"has-footer")}),!!c&&(0,l.createElement)("div",{className:"interface-interface-skeleton__drawer",role:"region","aria-label":_.drawer,tabIndex:"-1"},c),(0,l.createElement)("div",{className:"interface-interface-skeleton__editor"},!!n&&(0,l.createElement)("div",{className:"interface-interface-skeleton__header",role:"region","aria-label":_.header,tabIndex:"-1"},n),(0,l.createElement)("div",{className:"interface-interface-skeleton__body"},!!a&&(0,l.createElement)("div",{className:"interface-interface-skeleton__secondary-sidebar",role:"region","aria-label":_.secondarySidebar,tabIndex:"-1"},a),!!o&&(0,l.createElement)("div",{className:"interface-interface-skeleton__notices"},o),(0,l.createElement)("div",{className:"interface-interface-skeleton__content",role:"region","aria-label":_.body,tabIndex:"-1"},s),!!i&&(0,l.createElement)("div",{className:"interface-interface-skeleton__sidebar",role:"region","aria-label":_.sidebar,tabIndex:"-1"},i),!!d&&(0,l.createElement)("div",{className:"interface-interface-skeleton__actions",role:"region","aria-label":_.actions,tabIndex:"-1"},d))),!!r&&(0,l.createElement)("div",{className:"interface-interface-skeleton__footer",role:"region","aria-label":_.footer,tabIndex:"-1"},r))})),ue=(0,l.createElement)(S.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(S.Path,{d:"M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z"}));function me(e){let{as:t=k.DropdownMenu,className:r,label:
  /* translators: button label text should, if possible, be under 16 characters. */
  n=(0,f.__)("Options"),popoverProps:i,toggleProps:a,children:o}=e;return(0,l.createElement)(t,{className:y()("interface-more-menu-dropdown",r),icon:ue,label:n,popoverProps:{position:"bottom left",...i,className:y()("interface-more-menu-dropdown__content",null==i?void 0:i.className)},toggleProps:{tooltipPosition:"bottom",...a}},(e=>o(e)))}var ge=window.wp.blockEditor;function pe(e){if("block"===e.id_base){const t=(0,c.parse)(e.instance.raw.content);return t.length?(0,g.addWidgetIdToBlock)(t[0],e.id):(0,g.addWidgetIdToBlock)((0,c.createBlock)("core/paragraph",{},[]),e.id)}let t;return t=e._embedded.about[0].is_multi?{idBase:e.id_base,instance:e.instance}:{id:e.id},(0,g.addWidgetIdToBlock)((0,c.createBlock)("core/legacy-widget",t,[]),e.id)}function _e(e){let t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n="core/legacy-widget"===e.name&&(e.attributes.id||e.attributes.instance);var i,a,o;return t=n?{...r,id:null!==(i=e.attributes.id)&&void 0!==i?i:r.id,id_base:null!==(a=e.attributes.idBase)&&void 0!==a?a:r.id_base,instance:null!==(o=e.attributes.instance)&&void 0!==o?o:r.instance}:{...r,id_base:"block",instance:{raw:{content:(0,c.serialize)(e)}}},delete t.rendered,delete t.rendered_form,t}const he="root",we="sidebar",fe="postType",Ee=e=>`widget-area-${e}`,be="core/edit-widgets",ve=(e,t)=>r=>{let{registry:n}=r;const i=((e,t)=>({id:e,slug:e,status:"draft",type:"page",blocks:t,meta:{widgetAreaId:e}}))(e,t);return n.dispatch(m.store).receiveEntityRecords(he,fe,i,{id:i.id},!1),i},ye=()=>async e=>{let{select:t,dispatch:r,registry:n}=e;const i=t.getEditedWidgetAreas();if(null!=i&&i.length)try{await r.saveWidgetAreas(i),n.dispatch(E.store).createSuccessNotice((0,f.__)("Widgets saved."),{type:"snackbar"})}catch(e){n.dispatch(E.store).createErrorNotice(
  /* translators: %s: The error message. */
  (0,f.sprintf)((0,f.__)("There was an error. %s"),e.message),{type:"snackbar"})}},ke=e=>async t=>{let{dispatch:r,registry:n}=t;try{for(const t of e)await r.saveWidgetArea(t.id)}finally{await n.dispatch(m.store).finishResolution("getEntityRecord",he,we,{per_page:-1})}},Se=e=>async t=>{let{dispatch:r,select:n,registry:i}=t;const a=n.getWidgets(),o=i.select(m.store).getEditedEntityRecord(he,fe,Ee(e)),s=Object.values(a).filter((t=>{let{sidebar:r}=t;return r===e})),l=[],c=o.blocks.filter((e=>{const{id:t}=e.attributes;if("core/legacy-widget"===e.name&&t){if(l.includes(t))return!1;l.push(t)}return!0})),d=[];for(const e of s)n.getWidgetAreaForWidgetId(e.id)||d.push(e);const u=[],p=[],_=[];for(let t=0;t<c.length;t++){const r=c[t],n=(0,g.getWidgetIdFromBlock)(r),o=a[n],s=_e(r,o);if(_.push(n),o){if(i.dispatch(m.store).editEntityRecord("root","widget",n,{...s,sidebar:e},{undoIgnore:!0}),!i.select(m.store).hasEditsForEntityRecord("root","widget",n))continue;p.push((e=>{let{saveEditedEntityRecord:t}=e;return t("root","widget",n)}))}else p.push((t=>{let{saveEntityRecord:r}=t;return r("root","widget",{...s,sidebar:e})}));u.push({block:r,position:t,clientId:r.clientId})}for(const e of d)p.push((t=>{let{deleteEntityRecord:r}=t;return r("root","widget",e.id,{force:!0})}));const h=(await i.dispatch(m.store).__experimentalBatch(p)).filter((e=>!e.hasOwnProperty("deleted"))),w=[];for(let e=0;e<h.length;e++){const t=h[e],{block:r,position:n}=u[e];var E;o.blocks[n].attributes.__internalWidgetId=t.id,i.select(m.store).getLastEntitySaveError("root","widget",t.id)&&w.push((null===(E=r.attributes)||void 0===E?void 0:E.name)||(null==r?void 0:r.name)),_[n]||(_[n]=t.id)}if(w.length)throw new Error((0,f.sprintf)(
  /* translators: %s: List of widget names */
  (0,f.__)("Could not save the following widgets: %s."),w.join(", ")));i.dispatch(m.store).editEntityRecord(he,we,e,{widgets:_},{undoIgnore:!0}),r(Ie(e)),i.dispatch(m.store).receiveEntityRecords(he,fe,o,void 0)},Ie=e=>t=>{let{registry:r}=t;const n=r.select(m.store).getLastEntitySaveError(he,we,e);r.dispatch(m.store).saveEditedEntityRecord(he,we,e);const i=r.select(m.store).getLastEntitySaveError(he,we,e);if(i&&n!==i)throw new Error(i)};function Ae(e,t){return{type:"SET_WIDGET_ID_FOR_CLIENT_ID",clientId:e,widgetId:t}}function Be(e){return{type:"SET_WIDGET_AREAS_OPEN_STATE",widgetAreasOpenState:e}}function Ne(e,t){return{type:"SET_IS_WIDGET_AREA_OPEN",clientId:e,isOpen:t}}function Ce(e){return{type:"SET_IS_INSERTER_OPENED",value:e}}function xe(e){return{type:"SET_IS_LIST_VIEW_OPENED",isOpen:e}}const We=()=>e=>{let{registry:t}=e;t.dispatch(q).disableComplementaryArea(be)},Te=(e,t)=>async r=>{let{dispatch:n,select:i,registry:a}=r;const o=a.select(ge.store).getBlockRootClientId([e]),s=a.select(ge.store).getBlocks().find((e=>{let{attributes:r}=e;return r.id===t})).clientId,l=a.select(ge.store).getBlockOrder(s).length;i.getIsWidgetAreaOpen(s)||n.setIsWidgetAreaOpen(s,!0),a.dispatch(ge.store).moveBlocksToPosition([e],o,s,l)},Pe=()=>async e=>{let{dispatch:t,registry:r}=e;const n=[],i=(await r.resolveSelect(m.store).getEntityRecords(he,we,{per_page:-1})).sort(((e,t)=>"wp_inactive_widgets"===e.id?1:"wp_inactive_widgets"===t.id?-1:0));for(const e of i)n.push((0,c.createBlock)("core/widget-area",{id:e.id,name:e.name})),e.widgets.length||t(ve(Ee(e.id),[]));const a={};n.forEach(((e,t)=>{a[e.clientId]=0===t})),t(Be(a)),t(ve("widget-areas",n))},Le=()=>async e=>{let{dispatch:t,registry:r}=e;const n=await r.resolveSelect(m.store).getEntityRecords("root","widget",{per_page:-1,_embed:"about"}),i={};for(const e of n){const t=pe(e);i[e.sidebar]=i[e.sidebar]||[],i[e.sidebar].push(t)}for(const e in i)i.hasOwnProperty(e)&&t(ve(Ee(e),i[e]))},Re=(0,d.createRegistrySelector)((e=>()=>{const t=e(m.store).getEntityRecords("root","widget",{per_page:-1,_embed:"about"});return(0,x.keyBy)(t,"id")})),Oe=(0,d.createRegistrySelector)((e=>(t,r)=>e(be).getWidgets()[r])),Me=(0,d.createRegistrySelector)((e=>()=>e(m.store).getEntityRecords(he,we,{per_page:-1}))),De=(0,d.createRegistrySelector)((e=>(t,r)=>e(be).getWidgetAreas().find((t=>e(m.store).getEditedEntityRecord(he,fe,Ee(t.id)).blocks.map((e=>(0,g.getWidgetIdFromBlock)(e))).includes(r))))),Ve=(0,d.createRegistrySelector)((e=>(t,r)=>{const{getBlock:n,getBlockName:i,getBlockParents:a}=e(ge.store);return n(a(r).find((e=>"core/widget-area"===i(e))))})),Fe=(0,d.createRegistrySelector)((e=>(t,r)=>{let n=e(be).getWidgetAreas();return n?(r&&(n=n.filter((e=>{let{id:t}=e;return r.includes(t)}))),n.filter((t=>{let{id:r}=t;return e(m.store).hasEditsForEntityRecord(he,fe,Ee(r))})).map((t=>{let{id:r}=t;return e(m.store).getEditedEntityRecord(he,we,r)}))):[]})),Ge=(0,d.createRegistrySelector)((e=>function(t){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const n=[],i=e(be).getWidgetAreas();for(const t of i){const i=e(m.store).getEditedEntityRecord(he,fe,Ee(t.id));for(const e of i.blocks){var a;"core/legacy-widget"!==e.name||r&&(null===(a=e.attributes)||void 0===a?void 0:a.referenceWidgetName)!==r||n.push(e)}}return n})),ze=(0,d.createRegistrySelector)((e=>()=>{var t;const r=null===(t=e(be).getWidgetAreas())||void 0===t?void 0:t.map((e=>{let{id:t}=e;return t}));if(!r)return!1;for(const t of r)if(e(m.store).isSavingEntityRecord(he,we,t))return!0;const n=[...Object.keys(e(be).getWidgets()),void 0];for(const t of n)if(e(m.store).isSavingEntityRecord("root","widget",t))return!0;return!1})),He=(e,t)=>{const{widgetAreasOpenState:r}=e;return!!r[t]};function Ue(e){return!!e.blockInserterPanel}function $e(e){const{rootClientId:t,insertionIndex:r}=e.blockInserterPanel;return{rootClientId:t,insertionIndex:r}}const je=(0,d.createRegistrySelector)((e=>(t,r)=>{const n=e(ge.store).getBlocks(),[i]=n;return e(ge.store).canInsertBlockType(r,i.clientId)}));function Ke(e){return e.listViewPanel}const Ye={reducer:w,selectors:o,resolvers:a,actions:i},qe=(0,d.createReduxStore)(be,Ye);(0,d.register)(qe),h().use((function(e,t){var r;return 0===(null===(r=e.path)||void 0===r?void 0:r.indexOf("/wp/v2/types/widget-area"))?Promise.resolve({}):t(e)}));var Qe=window.wp.hooks;const Je=(0,ce.createHigherOrderComponent)((e=>t=>{const{clientId:r,name:n}=t,{widgetAreas:i,currentWidgetAreaId:a,canInsertBlockInWidgetArea:o}=(0,d.useSelect)((e=>{var t;if("core/widget-area"===n)return{};const i=e(qe),a=i.getParentWidgetAreaBlock(r);return{widgetAreas:i.getWidgetAreas(),currentWidgetAreaId:null==a||null===(t=a.attributes)||void 0===t?void 0:t.id,canInsertBlockInWidgetArea:i.canInsertBlockInWidgetArea(n)}}),[r,n]),{moveBlockToWidgetArea:s}=(0,d.useDispatch)(qe),c=(null==i?void 0:i.length)>1,u="core/widget-area"!==n&&c&&o;return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(e,t),u&&(0,l.createElement)(ge.BlockControls,null,(0,l.createElement)(g.MoveToWidgetArea,{widgetAreas:i,currentWidgetAreaId:a,onSelect:e=>{s(t.clientId,e)}})))}),"withMoveToWidgetAreaToolbarItem");(0,Qe.addFilter)("editor.BlockEdit","core/edit-widgets/block-edit",Je);var Xe=window.wp.mediaUtils;(0,Qe.addFilter)("editor.MediaUpload","core/edit-widgets/replace-media-upload",(()=>Xe.MediaUpload));var Ze=e=>{const[t,r]=(0,l.useState)(!1);return(0,l.useEffect)((()=>{const{ownerDocument:t}=e.current;function n(e){a(e)}function i(){r(!1)}function a(t){e.current.contains(t.target)?r(!0):r(!1)}return t.addEventListener("dragstart",n),t.addEventListener("dragend",i),t.addEventListener("dragenter",a),()=>{t.removeEventListener("dragstart",n),t.removeEventListener("dragend",i),t.removeEventListener("dragenter",a)}}),[]),t};function et(e){let{id:t}=e;const[r,n,i]=(0,m.useEntityBlockEditor)("root","postType"),a=(0,l.useRef)(),o=Ze(a),s=(0,ge.useInnerBlocksProps)({ref:a},{value:r,onInput:n,onChange:i,templateLock:!1,renderAppender:ge.InnerBlocks.ButtonBlockAppender});return(0,l.createElement)("div",{"data-widget-area-id":t,className:y()("wp-block-widget-area__inner-blocks block-editor-inner-blocks editor-styles-wrapper",{"wp-block-widget-area__highlight-drop-zone":o})},(0,l.createElement)("div",s))}const tt={name:"core/widget-area",category:"widgets",attributes:{id:{type:"string"},name:{type:"string"}},supports:{html:!1,inserter:!1,customClassName:!1,reusable:!1,__experimentalToolbar:!1,__experimentalParentSelector:!1},editorStyle:"wp-block-widget-area-editor",style:"wp-block-widget-area"},{name:rt}=tt,nt={title:(0,f.__)("Widget Area"),description:(0,f.__)("A widget area container."),__experimentalLabel:e=>{let{name:t}=e;return t},edit:function(e){let{clientId:t,className:r,attributes:{id:n,name:i}}=e;const a=(0,d.useSelect)((e=>e(qe).getIsWidgetAreaOpen(t)),[t]),{setIsWidgetAreaOpen:o}=(0,d.useDispatch)(qe),s=(0,l.useRef)(),c=(0,l.useCallback)((e=>o(t,e)),[t]),u=(e=>{const[t,r]=(0,l.useState)(!1);return(0,l.useEffect)((()=>{const{ownerDocument:t}=e.current;function n(){r(!0)}function i(){r(!1)}return t.addEventListener("dragstart",n),t.addEventListener("dragend",i),()=>{t.removeEventListener("dragstart",n),t.removeEventListener("dragend",i)}}),[]),t})(s),g=Ze(s),[p,_]=(0,l.useState)(!1);return(0,l.useEffect)((()=>{u?g&&!a?(c(!0),_(!0)):!g&&a&&p&&c(!1):_(!1)}),[a,u,g,p]),(0,l.createElement)(k.Panel,{className:r,ref:s},(0,l.createElement)(k.PanelBody,{title:i,opened:a,onToggle:()=>{o(t,!a)},scrollAfterOpen:!u},(e=>{let{opened:t}=e;return(0,l.createElement)(k.__unstableDisclosureContent,{className:"wp-block-widget-area__panel-body-content",visible:t},(0,l.createElement)(m.EntityProvider,{kind:"root",type:"postType",id:`widget-area-${n}`},(0,l.createElement)(et,{id:n})))})))}};function it(e){let{text:t,children:r}=e;const n=(0,ce.useCopyToClipboard)(t);return(0,l.createElement)(k.Button,{variant:"secondary",ref:n},r)}class at extends l.Component{constructor(){super(...arguments),this.reboot=this.reboot.bind(this),this.state={error:null}}componentDidCatch(e){this.setState({error:e})}reboot(){this.props.onError()}render(){const{error:e}=this.state;return e?(0,l.createElement)(ge.Warning,{className:"edit-widgets-error-boundary",actions:[(0,l.createElement)(k.Button,{key:"recovery",onClick:this.reboot,variant:"secondary"},(0,f.__)("Attempt Recovery")),(0,l.createElement)(it,{key:"copy-error",text:e.stack},(0,f.__)("Copy Error"))]},(0,f.__)("The editor has encountered an unexpected error.")):this.props.children}}var ot=window.wp.reusableBlocks,st=window.wp.keyboardShortcuts;function lt(){const{redo:e,undo:t}=(0,d.useDispatch)(m.store),{saveEditedWidgetAreas:r}=(0,d.useDispatch)(qe);return(0,st.useShortcut)("core/edit-widgets/undo",(e=>{t(),e.preventDefault()})),(0,st.useShortcut)("core/edit-widgets/redo",(t=>{e(),t.preventDefault()})),(0,st.useShortcut)("core/edit-widgets/save",(e=>{e.preventDefault(),r()})),null}lt.Register=function(){const{registerShortcut:e}=(0,d.useDispatch)(st.store);return(0,l.useEffect)((()=>{e({name:"core/edit-widgets/undo",category:"global",description:(0,f.__)("Undo your last changes."),keyCombination:{modifier:"primary",character:"z"}}),e({name:"core/edit-widgets/redo",category:"global",description:(0,f.__)("Redo your last undo."),keyCombination:{modifier:"primaryShift",character:"z"}}),e({name:"core/edit-widgets/save",category:"global",description:(0,f.__)("Save your changes."),keyCombination:{modifier:"primary",character:"s"}}),e({name:"core/edit-widgets/keyboard-shortcuts",category:"main",description:(0,f.__)("Display these keyboard shortcuts."),keyCombination:{modifier:"access",character:"h"}}),e({name:"core/edit-widgets/next-region",category:"global",description:(0,f.__)("Navigate to the next part of the editor."),keyCombination:{modifier:"ctrl",character:"`"},aliases:[{modifier:"access",character:"n"}]}),e({name:"core/edit-widgets/previous-region",category:"global",description:(0,f.__)("Navigate to the previous part of the editor."),keyCombination:{modifier:"ctrlShift",character:"`"},aliases:[{modifier:"access",character:"p"}]})}),[e]),null};var ct=lt,dt=()=>(0,d.useSelect)((e=>{var t;const{getBlockSelectionEnd:r,getBlockName:n}=e(ge.store),i=r();if("core/widget-area"===n(i))return i;const{getParentWidgetAreaBlock:a}=e(qe),o=a(i),s=null==o?void 0:o.clientId;if(s)return s;const{getEntityRecord:l}=e(m.store),c=l(he,fe,"widget-areas");return null==c||null===(t=c.blocks[0])||void 0===t?void 0:t.clientId}),[]);function ut(e){let{blockEditorSettings:t,children:r,...n}=e;const{hasUploadPermissions:i,reusableBlocks:a,isFixedToolbarActive:o,keepCaretInsideBlock:s}=(0,d.useSelect)((e=>({hasUploadPermissions:(0,x.defaultTo)(e(m.store).canUser("create","media"),!0),widgetAreas:e(qe).getWidgetAreas(),widgets:e(qe).getWidgets(),reusableBlocks:[],isFixedToolbarActive:!!e(p.store).get("core/edit-widgets","fixedToolbar"),keepCaretInsideBlock:!!e(p.store).get("core/edit-widgets","keepCaretInsideBlock")})),[]),{setIsInserterOpened:c}=(0,d.useDispatch)(qe),u=(0,l.useMemo)((()=>{let e;return i&&(e=e=>{let{onError:r,...n}=e;(0,Xe.uploadMedia)({wpAllowedMimeTypes:t.allowedMimeTypes,onError:e=>{let{message:t}=e;return r(t)},...n})}),{...t,__experimentalReusableBlocks:a,hasFixedToolbar:o,keepCaretInsideBlock:s,mediaUpload:e,templateLock:"all",__experimentalSetIsInserterOpened:c}}),[t,o,s,i,a,c]),g=dt(),[_,h,w]=(0,m.useEntityBlockEditor)(he,fe,{id:"widget-areas"});return(0,l.createElement)(st.ShortcutProvider,null,(0,l.createElement)(ge.BlockEditorKeyboardShortcuts.Register,null),(0,l.createElement)(ct.Register,null),(0,l.createElement)(k.SlotFillProvider,null,(0,l.createElement)(ge.BlockEditorProvider,b({value:_,onInput:h,onChange:w,settings:u,useSubRegistry:!1},n),(0,l.createElement)(ge.CopyHandler,null,r),(0,l.createElement)(ot.ReusableBlocksMenuItems,{rootClientId:g}))))}var mt=(0,l.createElement)(S.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(S.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"})),gt=(0,l.createElement)(S.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(S.Path,{d:"M19 8h-1V6h-5v2h-2V6H6v2H5c-1.1 0-2 .9-2 2v8c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-8c0-1.1-.9-2-2-2zm.5 10c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5v-8c0-.3.2-.5.5-.5h14c.3 0 .5.2.5.5v8z"})),pt=window.wp.url,_t=window.wp.dom;function ht(e){let{selectedWidgetAreaId:t}=e;const r=(0,d.useSelect)((e=>e(qe).getWidgetAreas()),[]),n=(0,l.useMemo)((()=>t&&(null==r?void 0:r.find((e=>e.id===t)))),[t,r]);let i;return i=n?"wp_inactive_widgets"===t?(0,f.__)("Blocks in this Widget Area will not be displayed in your site."):n.description:(0,f.__)("Widget Areas are global parts in your site’s layout that can accept blocks. These vary by theme, but are typically parts like your Sidebar or Footer."),(0,l.createElement)("div",{className:"edit-widgets-widget-areas"},(0,l.createElement)("div",{className:"edit-widgets-widget-areas__top-container"},(0,l.createElement)(ge.BlockIcon,{icon:gt}),(0,l.createElement)("div",null,(0,l.createElement)("p",{dangerouslySetInnerHTML:{__html:(0,_t.safeHTML)(i)}}),0===(null==r?void 0:r.length)&&(0,l.createElement)("p",null,(0,f.__)("Your theme does not contain any Widget Areas.")),!n&&(0,l.createElement)(k.Button,{href:(0,pt.addQueryArgs)("customize.php",{"autofocus[panel]":"widgets",return:window.location.pathname}),variant:"tertiary"},(0,f.__)("Manage with live preview")))))}const wt=l.Platform.select({web:!0,native:!1}),ft="edit-widgets/block-inspector",Et="edit-widgets/block-areas";function bt(e){let{identifier:t,label:r,isActive:n}=e;const{enableComplementaryArea:i}=(0,d.useDispatch)(q);return(0,l.createElement)(k.Button,{onClick:()=>i(qe.name,t),className:y()("edit-widgets-sidebar__panel-tab",{"is-active":n}),"aria-label":n?// translators: %s: sidebar label e.g: "Widget Areas".
  (0,f.sprintf)((0,f.__)("%s (selected)"),r):r,"data-label":r},r)}function vt(){const{enableComplementaryArea:e}=(0,d.useDispatch)(q),{currentArea:t,hasSelectedNonAreaBlock:r,isGeneralSidebarOpen:n,selectedWidgetAreaBlock:i}=(0,d.useSelect)((e=>{const{getSelectedBlock:t,getBlock:r,getBlockParentsByBlockName:n}=e(ge.store),{getActiveComplementaryArea:i}=e(q),a=t(),o=i(qe.name);let s,l=o;return l||(l=a?ft:Et),a&&(s="core/widget-area"===a.name?a:r(n(a.clientId,"core/widget-area")[0])),{currentArea:l,hasSelectedNonAreaBlock:!(!a||"core/widget-area"===a.name),isGeneralSidebarOpen:!!o,selectedWidgetAreaBlock:s}}),[]);return(0,l.useEffect)((()=>{r&&t===Et&&n&&e("core/edit-widgets",ft),!r&&t===ft&&n&&e("core/edit-widgets",Et)}),[r,e]),(0,l.createElement)(le,{className:"edit-widgets-sidebar",header:(0,l.createElement)("ul",null,(0,l.createElement)("li",null,(0,l.createElement)(bt,{identifier:Et,label:i?i.attributes.name:(0,f.__)("Widget Areas"),isActive:t===Et})),(0,l.createElement)("li",null,(0,l.createElement)(bt,{identifier:ft,label:(0,f.__)("Block"),isActive:t===ft}))),headerClassName:"edit-widgets-sidebar__panel-tabs"
  /* translators: button label text should, if possible, be under 16 characters. */,title:(0,f.__)("Settings"),closeLabel:(0,f.__)("Close settings"),scope:"core/edit-widgets",identifier:t,icon:mt,isActiveByDefault:wt},t===Et&&(0,l.createElement)(ht,{selectedWidgetAreaId:null==i?void 0:i.attributes.id}),t===ft&&(r?(0,l.createElement)(ge.BlockInspector,null):(0,l.createElement)("span",{className:"block-editor-block-inspector__no-blocks"},(0,f.__)("No block selected."))))}var yt=(0,l.createElement)(S.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(S.Path,{d:"M18 11.2h-5.2V6h-1.6v5.2H6v1.6h5.2V18h1.6v-5.2H18z"})),kt=(0,l.createElement)(S.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,l.createElement)(S.Path,{d:"M13.8 5.2H3v1.5h10.8V5.2zm-3.6 12v1.5H21v-1.5H10.2zm7.2-6H6.6v1.5h10.8v-1.5z"})),St=function(){const{hasEditedWidgetAreaIds:e,isSaving:t}=(0,d.useSelect)((e=>{var t;const{getEditedWidgetAreas:r,isSavingWidgetAreas:n}=e(qe);return{hasEditedWidgetAreaIds:(null===(t=r())||void 0===t?void 0:t.length)>0,isSaving:n()}}),[]),{saveEditedWidgetAreas:r}=(0,d.useDispatch)(qe);return(0,l.createElement)(k.Button,{variant:"primary",isBusy:t,"aria-disabled":t,onClick:t?void 0:r,disabled:!e},t?(0,f.__)("Saving…"):(0,f.__)("Update"))},It=(0,l.createElement)(S.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(S.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"})),At=(0,l.createElement)(S.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(S.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"})),Bt=window.wp.keycodes;function Nt(){const e=(0,d.useSelect)((e=>e(m.store).hasUndo()),[]),{undo:t}=(0,d.useDispatch)(m.store);return(0,l.createElement)(k.ToolbarButton,{icon:(0,f.isRTL)()?At:It,label:(0,f.__)("Undo"),shortcut:Bt.displayShortcut.primary("z"),"aria-disabled":!e,onClick:e?t:void 0})}function Ct(){const e=(0,d.useSelect)((e=>e(m.store).hasRedo()),[]),{redo:t}=(0,d.useDispatch)(m.store);return(0,l.createElement)(k.ToolbarButton,{icon:(0,f.isRTL)()?It:At,label:(0,f.__)("Redo"),shortcut:Bt.displayShortcut.primaryShift("z"),"aria-disabled":!e,onClick:e?t:void 0})}var xt=(0,l.createElement)(S.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(S.Path,{d:"M18.2 17c0 .7-.6 1.2-1.2 1.2H7c-.7 0-1.2-.6-1.2-1.2V7c0-.7.6-1.2 1.2-1.2h3.2V4.2H7C5.5 4.2 4.2 5.5 4.2 7v10c0 1.5 1.2 2.8 2.8 2.8h10c1.5 0 2.8-1.2 2.8-2.8v-3.6h-1.5V17zM14.9 3v1.5h3.7l-6.4 6.4 1.1 1.1 6.4-6.4v3.7h1.5V3h-6.3z"}));const Wt=[{keyCombination:{modifier:"primary",character:"b"},description:(0,f.__)("Make the selected text bold.")},{keyCombination:{modifier:"primary",character:"i"},description:(0,f.__)("Make the selected text italic.")},{keyCombination:{modifier:"primary",character:"k"},description:(0,f.__)("Convert the selected text into a link.")},{keyCombination:{modifier:"primaryShift",character:"k"},description:(0,f.__)("Remove a link.")},{keyCombination:{modifier:"primary",character:"u"},description:(0,f.__)("Underline the selected text.")}];function Tt(e){let{keyCombination:t,forceAriaLabel:r}=e;const n=t.modifier?Bt.displayShortcutList[t.modifier](t.character):t.character,i=t.modifier?Bt.shortcutAriaLabel[t.modifier](t.character):t.character;return(0,l.createElement)("kbd",{className:"edit-widgets-keyboard-shortcut-help-modal__shortcut-key-combination","aria-label":r||i},(0,x.castArray)(n).map(((e,t)=>"+"===e?(0,l.createElement)(l.Fragment,{key:t},e):(0,l.createElement)("kbd",{key:t,className:"edit-widgets-keyboard-shortcut-help-modal__shortcut-key"},e))))}var Pt=function(e){let{description:t,keyCombination:r,aliases:n=[],ariaLabel:i}=e;return(0,l.createElement)(l.Fragment,null,(0,l.createElement)("div",{className:"edit-widgets-keyboard-shortcut-help-modal__shortcut-description"},t),(0,l.createElement)("div",{className:"edit-widgets-keyboard-shortcut-help-modal__shortcut-term"},(0,l.createElement)(Tt,{keyCombination:r,forceAriaLabel:i}),n.map(((e,t)=>(0,l.createElement)(Tt,{keyCombination:e,forceAriaLabel:i,key:t})))))},Lt=function(e){let{name:t}=e;const{keyCombination:r,description:n,aliases:i}=(0,d.useSelect)((e=>{const{getShortcutKeyCombination:r,getShortcutDescription:n,getShortcutAliases:i}=e(st.store);return{keyCombination:r(t),aliases:i(t),description:n(t)}}),[t]);return r?(0,l.createElement)(Pt,{keyCombination:r,description:n,aliases:i}):null};const Rt=e=>{let{shortcuts:t}=e;return(0,l.createElement)("ul",{className:"edit-widgets-keyboard-shortcut-help-modal__shortcut-list",role:"list"},t.map(((e,t)=>(0,l.createElement)("li",{className:"edit-widgets-keyboard-shortcut-help-modal__shortcut",key:t},(0,x.isString)(e)?(0,l.createElement)(Lt,{name:e}):(0,l.createElement)(Pt,e)))))},Ot=e=>{let{title:t,shortcuts:r,className:n}=e;return(0,l.createElement)("section",{className:y()("edit-widgets-keyboard-shortcut-help-modal__section",n)},!!t&&(0,l.createElement)("h2",{className:"edit-widgets-keyboard-shortcut-help-modal__section-title"},t),(0,l.createElement)(Rt,{shortcuts:r}))},Mt=e=>{let{title:t,categoryName:r,additionalShortcuts:n=[]}=e;const i=(0,d.useSelect)((e=>e(st.store).getCategoryShortcuts(r)),[r]);return(0,l.createElement)(Ot,{title:t,shortcuts:i.concat(n)})};function Dt(e){let{isModalActive:t,toggleModal:r}=e;return(0,st.useShortcut)("core/edit-widgets/keyboard-shortcuts",r,{bindGlobal:!0}),t?(0,l.createElement)(k.Modal,{className:"edit-widgets-keyboard-shortcut-help-modal",title:(0,f.__)("Keyboard shortcuts"),closeLabel:(0,f.__)("Close"),onRequestClose:r},(0,l.createElement)(Ot,{className:"edit-widgets-keyboard-shortcut-help-modal__main-shortcuts",shortcuts:["core/edit-widgets/keyboard-shortcuts"]}),(0,l.createElement)(Mt,{title:(0,f.__)("Global shortcuts"),categoryName:"global"}),(0,l.createElement)(Mt,{title:(0,f.__)("Selection shortcuts"),categoryName:"selection"}),(0,l.createElement)(Mt,{title:(0,f.__)("Block shortcuts"),categoryName:"block",additionalShortcuts:[{keyCombination:{character:"/"},description:(0,f.__)("Change the block type after adding a new paragraph."),
  /* translators: The forward-slash character. e.g. '/'. */
  ariaLabel:(0,f.__)("Forward-slash")}]}),(0,l.createElement)(Ot,{title:(0,f.__)("Text formatting"),shortcuts:Wt})):null}const{Fill:Vt,Slot:Ft}=(0,k.createSlotFill)("EditWidgetsToolsMoreMenuGroup");Vt.Slot=e=>{let{fillProps:t}=e;return(0,l.createElement)(Ft,{fillProps:t},(e=>!(0,x.isEmpty)(e)&&e))};var Gt=Vt;function zt(){const[e,t]=(0,l.useState)(!1),r=()=>t(!e);(0,st.useShortcut)("core/edit-widgets/keyboard-shortcuts",r);const n=(0,ce.useViewportMatch)("medium");return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(me,null,(e=>(0,l.createElement)(l.Fragment,null,n&&(0,l.createElement)(k.MenuGroup,{label:(0,f._x)("View","noun")},(0,l.createElement)(p.PreferenceToggleMenuItem,{scope:"core/edit-widgets",name:"fixedToolbar",label:(0,f.__)("Top toolbar"),info:(0,f.__)("Access all block and document tools in a single place"),messageActivated:(0,f.__)("Top toolbar activated"),messageDeactivated:(0,f.__)("Top toolbar deactivated")})),(0,l.createElement)(k.MenuGroup,{label:(0,f.__)("Tools")},(0,l.createElement)(k.MenuItem,{onClick:()=>{t(!0)},shortcut:Bt.displayShortcut.access("h")},(0,f.__)("Keyboard shortcuts")),(0,l.createElement)(p.PreferenceToggleMenuItem,{scope:"core/edit-widgets",name:"welcomeGuide",label:(0,f.__)("Welcome Guide")}),(0,l.createElement)(k.MenuItem,{role:"menuitem",icon:xt,href:(0,f.__)("https://wordpress.org/support/article/block-based-widgets-editor/"),target:"_blank",rel:"noopener noreferrer"},(0,f.__)("Help"),(0,l.createElement)(k.VisuallyHidden,{as:"span"},
  /* translators: accessibility text */
  (0,f.__)("(opens in a new tab)"))),(0,l.createElement)(Gt.Slot,{fillProps:{onClose:e}})),(0,l.createElement)(k.MenuGroup,{label:(0,f.__)("Preferences")},(0,l.createElement)(p.PreferenceToggleMenuItem,{scope:"core/edit-widgets",name:"keepCaretInsideBlock",label:(0,f.__)("Contain text cursor inside block"),info:(0,f.__)("Aids screen readers by stopping text caret from leaving blocks."),messageActivated:(0,f.__)("Contain text cursor inside block activated"),messageDeactivated:(0,f.__)("Contain text cursor inside block deactivated")}),(0,l.createElement)(p.PreferenceToggleMenuItem,{scope:"core/edit-widgets",name:"themeStyles",info:(0,f.__)("Make the editor look like your theme."),label:(0,f.__)("Use theme styles")}),n&&(0,l.createElement)(p.PreferenceToggleMenuItem,{scope:"core/edit-widgets",name:"showBlockBreadcrumbs",label:(0,f.__)("Display block breadcrumbs"),info:(0,f.__)("Shows block breadcrumbs at the bottom of the editor."),messageActivated:(0,f.__)("Display block breadcrumbs activated"),messageDeactivated:(0,f.__)("Display block breadcrumbs deactivated")}))))),(0,l.createElement)(Dt,{isModalActive:e,toggleModal:r}))}var Ht=function(){const e=(0,ce.useViewportMatch)("medium"),t=(0,l.useRef)(),r=dt(),n=(0,d.useSelect)((e=>e(qe).getIsWidgetAreaOpen(r)),[r]),{isInserterOpen:i,isListViewOpen:a}=(0,d.useSelect)((e=>{const{isInserterOpened:t,isListViewOpened:r}=e(qe);return{isInserterOpen:t(),isListViewOpen:r()}}),[]),{setIsWidgetAreaOpen:o,setIsInserterOpened:s,setIsListViewOpened:c}=(0,d.useDispatch)(qe),{selectBlock:u}=(0,d.useDispatch)(ge.store),m=(0,l.useCallback)((()=>c(!a)),[c,a]);return(0,l.createElement)(l.Fragment,null,(0,l.createElement)("div",{className:"edit-widgets-header"},(0,l.createElement)("div",{className:"edit-widgets-header__navigable-toolbar-wrapper"},e&&(0,l.createElement)("h1",{className:"edit-widgets-header__title"},(0,f.__)("Widgets")),!e&&(0,l.createElement)(k.VisuallyHidden,{as:"h1",className:"edit-widgets-header__title"},(0,f.__)("Widgets")),(0,l.createElement)(ge.NavigableToolbar,{className:"edit-widgets-header-toolbar","aria-label":(0,f.__)("Document tools")},(0,l.createElement)(k.ToolbarItem,{ref:t,as:k.Button,className:"edit-widgets-header-toolbar__inserter-toggle",variant:"primary",isPressed:i,onMouseDown:e=>{e.preventDefault()},onClick:()=>{i?s(!1):(n||(u(r),o(r,!0)),window.requestAnimationFrame((()=>s(!0))))},icon:yt
  /* translators: button label text should, if possible, be under 16
      characters. */,label:(0,f._x)("Toggle block inserter","Generic label for block inserter button")}),e&&(0,l.createElement)(l.Fragment,null,(0,l.createElement)(Nt,null),(0,l.createElement)(Ct,null),(0,l.createElement)(k.ToolbarItem,{as:k.Button,className:"edit-widgets-header-toolbar__list-view-toggle",icon:kt,isPressed:a
  /* translators: button label text should, if possible, be under 16 characters. */,label:(0,f.__)("List View"),onClick:m})))),(0,l.createElement)("div",{className:"edit-widgets-header__actions"},(0,l.createElement)(St,null),(0,l.createElement)(ae.Slot,{scope:"core/edit-widgets"}),(0,l.createElement)(zt,null))))},Ut=function(){const{removeNotice:e}=(0,d.useDispatch)(E.store),{notices:t}=(0,d.useSelect)((e=>({notices:e(E.store).getNotices()})),[]),r=(0,x.filter)(t,{isDismissible:!0,type:"default"}),n=(0,x.filter)(t,{isDismissible:!1,type:"default"}),i=(0,x.filter)(t,{type:"snackbar"});return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(k.NoticeList,{notices:n,className:"edit-widgets-notices__pinned"}),(0,l.createElement)(k.NoticeList,{notices:r,className:"edit-widgets-notices__dismissible",onRemove:e}),(0,l.createElement)(k.SnackbarList,{notices:i,className:"edit-widgets-notices__snackbar",onRemove:e}))};function $t(e){let{blockEditorSettings:t}=e;const r=(0,d.useSelect)((e=>!!e(p.store).get("core/edit-widgets","themeStyles")),[]),n=(0,l.useMemo)((()=>r?t.styles:[]),[t,r]);return(0,l.createElement)("div",{className:"edit-widgets-block-editor"},(0,l.createElement)(Ut,null),(0,l.createElement)(ge.BlockTools,null,(0,l.createElement)(ct,null),(0,l.createElement)(ge.__unstableEditorStyles,{styles:n}),(0,l.createElement)(ge.BlockSelectionClearer,null,(0,l.createElement)(ge.WritingFlow,null,(0,l.createElement)(ge.ObserveTyping,null,(0,l.createElement)(ge.BlockList,{className:"edit-widgets-main-block-list"}))))))}var jt=(0,l.createElement)(S.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(S.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"}));function Kt(){const e=(0,ce.useViewportMatch)("medium","<"),{rootClientId:t,insertionIndex:r}=(()=>{const e=(0,d.useSelect)((e=>{var t;const{getEntityRecord:r}=e(m.store),n=r(he,fe,"widget-areas");return null==n||null===(t=n.blocks[0])||void 0===t?void 0:t.clientId}),[]);return(0,d.useSelect)((t=>{const{getBlockRootClientId:r,getBlockSelectionEnd:n,getBlockOrder:i,getBlockIndex:a}=t(ge.store),o=t(qe).__experimentalGetInsertionPoint();if(o.rootClientId)return o;const s=n()||e,l=r(s);return s&&""===l?{rootClientId:s,insertionIndex:i(s).length}:{rootClientId:l,insertionIndex:a(s)+1}}),[e])})(),{setIsInserterOpened:n}=(0,d.useDispatch)(qe),i=(0,l.useCallback)((()=>n(!1)),[n]),a=e?"div":k.VisuallyHidden,[o,s]=(0,ce.__experimentalUseDialog)({onClose:i,focusOnMount:null}),c=(0,l.useRef)();return(0,l.useEffect)((()=>{c.current.focusSearch()}),[]),(0,l.createElement)("div",b({ref:o},s,{className:"edit-widgets-layout__inserter-panel"}),(0,l.createElement)(a,{className:"edit-widgets-layout__inserter-panel-header"},(0,l.createElement)(k.Button,{icon:jt,onClick:i,label:(0,f.__)("Close block inserter")})),(0,l.createElement)("div",{className:"edit-widgets-layout__inserter-panel-content"},(0,l.createElement)(ge.__experimentalLibrary,{showInserterHelpPanel:!0,shouldFocusBlock:e,rootClientId:t,__experimentalInsertionIndex:r,ref:c})))}function Yt(){const{setIsListViewOpened:e}=(0,d.useDispatch)(qe),t=(0,ce.useFocusOnMount)("firstElement"),r=(0,ce.useFocusReturn)(),n=(0,ce.useFocusReturn)(),i=`edit-widgets-editor__list-view-panel-label-${(0,ce.useInstanceId)(Yt)}`;return(0,l.createElement)("div",{"aria-labelledby":i,className:"edit-widgets-editor__list-view-panel",onKeyDown:function(t){t.keyCode!==Bt.ESCAPE||t.defaultPrevented||(t.preventDefault(),e(!1))}},(0,l.createElement)("div",{className:"edit-widgets-editor__list-view-panel-header",ref:r},(0,l.createElement)("strong",{id:i},(0,f.__)("List View")),(0,l.createElement)(k.Button,{icon:C,label:(0,f.__)("Close List View Sidebar"),onClick:()=>e(!1)})),(0,l.createElement)("div",{className:"edit-widgets-editor__list-view-panel-content",ref:(0,ce.useMergeRefs)([n,t])},(0,l.createElement)(ge.__experimentalListView,{showNestedBlocks:!0,__experimentalHideContainerBlockActions:!0,__experimentalFeatures:!0,__experimentalPersistentListViewFeatures:!0})))}function qt(){const{isInserterOpen:e,isListViewOpen:t}=(0,d.useSelect)((e=>{const{isInserterOpened:t,isListViewOpened:r}=e(qe);return{isInserterOpen:t(),isListViewOpen:r()}}),[]);return e?(0,l.createElement)(Kt,null):t?(0,l.createElement)(Yt,null):null}const Qt={
  /* translators: accessibility text for the widgets screen top bar landmark region. */
  header:(0,f.__)("Widgets top bar"),
  /* translators: accessibility text for the widgets screen content landmark region. */
  body:(0,f.__)("Widgets and blocks"),
  /* translators: accessibility text for the widgets screen settings landmark region. */
  sidebar:(0,f.__)("Widgets settings"),
  /* translators: accessibility text for the widgets screen footer landmark region. */
  footer:(0,f.__)("Widgets footer")};var Jt=function(e){let{blockEditorSettings:t}=e;const r=(0,ce.useViewportMatch)("medium","<"),n=(0,ce.useViewportMatch)("huge",">="),{setIsInserterOpened:i,setIsListViewOpened:a,closeGeneralSidebar:o}=(0,d.useDispatch)(qe),{hasBlockBreadCrumbsEnabled:s,hasSidebarEnabled:c,isInserterOpened:u,isListViewOpened:m,previousShortcut:g,nextShortcut:_}=(0,d.useSelect)((e=>({hasSidebarEnabled:!!e(q).getActiveComplementaryArea(qe.name),isInserterOpened:!!e(qe).isInserterOpened(),isListViewOpened:!!e(qe).isListViewOpened(),hasBlockBreadCrumbsEnabled:!!e(p.store).get("core/edit-widgets","showBlockBreadcrumbs"),previousShortcut:e(st.store).getAllShortcutKeyCombinations("core/edit-widgets/previous-region"),nextShortcut:e(st.store).getAllShortcutKeyCombinations("core/edit-widgets/next-region")})),[]);(0,l.useEffect)((()=>{c&&!n&&(i(!1),a(!1))}),[c,n]),(0,l.useEffect)((()=>{!u&&!m||n||o()}),[u,m,n]);const h=m||u;return(0,l.createElement)(de,{labels:Qt,header:(0,l.createElement)(Ht,null),secondarySidebar:h&&(0,l.createElement)(qt,null),sidebar:c&&(0,l.createElement)(le.Slot,{scope:"core/edit-widgets"}),content:(0,l.createElement)(l.Fragment,null,(0,l.createElement)($t,{blockEditorSettings:t}),(0,l.createElement)(ge.BlockStyles.Slot,{scope:"core/block-inspector"})),footer:s&&!r&&(0,l.createElement)("div",{className:"edit-widgets-layout__footer"},(0,l.createElement)(ge.BlockBreadcrumb,{rootLabelText:(0,f.__)("Widgets")})),shortcuts:{previous:g,next:_}})};function Xt(){const e=(0,d.useSelect)((e=>{const{getEditedWidgetAreas:t}=e(qe),r=t();return(null==r?void 0:r.length)>0}),[]);return(0,l.useEffect)((()=>{const t=t=>{if(e)return t.returnValue=(0,f.__)("You have unsaved changes. If you proceed, they will be lost."),t.returnValue};return window.addEventListener("beforeunload",t),()=>{window.removeEventListener("beforeunload",t)}}),[e]),null}function Zt(){var e;const t=(0,d.useSelect)((e=>!!e(p.store).get("core/edit-widgets","welcomeGuide")),[]),{toggle:r}=(0,d.useDispatch)(p.store),n=(0,d.useSelect)((e=>e(qe).getWidgetAreas({per_page:-1})),[]);if(!t)return null;const i=null==n?void 0:n.every((e=>"wp_inactive_widgets"===e.id||e.widgets.every((e=>e.startsWith("block-"))))),a=null!==(e=null==n?void 0:n.filter((e=>"wp_inactive_widgets"!==e.id)).length)&&void 0!==e?e:0;return(0,l.createElement)(k.Guide,{className:"edit-widgets-welcome-guide",contentLabel:(0,f.__)("Welcome to block Widgets"),finishButtonText:(0,f.__)("Get started"),onFinish:()=>r("core/edit-widgets","welcomeGuide"),pages:[{image:(0,l.createElement)(er,{nonAnimatedSrc:"https://s.w.org/images/block-editor/welcome-canvas.svg",animatedSrc:"https://s.w.org/images/block-editor/welcome-canvas.gif"}),content:(0,l.createElement)(l.Fragment,null,(0,l.createElement)("h1",{className:"edit-widgets-welcome-guide__heading"},(0,f.__)("Welcome to block Widgets")),i?(0,l.createElement)(l.Fragment,null,(0,l.createElement)("p",{className:"edit-widgets-welcome-guide__text"},(0,f.sprintf)(// Translators: %s: Number of block areas in the current theme.
  (0,f._n)("Your theme provides %s “block” area for you to add and edit content. Try adding a search bar, social icons, or other types of blocks here and see how they’ll look on your site.","Your theme provides %s different “block” areas for you to add and edit content. Try adding a search bar, social icons, or other types of blocks here and see how they’ll look on your site.",a),a))):(0,l.createElement)(l.Fragment,null,(0,l.createElement)("p",{className:"edit-widgets-welcome-guide__text"},(0,f.__)("You can now add any block to your site’s widget areas. Don’t worry, all of your favorite widgets still work flawlessly.")),(0,l.createElement)("p",{className:"edit-widgets-welcome-guide__text"},(0,l.createElement)("strong",null,(0,f.__)("Want to stick with the old widgets?"))," ",(0,l.createElement)(k.ExternalLink,{href:(0,f.__)("https://wordpress.org/plugins/classic-widgets/")},(0,f.__)("Get the Classic Widgets plugin.")))))},{image:(0,l.createElement)(er,{nonAnimatedSrc:"https://s.w.org/images/block-editor/welcome-editor.svg",animatedSrc:"https://s.w.org/images/block-editor/welcome-editor.gif"}),content:(0,l.createElement)(l.Fragment,null,(0,l.createElement)("h1",{className:"edit-widgets-welcome-guide__heading"},(0,f.__)("Make each block your own")),(0,l.createElement)("p",{className:"edit-widgets-welcome-guide__text"},(0,f.__)("Each block comes with its own set of controls for changing things like color, width, and alignment. These will show and hide automatically when you have a block selected.")))},{image:(0,l.createElement)(er,{nonAnimatedSrc:"https://s.w.org/images/block-editor/welcome-library.svg",animatedSrc:"https://s.w.org/images/block-editor/welcome-library.gif"}),content:(0,l.createElement)(l.Fragment,null,(0,l.createElement)("h1",{className:"edit-widgets-welcome-guide__heading"},(0,f.__)("Get to know the block library")),(0,l.createElement)("p",{className:"edit-widgets-welcome-guide__text"},(0,l.createInterpolateElement)((0,f.__)("All of the blocks available to you live in the block library. You’ll find it wherever you see the <InserterIconImage /> icon."),{InserterIconImage:(0,l.createElement)("img",{className:"edit-widgets-welcome-guide__inserter-icon",alt:(0,f.__)("inserter"),src:"data:image/svg+xml,%3Csvg width='18' height='18' viewBox='0 0 18 18' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Crect width='18' height='18' rx='2' fill='%231E1E1E'/%3E%3Cpath d='M9.22727 4V14M4 8.77273H14' stroke='white' stroke-width='1.5'/%3E%3C/svg%3E%0A"})})))},{image:(0,l.createElement)(er,{nonAnimatedSrc:"https://s.w.org/images/block-editor/welcome-documentation.svg",animatedSrc:"https://s.w.org/images/block-editor/welcome-documentation.gif"}),content:(0,l.createElement)(l.Fragment,null,(0,l.createElement)("h1",{className:"edit-widgets-welcome-guide__heading"},(0,f.__)("Learn how to use the block editor")),(0,l.createElement)("p",{className:"edit-widgets-welcome-guide__text"},(0,f.__)("New to the block editor? Want to learn more about using it? "),(0,l.createElement)(k.ExternalLink,{href:(0,f.__)("https://wordpress.org/support/article/wordpress-editor/")},(0,f.__)("Here's a detailed guide."))))}]})}function er(e){let{nonAnimatedSrc:t,animatedSrc:r}=e;return(0,l.createElement)("picture",{className:"edit-widgets-welcome-guide__image"},(0,l.createElement)("source",{srcSet:t,media:"(prefers-reduced-motion: reduce)"}),(0,l.createElement)("img",{src:r,width:"312",height:"240",alt:""}))}var tr=function(e){let{blockEditorSettings:t,onError:r}=e;const{createErrorNotice:n}=(0,d.useDispatch)(E.store);return(0,l.createElement)(at,{onError:r},(0,l.createElement)(ut,{blockEditorSettings:t},(0,l.createElement)(Jt,{blockEditorSettings:t}),(0,l.createElement)(vt,null),(0,l.createElement)(k.Popover.Slot,null),(0,l.createElement)(Q.PluginArea,{onError:function(e){n((0,f.sprintf)(
  /* translators: %s: plugin name */
  (0,f.__)('The "%s" plugin has encountered an error and cannot be rendered.'),e))}}),(0,l.createElement)(Xt,null),(0,l.createElement)(Zt,null)))};const rr=["core/more","core/freeform","core/template-part","core/block"];function nr(e,t){(0,l.unmountComponentAtNode)(e);const r=nr.bind(null,e,t);(0,l.render)((0,l.createElement)(tr,{blockEditorSettings:t,onError:r}),e)}function ir(e,t){const r=document.getElementById(e),n=nr.bind(null,r,t),i=(0,u.__experimentalGetCoreBlocks)().filter((e=>!(rr.includes(e.name)||e.name.startsWith("core/post")||e.name.startsWith("core/query")||e.name.startsWith("core/site")||e.name.startsWith("core/navigation"))));(0,d.dispatch)(p.store).setDefaults("core/edit-widgets",{fixedToolbar:!1,welcomeGuide:!0,showBlockBreadcrumbs:!0,themeStyles:!0}),(0,d.dispatch)(c.store).__experimentalReapplyBlockTypeFilters(),(0,u.registerCoreBlocks)(i),(0,g.registerLegacyWidgetBlock)(),(0,u.__experimentalRegisterExperimentalCoreBlocks)({enableFSEBlocks:!1}),(0,g.registerLegacyWidgetVariations)(t),ar(s),(0,g.registerWidgetGroupBlock)(),t.__experimentalFetchLinkSuggestions=(e,r)=>(0,m.__experimentalFetchLinkSuggestions)(e,r,t),(0,c.setFreeformContentHandlerName)("core/html"),(0,l.render)((0,l.createElement)(tr,{blockEditorSettings:t,onError:n}),r)}const ar=e=>{if(!e)return;const{metadata:t,settings:r,name:n}=e;t&&(0,c.unstable__bootstrapServerSideBlockDefinitions)({[n]:t}),(0,c.registerBlockType)(n,r)}}(),(window.wp=window.wp||{}).editWidgets=n}();
  //# sourceMappingURL=index.min.js.map