File "index.min-20250112074515.js"

Full Path: /home/pumpbmko/public_html/wp-content/plugins/gutenberg/build/edit-post/index.min-20250112074515.js
File size: 39.33 KB
MIME-type: text/plain
Charset: utf-8

(()=>{"use strict";var e={n:t=>{var s=t&&t.__esModule?()=>t.default:()=>t;return e.d(s,{a:s}),s},d:(t,s)=>{for(var o in s)e.o(s,o)&&!e.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:s[o]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};e.r(t),e.d(t,{PluginBlockSettingsMenuItem:()=>Nt,PluginDocumentSettingPanel:()=>Vt,PluginMoreMenuItem:()=>Gt,PluginPostPublishPanel:()=>zt,PluginPostStatusInfo:()=>Ht,PluginPrePublishPanel:()=>Ut,PluginSidebar:()=>Wt,PluginSidebarMoreMenuItem:()=>qt,__experimentalFullscreenModeClose:()=>j,__experimentalMainDashboardButton:()=>$t,__experimentalPluginPostExcerpt:()=>Qt,initializeEditor:()=>Kt,reinitializeEditor:()=>Jt,store:()=>Ke});var s={};e.r(s),e.d(s,{__experimentalSetPreviewDeviceType:()=>ue,__unstableCreateTemplate:()=>we,closeGeneralSidebar:()=>Q,closeModal:()=>X,closePublishSidebar:()=>Y,hideBlockTypes:()=>ae,initializeMetaBoxes:()=>_e,metaBoxUpdatesFailure:()=>pe,metaBoxUpdatesSuccess:()=>de,openGeneralSidebar:()=>q,openModal:()=>$,openPublishSidebar:()=>Z,removeEditorPanel:()=>te,requestMetaBoxUpdates:()=>le,setAvailableMetaBoxesPerLocation:()=>ce,setIsEditingTemplate:()=>he,setIsInserterOpened:()=>ge,setIsListViewOpened:()=>me,showBlockTypes:()=>ne,switchEditorMode:()=>oe,toggleDistractionFree:()=>be,toggleEditorPanelEnabled:()=>J,toggleEditorPanelOpened:()=>ee,toggleFeature:()=>se,togglePinnedPluginItem:()=>ie,togglePublishSidebar:()=>K,updatePreferredStyleVariations:()=>re});var o={};e.r(o),e.d(o,{getEditedPostTemplateId:()=>fe});var i={};e.r(i),e.d(i,{__experimentalGetInsertionPoint:()=>Qe,__experimentalGetPreviewDeviceType:()=>We,areMetaBoxesInitialized:()=>Ze,getActiveGeneralSidebarName:()=>Te,getActiveMetaBoxLocations:()=>Le,getAllMetaBoxes:()=>Ue,getEditedPostTemplate:()=>Ye,getEditorMode:()=>Pe,getHiddenBlockTypes:()=>je,getMetaBoxesPerLocation:()=>Ge,getPreference:()=>ke,getPreferences:()=>Be,hasMetaBoxes:()=>ze,isEditingTemplate:()=>Xe,isEditorPanelEnabled:()=>Re,isEditorPanelOpened:()=>Ce,isEditorPanelRemoved:()=>Ae,isEditorSidebarOpened:()=>Ee,isFeatureActive:()=>De,isInserterOpened:()=>qe,isListViewOpened:()=>$e,isMetaBoxLocationActive:()=>Ve,isMetaBoxLocationVisible:()=>Ne,isModalActive:()=>Oe,isPluginItemPinned:()=>Fe,isPluginSidebarOpened:()=>Me,isPublishSidebarOpened:()=>Ie,isSavingMetaBoxes:()=>He});const r=window.wp.blocks,n=window.wp.blockLibrary,a=window.wp.deprecated;var c=e.n(a);const l=window.wp.element,d=window.wp.data,p=window.wp.preferences,u=window.wp.widgets,g=window.wp.editor;function m(e){var t,s,o="";if("string"==typeof e||"number"==typeof e)o+=e;else if("object"==typeof e)if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(s=m(e[t]))&&(o&&(o+=" "),o+=s)}else for(s in e)e[s]&&(o&&(o+=" "),o+=s);return o}const h=function(){for(var e,t,s=0,o="",i=arguments.length;s<i;s++)(e=arguments[s])&&(t=m(e))&&(o&&(o+=" "),o+=t);return o},w=window.wp.blockEditor,y=window.wp.plugins,_=window.wp.i18n,b=window.wp.notices,f=window.wp.commands,v=window.wp.coreCommands,x=window.wp.url,S=window.wp.htmlEntities,P=window.wp.coreData,E=window.wp.components,M=window.wp.compose,T=window.wp.primitives,B=window.ReactJSXRuntime,k=(0,B.jsx)(T.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24",children:(0,B.jsx)(T.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"})}),j=function({showTooltip:e,icon:t,href:s,initialPost:o}){var i;const{isRequestingSiteIcon:r,postType:n,siteIconUrl:a}=(0,d.useSelect)((e=>{const{getCurrentPostType:t}=e(g.store),{getEntityRecord:s,getPostType:i,isResolving:r}=e(P.store),n=s("root","__unstableBase",void 0)||{},a=o?.type||t();return{isRequestingSiteIcon:r("getEntityRecord",["root","__unstableBase",void 0]),postType:i(a),siteIconUrl:n.site_icon_url}}),[]),c=(0,M.useReducedMotion)();if(!n)return null;let l=(0,B.jsx)(E.Icon,{size:"36px",icon:k});a&&(l=(0,B.jsx)(E.__unstableMotion.img,{variants:!c&&{expand:{scale:1.25,transition:{type:"tween",duration:"0.3"}}},alt:(0,_.__)("Site Icon"),className:"edit-post-fullscreen-mode-close_site-icon",src:a})),r&&(l=null),t&&(l=(0,B.jsx)(E.Icon,{size:"36px",icon:t}));const p=h("edit-post-fullscreen-mode-close",{"has-icon":a}),u=null!=s?s:(0,x.addQueryArgs)("edit.php",{post_type:n.slug}),m=null!==(i=n?.labels?.view_items)&&void 0!==i?i:(0,_.__)("Back");return(0,B.jsx)(E.__unstableMotion.div,{whileHover:"expand",children:(0,B.jsx)(E.Button,{className:p,href:u,label:m,showTooltip:e,children:l})})},I=window.wp.privateApis,{lock:A,unlock:R}=(0,I.__dangerousOptInToUnstableAPIsOnlyForCoreModules)("I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.","@wordpress/edit-post"),{BackButton:C}=R(g.privateApis),O={hidden:{x:"-100%"},distractionFreeInactive:{x:0},hover:{x:0,transition:{type:"tween",delay:.2}}},D=function({initialPost:e}){return(0,B.jsx)(C,{children:({length:t})=>t<=1&&(0,B.jsx)(E.__unstableMotion.div,{variants:O,transition:{type:"tween",delay:.8},children:(0,B.jsx)(j,{showTooltip:!0,initialPost:e})})})};function F(){return(()=>{const{newPermalink:e}=(0,d.useSelect)((e=>({newPermalink:e(g.store).getCurrentPost().link})),[]),t=(0,l.useRef)();(0,l.useEffect)((()=>{t.current=document.querySelector("#wp-admin-bar-preview a")||document.querySelector("#wp-admin-bar-view a")}),[]),(0,l.useEffect)((()=>{e&&t.current&&t.current.setAttribute("href",e)}),[e])})(),null}const L=window.wp.keyboardShortcuts;function N(e=[],t){const s=[...e];for(const e of t){const t=s.findIndex((t=>t.id===e.id));-1!==t?s[t]=e:s.push(e)}return s}const V=(0,d.combineReducers)({isSaving:function(e=!1,t){switch(t.type){case"REQUEST_META_BOX_UPDATES":return!0;case"META_BOX_UPDATES_SUCCESS":case"META_BOX_UPDATES_FAILURE":return!1;default:return e}},locations:function(e={},t){if("SET_META_BOXES_PER_LOCATIONS"===t.type){const s={...e};for(const[e,o]of Object.entries(t.metaBoxesPerLocation))s[e]=N(s[e],o);return s}return e},initialized:function(e=!1,t){return"META_BOXES_INITIALIZED"===t.type||e}}),G=(0,d.combineReducers)({metaBoxes:V}),U=window.wp.apiFetch;var z=e.n(U);const H=window.wp.hooks,{interfaceStore:W}=R(g.privateApis),q=e=>({registry:t})=>{t.dispatch(W).enableComplementaryArea("core",e)},Q=()=>({registry:e})=>e.dispatch(W).disableComplementaryArea("core"),$=e=>({registry:t})=>(c()("select( 'core/edit-post' ).openModal( name )",{since:"6.3",alternative:"select( 'core/interface').openModal( name )"}),t.dispatch(W).openModal(e)),X=()=>({registry:e})=>(c()("select( 'core/edit-post' ).closeModal()",{since:"6.3",alternative:"select( 'core/interface').closeModal()"}),e.dispatch(W).closeModal()),Z=()=>({registry:e})=>{c()("dispatch( 'core/edit-post' ).openPublishSidebar",{since:"6.6",alternative:"dispatch( 'core/editor').openPublishSidebar"}),e.dispatch(g.store).openPublishSidebar()},Y=()=>({registry:e})=>{c()("dispatch( 'core/edit-post' ).closePublishSidebar",{since:"6.6",alternative:"dispatch( 'core/editor').closePublishSidebar"}),e.dispatch(g.store).closePublishSidebar()},K=()=>({registry:e})=>{c()("dispatch( 'core/edit-post' ).togglePublishSidebar",{since:"6.6",alternative:"dispatch( 'core/editor').togglePublishSidebar"}),e.dispatch(g.store).togglePublishSidebar()},J=e=>({registry:t})=>{c()("dispatch( 'core/edit-post' ).toggleEditorPanelEnabled",{since:"6.5",alternative:"dispatch( 'core/editor').toggleEditorPanelEnabled"}),t.dispatch(g.store).toggleEditorPanelEnabled(e)},ee=e=>({registry:t})=>{c()("dispatch( 'core/edit-post' ).toggleEditorPanelOpened",{since:"6.5",alternative:"dispatch( 'core/editor').toggleEditorPanelOpened"}),t.dispatch(g.store).toggleEditorPanelOpened(e)},te=e=>({registry:t})=>{c()("dispatch( 'core/edit-post' ).removeEditorPanel",{since:"6.5",alternative:"dispatch( 'core/editor').removeEditorPanel"}),t.dispatch(g.store).removeEditorPanel(e)},se=e=>({registry:t})=>t.dispatch(p.store).toggle("core/edit-post",e),oe=e=>({registry:t})=>{c()("dispatch( 'core/edit-post' ).switchEditorMode",{since:"6.6",alternative:"dispatch( 'core/editor').switchEditorMode"}),t.dispatch(g.store).switchEditorMode(e)},ie=e=>({registry:t})=>{const s=t.select(W).isItemPinned("core",e);t.dispatch(W)[s?"unpinItem":"pinItem"]("core",e)};function re(){return c()("dispatch( 'core/edit-post' ).updatePreferredStyleVariations",{since:"6.6",hint:"Preferred Style Variations are not supported anymore."}),{type:"NOTHING"}}const ne=e=>({registry:t})=>{R(t.dispatch(g.store)).showBlockTypes(e)},ae=e=>({registry:t})=>{R(t.dispatch(g.store)).hideBlockTypes(e)};function ce(e){return{type:"SET_META_BOXES_PER_LOCATIONS",metaBoxesPerLocation:e}}const le=()=>async({registry:e,select:t,dispatch:s})=>{s({type:"REQUEST_META_BOX_UPDATES"}),window.tinyMCE&&window.tinyMCE.triggerSave();const o=new window.FormData(document.querySelector(".metabox-base-form")),i=o.get("post_ID"),r=o.get("post_type"),n=e.select(P.store).getEditedEntityRecord("postType",r,i),a=[!!n.comment_status&&["comment_status",n.comment_status],!!n.ping_status&&["ping_status",n.ping_status],!!n.sticky&&["sticky",n.sticky],!!n.author&&["post_author",n.author]].filter(Boolean),c=[o,...t.getActiveMetaBoxLocations().map((e=>new window.FormData((e=>document.querySelector(`.edit-post-meta-boxes-area.is-${e} .metabox-location-${e}`)||document.querySelector("#metaboxes .metabox-location-"+e))(e))))].reduce(((e,t)=>{for(const[s,o]of t)e.append(s,o);return e}),new window.FormData);a.forEach((([e,t])=>c.append(e,t)));try{await z()({url:window._wpMetaBoxUrl,method:"POST",body:c,parse:!1}),s.metaBoxUpdatesSuccess()}catch{s.metaBoxUpdatesFailure()}};function de(){return{type:"META_BOX_UPDATES_SUCCESS"}}function pe(){return{type:"META_BOX_UPDATES_FAILURE"}}const ue=e=>({registry:t})=>{c()("dispatch( 'core/edit-post' ).__experimentalSetPreviewDeviceType",{since:"6.5",version:"6.7",hint:"registry.dispatch( editorStore ).setDeviceType"}),t.dispatch(g.store).setDeviceType(e)},ge=e=>({registry:t})=>{c()("dispatch( 'core/edit-post' ).setIsInserterOpened",{since:"6.5",alternative:"dispatch( 'core/editor').setIsInserterOpened"}),t.dispatch(g.store).setIsInserterOpened(e)},me=e=>({registry:t})=>{c()("dispatch( 'core/edit-post' ).setIsListViewOpened",{since:"6.5",alternative:"dispatch( 'core/editor').setIsListViewOpened"}),t.dispatch(g.store).setIsListViewOpened(e)};function he(){return c()("dispatch( 'core/edit-post' ).setIsEditingTemplate",{since:"6.5",alternative:"dispatch( 'core/editor').setRenderingMode"}),{type:"NOTHING"}}function we(){return c()("dispatch( 'core/edit-post' ).__unstableCreateTemplate",{since:"6.5"}),{type:"NOTHING"}}let ye=!1;const _e=()=>({registry:e,select:t,dispatch:s})=>{if(!e.select(g.store).__unstableIsEditorReady())return;if(ye)return;const o=e.select(g.store).getCurrentPostType();window.postboxes.page!==o&&window.postboxes.add_postbox_toggles(o),ye=!0,(0,H.addFilter)("editor.__unstableSavePost","core/edit-post/save-metaboxes",((e,o)=>e.then((()=>{if(!o.isAutosave&&t.hasMetaBoxes())return s.requestMetaBoxUpdates()})))),s({type:"META_BOXES_INITIALIZED"})},be=()=>({registry:e})=>{c()("dispatch( 'core/edit-post' ).toggleDistractionFree",{since:"6.6",alternative:"dispatch( 'core/editor').toggleDistractionFree"}),e.dispatch(g.store).toggleDistractionFree()},fe=(0,d.createRegistrySelector)((e=>()=>{const{id:t,type:s,slug:o}=e(g.store).getCurrentPost(),{getSite:i,getEntityRecords:r,canUser:n}=e(P.store),a=n("read",{kind:"root",name:"site"})?i():void 0;if(+t===a?.page_for_posts)return e(P.store).getDefaultTemplateId({slug:"home"});const c=e(g.store).getEditedPostAttribute("template");if(c){const e=r("postType","wp_template",{per_page:-1})?.find((e=>e.slug===c));return e?e.id:e}let l;return l=o?"page"===s?`${s}-${o}`:`single-${s}-${o}`:"page"===s?"page":`single-${s}`,e(P.store).getDefaultTemplateId({slug:l})})),{interfaceStore:ve}=R(g.privateApis),xe=[],Se={},Pe=(0,d.createRegistrySelector)((e=>()=>{var t;return null!==(t=e(p.store).get("core","editorMode"))&&void 0!==t?t:"visual"})),Ee=(0,d.createRegistrySelector)((e=>()=>{const t=e(ve).getActiveComplementaryArea("core");return["edit-post/document","edit-post/block"].includes(t)})),Me=(0,d.createRegistrySelector)((e=>()=>{const t=e(ve).getActiveComplementaryArea("core");return!!t&&!["edit-post/document","edit-post/block"].includes(t)})),Te=(0,d.createRegistrySelector)((e=>()=>e(ve).getActiveComplementaryArea("core"))),Be=(0,d.createRegistrySelector)((e=>()=>{c()("select( 'core/edit-post' ).getPreferences",{since:"6.0",alternative:"select( 'core/preferences' ).get"});return{...["editorMode","hiddenBlockTypes"].reduce(((t,s)=>{const o=e(p.store).get("core",s);return{...t,[s]:o}}),{}),panels:function(e,t){var s;const o=e?.reduce(((e,t)=>({...e,[t]:{enabled:!1}})),{}),i=t?.reduce(((e,t)=>{const s=e?.[t];return{...e,[t]:{...s,opened:!0}}}),null!=o?o:{});return null!==(s=null!=i?i:o)&&void 0!==s?s:Se}(e(p.store).get("core","inactivePanels"),e(p.store).get("core","openPanels"))}}));function ke(e,t,s){c()("select( 'core/edit-post' ).getPreference",{since:"6.0",alternative:"select( 'core/preferences' ).get"});const o=Be(e)[t];return void 0===o?s:o}const je=(0,d.createRegistrySelector)((e=>()=>{var t;return null!==(t=e(p.store).get("core","hiddenBlockTypes"))&&void 0!==t?t:xe})),Ie=(0,d.createRegistrySelector)((e=>()=>(c()("select( 'core/edit-post' ).isPublishSidebarOpened",{since:"6.6",alternative:"select( 'core/editor' ).isPublishSidebarOpened"}),e(g.store).isPublishSidebarOpened()))),Ae=(0,d.createRegistrySelector)((e=>(t,s)=>(c()("select( 'core/edit-post' ).isEditorPanelRemoved",{since:"6.5",alternative:"select( 'core/editor' ).isEditorPanelRemoved"}),e(g.store).isEditorPanelRemoved(s)))),Re=(0,d.createRegistrySelector)((e=>(t,s)=>(c()("select( 'core/edit-post' ).isEditorPanelEnabled",{since:"6.5",alternative:"select( 'core/editor' ).isEditorPanelEnabled"}),e(g.store).isEditorPanelEnabled(s)))),Ce=(0,d.createRegistrySelector)((e=>(t,s)=>(c()("select( 'core/edit-post' ).isEditorPanelOpened",{since:"6.5",alternative:"select( 'core/editor' ).isEditorPanelOpened"}),e(g.store).isEditorPanelOpened(s)))),Oe=(0,d.createRegistrySelector)((e=>(t,s)=>(c()("select( 'core/edit-post' ).isModalActive",{since:"6.3",alternative:"select( 'core/interface' ).isModalActive"}),!!e(ve).isModalActive(s)))),De=(0,d.createRegistrySelector)((e=>(t,s)=>!!e(p.store).get("core/edit-post",s))),Fe=(0,d.createRegistrySelector)((e=>(t,s)=>e(ve).isItemPinned("core",s))),Le=(0,d.createSelector)((e=>Object.keys(e.metaBoxes.locations).filter((t=>Ve(e,t)))),(e=>[e.metaBoxes.locations])),Ne=(0,d.createRegistrySelector)((e=>(t,s)=>Ve(t,s)&&Ge(t,s)?.some((({id:s})=>e(g.store).isEditorPanelEnabled(t,`meta-box-${s}`)))));function Ve(e,t){const s=Ge(e,t);return!!s&&0!==s.length}function Ge(e,t){return e.metaBoxes.locations[t]}const Ue=(0,d.createSelector)((e=>Object.values(e.metaBoxes.locations).flat()),(e=>[e.metaBoxes.locations]));function ze(e){return Le(e).length>0}function He(e){return e.metaBoxes.isSaving}const We=(0,d.createRegistrySelector)((e=>()=>(c()("select( 'core/edit-site' ).__experimentalGetPreviewDeviceType",{since:"6.5",version:"6.7",alternative:"select( 'core/editor' ).getDeviceType"}),e(g.store).getDeviceType()))),qe=(0,d.createRegistrySelector)((e=>()=>(c()("select( 'core/edit-post' ).isInserterOpened",{since:"6.5",alternative:"select( 'core/editor' ).isInserterOpened"}),e(g.store).isInserterOpened()))),Qe=(0,d.createRegistrySelector)((e=>()=>(c()("select( 'core/edit-post' ).__experimentalGetInsertionPoint",{since:"6.5",version:"6.7"}),R(e(g.store)).getInsertionPoint()))),$e=(0,d.createRegistrySelector)((e=>()=>(c()("select( 'core/edit-post' ).isListViewOpened",{since:"6.5",alternative:"select( 'core/editor' ).isListViewOpened"}),e(g.store).isListViewOpened()))),Xe=(0,d.createRegistrySelector)((e=>()=>(c()("select( 'core/edit-post' ).isEditingTemplate",{since:"6.5",alternative:"select( 'core/editor' ).getRenderingMode"}),"wp_template"===e(g.store).getCurrentPostType())));function Ze(e){return e.metaBoxes.initialized}const Ye=(0,d.createRegistrySelector)((e=>t=>{const s=fe(t);if(s)return e(P.store).getEditedEntityRecord("postType","wp_template",s)})),Ke=(0,d.createReduxStore)("core/edit-post",{reducer:G,actions:s,selectors:i});(0,d.register)(Ke),R(Ke).registerPrivateSelectors(o);const Je=function(){const{toggleFeature:e}=(0,d.useDispatch)(Ke),{registerShortcut:t}=(0,d.useDispatch)(L.store);return(0,l.useEffect)((()=>{t({name:"core/edit-post/toggle-fullscreen",category:"global",description:(0,_.__)("Toggle fullscreen mode."),keyCombination:{modifier:"secondary",character:"f"}})}),[]),(0,L.useShortcut)("core/edit-post/toggle-fullscreen",(()=>{e("fullscreenMode")})),null};function et(){const{editPost:e}=(0,d.useDispatch)(g.store),[t,s]=(0,l.useState)(!1),[o,i]=(0,l.useState)(void 0),[r,n]=(0,l.useState)(""),{postType:a,isNewPost:c}=(0,d.useSelect)((e=>{const{getEditedPostAttribute:t,isCleanNewPost:s}=e(g.store);return{postType:t("type"),isNewPost:s()}}),[]);return(0,l.useEffect)((()=>{c&&"wp_block"===a&&s(!0)}),[]),"wp_block"===a&&c?(0,B.jsx)(B.Fragment,{children:t&&(0,B.jsx)(E.Modal,{title:(0,_.__)("Create pattern"),onRequestClose:()=>{s(!1)},overlayClassName:"reusable-blocks-menu-items__convert-modal",children:(0,B.jsx)("form",{onSubmit:t=>{t.preventDefault(),s(!1),e({title:r,meta:{wp_pattern_sync_status:o}})},children:(0,B.jsxs)(E.__experimentalVStack,{spacing:"5",children:[(0,B.jsx)(E.TextControl,{label:(0,_.__)("Name"),value:r,onChange:n,placeholder:(0,_.__)("My pattern"),className:"patterns-create-modal__name-input",__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0}),(0,B.jsx)(E.ToggleControl,{label:(0,_._x)("Synced","pattern (singular)"),help:(0,_.__)("Sync this pattern across multiple locations."),checked:!o,onChange:()=>{i(o?void 0:"unsynced")}}),(0,B.jsx)(E.__experimentalHStack,{justify:"right",children:(0,B.jsx)(E.Button,{variant:"primary",type:"submit",disabled:!r,accessibleWhenDisabled:!0,children:(0,_.__)("Create")})})]})})})}):null}class tt extends l.Component{constructor(){super(...arguments),this.state={historyId:null}}componentDidUpdate(e){const{postId:t,postStatus:s,postType:o,isSavingPost:i,hasHistory:r}=this.props,{historyId:n}=this.state;"trash"!==s||i?t===e.postId&&t===n||"auto-draft"===s||!t||r||this.setBrowserURL(t):this.setTrashURL(t,o)}setTrashURL(e,t){window.location.href=function(e,t){return(0,x.addQueryArgs)("edit.php",{trashed:1,post_type:t,ids:e})}(e,t)}setBrowserURL(e){window.history.replaceState({id:e},"Post "+e,function(e){return(0,x.addQueryArgs)("post.php",{post:e,action:"edit"})}(e)),this.setState((()=>({historyId:e})))}render(){return null}}const st=(0,d.withSelect)((e=>{const{getCurrentPost:t,isSavingPost:s}=e(g.store),o=t();let{id:i,status:r,type:n}=o;return["wp_template","wp_template_part"].includes(n)&&(i=o.wp_id),{postId:i,postStatus:r,postType:n,isSavingPost:s()}}))(tt),ot=function({location:e}){const t=(0,l.useRef)(null),s=(0,l.useRef)(null);(0,l.useEffect)((()=>(s.current=document.querySelector(".metabox-location-"+e),s.current&&t.current.appendChild(s.current),()=>{s.current&&document.querySelector("#metaboxes").appendChild(s.current)})),[e]);const o=(0,d.useSelect)((e=>e(Ke).isSavingMetaBoxes()),[]),i=h("edit-post-meta-boxes-area",`is-${e}`,{"is-loading":o});return(0,B.jsxs)("div",{className:i,children:[o&&(0,B.jsx)(E.Spinner,{}),(0,B.jsx)("div",{className:"edit-post-meta-boxes-area__container",ref:t}),(0,B.jsx)("div",{className:"edit-post-meta-boxes-area__clear"})]})};class it extends l.Component{componentDidMount(){this.updateDOM()}componentDidUpdate(e){this.props.isVisible!==e.isVisible&&this.updateDOM()}updateDOM(){const{id:e,isVisible:t}=this.props,s=document.getElementById(e);s&&(t?s.classList.remove("is-hidden"):s.classList.add("is-hidden"))}render(){return null}}const rt=(0,d.withSelect)(((e,{id:t})=>({isVisible:e(g.store).isEditorPanelEnabled(`meta-box-${t}`)})))(it);function nt({location:e}){const t=(0,d.useRegistry)(),{metaBoxes:s,areMetaBoxesInitialized:o,isEditorReady:i}=(0,d.useSelect)((t=>{const{__unstableIsEditorReady:s}=t(g.store),{getMetaBoxesPerLocation:o,areMetaBoxesInitialized:i}=t(Ke);return{metaBoxes:o(e),areMetaBoxesInitialized:i(),isEditorReady:s()}}),[e]),r=!!s?.length;return(0,l.useEffect)((()=>{i&&r&&!o&&t.dispatch(Ke).initializeMetaBoxes()}),[i,r,o]),o?(0,B.jsxs)(B.Fragment,{children:[(null!=s?s:[]).map((({id:e})=>(0,B.jsx)(rt,{id:e},e))),(0,B.jsx)(ot,{location:e})]}):null}const at=window.wp.keycodes,ct=function(){const e=(0,d.useSelect)((e=>{const{canUser:t}=e(P.store),s=(0,x.addQueryArgs)("edit.php",{post_type:"wp_block"}),o=(0,x.addQueryArgs)("site-editor.php",{path:"/patterns"});return t("create",{kind:"postType",name:"wp_template"})?o:s}),[]);return(0,B.jsx)(E.MenuItem,{role:"menuitem",href:e,children:(0,_.__)("Manage patterns")})};function lt(){const e=(0,d.useSelect)((e=>"wp_template"===e(g.store).getCurrentPostType()),[]);return(0,B.jsx)(p.PreferenceToggleMenuItem,{scope:"core/edit-post",name:e?"welcomeGuideTemplate":"welcomeGuide",label:(0,_.__)("Welcome Guide")})}const{PreferenceBaseOption:dt}=R(p.privateApis);function pt({willEnable:e}){const[t,s]=(0,l.useState)(!1);return(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)("p",{className:"edit-post-preferences-modal__custom-fields-confirmation-message",children:(0,_.__)("A page reload is required for this change. Make sure your content is saved before reloading.")}),(0,B.jsx)(E.Button,{className:"edit-post-preferences-modal__custom-fields-confirmation-button",variant:"secondary",isBusy:t,accessibleWhenDisabled:!0,disabled:t,onClick:()=>{s(!0),function(){const e=document.getElementById("toggle-custom-fields-form");e.querySelector('[name="_wp_http_referer"]').setAttribute("value",(0,x.getPathAndQueryString)(window.location.href)),e.submit()}()},children:e?(0,_.__)("Show & Reload Page"):(0,_.__)("Hide & Reload Page")})]})}const ut=(0,d.withSelect)((e=>({areCustomFieldsEnabled:!!e(g.store).getEditorSettings().enableCustomFields})))((function({label:e,areCustomFieldsEnabled:t}){const[s,o]=(0,l.useState)(t);return(0,B.jsx)(dt,{label:e,isChecked:s,onChange:o,children:s!==t&&(0,B.jsx)(pt,{willEnable:s})})})),{PreferenceBaseOption:gt}=R(p.privateApis),mt=(0,M.compose)((0,d.withSelect)(((e,{panelName:t})=>{const{isEditorPanelEnabled:s,isEditorPanelRemoved:o}=e(g.store);return{isRemoved:o(t),isChecked:s(t)}})),(0,M.ifCondition)((({isRemoved:e})=>!e)),(0,d.withDispatch)(((e,{panelName:t})=>({onChange:()=>e(g.store).toggleEditorPanelEnabled(t)}))))(gt),{PreferencesModalSection:ht}=R(p.privateApis),wt=(0,d.withSelect)((e=>{const{getEditorSettings:t}=e(g.store),{getAllMetaBoxes:s}=e(Ke);return{areCustomFieldsRegistered:void 0!==t().enableCustomFields,metaBoxes:s()}}))((function({areCustomFieldsRegistered:e,metaBoxes:t,...s}){const o=t.filter((({id:e})=>"postcustom"!==e));return e||0!==o.length?(0,B.jsxs)(ht,{...s,children:[e&&(0,B.jsx)(ut,{label:(0,_.__)("Custom fields")}),o.map((({id:e,title:t})=>(0,B.jsx)(mt,{label:t,panelName:`meta-box-${e}`},e)))]}):null})),{PreferenceToggleControl:yt}=R(p.privateApis),{PreferencesModal:_t}=R(g.privateApis);function bt(){const e={general:(0,B.jsx)(wt,{title:(0,_.__)("Advanced")}),appearance:(0,B.jsx)(yt,{scope:"core/edit-post",featureName:"themeStyles",help:(0,_.__)("Make the editor look like your theme."),label:(0,_.__)("Use theme styles")})};return(0,B.jsx)(_t,{extraSections:e})}const{ToolsMoreMenuGroup:ft,ViewMoreMenuGroup:vt}=R(g.privateApis),xt=()=>{const e=(0,M.useViewportMatch)("large");return(0,B.jsxs)(B.Fragment,{children:[e&&(0,B.jsx)(vt,{children:(0,B.jsx)(p.PreferenceToggleMenuItem,{scope:"core/edit-post",name:"fullscreenMode",label:(0,_.__)("Fullscreen mode"),info:(0,_.__)("Show and hide the admin user interface"),messageActivated:(0,_.__)("Fullscreen mode activated"),messageDeactivated:(0,_.__)("Fullscreen mode deactivated"),shortcut:at.displayShortcut.secondary("f")})}),(0,B.jsxs)(ft,{children:[(0,B.jsx)(ct,{}),(0,B.jsx)(lt,{})]}),(0,B.jsx)(bt,{})]})};function St({nonAnimatedSrc:e,animatedSrc:t}){return(0,B.jsxs)("picture",{className:"edit-post-welcome-guide__image",children:[(0,B.jsx)("source",{srcSet:e,media:"(prefers-reduced-motion: reduce)"}),(0,B.jsx)("img",{src:t,width:"312",height:"240",alt:""})]})}function Pt(){const{toggleFeature:e}=(0,d.useDispatch)(Ke);return(0,B.jsx)(E.Guide,{className:"edit-post-welcome-guide",contentLabel:(0,_.__)("Welcome to the block editor"),finishButtonText:(0,_.__)("Get started"),onFinish:()=>e("welcomeGuide"),pages:[{image:(0,B.jsx)(St,{nonAnimatedSrc:"https://s.w.org/images/block-editor/welcome-canvas.svg",animatedSrc:"https://s.w.org/images/block-editor/welcome-canvas.gif"}),content:(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)("h1",{className:"edit-post-welcome-guide__heading",children:(0,_.__)("Welcome to the block editor")}),(0,B.jsx)("p",{className:"edit-post-welcome-guide__text",children:(0,_.__)("In the WordPress editor, each paragraph, image, or video is presented as a distinct “block” of content.")})]})},{image:(0,B.jsx)(St,{nonAnimatedSrc:"https://s.w.org/images/block-editor/welcome-editor.svg",animatedSrc:"https://s.w.org/images/block-editor/welcome-editor.gif"}),content:(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)("h1",{className:"edit-post-welcome-guide__heading",children:(0,_.__)("Make each block your own")}),(0,B.jsx)("p",{className:"edit-post-welcome-guide__text",children:(0,_.__)("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,B.jsx)(St,{nonAnimatedSrc:"https://s.w.org/images/block-editor/welcome-library.svg",animatedSrc:"https://s.w.org/images/block-editor/welcome-library.gif"}),content:(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)("h1",{className:"edit-post-welcome-guide__heading",children:(0,_.__)("Get to know the block library")}),(0,B.jsx)("p",{className:"edit-post-welcome-guide__text",children:(0,l.createInterpolateElement)((0,_.__)("All of the blocks available to you live in the block library. You’ll find it wherever you see the <InserterIconImage /> icon."),{InserterIconImage:(0,B.jsx)("img",{alt:(0,_.__)("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,B.jsx)(St,{nonAnimatedSrc:"https://s.w.org/images/block-editor/welcome-documentation.svg",animatedSrc:"https://s.w.org/images/block-editor/welcome-documentation.gif"}),content:(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)("h1",{className:"edit-post-welcome-guide__heading",children:(0,_.__)("Learn how to use the block editor")}),(0,B.jsxs)("p",{className:"edit-post-welcome-guide__text",children:[(0,_.__)("New to the block editor? Want to learn more about using it? "),(0,B.jsx)(E.ExternalLink,{href:(0,_.__)("https://wordpress.org/documentation/article/wordpress-block-editor/"),children:(0,_.__)("Here's a detailed guide.")})]})]})}]})}function Et(){const{toggleFeature:e}=(0,d.useDispatch)(Ke);return(0,B.jsx)(E.Guide,{className:"edit-template-welcome-guide",contentLabel:(0,_.__)("Welcome to the template editor"),finishButtonText:(0,_.__)("Get started"),onFinish:()=>e("welcomeGuideTemplate"),pages:[{image:(0,B.jsx)(St,{nonAnimatedSrc:"https://s.w.org/images/block-editor/welcome-template-editor.svg",animatedSrc:"https://s.w.org/images/block-editor/welcome-template-editor.gif"}),content:(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)("h1",{className:"edit-post-welcome-guide__heading",children:(0,_.__)("Welcome to the template editor")}),(0,B.jsx)("p",{className:"edit-post-welcome-guide__text",children:(0,_.__)("Templates help define the layout of the site. You can customize all aspects of your posts and pages using blocks and patterns in this editor.")})]})}]})}function Mt({postType:e}){const{isActive:t,isEditingTemplate:s}=(0,d.useSelect)((t=>{const{isFeatureActive:s}=t(Ke),o="wp_template"===e;return{isActive:s(o?"welcomeGuideTemplate":"welcomeGuide"),isEditingTemplate:o}}),[e]);return t?s?(0,B.jsx)(Et,{}):(0,B.jsx)(Pt,{}):null}const Tt=(0,B.jsx)(T.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,B.jsx)(T.Path,{d:"M6 4a2 2 0 0 0-2 2v3h1.5V6a.5.5 0 0 1 .5-.5h3V4H6Zm3 14.5H6a.5.5 0 0 1-.5-.5v-3H4v3a2 2 0 0 0 2 2h3v-1.5Zm6 1.5v-1.5h3a.5.5 0 0 0 .5-.5v-3H20v3a2 2 0 0 1-2 2h-3Zm3-16a2 2 0 0 1 2 2v3h-1.5V6a.5.5 0 0 0-.5-.5h-3V4h3Z"})}),{getLayoutStyles:Bt}=R(w.privateApis),{useCommands:kt}=R(v.privateApis),{useCommandContext:jt}=R(f.privateApis),{Editor:It,FullscreenMode:At}=R(g.privateApis),{BlockKeyboardShortcuts:Rt}=R(n.privateApis),Ct=["wp_template","wp_template_part","wp_block","wp_navigation"],Ot=function({postId:e,postType:t,settings:s,initialEdits:o}){kt(),function(){const{isFullscreen:e}=(0,d.useSelect)((e=>{const{get:t}=e(p.store);return{isFullscreen:t("core/edit-post","fullscreenMode")}}),[]),{toggle:t}=(0,d.useDispatch)(p.store),{createInfoNotice:s}=(0,d.useDispatch)(b.store);(0,f.useCommand)({name:"core/toggle-fullscreen-mode",label:e?(0,_.__)("Exit fullscreen"):(0,_.__)("Enter fullscreen"),icon:Tt,callback:({close:o})=>{t("core/edit-post","fullscreenMode"),o(),s(e?(0,_.__)("Fullscreen off."):(0,_.__)("Fullscreen on."),{id:"core/edit-post/toggle-fullscreen-mode/notice",type:"snackbar",actions:[{label:(0,_.__)("Undo"),onClick:()=>{t("core/edit-post","fullscreenMode")}}]})}})}();const i=function(){const e=(0,d.useRegistry)();return(0,M.useRefEffect)((t=>{function s(s){if(s.target!==t)return;const{ownerDocument:o}=t,{defaultView:i}=o;if(!i.parseInt(i.getComputedStyle(t).paddingBottom,10))return;const n=t.lastElementChild;if(!n)return;const a=n.getBoundingClientRect();if(s.clientY<a.bottom)return;s.preventDefault();const c=e.select(w.store).getBlockOrder(""),l=c[c.length-1];if(!l)return;const d=e.select(w.store).getBlock(l),{selectBlock:p,insertDefaultBlock:u}=e.dispatch(w.store);(0,r.isUnmodifiedDefaultBlock)(d)?p(l):u()}return t.addEventListener("mousedown",s),()=>{t.removeEventListener("mousedown",s)}}),[e])}(),n=function(){const{isBlockBasedTheme:e,hasV3BlocksOnly:t,isEditingTemplate:s,hasMetaBoxes:o}=(0,d.useSelect)((e=>{const{getEditorSettings:t,getCurrentPostType:s}=e(g.store),{getBlockTypes:o}=e(r.store);return{isBlockBasedTheme:t().__unstableIsBlockBasedTheme,hasV3BlocksOnly:o().every((e=>e.apiVersion>=3)),isEditingTemplate:"wp_template"===s(),hasMetaBoxes:e(Ke).hasMetaBoxes()}}),[]);return(t||e)&&!o||s}(),{createErrorNotice:a}=(0,d.useDispatch)(b.store),{currentPost:c,onNavigateToEntityRecord:u,onNavigateToPreviousEntityRecord:m}=function(e,t,s){const[o,i]=(0,l.useReducer)(((e,{type:t,post:s,previousRenderingMode:o})=>"push"===t?[...e,{post:s,previousRenderingMode:o}]:"pop"===t&&e.length>1?e.slice(0,-1):e),[{post:{postId:e,postType:t}}]),{post:r,previousRenderingMode:n}=o[o.length-1],{getRenderingMode:a}=(0,d.useSelect)(g.store),{setRenderingMode:c}=(0,d.useDispatch)(g.store),p=(0,l.useCallback)((e=>{i({type:"push",post:{postId:e.postId,postType:e.postType},previousRenderingMode:a()}),c(s)}),[a,c,s]),u=(0,l.useCallback)((()=>{i({type:"pop"}),n&&c(n)}),[c,n]);return{currentPost:r,onNavigateToEntityRecord:p,onNavigateToPreviousEntityRecord:o.length>1?u:void 0}}(e,t,"post-only"),{mode:v,isFullscreenActive:T,hasActiveMetaboxes:k,hasBlockSelected:j,showIconLabels:I,isDistractionFree:A,showMetaBoxes:C,hasHistory:O,isEditingTemplate:L,isWelcomeGuideVisible:N,templateId:V}=(0,d.useSelect)((e=>{var t;const{get:o}=e(p.store),{isFeatureActive:i,getEditedPostTemplateId:r}=R(e(Ke)),{canUser:n,getPostType:a}=e(P.store),l=s.supportsTemplateMode,d=null!==(t=a(c.postType)?.viewable)&&void 0!==t&&t,u=n("read",{kind:"postType",name:"wp_template"});return{mode:e(g.store).getEditorMode(),isFullscreenActive:e(Ke).isFeatureActive("fullscreenMode"),hasActiveMetaboxes:e(Ke).hasMetaBoxes(),hasBlockSelected:!!e(w.store).getBlockSelectionStart(),showIconLabels:o("core","showIconLabels"),isDistractionFree:o("core","distractionFree"),showMetaBoxes:"post-only"===e(g.store).getRenderingMode(),isEditingTemplate:"wp_template"===e(g.store).getCurrentPostType(),isWelcomeGuideVisible:i("welcomeGuide"),templateId:l&&d&&u&&"wp_template"!==c.postType?r():null}}),[s.supportsTemplateMode,c.postType]);jt(j?"block-selection-edit":"entity-edit");const G=(0,l.useMemo)((()=>({...s,onNavigateToEntityRecord:u,onNavigateToPreviousEntityRecord:m,defaultRenderingMode:"post-only"})),[s,u,m]),U=function(){const{hasThemeStyleSupport:e,editorSettings:t,isZoomedOutView:s,hasMetaBoxes:o,renderingMode:i,postType:r}=(0,d.useSelect)((e=>{const{__unstableGetEditorMode:t}=e(w.store),{getCurrentPostType:s,getRenderingMode:o}=e(g.store),i=s();return{hasThemeStyleSupport:e(Ke).isFeatureActive("themeStyles"),editorSettings:e(g.store).getEditorSettings(),isZoomedOutView:"zoom-out"===t(),hasMetaBoxes:e(Ke).hasMetaBoxes(),renderingMode:o(),postType:i}}),[]);return(0,l.useMemo)((()=>{var n,a,c,l;const d=null!==(n=t.styles?.filter((e=>e.__unstableType&&"theme"!==e.__unstableType)))&&void 0!==n?n:[],p=[...null!==(a=t?.defaultEditorStyles)&&void 0!==a?a:[],...d],u=e&&d.length!==(null!==(c=t.styles?.length)&&void 0!==c?c:0);t.disableLayoutStyles||u||p.push({css:Bt({style:{},selector:"body",hasBlockGapSupport:!1,hasFallbackGapSupport:!0,fallbackGapValue:"0.5em"})});const g=u?null!==(l=t.styles)&&void 0!==l?l:[]:p;return s||o||"post-only"!==i||Ct.includes(r)?g:[...g,{css:":root :where(body){padding-bottom: 40vh}"}]}),[t.defaultEditorStyles,t.disableLayoutStyles,t.styles,e,r])}();I?document.body.classList.add("show-icon-labels"):document.body.classList.remove("show-icon-labels");const z=h("edit-post-layout","is-mode-"+v,{"has-metaboxes":k}),{createSuccessNotice:H}=(0,d.useDispatch)(b.store),W=(0,l.useCallback)(((e,t)=>{switch(e){case"move-to-trash":document.location.href=(0,x.addQueryArgs)("edit.php",{trashed:1,post_type:t[0].type,ids:t[0].id});break;case"duplicate-post":{const e=t[0],s="string"==typeof e.title?e.title:e.title?.rendered;H((0,_.sprintf)(
// translators: %s: Title of the created post e.g: "Post 1".
// translators: %s: Title of the created post e.g: "Post 1".
(0,_.__)('"%s" successfully created.'),(0,S.decodeEntities)(s)),{type:"snackbar",id:"duplicate-post-action",actions:[{label:(0,_.__)("Edit"),onClick:()=>{const t=e.id;document.location.href=(0,x.addQueryArgs)("post.php",{post:t,action:"edit"})}}]})}}}),[H]),q=(0,l.useMemo)((()=>({type:t,id:e})),[t,e]),Q=(0,M.useViewportMatch)("medium")&&T?(0,B.jsx)(D,{initialPost:q}):null;return(0,B.jsx)(E.SlotFillProvider,{children:(0,B.jsxs)(g.ErrorBoundary,{children:[(0,B.jsx)(f.CommandMenu,{}),(0,B.jsx)(Mt,{postType:c.postType}),(0,B.jsxs)(It,{settings:G,initialEdits:o,postType:c.postType,postId:c.postId,templateId:V,className:z,styles:U,forceIsDirty:k,contentRef:i,disableIframe:!n,autoFocus:!N,onActionPerformed:W,extraSidebarPanels:!L&&(0,B.jsx)(nt,{location:"side"}),extraContent:!A&&C&&(0,B.jsxs)("div",{className:"edit-post-layout__metaboxes",children:[(0,B.jsx)(nt,{location:"normal"}),(0,B.jsx)(nt,{location:"advanced"})]}),children:[(0,B.jsx)(g.PostLockedModal,{}),(0,B.jsx)(F,{}),(0,B.jsx)(At,{isActive:T}),(0,B.jsx)(st,{hasHistory:O}),(0,B.jsx)(g.UnsavedChangesWarning,{}),(0,B.jsx)(g.AutosaveMonitor,{}),(0,B.jsx)(g.LocalAutosaveMonitor,{}),(0,B.jsx)(Je,{}),(0,B.jsx)(g.EditorKeyboardShortcutsRegister,{}),(0,B.jsx)(Rt,{}),(0,B.jsx)(et,{}),(0,B.jsx)(y.PluginArea,{onError:function(e){a((0,_.sprintf)(/* translators: %s: plugin name */ /* translators: %s: plugin name */
(0,_.__)('The "%s" plugin has encountered an error and cannot be rendered.'),e))}}),(0,B.jsx)(xt,{}),Q,(0,B.jsx)(g.EditorSnackbars,{})]})]})})},{PluginPostExcerpt:Dt}=R(g.privateApis),Ft=(0,x.getPath)(window.location.href)?.includes("site-editor.php"),Lt=e=>{c()(`wp.editPost.${e}`,{since:"6.6",alternative:`wp.editor.${e}`})};function Nt(e){return Ft?null:(Lt("PluginBlockSettingsMenuItem"),(0,B.jsx)(g.PluginBlockSettingsMenuItem,{...e}))}function Vt(e){return Ft?null:(Lt("PluginDocumentSettingPanel"),(0,B.jsx)(g.PluginDocumentSettingPanel,{...e}))}function Gt(e){return Ft?null:(Lt("PluginMoreMenuItem"),(0,B.jsx)(g.PluginMoreMenuItem,{...e}))}function Ut(e){return Ft?null:(Lt("PluginPrePublishPanel"),(0,B.jsx)(g.PluginPrePublishPanel,{...e}))}function zt(e){return Ft?null:(Lt("PluginPostPublishPanel"),(0,B.jsx)(g.PluginPostPublishPanel,{...e}))}function Ht(e){return Ft?null:(Lt("PluginPostStatusInfo"),(0,B.jsx)(g.PluginPostStatusInfo,{...e}))}function Wt(e){return Ft?null:(Lt("PluginSidebar"),(0,B.jsx)(g.PluginSidebar,{...e}))}function qt(e){return Ft?null:(Lt("PluginSidebarMoreMenuItem"),(0,B.jsx)(g.PluginSidebarMoreMenuItem,{...e}))}function Qt(){return Ft?null:(c()("wp.editPost.__experimentalPluginPostExcerpt",{since:"6.6",hint:"Core and custom panels can be access programmatically using their panel name.",link:"https://developer.wordpress.org/block-editor/reference-guides/slotfills/plugin-document-setting-panel/#accessing-a-panel-programmatically"}),Dt)}const{BackButton:$t,registerDefaultActions:Xt,registerCoreBlockBindingsSources:Zt,bootstrapBlockBindingsSourcesFromServer:Yt}=R(g.privateApis);function Kt(e,t,s,o,i){const a=window.matchMedia("(min-width: 782px)").matches,c=document.getElementById(e),m=(0,l.createRoot)(c);return(0,d.dispatch)(p.store).setDefaults("core/edit-post",{fullscreenMode:!0,themeStyles:!0,welcomeGuide:!0,welcomeGuideTemplate:!0}),(0,d.dispatch)(p.store).setDefaults("core",{allowRightClickOverrides:!0,editorMode:"visual",fixedToolbar:!1,hiddenBlockTypes:[],inactivePanels:[],openPanels:["post-status"],showBlockBreadcrumbs:!0,showIconLabels:!1,showListViewByDefault:!1,isPublishSidebarEnabled:!0}),(0,d.dispatch)(r.store).reapplyBlockTypeFilters(),a&&(0,d.select)(p.store).get("core","showListViewByDefault")&&!(0,d.select)(p.store).get("core","distractionFree")&&(0,d.dispatch)(g.store).setIsListViewOpened(!0),(0,n.registerCoreBlocks)(),Yt(o?.blockBindingsSources),Zt(),(0,u.registerLegacyWidgetBlock)({inserter:!1}),(0,u.registerWidgetGroupBlock)({inserter:!1}),(0,n.__experimentalRegisterExperimentalCoreBlocks)({enableFSEBlocks:o.__unstableEnableFullSiteEditingBlocks}),Xt(),"Standards"!=("CSS1Compat"===document.compatMode?"Standards":"Quirks")&&console.warn("Your browser is using Quirks Mode. \nThis can cause rendering issues such as blocks overlaying meta boxes in the editor. Quirks Mode can be triggered by PHP errors or HTML code appearing before the opening <!DOCTYPE html>. Try checking the raw page source or your site's PHP error log and resolving errors there, removing any HTML before the doctype, or disabling plugins."),-1!==window.navigator.userAgent.indexOf("iPhone")&&window.addEventListener("scroll",(e=>{const t=document.getElementsByClassName("interface-interface-skeleton__body")[0];e.target===document&&(window.scrollY>100&&(t.scrollTop=t.scrollTop+window.scrollY),document.getElementsByClassName("is-mode-visual")[0]&&window.scrollTo(0,0))})),window.addEventListener("dragover",(e=>e.preventDefault()),!1),window.addEventListener("drop",(e=>e.preventDefault()),!1),m.render((0,B.jsx)(l.StrictMode,{children:(0,B.jsx)(Ot,{settings:o,postId:s,postType:t,initialEdits:i})})),m}function Jt(){c()("wp.editPost.reinitializeEditor",{since:"6.2",version:"6.3"})}(window.wp=window.wp||{}).editPost=t})();
//# sourceMappingURL=index.min.js.map