mirror of
https://github.com/WordPress/WordPress.git
synced 2024-11-09 12:20:25 +01:00
afd36de0b5
This updates the following dependencies to their latest versions: - `chalk` - `cssnano` - `dotenv` - `grunt-contrib-cssmin` - `grunt-contrib-qunit` - `grunt-webpack` - `jest-image-snapshot` - `postcss` - `sass` - `sinon` - `webpack` Additionally, `npm audit fix` has been run to automatically fix as many issues as possible. See #58863. Built from https://develop.svn.wordpress.org/trunk@56390 git-svn-id: http://core.svn.wordpress.org/trunk@55902 1a063a9b-81f0-0310-95a4-ce76da25c4cd
12 lines
143 KiB
JavaScript
12 lines
143 KiB
JavaScript
/*! This file is auto-generated */
|
||
(()=>{var e={6411:function(e,t){var n,o,s;
|
||
/*!
|
||
autosize 4.0.4
|
||
license: MIT
|
||
http://www.jacklmoore.com/autosize
|
||
*/o=[e,t],n=function(e,t){"use strict";var n,o,s="function"==typeof Map?new Map:(n=[],o=[],{has:function(e){return n.indexOf(e)>-1},get:function(e){return o[n.indexOf(e)]},set:function(e,t){-1===n.indexOf(e)&&(n.push(e),o.push(t))},delete:function(e){var t=n.indexOf(e);t>-1&&(n.splice(t,1),o.splice(t,1))}}),r=function(e){return new Event(e,{bubbles:!0})};try{new Event("test")}catch(e){r=function(e){var t=document.createEvent("Event");return t.initEvent(e,!0,!1),t}}function i(e){if(e&&e.nodeName&&"TEXTAREA"===e.nodeName&&!s.has(e)){var t=null,n=null,o=null,i=function(){e.clientWidth!==n&&p()},a=function(t){window.removeEventListener("resize",i,!1),e.removeEventListener("input",p,!1),e.removeEventListener("keyup",p,!1),e.removeEventListener("autosize:destroy",a,!1),e.removeEventListener("autosize:update",p,!1),Object.keys(t).forEach((function(n){e.style[n]=t[n]})),s.delete(e)}.bind(e,{height:e.style.height,resize:e.style.resize,overflowY:e.style.overflowY,overflowX:e.style.overflowX,wordWrap:e.style.wordWrap});e.addEventListener("autosize:destroy",a,!1),"onpropertychange"in e&&"oninput"in e&&e.addEventListener("keyup",p,!1),window.addEventListener("resize",i,!1),e.addEventListener("input",p,!1),e.addEventListener("autosize:update",p,!1),e.style.overflowX="hidden",e.style.wordWrap="break-word",s.set(e,{destroy:a,update:p}),l()}function l(){var n=window.getComputedStyle(e,null);"vertical"===n.resize?e.style.resize="none":"both"===n.resize&&(e.style.resize="horizontal"),t="content-box"===n.boxSizing?-(parseFloat(n.paddingTop)+parseFloat(n.paddingBottom)):parseFloat(n.borderTopWidth)+parseFloat(n.borderBottomWidth),isNaN(t)&&(t=0),p()}function c(t){var n=e.style.width;e.style.width="0px",e.offsetWidth,e.style.width=n,e.style.overflowY=t}function u(e){for(var t=[];e&&e.parentNode&&e.parentNode instanceof Element;)e.parentNode.scrollTop&&t.push({node:e.parentNode,scrollTop:e.parentNode.scrollTop}),e=e.parentNode;return t}function d(){if(0!==e.scrollHeight){var o=u(e),s=document.documentElement&&document.documentElement.scrollTop;e.style.height="",e.style.height=e.scrollHeight+t+"px",n=e.clientWidth,o.forEach((function(e){e.node.scrollTop=e.scrollTop})),s&&(document.documentElement.scrollTop=s)}}function p(){d();var t=Math.round(parseFloat(e.style.height)),n=window.getComputedStyle(e,null),s="content-box"===n.boxSizing?Math.round(parseFloat(n.height)):e.offsetHeight;if(s<t?"hidden"===n.overflowY&&(c("scroll"),d(),s="content-box"===n.boxSizing?Math.round(parseFloat(window.getComputedStyle(e,null).height)):e.offsetHeight):"hidden"!==n.overflowY&&(c("hidden"),d(),s="content-box"===n.boxSizing?Math.round(parseFloat(window.getComputedStyle(e,null).height)):e.offsetHeight),o!==s){o=s;var i=r("autosize:resized");try{e.dispatchEvent(i)}catch(e){}}}}function a(e){var t=s.get(e);t&&t.destroy()}function l(e){var t=s.get(e);t&&t.update()}var c=null;"undefined"==typeof window||"function"!=typeof window.getComputedStyle?((c=function(e){return e}).destroy=function(e){return e},c.update=function(e){return e}):((c=function(e,t){return e&&Array.prototype.forEach.call(e.length?e:[e],(function(e){return i(e,t)})),e}).destroy=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],a),e},c.update=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],l),e}),t.default=c,e.exports=t.default},void 0===(s="function"==typeof n?n.apply(t,o):n)||(e.exports=s)},4403:(e,t)=>{var n;
|
||
/*!
|
||
Copyright (c) 2018 Jed Watson.
|
||
Licensed under the MIT License (MIT), see
|
||
http://jedwatson.github.io/classnames
|
||
*/!function(){"use strict";var o={}.hasOwnProperty;function s(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var r=typeof n;if("string"===r||"number"===r)e.push(n);else if(Array.isArray(n)){if(n.length){var i=s.apply(null,n);i&&e.push(i)}}else if("object"===r){if(n.toString!==Object.prototype.toString&&!n.toString.toString().includes("[native code]")){e.push(n.toString());continue}for(var a in n)o.call(n,a)&&n[a]&&e.push(a)}}}return e.join(" ")}e.exports?(s.default=s,e.exports=s):void 0===(n=function(){return s}.apply(t,[]))||(e.exports=n)}()},4827:e=>{e.exports=function(e,t,n){return((n=window.getComputedStyle)?n(e):e.currentStyle)[t.replace(/-(\w)/gi,(function(e,t){return t.toUpperCase()}))]}},9894:(e,t,n)=>{var o=n(4827);e.exports=function(e){var t=o(e,"line-height"),n=parseFloat(t,10);if(t===n+""){var s=e.style.lineHeight;e.style.lineHeight=t+"em",t=o(e,"line-height"),n=parseFloat(t,10),s?e.style.lineHeight=s:delete e.style.lineHeight}if(-1!==t.indexOf("pt")?(n*=4,n/=3):-1!==t.indexOf("mm")?(n*=96,n/=25.4):-1!==t.indexOf("cm")?(n*=96,n/=2.54):-1!==t.indexOf("in")?n*=96:-1!==t.indexOf("pc")&&(n*=16),n=Math.round(n),"normal"===t){var r=e.nodeName,i=document.createElement(r);i.innerHTML=" ","TEXTAREA"===r.toUpperCase()&&i.setAttribute("rows","1");var a=o(e,"font-size");i.style.fontSize=a,i.style.padding="0px",i.style.border="0px";var l=document.body;l.appendChild(i),n=i.offsetHeight,l.removeChild(i)}return n}},5372:(e,t,n)=>{"use strict";var o=n(9567);function s(){}function r(){}r.resetWarningCache=s,e.exports=function(){function e(e,t,n,s,r,i){if(i!==o){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:r,resetWarningCache:s};return n.PropTypes=n,n}},2652:(e,t,n)=>{e.exports=n(5372)()},9567:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},5438:function(e,t,n){"use strict";var o,s=this&&this.__extends||(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),r=this&&this.__assign||Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var s in t=arguments[n])Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s]);return e},i=this&&this.__rest||function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var s=0;for(o=Object.getOwnPropertySymbols(e);s<o.length;s++)t.indexOf(o[s])<0&&(n[o[s]]=e[o[s]])}return n};t.__esModule=!0;var a=n(9196),l=n(2652),c=n(6411),u=n(9894),d="autosize:resized",p=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={lineHeight:null},t.textarea=null,t.onResize=function(e){t.props.onResize&&t.props.onResize(e)},t.updateLineHeight=function(){t.textarea&&t.setState({lineHeight:u(t.textarea)})},t.onChange=function(e){var n=t.props.onChange;t.currentValue=e.currentTarget.value,n&&n(e)},t}return s(t,e),t.prototype.componentDidMount=function(){var e=this,t=this.props,n=t.maxRows,o=t.async;"number"==typeof n&&this.updateLineHeight(),"number"==typeof n||o?setTimeout((function(){return e.textarea&&c(e.textarea)})):this.textarea&&c(this.textarea),this.textarea&&this.textarea.addEventListener(d,this.onResize)},t.prototype.componentWillUnmount=function(){this.textarea&&(this.textarea.removeEventListener(d,this.onResize),c.destroy(this.textarea))},t.prototype.render=function(){var e=this,t=this.props,n=(t.onResize,t.maxRows),o=(t.onChange,t.style),s=(t.innerRef,t.children),l=i(t,["onResize","maxRows","onChange","style","innerRef","children"]),c=this.state.lineHeight,u=n&&c?c*n:null;return a.createElement("textarea",r({},l,{onChange:this.onChange,style:u?r({},o,{maxHeight:u}):o,ref:function(t){e.textarea=t,"function"==typeof e.props.innerRef?e.props.innerRef(t):e.props.innerRef&&(e.props.innerRef.current=t)}}),s)},t.prototype.componentDidUpdate=function(){this.textarea&&c.update(this.textarea)},t.defaultProps={rows:1,async:!1},t.propTypes={rows:l.number,maxRows:l.number,onResize:l.func,innerRef:l.any,async:l.bool},t}(a.Component);t.TextareaAutosize=a.forwardRef((function(e,t){return a.createElement(p,r({},e,{innerRef:t}))}))},773:(e,t,n)=>{"use strict";var o=n(5438);t.Z=o.TextareaAutosize},4793:e=>{var t={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",Ấ:"A",Ắ:"A",Ẳ:"A",Ẵ:"A",Ặ:"A",Æ:"AE",Ầ:"A",Ằ:"A",Ȃ:"A",Ç:"C",Ḉ:"C",È:"E",É:"E",Ê:"E",Ë:"E",Ế:"E",Ḗ:"E",Ề:"E",Ḕ:"E",Ḝ:"E",Ȇ:"E",Ì:"I",Í:"I",Î:"I",Ï:"I",Ḯ:"I",Ȋ:"I",Ð:"D",Ñ:"N",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",Ố:"O",Ṍ:"O",Ṓ:"O",Ȏ:"O",Ù:"U",Ú:"U",Û:"U",Ü:"U",Ý:"Y",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",ấ:"a",ắ:"a",ẳ:"a",ẵ:"a",ặ:"a",æ:"ae",ầ:"a",ằ:"a",ȃ:"a",ç:"c",ḉ:"c",è:"e",é:"e",ê:"e",ë:"e",ế:"e",ḗ:"e",ề:"e",ḕ:"e",ḝ:"e",ȇ:"e",ì:"i",í:"i",î:"i",ï:"i",ḯ:"i",ȋ:"i",ð:"d",ñ:"n",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",ố:"o",ṍ:"o",ṓ:"o",ȏ:"o",ù:"u",ú:"u",û:"u",ü:"u",ý:"y",ÿ:"y",Ā:"A",ā:"a",Ă:"A",ă:"a",Ą:"A",ą:"a",Ć:"C",ć:"c",Ĉ:"C",ĉ:"c",Ċ:"C",ċ:"c",Č:"C",č:"c",C̆:"C",c̆:"c",Ď:"D",ď:"d",Đ:"D",đ:"d",Ē:"E",ē:"e",Ĕ:"E",ĕ:"e",Ė:"E",ė:"e",Ę:"E",ę:"e",Ě:"E",ě:"e",Ĝ:"G",Ǵ:"G",ĝ:"g",ǵ:"g",Ğ:"G",ğ:"g",Ġ:"G",ġ:"g",Ģ:"G",ģ:"g",Ĥ:"H",ĥ:"h",Ħ:"H",ħ:"h",Ḫ:"H",ḫ:"h",Ĩ:"I",ĩ:"i",Ī:"I",ī:"i",Ĭ:"I",ĭ:"i",Į:"I",į:"i",İ:"I",ı:"i",IJ:"IJ",ij:"ij",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",Ḱ:"K",ḱ:"k",K̆:"K",k̆:"k",Ĺ:"L",ĺ:"l",Ļ:"L",ļ:"l",Ľ:"L",ľ:"l",Ŀ:"L",ŀ:"l",Ł:"l",ł:"l",Ḿ:"M",ḿ:"m",M̆:"M",m̆:"m",Ń:"N",ń:"n",Ņ:"N",ņ:"n",Ň:"N",ň:"n",ʼn:"n",N̆:"N",n̆:"n",Ō:"O",ō:"o",Ŏ:"O",ŏ:"o",Ő:"O",ő:"o",Œ:"OE",œ:"oe",P̆:"P",p̆:"p",Ŕ:"R",ŕ:"r",Ŗ:"R",ŗ:"r",Ř:"R",ř:"r",R̆:"R",r̆:"r",Ȓ:"R",ȓ:"r",Ś:"S",ś:"s",Ŝ:"S",ŝ:"s",Ş:"S",Ș:"S",ș:"s",ş:"s",Š:"S",š:"s",ß:"ss",Ţ:"T",ţ:"t",ț:"t",Ț:"T",Ť:"T",ť:"t",Ŧ:"T",ŧ:"t",T̆:"T",t̆:"t",Ũ:"U",ũ:"u",Ū:"U",ū:"u",Ŭ:"U",ŭ:"u",Ů:"U",ů:"u",Ű:"U",ű:"u",Ų:"U",ų:"u",Ȗ:"U",ȗ:"u",V̆:"V",v̆:"v",Ŵ:"W",ŵ:"w",Ẃ:"W",ẃ:"w",X̆:"X",x̆:"x",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Y̆:"Y",y̆:"y",Ź:"Z",ź:"z",Ż:"Z",ż:"z",Ž:"Z",ž:"z",ſ:"s",ƒ:"f",Ơ:"O",ơ:"o",Ư:"U",ư:"u",Ǎ:"A",ǎ:"a",Ǐ:"I",ǐ:"i",Ǒ:"O",ǒ:"o",Ǔ:"U",ǔ:"u",Ǖ:"U",ǖ:"u",Ǘ:"U",ǘ:"u",Ǚ:"U",ǚ:"u",Ǜ:"U",ǜ:"u",Ứ:"U",ứ:"u",Ṹ:"U",ṹ:"u",Ǻ:"A",ǻ:"a",Ǽ:"AE",ǽ:"ae",Ǿ:"O",ǿ:"o",Þ:"TH",þ:"th",Ṕ:"P",ṕ:"p",Ṥ:"S",ṥ:"s",X́:"X",x́:"x",Ѓ:"Г",ѓ:"г",Ќ:"К",ќ:"к",A̋:"A",a̋:"a",E̋:"E",e̋:"e",I̋:"I",i̋:"i",Ǹ:"N",ǹ:"n",Ồ:"O",ồ:"o",Ṑ:"O",ṑ:"o",Ừ:"U",ừ:"u",Ẁ:"W",ẁ:"w",Ỳ:"Y",ỳ:"y",Ȁ:"A",ȁ:"a",Ȅ:"E",ȅ:"e",Ȉ:"I",ȉ:"i",Ȍ:"O",ȍ:"o",Ȑ:"R",ȑ:"r",Ȕ:"U",ȕ:"u",B̌:"B",b̌:"b",Č̣:"C",č̣:"c",Ê̌:"E",ê̌:"e",F̌:"F",f̌:"f",Ǧ:"G",ǧ:"g",Ȟ:"H",ȟ:"h",J̌:"J",ǰ:"j",Ǩ:"K",ǩ:"k",M̌:"M",m̌:"m",P̌:"P",p̌:"p",Q̌:"Q",q̌:"q",Ř̩:"R",ř̩:"r",Ṧ:"S",ṧ:"s",V̌:"V",v̌:"v",W̌:"W",w̌:"w",X̌:"X",x̌:"x",Y̌:"Y",y̌:"y",A̧:"A",a̧:"a",B̧:"B",b̧:"b",Ḑ:"D",ḑ:"d",Ȩ:"E",ȩ:"e",Ɛ̧:"E",ɛ̧:"e",Ḩ:"H",ḩ:"h",I̧:"I",i̧:"i",Ɨ̧:"I",ɨ̧:"i",M̧:"M",m̧:"m",O̧:"O",o̧:"o",Q̧:"Q",q̧:"q",U̧:"U",u̧:"u",X̧:"X",x̧:"x",Z̧:"Z",z̧:"z",й:"и",Й:"И",ё:"е",Ё:"Е"},n=Object.keys(t).join("|"),o=new RegExp(n,"g"),s=new RegExp(n,"");function r(e){return t[e]}var i=function(e){return e.replace(o,r)};e.exports=i,e.exports.has=function(e){return!!e.match(s)},e.exports.remove=i},9196:e=>{"use strict";e.exports=window.React}},t={};function n(o){var s=t[o];if(void 0!==s)return s.exports;var r=t[o]={exports:{}};return e[o].call(r.exports,r,r.exports,n),r.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};(()=>{"use strict";n.r(o),n.d(o,{AlignmentToolbar:()=>aa,Autocomplete:()=>ia,AutosaveMonitor:()=>so,BlockAlignmentToolbar:()=>la,BlockControls:()=>ca,BlockEdit:()=>ua,BlockEditorKeyboardShortcuts:()=>da,BlockFormatControls:()=>pa,BlockIcon:()=>ma,BlockInspector:()=>ha,BlockList:()=>ga,BlockMover:()=>_a,BlockNavigationDropdown:()=>fa,BlockSelectionClearer:()=>va,BlockSettingsMenu:()=>ya,BlockTitle:()=>ba,BlockToolbar:()=>Ea,CharacterCount:()=>Li,ColorPalette:()=>Sa,ContrastChecker:()=>wa,CopyHandler:()=>ka,DefaultBlockAppender:()=>Pa,DocumentOutline:()=>_o,DocumentOutlineCheck:()=>fo,EditorHistoryRedo:()=>To,EditorHistoryUndo:()=>xo,EditorKeyboardShortcutsRegister:()=>wo,EditorNotices:()=>Io,EditorProvider:()=>ea,EditorSnackbars:()=>No,EntitiesSavedStates:()=>Mo,ErrorBoundary:()=>jo,FontSizePicker:()=>Ca,InnerBlocks:()=>xa,Inserter:()=>Ta,InspectorAdvancedControls:()=>Ba,InspectorControls:()=>Ia,LocalAutosaveMonitor:()=>Yo,MediaPlaceholder:()=>Oa,MediaUpload:()=>Ua,MediaUploadCheck:()=>Fa,MultiSelectScrollIntoView:()=>Ma,NavigableToolbar:()=>Ha,ObserveTyping:()=>za,PageAttributesCheck:()=>qo,PageAttributesOrder:()=>Zo,PageAttributesParent:()=>as,PageTemplate:()=>ls,PanelColorSettings:()=>Na,PlainText:()=>Aa,PostAuthor:()=>ps,PostAuthorCheck:()=>ms,PostComments:()=>hs,PostExcerpt:()=>gs,PostExcerptCheck:()=>_s,PostFeaturedImage:()=>Cs,PostFeaturedImageCheck:()=>ys,PostFormat:()=>Bs,PostFormatCheck:()=>Ts,PostLastRevision:()=>As,PostLastRevisionCheck:()=>Ns,PostLockedModal:()=>Ds,PostPendingStatus:()=>Ls,PostPendingStatusCheck:()=>Rs,PostPingbacks:()=>Os,PostPreviewButton:()=>Fs,PostPublishButton:()=>Vs,PostPublishButtonLabel:()=>Ms,PostPublishPanel:()=>Xr,PostSavedState:()=>ni,PostSchedule:()=>pr,PostScheduleCheck:()=>oi,PostScheduleLabel:()=>mr,PostSlug:()=>ii,PostSlugCheck:()=>si,PostSticky:()=>li,PostStickyCheck:()=>ai,PostSwitchToDraftButton:()=>ci,PostSyncStatus:()=>mi,PostSyncStatusModal:()=>hi,PostTaxonomies:()=>_i,PostTaxonomiesCheck:()=>fi,PostTaxonomiesFlatTermSelector:()=>Cr,PostTaxonomiesHierarchicalTermSelector:()=>Ur,PostTextEditor:()=>yi,PostTitle:()=>Si,PostTrash:()=>wi,PostTrashCheck:()=>ki,PostTypeSupportCheck:()=>Qo,PostURL:()=>Pi,PostURLCheck:()=>Ci,PostURLLabel:()=>Ti,PostVisibility:()=>Gs,PostVisibilityCheck:()=>Bi,PostVisibilityLabel:()=>Ys,RichText:()=>ra,RichTextShortcut:()=>Da,RichTextToolbarButton:()=>Ra,ServerSideRender:()=>na(),SkipToSelectedBlock:()=>Va,TableOfContents:()=>Ui,TextEditorGlobalKeyboardShortcuts:()=>Eo,ThemeSupportCheck:()=>vs,TimeToRead:()=>Ri,URLInput:()=>Wa,URLInputButton:()=>ja,URLPopover:()=>$a,UnsavedChangesWarning:()=>Fi,VisualEditorGlobalKeyboardShortcuts:()=>bo,Warning:()=>Ga,WordCount:()=>Ai,WritingFlow:()=>Ka,__unstableRichTextInputEvent:()=>La,cleanForSlug:()=>ol,createCustomColorsHOC:()=>Ya,getColorClassName:()=>qa,getColorObjectByAttributeValues:()=>Qa,getColorObjectByColorValue:()=>Xa,getFontSize:()=>Za,getFontSizeClass:()=>Ja,getTemplatePartIcon:()=>L,mediaUpload:()=>Yi,privateApis:()=>sl,store:()=>Jn,storeConfig:()=>Zn,transformStyles:()=>u.transformStyles,useEntitiesSavedStatesIsDirty:()=>Oo,usePostScheduleLabel:()=>hr,usePostURLLabel:()=>xi,usePostVisibilityLabel:()=>qs,userAutocompleter:()=>no,withColorContext:()=>el,withColors:()=>tl,withFontSizes:()=>nl});var e={};n.r(e),n.d(e,{__experimentalGetDefaultTemplatePartAreas:()=>zt,__experimentalGetDefaultTemplateType:()=>Vt,__experimentalGetDefaultTemplateTypes:()=>Ht,__experimentalGetTemplateInfo:()=>Wt,__unstableIsEditorReady:()=>Fe,canInsertBlockType:()=>Ot,canUserUseUnfilteredHTML:()=>Ae,didPostSaveRequestFail:()=>ge,didPostSaveRequestSucceed:()=>he,getActivePostLock:()=>Ne,getAdjacentBlockClientId:()=>at,getAutosaveAttribute:()=>ee,getBlock:()=>Ge,getBlockAttributes:()=>$e,getBlockCount:()=>Ze,getBlockHierarchyRootClientId:()=>it,getBlockIndex:()=>Et,getBlockInsertionPoint:()=>Nt,getBlockListSettings:()=>Mt,getBlockMode:()=>xt,getBlockName:()=>We,getBlockOrder:()=>bt,getBlockRootClientId:()=>rt,getBlockSelectionEnd:()=>et,getBlockSelectionStart:()=>Je,getBlocks:()=>Ke,getBlocksByClientId:()=>Xe,getClientIdsOfDescendants:()=>Ye,getClientIdsWithDescendants:()=>qe,getCurrentPost:()=>$,getCurrentPostAttribute:()=>X,getCurrentPostId:()=>K,getCurrentPostLastRevisionId:()=>q,getCurrentPostRevisionsCount:()=>Y,getCurrentPostType:()=>G,getEditedPostAttribute:()=>J,getEditedPostContent:()=>be,getEditedPostPreviewLink:()=>ve,getEditedPostSlug:()=>ke,getEditedPostVisibility:()=>te,getEditorBlocks:()=>Re,getEditorSelection:()=>Ue,getEditorSelectionEnd:()=>Oe,getEditorSelectionStart:()=>Le,getEditorSettings:()=>Me,getFirstMultiSelectedBlockClientId:()=>mt,getGlobalBlockCount:()=>Qe,getInserterItems:()=>Ut,getLastMultiSelectedBlockClientId:()=>ht,getMultiSelectedBlockClientIds:()=>dt,getMultiSelectedBlocks:()=>pt,getMultiSelectedBlocksEndClientId:()=>yt,getMultiSelectedBlocksStartClientId:()=>vt,getNextBlockClientId:()=>ct,getPermalink:()=>we,getPermalinkParts:()=>Pe,getPostEdits:()=>Q,getPostLockUser:()=>Ie,getPostTypeLabel:()=>jt,getPreviousBlockClientId:()=>lt,getSelectedBlock:()=>st,getSelectedBlockClientId:()=>ot,getSelectedBlockCount:()=>tt,getSelectedBlocksInitialCaretPosition:()=>ut,getStateBeforeOptimisticTransaction:()=>He,getSuggestedPostFormat:()=>ye,getTemplate:()=>Rt,getTemplateLock:()=>Lt,hasChangedContent:()=>z,hasEditorRedo:()=>M,hasEditorUndo:()=>F,hasInserterItems:()=>Ft,hasMultiSelection:()=>Pt,hasNonPostEntityChanges:()=>W,hasSelectedBlock:()=>nt,hasSelectedInnerBlock:()=>wt,inSomeHistory:()=>ze,isAncestorMultiSelected:()=>ft,isAutosavingPost:()=>_e,isBlockInsertionPointVisible:()=>At,isBlockMultiSelected:()=>_t,isBlockSelected:()=>St,isBlockValid:()=>je,isBlockWithinSelection:()=>kt,isCaretWithinFormattedText:()=>It,isCleanNewPost:()=>j,isCurrentPostPending:()=>ne,isCurrentPostPublished:()=>oe,isCurrentPostScheduled:()=>se,isDeletingPost:()=>de,isEditedPostAutosaveable:()=>le,isEditedPostBeingScheduled:()=>ce,isEditedPostDateFloating:()=>ue,isEditedPostDirty:()=>V,isEditedPostEmpty:()=>ae,isEditedPostNew:()=>H,isEditedPostPublishable:()=>re,isEditedPostSaveable:()=>ie,isFirstMultiSelectedBlock:()=>gt,isMultiSelecting:()=>Ct,isPermalinkEditable:()=>Se,isPostAutosavingLocked:()=>xe,isPostLockTakeover:()=>Be,isPostLocked:()=>Ce,isPostSavingLocked:()=>Te,isPreviewingPost:()=>fe,isPublishSidebarEnabled:()=>De,isPublishingPost:()=>Ee,isSavingNonPostEntityChanges:()=>me,isSavingPost:()=>pe,isSelectionEnabled:()=>Tt,isTyping:()=>Bt,isValidTemplate:()=>Dt});var t={};n.r(t),n.d(t,{__experimentalTearDownEditor:()=>Zt,autosave:()=>an,clearSelectedBlock:()=>Bn,createUndoLevel:()=>un,disablePublishSidebar:()=>mn,editPost:()=>nn,enablePublishSidebar:()=>pn,enterFormattedText:()=>Yn,exitFormattedText:()=>qn,hideInsertionPoint:()=>Mn,insertBlock:()=>On,insertBlocks:()=>Un,insertDefaultBlock:()=>Qn,lockPostAutosaving:()=>_n,lockPostSaving:()=>hn,mergeBlocks:()=>Vn,moveBlockToPosition:()=>Ln,moveBlocksDown:()=>Dn,moveBlocksUp:()=>Rn,multiSelect:()=>xn,receiveBlocks:()=>Sn,redo:()=>ln,refreshPost:()=>sn,removeBlock:()=>jn,removeBlocks:()=>Wn,replaceBlock:()=>An,replaceBlocks:()=>Nn,resetBlocks:()=>En,resetEditorBlocks:()=>vn,resetPost:()=>Jt,savePost:()=>on,selectBlock:()=>Pn,setTemplateValidity:()=>Hn,setupEditor:()=>Xt,setupEditorState:()=>tn,showInsertionPoint:()=>Fn,startMultiSelect:()=>Cn,startTyping:()=>Gn,stopMultiSelect:()=>Tn,stopTyping:()=>Kn,synchronizeTemplate:()=>zn,toggleBlockMode:()=>$n,toggleSelection:()=>In,trashPost:()=>rn,undo:()=>cn,unlockPostAutosaving:()=>fn,unlockPostSaving:()=>gn,updateBlock:()=>wn,updateBlockAttributes:()=>kn,updateBlockListSettings:()=>Xn,updateEditorSettings:()=>yn,updatePost:()=>en,updatePostLock:()=>dn});const s=window.wp.element,r=window.wp.blocks,i=window.wp.data,a=window.wp.coreData,l=window.wp.compose,c=window.wp.hooks,u=window.wp.blockEditor,d={...u.SETTINGS_DEFAULTS,richEditingEnabled:!0,codeEditingEnabled:!0,enableCustomFields:void 0};function p(e){return e&&"object"==typeof e&&"raw"in e?e.raw:e}const m=(0,i.combineReducers)({postId:function(e=null,t){return"SETUP_EDITOR_STATE"===t.type?t.post.id:e},postType:function(e=null,t){return"SETUP_EDITOR_STATE"===t.type?t.post.type:e},saving:function(e={},t){switch(t.type){case"REQUEST_POST_UPDATE_START":case"REQUEST_POST_UPDATE_FINISH":return{pending:"REQUEST_POST_UPDATE_START"===t.type,options:t.options||{}}}return e},deleting:function(e={},t){switch(t.type){case"REQUEST_POST_DELETE_START":case"REQUEST_POST_DELETE_FINISH":return{pending:"REQUEST_POST_DELETE_START"===t.type}}return e},postLock:function(e={isLocked:!1},t){return"UPDATE_POST_LOCK"===t.type?t.lock:e},template:function(e={isValid:!0},t){return"SET_TEMPLATE_VALIDITY"===t.type?{...e,isValid:t.isValid}:e},postSavingLock:function(e={},t){switch(t.type){case"LOCK_POST_SAVING":return{...e,[t.lockName]:!0};case"UNLOCK_POST_SAVING":{const{[t.lockName]:n,...o}=e;return o}}return e},isReady:function(e=!1,t){switch(t.type){case"SETUP_EDITOR_STATE":return!0;case"TEAR_DOWN_EDITOR":return!1}return e},editorSettings:function(e=d,t){return"UPDATE_EDITOR_SETTINGS"===t.type?{...e,...t.settings}:e},postAutosavingLock:function(e={},t){switch(t.type){case"LOCK_POST_AUTOSAVING":return{...e,[t.lockName]:!0};case"UNLOCK_POST_AUTOSAVING":{const{[t.lockName]:n,...o}=e;return o}}return e}});var h={};function g(e){return[e]}function _(e,t,n){var o;if(e.length!==t.length)return!1;for(o=n;o<e.length;o++)if(e[o]!==t[o])return!1;return!0}function f(e,t){var n,o=t||g;function s(){n=new WeakMap}function r(){var t,s,r,i,a,l=arguments.length;for(i=new Array(l),r=0;r<l;r++)i[r]=arguments[r];for(t=function(e){var t,o,s,r,i,a=n,l=!0;for(t=0;t<e.length;t++){if(!(i=o=e[t])||"object"!=typeof i){l=!1;break}a.has(o)?a=a.get(o):(s=new WeakMap,a.set(o,s),a=s)}return a.has(h)||((r=function(){var e={clear:function(){e.head=null}};return e}()).isUniqueByDependants=l,a.set(h,r)),a.get(h)}(a=o.apply(null,i)),t.isUniqueByDependants||(t.lastDependants&&!_(a,t.lastDependants,0)&&t.clear(),t.lastDependants=a),s=t.head;s;){if(_(s.args,i,1))return s!==t.head&&(s.prev.next=s.next,s.next&&(s.next.prev=s.prev),s.next=t.head,s.prev=null,t.head.prev=s,t.head=s),s.val;s=s.next}return s={val:e.apply(null,i)},i[0]=null,s.args=i,t.head&&(t.head.prev=s,s.next=t.head),t.head=s,s.val}return r.getDependants=o,r.clear=s,s(),r}const v=window.wp.date,y=window.wp.url,b=window.wp.deprecated;var E=n.n(b);const S=window.wp.primitives,w=(0,s.createElement)(S.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(S.Path,{d:"M18 5.5H6a.5.5 0 00-.5.5v3h13V6a.5.5 0 00-.5-.5zm.5 5H10v8h8a.5.5 0 00.5-.5v-7.5zm-10 0h-3V18a.5.5 0 00.5.5h2.5v-8zM6 4h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2V6a2 2 0 012-2z"})),k=window.wp.preferences,P=new Set(["meta"]),C="SAVE_POST_NOTICE_ID",T="TRASH_POST_NOTICE_ID",x=/%(?:postname|pagename)%/,B=6e4,I=["title","excerpt","content"],N=(0,s.createElement)(S.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(S.Path,{d:"M18.5 10.5H10v8h8a.5.5 0 00.5-.5v-7.5zm-10 0h-3V18a.5.5 0 00.5.5h2.5v-8zM6 4h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2V6a2 2 0 012-2z"})),A=(0,s.createElement)(S.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(S.Path,{fillRule:"evenodd",d:"M18 5.5h-8v8h8.5V6a.5.5 0 00-.5-.5zm-9.5 8h-3V6a.5.5 0 01.5-.5h2.5v8zM6 4h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2V6a2 2 0 012-2z"})),D=(0,s.createElement)(S.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(S.Path,{d:"M18 5.5H6a.5.5 0 00-.5.5v3h13V6a.5.5 0 00-.5-.5zm.5 5H10v8h8a.5.5 0 00.5-.5v-7.5zM6 4h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2V6a2 2 0 012-2z"})),R=(0,s.createElement)(S.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(S.Path,{d:"M21.3 10.8l-5.6-5.6c-.7-.7-1.8-.7-2.5 0l-5.6 5.6c-.7.7-.7 1.8 0 2.5l5.6 5.6c.3.3.8.5 1.2.5s.9-.2 1.2-.5l5.6-5.6c.8-.7.8-1.9.1-2.5zm-17.6 1L10 5.5l-1-1-6.3 6.3c-.7.7-.7 1.8 0 2.5L9 19.5l1.1-1.1-6.3-6.3c-.2 0-.2-.2-.1-.3z"}));function L(e){return"header"===e?N:"footer"===e?A:"sidebar"===e?D:R}const O={},U=[],F=(0,i.createRegistrySelector)((e=>()=>e(a.store).hasUndo())),M=(0,i.createRegistrySelector)((e=>()=>e(a.store).hasRedo()));function H(e){return"auto-draft"===$(e).status}function z(e){return"content"in Q(e)}const V=(0,i.createRegistrySelector)((e=>t=>{const n=G(t),o=K(t);return!!e(a.store).hasEditsForEntityRecord("postType",n,o)})),W=(0,i.createRegistrySelector)((e=>t=>{const n=e(a.store).__experimentalGetDirtyEntityRecords(),{type:o,id:s}=$(t);return n.some((e=>"postType"!==e.kind||e.name!==o||e.key!==s))}));function j(e){return!V(e)&&H(e)}const $=(0,i.createRegistrySelector)((e=>t=>{const n=K(t),o=G(t),s=e(a.store).getRawEntityRecord("postType",o,n);return s||O}));function G(e){return e.postType}function K(e){return e.postId}function Y(e){var t;return null!==(t=$(e)._links?.["version-history"]?.[0]?.count)&&void 0!==t?t:0}function q(e){var t;return null!==(t=$(e)._links?.["predecessor-version"]?.[0]?.id)&&void 0!==t?t:null}const Q=(0,i.createRegistrySelector)((e=>t=>{const n=G(t),o=K(t);return e(a.store).getEntityRecordEdits("postType",n,o)||O}));function X(e,t){switch(t){case"type":return G(e);case"id":return K(e);default:const n=$(e);if(!n.hasOwnProperty(t))break;return p(n[t])}}const Z=(e,t)=>{const n=Q(e);return n.hasOwnProperty(t)?{...X(e,t),...n[t]}:X(e,t)};function J(e,t){if("content"===t)return be(e);const n=Q(e);return n.hasOwnProperty(t)?P.has(t)?Z(e,t):n[t]:X(e,t)}const ee=(0,i.createRegistrySelector)((e=>(t,n)=>{if(!I.includes(n)&&"preview_link"!==n)return;const o=G(t),s=K(t),r=e(a.store).getCurrentUser()?.id,i=e(a.store).getAutosave(o,s,r);return i?p(i[n]):void 0}));function te(e){if("private"===J(e,"status"))return"private";return J(e,"password")?"password":"public"}function ne(e){return"pending"===$(e).status}function oe(e,t){const n=t||$(e);return-1!==["publish","private"].indexOf(n.status)||"future"===n.status&&!(0,v.isInTheFuture)(new Date(Number((0,v.getDate)(n.date))-B))}function se(e){return"future"===$(e).status&&!oe(e)}function re(e){const t=$(e);return V(e)||-1===["publish","private","future"].indexOf(t.status)}function ie(e){return!pe(e)&&(!!J(e,"title")||!!J(e,"excerpt")||!ae(e)||"native"===s.Platform.OS)}function ae(e){const t=Re(e);if(t.length){if(t.length>1)return!1;const e=t[0].name;if(e!==(0,r.getDefaultBlockName)()&&e!==(0,r.getFreeformContentHandlerName)())return!1}return!be(e)}const le=(0,i.createRegistrySelector)((e=>t=>{if(!ie(t))return!1;if(xe(t))return!1;const n=G(t),o=K(t),s=e(a.store).hasFetchedAutosaves(n,o),r=e(a.store).getCurrentUser()?.id,i=e(a.store).getAutosave(n,o,r);return!!s&&(!i||(!!z(t)||["title","excerpt","meta"].some((e=>p(i[e])!==J(t,e)))))}));function ce(e){const t=J(e,"date"),n=new Date(Number((0,v.getDate)(t))-B);return(0,v.isInTheFuture)(n)}function ue(e){const t=J(e,"date"),n=J(e,"modified"),o=$(e).status;return("draft"===o||"auto-draft"===o||"pending"===o)&&(t===n||null===t)}function de(e){return!!e.deleting.pending}const pe=(0,i.createRegistrySelector)((e=>t=>{const n=G(t),o=K(t);return e(a.store).isSavingEntityRecord("postType",n,o)})),me=(0,i.createRegistrySelector)((e=>t=>{const n=e(a.store).__experimentalGetEntitiesBeingSaved(),{type:o,id:s}=$(t);return n.some((e=>"postType"!==e.kind||e.name!==o||e.key!==s))})),he=(0,i.createRegistrySelector)((e=>t=>{const n=G(t),o=K(t);return!e(a.store).getLastEntitySaveError("postType",n,o)})),ge=(0,i.createRegistrySelector)((e=>t=>{const n=G(t),o=K(t);return!!e(a.store).getLastEntitySaveError("postType",n,o)}));function _e(e){return!!pe(e)&&Boolean(e.saving.options?.isAutosave)}function fe(e){return!!pe(e)&&Boolean(e.saving.options?.isPreview)}function ve(e){if(e.saving.pending||pe(e))return;let t=ee(e,"preview_link");t&&"draft"!==$(e).status||(t=J(e,"link"),t&&(t=(0,y.addQueryArgs)(t,{preview:!0})));const n=J(e,"featured_media");return t&&n?(0,y.addQueryArgs)(t,{_thumbnail_id:n}):t}function ye(e){const t=Re(e);if(t.length>2)return null;let n;if(1===t.length&&(n=t[0].name,"core/embed"===n)){const e=t[0].attributes?.providerNameSlug;["youtube","vimeo"].includes(e)?n="core/video":["spotify","soundcloud"].includes(e)&&(n="core/audio")}switch(2===t.length&&"core/paragraph"===t[1].name&&(n=t[0].name),n){case"core/image":return"image";case"core/quote":case"core/pullquote":return"quote";case"core/gallery":return"gallery";case"core/video":return"video";case"core/audio":return"audio";default:return null}}const be=(0,i.createRegistrySelector)((e=>t=>{const n=K(t),o=G(t),s=e(a.store).getEditedEntityRecord("postType",o,n);if(s){if("function"==typeof s.content)return s.content(s);if(s.blocks)return(0,r.__unstableSerializeAndClean)(s.blocks);if(s.content)return s.content}return""}));function Ee(e){return pe(e)&&!oe(e)&&"publish"===J(e,"status")}function Se(e){const t=J(e,"permalink_template");return x.test(t)}function we(e){const t=Pe(e);if(!t)return null;const{prefix:n,postName:o,suffix:s}=t;return Se(e)?n+o+s:n}function ke(e){return J(e,"slug")||(0,y.cleanForSlug)(J(e,"title"))||K(e)}function Pe(e){const t=J(e,"permalink_template");if(!t)return null;const n=J(e,"slug")||J(e,"generated_slug"),[o,s]=t.split(x);return{prefix:o,postName:n,suffix:s}}function Ce(e){return e.postLock.isLocked}function Te(e){return Object.keys(e.postSavingLock).length>0}function xe(e){return Object.keys(e.postAutosavingLock).length>0}function Be(e){return e.postLock.isTakeover}function Ie(e){return e.postLock.user}function Ne(e){return e.postLock.activePostLock}function Ae(e){return Boolean($(e)._links?.hasOwnProperty("wp:action-unfiltered-html"))}const De=(0,i.createRegistrySelector)((e=>()=>!!e(k.store).get("core/edit-post","isPublishSidebarEnabled")));function Re(e){return J(e,"blocks")||U}function Le(e){return E()("select('core/editor').getEditorSelectionStart",{since:"5.8",alternative:"select('core/editor').getEditorSelection"}),J(e,"selection")?.selectionStart}function Oe(e){return E()("select('core/editor').getEditorSelectionStart",{since:"5.8",alternative:"select('core/editor').getEditorSelection"}),J(e,"selection")?.selectionEnd}function Ue(e){return J(e,"selection")}function Fe(e){return e.isReady}function Me(e){return e.editorSettings}function He(){return E()("select('core/editor').getStateBeforeOptimisticTransaction",{since:"5.7",hint:"No state history is kept on this store anymore"}),null}function ze(){return E()("select('core/editor').inSomeHistory",{since:"5.7",hint:"No state history is kept on this store anymore"}),!1}function Ve(e){return(0,i.createRegistrySelector)((t=>(n,...o)=>(E()("`wp.data.select( 'core/editor' )."+e+"`",{since:"5.3",alternative:"`wp.data.select( 'core/block-editor' )."+e+"`",version:"6.2"}),t(u.store)[e](...o))))}const We=Ve("getBlockName"),je=Ve("isBlockValid"),$e=Ve("getBlockAttributes"),Ge=Ve("getBlock"),Ke=Ve("getBlocks"),Ye=Ve("getClientIdsOfDescendants"),qe=Ve("getClientIdsWithDescendants"),Qe=Ve("getGlobalBlockCount"),Xe=Ve("getBlocksByClientId"),Ze=Ve("getBlockCount"),Je=Ve("getBlockSelectionStart"),et=Ve("getBlockSelectionEnd"),tt=Ve("getSelectedBlockCount"),nt=Ve("hasSelectedBlock"),ot=Ve("getSelectedBlockClientId"),st=Ve("getSelectedBlock"),rt=Ve("getBlockRootClientId"),it=Ve("getBlockHierarchyRootClientId"),at=Ve("getAdjacentBlockClientId"),lt=Ve("getPreviousBlockClientId"),ct=Ve("getNextBlockClientId"),ut=Ve("getSelectedBlocksInitialCaretPosition"),dt=Ve("getMultiSelectedBlockClientIds"),pt=Ve("getMultiSelectedBlocks"),mt=Ve("getFirstMultiSelectedBlockClientId"),ht=Ve("getLastMultiSelectedBlockClientId"),gt=Ve("isFirstMultiSelectedBlock"),_t=Ve("isBlockMultiSelected"),ft=Ve("isAncestorMultiSelected"),vt=Ve("getMultiSelectedBlocksStartClientId"),yt=Ve("getMultiSelectedBlocksEndClientId"),bt=Ve("getBlockOrder"),Et=Ve("getBlockIndex"),St=Ve("isBlockSelected"),wt=Ve("hasSelectedInnerBlock"),kt=Ve("isBlockWithinSelection"),Pt=Ve("hasMultiSelection"),Ct=Ve("isMultiSelecting"),Tt=Ve("isSelectionEnabled"),xt=Ve("getBlockMode"),Bt=Ve("isTyping"),It=Ve("isCaretWithinFormattedText"),Nt=Ve("getBlockInsertionPoint"),At=Ve("isBlockInsertionPointVisible"),Dt=Ve("isValidTemplate"),Rt=Ve("getTemplate"),Lt=Ve("getTemplateLock"),Ot=Ve("canInsertBlockType"),Ut=Ve("getInserterItems"),Ft=Ve("hasInserterItems"),Mt=Ve("getBlockListSettings");function Ht(e){return Me(e)?.defaultTemplateTypes}const zt=f((e=>{const t=Me(e)?.defaultTemplatePartAreas||[];return t?.map((e=>({...e,icon:L(e.icon)})))}),(e=>[Me(e)?.defaultTemplatePartAreas])),Vt=f(((e,t)=>{var n;const o=Ht(e);return o&&null!==(n=Object.values(o).find((e=>e.slug===t)))&&void 0!==n?n:O}),((e,t)=>[Ht(e),t]));function Wt(e,t){if(!t)return O;const{description:n,slug:o,title:s,area:r}=t,{title:i,description:a}=Vt(e,o),l="string"==typeof s?s:s?.rendered;return{title:l&&l!==o?l:i||o,description:("string"==typeof n?n:n?.raw)||a,icon:zt(e).find((e=>r===e.area))?.icon||w}}const jt=(0,i.createRegistrySelector)((e=>t=>{const n=G(t),o=e(a.store).getPostType(n);return o?.labels?.singular_name})),$t=window.wp.apiFetch;var Gt=n.n($t);const Kt=window.wp.notices;function Yt(e,t){return`wp-autosave-block-editor-post-${t?"auto-draft":e}`}function qt(e,t){window.sessionStorage.removeItem(Yt(e,t))}const Qt=window.wp.i18n;const Xt=(e,t,n)=>({dispatch:o})=>{o.setupEditorState(e);if("auto-draft"===e.status&&n){let s;s="content"in t?t.content:e.content.raw;let i=(0,r.parse)(s);i=(0,r.synchronizeBlocksWithTemplate)(i,n),o.resetEditorBlocks(i,{__unstableShouldCreateUndoLevel:!1})}t&&Object.values(t).some((([t,n])=>{var o;return n!==(null!==(o=e[t]?.raw)&&void 0!==o?o:e[t])}))&&o.editPost(t)};function Zt(){return{type:"TEAR_DOWN_EDITOR"}}function Jt(){return E()("wp.data.dispatch( 'core/editor' ).resetPost",{since:"6.0",version:"6.3",alternative:"Initialize the editor with the setupEditorState action"}),{type:"DO_NOTHING"}}function en(){return E()("wp.data.dispatch( 'core/editor' ).updatePost",{since:"5.7",alternative:"Use the core entities store instead"}),{type:"DO_NOTHING"}}function tn(e){return{type:"SETUP_EDITOR_STATE",post:e}}const nn=(e,t)=>({select:n,registry:o})=>{const{id:s,type:r}=n.getCurrentPost();o.dispatch(a.store).editEntityRecord("postType",r,s,e,t)},on=(e={})=>async({select:t,dispatch:n,registry:o})=>{if(!t.isEditedPostSaveable())return;const s=t.getEditedPostContent();e.isAutosave||n.editPost({content:s},{undoIgnore:!0});const r=t.getCurrentPost(),i={id:r.id,...o.select(a.store).getEntityRecordNonTransientEdits("postType",r.type,r.id),content:s};n({type:"REQUEST_POST_UPDATE_START",options:e}),await o.dispatch(a.store).saveEntityRecord("postType",r.type,i,e),n({type:"REQUEST_POST_UPDATE_FINISH",options:e});const l=o.select(a.store).getLastEntitySaveError("postType",r.type,r.id);if(l){const e=function(e){const{post:t,edits:n,error:o}=e;if(o&&"rest_autosave_no_changes"===o.code)return[];const s=["publish","private","future"],r=-1!==s.indexOf(t.status),i={publish:(0,Qt.__)("Publishing failed."),private:(0,Qt.__)("Publishing failed."),future:(0,Qt.__)("Scheduling failed.")};let a=r||-1===s.indexOf(n.status)?(0,Qt.__)("Updating failed."):i[n.status];return o.message&&!/<\/?[^>]*>/.test(o.message)&&(a=[a,o.message].join(" ")),[a,{id:C}]}({post:r,edits:i,error:l});e.length&&o.dispatch(Kt.store).createErrorNotice(...e)}else{const n=t.getCurrentPost(),s=function(e){var t;const{previousPost:n,post:o,postType:s}=e;if(e.options?.isAutosave)return[];if("trash"===o.status&&"trash"!==n.status)return[];const r=["publish","private","future"],i=r.includes(n.status),a=r.includes(o.status);let l,c,u=null!==(t=s?.viewable)&&void 0!==t&&t;i||a?i&&!a?(l=s.labels.item_reverted_to_draft,u=!1):l=!i&&a?{publish:s.labels.item_published,private:s.labels.item_published_privately,future:s.labels.item_scheduled}[o.status]:s.labels.item_updated:(l=(0,Qt.__)("Draft saved."),c=!0);const d=[];return u&&d.push({label:c?(0,Qt.__)("View Preview"):s.labels.view_item,url:o.link}),[l,{id:C,type:"snackbar",actions:d}]}({previousPost:r,post:n,postType:await o.resolveSelect(a.store).getPostType(n.type),options:e});s.length&&o.dispatch(Kt.store).createSuccessNotice(...s),e.isAutosave||o.dispatch(u.store).__unstableMarkLastChangeAsPersistent()}};function sn(){return E()("wp.data.dispatch( 'core/editor' ).refreshPost",{since:"6.0",version:"6.3",alternative:"Use the core entities store instead"}),{type:"DO_NOTHING"}}const rn=()=>async({select:e,dispatch:t,registry:n})=>{const o=e.getCurrentPostType(),s=await n.resolveSelect(a.store).getPostType(o);n.dispatch(Kt.store).removeNotice(T);const{rest_base:r,rest_namespace:i="wp/v2"}=s;t({type:"REQUEST_POST_DELETE_START"});try{const n=e.getCurrentPost();await Gt()({path:`/${i}/${r}/${n.id}`,method:"DELETE"}),await t.savePost()}catch(e){n.dispatch(Kt.store).createErrorNotice(...(l={error:e},[l.error.message&&"unknown_error"!==l.error.code?l.error.message:(0,Qt.__)("Trashing failed"),{id:T}]))}var l;t({type:"REQUEST_POST_DELETE_FINISH"})},an=({local:e=!1,...t}={})=>async({select:n,dispatch:o})=>{if(e){const e=n.getCurrentPost(),t=n.isEditedPostNew(),o=n.getEditedPostAttribute("title"),s=n.getEditedPostAttribute("content"),r=n.getEditedPostAttribute("excerpt");!function(e,t,n,o,s){window.sessionStorage.setItem(Yt(e,t),JSON.stringify({post_title:n,content:o,excerpt:s}))}(e.id,t,o,s,r)}else await o.savePost({isAutosave:!0,...t})},ln=()=>({registry:e})=>{e.dispatch(a.store).redo()},cn=()=>({registry:e})=>{e.dispatch(a.store).undo()};function un(){return E()("wp.data.dispatch( 'core/editor' ).createUndoLevel",{since:"6.0",version:"6.3",alternative:"Use the core entities store instead"}),{type:"DO_NOTHING"}}function dn(e){return{type:"UPDATE_POST_LOCK",lock:e}}const pn=()=>({registry:e})=>{e.dispatch(k.store).set("core/edit-post","isPublishSidebarEnabled",!0)},mn=()=>({registry:e})=>{e.dispatch(k.store).set("core/edit-post","isPublishSidebarEnabled",!1)};function hn(e){return{type:"LOCK_POST_SAVING",lockName:e}}function gn(e){return{type:"UNLOCK_POST_SAVING",lockName:e}}function _n(e){return{type:"LOCK_POST_AUTOSAVING",lockName:e}}function fn(e){return{type:"UNLOCK_POST_AUTOSAVING",lockName:e}}const vn=(e,t={})=>({select:n,dispatch:o,registry:s})=>{const{__unstableShouldCreateUndoLevel:i,selection:l}=t,c={blocks:e,selection:l};if(!1!==i){const{id:e,type:t}=n.getCurrentPost();if(s.select(a.store).getEditedEntityRecord("postType",t,e).blocks===c.blocks)return void s.dispatch(a.store).__unstableCreateUndoLevel("postType",t,e);c.content=({blocks:e=[]})=>(0,r.__unstableSerializeAndClean)(e)}o.editPost(c)};function yn(e){return{type:"UPDATE_EDITOR_SETTINGS",settings:e}}const bn=e=>(...t)=>({registry:n})=>{E()("`wp.data.dispatch( 'core/editor' )."+e+"`",{since:"5.3",alternative:"`wp.data.dispatch( 'core/block-editor' )."+e+"`",version:"6.2"}),n.dispatch(u.store)[e](...t)},En=bn("resetBlocks"),Sn=bn("receiveBlocks"),wn=bn("updateBlock"),kn=bn("updateBlockAttributes"),Pn=bn("selectBlock"),Cn=bn("startMultiSelect"),Tn=bn("stopMultiSelect"),xn=bn("multiSelect"),Bn=bn("clearSelectedBlock"),In=bn("toggleSelection"),Nn=bn("replaceBlocks"),An=bn("replaceBlock"),Dn=bn("moveBlocksDown"),Rn=bn("moveBlocksUp"),Ln=bn("moveBlockToPosition"),On=bn("insertBlock"),Un=bn("insertBlocks"),Fn=bn("showInsertionPoint"),Mn=bn("hideInsertionPoint"),Hn=bn("setTemplateValidity"),zn=bn("synchronizeTemplate"),Vn=bn("mergeBlocks"),Wn=bn("removeBlocks"),jn=bn("removeBlock"),$n=bn("toggleBlockMode"),Gn=bn("startTyping"),Kn=bn("stopTyping"),Yn=bn("enterFormattedText"),qn=bn("exitFormattedText"),Qn=bn("insertDefaultBlock"),Xn=bn("updateBlockListSettings"),Zn={reducer:m,selectors:e,actions:t},Jn=(0,i.createReduxStore)("core/editor",{...Zn});(0,i.register)(Jn);function eo(e){var t;const n=Object.fromEntries(Object.entries(null!==(t=e.attributes)&&void 0!==t?t:{}).filter((([,{source:e}])=>"meta"===e)).map((([e,{meta:t}])=>[e,t])));return Object.entries(n).length&&(e.edit=(e=>(0,l.createHigherOrderComponent)((t=>({attributes:n,setAttributes:o,...r})=>{const l=(0,i.useSelect)((e=>e(Jn).getCurrentPostType()),[]),[c,u]=(0,a.useEntityProp)("postType",l,"meta"),d=(0,s.useMemo)((()=>({...n,...Object.fromEntries(Object.entries(e).map((([e,t])=>[e,c[t]])))})),[n,c]);return(0,s.createElement)(t,{attributes:d,setAttributes:t=>{const n=Object.fromEntries(Object.entries(null!=t?t:{}).filter((([t])=>t in e)).map((([t,n])=>[e[t],n])));Object.entries(n).length&&u(n),o(t)},...r})}),"withMetaAttributeSource"))(n)(e.edit)),e}function to(e){const t=e.avatar_urls&&e.avatar_urls[24]?(0,s.createElement)("img",{className:"editor-autocompleters__user-avatar",alt:"",src:e.avatar_urls[24]}):(0,s.createElement)("span",{className:"editor-autocompleters__no-avatar"});return(0,s.createElement)(s.Fragment,null,t,(0,s.createElement)("span",{className:"editor-autocompleters__user-name"},e.name),(0,s.createElement)("span",{className:"editor-autocompleters__user-slug"},e.slug))}(0,c.addFilter)("blocks.registerBlockType","core/editor/custom-sources-backwards-compatibility/shim-attribute-source",eo),(0,i.select)(r.store).getBlockTypes().map((({name:e})=>(0,i.select)(r.store).getBlockType(e))).forEach(eo);const no={name:"users",className:"editor-autocompleters__user",triggerPrefix:"@",useItems(e){const t=(0,i.useSelect)((t=>{const{getUsers:n}=t(a.store);return n({context:"view",search:encodeURIComponent(e)})}),[e]),n=(0,s.useMemo)((()=>t?t.map((e=>({key:`user-${e.slug}`,value:e,label:to(e)}))):[]),[t]);return[n]},getOptionCompletion:e=>`@${e.slug}`};(0,c.addFilter)("editor.Autocomplete.completers","editor/autocompleters/set-default-completers",(function(e=[]){return e.push({...no}),e}));class oo extends s.Component{constructor(e){super(e),this.needsAutosave=!(!e.isDirty||!e.isAutosaveable)}componentDidMount(){this.props.disableIntervalChecks||this.setAutosaveTimer()}componentDidUpdate(e){this.props.disableIntervalChecks?this.props.editsReference!==e.editsReference&&this.props.autosave():(this.props.interval!==e.interval&&(clearTimeout(this.timerId),this.setAutosaveTimer()),this.props.isDirty&&(!this.props.isAutosaving||e.isAutosaving)?this.props.editsReference!==e.editsReference&&(this.needsAutosave=!0):this.needsAutosave=!1)}componentWillUnmount(){clearTimeout(this.timerId)}setAutosaveTimer(e=1e3*this.props.interval){this.timerId=setTimeout((()=>{this.autosaveTimerHandler()}),e)}autosaveTimerHandler(){this.props.isAutosaveable?(this.needsAutosave&&(this.needsAutosave=!1,this.props.autosave()),this.setAutosaveTimer()):this.setAutosaveTimer(1e3)}render(){return null}}const so=(0,l.compose)([(0,i.withSelect)(((e,t)=>{const{getReferenceByDistinctEdits:n}=e(a.store),{isEditedPostDirty:o,isEditedPostAutosaveable:s,isAutosavingPost:r,getEditorSettings:i}=e(Jn),{interval:l=i().autosaveInterval}=t;return{editsReference:n(),isDirty:o(),isAutosaveable:s(),isAutosaving:r(),interval:l}})),(0,i.withDispatch)(((e,t)=>({autosave(){const{autosave:n=e(Jn).autosave}=t;n()}})))])(oo),ro=window.wp.richText;var io=n(4403),ao=n.n(io);const lo=({children:e,isValid:t,level:n,href:o,onSelect:r})=>(0,s.createElement)("li",{className:ao()("document-outline__item",`is-${n.toLowerCase()}`,{"is-invalid":!t})},(0,s.createElement)("a",{href:o,className:"document-outline__button",onClick:r},(0,s.createElement)("span",{className:"document-outline__emdash","aria-hidden":"true"}),(0,s.createElement)("strong",{className:"document-outline__level"},n),(0,s.createElement)("span",{className:"document-outline__item-content"},e))),co=(0,s.createElement)("em",null,(0,Qt.__)("(Empty heading)")),uo=[(0,s.createElement)("br",{key:"incorrect-break"}),(0,s.createElement)("em",{key:"incorrect-message"},(0,Qt.__)("(Incorrect heading level)"))],po=[(0,s.createElement)("br",{key:"incorrect-break-h1"}),(0,s.createElement)("em",{key:"incorrect-message-h1"},(0,Qt.__)("(Your theme may already use a H1 for the post title)"))],mo=[(0,s.createElement)("br",{key:"incorrect-break-multiple-h1"}),(0,s.createElement)("em",{key:"incorrect-message-multiple-h1"},(0,Qt.__)("(Multiple H1 headings are not recommended)"))],ho=(e=[])=>e.flatMap(((e={})=>"core/heading"===e.name?{...e,level:e.attributes.level,isEmpty:go(e)}:ho(e.innerBlocks))),go=e=>!e.attributes.content||0===e.attributes.content.length,_o=(0,l.compose)((0,i.withSelect)((e=>{var t;const{getBlocks:n}=e(u.store),{getEditedPostAttribute:o}=e(Jn),{getPostType:s}=e(a.store),r=s(o("type"));return{title:o("title"),blocks:n(),isTitleSupported:null!==(t=r?.supports?.title)&&void 0!==t&&t}})))((({blocks:e=[],title:t,onSelect:n,isTitleSupported:o,hasOutlineItemsDisabled:r})=>{const a=ho(e),{selectBlock:l}=(0,i.useDispatch)(u.store);if(a.length<1)return null;let c=1;const d=document.querySelector(".editor-post-title__input"),p=o&&t&&d,m=a.reduce(((e,t)=>({...e,[t.level]:(e[t.level]||0)+1})),{})[1]>1;return(0,s.createElement)("div",{className:"document-outline"},(0,s.createElement)("ul",null,p&&(0,s.createElement)(lo,{level:(0,Qt.__)("Title"),isValid:!0,onSelect:n,href:`#${d.id}`,isDisabled:r},t),a.map(((e,t)=>{const o=e.level>c+1,i=!(e.isEmpty||o||!e.level||1===e.level&&(m||p));return c=e.level,(0,s.createElement)(lo,{key:t,level:`H${e.level}`,isValid:i,isDisabled:r,href:`#block-${e.clientId}`,onSelect:()=>{l(e.clientId),n?.()}},e.isEmpty?co:(0,ro.getTextContent)((0,ro.create)({html:e.attributes.content})),o&&uo,1===e.level&&m&&mo,p&&1===e.level&&!m&&po)}))))}));const fo=(0,i.withSelect)((e=>({blocks:e(u.store).getBlocks()})))((function({blocks:e,children:t}){return e.filter((e=>"core/heading"===e.name)).length<1?null:t})),vo=window.wp.keyboardShortcuts;const yo=function({resetBlocksOnSave:e}){const{resetEditorBlocks:t,savePost:n}=(0,i.useDispatch)(Jn),{isEditedPostDirty:o,getPostEdits:s,isPostSavingLocked:a}=(0,i.useSelect)(Jn);return(0,vo.useShortcut)("core/editor/save",(i=>{if(i.preventDefault(),!a()&&o()){if(e){const e=s();if(e.content&&"string"==typeof e.content){const n=(0,r.parse)(e.content);t(n)}}n()}})),null};const bo=function(){const{redo:e,undo:t}=(0,i.useDispatch)(Jn);return(0,vo.useShortcut)("core/editor/undo",(e=>{t(),e.preventDefault()})),(0,vo.useShortcut)("core/editor/redo",(t=>{e(),t.preventDefault()})),(0,s.createElement)(yo,null)};function Eo(){return(0,s.createElement)(yo,{resetBlocksOnSave:!0})}const So=window.wp.keycodes;const wo=function(){const{registerShortcut:e}=(0,i.useDispatch)(vo.store);return(0,s.useEffect)((()=>{e({name:"core/editor/save",category:"global",description:(0,Qt.__)("Save your changes."),keyCombination:{modifier:"primary",character:"s"}}),e({name:"core/editor/undo",category:"global",description:(0,Qt.__)("Undo your last changes."),keyCombination:{modifier:"primary",character:"z"}}),e({name:"core/editor/redo",category:"global",description:(0,Qt.__)("Redo your last undo."),keyCombination:{modifier:"primaryShift",character:"z"},aliases:(0,So.isAppleOS)()?[]:[{modifier:"primary",character:"y"}]})}),[e]),(0,s.createElement)(u.BlockEditorKeyboardShortcuts.Register,null)},ko=window.wp.components,Po=(0,s.createElement)(S.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.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"})),Co=(0,s.createElement)(S.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.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"}));const To=(0,s.forwardRef)((function(e,t){const n=(0,So.isAppleOS)()?So.displayShortcut.primaryShift("z"):So.displayShortcut.primary("y"),o=(0,i.useSelect)((e=>e(Jn).hasEditorRedo()),[]),{redo:r}=(0,i.useDispatch)(Jn);return(0,s.createElement)(ko.Button,{...e,ref:t,icon:(0,Qt.isRTL)()?Co:Po,label:(0,Qt.__)("Redo"),shortcut:n,"aria-disabled":!o,onClick:o?r:void 0,className:"editor-history__redo"})}));const xo=(0,s.forwardRef)((function(e,t){const n=(0,i.useSelect)((e=>e(Jn).hasEditorUndo()),[]),{undo:o}=(0,i.useDispatch)(Jn);return(0,s.createElement)(ko.Button,{...e,ref:t,icon:(0,Qt.isRTL)()?Po:Co,label:(0,Qt.__)("Undo"),shortcut:So.displayShortcut.primary("z"),"aria-disabled":!n,onClick:n?o:void 0,className:"editor-history__undo"})}));const Bo=(0,l.compose)([(0,i.withSelect)((e=>({isValid:e(u.store).isValidTemplate()}))),(0,i.withDispatch)((e=>{const{setTemplateValidity:t,synchronizeTemplate:n}=e(u.store);return{resetTemplateValidity:()=>t(!0),synchronizeTemplate:n}}))])((function({isValid:e,...t}){return e?null:(0,s.createElement)(ko.Notice,{className:"editor-template-validation-notice",isDismissible:!1,status:"warning",actions:[{label:(0,Qt.__)("Keep it as is"),onClick:t.resetTemplateValidity},{label:(0,Qt.__)("Reset the template"),onClick:()=>{window.confirm((0,Qt.__)("Resetting the template may result in loss of content, do you want to continue?"))&&t.synchronizeTemplate()}}]},(0,Qt.__)("The content of your post doesn’t match the template assigned to your post type."))}));const Io=(0,l.compose)([(0,i.withSelect)((e=>({notices:e(Kt.store).getNotices()}))),(0,i.withDispatch)((e=>({onRemove:e(Kt.store).removeNotice})))])((function({notices:e,onRemove:t}){const n=e.filter((({isDismissible:e,type:t})=>e&&"default"===t)),o=e.filter((({isDismissible:e,type:t})=>!e&&"default"===t));return(0,s.createElement)(s.Fragment,null,(0,s.createElement)(ko.NoticeList,{notices:o,className:"components-editor-notices__pinned"}),(0,s.createElement)(ko.NoticeList,{notices:n,className:"components-editor-notices__dismissible",onRemove:t},(0,s.createElement)(Bo,null)))}));function No(){const e=(0,i.useSelect)((e=>e(Kt.store).getNotices()),[]),{removeNotice:t}=(0,i.useDispatch)(Kt.store),n=e.filter((({type:e})=>"snackbar"===e));return(0,s.createElement)(ko.SnackbarList,{notices:n,className:"components-editor-notices__snackbar",onRemove:t})}const Ao=window.wp.htmlEntities;function Do({record:e,checked:t,onChange:n,closePanel:o}){const{name:r,kind:l,title:c,key:d}=e,p=(0,i.useSelect)((e=>{const{blocks:t=[]}=e(a.store).getEditedEntityRecord(l,r,d),n=e(u.store).getBlockParents(t[0]?.clientId);return n[n.length-1]}),[]),m=(0,i.useSelect)((e=>{if("postType"!==l||"wp_template"!==r)return c;const t=e(a.store).getEditedEntityRecord(l,r,d);return e(Jn).__experimentalGetTemplateInfo(t).title}),[r,l,c,d]),h=(0,i.useSelect)((e=>e(u.store).getSelectedBlockClientId()===p),[p]),g=h?(0,Qt.__)("Selected"):(0,Qt.__)("Select"),{selectBlock:_}=(0,i.useDispatch)(u.store),f=(0,s.useCallback)((()=>_(p)),[p]),v=(0,s.useCallback)((()=>{_(p),o()}),[p]);return(0,s.createElement)(ko.PanelRow,null,(0,s.createElement)(ko.CheckboxControl,{__nextHasNoMarginBottom:!0,label:(0,s.createElement)("strong",null,(0,Ao.decodeEntities)(m)||(0,Qt.__)("Untitled")),checked:t,onChange:n}),p?(0,s.createElement)(s.Fragment,null,(0,s.createElement)(ko.Button,{onClick:f,className:"entities-saved-states__find-entity",disabled:h},g),(0,s.createElement)(ko.Button,{onClick:v,className:"entities-saved-states__find-entity-small",disabled:h},g)):null)}function Ro({list:e,unselectedEntities:t,setUnselectedEntities:n,closePanel:o}){const r=e.length,l=e[0],c=(0,i.useSelect)((e=>e(a.store).getEntityConfig(l.kind,l.name)),[l.kind,l.name]),{name:u}=l;let d=c.label;"wp_template_part"===u&&(d=1===r?(0,Qt.__)("Template Part"):(0,Qt.__)("Template Parts"));const p=function(e,t){switch(e){case"site":return 1===t?(0,Qt.__)("This change will affect your whole site."):(0,Qt.__)("These changes will affect your whole site.");case"wp_template":return(0,Qt.__)("This change will affect pages and posts that use this template.");case"page":case"post":return(0,Qt.__)("The following content has been modified.")}}(u,r);return(0,s.createElement)(ko.PanelBody,{title:d,initialOpen:!0},p&&(0,s.createElement)(ko.PanelRow,null,p),e.map((e=>(0,s.createElement)(Do,{key:e.key||e.property,record:e,checked:!t.some((t=>t.kind===e.kind&&t.name===e.name&&t.key===e.key&&t.property===e.property)),onChange:t=>n(e,t),closePanel:o}))))}const Lo={title:(0,Qt.__)("Title"),description:(0,Qt.__)("Tagline"),site_logo:(0,Qt.__)("Logo"),site_icon:(0,Qt.__)("Icon"),show_on_front:(0,Qt.__)("Show on front"),page_on_front:(0,Qt.__)("Page on front"),posts_per_page:(0,Qt.__)("Maximum posts per page"),default_comment_status:(0,Qt.__)("Allow comments on new posts")},Oo=()=>{const{dirtyEntityRecords:e}=(0,i.useSelect)((e=>{const t=e(a.store).__experimentalGetDirtyEntityRecords().filter((e=>!("root"===e.kind&&"site"===e.name))),n=e(a.store).getEntityRecordEdits("root","site"),o=[];for(const e in n)o.push({kind:"root",name:"site",title:Lo[e]||e,property:e});return{dirtyEntityRecords:[...t,...o]}}),[]),[t,n]=(0,s.useState)([]);return{dirtyEntityRecords:e,isDirty:e.length-t.length>0,setUnselectedEntities:({kind:e,name:o,key:s,property:r},i)=>{n(i?t.filter((t=>t.kind!==e||t.name!==o||t.key!==s||t.property!==r)):[...t,{kind:e,name:o,key:s,property:r}])},unselectedEntities:t}},Uo=[{kind:"postType",name:"wp_navigation"}];function Fo(e){return e}function Mo({close:e}){const t=Oo();return(0,s.createElement)(Ho,{close:e,...t})}function Ho({additionalPrompt:e,close:t,onSave:n=Fo,saveEnabled:o,saveLabel:r=(0,Qt.__)("Save"),dirtyEntityRecords:c,isDirty:d,setUnselectedEntities:p,unselectedEntities:m}){const h=(0,s.useRef)(),{editEntityRecord:g,saveEditedEntityRecord:_,__experimentalSaveSpecifiedEntityEdits:f}=(0,i.useDispatch)(a.store),{__unstableMarkLastChangeAsPersistent:v}=(0,i.useDispatch)(u.store),{createSuccessNotice:y,createErrorNotice:b,removeNotice:E}=(0,i.useDispatch)(Kt.store),S=c.reduce(((e,t)=>{const{name:n}=t;return e[n]||(e[n]=[]),e[n].push(t),e}),{}),{site:w,wp_template:k,wp_template_part:P,...C}=S,T=[w,k,P,...Object.values(C)].filter(Array.isArray),x=null!=o?o:d,B=(0,s.useCallback)((()=>t()),[t]),[I,N]=(0,l.__experimentalUseDialog)({onClose:()=>B()});return(0,s.createElement)("div",{ref:I,...N,className:"entities-saved-states__panel"},(0,s.createElement)(ko.Flex,{className:"entities-saved-states__panel-header",gap:2},(0,s.createElement)(ko.FlexItem,{isBlock:!0,as:ko.Button,ref:h,variant:"primary",disabled:!x,onClick:()=>{const e="site-editor-save-success";E(e);const o=c.filter((({kind:e,name:t,key:n,property:o})=>!m.some((s=>s.kind===e&&s.name===t&&s.key===n&&s.property===o))));t(o);const s=[],r=[];o.forEach((({kind:e,name:t,key:n,property:o})=>{"root"===e&&"site"===t?s.push(o):(Uo.some((n=>n.kind===e&&n.name===t))&&g(e,t,n,{status:"publish"}),r.push(_(e,t,n)))})),s.length&&r.push(f("root","site",void 0,s)),v(),Promise.all(r).then((e=>n(e))).then((t=>{t.some((e=>void 0===e))?b((0,Qt.__)("Saving failed.")):y((0,Qt.__)("Site updated."),{type:"snackbar",id:e})})).catch((e=>b(`${(0,Qt.__)("Saving failed.")} ${e}`)))},className:"editor-entities-saved-states__save-button"},r),(0,s.createElement)(ko.FlexItem,{isBlock:!0,as:ko.Button,variant:"secondary",onClick:B},(0,Qt.__)("Cancel"))),(0,s.createElement)("div",{className:"entities-saved-states__text-prompt"},(0,s.createElement)("strong",null,(0,Qt.__)("Are you ready to save?")),e,d&&(0,s.createElement)("p",null,(0,Qt.__)("The following changes have been made to your site, templates, and content."))),T.map((e=>(0,s.createElement)(Ro,{key:e[0].name,list:e,closePanel:B,unselectedEntities:m,setUnselectedEntities:p}))))}function zo(){try{return(0,i.select)(Jn).getEditedPostContent()}catch(e){}}function Vo({text:e,children:t}){const n=(0,l.useCopyToClipboard)(e);return(0,s.createElement)(ko.Button,{variant:"secondary",ref:n},t)}class Wo extends s.Component{constructor(){super(...arguments),this.state={error:null}}componentDidCatch(e){(0,c.doAction)("editor.ErrorBoundary.errorLogged",e)}static getDerivedStateFromError(e){return{error:e}}render(){const{error:e}=this.state;if(!e)return this.props.children;const t=[(0,s.createElement)(Vo,{key:"copy-post",text:zo},(0,Qt.__)("Copy Post Text")),(0,s.createElement)(Vo,{key:"copy-error",text:e.stack},(0,Qt.__)("Copy Error"))];return(0,s.createElement)(u.Warning,{className:"editor-error-boundary",actions:t},(0,Qt.__)("The editor has encountered an unexpected error."))}}const jo=Wo,$o=window.requestIdleCallback?window.requestIdleCallback:window.requestAnimationFrame;let Go;function Ko(){const{postId:e,isEditedPostNew:t,hasRemoteAutosave:n}=(0,i.useSelect)((e=>({postId:e(Jn).getCurrentPostId(),isEditedPostNew:e(Jn).isEditedPostNew(),hasRemoteAutosave:!!e(Jn).getEditorSettings().autosave})),[]),{getEditedPostAttribute:o}=(0,i.useSelect)(Jn),{createWarningNotice:a,removeNotice:l}=(0,i.useDispatch)(Kt.store),{editPost:c,resetEditorBlocks:u}=(0,i.useDispatch)(Jn);(0,s.useEffect)((()=>{let s=function(e,t){return window.sessionStorage.getItem(Yt(e,t))}(e,t);if(!s)return;try{s=JSON.parse(s)}catch{return}const{post_title:i,content:d,excerpt:p}=s,m={title:i,content:d,excerpt:p};if(!Object.keys(m).some((e=>m[e]!==o(e))))return void qt(e,t);if(n)return;const h="wpEditorAutosaveRestore";a((0,Qt.__)("The backup of this post in your browser is different from the version below."),{id:h,actions:[{label:(0,Qt.__)("Restore the backup"),onClick(){const{content:e,...t}=m;c(t),u((0,r.parse)(m.content)),l(h)}}]})}),[t,e])}const Yo=(0,l.ifCondition)((()=>{if(void 0!==Go)return Go;try{window.sessionStorage.setItem("__wpEditorTestSessionStorage",""),window.sessionStorage.removeItem("__wpEditorTestSessionStorage"),Go=!0}catch{Go=!1}return Go}))((function(){const{autosave:e}=(0,i.useDispatch)(Jn),t=(0,s.useCallback)((()=>{$o((()=>e({local:!0})))}),[]);Ko(),function(){const{postId:e,isEditedPostNew:t,isDirty:n,isAutosaving:o,didError:r}=(0,i.useSelect)((e=>({postId:e(Jn).getCurrentPostId(),isEditedPostNew:e(Jn).isEditedPostNew(),isDirty:e(Jn).isEditedPostDirty(),isAutosaving:e(Jn).isAutosavingPost(),didError:e(Jn).didPostSaveRequestFail()})),[]),a=(0,s.useRef)(n),c=(0,s.useRef)(o);(0,s.useEffect)((()=>{!r&&(c.current&&!o||a.current&&!n)&&qt(e,t),a.current=n,c.current=o}),[n,o,r]);const u=(0,l.usePrevious)(t),d=(0,l.usePrevious)(e);(0,s.useEffect)((()=>{d===e&&u&&!t&&qt(e,!0)}),[t,e])}();const n=(0,i.useSelect)((e=>e(Jn).getEditorSettings().localAutosaveInterval),[]);return(0,s.createElement)(so,{interval:n,autosave:t})}));const qo=function({children:e}){const t=(0,i.useSelect)((e=>{const{getEditedPostAttribute:t}=e(Jn),{getPostType:n}=e(a.store),o=n(t("type"));return!!o?.supports?.["page-attributes"]}),[]);return t?e:null};const Qo=(0,i.withSelect)((e=>{const{getEditedPostAttribute:t}=e(Jn),{getPostType:n}=e(a.store);return{postType:n(t("type"))}}))((function({postType:e,children:t,supportKeys:n}){let o=!0;return e&&(o=(Array.isArray(n)?n:[n]).some((t=>!!e.supports[t]))),o?t:null})),Xo=({onUpdateOrder:e,order:t=0})=>{const[n,o]=(0,s.useState)(null),r=null===n?t:n;return(0,s.createElement)(ko.Flex,null,(0,s.createElement)(ko.FlexBlock,null,(0,s.createElement)(ko.__experimentalNumberControl,{label:(0,Qt.__)("Order"),value:r,onChange:t=>{o(t);const n=Number(t);Number.isInteger(n)&&""!==t.trim?.()&&e(Number(t))},labelPosition:"side",onBlur:()=>{o(null)}})))};const Zo=(0,l.compose)([(0,i.withSelect)((e=>({order:e(Jn).getEditedPostAttribute("menu_order")}))),(0,i.withDispatch)((e=>({onUpdateOrder(t){e(Jn).editPost({menu_order:t})}})))])((function(e){return(0,s.createElement)(Qo,{supportKeys:"page-attributes"},(0,s.createElement)(Xo,{...e}))}));var Jo=n(4793),es=n.n(Jo);function ts(e){const t=e.map((e=>({children:[],parent:null,...e})));if(t.some((({parent:e})=>null===e)))return t;const n=t.reduce(((e,t)=>{const{parent:n}=t;return e[n]||(e[n]=[]),e[n].push(t),e}),{}),o=e=>e.map((e=>{const t=n[e.id];return{...e,children:t&&t.length?o(t):[]}}));return o(n[0]||[])}const ns=e=>(0,Ao.decodeEntities)(e),os=e=>({...e,name:ns(e.name)}),ss=e=>(null!=e?e:[]).map(os);function rs(e){return e?.title?.rendered?(0,Ao.decodeEntities)(e.title.rendered):`#${e.id} (${(0,Qt.__)("no title")})`}const is=(e,t)=>{const n=es()(e||"").toLowerCase(),o=es()(t||"").toLowerCase();return n===o?0:n.startsWith(o)?n.length:1/0};const as=function(){const{editPost:e}=(0,i.useDispatch)(Jn),[t,n]=(0,s.useState)(!1),{isHierarchical:o,parentPost:r,parentPostId:c,items:u,postType:d}=(0,i.useSelect)((e=>{var n;const{getPostType:o,getEntityRecords:s,getEntityRecord:r}=e(a.store),{getCurrentPostId:i,getEditedPostAttribute:l}=e(Jn),c=l("type"),u=l("parent"),d=o(c),p=i(),m=null!==(n=d?.hierarchical)&&void 0!==n&&n,h={per_page:100,exclude:p,parent_exclude:p,orderby:"menu_order",order:"asc",_fields:"id,title,parent"};return t&&(h.search=t),{isHierarchical:m,parentPostId:u,parentPost:u?r("postType",c,u):null,items:m?s("postType",c,h):[],postType:d}}),[t]),p=d?.labels?.parent_item_colon,m=u||[],h=(0,s.useMemo)((()=>{const e=(n,o=0)=>n.map((t=>[{value:t.id,label:"— ".repeat(o)+(0,Ao.decodeEntities)(t.name),rawName:t.name},...e(t.children||[],o+1)])).sort((([e],[n])=>is(e.rawName,t)>=is(n.rawName,t)?1:-1)).flat();let n=m.map((e=>({id:e.id,parent:e.parent,name:rs(e)})));t||(n=ts(n));const o=e(n),s=o.find((e=>e.value===c));return r&&!s&&o.unshift({value:c,label:rs(r)}),o}),[m,t]);return o&&p?(0,s.createElement)(ko.ComboboxControl,{__nextHasNoMarginBottom:!0,className:"editor-page-attributes__parent",label:p,value:c,options:h,onFilterValueChange:(0,l.debounce)((e=>{n(e)}),300),onChange:t=>{e({parent:t})}}):null};const ls=function(){const{availableTemplates:e,selectedTemplate:t,isViewable:n}=(0,i.useSelect)((e=>{var t;const{getEditedPostAttribute:n,getEditorSettings:o,getCurrentPostType:s}=e(Jn),{getPostType:r}=e(a.store);return{selectedTemplate:n("template"),availableTemplates:o().availableTemplates,isViewable:null!==(t=r(s())?.viewable)&&void 0!==t&&t}}),[]),{editPost:o}=(0,i.useDispatch)(Jn);return n&&e&&Object.keys(e).length?(0,s.createElement)(ko.SelectControl,{__nextHasNoMarginBottom:!0,label:(0,Qt.__)("Template:"),value:t,onChange:e=>{o({template:e||""})},options:Object.entries(null!=e?e:{}).map((([e,t])=>({value:e,label:t})))}):null},cs={who:"authors",per_page:50,_fields:"id,name",context:"view"};const us=function(){const[e,t]=(0,s.useState)(),{authorId:n,isLoading:o,authors:r,postAuthor:c}=(0,i.useSelect)((t=>{const{getUser:n,getUsers:o,isResolving:s}=t(a.store),{getEditedPostAttribute:r}=t(Jn),i=n(r("author"),{context:"view"}),l={...cs};return e&&(l.search=e),{authorId:r("author"),postAuthor:i,authors:o(l),isLoading:s("core","getUsers",[l])}}),[e]),{editPost:u}=(0,i.useDispatch)(Jn),d=(0,s.useMemo)((()=>{const e=(null!=r?r:[]).map((e=>({value:e.id,label:(0,Ao.decodeEntities)(e.name)})));return e.findIndex((({value:e})=>c?.id===e))<0&&c?[{value:c.id,label:(0,Ao.decodeEntities)(c.name)},...e]:e}),[r,c]);return c?(0,s.createElement)(ko.ComboboxControl,{__nextHasNoMarginBottom:!0,label:(0,Qt.__)("Author"),options:d,value:n,onFilterValueChange:(0,l.debounce)((e=>{t(e)}),300),onChange:e=>{e&&u({author:e})},isLoading:o,allowReset:!1}):null};const ds=function(){const{editPost:e}=(0,i.useDispatch)(Jn),{postAuthor:t,authors:n}=(0,i.useSelect)((e=>({postAuthor:e(Jn).getEditedPostAttribute("author"),authors:e(a.store).getUsers(cs)})),[]),o=(0,s.useMemo)((()=>(null!=n?n:[]).map((e=>({value:e.id,label:(0,Ao.decodeEntities)(e.name)})))),[n]);return(0,s.createElement)(ko.SelectControl,{__nextHasNoMarginBottom:!0,className:"post-author-selector",label:(0,Qt.__)("Author"),options:o,onChange:t=>{const n=Number(t);e({author:n})},value:t})};const ps=function(){return(0,i.useSelect)((e=>{const t=e(a.store).getUsers(cs);return t?.length>=25}),[])?(0,s.createElement)(us,null):(0,s.createElement)(ds,null)};function ms({children:e}){const{hasAssignAuthorAction:t,hasAuthors:n}=(0,i.useSelect)((e=>{var t;const n=e(Jn).getCurrentPost(),o=e(a.store).getUsers(cs);return{hasAssignAuthorAction:null!==(t=n._links?.["wp:action-assign-author"])&&void 0!==t&&t,hasAuthors:o?.length>=1}}),[]);return t&&n?(0,s.createElement)(Qo,{supportKeys:"author"},e):null}const hs=(0,l.compose)([(0,i.withSelect)((e=>({commentStatus:e(Jn).getEditedPostAttribute("comment_status")}))),(0,i.withDispatch)((e=>({editPost:e(Jn).editPost})))])((function({commentStatus:e="open",...t}){return(0,s.createElement)(ko.CheckboxControl,{__nextHasNoMarginBottom:!0,label:(0,Qt.__)("Allow comments"),checked:"open"===e,onChange:()=>t.editPost({comment_status:"open"===e?"closed":"open"})})}));const gs=(0,l.compose)([(0,i.withSelect)((e=>({excerpt:e(Jn).getEditedPostAttribute("excerpt")}))),(0,i.withDispatch)((e=>({onUpdateExcerpt(t){e(Jn).editPost({excerpt:t})}})))])((function({excerpt:e,onUpdateExcerpt:t}){return(0,s.createElement)("div",{className:"editor-post-excerpt"},(0,s.createElement)(ko.TextareaControl,{__nextHasNoMarginBottom:!0,label:(0,Qt.__)("Write an excerpt (optional)"),className:"editor-post-excerpt__textarea",onChange:e=>t(e),value:e}),(0,s.createElement)(ko.ExternalLink,{href:(0,Qt.__)("https://wordpress.org/documentation/article/page-post-settings-sidebar/#excerpt")},(0,Qt.__)("Learn more about manual excerpts")))}));const _s=function(e){return(0,s.createElement)(Qo,{...e,supportKeys:"excerpt"})},fs=window.wp.blob;const vs=(0,i.withSelect)((e=>{const{getThemeSupports:t}=e(a.store),{getEditedPostAttribute:n}=e(Jn);return{postType:n("type"),themeSupports:t()}}))((function({themeSupports:e,children:t,postType:n,supportKeys:o}){return(Array.isArray(o)?o:[o]).some((t=>{var o;const s=null!==(o=e?.[t])&&void 0!==o&&o;return"post-thumbnails"===t&&Array.isArray(s)?s.includes(n):s}))?t:null}));const ys=function(e){return(0,s.createElement)(vs,{supportKeys:"post-thumbnails"},(0,s.createElement)(Qo,{...e,supportKeys:"thumbnail"}))},bs=["image"],Es=(0,Qt.__)("Featured image"),Ss=(0,Qt.__)("Set featured image"),ws=(0,s.createElement)("p",null,(0,Qt.__)("To edit the featured image, you need permission to upload media."));const ks=(0,i.withSelect)((e=>{const{getMedia:t,getPostType:n}=e(a.store),{getCurrentPostId:o,getEditedPostAttribute:s}=e(Jn),r=s("featured_media");return{media:r?t(r,{context:"view"}):null,currentPostId:o(),postType:n(s("type")),featuredImageId:r}})),Ps=(0,i.withDispatch)(((e,{noticeOperations:t},{select:n})=>{const{editPost:o}=e(Jn);return{onUpdateImage(e){o({featured_media:e.id})},onDropImage(e){n(u.store).getSettings().mediaUpload({allowedTypes:["image"],filesList:e,onFileChange([e]){o({featured_media:e.id})},onError(e){t.removeAllNotices(),t.createErrorNotice(e)}})},onRemoveImage(){o({featured_media:0})}}})),Cs=(0,l.compose)(ko.withNotices,ks,Ps,(0,ko.withFilters)("editor.PostFeaturedImage"))((function({currentPostId:e,featuredImageId:t,onUpdateImage:n,onRemoveImage:o,media:r,postType:a,noticeUI:l,noticeOperations:d}){const p=(0,s.useRef)(),[m,h]=(0,s.useState)(!1),g=(0,i.useSelect)((e=>e(u.store).getSettings().mediaUpload),[]),{mediaWidth:_,mediaHeight:f,mediaSourceUrl:v}=function(e,t){var n,o;if(!e)return{};const s=(0,c.applyFilters)("editor.PostFeaturedImage.imageSize","large",e.id,t);if(s in(null!==(n=e?.media_details?.sizes)&&void 0!==n?n:{}))return{mediaWidth:e.media_details.sizes[s].width,mediaHeight:e.media_details.sizes[s].height,mediaSourceUrl:e.media_details.sizes[s].source_url};const r=(0,c.applyFilters)("editor.PostFeaturedImage.imageSize","thumbnail",e.id,t);return r in(null!==(o=e?.media_details?.sizes)&&void 0!==o?o:{})?{mediaWidth:e.media_details.sizes[r].width,mediaHeight:e.media_details.sizes[r].height,mediaSourceUrl:e.media_details.sizes[r].source_url}:{mediaWidth:e.media_details.width,mediaHeight:e.media_details.height,mediaSourceUrl:e.source_url}}(r,e);function y(e){g({allowedTypes:["image"],filesList:e,onFileChange([e]){(0,fs.isBlobURL)(e?.url)?h(!0):(n(e),h(!1))},onError(e){d.removeAllNotices(),d.createErrorNotice(e)}})}return(0,s.createElement)(ys,null,l,(0,s.createElement)("div",{className:"editor-post-featured-image"},r&&(0,s.createElement)("div",{id:`editor-post-featured-image-${t}-describedby`,className:"hidden"},r.alt_text&&(0,Qt.sprintf)((0,Qt.__)("Current image: %s"),r.alt_text),!r.alt_text&&(0,Qt.sprintf)((0,Qt.__)("The current image has no alternative text. The file name is: %s"),r.media_details.sizes?.full?.file||r.slug)),(0,s.createElement)(u.MediaUploadCheck,{fallback:ws},(0,s.createElement)(u.MediaUpload,{title:a?.labels?.featured_image||Es,onSelect:n,unstableFeaturedImageFlow:!0,allowedTypes:bs,modalClass:"editor-post-featured-image__media-modal",render:({open:e})=>(0,s.createElement)("div",{className:"editor-post-featured-image__container"},(0,s.createElement)(ko.Button,{ref:p,className:t?"editor-post-featured-image__preview":"editor-post-featured-image__toggle",onClick:e,"aria-label":t?(0,Qt.__)("Edit or replace the image"):null,"aria-describedby":t?`editor-post-featured-image-${t}-describedby`:null},!!t&&r&&(0,s.createElement)(ko.ResponsiveWrapper,{naturalWidth:_,naturalHeight:f,isInline:!0},(0,s.createElement)("img",{src:v,alt:""})),m&&(0,s.createElement)(ko.Spinner,null),!t&&!m&&(a?.labels?.set_featured_image||Ss)),!!t&&(0,s.createElement)(ko.__experimentalHStack,{className:"editor-post-featured-image__actions"},(0,s.createElement)(ko.Button,{className:"editor-post-featured-image__action",onClick:e,"aria-hidden":"true"},(0,Qt.__)("Replace")),(0,s.createElement)(ko.Button,{className:"editor-post-featured-image__action",onClick:()=>{o(),p.current.focus()}},(0,Qt.__)("Remove"))),(0,s.createElement)(ko.DropZone,{onFilesDrop:y})),value:t}))))}));const Ts=(0,i.withSelect)((e=>({disablePostFormats:e(Jn).getEditorSettings().disablePostFormats})))((function({disablePostFormats:e,...t}){return!e&&(0,s.createElement)(Qo,{...t,supportKeys:"post-formats"})})),xs=[{id:"aside",caption:(0,Qt.__)("Aside")},{id:"audio",caption:(0,Qt.__)("Audio")},{id:"chat",caption:(0,Qt.__)("Chat")},{id:"gallery",caption:(0,Qt.__)("Gallery")},{id:"image",caption:(0,Qt.__)("Image")},{id:"link",caption:(0,Qt.__)("Link")},{id:"quote",caption:(0,Qt.__)("Quote")},{id:"standard",caption:(0,Qt.__)("Standard")},{id:"status",caption:(0,Qt.__)("Status")},{id:"video",caption:(0,Qt.__)("Video")}].sort(((e,t)=>{const n=e.caption.toUpperCase(),o=t.caption.toUpperCase();return n<o?-1:n>o?1:0}));function Bs(){const e=`post-format-selector-${(0,l.useInstanceId)(Bs)}`,{postFormat:t,suggestedFormat:n,supportedFormats:o}=(0,i.useSelect)((e=>{const{getEditedPostAttribute:t,getSuggestedPostFormat:n}=e(Jn),o=t("format"),s=e(a.store).getThemeSupports();return{postFormat:null!=o?o:"standard",suggestedFormat:n(),supportedFormats:s.formats}}),[]),r=xs.filter((e=>o?.includes(e.id)||t===e.id)),c=r.find((e=>e.id===n)),{editPost:u}=(0,i.useDispatch)(Jn),d=e=>u({format:e});return(0,s.createElement)(Ts,null,(0,s.createElement)("div",{className:"editor-post-format"},(0,s.createElement)(ko.SelectControl,{__nextHasNoMarginBottom:!0,label:(0,Qt.__)("Post Format"),value:t,onChange:e=>d(e),id:e,options:r.map((e=>({label:e.caption,value:e.id})))}),c&&c.id!==t&&(0,s.createElement)("p",{className:"editor-post-format__suggestion"},(0,s.createElement)(ko.Button,{variant:"link",onClick:()=>d(c.id)},(0,Qt.sprintf)((0,Qt.__)("Apply suggested format: %s"),c.caption)))))}const Is=(0,s.createElement)(S.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(S.Path,{d:"M5.5 12h1.75l-2.5 3-2.5-3H4a8 8 0 113.134 6.35l.907-1.194A6.5 6.5 0 105.5 12zm9.53 1.97l-2.28-2.28V8.5a.75.75 0 00-1.5 0V12a.747.747 0 00.218.529l1.282-.84-1.28.842 2.5 2.5a.75.75 0 101.06-1.061z"}));const Ns=(0,i.withSelect)((e=>{const{getCurrentPostLastRevisionId:t,getCurrentPostRevisionsCount:n}=e(Jn);return{lastRevisionId:t(),revisionsCount:n()}}))((function({lastRevisionId:e,revisionsCount:t,children:n}){return!e||t<2?null:(0,s.createElement)(Qo,{supportKeys:"revisions"},n)}));const As=(0,i.withSelect)((e=>{const{getCurrentPostLastRevisionId:t,getCurrentPostRevisionsCount:n}=e(Jn);return{lastRevisionId:t(),revisionsCount:n()}}))((function({lastRevisionId:e,revisionsCount:t}){return(0,s.createElement)(Ns,null,(0,s.createElement)(ko.Button,{href:(0,y.addQueryArgs)("revision.php",{revision:e,gutenberg:!0}),className:"editor-post-last-revision__title",icon:Is},(0,Qt.sprintf)((0,Qt._n)("%d Revision","%d Revisions",t),t)))}));function Ds(){const e="core/editor/post-locked-modal-"+(0,l.useInstanceId)(Ds),{autosave:t,updatePostLock:n}=(0,i.useDispatch)(Jn),{isLocked:o,isTakeover:r,user:u,postId:d,postLockUtils:p,activePostLock:m,postType:h,previewLink:g}=(0,i.useSelect)((e=>{const{isPostLocked:t,isPostLockTakeover:n,getPostLockUser:o,getCurrentPostId:s,getActivePostLock:r,getEditedPostAttribute:i,getEditedPostPreviewLink:l,getEditorSettings:c}=e(Jn),{getPostType:u}=e(a.store);return{isLocked:t(),isTakeover:n(),user:o(),postId:s(),postLockUtils:c().postLockUtils,activePostLock:r(),postType:u(i("type")),previewLink:l()}}),[]);if((0,s.useEffect)((()=>{function s(){if(o||!m)return;const e=new window.FormData;if(e.append("action","wp-remove-post-lock"),e.append("_wpnonce",p.unlockNonce),e.append("post_ID",d),e.append("active_post_lock",m),window.navigator.sendBeacon)window.navigator.sendBeacon(p.ajaxUrl,e);else{const t=new window.XMLHttpRequest;t.open("POST",p.ajaxUrl,!1),t.send(e)}}return(0,c.addAction)("heartbeat.send",e,(function(e){o||(e["wp-refresh-post-lock"]={lock:m,post_id:d})})),(0,c.addAction)("heartbeat.tick",e,(function(e){if(!e["wp-refresh-post-lock"])return;const o=e["wp-refresh-post-lock"];o.lock_error?(t(),n({isLocked:!0,isTakeover:!0,user:{name:o.lock_error.name,avatar:o.lock_error.avatar_src_2x}})):o.new_lock&&n({isLocked:!1,activePostLock:o.new_lock})})),window.addEventListener("beforeunload",s),()=>{(0,c.removeAction)("heartbeat.send",e),(0,c.removeAction)("heartbeat.tick",e),window.removeEventListener("beforeunload",s)}}),[]),!o)return null;const _=u.name,f=u.avatar,v=(0,y.addQueryArgs)("post.php",{"get-post-lock":"1",lockKey:!0,post:d,action:"edit",_wpnonce:p.nonce}),b=(0,y.addQueryArgs)("edit.php",{post_type:h?.slug}),E=(0,Qt.__)("Exit editor");return(0,s.createElement)(ko.Modal,{title:r?(0,Qt.__)("Someone else has taken over this post"):(0,Qt.__)("This post is already being edited"),focusOnMount:!0,shouldCloseOnClickOutside:!1,shouldCloseOnEsc:!1,isDismissible:!1,className:"editor-post-locked-modal"},(0,s.createElement)(ko.__experimentalHStack,{alignment:"top",spacing:6},!!f&&(0,s.createElement)("img",{src:f,alt:(0,Qt.__)("Avatar"),className:"editor-post-locked-modal__avatar",width:64,height:64}),(0,s.createElement)("div",null,!!r&&(0,s.createElement)("p",null,(0,s.createInterpolateElement)(_?(0,Qt.sprintf)((0,Qt.__)("<strong>%s</strong> now has editing control of this post (<PreviewLink />). Don’t worry, your changes up to this moment have been saved."),_):(0,Qt.__)("Another user now has editing control of this post (<PreviewLink />). Don’t worry, your changes up to this moment have been saved."),{strong:(0,s.createElement)("strong",null),PreviewLink:(0,s.createElement)(ko.ExternalLink,{href:g},(0,Qt.__)("preview"))})),!r&&(0,s.createElement)(s.Fragment,null,(0,s.createElement)("p",null,(0,s.createInterpolateElement)(_?(0,Qt.sprintf)((0,Qt.__)("<strong>%s</strong> is currently working on this post (<PreviewLink />), which means you cannot make changes, unless you take over."),_):(0,Qt.__)("Another user is currently working on this post (<PreviewLink />), which means you cannot make changes, unless you take over."),{strong:(0,s.createElement)("strong",null),PreviewLink:(0,s.createElement)(ko.ExternalLink,{href:g},(0,Qt.__)("preview"))})),(0,s.createElement)("p",null,(0,Qt.__)("If you take over, the other user will lose editing control to the post, but their changes will be saved."))),(0,s.createElement)(ko.__experimentalHStack,{className:"editor-post-locked-modal__buttons",justify:"flex-end"},!r&&(0,s.createElement)(ko.Button,{variant:"tertiary",href:v},(0,Qt.__)("Take over")),(0,s.createElement)(ko.Button,{variant:"primary",href:b},E)))))}const Rs=(0,l.compose)((0,i.withSelect)((e=>{var t;const{isCurrentPostPublished:n,getCurrentPostType:o,getCurrentPost:s}=e(Jn);return{hasPublishAction:null!==(t=s()._links?.["wp:action-publish"])&&void 0!==t&&t,isPublished:n(),postType:o()}})))((function({hasPublishAction:e,isPublished:t,children:n}){return t||!e?null:n}));const Ls=(0,l.compose)((0,i.withSelect)((e=>({status:e(Jn).getEditedPostAttribute("status")}))),(0,i.withDispatch)((e=>({onUpdateStatus(t){e(Jn).editPost({status:t})}}))))((function({status:e,onUpdateStatus:t}){return(0,s.createElement)(Rs,null,(0,s.createElement)(ko.CheckboxControl,{__nextHasNoMarginBottom:!0,label:(0,Qt.__)("Pending review"),checked:"pending"===e,onChange:()=>{t("pending"===e?"draft":"pending")}}))}));const Os=(0,l.compose)([(0,i.withSelect)((e=>({pingStatus:e(Jn).getEditedPostAttribute("ping_status")}))),(0,i.withDispatch)((e=>({editPost:e(Jn).editPost})))])((function({pingStatus:e="open",...t}){return(0,s.createElement)(ko.CheckboxControl,{__nextHasNoMarginBottom:!0,label:(0,Qt.__)("Allow pingbacks & trackbacks"),checked:"open"===e,onChange:()=>t.editPost({ping_status:"open"===e?"closed":"open"})})}));class Us extends s.Component{constructor(){super(...arguments),this.buttonRef=(0,s.createRef)(),this.openPreviewWindow=this.openPreviewWindow.bind(this)}componentDidUpdate(e){const{previewLink:t}=this.props;t&&!e.previewLink&&this.setPreviewWindowLink(t)}setPreviewWindowLink(e){const{previewWindow:t}=this;t&&!t.closed&&(t.location=e,this.buttonRef.current&&this.buttonRef.current.focus())}getWindowTarget(){const{postId:e}=this.props;return`wp-preview-${e}`}openPreviewWindow(e){e.preventDefault(),this.previewWindow&&!this.previewWindow.closed||(this.previewWindow=window.open("",this.getWindowTarget())),this.previewWindow.focus(),this.props.isAutosaveable&&!this.props.isPostLocked?(this.props.isDraft?this.props.savePost({isPreview:!0}):this.props.autosave({isPreview:!0}),function(e){let t=(0,s.renderToString)((0,s.createElement)("div",{className:"editor-post-preview-button__interstitial-message"},(0,s.createElement)(ko.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 96 96"},(0,s.createElement)(ko.Path,{className:"outer",d:"M48 12c19.9 0 36 16.1 36 36S67.9 84 48 84 12 67.9 12 48s16.1-36 36-36",fill:"none"}),(0,s.createElement)(ko.Path,{className:"inner",d:"M69.5 46.4c0-3.9-1.4-6.7-2.6-8.8-1.6-2.6-3.1-4.9-3.1-7.5 0-2.9 2.2-5.7 5.4-5.7h.4C63.9 19.2 56.4 16 48 16c-11.2 0-21 5.7-26.7 14.4h2.1c3.3 0 8.5-.4 8.5-.4 1.7-.1 1.9 2.4.2 2.6 0 0-1.7.2-3.7.3L40 67.5l7-20.9L42 33c-1.7-.1-3.3-.3-3.3-.3-1.7-.1-1.5-2.7.2-2.6 0 0 5.3.4 8.4.4 3.3 0 8.5-.4 8.5-.4 1.7-.1 1.9 2.4.2 2.6 0 0-1.7.2-3.7.3l11.5 34.3 3.3-10.4c1.6-4.5 2.4-7.8 2.4-10.5zM16.1 48c0 12.6 7.3 23.5 18 28.7L18.8 35c-1.7 4-2.7 8.4-2.7 13zm32.5 2.8L39 78.6c2.9.8 5.9 1.3 9 1.3 3.7 0 7.3-.6 10.6-1.8-.1-.1-.2-.3-.2-.4l-9.8-26.9zM76.2 36c0 3.2-.6 6.9-2.4 11.4L64 75.6c9.5-5.5 15.9-15.8 15.9-27.6 0-5.5-1.4-10.8-3.9-15.3.1 1 .2 2.1.2 3.3z",fill:"none"})),(0,s.createElement)("p",null,(0,Qt.__)("Generating preview…"))));t+='\n\t\t<style>\n\t\t\tbody {\n\t\t\t\tmargin: 0;\n\t\t\t}\n\t\t\t.editor-post-preview-button__interstitial-message {\n\t\t\t\tdisplay: flex;\n\t\t\t\tflex-direction: column;\n\t\t\t\talign-items: center;\n\t\t\t\tjustify-content: center;\n\t\t\t\theight: 100vh;\n\t\t\t\twidth: 100vw;\n\t\t\t}\n\t\t\t@-webkit-keyframes paint {\n\t\t\t\t0% {\n\t\t\t\t\tstroke-dashoffset: 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\t@-moz-keyframes paint {\n\t\t\t\t0% {\n\t\t\t\t\tstroke-dashoffset: 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\t@-o-keyframes paint {\n\t\t\t\t0% {\n\t\t\t\t\tstroke-dashoffset: 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\t@keyframes paint {\n\t\t\t\t0% {\n\t\t\t\t\tstroke-dashoffset: 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\t.editor-post-preview-button__interstitial-message svg {\n\t\t\t\twidth: 192px;\n\t\t\t\theight: 192px;\n\t\t\t\tstroke: #555d66;\n\t\t\t\tstroke-width: 0.75;\n\t\t\t}\n\t\t\t.editor-post-preview-button__interstitial-message svg .outer,\n\t\t\t.editor-post-preview-button__interstitial-message svg .inner {\n\t\t\t\tstroke-dasharray: 280;\n\t\t\t\tstroke-dashoffset: 280;\n\t\t\t\t-webkit-animation: paint 1.5s ease infinite alternate;\n\t\t\t\t-moz-animation: paint 1.5s ease infinite alternate;\n\t\t\t\t-o-animation: paint 1.5s ease infinite alternate;\n\t\t\t\tanimation: paint 1.5s ease infinite alternate;\n\t\t\t}\n\t\t\tp {\n\t\t\t\ttext-align: center;\n\t\t\t\tfont-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;\n\t\t\t}\n\t\t</style>\n\t',t=(0,c.applyFilters)("editor.PostPreview.interstitialMarkup",t),e.write(t),e.title=(0,Qt.__)("Generating preview…"),e.close()}(this.previewWindow.document)):this.setPreviewWindowLink(e.target.href)}render(){const{previewLink:e,currentPostLink:t,isSaveable:n,role:o}=this.props,r=e||t,i=ao()({"editor-post-preview":!this.props.className},this.props.className);return(0,s.createElement)(ko.Button,{variant:this.props.className?void 0:"tertiary",className:i,href:r,target:this.getWindowTarget(),disabled:!n,onClick:this.openPreviewWindow,ref:this.buttonRef,role:o},this.props.textContent?this.props.textContent:(0,s.createElement)(s.Fragment,null,(0,Qt._x)("Preview","imperative verb"),(0,s.createElement)(ko.VisuallyHidden,{as:"span"},(0,Qt.__)("(opens in a new tab)"))))}}const Fs=(0,l.compose)([(0,i.withSelect)(((e,{forcePreviewLink:t,forceIsAutosaveable:n})=>{var o;const{getCurrentPostId:s,getCurrentPostAttribute:r,getEditedPostAttribute:i,isEditedPostSaveable:l,isEditedPostAutosaveable:c,getEditedPostPreviewLink:u,isPostLocked:d}=e(Jn),{getPostType:p}=e(a.store),m=u(),h=p(i("type"));return{postId:s(),currentPostLink:r("link"),previewLink:void 0!==t?t:m,isSaveable:l(),isAutosaveable:n||c(),isViewable:null!==(o=h?.viewable)&&void 0!==o&&o,isDraft:-1!==["draft","auto-draft"].indexOf(i("status")),isPostLocked:d()}})),(0,i.withDispatch)((e=>({autosave:e(Jn).autosave,savePost:e(Jn).savePost}))),(0,l.ifCondition)((({isViewable:e})=>e))])(Us);const Ms=(0,l.compose)([(0,i.withSelect)(((e,{forceIsSaving:t})=>{var n;const{isCurrentPostPublished:o,isEditedPostBeingScheduled:s,isSavingPost:r,isPublishingPost:i,getCurrentPost:a,getCurrentPostType:l,isAutosavingPost:c}=e(Jn);return{isPublished:o(),isBeingScheduled:s(),isSaving:t||r(),isPublishing:i(),hasPublishAction:null!==(n=a()._links?.["wp:action-publish"])&&void 0!==n&&n,postType:l(),isAutosaving:c()}}))])((function({isPublished:e,isBeingScheduled:t,isSaving:n,isPublishing:o,hasPublishAction:s,isAutosaving:r,hasNonPostEntityChanges:i}){return o?(0,Qt.__)("Publishing…"):e&&n&&!r?(0,Qt.__)("Updating…"):t&&n&&!r?(0,Qt.__)("Scheduling…"):s?e?i?(0,Qt.__)("Update…"):(0,Qt.__)("Update"):t?i?(0,Qt.__)("Schedule…"):(0,Qt.__)("Schedule"):(0,Qt.__)("Publish"):i?(0,Qt.__)("Submit for Review…"):(0,Qt.__)("Submit for Review")})),Hs=()=>{};class zs extends s.Component{constructor(e){super(e),this.buttonNode=(0,s.createRef)(),this.createOnClick=this.createOnClick.bind(this),this.closeEntitiesSavedStates=this.closeEntitiesSavedStates.bind(this),this.state={entitiesSavedStatesCallback:!1}}componentDidMount(){this.props.focusOnMount&&(this.timeoutID=setTimeout((()=>{this.buttonNode.current.focus()}),0))}componentWillUnmount(){clearTimeout(this.timeoutID)}createOnClick(e){return(...t)=>{const{hasNonPostEntityChanges:n,setEntitiesSavedStatesCallback:o}=this.props;return n&&o?(this.setState({entitiesSavedStatesCallback:()=>e(...t)}),o((()=>this.closeEntitiesSavedStates)),Hs):e(...t)}}closeEntitiesSavedStates(e){const{postType:t,postId:n}=this.props,{entitiesSavedStatesCallback:o}=this.state;this.setState({entitiesSavedStatesCallback:!1},(()=>{e&&e.some((e=>"postType"===e.kind&&e.name===t&&e.key===n))&&o()}))}render(){const{forceIsDirty:e,forceIsSaving:t,hasPublishAction:n,isBeingScheduled:o,isOpen:r,isPostSavingLocked:i,isPublishable:a,isPublished:l,isSaveable:c,isSaving:u,isAutoSaving:d,isToggle:p,onSave:m,onStatusChange:h,onSubmit:g=Hs,onToggle:_,visibility:f,hasNonPostEntityChanges:v,isSavingNonPostEntityChanges:y}=this.props,b=(u||t||!c||i||!a&&!e)&&(!v||y),E=(l||u||t||!c||!a&&!e)&&(!v||y);let S;S=n?"private"===f?"private":o?"future":"publish":"pending";const w={"aria-disabled":b,className:"editor-post-publish-button",isBusy:!d&&u,variant:"primary",onClick:this.createOnClick((()=>{b||(g(),h(S),m())}))},k={"aria-disabled":E,"aria-expanded":r,className:"editor-post-publish-panel__toggle",isBusy:u&&l,variant:"primary",onClick:this.createOnClick((()=>{E||_()}))},P=o?(0,Qt.__)("Schedule…"):(0,Qt.__)("Publish"),C=(0,s.createElement)(Ms,{forceIsSaving:t,hasNonPostEntityChanges:v}),T=p?k:w,x=p?P:C;return(0,s.createElement)(s.Fragment,null,(0,s.createElement)(ko.Button,{ref:this.buttonNode,...T,className:ao()(T.className,"editor-post-publish-button__button",{"has-changes-dot":v})},x))}}const Vs=(0,l.compose)([(0,i.withSelect)((e=>{var t;const{isSavingPost:n,isAutosavingPost:o,isEditedPostBeingScheduled:s,getEditedPostVisibility:r,isCurrentPostPublished:i,isEditedPostSaveable:a,isEditedPostPublishable:l,isPostSavingLocked:c,getCurrentPost:u,getCurrentPostType:d,getCurrentPostId:p,hasNonPostEntityChanges:m,isSavingNonPostEntityChanges:h}=e(Jn),g=o();return{isSaving:n()||g,isAutoSaving:g,isBeingScheduled:s(),visibility:r(),isSaveable:a(),isPostSavingLocked:c(),isPublishable:l(),isPublished:i(),hasPublishAction:null!==(t=u()._links?.["wp:action-publish"])&&void 0!==t&&t,postType:d(),postId:p(),hasNonPostEntityChanges:m(),isSavingNonPostEntityChanges:h()}})),(0,i.withDispatch)((e=>{const{editPost:t,savePost:n}=e(Jn);return{onStatusChange:e=>t({status:e},{undoIgnore:!0}),onSave:n}}))])(zs),Ws=(0,s.createElement)(S.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.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"})),js=(0,s.createElement)(S.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},(0,s.createElement)(S.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"})),$s={public:{label:(0,Qt.__)("Public"),info:(0,Qt.__)("Visible to everyone.")},private:{label:(0,Qt.__)("Private"),info:(0,Qt.__)("Only visible to site admins and editors.")},password:{label:(0,Qt.__)("Password protected"),info:(0,Qt.__)("Only those with the password can view this post.")}};function Gs({onClose:e}){const t=(0,l.useInstanceId)(Gs),{status:n,visibility:o,password:r}=(0,i.useSelect)((e=>({status:e(Jn).getEditedPostAttribute("status"),visibility:e(Jn).getEditedPostVisibility(),password:e(Jn).getEditedPostAttribute("password")}))),{editPost:a,savePost:c}=(0,i.useDispatch)(Jn),[d,p]=(0,s.useState)(!!r),[m,h]=(0,s.useState)(!1);return(0,s.createElement)("div",{className:"editor-post-visibility"},(0,s.createElement)(u.__experimentalInspectorPopoverHeader,{title:(0,Qt.__)("Visibility"),help:(0,Qt.__)("Control how this post is viewed."),onClose:e}),(0,s.createElement)("fieldset",{className:"editor-post-visibility__fieldset"},(0,s.createElement)(ko.VisuallyHidden,{as:"legend"},(0,Qt.__)("Visibility")),(0,s.createElement)(Ks,{instanceId:t,value:"public",label:$s.public.label,info:$s.public.info,checked:"public"===o&&!d,onChange:()=>{a({status:"private"===o?"draft":n,password:""}),p(!1)}}),(0,s.createElement)(Ks,{instanceId:t,value:"private",label:$s.private.label,info:$s.private.info,checked:"private"===o,onChange:()=>{h(!0)}}),(0,s.createElement)(Ks,{instanceId:t,value:"password",label:$s.password.label,info:$s.password.info,checked:d,onChange:()=>{a({status:"private"===o?"draft":n,password:r||""}),p(!0)}}),d&&(0,s.createElement)("div",{className:"editor-post-visibility__password"},(0,s.createElement)(ko.VisuallyHidden,{as:"label",htmlFor:`editor-post-visibility__password-input-${t}`},(0,Qt.__)("Create password")),(0,s.createElement)("input",{className:"editor-post-visibility__password-input",id:`editor-post-visibility__password-input-${t}`,type:"text",onChange:e=>{a({password:e.target.value})},value:r,placeholder:(0,Qt.__)("Use a secure password")}))),(0,s.createElement)(ko.__experimentalConfirmDialog,{isOpen:m,onConfirm:()=>{a({status:"private",password:""}),p(!1),h(!1),c()},onCancel:()=>{h(!1)}},(0,Qt.__)("Would you like to privately publish this post now?")))}function Ks({instanceId:e,value:t,label:n,info:o,...r}){return(0,s.createElement)("div",{className:"editor-post-visibility__choice"},(0,s.createElement)("input",{type:"radio",name:`editor-post-visibility__setting-${e}`,value:t,id:`editor-post-${t}-${e}`,"aria-describedby":`editor-post-${t}-${e}-description`,className:"editor-post-visibility__radio",...r}),(0,s.createElement)("label",{htmlFor:`editor-post-${t}-${e}`,className:"editor-post-visibility__label"},n),(0,s.createElement)("p",{id:`editor-post-${t}-${e}-description`,className:"editor-post-visibility__info"},o))}function Ys(){return qs()}function qs(){const e=(0,i.useSelect)((e=>e(Jn).getEditedPostVisibility()));return $s[e]?.label}function Qs(e){return Qs="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Qs(e)}function Xs(e,t){if(t.length<e)throw new TypeError(e+" argument"+(e>1?"s":"")+" required, but only "+t.length+" present")}function Zs(e){Xs(1,arguments);var t=Object.prototype.toString.call(e);return e instanceof Date||"object"===Qs(e)&&"[object Date]"===t?new Date(e.getTime()):"number"==typeof e||"[object Number]"===t?new Date(e):("string"!=typeof e&&"[object String]"!==t||"undefined"==typeof console||(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn((new Error).stack)),new Date(NaN))}function Js(e){Xs(1,arguments);var t=Zs(e);return t.setDate(1),t.setHours(0,0,0,0),t}function er(e){Xs(1,arguments);var t=Zs(e),n=t.getMonth();return t.setFullYear(t.getFullYear(),n+1,0),t.setHours(23,59,59,999),t}Math.pow(10,8);var tr=6e4,nr=36e5;function or(e,t){var n;Xs(1,arguments);var o=function(e){if(null===e||!0===e||!1===e)return NaN;var t=Number(e);return isNaN(t)?t:t<0?Math.ceil(t):Math.floor(t)}(null!==(n=null==t?void 0:t.additionalDigits)&&void 0!==n?n:2);if(2!==o&&1!==o&&0!==o)throw new RangeError("additionalDigits must be 0, 1 or 2");if("string"!=typeof e&&"[object String]"!==Object.prototype.toString.call(e))return new Date(NaN);var s,r=function(e){var t,n={},o=e.split(sr.dateTimeDelimiter);if(o.length>2)return n;/:/.test(o[0])?t=o[0]:(n.date=o[0],t=o[1],sr.timeZoneDelimiter.test(n.date)&&(n.date=e.split(sr.timeZoneDelimiter)[0],t=e.substr(n.date.length,e.length)));if(t){var s=sr.timezone.exec(t);s?(n.time=t.replace(s[1],""),n.timezone=s[1]):n.time=t}return n}(e);if(r.date){var i=function(e,t){var n=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+t)+"})|(\\d{2}|[+-]\\d{"+(2+t)+"})$)"),o=e.match(n);if(!o)return{year:NaN,restDateString:""};var s=o[1]?parseInt(o[1]):null,r=o[2]?parseInt(o[2]):null;return{year:null===r?s:100*r,restDateString:e.slice((o[1]||o[2]).length)}}(r.date,o);s=function(e,t){if(null===t)return new Date(NaN);var n=e.match(rr);if(!n)return new Date(NaN);var o=!!n[4],s=lr(n[1]),r=lr(n[2])-1,i=lr(n[3]),a=lr(n[4]),l=lr(n[5])-1;if(o)return function(e,t,n){return t>=1&&t<=53&&n>=0&&n<=6}(0,a,l)?function(e,t,n){var o=new Date(0);o.setUTCFullYear(e,0,4);var s=o.getUTCDay()||7,r=7*(t-1)+n+1-s;return o.setUTCDate(o.getUTCDate()+r),o}(t,a,l):new Date(NaN);var c=new Date(0);return function(e,t,n){return t>=0&&t<=11&&n>=1&&n<=(ur[t]||(dr(e)?29:28))}(t,r,i)&&function(e,t){return t>=1&&t<=(dr(e)?366:365)}(t,s)?(c.setUTCFullYear(t,r,Math.max(s,i)),c):new Date(NaN)}(i.restDateString,i.year)}if(!s||isNaN(s.getTime()))return new Date(NaN);var a,l=s.getTime(),c=0;if(r.time&&(c=function(e){var t=e.match(ir);if(!t)return NaN;var n=cr(t[1]),o=cr(t[2]),s=cr(t[3]);if(!function(e,t,n){if(24===e)return 0===t&&0===n;return n>=0&&n<60&&t>=0&&t<60&&e>=0&&e<25}(n,o,s))return NaN;return n*nr+o*tr+1e3*s}(r.time),isNaN(c)))return new Date(NaN);if(!r.timezone){var u=new Date(l+c),d=new Date(0);return d.setFullYear(u.getUTCFullYear(),u.getUTCMonth(),u.getUTCDate()),d.setHours(u.getUTCHours(),u.getUTCMinutes(),u.getUTCSeconds(),u.getUTCMilliseconds()),d}return a=function(e){if("Z"===e)return 0;var t=e.match(ar);if(!t)return 0;var n="+"===t[1]?-1:1,o=parseInt(t[2]),s=t[3]&&parseInt(t[3])||0;if(!function(e,t){return t>=0&&t<=59}(0,s))return NaN;return n*(o*nr+s*tr)}(r.timezone),isNaN(a)?new Date(NaN):new Date(l+c+a)}var sr={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},rr=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,ir=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,ar=/^([+-])(\d{2})(?::?(\d{2}))?$/;function lr(e){return e?parseInt(e):1}function cr(e){return e&&parseFloat(e.replace(",","."))||0}var ur=[31,null,31,30,31,30,31,31,30,31,30,31];function dr(e){return e%400==0||e%4==0&&e%100!=0}function pr({onClose:e}){const{postDate:t,postType:n}=(0,i.useSelect)((e=>({postDate:e(Jn).getEditedPostAttribute("date"),postType:e(Jn).getCurrentPostType()})),[]),{editPost:o}=(0,i.useDispatch)(Jn),[r,l]=(0,s.useState)(Js(new Date(t))),c=(0,i.useSelect)((e=>e(a.store).getEntityRecords("postType",n,{status:"publish,future",after:Js(r).toISOString(),before:er(r).toISOString(),exclude:[e(Jn).getCurrentPostId()],per_page:100,_fields:"id,date"})),[r,n]),d=(0,s.useMemo)((()=>(c||[]).map((({date:e})=>({date:new Date(e)})))),[c]),p=(0,v.getSettings)(),m=/a(?!\\)/i.test(p.formats.time.toLowerCase().replace(/\\\\/g,"").split("").reverse().join(""));return(0,s.createElement)(u.__experimentalPublishDateTimePicker,{currentDate:t,onChange:e=>o({date:e}),is12Hour:m,events:d,onMonthPreviewed:e=>l(or(e)),onClose:e})}function mr(e){return hr(e)}function hr({full:e=!1}={}){const{date:t,isFloating:n}=(0,i.useSelect)((e=>({date:e(Jn).getEditedPostAttribute("date"),isFloating:e(Jn).isEditedPostDateFloating()})),[]);return e?gr(t):function(e,{isFloating:t=!1,now:n=new Date}={}){if(!e||t)return(0,Qt.__)("Immediately");if(!function(e){const{timezone:t}=(0,v.getSettings)(),n=Number(t.offset),o=e.getTimezoneOffset()/60*-1;return n===o}(n))return gr(e);const o=(0,v.getDate)(e);if(_r(o,n))return(0,Qt.sprintf)((0,Qt.__)("Today at %s"),(0,v.dateI18n)((0,Qt._x)("g:i a","post schedule time format"),o));const s=new Date(n);if(s.setDate(s.getDate()+1),_r(o,s))return(0,Qt.sprintf)((0,Qt.__)("Tomorrow at %s"),(0,v.dateI18n)((0,Qt._x)("g:i a","post schedule time format"),o));if(o.getFullYear()===n.getFullYear())return(0,v.dateI18n)((0,Qt._x)("F j g:i a","post schedule date format without year"),o);return(0,v.dateI18n)((0,Qt._x)("F j, Y g:i a","post schedule full date format"),o)}(t,{isFloating:n})}function gr(e){const t=(0,v.getDate)(e),n=function(){const{timezone:e}=(0,v.getSettings)();if(e.abbr&&isNaN(Number(e.abbr)))return e.abbr;return`UTC${e.offset<0?"":"+"}${e.offset}`}(),o=(0,v.dateI18n)((0,Qt._x)("F j, Y g:i a","post schedule full date format"),t);return(0,Qt.isRTL)()?`${n} ${o}`:`${o} ${n}`}function _r(e,t){return e.getDate()===t.getDate()&&e.getMonth()===t.getMonth()&&e.getFullYear()===t.getFullYear()}const fr=window.wp.a11y,vr=3,yr={per_page:10,orderby:"count",order:"desc",hide_empty:!0,_fields:"id,name,count",context:"view"};function br({onSelect:e,taxonomy:t}){const{_terms:n,showTerms:o}=(0,i.useSelect)((e=>{const n=e(a.store).getEntityRecords("taxonomy",t.slug,yr);return{_terms:n,showTerms:n?.length>=vr}}),[t.slug]);if(!o)return null;const r=ss(n);return(0,s.createElement)("div",{className:"editor-post-taxonomies__flat-term-most-used"},(0,s.createElement)(ko.BaseControl.VisualLabel,{as:"h3",className:"editor-post-taxonomies__flat-term-most-used-label"},t.labels.most_used),(0,s.createElement)("ul",{role:"list",className:"editor-post-taxonomies__flat-term-most-used-list"},r.map((t=>(0,s.createElement)("li",{key:t.id},(0,s.createElement)(ko.Button,{variant:"link",onClick:()=>e(t)},t.name))))))}const Er=[],Sr=20,wr={per_page:Sr,_fields:"id,name",context:"view"},kr=(e,t)=>ns(e).toLowerCase()===ns(t).toLowerCase(),Pr=(e,t)=>e.map((e=>t.find((t=>kr(t.name,e))).id));function Cr({slug:e}){var t,n;const[o,r]=(0,s.useState)([]),[c,u]=(0,s.useState)(""),d=(0,l.useDebounce)(u,500),{terms:p,termIds:m,taxonomy:h,hasAssignAction:g,hasCreateAction:_,hasResolvedTerms:f}=(0,i.useSelect)((t=>{var n,o;const{getCurrentPost:s,getEditedPostAttribute:r}=t(Jn),{getEntityRecords:i,getTaxonomy:l,hasFinishedResolution:c}=t(a.store),u=s(),d=l(e),p=d?r(d.rest_base):Er,m={...wr,include:p.join(","),per_page:-1};return{hasCreateAction:!!d&&(null!==(n=u._links?.["wp:action-create-"+d.rest_base])&&void 0!==n&&n),hasAssignAction:!!d&&(null!==(o=u._links?.["wp:action-assign-"+d.rest_base])&&void 0!==o&&o),taxonomy:d,termIds:p,terms:p.length?i("taxonomy",e,m):Er,hasResolvedTerms:c("getEntityRecords",["taxonomy",e,m])}}),[e]),{searchResults:v}=(0,i.useSelect)((t=>{const{getEntityRecords:n}=t(a.store);return{searchResults:c?n("taxonomy",e,{...wr,search:c}):Er}}),[c,e]);(0,s.useEffect)((()=>{if(f){const e=(null!=p?p:[]).map((e=>ns(e.name)));r(e)}}),[p,f]);const y=(0,s.useMemo)((()=>(null!=v?v:[]).map((e=>ns(e.name)))),[v]),{editPost:b}=(0,i.useDispatch)(Jn),{saveEntityRecord:E}=(0,i.useDispatch)(a.store);if(!g)return null;function S(e){b({[h.rest_base]:e})}const w=null!==(t=h?.labels?.add_new_item)&&void 0!==t?t:"post_tag"===e?(0,Qt.__)("Add new tag"):(0,Qt.__)("Add new Term"),k=null!==(n=h?.labels?.singular_name)&&void 0!==n?n:"post_tag"===e?(0,Qt.__)("Tag"):(0,Qt.__)("Term"),P=(0,Qt.sprintf)((0,Qt._x)("%s added","term"),k),C=(0,Qt.sprintf)((0,Qt._x)("%s removed","term"),k),T=(0,Qt.sprintf)((0,Qt._x)("Remove %s","term"),k);return(0,s.createElement)(s.Fragment,null,(0,s.createElement)(ko.FormTokenField,{value:o,suggestions:y,onChange:function(t){const n=[...null!=p?p:[],...null!=v?v:[]],o=t.reduce(((e,t)=>(e.some((e=>e.toLowerCase()===t.toLowerCase()))||e.push(t),e)),[]),s=o.filter((e=>!n.find((t=>kr(t.name,e)))));if(r(o),0===s.length)return S(Pr(o,n));_&&Promise.all(s.map((t=>async function(t){try{const n=await E("taxonomy",e,t,{throwOnError:!0});return os(n)}catch(e){if("term_exists"!==e.code)throw e;return{id:e.data.term_id,name:t.name}}}({name:t})))).then((e=>{const t=n.concat(e);return S(Pr(o,t))}))},onInputChange:d,maxSuggestions:Sr,label:w,messages:{added:P,removed:C,remove:T}}),(0,s.createElement)(br,{taxonomy:h,onSelect:function(t){var n;if(m.includes(t.id))return;const o=[...m,t.id],s="post_tag"===e?(0,Qt.__)("Tag"):(0,Qt.__)("Term"),r=(0,Qt.sprintf)((0,Qt._x)("%s added","term"),null!==(n=h?.labels?.singular_name)&&void 0!==n?n:s);(0,fr.speak)(r,"assertive"),S(o)}}))}const Tr=(0,ko.withFilters)("editor.PostTaxonomyType")(Cr),xr=()=>{const e=[(0,Qt.__)("Suggestion:"),(0,s.createElement)("span",{className:"editor-post-publish-panel__link",key:"label"},(0,Qt.__)("Add tags"))];return(0,s.createElement)(ko.PanelBody,{initialOpen:!1,title:e},(0,s.createElement)("p",null,(0,Qt.__)("Tags help users and search engines navigate your site and find your content. Add a few keywords to describe your post.")),(0,s.createElement)(Tr,{slug:"post_tag"}))};class Br extends s.Component{constructor(e){super(e),this.state={hadTagsWhenOpeningThePanel:e.hasTags}}render(){return this.state.hadTagsWhenOpeningThePanel?null:(0,s.createElement)(xr,null)}}const Ir=(0,l.compose)((0,i.withSelect)((e=>{const t=e(Jn).getCurrentPostType(),n=e(a.store).getTaxonomy("post_tag"),o=n&&e(Jn).getEditedPostAttribute(n.rest_base);return{areTagsFetched:void 0!==n,isPostTypeSupported:n&&n.types.some((e=>e===t)),hasTags:o&&o.length}})),(0,l.ifCondition)((({areTagsFetched:e,isPostTypeSupported:t})=>t&&e)))(Br),Nr=(e,t)=>xs.filter((t=>e?.includes(t.id))).find((e=>e.id===t)),Ar=({suggestedPostFormat:e,suggestionText:t,onUpdatePostFormat:n})=>(0,s.createElement)(ko.Button,{variant:"link",onClick:()=>n(e)},t);function Dr(){const{currentPostFormat:e,suggestion:t}=(0,i.useSelect)((e=>{var t;const{getEditedPostAttribute:n,getSuggestedPostFormat:o}=e(Jn),s=null!==(t=e(a.store).getThemeSupports().formats)&&void 0!==t?t:[];return{currentPostFormat:n("format"),suggestion:Nr(s,o())}}),[]),{editPost:n}=(0,i.useDispatch)(Jn),o=[(0,Qt.__)("Suggestion:"),(0,s.createElement)("span",{className:"editor-post-publish-panel__link",key:"label"},(0,Qt.__)("Use a post format"))];return t&&t.id!==e?(0,s.createElement)(ko.PanelBody,{initialOpen:!1,title:o},(0,s.createElement)("p",null,(0,Qt.__)("Your theme uses post formats to highlight different kinds of content, like images or videos. Apply a post format to see this special styling.")),(0,s.createElement)("p",null,(0,s.createElement)(Ar,{onUpdatePostFormat:e=>n({format:e}),suggestedPostFormat:t.id,suggestionText:(0,Qt.sprintf)((0,Qt.__)('Apply the "%1$s" format.'),t.caption)}))):null}const Rr={per_page:-1,orderby:"name",order:"asc",_fields:"id,name,parent",context:"view"},Lr=8,Or=[];function Ur({slug:e}){var t,n;const[o,r]=(0,s.useState)(!1),[c,u]=(0,s.useState)(""),[d,p]=(0,s.useState)(""),[m,h]=(0,s.useState)(!1),[g,_]=(0,s.useState)(""),[f,v]=(0,s.useState)([]),y=(0,l.useDebounce)(fr.speak,500),{hasCreateAction:b,hasAssignAction:E,terms:S,loading:w,availableTerms:k,taxonomy:P}=(0,i.useSelect)((t=>{var n,o;const{getCurrentPost:s,getEditedPostAttribute:r}=t(Jn),{getTaxonomy:i,getEntityRecords:l,isResolving:c}=t(a.store),u=i(e),d=s();return{hasCreateAction:!!u&&(null!==(n=d._links?.["wp:action-create-"+u.rest_base])&&void 0!==n&&n),hasAssignAction:!!u&&(null!==(o=d._links?.["wp:action-assign-"+u.rest_base])&&void 0!==o&&o),terms:u?r(u.rest_base):Or,loading:c("getEntityRecords",["taxonomy",e,Rr]),availableTerms:l("taxonomy",e,Rr)||Or,taxonomy:u}}),[e]),{editPost:C}=(0,i.useDispatch)(Jn),{saveEntityRecord:T}=(0,i.useDispatch)(a.store),x=(0,s.useMemo)((()=>function(e,t){const n=e=>-1!==t.indexOf(e.id)||void 0!==e.children&&e.children.map(n).filter((e=>e)).length>0,o=[...e];return o.sort(((e,t)=>{const o=n(e),s=n(t);return o===s?0:o&&!s?-1:!o&&s?1:0})),o}(ts(k),S)),[k]);if(!E)return null;const B=e=>{C({[P.rest_base]:e})},I=e=>e.map((e=>(0,s.createElement)("div",{key:e.id,className:"editor-post-taxonomies__hierarchical-terms-choice"},(0,s.createElement)(ko.CheckboxControl,{__nextHasNoMarginBottom:!0,checked:-1!==S.indexOf(e.id),onChange:()=>{(e=>{const t=S.includes(e)?S.filter((t=>t!==e)):[...S,e];B(t)})(parseInt(e.id,10))},label:(0,Ao.decodeEntities)(e.name)}),!!e.children.length&&(0,s.createElement)("div",{className:"editor-post-taxonomies__hierarchical-terms-subchoices"},I(e.children))))),N=(t,n,o)=>{var s;return null!==(s=P?.labels?.[t])&&void 0!==s?s:"category"===e?n:o},A=N("add_new_item",(0,Qt.__)("Add new category"),(0,Qt.__)("Add new term")),D=N("new_item_name",(0,Qt.__)("Add new category"),(0,Qt.__)("Add new term")),R=N("parent_item",(0,Qt.__)("Parent Category"),(0,Qt.__)("Parent Term")),L=`— ${R} —`,O=A,U=null!==(t=P?.labels?.search_items)&&void 0!==t?t:(0,Qt.__)("Search Terms"),F=null!==(n=P?.name)&&void 0!==n?n:(0,Qt.__)("Terms"),M=k.length>=Lr;return(0,s.createElement)(ko.Flex,{direction:"column",gap:"4"},M&&(0,s.createElement)(ko.TextControl,{__nextHasNoMarginBottom:!0,label:U,value:g,onChange:e=>{const t=x.map(function(e){const t=n=>{if(""===e)return n;const o={...n};return o.children.length>0&&(o.children=o.children.map(t).filter((e=>e))),(-1!==o.name.toLowerCase().indexOf(e.toLowerCase())||o.children.length>0)&&o};return t}(e)).filter((e=>e)),n=e=>{let t=0;for(let o=0;o<e.length;o++)t++,void 0!==e[o].children&&(t+=n(e[o].children));return t};_(e),v(t);const o=n(t),s=(0,Qt.sprintf)((0,Qt._n)("%d result found.","%d results found.",o),o);y(s,"assertive")}}),(0,s.createElement)("div",{className:"editor-post-taxonomies__hierarchical-terms-list",tabIndex:"0",role:"group","aria-label":F},I(""!==g?f:x)),!w&&b&&(0,s.createElement)(ko.FlexItem,null,(0,s.createElement)(ko.Button,{onClick:()=>{h(!m)},className:"editor-post-taxonomies__hierarchical-terms-add","aria-expanded":m,variant:"link"},A)),m&&(0,s.createElement)("form",{onSubmit:async t=>{var n;if(t.preventDefault(),""===c||o)return;const s=function(e,t,n){return e.find((e=>(!e.parent&&!t||parseInt(e.parent)===parseInt(t))&&e.name.toLowerCase()===n.toLowerCase()))}(k,d,c);if(s)return S.some((e=>e===s.id))||B([...S,s.id]),u(""),void p("");r(!0);const i=await(a={name:c,parent:d||void 0},T("taxonomy",e,a));var a;const l="category"===e?(0,Qt.__)("Category"):(0,Qt.__)("Term"),m=(0,Qt.sprintf)((0,Qt._x)("%s added","term"),null!==(n=P?.labels?.singular_name)&&void 0!==n?n:l);(0,fr.speak)(m,"assertive"),r(!1),u(""),p(""),B([...S,i.id])}},(0,s.createElement)(ko.Flex,{direction:"column",gap:"4"},(0,s.createElement)(ko.TextControl,{__nextHasNoMarginBottom:!0,className:"editor-post-taxonomies__hierarchical-terms-input",label:D,value:c,onChange:e=>{u(e)},required:!0}),!!k.length&&(0,s.createElement)(ko.TreeSelect,{__nextHasNoMarginBottom:!0,label:R,noOptionLabel:L,onChange:e=>{p(e)},selectedId:d,tree:x}),(0,s.createElement)(ko.FlexItem,null,(0,s.createElement)(ko.Button,{variant:"secondary",type:"submit",className:"editor-post-taxonomies__hierarchical-terms-submit"},O)))))}const Fr=(0,ko.withFilters)("editor.PostTaxonomyType")(Ur);const Mr=function(){const e=(0,i.useSelect)((e=>{const t=e(Jn).getCurrentPostType(),{canUser:n,getEntityRecord:o,getTaxonomy:s}=e(a.store),r=s("category"),i=n("read","settings")?o("root","site")?.default_category:void 0,l=i?o("taxonomy","category",i):void 0,c=r&&r.types.some((e=>e===t)),u=r&&e(Jn).getEditedPostAttribute(r.rest_base);return!!r&&!!l&&c&&(0===u?.length||1===u?.length&&l?.id===u[0])}),[]),[t,n]=(0,s.useState)(!1);if((0,s.useEffect)((()=>{e&&n(!0)}),[e]),!t)return null;const o=[(0,Qt.__)("Suggestion:"),(0,s.createElement)("span",{className:"editor-post-publish-panel__link",key:"label"},(0,Qt.__)("Assign a category"))];return(0,s.createElement)(ko.PanelBody,{initialOpen:!1,title:o},(0,s.createElement)("p",null,(0,Qt.__)("Categories provide a helpful way to group related posts together and to quickly tell readers what a post is about.")),(0,s.createElement)(Fr,{slug:"category"}))},Hr=(0,s.createElement)(S.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(S.Path,{d:"M18.5 15v3.5H13V6.7l4.5 4.1 1-1.1-6.2-5.8-5.8 5.8 1 1.1 4-4v11.7h-6V15H4v5h16v-5z"}));function zr(e){const t=[];return e.forEach((e=>{t.push(e),t.push(...zr(e.innerBlocks))})),t}function Vr(e){const{selectBlock:t}=(0,i.useDispatch)(u.store);return(0,s.createElement)(ko.__unstableMotion.img,{tabIndex:0,role:"button","aria-label":(0,Qt.__)("Select image block."),onClick:()=>{t(e.clientId)},onKeyDown:n=>{"Enter"!==n.key&&" "!==n.key||(t(e.clientId),n.preventDefault())},key:e.clientId,alt:e.attributes.alt,src:e.attributes.url,animate:{opacity:1},exit:{opacity:0,scale:0},style:{width:"36px",height:"36px",objectFit:"cover",borderRadius:"2px",cursor:"pointer"},whileHover:{scale:1.08}})}function Wr(){const[e,t]=(0,s.useState)(!1),{editorBlocks:n,mediaUpload:o}=(0,i.useSelect)((e=>({editorBlocks:e(Jn).getEditorBlocks(),mediaUpload:e(u.store).getSettings().mediaUpload})),[]),r=zr(n).filter((e=>"core/image"===e.name&&e.attributes.url&&!e.attributes.id)),{updateBlockAttributes:a}=(0,i.useDispatch)(u.store);if(!o||!r.length)return null;const l=[(0,Qt.__)("Suggestion:"),(0,s.createElement)("span",{className:"editor-post-publish-panel__link",key:"label"},(0,Qt.__)("External media"))];return(0,s.createElement)(ko.PanelBody,{initialOpen:!0,title:l},(0,s.createElement)("p",null,(0,Qt.__)("There are some external images in the post which can be uploaded to the media library. Images coming from different domains may not always display correctly, load slowly for visitors, or be removed unexpectedly.")),(0,s.createElement)("div",{style:{display:"inline-flex",flexWrap:"wrap",gap:"8px"}},(0,s.createElement)(ko.__unstableAnimatePresence,null,r.map((e=>(0,s.createElement)(Vr,{key:e.clientId,...e})))),e?(0,s.createElement)(ko.Spinner,null):(0,s.createElement)(ko.Button,{icon:Hr,variant:"primary",onClick:function(){t(!0),Promise.all(r.map((e=>window.fetch(e.attributes.url.includes("?")?e.attributes.url:e.attributes.url+"?").then((e=>e.blob())).then((t=>new Promise(((n,s)=>{o({filesList:[t],onFileChange:([t])=>{(0,fs.isBlobURL)(t.url)||(a(e.clientId,{id:t.id,url:t.url}),n())},onError(){s()}})}))))))).finally((()=>{t(!1)}))}},(0,Qt.__)("Upload all"))))}const jr=function({children:e}){const{isBeingScheduled:t,isRequestingSiteIcon:n,hasPublishAction:o,siteIconUrl:r,siteTitle:l,siteHome:c}=(0,i.useSelect)((e=>{var t;const{getCurrentPost:n,isEditedPostBeingScheduled:o}=e(Jn),{getEntityRecord:s,isResolving:r}=e(a.store),i=s("root","__unstableBase",void 0)||{};return{hasPublishAction:null!==(t=n()._links?.["wp:action-publish"])&&void 0!==t&&t,isBeingScheduled:o(),isRequestingSiteIcon:r("getEntityRecord",["root","__unstableBase",void 0]),siteIconUrl:i.site_icon_url,siteTitle:i.name,siteHome:i.home&&(0,y.filterURLForDisplay)(i.home)}}),[]);let u,d,p=(0,s.createElement)(ko.Icon,{className:"components-site-icon",size:"36px",icon:js});return r&&(p=(0,s.createElement)("img",{alt:(0,Qt.__)("Site Icon"),className:"components-site-icon",src:r})),n&&(p=null),o?t?(u=(0,Qt.__)("Are you ready to schedule?"),d=(0,Qt.__)("Your work will be published at the specified date and time.")):(u=(0,Qt.__)("Are you ready to publish?"),d=(0,Qt.__)("Double-check your settings before publishing.")):(u=(0,Qt.__)("Are you ready to submit for review?"),d=(0,Qt.__)("When you’re ready, submit your work for review, and an Editor will be able to approve it for you.")),(0,s.createElement)("div",{className:"editor-post-publish-panel__prepublish"},(0,s.createElement)("div",null,(0,s.createElement)("strong",null,u)),(0,s.createElement)("p",null,d),(0,s.createElement)("div",{className:"components-site-card"},p,(0,s.createElement)("div",{className:"components-site-info"},(0,s.createElement)("span",{className:"components-site-name"},(0,Ao.decodeEntities)(l)||(0,Qt.__)("(Untitled)")),(0,s.createElement)("span",{className:"components-site-home"},c))),(0,s.createElement)(Wr,null),o&&(0,s.createElement)(s.Fragment,null,(0,s.createElement)(ko.PanelBody,{initialOpen:!1,title:[(0,Qt.__)("Visibility:"),(0,s.createElement)("span",{className:"editor-post-publish-panel__link",key:"label"},(0,s.createElement)(Ys,null))]},(0,s.createElement)(Gs,null)),(0,s.createElement)(ko.PanelBody,{initialOpen:!1,title:[(0,Qt.__)("Publish:"),(0,s.createElement)("span",{className:"editor-post-publish-panel__link",key:"label"},(0,s.createElement)(mr,null))]},(0,s.createElement)(pr,null))),(0,s.createElement)(Dr,null),(0,s.createElement)(Ir,null),(0,s.createElement)(Mr,null),e)},$r="%postname%",Gr="%pagename%";function Kr({text:e,onCopy:t,children:n}){const o=(0,l.useCopyToClipboard)(e,t);return(0,s.createElement)(ko.Button,{variant:"secondary",ref:o},n)}class Yr extends s.Component{constructor(){super(...arguments),this.state={showCopyConfirmation:!1},this.onCopy=this.onCopy.bind(this),this.onSelectInput=this.onSelectInput.bind(this),this.postLink=(0,s.createRef)()}componentDidMount(){this.props.focusOnMount&&this.postLink.current.focus()}componentWillUnmount(){clearTimeout(this.dismissCopyConfirmation)}onCopy(){this.setState({showCopyConfirmation:!0}),clearTimeout(this.dismissCopyConfirmation),this.dismissCopyConfirmation=setTimeout((()=>{this.setState({showCopyConfirmation:!1})}),4e3)}onSelectInput(e){e.target.select()}render(){const{children:e,isScheduled:t,post:n,postType:o}=this.props,r=o?.labels?.singular_name,i=o?.labels?.view_item,a=o?.labels?.add_new_item,l="future"===n.status?(e=>{const{slug:t}=e;return e.permalink_template.includes($r)?e.permalink_template.replace($r,t):e.permalink_template.includes(Gr)?e.permalink_template.replace(Gr,t):e.permalink_template})(n):n.link,c=(0,y.addQueryArgs)("post-new.php",{post_type:n.type}),u=t?(0,s.createElement)(s.Fragment,null,(0,Qt.__)("is now scheduled. It will go live on")," ",(0,s.createElement)(mr,null),"."):(0,Qt.__)("is now live.");return(0,s.createElement)("div",{className:"post-publish-panel__postpublish"},(0,s.createElement)(ko.PanelBody,{className:"post-publish-panel__postpublish-header"},(0,s.createElement)("a",{ref:this.postLink,href:l},(0,Ao.decodeEntities)(n.title)||(0,Qt.__)("(no title)"))," ",u),(0,s.createElement)(ko.PanelBody,null,(0,s.createElement)("p",{className:"post-publish-panel__postpublish-subheader"},(0,s.createElement)("strong",null,(0,Qt.__)("What’s next?"))),(0,s.createElement)("div",{className:"post-publish-panel__postpublish-post-address-container"},(0,s.createElement)(ko.TextControl,{__nextHasNoMarginBottom:!0,className:"post-publish-panel__postpublish-post-address",readOnly:!0,label:(0,Qt.sprintf)((0,Qt.__)("%s address"),r),value:(0,y.safeDecodeURIComponent)(l),onFocus:this.onSelectInput}),(0,s.createElement)("div",{className:"post-publish-panel__postpublish-post-address__copy-button-wrap"},(0,s.createElement)(Kr,{text:l,onCopy:this.onCopy},this.state.showCopyConfirmation?(0,Qt.__)("Copied!"):(0,Qt.__)("Copy")))),(0,s.createElement)("div",{className:"post-publish-panel__postpublish-buttons"},!t&&(0,s.createElement)(ko.Button,{variant:"primary",href:l},i),(0,s.createElement)(ko.Button,{variant:t?"primary":"secondary",href:c},a))),e)}}const qr=(0,i.withSelect)((e=>{const{getEditedPostAttribute:t,getCurrentPost:n,isCurrentPostScheduled:o}=e(Jn),{getPostType:s}=e(a.store);return{post:n(),postType:s(t("type")),isScheduled:o()}}))(Yr);class Qr extends s.Component{constructor(){super(...arguments),this.onSubmit=this.onSubmit.bind(this)}componentDidUpdate(e){e.isPublished&&!this.props.isSaving&&this.props.isDirty&&this.props.onClose()}onSubmit(){const{onClose:e,hasPublishAction:t,isPostTypeViewable:n}=this.props;t&&n||e()}render(){const{forceIsDirty:e,forceIsSaving:t,isBeingScheduled:n,isPublished:o,isPublishSidebarEnabled:r,isScheduled:i,isSaving:a,isSavingNonPostEntityChanges:l,onClose:c,onTogglePublishSidebar:u,PostPublishExtension:d,PrePublishExtension:p,...m}=this.props,{hasPublishAction:h,isDirty:g,isPostTypeViewable:_,...f}=m,v=o||i&&n,y=!v&&!a,b=v&&!a;return(0,s.createElement)("div",{className:"editor-post-publish-panel",...f},(0,s.createElement)("div",{className:"editor-post-publish-panel__header"},b?(0,s.createElement)(ko.Button,{onClick:c,icon:Ws,label:(0,Qt.__)("Close panel")}):(0,s.createElement)(s.Fragment,null,(0,s.createElement)("div",{className:"editor-post-publish-panel__header-publish-button"},(0,s.createElement)(Vs,{focusOnMount:!0,onSubmit:this.onSubmit,forceIsDirty:e,forceIsSaving:t})),(0,s.createElement)("div",{className:"editor-post-publish-panel__header-cancel-button"},(0,s.createElement)(ko.Button,{disabled:l,onClick:c,variant:"secondary"},(0,Qt.__)("Cancel"))))),(0,s.createElement)("div",{className:"editor-post-publish-panel__content"},y&&(0,s.createElement)(jr,null,p&&(0,s.createElement)(p,null)),b&&(0,s.createElement)(qr,{focusOnMount:!0},d&&(0,s.createElement)(d,null)),a&&(0,s.createElement)(ko.Spinner,null)),(0,s.createElement)("div",{className:"editor-post-publish-panel__footer"},(0,s.createElement)(ko.CheckboxControl,{__nextHasNoMarginBottom:!0,label:(0,Qt.__)("Always show pre-publish checks."),checked:r,onChange:u})))}}const Xr=(0,l.compose)([(0,i.withSelect)((e=>{var t;const{getPostType:n}=e(a.store),{getCurrentPost:o,getEditedPostAttribute:s,isCurrentPostPublished:r,isCurrentPostScheduled:i,isEditedPostBeingScheduled:l,isEditedPostDirty:c,isSavingPost:u,isSavingNonPostEntityChanges:d}=e(Jn),{isPublishSidebarEnabled:p}=e(Jn),m=n(s("type"));return{hasPublishAction:null!==(t=o()._links?.["wp:action-publish"])&&void 0!==t&&t,isPostTypeViewable:m?.viewable,isBeingScheduled:l(),isDirty:c(),isPublished:r(),isPublishSidebarEnabled:p(),isSaving:u(),isSavingNonPostEntityChanges:d(),isScheduled:i()}})),(0,i.withDispatch)(((e,{isPublishSidebarEnabled:t})=>{const{disablePublishSidebar:n,enablePublishSidebar:o}=e(Jn);return{onTogglePublishSidebar:()=>{t?n():o()}}})),ko.withFocusReturn,ko.withConstrainedTabbing])(Qr),Zr=(0,s.createElement)(S.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(S.Path,{d:"M17.3 10.1c0-2.5-2.1-4.4-4.8-4.4-2.2 0-4.1 1.4-4.6 3.3h-.2C5.7 9 4 10.7 4 12.8c0 2.1 1.7 3.8 3.7 3.8h9c1.8 0 3.2-1.5 3.2-3.3.1-1.6-1.1-2.9-2.6-3.2zm-.5 5.1h-4v-2.4L14 14l1-1-3-3-3 3 1 1 1.2-1.2v2.4H7.7c-1.2 0-2.2-1.1-2.2-2.3s1-2.4 2.2-2.4H9l.3-1.1c.4-1.3 1.7-2.2 3.2-2.2 1.8 0 3.3 1.3 3.3 2.9v1.3l1.3.2c.8.1 1.4.9 1.4 1.8 0 1-.8 1.8-1.7 1.8z"}));const Jr=function({icon:e,size:t=24,...n}){return(0,s.cloneElement)(e,{width:t,height:t,...n})},ei=(0,s.createElement)(S.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.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"})),ti=(0,s.createElement)(S.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(S.Path,{d:"M17.3 10.1c0-2.5-2.1-4.4-4.8-4.4-2.2 0-4.1 1.4-4.6 3.3h-.2C5.7 9 4 10.7 4 12.8c0 2.1 1.7 3.8 3.7 3.8h9c1.8 0 3.2-1.5 3.2-3.3.1-1.6-1.1-2.9-2.6-3.2zm-.5 5.1h-9c-1.2 0-2.2-1.1-2.2-2.3s1-2.4 2.2-2.4h1.3l.3-1.1c.4-1.3 1.7-2.2 3.2-2.2 1.8 0 3.3 1.3 3.3 2.9v1.3l1.3.2c.8.1 1.4.9 1.4 1.8-.1 1-.9 1.8-1.8 1.8z"}));function ni({forceIsDirty:e,forceIsSaving:t,showIconLabels:n=!1}){const[o,r]=(0,s.useState)(!1),a=(0,l.useViewportMatch)("small"),{isAutosaving:c,isDirty:u,isNew:d,isPending:p,isPublished:m,isSaveable:h,isSaving:g,isScheduled:_,hasPublishAction:f}=(0,i.useSelect)((n=>{var o;const{isEditedPostNew:s,isCurrentPostPublished:r,isCurrentPostScheduled:i,isEditedPostDirty:a,isSavingPost:l,isEditedPostSaveable:c,getCurrentPost:u,isAutosavingPost:d,getEditedPostAttribute:p}=n(Jn);return{isAutosaving:d(),isDirty:e||a(),isNew:s(),isPending:"pending"===p("status"),isPublished:r(),isSaving:t||l(),isSaveable:c(),isScheduled:i(),hasPublishAction:null!==(o=u()?._links?.["wp:action-publish"])&&void 0!==o&&o}}),[e,t]),{savePost:v}=(0,i.useDispatch)(Jn),y=(0,l.usePrevious)(g);if((0,s.useEffect)((()=>{let e;return y&&!g&&(r(!0),e=setTimeout((()=>{r(!1)}),1e3)),()=>clearTimeout(e)}),[g]),!f&&p)return null;if(m||_)return null;const b=p?(0,Qt.__)("Save as pending"):(0,Qt.__)("Save draft"),E=(0,Qt.__)("Save"),S=o||!d&&!u,w=g||S,k=g||S||!h;let P;return g?P=c?(0,Qt.__)("Autosaving"):(0,Qt.__)("Saving"):S?P=(0,Qt.__)("Saved"):a?P=b:n&&(P=E),(0,s.createElement)(ko.Button,{className:h||g?ao()({"editor-post-save-draft":!w,"editor-post-saved-state":w,"is-saving":g,"is-autosaving":c,"is-saved":S,[(0,ko.__unstableGetAnimateClassName)({type:"loading"})]:g}):void 0,onClick:k?void 0:()=>v(),shortcut:k?void 0:So.displayShortcut.primary("s"),showTooltip:!0,variant:"tertiary",icon:a?void 0:Zr,label:P||b,"aria-disabled":k},w&&(0,s.createElement)(Jr,{icon:S?ei:ti}),P)}const oi=(0,l.compose)([(0,i.withSelect)((e=>{var t;const{getCurrentPost:n,getCurrentPostType:o}=e(Jn);return{hasPublishAction:null!==(t=n()._links?.["wp:action-publish"])&&void 0!==t&&t,postType:o()}}))])((function({hasPublishAction:e,children:t}){return e?t:null}));function si({children:e}){return(0,s.createElement)(Qo,{supportKeys:"slug"},e)}class ri extends s.Component{constructor({postSlug:e,postTitle:t,postID:n}){super(...arguments),this.state={editedSlug:(0,y.safeDecodeURIComponent)(e)||(0,y.cleanForSlug)(t)||n},this.setSlug=this.setSlug.bind(this)}setSlug(e){const{postSlug:t,onUpdateSlug:n}=this.props,{value:o}=e.target,s=(0,y.cleanForSlug)(o);s!==t&&n(s)}render(){const{editedSlug:e}=this.state;return(0,s.createElement)(si,null,(0,s.createElement)(ko.TextControl,{__nextHasNoMarginBottom:!0,label:(0,Qt.__)("Slug"),autoComplete:"off",spellCheck:"false",value:e,onChange:e=>this.setState({editedSlug:e}),onBlur:this.setSlug,className:"editor-post-slug"}))}}const ii=(0,l.compose)([(0,i.withSelect)((e=>{const{getCurrentPost:t,getEditedPostAttribute:n}=e(Jn),{id:o}=t();return{postSlug:n("slug"),postTitle:n("title"),postID:o}})),(0,i.withDispatch)((e=>{const{editPost:t}=e(Jn);return{onUpdateSlug(e){t({slug:e})}}}))])(ri);const ai=(0,l.compose)([(0,i.withSelect)((e=>{var t;const n=e(Jn).getCurrentPost();return{hasStickyAction:null!==(t=n._links?.["wp:action-sticky"])&&void 0!==t&&t,postType:e(Jn).getCurrentPostType()}}))])((function({hasStickyAction:e,postType:t,children:n}){return"post"===t&&e?n:null}));const li=(0,l.compose)([(0,i.withSelect)((e=>({postSticky:e(Jn).getEditedPostAttribute("sticky")}))),(0,i.withDispatch)((e=>({onUpdateSticky(t){e(Jn).editPost({sticky:t})}})))])((function({onUpdateSticky:e,postSticky:t=!1}){return(0,s.createElement)(ai,null,(0,s.createElement)(ko.CheckboxControl,{__nextHasNoMarginBottom:!0,label:(0,Qt.__)("Stick to the top of the blog"),checked:t,onChange:()=>e(!t)}))}));const ci=(0,l.compose)([(0,i.withSelect)((e=>{const{isSavingPost:t,isCurrentPostPublished:n,isCurrentPostScheduled:o}=e(Jn);return{isSaving:t(),isPublished:n(),isScheduled:o()}})),(0,i.withDispatch)((e=>{const{editPost:t,savePost:n}=e(Jn);return{onClick:()=>{t({status:"draft"}),n()}}}))])((function({isSaving:e,isPublished:t,isScheduled:n,onClick:o}){const[r,i]=(0,s.useState)(!1);if(!t&&!n)return null;let a;return t?a=(0,Qt.__)("Are you sure you want to unpublish this post?"):n&&(a=(0,Qt.__)("Are you sure you want to unschedule this post?")),(0,s.createElement)(s.Fragment,null,(0,s.createElement)(ko.Button,{className:"editor-post-switch-to-draft",onClick:()=>{i(!0)},disabled:e,variant:"secondary",style:{flexGrow:"1",justifyContent:"center"}},(0,Qt.__)("Switch to draft")),(0,s.createElement)(ko.__experimentalConfirmDialog,{isOpen:r,onConfirm:()=>{i(!1),o()},onCancel:()=>i(!1)},a))})),ui=window.wp.privateApis,{lock:di,unlock:pi}=(0,ui.__dangerousOptInToUnstableAPIsOnlyForCoreModules)("I know using unstable features means my plugin or theme will inevitably break on the next WordPress release.","@wordpress/editor");function mi(){const{syncStatus:e,postType:t,meta:n}=(0,i.useSelect)((e=>{const{getEditedPostAttribute:t}=e(Jn);return{syncStatus:t("wp_pattern_sync_status"),meta:t("meta"),postType:t("type")}}));if("wp_block"!==t)return null;const o="unsynced"===n?.wp_pattern_sync_status?"unsynced":e;return(0,s.createElement)(ko.PanelRow,{className:"edit-post-sync-status"},(0,s.createElement)("span",null,(0,Qt.__)("Sync status")),(0,s.createElement)("div",null,"unsynced"===o?(0,Qt.__)("Not synced"):(0,Qt.__)("Fully synced")))}function hi(){const{editPost:e}=(0,i.useDispatch)(Jn),[t,n]=(0,s.useState)(!1),[o,r]=(0,s.useState)(void 0),{postType:a,isNewPost:l}=(0,i.useSelect)((e=>{const{getEditedPostAttribute:t,isCleanNewPost:n}=e(Jn);return{postType:t("type"),isNewPost:n()}}),[]);(0,s.useEffect)((()=>{l&&"wp_block"===a&&n(!0)}),[]);if("wp_block"!==a||!l)return null;const{ReusableBlocksRenameHint:c}=pi(u.privateApis);return(0,s.createElement)(s.Fragment,null,t&&(0,s.createElement)(ko.Modal,{title:(0,Qt.__)("Set pattern sync status"),onRequestClose:()=>{n(!1)},overlayClassName:"reusable-blocks-menu-items__convert-modal"},(0,s.createElement)("form",{onSubmit:t=>{t.preventDefault(),n(!1),e({meta:{wp_pattern_sync_status:o}})}},(0,s.createElement)(ko.__experimentalVStack,{spacing:"5"},(0,s.createElement)(c,null),(0,s.createElement)(ko.ToggleControl,{label:(0,Qt.__)("Synced"),help:(0,Qt.__)("Editing the pattern will update it anywhere it is used."),checked:!o,onChange:()=>{r(o?void 0:"unsynced")}}),(0,s.createElement)(ko.__experimentalHStack,{justify:"right"},(0,s.createElement)(ko.Button,{variant:"primary",type:"submit"},(0,Qt.__)("Create")))))))}const gi=e=>e;const _i=(0,l.compose)([(0,i.withSelect)((e=>({postType:e(Jn).getCurrentPostType(),taxonomies:e(a.store).getTaxonomies({per_page:-1})})))])((function({postType:e,taxonomies:t,taxonomyWrapper:n=gi}){return(null!=t?t:[]).filter((t=>t.types.includes(e))).filter((e=>e.visibility?.show_ui)).map((e=>{const t=e.hierarchical?Fr:Tr;return(0,s.createElement)(s.Fragment,{key:`taxonomy-${e.slug}`},n((0,s.createElement)(t,{slug:e.slug}),e))}))}));const fi=(0,l.compose)([(0,i.withSelect)((e=>({postType:e(Jn).getCurrentPostType(),taxonomies:e(a.store).getTaxonomies({per_page:-1})})))])((function({postType:e,taxonomies:t,children:n}){const o=t?.some((t=>t.types.includes(e)));return o?n:null}));var vi=n(773);function yi(){const e=(0,i.useSelect)((e=>e(Jn).getEditedPostContent()),[]),{editPost:t,resetEditorBlocks:n}=(0,i.useDispatch)(Jn),[o,a]=(0,s.useState)(e),[c,u]=(0,s.useState)(!1),d=(0,l.useInstanceId)(yi),p=(0,s.useRef)();c||o===e||a(e);return(0,s.useEffect)((()=>()=>{if(p.current){const e=(0,r.parse)(p.current);n(e)}}),[]),(0,s.createElement)(s.Fragment,null,(0,s.createElement)(ko.VisuallyHidden,{as:"label",htmlFor:`post-content-${d}`},(0,Qt.__)("Type text or HTML")),(0,s.createElement)(vi.Z,{autoComplete:"off",dir:"auto",value:o,onChange:e=>{const n=e.target.value;t({content:n}),a(n),u(!0),p.current=n},onBlur:()=>{if(c){const e=(0,r.parse)(o);n(e),u(!1)}},className:"editor-post-text-editor",id:`post-content-${d}`,placeholder:(0,Qt.__)("Start writing with text or HTML")}))}const bi=window.wp.dom,Ei=/[\r\n]+/g;const Si=(0,s.forwardRef)((function(e,t){const n=(0,s.useRef)(),[o,a]=(0,s.useState)(!1),{editPost:c}=(0,i.useDispatch)(Jn),{insertDefaultBlock:d,clearSelectedBlock:p,insertBlocks:m}=(0,i.useDispatch)(u.store),{isCleanNewPost:h,title:g,placeholder:_,hasFixedToolbar:f}=(0,i.useSelect)((e=>{const{getEditedPostAttribute:t,isCleanNewPost:n}=e(Jn),{getSettings:o}=e(u.store),{titlePlaceholder:s,hasFixedToolbar:r}=o();return{isCleanNewPost:n(),title:t("title"),placeholder:s,hasFixedToolbar:r}}),[]);function v(e){m(e,0)}function y(e){c({title:e})}(0,s.useImperativeHandle)(t,(()=>({focus:()=>{n?.current?.focus()}}))),(0,s.useEffect)((()=>{if(!n.current)return;const{defaultView:e}=n.current.ownerDocument,{name:t,parent:o}=e,s="editor-canvas"===t?o.document:e.document,{activeElement:r,body:i}=s;!h||r&&i!==r||n.current.focus()}),[h]);const[b,E]=(0,s.useState)({});function S(){a(!1),E({})}const w=ao()("wp-block wp-block-post-title block-editor-block-list__block editor-post-title editor-post-title__input rich-text",{"is-selected":o,"has-fixed-toolbar":f}),k=(0,Ao.decodeEntities)(_)||(0,Qt.__)("Add title"),{ref:P}=(0,ro.__unstableUseRichText)({value:g,onChange:function(e){y(e.replace(Ei," "))},placeholder:k,selectionStart:b.start,selectionEnd:b.end,onSelectionChange(e,t){E((n=>{const{start:o,end:s}=n;return o===e&&s===t?n:{start:e,end:t}}))},__unstableDisableFormats:!0,preserveWhiteSpace:!0});return(0,s.createElement)(Qo,{supportKeys:"title"},(0,s.createElement)("h1",{ref:(0,l.useMergeRefs)([P,n]),contentEditable:!0,className:w,"aria-label":k,role:"textbox","aria-multiline":"true",onFocus:function(){a(!0),p()},onBlur:S,onKeyDown:function(e){e.keyCode===So.ENTER&&(e.preventDefault(),d(void 0,void 0,0))},onKeyPress:S,onPaste:function(e){const t=e.clipboardData;let n="",o="";try{n=t.getData("text/plain"),o=t.getData("text/html")}catch(e){try{o=t.getData("Text")}catch(e){return}}window.console.log("Received HTML:\n\n",o),window.console.log("Received plain text:\n\n",n);const s=(0,r.pasteHandler)({HTML:o,plainText:n});if(e.preventDefault(),s.length)if("string"!=typeof s){const[e]=s;g||"core/heading"!==e.name&&"core/paragraph"!==e.name?v(s):(y((0,bi.__unstableStripHTML)(e.attributes.content)),v(s.slice(1)))}else{const e={...(0,ro.create)({html:g}),...b},t=(0,ro.insert)(e,(0,ro.create)({html:(0,bi.__unstableStripHTML)(s)}));y((0,ro.toHTMLString)({value:t})),E({start:t.start,end:t.end})}}}))}));function wi(){const{isNew:e,isDeleting:t,postId:n}=(0,i.useSelect)((e=>{const t=e(Jn);return{isNew:t.isEditedPostNew(),isDeleting:t.isDeletingPost(),postId:t.getCurrentPostId()}}),[]),{trashPost:o}=(0,i.useDispatch)(Jn);return e||!n?null:(0,s.createElement)(ko.Button,{className:"editor-post-trash",isDestructive:!0,variant:"secondary",isBusy:t,"aria-disabled":t,onClick:t?void 0:()=>o()},(0,Qt.__)("Move to trash"))}const ki=(0,i.withSelect)((e=>{const{isEditedPostNew:t,getCurrentPostId:n,getCurrentPostType:o}=e(Jn),{getPostType:s,canUser:r}=e(a.store),i=n(),l=s(o()),c=l?.rest_base||"";return{isNew:t(),postId:i,canUserDelete:!(!i||!c)&&r("delete",c,i)}}))((function({isNew:e,postId:t,canUserDelete:n,children:o}){return!e&&t&&n?o:null}));function Pi({onClose:e}){const{isEditable:t,postSlug:n,viewPostLabel:o,postLink:r,permalinkPrefix:l,permalinkSuffix:c}=(0,i.useSelect)((e=>{var t;const n=e(Jn).getCurrentPost(),o=e(Jn).getCurrentPostType(),s=e(a.store).getPostType(o),r=e(Jn).getPermalinkParts(),i=null!==(t=n?._links?.["wp:action-publish"])&&void 0!==t&&t;return{isEditable:e(Jn).isPermalinkEditable()&&i,postSlug:(0,y.safeDecodeURIComponent)(e(Jn).getEditedPostSlug()),viewPostLabel:s?.labels.view_item,postLink:n.link,permalinkPrefix:r?.prefix,permalinkSuffix:r?.suffix}}),[]),{editPost:d}=(0,i.useDispatch)(Jn),[p,m]=(0,s.useState)(!1);return(0,s.createElement)("div",{className:"editor-post-url"},(0,s.createElement)(u.__experimentalInspectorPopoverHeader,{title:(0,Qt.__)("URL"),onClose:e}),t&&(0,s.createElement)(ko.TextControl,{__nextHasNoMarginBottom:!0,label:(0,Qt.__)("Permalink"),value:p?"":n,autoComplete:"off",spellCheck:"false",help:(0,s.createElement)(s.Fragment,null,(0,Qt.__)("The last part of the URL.")," ",(0,s.createElement)(ko.ExternalLink,{href:(0,Qt.__)("https://wordpress.org/documentation/article/page-post-settings-sidebar/#permalink")},(0,Qt.__)("Learn more."))),onChange:e=>{d({slug:e}),e?p&&m(!1):p||m(!0)},onBlur:e=>{d({slug:(0,y.cleanForSlug)(e.target.value)}),p&&m(!1)}}),t&&(0,s.createElement)("h3",{className:"editor-post-url__link-label"},null!=o?o:(0,Qt.__)("View post")),(0,s.createElement)("p",null,(0,s.createElement)(ko.ExternalLink,{className:"editor-post-url__link",href:r,target:"_blank"},t?(0,s.createElement)(s.Fragment,null,(0,s.createElement)("span",{className:"editor-post-url__link-prefix"},l),(0,s.createElement)("span",{className:"editor-post-url__link-slug"},n),(0,s.createElement)("span",{className:"editor-post-url__link-suffix"},c)):r)))}function Ci({children:e}){const t=(0,i.useSelect)((e=>{const t=e(Jn).getCurrentPostType(),n=e(a.store).getPostType(t);if(!n?.viewable)return!1;if(!e(Jn).getCurrentPost().link)return!1;return!!e(Jn).getPermalinkParts()}),[]);return t?e:null}function Ti(){return xi()}function xi(){const e=(0,i.useSelect)((e=>e(Jn).getPermalink()),[]);return(0,y.filterURLForDisplay)((0,y.safeDecodeURIComponent)(e))}const Bi=(0,l.compose)([(0,i.withSelect)((e=>{var t;const{getCurrentPost:n,getCurrentPostType:o}=e(Jn);return{hasPublishAction:null!==(t=n()._links?.["wp:action-publish"])&&void 0!==t&&t,postType:o()}}))])((function({hasPublishAction:e,render:t}){return t({canEdit:e})})),Ii=(0,s.createElement)(S.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(S.Path,{d:"M12 3.2c-4.8 0-8.8 3.9-8.8 8.8 0 4.8 3.9 8.8 8.8 8.8 4.8 0 8.8-3.9 8.8-8.8 0-4.8-4-8.8-8.8-8.8zm0 16c-4 0-7.2-3.3-7.2-7.2C4.8 8 8 4.8 12 4.8s7.2 3.3 7.2 7.2c0 4-3.2 7.2-7.2 7.2zM11 17h2v-6h-2v6zm0-8h2V7h-2v2z"})),Ni=window.wp.wordcount;function Ai(){const e=(0,i.useSelect)((e=>e(Jn).getEditedPostAttribute("content")),[]),t=(0,Qt._x)("words","Word count type. Do not translate!");return(0,s.createElement)("span",{className:"word-count"},(0,Ni.count)(e,t))}const Di=189;function Ri(){const e=(0,i.useSelect)((e=>e(Jn).getEditedPostAttribute("content")),[]),t=(0,Qt._x)("words","Word count type. Do not translate!"),n=Math.round((0,Ni.count)(e,t)/Di),o=0===n?(0,s.createInterpolateElement)((0,Qt.__)("<span>< 1</span> minute"),{span:(0,s.createElement)("span",null)}):(0,s.createInterpolateElement)((0,Qt.sprintf)((0,Qt._n)("<span>%d</span> minute","<span>%d</span> minutes",n),n),{span:(0,s.createElement)("span",null)});return(0,s.createElement)("span",{className:"time-to-read"},o)}function Li(){const e=(0,i.useSelect)((e=>e(Jn).getEditedPostAttribute("content")),[]);return(0,Ni.count)(e,"characters_including_spaces")}const Oi=function({hasOutlineItemsDisabled:e,onRequestClose:t}){const{headingCount:n,paragraphCount:o,numberOfBlocks:r}=(0,i.useSelect)((e=>{const{getGlobalBlockCount:t}=e(u.store);return{headingCount:t("core/heading"),paragraphCount:t("core/paragraph"),numberOfBlocks:t()}}),[]);return(0,s.createElement)(s.Fragment,null,(0,s.createElement)("div",{className:"table-of-contents__wrapper",role:"note","aria-label":(0,Qt.__)("Document Statistics"),tabIndex:"0"},(0,s.createElement)("ul",{role:"list",className:"table-of-contents__counts"},(0,s.createElement)("li",{className:"table-of-contents__count"},(0,Qt.__)("Words"),(0,s.createElement)(Ai,null)),(0,s.createElement)("li",{className:"table-of-contents__count"},(0,Qt.__)("Characters"),(0,s.createElement)("span",{className:"table-of-contents__number"},(0,s.createElement)(Li,null))),(0,s.createElement)("li",{className:"table-of-contents__count"},(0,Qt.__)("Time to read"),(0,s.createElement)(Ri,null)),(0,s.createElement)("li",{className:"table-of-contents__count"},(0,Qt.__)("Headings"),(0,s.createElement)("span",{className:"table-of-contents__number"},n)),(0,s.createElement)("li",{className:"table-of-contents__count"},(0,Qt.__)("Paragraphs"),(0,s.createElement)("span",{className:"table-of-contents__number"},o)),(0,s.createElement)("li",{className:"table-of-contents__count"},(0,Qt.__)("Blocks"),(0,s.createElement)("span",{className:"table-of-contents__number"},r)))),n>0&&(0,s.createElement)(s.Fragment,null,(0,s.createElement)("hr",null),(0,s.createElement)("h2",{className:"table-of-contents__title"},(0,Qt.__)("Document Outline")),(0,s.createElement)(_o,{onSelect:t,hasOutlineItemsDisabled:e})))};const Ui=(0,s.forwardRef)((function({hasOutlineItemsDisabled:e,repositionDropdown:t,...n},o){const r=(0,i.useSelect)((e=>!!e(u.store).getBlockCount()),[]);return(0,s.createElement)(ko.Dropdown,{popoverProps:{placement:t?"right":"bottom"},className:"table-of-contents",contentClassName:"table-of-contents__popover",renderToggle:({isOpen:e,onToggle:t})=>(0,s.createElement)(ko.Button,{...n,ref:o,onClick:r?t:void 0,icon:Ii,"aria-expanded":e,"aria-haspopup":"true",label:(0,Qt.__)("Details"),tooltipPosition:"bottom","aria-disabled":!r}),renderContent:({onClose:t})=>(0,s.createElement)(Oi,{onRequestClose:t,hasOutlineItemsDisabled:e})})}));function Fi(){const e=(0,i.useSelect)((e=>()=>{const{__experimentalGetDirtyEntityRecords:t}=e(a.store);return t().length>0}),[]),t=t=>{if(e())return t.returnValue=(0,Qt.__)("You have unsaved changes. If you proceed, they will be lost."),t.returnValue};return(0,s.useEffect)((()=>(window.addEventListener("beforeunload",t),()=>{window.removeEventListener("beforeunload",t)})),[]),null}const Mi=window.wp.reusableBlocks,Hi=(0,l.createHigherOrderComponent)((e=>(0,i.withRegistry)((t=>{const{useSubRegistry:n=!0,registry:o,...r}=t;if(!n)return(0,s.createElement)(e,{...r});const[a,l]=(0,s.useState)(null);return(0,s.useEffect)((()=>{const e=(0,i.createRegistry)({"core/block-editor":u.storeConfig},o);e.registerStore("core/editor",Zn),l(e)}),[o]),a?(0,s.createElement)(i.RegistryProvider,{value:a},(0,s.createElement)(e,{...r})):null}))),"withRegistryProvider"),zi=(e,t)=>`<a ${Vi(e)}>${t}</a>`,Vi=e=>`href="${e}" target="_blank" rel="noreferrer noopener"`,Wi=e=>{const{title:t,foreign_landing_url:n,creator:o,creator_url:s,license:r,license_version:i,license_url:a}=e,l=((e,t)=>{let n=e.trim();return"pdm"!==e&&(n=e.toUpperCase().replace("SAMPLING","Sampling")),t&&(n+=` ${t}`),["pdm","cc0"].includes(e)||(n=`CC ${n}`),n})(r,i),c=(0,Ao.decodeEntities)(o);let u;return u=c?t?(0,Qt.sprintf)((0,Qt._x)('"%1$s" by %2$s/ %3$s',"caption"),zi(n,(0,Ao.decodeEntities)(t)),s?zi(s,c):c,a?zi(`${a}?ref=openverse`,l):l):(0,Qt.sprintf)((0,Qt._x)("<a %1$s>Work</a> by %2$s/ %3$s","caption"),Vi(n),s?zi(s,c):c,a?zi(`${a}?ref=openverse`,l):l):t?(0,Qt.sprintf)((0,Qt._x)('"%1$s"/ %2$s',"caption"),zi(n,(0,Ao.decodeEntities)(t)),a?zi(`${a}?ref=openverse`,l):l):(0,Qt.sprintf)((0,Qt._x)("<a %1$s>Work</a>/ %2$s","caption"),Vi(n),a?zi(`${a}?ref=openverse`,l):l),u.replace(/\s{2}/g," ")},ji=async(e={})=>(await(0,i.resolveSelect)(a.store).getMediaItems({...e,orderBy:e?.search?"relevance":"date"})).map((e=>({...e,alt:e.alt_text,url:e.source_url,previewUrl:e.media_details?.sizes?.medium?.source_url,caption:e.caption?.raw}))),$i=[{name:"images",labels:{name:(0,Qt.__)("Images"),search_items:(0,Qt.__)("Search images")},mediaType:"image",fetch:async(e={})=>ji({...e,media_type:"image"})},{name:"videos",labels:{name:(0,Qt.__)("Videos"),search_items:(0,Qt.__)("Search videos")},mediaType:"video",fetch:async(e={})=>ji({...e,media_type:"video"})},{name:"audio",labels:{name:(0,Qt.__)("Audio"),search_items:(0,Qt.__)("Search audio")},mediaType:"audio",fetch:async(e={})=>ji({...e,media_type:"audio"})},{name:"openverse",labels:{name:(0,Qt.__)("Openverse"),search_items:(0,Qt.__)("Search Openverse")},mediaType:"image",async fetch(e={}){const t={...e,mature:!1,excluded_source:"flickr,inaturalist,wikimedia",license:"pdm,cc0"},n={per_page:"page_size",search:"q"},o=new URL("https://api.openverse.engineering/v1/images/");Object.entries(t).forEach((([e,t])=>{const s=n[e]||e;o.searchParams.set(s,t)}));const s=await window.fetch(o,{headers:{"User-Agent":"WordPress/inserter-media-fetch"}});return(await s.json()).results.map((e=>({...e,title:e.title?.toLowerCase().startsWith("file:")?e.title.slice(5):e.title,sourceId:e.id,id:void 0,caption:Wi(e),previewUrl:e.thumbnail})))},getReportUrl:({sourceId:e})=>`https://wordpress.org/openverse/image/${e}/report/`,isExternalResource:!0}],Gi=window.wp.mediaUtils,Ki=()=>{};function Yi({additionalData:e={},allowedTypes:t,filesList:n,maxUploadFileSize:o,onError:s=Ki,onFileChange:r}){const{getCurrentPostId:a,getEditorSettings:l}=(0,i.select)(Jn),c=l().allowedMimeTypes;o=o||l().maxUploadFileSize,(0,Gi.uploadMedia)({allowedTypes:t,filesList:n,onFileChange:r,additionalData:{post:a(),...e},maxUploadFileSize:o,onError:({message:e})=>s(e),wpAllowedMimeTypes:c})}const qi=[],Qi=["__experimentalBlockDirectory","__experimentalDiscussionSettings","__experimentalFeatures","__experimentalGlobalStylesBaseStyles","__experimentalPreferredStyleVariations","__experimentalSetIsInserterOpened","__unstableGalleryWithImageBlocks","alignWide","allowedBlockTypes","blockInspectorTabs","allowedMimeTypes","bodyPlaceholder","canLockBlocks","capabilities","clearBlockSelection","codeEditingEnabled","colors","disableCustomColors","disableCustomFontSizes","disableCustomSpacingSizes","disableCustomGradients","disableLayoutStyles","enableCustomLineHeight","enableCustomSpacing","enableCustomUnits","enableOpenverseMediaCategory","focusMode","distractionFree","fontSizes","gradients","generateAnchors","hasFixedToolbar","hasInlineToolbar","isDistractionFree","imageDefaultSize","imageDimensions","imageEditing","imageSizes","isRTL","keepCaretInsideBlock","locale","maxWidth","onUpdateDefaultBlockStyles","postContentAttributes","postsPerPage","readOnly","styles","template","templateLock","titlePlaceholder","supportsLayout","widgetTypesToHideFromLegacyWidgetBlock","__unstableHasCustomAppender","__unstableIsPreviewMode","__unstableResolvedAssets","__unstableIsBlockBasedTheme","behaviors"];const Xi=function(e,t){var n,o;const{reusableBlocks:r,hasUploadPermissions:l,canUseUnfilteredHTML:c,userCanCreatePages:u,pageOnFront:d,postType:p}=(0,i.useSelect)((e=>{var t;const{canUserUseUnfilteredHTML:n,getCurrentPostType:o}=e(Jn),r="web"===s.Platform.OS,{canUser:i,getEntityRecord:l}=e(a.store),c=i("read","settings")?l("root","site"):void 0;return{canUseUnfilteredHTML:n(),reusableBlocks:r?e(a.store).getEntityRecords("postType","wp_block",{per_page:-1}):qi,hasUploadPermissions:null===(t=i("create","media"))||void 0===t||t,userCanCreatePages:i("create","pages"),pageOnFront:c?.page_on_front,postType:o()}}),[]),m=null!==(n=e.__experimentalAdditionalBlockPatterns)&&void 0!==n?n:e.__experimentalBlockPatterns,h=null!==(o=e.__experimentalAdditionalBlockPatternCategories)&&void 0!==o?o:e.__experimentalBlockPatternCategories,{restBlockPatterns:g,restBlockPatternCategories:_}=(0,i.useSelect)((e=>({restBlockPatterns:e(a.store).getBlockPatterns(),restBlockPatternCategories:e(a.store).getBlockPatternCategories()})),[]),f=(0,s.useMemo)((()=>[...m||[],...g||[]].filter(((e,t,n)=>t===n.findIndex((t=>e.name===t.name)))).filter((({postTypes:e})=>!e||Array.isArray(e)&&e.includes(p)))),[m,g,p]),v=(0,s.useMemo)((()=>[...h||[],..._||[]].filter(((e,t,n)=>t===n.findIndex((t=>e.name===t.name))))),[h,_]),{undo:y}=(0,i.useDispatch)(Jn),{saveEntityRecord:b}=(0,i.useDispatch)(a.store),E=e=>u?b("postType","page",e):Promise.reject({message:(0,Qt.__)("You do not have permission to create Pages.")});return(0,s.useMemo)((()=>({...Object.fromEntries(Object.entries(e).filter((([e])=>Qi.includes(e)))),mediaUpload:l?Yi:void 0,__experimentalReusableBlocks:r,__experimentalBlockPatterns:f,__experimentalBlockPatternCategories:v,__experimentalFetchLinkSuggestions:(t,n)=>(0,a.__experimentalFetchLinkSuggestions)(t,n,e),inserterMediaCategories:$i,__experimentalFetchRichUrlData:a.__experimentalFetchUrlData,__experimentalCanUserUseUnfilteredHTML:c,__experimentalUndo:y,outlineMode:t,__experimentalCreatePageEntity:E,__experimentalUserCanCreatePages:u,pageOnFront:d,__experimentalPreferPatternsOnRoot:t})),[e,l,r,f,v,c,y,t,u,d])},{ExperimentalBlockEditorProvider:Zi}=pi(u.privateApis),Ji=Hi((({__unstableTemplate:e,post:t,settings:n,recovery:o,initialEdits:r,children:l,BlockEditorProviderComponent:c=Zi})=>{const d=(0,s.useMemo)((()=>"wp_template"===t.type?{}:{postId:t.id,postType:t.type}),[t.id,t.type]),{editorSettings:p,selection:m,isReady:h}=(0,i.useSelect)((e=>{const{getEditorSettings:t,getEditorSelection:n,__unstableIsEditorReady:o}=e(Jn);return{editorSettings:t(),isReady:o(),selection:n()}}),[]),{id:g,type:_}=null!=e?e:t,[f,v,y]=(0,a.useEntityBlockEditor)("postType",_,{id:g}),b=Xi(p,!!e),{updatePostLock:E,setupEditor:S,updateEditorSettings:w,__experimentalTearDownEditor:k}=(0,i.useDispatch)(Jn),{createWarningNotice:P}=(0,i.useDispatch)(Kt.store);return(0,s.useLayoutEffect)((()=>{if(!o)return E(n.postLock),S(t,r,n.template),n.autosave&&P((0,Qt.__)("There is an autosave of this post that is more recent than the version below."),{id:"autosave-exists",actions:[{label:(0,Qt.__)("View the autosave"),url:n.autosave.editLink}]}),()=>{k()}}),[]),(0,s.useEffect)((()=>{w(n)}),[n]),h?(0,s.createElement)(a.EntityProvider,{kind:"root",type:"site"},(0,s.createElement)(a.EntityProvider,{kind:"postType",type:t.type,id:t.id},(0,s.createElement)(u.BlockContextProvider,{value:d},(0,s.createElement)(c,{value:f,onChange:y,onInput:v,selection:m,settings:b,useSubRegistry:!1},l,(0,s.createElement)(Mi.ReusableBlocksMenuItems,null))))):null}));const ea=function(e){return(0,s.createElement)(Ji,{...e,BlockEditorProviderComponent:u.BlockEditorProvider},e.children)},ta=window.wp.serverSideRender;var na=n.n(ta);function oa(e,t,n=[]){const o=(0,s.forwardRef)(((n,o)=>(E()("wp.editor."+e,{since:"5.3",alternative:"wp.blockEditor."+e,version:"6.2"}),(0,s.createElement)(t,{ref:o,...n}))));return n.forEach((n=>{o[n]=oa(e+"."+n,t[n])})),o}function sa(e,t){return(...n)=>(E()("wp.editor."+e,{since:"5.3",alternative:"wp.blockEditor."+e,version:"6.2"}),t(...n))}const ra=oa("RichText",u.RichText,["Content"]);ra.isEmpty=sa("RichText.isEmpty",u.RichText.isEmpty);const ia=oa("Autocomplete",u.Autocomplete),aa=oa("AlignmentToolbar",u.AlignmentToolbar),la=oa("BlockAlignmentToolbar",u.BlockAlignmentToolbar),ca=oa("BlockControls",u.BlockControls,["Slot"]),ua=oa("BlockEdit",u.BlockEdit),da=oa("BlockEditorKeyboardShortcuts",u.BlockEditorKeyboardShortcuts),pa=oa("BlockFormatControls",u.BlockFormatControls,["Slot"]),ma=oa("BlockIcon",u.BlockIcon),ha=oa("BlockInspector",u.BlockInspector),ga=oa("BlockList",u.BlockList),_a=oa("BlockMover",u.BlockMover),fa=oa("BlockNavigationDropdown",u.BlockNavigationDropdown),va=oa("BlockSelectionClearer",u.BlockSelectionClearer),ya=oa("BlockSettingsMenu",u.BlockSettingsMenu),ba=oa("BlockTitle",u.BlockTitle),Ea=oa("BlockToolbar",u.BlockToolbar),Sa=oa("ColorPalette",u.ColorPalette),wa=oa("ContrastChecker",u.ContrastChecker),ka=oa("CopyHandler",u.CopyHandler),Pa=oa("DefaultBlockAppender",u.DefaultBlockAppender),Ca=oa("FontSizePicker",u.FontSizePicker),Ta=oa("Inserter",u.Inserter),xa=oa("InnerBlocks",u.InnerBlocks,["ButtonBlockAppender","DefaultBlockAppender","Content"]),Ba=oa("InspectorAdvancedControls",u.InspectorAdvancedControls,["Slot"]),Ia=oa("InspectorControls",u.InspectorControls,["Slot"]),Na=oa("PanelColorSettings",u.PanelColorSettings),Aa=oa("PlainText",u.PlainText),Da=oa("RichTextShortcut",u.RichTextShortcut),Ra=oa("RichTextToolbarButton",u.RichTextToolbarButton),La=oa("__unstableRichTextInputEvent",u.__unstableRichTextInputEvent),Oa=oa("MediaPlaceholder",u.MediaPlaceholder),Ua=oa("MediaUpload",u.MediaUpload),Fa=oa("MediaUploadCheck",u.MediaUploadCheck),Ma=oa("MultiSelectScrollIntoView",u.MultiSelectScrollIntoView),Ha=oa("NavigableToolbar",u.NavigableToolbar),za=oa("ObserveTyping",u.ObserveTyping),Va=oa("SkipToSelectedBlock",u.SkipToSelectedBlock),Wa=oa("URLInput",u.URLInput),ja=oa("URLInputButton",u.URLInputButton),$a=oa("URLPopover",u.URLPopover),Ga=oa("Warning",u.Warning),Ka=oa("WritingFlow",u.WritingFlow),Ya=sa("createCustomColorsHOC",u.createCustomColorsHOC),qa=sa("getColorClassName",u.getColorClassName),Qa=sa("getColorObjectByAttributeValues",u.getColorObjectByAttributeValues),Xa=sa("getColorObjectByColorValue",u.getColorObjectByColorValue),Za=sa("getFontSize",u.getFontSize),Ja=sa("getFontSizeClass",u.getFontSizeClass),el=sa("withColorContext",u.withColorContext),tl=sa("withColors",u.withColors),nl=sa("withFontSizes",u.withFontSizes);function ol(e){return E()("wp.editor.cleanForSlug",{since:"12.7",plugin:"Gutenberg",alternative:"wp.url.cleanForSlug"}),(0,y.cleanForSlug)(e)}const sl={};di(sl,{ExperimentalEditorProvider:Ji,EntitiesSavedStatesExtensible:Ho})})(),(window.wp=window.wp||{}).editor=o})(); |