WordPress/wp-includes/js/dist/editor.min.js
isabel_brison 919ea56557 Editor: update npm packages with bug fixes and blessed tasks.
Includes miscellaneous bug fixes and enhancements to the Library task (#58579) and to the site vs content editing task (#58641)

Fixes #58701.

Built from https://develop.svn.wordpress.org/trunk@56127


git-svn-id: http://core.svn.wordpress.org/trunk@55639 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-07-03 09:14:26 +00:00

12 lines
147 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/*! This file is auto-generated */
!function(){var e={6411:function(e,t){var n,o,r;
/*!
autosize 4.0.4
license: MIT
http://www.jacklmoore.com/autosize
*/o=[e,t],n=function(e,t){"use strict";var n,o,r="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))}}),i=function(e){return new Event(e,{bubbles:!0})};try{new Event("test")}catch(e){i=function(e){var t=document.createEvent("Event");return t.initEvent(e,!0,!1),t}}function s(e){if(e&&e.nodeName&&"TEXTAREA"===e.nodeName&&!r.has(e)){var t=null,n=null,o=null,s=function(){e.clientWidth!==n&&p()},a=function(t){window.removeEventListener("resize",s,!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]})),r.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",s,!1),e.addEventListener("input",p,!1),e.addEventListener("autosize:update",p,!1),e.style.overflowX="hidden",e.style.wordWrap="break-word",r.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),r=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})),r&&(document.documentElement.scrollTop=r)}}function p(){d();var t=Math.round(parseFloat(e.style.height)),n=window.getComputedStyle(e,null),r="content-box"===n.boxSizing?Math.round(parseFloat(n.height)):e.offsetHeight;if(r<t?"hidden"===n.overflowY&&(c("scroll"),d(),r="content-box"===n.boxSizing?Math.round(parseFloat(window.getComputedStyle(e,null).height)):e.offsetHeight):"hidden"!==n.overflowY&&(c("hidden"),d(),r="content-box"===n.boxSizing?Math.round(parseFloat(window.getComputedStyle(e,null).height)):e.offsetHeight),o!==r){o=r;var s=i("autosize:resized");try{e.dispatchEvent(s)}catch(e){}}}}function a(e){var t=r.get(e);t&&t.destroy()}function l(e){var t=r.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 s(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===(r="function"==typeof n?n.apply(t,o):n)||(e.exports=r)},4403:function(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 r(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var i=typeof n;if("string"===i||"number"===i)e.push(n);else if(Array.isArray(n)){if(n.length){var s=r.apply(null,n);s&&e.push(s)}}else if("object"===i){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?(r.default=r,e.exports=r):void 0===(n=function(){return r}.apply(t,[]))||(e.exports=n)}()},4827:function(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:function(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 r=e.style.lineHeight;e.style.lineHeight=t+"em",t=o(e,"line-height"),n=parseFloat(t,10),r?e.style.lineHeight=r: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 i=e.nodeName,s=document.createElement(i);s.innerHTML="&nbsp;","TEXTAREA"===i.toUpperCase()&&s.setAttribute("rows","1");var a=o(e,"font-size");s.style.fontSize=a,s.style.padding="0px",s.style.border="0px";var l=document.body;l.appendChild(s),n=s.offsetHeight,l.removeChild(s)}return n}},5372:function(e,t,n){"use strict";var o=n(9567);function r(){}function i(){}i.resetWarningCache=r,e.exports=function(){function e(e,t,n,r,i,s){if(s!==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:i,resetWarningCache:r};return n.PropTypes=n,n}},2652:function(e,t,n){e.exports=n(5372)()},9567:function(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},5438:function(e,t,n){"use strict";var o,r=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)}),i=this&&this.__assign||Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},s=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 r=0;for(o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&(n[o[r]]=e[o[r]])}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 r(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),r=(t.innerRef,t.children),l=s(t,["onResize","maxRows","onChange","style","innerRef","children"]),c=this.state.lineHeight,u=n&&c?c*n:null;return a.createElement("textarea",i({},l,{onChange:this.onChange,style:u?i({},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)}}),r)},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,i({},e,{innerRef:t}))}))},773:function(e,t,n){"use strict";var o=n(5438);t.Z=o.TextareaAutosize},4793:function(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"),r=new RegExp(n,"");function i(e){return t[e]}var s=function(e){return e.replace(o,i)};e.exports=s,e.exports.has=function(e){return!!e.match(r)},e.exports.remove=s},9196:function(e){"use strict";e.exports=window.React}},t={};function n(o){var r=t[o];if(void 0!==r)return r.exports;var i=t[o]={exports:{}};return e[o].call(i.exports,i,i.exports,n),i.exports}n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(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=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};!function(){"use strict";n.r(o),n.d(o,{AlignmentToolbar:function(){return sa},Autocomplete:function(){return ia},AutosaveMonitor:function(){return ro},BlockAlignmentToolbar:function(){return aa},BlockControls:function(){return la},BlockEdit:function(){return ca},BlockEditorKeyboardShortcuts:function(){return ua},BlockFormatControls:function(){return da},BlockIcon:function(){return pa},BlockInspector:function(){return ma},BlockList:function(){return ha},BlockMover:function(){return ga},BlockNavigationDropdown:function(){return fa},BlockSelectionClearer:function(){return _a},BlockSettingsMenu:function(){return va},BlockTitle:function(){return ya},BlockToolbar:function(){return ba},CharacterCount:function(){return As},ColorPalette:function(){return Ea},ContrastChecker:function(){return Sa},CopyHandler:function(){return wa},DefaultBlockAppender:function(){return ka},DocumentOutline:function(){return fo},DocumentOutlineCheck:function(){return _o},EditorHistoryRedo:function(){return To},EditorHistoryUndo:function(){return xo},EditorKeyboardShortcutsRegister:function(){return wo},EditorNotices:function(){return Io},EditorProvider:function(){return Js},EditorSnackbars:function(){return Ao},EntitiesSavedStates:function(){return Mo},ErrorBoundary:function(){return jo},FontSizePicker:function(){return Pa},InnerBlocks:function(){return Ta},Inserter:function(){return Ca},InspectorAdvancedControls:function(){return xa},InspectorControls:function(){return Ba},LocalAutosaveMonitor:function(){return Yo},MediaPlaceholder:function(){return La},MediaUpload:function(){return Oa},MediaUploadCheck:function(){return Ua},MultiSelectScrollIntoView:function(){return Fa},NavigableToolbar:function(){return Ma},ObserveTyping:function(){return za},PageAttributesCheck:function(){return qo},PageAttributesOrder:function(){return Zo},PageAttributesParent:function(){return ar},PageTemplate:function(){return lr},PanelColorSettings:function(){return Ia},PlainText:function(){return Aa},PostAuthor:function(){return pr},PostAuthorCheck:function(){return mr},PostComments:function(){return hr},PostExcerpt:function(){return gr},PostExcerptCheck:function(){return fr},PostFeaturedImage:function(){return Cr},PostFeaturedImageCheck:function(){return yr},PostFormat:function(){return Br},PostFormatCheck:function(){return Tr},PostLastRevision:function(){return Nr},PostLastRevisionCheck:function(){return Ar},PostLockedModal:function(){return Dr},PostPendingStatus:function(){return Lr},PostPendingStatusCheck:function(){return Rr},PostPingbacks:function(){return Or},PostPreviewButton:function(){return Fr},PostPublishButton:function(){return Vr},PostPublishButtonLabel:function(){return Mr},PostPublishPanel:function(){return Xi},PostSavedState:function(){return ns},PostSchedule:function(){return pi},PostScheduleCheck:function(){return os},PostScheduleLabel:function(){return mi},PostSlug:function(){return ss},PostSlugCheck:function(){return rs},PostSticky:function(){return ls},PostStickyCheck:function(){return as},PostSwitchToDraftButton:function(){return cs},PostSyncStatus:function(){return us},PostTaxonomies:function(){return ps},PostTaxonomiesCheck:function(){return ms},PostTaxonomiesFlatTermSelector:function(){return Ci},PostTaxonomiesHierarchicalTermSelector:function(){return Ui},PostTextEditor:function(){return gs},PostTitle:function(){return vs},PostTrash:function(){return ys},PostTrashCheck:function(){return bs},PostTypeSupportCheck:function(){return Qo},PostURL:function(){return Es},PostURLCheck:function(){return Ss},PostURLLabel:function(){return ws},PostVisibility:function(){return Gr},PostVisibilityCheck:function(){return Ps},PostVisibilityLabel:function(){return Yr},RichText:function(){return ra},RichTextShortcut:function(){return Na},RichTextToolbarButton:function(){return Da},ServerSideRender:function(){return ta()},SkipToSelectedBlock:function(){return Ha},TableOfContents:function(){return Ds},TextEditorGlobalKeyboardShortcuts:function(){return Eo},ThemeSupportCheck:function(){return vr},TimeToRead:function(){return Is},URLInput:function(){return Va},URLInputButton:function(){return Wa},URLPopover:function(){return ja},UnsavedChangesWarning:function(){return Rs},VisualEditorGlobalKeyboardShortcuts:function(){return bo},Warning:function(){return $a},WordCount:function(){return xs},WritingFlow:function(){return Ga},__unstableRichTextInputEvent:function(){return Ra},cleanForSlug:function(){return nl},createCustomColorsHOC:function(){return Ka},getColorClassName:function(){return Ya},getColorObjectByAttributeValues:function(){return qa},getColorObjectByColorValue:function(){return Qa},getFontSize:function(){return Xa},getFontSizeClass:function(){return Za},getTemplatePartIcon:function(){return L},mediaUpload:function(){return js},privateApis:function(){return ol},store:function(){return Jn},storeConfig:function(){return Zn},transformStyles:function(){return u.transformStyles},useEntitiesSavedStatesIsDirty:function(){return Oo},usePostScheduleLabel:function(){return hi},usePostURLLabel:function(){return ks},usePostVisibilityLabel:function(){return qr},userAutocompleter:function(){return no},withColorContext:function(){return Ja},withColors:function(){return el},withFontSizes:function(){return tl}});var e={};n.r(e),n.d(e,{__experimentalGetDefaultTemplatePartAreas:function(){return Ht},__experimentalGetDefaultTemplateType:function(){return Vt},__experimentalGetDefaultTemplateTypes:function(){return zt},__experimentalGetTemplateInfo:function(){return Wt},__unstableIsEditorReady:function(){return Fe},canInsertBlockType:function(){return Ot},canUserUseUnfilteredHTML:function(){return Ne},didPostSaveRequestFail:function(){return ge},didPostSaveRequestSucceed:function(){return he},getActivePostLock:function(){return Ae},getAdjacentBlockClientId:function(){return at},getAutosaveAttribute:function(){return ee},getBlock:function(){return Ge},getBlockAttributes:function(){return $e},getBlockCount:function(){return Ze},getBlockHierarchyRootClientId:function(){return st},getBlockIndex:function(){return Et},getBlockInsertionPoint:function(){return At},getBlockListSettings:function(){return Mt},getBlockMode:function(){return xt},getBlockName:function(){return We},getBlockOrder:function(){return bt},getBlockRootClientId:function(){return it},getBlockSelectionEnd:function(){return et},getBlockSelectionStart:function(){return Je},getBlocks:function(){return Ke},getBlocksByClientId:function(){return Xe},getClientIdsOfDescendants:function(){return Ye},getClientIdsWithDescendants:function(){return qe},getCurrentPost:function(){return $},getCurrentPostAttribute:function(){return X},getCurrentPostId:function(){return K},getCurrentPostLastRevisionId:function(){return q},getCurrentPostRevisionsCount:function(){return Y},getCurrentPostType:function(){return G},getEditedPostAttribute:function(){return J},getEditedPostContent:function(){return be},getEditedPostPreviewLink:function(){return ve},getEditedPostSlug:function(){return ke},getEditedPostVisibility:function(){return te},getEditorBlocks:function(){return Re},getEditorSelection:function(){return Ue},getEditorSelectionEnd:function(){return Oe},getEditorSelectionStart:function(){return Le},getEditorSettings:function(){return Me},getFirstMultiSelectedBlockClientId:function(){return mt},getGlobalBlockCount:function(){return Qe},getInserterItems:function(){return Ut},getLastMultiSelectedBlockClientId:function(){return ht},getMultiSelectedBlockClientIds:function(){return dt},getMultiSelectedBlocks:function(){return pt},getMultiSelectedBlocksEndClientId:function(){return yt},getMultiSelectedBlocksStartClientId:function(){return vt},getNextBlockClientId:function(){return ct},getPermalink:function(){return we},getPermalinkParts:function(){return Pe},getPostEdits:function(){return Q},getPostLockUser:function(){return Ie},getPostTypeLabel:function(){return jt},getPreviousBlockClientId:function(){return lt},getSelectedBlock:function(){return rt},getSelectedBlockClientId:function(){return ot},getSelectedBlockCount:function(){return tt},getSelectedBlocksInitialCaretPosition:function(){return ut},getStateBeforeOptimisticTransaction:function(){return ze},getSuggestedPostFormat:function(){return ye},getTemplate:function(){return Rt},getTemplateLock:function(){return Lt},hasChangedContent:function(){return H},hasEditorRedo:function(){return M},hasEditorUndo:function(){return F},hasInserterItems:function(){return Ft},hasMultiSelection:function(){return Pt},hasNonPostEntityChanges:function(){return W},hasSelectedBlock:function(){return nt},hasSelectedInnerBlock:function(){return wt},inSomeHistory:function(){return He},isAncestorMultiSelected:function(){return _t},isAutosavingPost:function(){return fe},isBlockInsertionPointVisible:function(){return Nt},isBlockMultiSelected:function(){return ft},isBlockSelected:function(){return St},isBlockValid:function(){return je},isBlockWithinSelection:function(){return kt},isCaretWithinFormattedText:function(){return It},isCleanNewPost:function(){return j},isCurrentPostPending:function(){return ne},isCurrentPostPublished:function(){return oe},isCurrentPostScheduled:function(){return re},isDeletingPost:function(){return de},isEditedPostAutosaveable:function(){return le},isEditedPostBeingScheduled:function(){return ce},isEditedPostDateFloating:function(){return ue},isEditedPostDirty:function(){return V},isEditedPostEmpty:function(){return ae},isEditedPostNew:function(){return z},isEditedPostPublishable:function(){return ie},isEditedPostSaveable:function(){return se},isFirstMultiSelectedBlock:function(){return gt},isMultiSelecting:function(){return Ct},isPermalinkEditable:function(){return Se},isPostAutosavingLocked:function(){return xe},isPostLockTakeover:function(){return Be},isPostLocked:function(){return Ce},isPostSavingLocked:function(){return Te},isPreviewingPost:function(){return _e},isPublishSidebarEnabled:function(){return De},isPublishingPost:function(){return Ee},isSavingNonPostEntityChanges:function(){return me},isSavingPost:function(){return pe},isSelectionEnabled:function(){return Tt},isTyping:function(){return Bt},isValidTemplate:function(){return Dt}});var t={};n.r(t),n.d(t,{__experimentalTearDownEditor:function(){return Zt},autosave:function(){return an},clearSelectedBlock:function(){return Bn},createUndoLevel:function(){return un},disablePublishSidebar:function(){return mn},editPost:function(){return nn},enablePublishSidebar:function(){return pn},enterFormattedText:function(){return Yn},exitFormattedText:function(){return qn},hideInsertionPoint:function(){return Mn},insertBlock:function(){return On},insertBlocks:function(){return Un},insertDefaultBlock:function(){return Qn},lockPostAutosaving:function(){return fn},lockPostSaving:function(){return hn},mergeBlocks:function(){return Vn},moveBlockToPosition:function(){return Ln},moveBlocksDown:function(){return Dn},moveBlocksUp:function(){return Rn},multiSelect:function(){return xn},receiveBlocks:function(){return Sn},redo:function(){return ln},refreshPost:function(){return rn},removeBlock:function(){return jn},removeBlocks:function(){return Wn},replaceBlock:function(){return Nn},replaceBlocks:function(){return An},resetBlocks:function(){return En},resetEditorBlocks:function(){return vn},resetPost:function(){return Jt},savePost:function(){return on},selectBlock:function(){return Pn},setTemplateValidity:function(){return zn},setupEditor:function(){return Xt},setupEditorState:function(){return tn},showInsertionPoint:function(){return Fn},startMultiSelect:function(){return Cn},startTyping:function(){return Gn},stopMultiSelect:function(){return Tn},stopTyping:function(){return Kn},synchronizeTemplate:function(){return Hn},toggleBlockMode:function(){return $n},toggleSelection:function(){return In},trashPost:function(){return sn},undo:function(){return cn},unlockPostAutosaving:function(){return _n},unlockPostSaving:function(){return gn},updateBlock:function(){return wn},updateBlockAttributes:function(){return kn},updateBlockListSettings:function(){return Xn},updateEditorSettings:function(){return yn},updatePost:function(){return en},updatePostLock:function(){return dn}});var r=window.wp.element,i=window.wp.blocks,s=window.wp.data,a=window.wp.coreData,l=window.wp.compose,c=window.wp.hooks,u=window.wp.blockEditor;const 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}var m=(0,s.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}}),h={};function g(e){return[e]}function f(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 _(e,t){var n,o=t||g;function r(){n=new WeakMap}function i(){var t,r,i,s,a,l=arguments.length;for(s=new Array(l),i=0;i<l;i++)s[i]=arguments[i];for(t=function(e){var t,o,r,i,s,a=n,l=!0;for(t=0;t<e.length;t++){if(!(s=o=e[t])||"object"!=typeof s){l=!1;break}a.has(o)?a=a.get(o):(r=new WeakMap,a.set(o,r),a=r)}return a.has(h)||((i=function(){var e={clear:function(){e.head=null}};return e}()).isUniqueByDependants=l,a.set(h,i)),a.get(h)}(a=o.apply(null,s)),t.isUniqueByDependants||(t.lastDependants&&!f(a,t.lastDependants,0)&&t.clear(),t.lastDependants=a),r=t.head;r;){if(f(r.args,s,1))return r!==t.head&&(r.prev.next=r.next,r.next&&(r.next.prev=r.prev),r.next=t.head,r.prev=null,t.head.prev=r,t.head=r),r.val;r=r.next}return r={val:e.apply(null,s)},s[0]=null,r.args=s,t.head&&(t.head.prev=r,r.next=t.head),t.head=r,r.val}return i.getDependants=o,i.clear=r,r(),i}var v=window.wp.date,y=window.wp.url,b=window.wp.deprecated,E=n.n(b),S=window.wp.primitives;var w=(0,r.createElement)(S.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.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;const P=new Set(["meta"]),C="SAVE_POST_NOTICE_ID",T="TRASH_POST_NOTICE_ID",x=/%(?:postname|pagename)%/,B=6e4,I=["title","excerpt","content"];var A=(0,r.createElement)(S.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.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"}));var N=(0,r.createElement)(S.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.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"}));var D=(0,r.createElement)(S.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.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"}));var R=(0,r.createElement)(S.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.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?A:"footer"===e?N:"sidebar"===e?D:R}const O={},U=[],F=(0,s.createRegistrySelector)((e=>()=>e(a.store).hasUndo())),M=(0,s.createRegistrySelector)((e=>()=>e(a.store).hasRedo()));function z(e){return"auto-draft"===$(e).status}function H(e){return"content"in Q(e)}const V=(0,s.createRegistrySelector)((e=>t=>{const n=G(t),o=K(t);return!!e(a.store).hasEditsForEntityRecord("postType",n,o)})),W=(0,s.createRegistrySelector)((e=>t=>{const n=e(a.store).__experimentalGetDirtyEntityRecords(),{type:o,id:r}=$(t);return n.some((e=>"postType"!==e.kind||e.name!==o||e.key!==r))}));function j(e){return!V(e)&&z(e)}const $=(0,s.createRegistrySelector)((e=>t=>{const n=K(t),o=G(t),r=e(a.store).getRawEntityRecord("postType",o,n);return r||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,s.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,s.createRegistrySelector)((e=>(t,n)=>{if(!I.includes(n)&&"preview_link"!==n)return;const o=G(t),r=K(t),i=e(a.store).getCurrentUser()?.id,s=e(a.store).getAutosave(o,r,i);return s?p(s[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 re(e){return"future"===$(e).status&&!oe(e)}function ie(e){const t=$(e);return V(e)||-1===["publish","private","future"].indexOf(t.status)}function se(e){return!pe(e)&&(!!J(e,"title")||!!J(e,"excerpt")||!ae(e)||"native"===r.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,i.getDefaultBlockName)()&&e!==(0,i.getFreeformContentHandlerName)())return!1}return!be(e)}const le=(0,s.createRegistrySelector)((e=>t=>{if(!se(t))return!1;if(xe(t))return!1;const n=G(t),o=K(t),r=e(a.store).hasFetchedAutosaves(n,o),i=e(a.store).getCurrentUser()?.id,s=e(a.store).getAutosave(n,o,i);return!!r&&(!s||(!!H(t)||["title","excerpt"].some((e=>p(s[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,s.createRegistrySelector)((e=>t=>{const n=G(t),o=K(t);return e(a.store).isSavingEntityRecord("postType",n,o)})),me=(0,s.createRegistrySelector)((e=>t=>{const n=e(a.store).__experimentalGetEntitiesBeingSaved(),{type:o,id:r}=$(t);return n.some((e=>"postType"!==e.kind||e.name!==o||e.key!==r))})),he=(0,s.createRegistrySelector)((e=>t=>{const n=G(t),o=K(t);return!e(a.store).getLastEntitySaveError("postType",n,o)})),ge=(0,s.createRegistrySelector)((e=>t=>{const n=G(t),o=K(t);return!!e(a.store).getLastEntitySaveError("postType",n,o)}));function fe(e){return!!pe(e)&&Boolean(e.saving.options?.isAutosave)}function _e(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,s.createRegistrySelector)((e=>t=>{const n=K(t),o=G(t),r=e(a.store).getEditedEntityRecord("postType",o,n);if(r){if("function"==typeof r.content)return r.content(r);if(r.blocks)return(0,i.__unstableSerializeAndClean)(r.blocks);if(r.content)return r.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:r}=t;return Se(e)?n+o+r: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,r]=t.split(x);return{prefix:o,postName:n,suffix:r}}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 Ae(e){return e.postLock.activePostLock}function Ne(e){return Boolean($(e)._links?.hasOwnProperty("wp:action-unfiltered-html"))}const De=(0,s.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 ze(){return E()("select('core/editor').getStateBeforeOptimisticTransaction",{since:"5.7",hint:"No state history is kept on this store anymore"}),null}function He(){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,s.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"),rt=Ve("getSelectedBlock"),it=Ve("getBlockRootClientId"),st=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"),ft=Ve("isBlockMultiSelected"),_t=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"),At=Ve("getBlockInsertionPoint"),Nt=Ve("isBlockInsertionPointVisible"),Dt=Ve("isValidTemplate"),Rt=Ve("getTemplate"),Lt=Ve("getTemplateLock"),Ot=Ve("canInsertBlockType"),Ut=Ve("getInserterItems"),Ft=Ve("hasInserterItems"),Mt=Ve("getBlockListSettings");function zt(e){return Me(e)?.defaultTemplateTypes}const Ht=_((e=>{const t=Me(e)?.defaultTemplatePartAreas||[];return t?.map((e=>({...e,icon:L(e.icon)})))}),(e=>[Me(e)?.defaultTemplatePartAreas])),Vt=_(((e,t)=>{var n;const o=zt(e);return o&&null!==(n=Object.values(o).find((e=>e.slug===t)))&&void 0!==n?n:O}),((e,t)=>[zt(e),t]));function Wt(e,t){if(!t)return O;const{description:n,slug:o,title:r,area:i}=t,{title:s,description:a}=Vt(e,o),l="string"==typeof r?r:r?.rendered;return{title:l&&l!==o?l:s||o,description:("string"==typeof n?n:n?.raw)||a,icon:Ht(e).find((e=>i===e.area))?.icon||w}}const jt=(0,s.createRegistrySelector)((e=>t=>{const n=G(t),o=e(a.store).getPostType(n);return o?.labels?.singular_name}));var $t=window.wp.apiFetch,Gt=n.n($t),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))}var Qt=window.wp.i18n;const Xt=(e,t,n)=>({dispatch:o})=>{o.setupEditorState(e);if("auto-draft"===e.status&&n){let r;r="content"in t?t.content:e.content.raw;let s=(0,i.parse)(r);s=(0,i.synchronizeBlocksWithTemplate)(s,n),o.resetEditorBlocks(s,{__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:r,type:i}=n.getCurrentPost();o.dispatch(a.store).editEntityRecord("postType",i,r,e,t)},on=(e={})=>async({select:t,dispatch:n,registry:o})=>{if(!t.isEditedPostSaveable())return;const r=t.getEditedPostContent();e.isAutosave||n.editPost({content:r},{undoIgnore:!0});const i=t.getCurrentPost(),s={id:i.id,...o.select(a.store).getEntityRecordNonTransientEdits("postType",i.type,i.id),content:r};n({type:"REQUEST_POST_UPDATE_START",options:e}),await o.dispatch(a.store).saveEntityRecord("postType",i.type,s,e),n({type:"REQUEST_POST_UPDATE_FINISH",options:e});const l=o.select(a.store).getLastEntitySaveError("postType",i.type,i.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 r=["publish","private","future"],i=-1!==r.indexOf(t.status),s={publish:(0,Qt.__)("Publishing failed."),private:(0,Qt.__)("Publishing failed."),future:(0,Qt.__)("Scheduling failed.")};let a=i||-1===r.indexOf(n.status)?(0,Qt.__)("Updating failed."):s[n.status];return o.message&&!/<\/?[^>]*>/.test(o.message)&&(a=[a,o.message].join(" ")),[a,{id:C}]}({post:i,edits:s,error:l});e.length&&o.dispatch(Kt.store).createErrorNotice(...e)}else{const n=t.getCurrentPost(),r=function(e){var t;const{previousPost:n,post:o,postType:r}=e;if(e.options?.isAutosave)return[];if("trash"===o.status&&"trash"!==n.status)return[];const i=["publish","private","future"],s=i.includes(n.status),a=i.includes(o.status);let l,c,u=null!==(t=r?.viewable)&&void 0!==t&&t;s||a?s&&!a?(l=r.labels.item_reverted_to_draft,u=!1):l=!s&&a?{publish:r.labels.item_published,private:r.labels.item_published_privately,future:r.labels.item_scheduled}[o.status]:r.labels.item_updated:(l=(0,Qt.__)("Draft saved."),c=!0);const d=[];return u&&d.push({label:c?(0,Qt.__)("View Preview"):r.labels.view_item,url:o.link}),[l,{id:C,type:"snackbar",actions:d}]}({previousPost:i,post:n,postType:await o.resolveSelect(a.store).getPostType(n.type),options:e});r.length&&o.dispatch(Kt.store).createSuccessNotice(...r),e.isAutosave||o.dispatch(u.store).__unstableMarkLastChangeAsPersistent()}};function rn(){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 sn=()=>async({select:e,dispatch:t,registry:n})=>{const o=e.getCurrentPostType(),r=await n.resolveSelect(a.store).getPostType(o);n.dispatch(Kt.store).removeNotice(T);const{rest_base:i,rest_namespace:s="wp/v2"}=r;t({type:"REQUEST_POST_DELETE_START"});try{const n=e.getCurrentPost();await Gt()({path:`/${s}/${i}/${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"),r=n.getEditedPostAttribute("content"),i=n.getEditedPostAttribute("excerpt");!function(e,t,n,o,r){window.sessionStorage.setItem(Yt(e,t),JSON.stringify({post_title:n,content:o,excerpt:r}))}(e.id,t,o,r,i)}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 fn(e){return{type:"LOCK_POST_AUTOSAVING",lockName:e}}function _n(e){return{type:"UNLOCK_POST_AUTOSAVING",lockName:e}}const vn=(e,t={})=>({select:n,dispatch:o,registry:r})=>{const{__unstableShouldCreateUndoLevel:s,selection:l}=t,c={blocks:e,selection:l};if(!1!==s){const{id:e,type:t}=n.getCurrentPost();if(r.select(a.store).getEditedEntityRecord("postType",t,e).blocks===c.blocks)return void r.dispatch(a.store).__unstableCreateUndoLevel("postType",t,e);c.content=({blocks:e=[]})=>(0,i.__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"),An=bn("replaceBlocks"),Nn=bn("replaceBlock"),Dn=bn("moveBlocksDown"),Rn=bn("moveBlocksUp"),Ln=bn("moveBlockToPosition"),On=bn("insertBlock"),Un=bn("insertBlocks"),Fn=bn("showInsertionPoint"),Mn=bn("hideInsertionPoint"),zn=bn("setTemplateValidity"),Hn=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,s.createReduxStore)("core/editor",{...Zn});(0,s.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,...i})=>{const l=(0,s.useSelect)((e=>e(Jn).getCurrentPostType()),[]),[c,u]=(0,a.useEntityProp)("postType",l,"meta"),d=(0,r.useMemo)((()=>({...n,...Object.fromEntries(Object.entries(e).map((([e,t])=>[e,c[t]])))})),[n,c]);return(0,r.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)},...i})}),"withMetaAttributeSource"))(n)(e.edit)),e}function to(e){const t=e.avatar_urls&&e.avatar_urls[24]?(0,r.createElement)("img",{className:"editor-autocompleters__user-avatar",alt:"",src:e.avatar_urls[24]}):(0,r.createElement)("span",{className:"editor-autocompleters__no-avatar"});return(0,r.createElement)(r.Fragment,null,t,(0,r.createElement)("span",{className:"editor-autocompleters__user-name"},e.name),(0,r.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,s.select)(i.store).getBlockTypes().map((({name:e})=>(0,s.select)(i.store).getBlockType(e))).forEach(eo);var no={name:"users",className:"editor-autocompleters__user",triggerPrefix:"@",useItems(e){const t=(0,s.useSelect)((t=>{const{getUsers:n}=t(a.store);return n({context:"view",search:encodeURIComponent(e)})}),[e]),n=(0,r.useMemo)((()=>t?t.map((e=>({key:`user-${e.slug}`,value:e,label:to(e)}))):[]),[t]);return[n]},getOptionCompletion(e){return`@${e.slug}`}};(0,c.addFilter)("editor.Autocomplete.completers","editor/autocompleters/set-default-completers",(function(e=[]){return e.push({...no}),e}));class oo extends r.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}}var ro=(0,l.compose)([(0,s.withSelect)(((e,t)=>{const{getReferenceByDistinctEdits:n}=e(a.store),{isEditedPostDirty:o,isEditedPostAutosaveable:r,isAutosavingPost:i,getEditorSettings:s}=e(Jn),{interval:l=s().autosaveInterval}=t;return{editsReference:n(),isDirty:o(),isAutosaveable:r(),isAutosaving:i(),interval:l}})),(0,s.withDispatch)(((e,t)=>({autosave(){const{autosave:n=e(Jn).autosave}=t;n()}})))])(oo),io=window.wp.richText,so=n(4403),ao=n.n(so);var lo=({children:e,isValid:t,level:n,href:o,onSelect:i})=>(0,r.createElement)("li",{className:ao()("document-outline__item",`is-${n.toLowerCase()}`,{"is-invalid":!t})},(0,r.createElement)("a",{href:o,className:"document-outline__button",onClick:i},(0,r.createElement)("span",{className:"document-outline__emdash","aria-hidden":"true"}),(0,r.createElement)("strong",{className:"document-outline__level"},n),(0,r.createElement)("span",{className:"document-outline__item-content"},e)));const co=(0,r.createElement)("em",null,(0,Qt.__)("(Empty heading)")),uo=[(0,r.createElement)("br",{key:"incorrect-break"}),(0,r.createElement)("em",{key:"incorrect-message"},(0,Qt.__)("(Incorrect heading level)"))],po=[(0,r.createElement)("br",{key:"incorrect-break-h1"}),(0,r.createElement)("em",{key:"incorrect-message-h1"},(0,Qt.__)("(Your theme may already use a H1 for the post title)"))],mo=[(0,r.createElement)("br",{key:"incorrect-break-multiple-h1"}),(0,r.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;var fo=(0,l.compose)((0,s.withSelect)((e=>{var t;const{getBlocks:n}=e(u.store),{getEditedPostAttribute:o}=e(Jn),{getPostType:r}=e(a.store),i=r(o("type"));return{title:o("title"),blocks:n(),isTitleSupported:null!==(t=i?.supports?.title)&&void 0!==t&&t}})))((({blocks:e=[],title:t,onSelect:n,isTitleSupported:o,hasOutlineItemsDisabled:i})=>{const a=ho(e),{selectBlock:l}=(0,s.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,r.createElement)("div",{className:"document-outline"},(0,r.createElement)("ul",null,p&&(0,r.createElement)(lo,{level:(0,Qt.__)("Title"),isValid:!0,onSelect:n,href:`#${d.id}`,isDisabled:i},t),a.map(((e,t)=>{const o=e.level>c+1,s=!(e.isEmpty||o||!e.level||1===e.level&&(m||p));return c=e.level,(0,r.createElement)(lo,{key:t,level:`H${e.level}`,isValid:s,isDisabled:i,href:`#block-${e.clientId}`,onSelect:()=>{l(e.clientId),n?.()}},e.isEmpty?co:(0,io.getTextContent)((0,io.create)({html:e.attributes.content})),o&&uo,1===e.level&&m&&mo,p&&1===e.level&&!m&&po)}))))}));var _o=(0,s.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;var yo=function({resetBlocksOnSave:e}){const{resetEditorBlocks:t,savePost:n}=(0,s.useDispatch)(Jn),{isEditedPostDirty:o,getPostEdits:r,isPostSavingLocked:a}=(0,s.useSelect)(Jn);return(0,vo.useShortcut)("core/editor/save",(s=>{if(s.preventDefault(),!a()&&o()){if(e){const e=r();if(e.content&&"string"==typeof e.content){const n=(0,i.parse)(e.content);t(n)}}n()}})),null};var bo=function(){const{redo:e,undo:t}=(0,s.useDispatch)(Jn);return(0,vo.useShortcut)("core/editor/undo",(e=>{t(),e.preventDefault()})),(0,vo.useShortcut)("core/editor/redo",(t=>{e(),t.preventDefault()})),(0,r.createElement)(yo,null)};function Eo(){return(0,r.createElement)(yo,{resetBlocksOnSave:!0})}var So=window.wp.keycodes;var wo=function(){const{registerShortcut:e}=(0,s.useDispatch)(vo.store);return(0,r.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,r.createElement)(u.BlockEditorKeyboardShortcuts.Register,null)},ko=window.wp.components;var Po=(0,r.createElement)(S.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.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"}));var Co=(0,r.createElement)(S.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.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"}));var To=(0,r.forwardRef)((function(e,t){const n=(0,So.isAppleOS)()?So.displayShortcut.primaryShift("z"):So.displayShortcut.primary("y"),o=(0,s.useSelect)((e=>e(Jn).hasEditorRedo()),[]),{redo:i}=(0,s.useDispatch)(Jn);return(0,r.createElement)(ko.Button,{...e,ref:t,icon:(0,Qt.isRTL)()?Co:Po,label:(0,Qt.__)("Redo"),shortcut:n,"aria-disabled":!o,onClick:o?i:void 0,className:"editor-history__redo"})}));var xo=(0,r.forwardRef)((function(e,t){const n=(0,s.useSelect)((e=>e(Jn).hasEditorUndo()),[]),{undo:o}=(0,s.useDispatch)(Jn);return(0,r.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"})}));var Bo=(0,l.compose)([(0,s.withSelect)((e=>({isValid:e(u.store).isValidTemplate()}))),(0,s.withDispatch)((e=>{const{setTemplateValidity:t,synchronizeTemplate:n}=e(u.store);return{resetTemplateValidity:()=>t(!0),synchronizeTemplate:n}}))])((function({isValid:e,...t}){return e?null:(0,r.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 doesnt match the template assigned to your post type."))}));var Io=(0,l.compose)([(0,s.withSelect)((e=>({notices:e(Kt.store).getNotices()}))),(0,s.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,r.createElement)(r.Fragment,null,(0,r.createElement)(ko.NoticeList,{notices:o,className:"components-editor-notices__pinned"}),(0,r.createElement)(ko.NoticeList,{notices:n,className:"components-editor-notices__dismissible",onRemove:t},(0,r.createElement)(Bo,null)))}));function Ao(){const e=(0,s.useSelect)((e=>e(Kt.store).getNotices()),[]),{removeNotice:t}=(0,s.useDispatch)(Kt.store),n=e.filter((({type:e})=>"snackbar"===e));return(0,r.createElement)(ko.SnackbarList,{notices:n,className:"components-editor-notices__snackbar",onRemove:t})}var No=window.wp.htmlEntities;function Do({record:e,checked:t,onChange:n,closePanel:o}){const{name:i,kind:l,title:c,key:d}=e,p=(0,s.useSelect)((e=>{const{blocks:t=[]}=e(a.store).getEditedEntityRecord(l,i,d),n=e(u.store).getBlockParents(t[0]?.clientId);return n[n.length-1]}),[]),m=(0,s.useSelect)((e=>{if("postType"!==l||"wp_template"!==i)return c;const t=e(a.store).getEditedEntityRecord(l,i,d);return e(Jn).__experimentalGetTemplateInfo(t).title}),[i,l,c,d]),h=(0,s.useSelect)((e=>e(u.store).getSelectedBlockClientId()===p),[p]),g=h?(0,Qt.__)("Selected"):(0,Qt.__)("Select"),{selectBlock:f}=(0,s.useDispatch)(u.store),_=(0,r.useCallback)((()=>f(p)),[p]),v=(0,r.useCallback)((()=>{f(p),o()}),[p]);return(0,r.createElement)(ko.PanelRow,null,(0,r.createElement)(ko.CheckboxControl,{__nextHasNoMarginBottom:!0,label:(0,r.createElement)("strong",null,(0,No.decodeEntities)(m)||(0,Qt.__)("Untitled")),checked:t,onChange:n}),p?(0,r.createElement)(r.Fragment,null,(0,r.createElement)(ko.Button,{onClick:_,className:"entities-saved-states__find-entity",disabled:h},g),(0,r.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 i=e.length,l=e[0],c=(0,s.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===i?(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,i);return(0,r.createElement)(ko.PanelBody,{title:d,initialOpen:!0},p&&(0,r.createElement)(ko.PanelRow,null,p),e.map((e=>(0,r.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,s.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,r.useState)([]);return{dirtyEntityRecords:e,isDirty:e.length-t.length>0,setUnselectedEntities:({kind:e,name:o,key:r,property:i},s)=>{n(s?t.filter((t=>t.kind!==e||t.name!==o||t.key!==r||t.property!==i)):[...t,{kind:e,name:o,key:r,property:i}])},unselectedEntities:t}},Uo=[{kind:"postType",name:"wp_navigation"}];function Fo(e){return e}function Mo({close:e}){const t=Oo();return(0,r.createElement)(zo,{close:e,...t})}function zo({additionalPrompt:e,close:t,onSave:n=Fo,saveEnabled:o,saveLabel:i=(0,Qt.__)("Save"),dirtyEntityRecords:c,isDirty:d,setUnselectedEntities:p,unselectedEntities:m}){const h=(0,r.useRef)(),{editEntityRecord:g,saveEditedEntityRecord:f,__experimentalSaveSpecifiedEntityEdits:_}=(0,s.useDispatch)(a.store),{__unstableMarkLastChangeAsPersistent:v}=(0,s.useDispatch)(u.store),{createSuccessNotice:y,createErrorNotice:b,removeNotice:E}=(0,s.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,r.useCallback)((()=>t()),[t]),[I,A]=(0,l.__experimentalUseDialog)({onClose:()=>B()});return(0,r.createElement)("div",{ref:I,...A,className:"entities-saved-states__panel"},(0,r.createElement)(ko.Flex,{className:"entities-saved-states__panel-header",gap:2},(0,r.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((r=>r.kind===e&&r.name===t&&r.key===n&&r.property===o))));t(o);const r=[],i=[];o.forEach((({kind:e,name:t,key:n,property:o})=>{"root"===e&&"site"===t?r.push(o):(Uo.some((n=>n.kind===e&&n.name===t))&&g(e,t,n,{status:"publish"}),i.push(f(e,t,n)))})),r.length&&i.push(_("root","site",void 0,r)),v(),Promise.all(i).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"},i),(0,r.createElement)(ko.FlexItem,{isBlock:!0,as:ko.Button,variant:"secondary",onClick:B},(0,Qt.__)("Cancel"))),(0,r.createElement)("div",{className:"entities-saved-states__text-prompt"},(0,r.createElement)("strong",null,(0,Qt.__)("Are you ready to save?")),e,d&&(0,r.createElement)("p",null,(0,Qt.__)("The following changes have been made to your site, templates, and content."))),T.map((e=>(0,r.createElement)(Ro,{key:e[0].name,list:e,closePanel:B,unselectedEntities:m,setUnselectedEntities:p}))))}function Ho(){try{return(0,s.select)(Jn).getEditedPostContent()}catch(e){}}function Vo({text:e,children:t}){const n=(0,l.useCopyToClipboard)(e);return(0,r.createElement)(ko.Button,{variant:"secondary",ref:n},t)}class Wo extends r.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,r.createElement)(Vo,{key:"copy-post",text:Ho},(0,Qt.__)("Copy Post Text")),(0,r.createElement)(Vo,{key:"copy-error",text:e.stack},(0,Qt.__)("Copy Error"))];return(0,r.createElement)(u.Warning,{className:"editor-error-boundary",actions:t},(0,Qt.__)("The editor has encountered an unexpected error."))}}var jo=Wo;const $o=window.requestIdleCallback?window.requestIdleCallback:window.requestAnimationFrame;let Go;function Ko(){const{postId:e,isEditedPostNew:t,hasRemoteAutosave:n}=(0,s.useSelect)((e=>({postId:e(Jn).getCurrentPostId(),isEditedPostNew:e(Jn).isEditedPostNew(),hasRemoteAutosave:!!e(Jn).getEditorSettings().autosave})),[]),{getEditedPostAttribute:o}=(0,s.useSelect)(Jn),{createWarningNotice:a,removeNotice:l}=(0,s.useDispatch)(Kt.store),{editPost:c,resetEditorBlocks:u}=(0,s.useDispatch)(Jn);(0,r.useEffect)((()=>{let r=function(e,t){return window.sessionStorage.getItem(Yt(e,t))}(e,t);if(!r)return;try{r=JSON.parse(r)}catch{return}const{post_title:s,content:d,excerpt:p}=r,m={title:s,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,i.parse)(m.content)),l(h)}}]})}),[t,e])}var 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,s.useDispatch)(Jn),t=(0,r.useCallback)((()=>{$o((()=>e({local:!0})))}),[]);Ko(),function(){const{postId:e,isEditedPostNew:t,isDirty:n,isAutosaving:o,didError:i}=(0,s.useSelect)((e=>({postId:e(Jn).getCurrentPostId(),isEditedPostNew:e(Jn).isEditedPostNew(),isDirty:e(Jn).isEditedPostDirty(),isAutosaving:e(Jn).isAutosavingPost(),didError:e(Jn).didPostSaveRequestFail()})),[]),a=(0,r.useRef)(n),c=(0,r.useRef)(o);(0,r.useEffect)((()=>{!i&&(c.current&&!o||a.current&&!n)&&qt(e,t),a.current=n,c.current=o}),[n,o,i]);const u=(0,l.usePrevious)(t),d=(0,l.usePrevious)(e);(0,r.useEffect)((()=>{d===e&&u&&!t&&qt(e,!0)}),[t,e])}();const n=(0,s.useSelect)((e=>e(Jn).getEditorSettings().localAutosaveInterval),[]);return(0,r.createElement)(ro,{interval:n,autosave:t})}));var qo=function({children:e}){const t=(0,s.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};var Qo=(0,s.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}));const Xo=({onUpdateOrder:e,order:t=0})=>{const[n,o]=(0,r.useState)(null),i=null===n?t:n;return(0,r.createElement)(ko.Flex,null,(0,r.createElement)(ko.FlexBlock,null,(0,r.createElement)(ko.__experimentalNumberControl,{label:(0,Qt.__)("Order"),value:i,onChange:t=>{o(t);const n=Number(t);Number.isInteger(n)&&""!==t.trim?.()&&e(Number(t))},labelPosition:"side",onBlur:()=>{o(null)}})))};var Zo=(0,l.compose)([(0,s.withSelect)((e=>({order:e(Jn).getEditedPostAttribute("menu_order")}))),(0,s.withDispatch)((e=>({onUpdateOrder(t){e(Jn).editPost({menu_order:t})}})))])((function(e){return(0,r.createElement)(Qo,{supportKeys:"page-attributes"},(0,r.createElement)(Xo,{...e}))})),Jo=n(4793),er=n.n(Jo);function tr(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 nr=e=>(0,No.decodeEntities)(e),or=e=>({...e,name:nr(e.name)}),rr=e=>(null!=e?e:[]).map(or);function ir(e){return e?.title?.rendered?(0,No.decodeEntities)(e.title.rendered):`#${e.id} (${(0,Qt.__)("no title")})`}const sr=(e,t)=>{const n=er()(e||"").toLowerCase(),o=er()(t||"").toLowerCase();return n===o?0:n.startsWith(o)?n.length:1/0};var ar=function(){const{editPost:e}=(0,s.useDispatch)(Jn),[t,n]=(0,r.useState)(!1),{isHierarchical:o,parentPost:i,parentPostId:c,items:u,postType:d}=(0,s.useSelect)((e=>{var n;const{getPostType:o,getEntityRecords:r,getEntityRecord:i}=e(a.store),{getCurrentPostId:s,getEditedPostAttribute:l}=e(Jn),c=l("type"),u=l("parent"),d=o(c),p=s(),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?i("postType",c,u):null,items:m?r("postType",c,h):[],postType:d}}),[t]),p=d?.labels?.parent_item_colon,m=u||[],h=(0,r.useMemo)((()=>{const e=(n,o=0)=>n.map((t=>[{value:t.id,label:"— ".repeat(o)+(0,No.decodeEntities)(t.name),rawName:t.name},...e(t.children||[],o+1)])).sort((([e],[n])=>sr(e.rawName,t)>=sr(n.rawName,t)?1:-1)).flat();let n=m.map((e=>({id:e.id,parent:e.parent,name:ir(e)})));t||(n=tr(n));const o=e(n),r=o.find((e=>e.value===c));return i&&!r&&o.unshift({value:c,label:ir(i)}),o}),[m,t]);return o&&p?(0,r.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};var lr=function(){const{availableTemplates:e,selectedTemplate:t,isViewable:n}=(0,s.useSelect)((e=>{var t;const{getEditedPostAttribute:n,getEditorSettings:o,getCurrentPostType:r}=e(Jn),{getPostType:i}=e(a.store);return{selectedTemplate:n("template"),availableTemplates:o().availableTemplates,isViewable:null!==(t=i(r())?.viewable)&&void 0!==t&&t}}),[]),{editPost:o}=(0,s.useDispatch)(Jn);return n&&e&&Object.keys(e).length?(0,r.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};const cr={who:"authors",per_page:50,_fields:"id,name",context:"view"};var ur=function(){const[e,t]=(0,r.useState)(),{authorId:n,isLoading:o,authors:i,postAuthor:c}=(0,s.useSelect)((t=>{const{getUser:n,getUsers:o,isResolving:r}=t(a.store),{getEditedPostAttribute:i}=t(Jn),s=n(i("author"),{context:"view"}),l={...cr};return e&&(l.search=e),{authorId:i("author"),postAuthor:s,authors:o(l),isLoading:r("core","getUsers",[l])}}),[e]),{editPost:u}=(0,s.useDispatch)(Jn),d=(0,r.useMemo)((()=>{const e=(null!=i?i:[]).map((e=>({value:e.id,label:(0,No.decodeEntities)(e.name)})));return e.findIndex((({value:e})=>c?.id===e))<0&&c?[{value:c.id,label:(0,No.decodeEntities)(c.name)},...e]:e}),[i,c]);return c?(0,r.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};var dr=function(){const{editPost:e}=(0,s.useDispatch)(Jn),{postAuthor:t,authors:n}=(0,s.useSelect)((e=>({postAuthor:e(Jn).getEditedPostAttribute("author"),authors:e(a.store).getUsers(cr)})),[]),o=(0,r.useMemo)((()=>(null!=n?n:[]).map((e=>({value:e.id,label:(0,No.decodeEntities)(e.name)})))),[n]);return(0,r.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})};var pr=function(){return(0,s.useSelect)((e=>{const t=e(a.store).getUsers(cr);return t?.length>=25}),[])?(0,r.createElement)(ur,null):(0,r.createElement)(dr,null)};function mr({children:e}){const{hasAssignAuthorAction:t,hasAuthors:n}=(0,s.useSelect)((e=>{var t;const n=e(Jn).getCurrentPost(),o=e(a.store).getUsers(cr);return{hasAssignAuthorAction:null!==(t=n._links?.["wp:action-assign-author"])&&void 0!==t&&t,hasAuthors:o?.length>=1}}),[]);return t&&n?(0,r.createElement)(Qo,{supportKeys:"author"},e):null}var hr=(0,l.compose)([(0,s.withSelect)((e=>({commentStatus:e(Jn).getEditedPostAttribute("comment_status")}))),(0,s.withDispatch)((e=>({editPost:e(Jn).editPost})))])((function({commentStatus:e="open",...t}){return(0,r.createElement)(ko.CheckboxControl,{__nextHasNoMarginBottom:!0,label:(0,Qt.__)("Allow comments"),checked:"open"===e,onChange:()=>t.editPost({comment_status:"open"===e?"closed":"open"})})}));var gr=(0,l.compose)([(0,s.withSelect)((e=>({excerpt:e(Jn).getEditedPostAttribute("excerpt")}))),(0,s.withDispatch)((e=>({onUpdateExcerpt(t){e(Jn).editPost({excerpt:t})}})))])((function({excerpt:e,onUpdateExcerpt:t}){return(0,r.createElement)("div",{className:"editor-post-excerpt"},(0,r.createElement)(ko.TextareaControl,{__nextHasNoMarginBottom:!0,label:(0,Qt.__)("Write an excerpt (optional)"),className:"editor-post-excerpt__textarea",onChange:e=>t(e),value:e}),(0,r.createElement)(ko.ExternalLink,{href:(0,Qt.__)("https://wordpress.org/documentation/article/page-post-settings-sidebar/#excerpt")},(0,Qt.__)("Learn more about manual excerpts")))}));var fr=function(e){return(0,r.createElement)(Qo,{...e,supportKeys:"excerpt"})},_r=window.wp.blob;var vr=(0,s.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 r=null!==(o=e?.[t])&&void 0!==o&&o;return"post-thumbnails"===t&&Array.isArray(r)?r.includes(n):r}))?t:null}));var yr=function(e){return(0,r.createElement)(vr,{supportKeys:"post-thumbnails"},(0,r.createElement)(Qo,{...e,supportKeys:"thumbnail"}))};const br=["image"],Er=(0,Qt.__)("Featured image"),Sr=(0,Qt.__)("Set featured image"),wr=(0,r.createElement)("p",null,(0,Qt.__)("To edit the featured image, you need permission to upload media."));const kr=(0,s.withSelect)((e=>{const{getMedia:t,getPostType:n}=e(a.store),{getCurrentPostId:o,getEditedPostAttribute:r}=e(Jn),i=r("featured_media");return{media:i?t(i,{context:"view"}):null,currentPostId:o(),postType:n(r("type")),featuredImageId:i}})),Pr=(0,s.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})}}}));var Cr=(0,l.compose)(ko.withNotices,kr,Pr,(0,ko.withFilters)("editor.PostFeaturedImage"))((function({currentPostId:e,featuredImageId:t,onUpdateImage:n,onRemoveImage:o,media:i,postType:a,noticeUI:l,noticeOperations:d}){const p=(0,r.useRef)(),[m,h]=(0,r.useState)(!1),g=(0,s.useSelect)((e=>e(u.store).getSettings().mediaUpload),[]),{mediaWidth:f,mediaHeight:_,mediaSourceUrl:v}=function(e,t){var n,o;if(!e)return{};const r=(0,c.applyFilters)("editor.PostFeaturedImage.imageSize","large",e.id,t);if(r in(null!==(n=e?.media_details?.sizes)&&void 0!==n?n:{}))return{mediaWidth:e.media_details.sizes[r].width,mediaHeight:e.media_details.sizes[r].height,mediaSourceUrl:e.media_details.sizes[r].source_url};const i=(0,c.applyFilters)("editor.PostFeaturedImage.imageSize","thumbnail",e.id,t);return i in(null!==(o=e?.media_details?.sizes)&&void 0!==o?o:{})?{mediaWidth:e.media_details.sizes[i].width,mediaHeight:e.media_details.sizes[i].height,mediaSourceUrl:e.media_details.sizes[i].source_url}:{mediaWidth:e.media_details.width,mediaHeight:e.media_details.height,mediaSourceUrl:e.source_url}}(i,e);function y(e){g({allowedTypes:["image"],filesList:e,onFileChange([e]){(0,_r.isBlobURL)(e?.url)?h(!0):(n(e),h(!1))},onError(e){d.removeAllNotices(),d.createErrorNotice(e)}})}return(0,r.createElement)(yr,null,l,(0,r.createElement)("div",{className:"editor-post-featured-image"},i&&(0,r.createElement)("div",{id:`editor-post-featured-image-${t}-describedby`,className:"hidden"},i.alt_text&&(0,Qt.sprintf)((0,Qt.__)("Current image: %s"),i.alt_text),!i.alt_text&&(0,Qt.sprintf)((0,Qt.__)("The current image has no alternative text. The file name is: %s"),i.media_details.sizes?.full?.file||i.slug)),(0,r.createElement)(u.MediaUploadCheck,{fallback:wr},(0,r.createElement)(u.MediaUpload,{title:a?.labels?.featured_image||Er,onSelect:n,unstableFeaturedImageFlow:!0,allowedTypes:br,modalClass:"editor-post-featured-image__media-modal",render:({open:e})=>(0,r.createElement)("div",{className:"editor-post-featured-image__container"},(0,r.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&&i&&(0,r.createElement)(ko.ResponsiveWrapper,{naturalWidth:f,naturalHeight:_,isInline:!0},(0,r.createElement)("img",{src:v,alt:""})),m&&(0,r.createElement)(ko.Spinner,null),!t&&!m&&(a?.labels?.set_featured_image||Sr)),!!t&&(0,r.createElement)(ko.__experimentalHStack,{className:"editor-post-featured-image__actions"},(0,r.createElement)(ko.Button,{className:"editor-post-featured-image__action",onClick:e,"aria-hidden":"true"},(0,Qt.__)("Replace")),(0,r.createElement)(ko.Button,{className:"editor-post-featured-image__action",onClick:()=>{o(),p.current.focus()}},(0,Qt.__)("Remove"))),(0,r.createElement)(ko.DropZone,{onFilesDrop:y})),value:t}))))}));var Tr=(0,s.withSelect)((e=>({disablePostFormats:e(Jn).getEditorSettings().disablePostFormats})))((function({disablePostFormats:e,...t}){return!e&&(0,r.createElement)(Qo,{...t,supportKeys:"post-formats"})}));const xr=[{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 Br(){const e=`post-format-selector-${(0,l.useInstanceId)(Br)}`,{postFormat:t,suggestedFormat:n,supportedFormats:o}=(0,s.useSelect)((e=>{const{getEditedPostAttribute:t,getSuggestedPostFormat:n}=e(Jn),o=t("format"),r=e(a.store).getThemeSupports();return{postFormat:null!=o?o:"standard",suggestedFormat:n(),supportedFormats:r.formats}}),[]),i=xr.filter((e=>o?.includes(e.id)||t===e.id)),c=i.find((e=>e.id===n)),{editPost:u}=(0,s.useDispatch)(Jn),d=e=>u({format:e});return(0,r.createElement)(Tr,null,(0,r.createElement)("div",{className:"editor-post-format"},(0,r.createElement)(ko.SelectControl,{__nextHasNoMarginBottom:!0,label:(0,Qt.__)("Post Format"),value:t,onChange:e=>d(e),id:e,options:i.map((e=>({label:e.caption,value:e.id})))}),c&&c.id!==t&&(0,r.createElement)("p",{className:"editor-post-format__suggestion"},(0,r.createElement)(ko.Button,{variant:"link",onClick:()=>d(c.id)},(0,Qt.sprintf)((0,Qt.__)("Apply suggested format: %s"),c.caption)))))}var Ir=(0,r.createElement)(S.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.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"}));var Ar=(0,s.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,r.createElement)(Qo,{supportKeys:"revisions"},n)}));var Nr=(0,s.withSelect)((e=>{const{getCurrentPostLastRevisionId:t,getCurrentPostRevisionsCount:n}=e(Jn);return{lastRevisionId:t(),revisionsCount:n()}}))((function({lastRevisionId:e,revisionsCount:t}){return(0,r.createElement)(Ar,null,(0,r.createElement)(ko.Button,{href:(0,y.addQueryArgs)("revision.php",{revision:e,gutenberg:!0}),className:"editor-post-last-revision__title",icon:Ir},(0,Qt.sprintf)((0,Qt._n)("%d Revision","%d Revisions",t),t)))}));function Dr(){const e="core/editor/post-locked-modal-"+(0,l.useInstanceId)(Dr),{autosave:t,updatePostLock:n}=(0,s.useDispatch)(Jn),{isLocked:o,isTakeover:i,user:u,postId:d,postLockUtils:p,activePostLock:m,postType:h,previewLink:g}=(0,s.useSelect)((e=>{const{isPostLocked:t,isPostLockTakeover:n,getPostLockUser:o,getCurrentPostId:r,getActivePostLock:i,getEditedPostAttribute:s,getEditedPostPreviewLink:l,getEditorSettings:c}=e(Jn),{getPostType:u}=e(a.store);return{isLocked:t(),isTakeover:n(),user:o(),postId:r(),postLockUtils:c().postLockUtils,activePostLock:i(),postType:u(s("type")),previewLink:l()}}),[]);if((0,r.useEffect)((()=>{function r(){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",r),()=>{(0,c.removeAction)("heartbeat.send",e),(0,c.removeAction)("heartbeat.tick",e),window.removeEventListener("beforeunload",r)}}),[]),!o)return null;const f=u.name,_=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,r.createElement)(ko.Modal,{title:i?(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,r.createElement)(ko.__experimentalHStack,{alignment:"top",spacing:6},!!_&&(0,r.createElement)("img",{src:_,alt:(0,Qt.__)("Avatar"),className:"editor-post-locked-modal__avatar",width:64,height:64}),(0,r.createElement)("div",null,!!i&&(0,r.createElement)("p",null,(0,r.createInterpolateElement)(f?(0,Qt.sprintf)((0,Qt.__)("<strong>%s</strong> now has editing control of this post (<PreviewLink />). Dont worry, your changes up to this moment have been saved."),f):(0,Qt.__)("Another user now has editing control of this post (<PreviewLink />). Dont worry, your changes up to this moment have been saved."),{strong:(0,r.createElement)("strong",null),PreviewLink:(0,r.createElement)(ko.ExternalLink,{href:g},(0,Qt.__)("preview"))})),!i&&(0,r.createElement)(r.Fragment,null,(0,r.createElement)("p",null,(0,r.createInterpolateElement)(f?(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."),f):(0,Qt.__)("Another user is currently working on this post (<PreviewLink />), which means you cannot make changes, unless you take over."),{strong:(0,r.createElement)("strong",null),PreviewLink:(0,r.createElement)(ko.ExternalLink,{href:g},(0,Qt.__)("preview"))})),(0,r.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,r.createElement)(ko.__experimentalHStack,{className:"editor-post-locked-modal__buttons",justify:"flex-end"},!i&&(0,r.createElement)(ko.Button,{variant:"tertiary",href:v},(0,Qt.__)("Take over")),(0,r.createElement)(ko.Button,{variant:"primary",href:b},E)))))}var Rr=(0,l.compose)((0,s.withSelect)((e=>{var t;const{isCurrentPostPublished:n,getCurrentPostType:o,getCurrentPost:r}=e(Jn);return{hasPublishAction:null!==(t=r()._links?.["wp:action-publish"])&&void 0!==t&&t,isPublished:n(),postType:o()}})))((function({hasPublishAction:e,isPublished:t,children:n}){return t||!e?null:n}));var Lr=(0,l.compose)((0,s.withSelect)((e=>({status:e(Jn).getEditedPostAttribute("status")}))),(0,s.withDispatch)((e=>({onUpdateStatus(t){e(Jn).editPost({status:t})}}))))((function({status:e,onUpdateStatus:t}){return(0,r.createElement)(Rr,null,(0,r.createElement)(ko.CheckboxControl,{__nextHasNoMarginBottom:!0,label:(0,Qt.__)("Pending review"),checked:"pending"===e,onChange:()=>{t("pending"===e?"draft":"pending")}}))}));var Or=(0,l.compose)([(0,s.withSelect)((e=>({pingStatus:e(Jn).getEditedPostAttribute("ping_status")}))),(0,s.withDispatch)((e=>({editPost:e(Jn).editPost})))])((function({pingStatus:e="open",...t}){return(0,r.createElement)(ko.CheckboxControl,{__nextHasNoMarginBottom:!0,label:(0,Qt.__)("Allow pingbacks & trackbacks"),checked:"open"===e,onChange:()=>t.editPost({ping_status:"open"===e?"closed":"open"})})}));class Ur extends r.Component{constructor(){super(...arguments),this.buttonRef=(0,r.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,r.renderToString)((0,r.createElement)("div",{className:"editor-post-preview-button__interstitial-message"},(0,r.createElement)(ko.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 96 96"},(0,r.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,r.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,r.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,i=e||t,s=ao()({"editor-post-preview":!this.props.className},this.props.className);return(0,r.createElement)(ko.Button,{variant:this.props.className?void 0:"tertiary",className:s,href:i,target:this.getWindowTarget(),disabled:!n,onClick:this.openPreviewWindow,ref:this.buttonRef,role:o},this.props.textContent?this.props.textContent:(0,r.createElement)(r.Fragment,null,(0,Qt._x)("Preview","imperative verb"),(0,r.createElement)(ko.VisuallyHidden,{as:"span"},(0,Qt.__)("(opens in a new tab)"))))}}var Fr=(0,l.compose)([(0,s.withSelect)(((e,{forcePreviewLink:t,forceIsAutosaveable:n})=>{var o;const{getCurrentPostId:r,getCurrentPostAttribute:i,getEditedPostAttribute:s,isEditedPostSaveable:l,isEditedPostAutosaveable:c,getEditedPostPreviewLink:u,isPostLocked:d}=e(Jn),{getPostType:p}=e(a.store),m=u(),h=p(s("type"));return{postId:r(),currentPostLink:i("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(s("status")),isPostLocked:d()}})),(0,s.withDispatch)((e=>({autosave:e(Jn).autosave,savePost:e(Jn).savePost}))),(0,l.ifCondition)((({isViewable:e})=>e))])(Ur);var Mr=(0,l.compose)([(0,s.withSelect)(((e,{forceIsSaving:t})=>{var n;const{isCurrentPostPublished:o,isEditedPostBeingScheduled:r,isSavingPost:i,isPublishingPost:s,getCurrentPost:a,getCurrentPostType:l,isAutosavingPost:c}=e(Jn);return{isPublished:o(),isBeingScheduled:r(),isSaving:t||i(),isPublishing:s(),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:r,isAutosaving:i,hasNonPostEntityChanges:s}){return o?(0,Qt.__)("Publishing…"):e&&n&&!i?(0,Qt.__)("Updating…"):t&&n&&!i?(0,Qt.__)("Scheduling…"):r?e?s?(0,Qt.__)("Update…"):(0,Qt.__)("Update"):t?s?(0,Qt.__)("Schedule…"):(0,Qt.__)("Schedule"):(0,Qt.__)("Publish"):s?(0,Qt.__)("Submit for Review…"):(0,Qt.__)("Submit for Review")}));const zr=()=>{};class Hr extends r.Component{constructor(e){super(e),this.buttonNode=(0,r.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)),zr):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:i,isPostSavingLocked:s,isPublishable:a,isPublished:l,isSaveable:c,isSaving:u,isAutoSaving:d,isToggle:p,onSave:m,onStatusChange:h,onSubmit:g=zr,onToggle:f,visibility:_,hasNonPostEntityChanges:v,isSavingNonPostEntityChanges:y}=this.props,b=(u||t||!c||s||!a&&!e)&&(!v||y),E=(l||u||t||!c||!a&&!e)&&(!v||y);let S;S=n?"private"===_?"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":i,className:"editor-post-publish-panel__toggle",isBusy:u&&l,variant:"primary",onClick:this.createOnClick((()=>{E||f()}))},P=o?(0,Qt.__)("Schedule…"):(0,Qt.__)("Publish"),C=(0,r.createElement)(Mr,{forceIsSaving:t,hasNonPostEntityChanges:v}),T=p?k:w,x=p?P:C;return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(ko.Button,{ref:this.buttonNode,...T,className:ao()(T.className,"editor-post-publish-button__button",{"has-changes-dot":v})},x))}}var Vr=(0,l.compose)([(0,s.withSelect)((e=>{var t;const{isSavingPost:n,isAutosavingPost:o,isEditedPostBeingScheduled:r,getEditedPostVisibility:i,isCurrentPostPublished:s,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:r(),visibility:i(),isSaveable:a(),isPostSavingLocked:c(),isPublishable:l(),isPublished:s(),hasPublishAction:null!==(t=u()._links?.["wp:action-publish"])&&void 0!==t&&t,postType:d(),postId:p(),hasNonPostEntityChanges:m(),isSavingNonPostEntityChanges:h()}})),(0,s.withDispatch)((e=>{const{editPost:t,savePost:n}=e(Jn);return{onStatusChange:e=>t({status:e},{undoIgnore:!0}),onSave:n}}))])(Hr);var Wr=(0,r.createElement)(S.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.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"}));var jr=(0,r.createElement)(S.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},(0,r.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"}));const $r={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 Gr({onClose:e}){const t=(0,l.useInstanceId)(Gr),{status:n,visibility:o,password:i}=(0,s.useSelect)((e=>({status:e(Jn).getEditedPostAttribute("status"),visibility:e(Jn).getEditedPostVisibility(),password:e(Jn).getEditedPostAttribute("password")}))),{editPost:a,savePost:c}=(0,s.useDispatch)(Jn),[d,p]=(0,r.useState)(!!i),[m,h]=(0,r.useState)(!1);return(0,r.createElement)("div",{className:"editor-post-visibility"},(0,r.createElement)(u.__experimentalInspectorPopoverHeader,{title:(0,Qt.__)("Visibility"),help:(0,Qt.__)("Control how this post is viewed."),onClose:e}),(0,r.createElement)("fieldset",{className:"editor-post-visibility__fieldset"},(0,r.createElement)(ko.VisuallyHidden,{as:"legend"},(0,Qt.__)("Visibility")),(0,r.createElement)(Kr,{instanceId:t,value:"public",label:$r.public.label,info:$r.public.info,checked:"public"===o&&!d,onChange:()=>{a({status:"private"===o?"draft":n,password:""}),p(!1)}}),(0,r.createElement)(Kr,{instanceId:t,value:"private",label:$r.private.label,info:$r.private.info,checked:"private"===o,onChange:()=>{h(!0)}}),(0,r.createElement)(Kr,{instanceId:t,value:"password",label:$r.password.label,info:$r.password.info,checked:d,onChange:()=>{a({status:"private"===o?"draft":n,password:i||""}),p(!0)}}),d&&(0,r.createElement)("div",{className:"editor-post-visibility__password"},(0,r.createElement)(ko.VisuallyHidden,{as:"label",htmlFor:`editor-post-visibility__password-input-${t}`},(0,Qt.__)("Create password")),(0,r.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:i,placeholder:(0,Qt.__)("Use a secure password")}))),(0,r.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 Kr({instanceId:e,value:t,label:n,info:o,...i}){return(0,r.createElement)("div",{className:"editor-post-visibility__choice"},(0,r.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",...i}),(0,r.createElement)("label",{htmlFor:`editor-post-${t}-${e}`,className:"editor-post-visibility__label"},n),(0,r.createElement)("p",{id:`editor-post-${t}-${e}-description`,className:"editor-post-visibility__info"},o))}function Yr(){return qr()}function qr(){const e=(0,s.useSelect)((e=>e(Jn).getEditedPostVisibility()));return $r[e]?.label}function Qr(e){return Qr="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},Qr(e)}function Xr(e,t){if(t.length<e)throw new TypeError(e+" argument"+(e>1?"s":"")+" required, but only "+t.length+" present")}function Zr(e){Xr(1,arguments);var t=Object.prototype.toString.call(e);return e instanceof Date||"object"===Qr(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 Jr(e){Xr(1,arguments);var t=Zr(e);return t.setDate(1),t.setHours(0,0,0,0),t}function ei(e){Xr(1,arguments);var t=Zr(e),n=t.getMonth();return t.setFullYear(t.getFullYear(),n+1,0),t.setHours(23,59,59,999),t}Math.pow(10,8);var ti=6e4,ni=36e5;function oi(e,t){var n;Xr(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 r,i=function(e){var t,n={},o=e.split(ri.dateTimeDelimiter);if(o.length>2)return n;/:/.test(o[0])?t=o[0]:(n.date=o[0],t=o[1],ri.timeZoneDelimiter.test(n.date)&&(n.date=e.split(ri.timeZoneDelimiter)[0],t=e.substr(n.date.length,e.length)));if(t){var r=ri.timezone.exec(t);r?(n.time=t.replace(r[1],""),n.timezone=r[1]):n.time=t}return n}(e);if(i.date){var s=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 r=o[1]?parseInt(o[1]):null,i=o[2]?parseInt(o[2]):null;return{year:null===i?r:100*i,restDateString:e.slice((o[1]||o[2]).length)}}(i.date,o);r=function(e,t){if(null===t)return new Date(NaN);var n=e.match(ii);if(!n)return new Date(NaN);var o=!!n[4],r=li(n[1]),i=li(n[2])-1,s=li(n[3]),a=li(n[4]),l=li(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 r=o.getUTCDay()||7,i=7*(t-1)+n+1-r;return o.setUTCDate(o.getUTCDate()+i),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<=(ui[t]||(di(e)?29:28))}(t,i,s)&&function(e,t){return t>=1&&t<=(di(e)?366:365)}(t,r)?(c.setUTCFullYear(t,i,Math.max(r,s)),c):new Date(NaN)}(s.restDateString,s.year)}if(!r||isNaN(r.getTime()))return new Date(NaN);var a,l=r.getTime(),c=0;if(i.time&&(c=function(e){var t=e.match(si);if(!t)return NaN;var n=ci(t[1]),o=ci(t[2]),r=ci(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,r))return NaN;return n*ni+o*ti+1e3*r}(i.time),isNaN(c)))return new Date(NaN);if(!i.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(ai);if(!t)return 0;var n="+"===t[1]?-1:1,o=parseInt(t[2]),r=t[3]&&parseInt(t[3])||0;if(!function(e,t){return t>=0&&t<=59}(0,r))return NaN;return n*(o*ni+r*ti)}(i.timezone),isNaN(a)?new Date(NaN):new Date(l+c+a)}var ri={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},ii=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,si=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,ai=/^([+-])(\d{2})(?::?(\d{2}))?$/;function li(e){return e?parseInt(e):1}function ci(e){return e&&parseFloat(e.replace(",","."))||0}var ui=[31,null,31,30,31,30,31,31,30,31,30,31];function di(e){return e%400==0||e%4==0&&e%100!=0}function pi({onClose:e}){const{postDate:t,postType:n}=(0,s.useSelect)((e=>({postDate:e(Jn).getEditedPostAttribute("date"),postType:e(Jn).getCurrentPostType()})),[]),{editPost:o}=(0,s.useDispatch)(Jn),[i,l]=(0,r.useState)(Jr(new Date(t))),c=(0,s.useSelect)((e=>e(a.store).getEntityRecords("postType",n,{status:"publish,future",after:Jr(i).toISOString(),before:ei(i).toISOString(),exclude:[e(Jn).getCurrentPostId()],per_page:100,_fields:"id,date"})),[i,n]),d=(0,r.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,r.createElement)(u.__experimentalPublishDateTimePicker,{currentDate:t,onChange:e=>o({date:e}),is12Hour:m,events:d,onMonthPreviewed:e=>l(oi(e)),onClose:e})}function mi(e){return hi(e)}function hi({full:e=!1}={}){const{date:t,isFloating:n}=(0,s.useSelect)((e=>({date:e(Jn).getEditedPostAttribute("date"),isFloating:e(Jn).isEditedPostDateFloating()})),[]);return e?gi(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 gi(e);const o=(0,v.getDate)(e);if(fi(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 r=new Date(n);if(r.setDate(r.getDate()+1),fi(o,r))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 gi(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 fi(e,t){return e.getDate()===t.getDate()&&e.getMonth()===t.getMonth()&&e.getFullYear()===t.getFullYear()}var _i=window.wp.a11y;const vi=3,yi={per_page:10,orderby:"count",order:"desc",hide_empty:!0,_fields:"id,name,count",context:"view"};function bi({onSelect:e,taxonomy:t}){const{_terms:n,showTerms:o}=(0,s.useSelect)((e=>{const n=e(a.store).getEntityRecords("taxonomy",t.slug,yi);return{_terms:n,showTerms:n?.length>=vi}}),[t.slug]);if(!o)return null;const i=rr(n);return(0,r.createElement)("div",{className:"editor-post-taxonomies__flat-term-most-used"},(0,r.createElement)(ko.BaseControl.VisualLabel,{as:"h3",className:"editor-post-taxonomies__flat-term-most-used-label"},t.labels.most_used),(0,r.createElement)("ul",{role:"list",className:"editor-post-taxonomies__flat-term-most-used-list"},i.map((t=>(0,r.createElement)("li",{key:t.id},(0,r.createElement)(ko.Button,{variant:"link",onClick:()=>e(t)},t.name))))))}const Ei=[],Si=20,wi={per_page:Si,_fields:"id,name",context:"view"},ki=(e,t)=>nr(e).toLowerCase()===nr(t).toLowerCase(),Pi=(e,t)=>e.map((e=>t.find((t=>ki(t.name,e))).id));function Ci({slug:e}){var t,n;const[o,i]=(0,r.useState)([]),[c,u]=(0,r.useState)(""),d=(0,l.useDebounce)(u,500),{terms:p,termIds:m,taxonomy:h,hasAssignAction:g,hasCreateAction:f,hasResolvedTerms:_}=(0,s.useSelect)((t=>{var n,o;const{getCurrentPost:r,getEditedPostAttribute:i}=t(Jn),{getEntityRecords:s,getTaxonomy:l,hasFinishedResolution:c}=t(a.store),u=r(),d=l(e),p=d?i(d.rest_base):Ei,m={...wi,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?s("taxonomy",e,m):Ei,hasResolvedTerms:c("getEntityRecords",["taxonomy",e,m])}}),[e]),{searchResults:v}=(0,s.useSelect)((t=>{const{getEntityRecords:n}=t(a.store);return{searchResults:c?n("taxonomy",e,{...wi,search:c}):Ei}}),[c,e]);(0,r.useEffect)((()=>{if(_){const e=(null!=p?p:[]).map((e=>nr(e.name)));i(e)}}),[p,_]);const y=(0,r.useMemo)((()=>(null!=v?v:[]).map((e=>nr(e.name)))),[v]),{editPost:b}=(0,s.useDispatch)(Jn),{saveEntityRecord:E}=(0,s.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,r.createElement)(r.Fragment,null,(0,r.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)),[]),r=o.filter((e=>!n.find((t=>ki(t.name,e)))));if(i(o),0===r.length)return S(Pi(o,n));f&&Promise.all(r.map((t=>async function(t){try{const n=await E("taxonomy",e,t,{throwOnError:!0});return or(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(Pi(o,t))}))},onInputChange:d,maxSuggestions:Si,label:w,messages:{added:P,removed:C,remove:T}}),(0,r.createElement)(bi,{taxonomy:h,onSelect:function(t){var n;if(m.includes(t.id))return;const o=[...m,t.id],r="post_tag"===e?(0,Qt.__)("Tag"):(0,Qt.__)("Term"),i=(0,Qt.sprintf)((0,Qt._x)("%s added","term"),null!==(n=h?.labels?.singular_name)&&void 0!==n?n:r);(0,_i.speak)(i,"assertive"),S(o)}}))}var Ti=(0,ko.withFilters)("editor.PostTaxonomyType")(Ci);const xi=()=>{const e=[(0,Qt.__)("Suggestion:"),(0,r.createElement)("span",{className:"editor-post-publish-panel__link",key:"label"},(0,Qt.__)("Add tags"))];return(0,r.createElement)(ko.PanelBody,{initialOpen:!1,title:e},(0,r.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,r.createElement)(Ti,{slug:"post_tag"}))};class Bi extends r.Component{constructor(e){super(e),this.state={hadTagsWhenOpeningThePanel:e.hasTags}}render(){return this.state.hadTagsWhenOpeningThePanel?null:(0,r.createElement)(xi,null)}}var Ii=(0,l.compose)((0,s.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)))(Bi);const Ai=(e,t)=>xr.filter((t=>e?.includes(t.id))).find((e=>e.id===t)),Ni=({suggestedPostFormat:e,suggestionText:t,onUpdatePostFormat:n})=>(0,r.createElement)(ko.Button,{variant:"link",onClick:()=>n(e)},t);function Di(){const{currentPostFormat:e,suggestion:t}=(0,s.useSelect)((e=>{var t;const{getEditedPostAttribute:n,getSuggestedPostFormat:o}=e(Jn),r=null!==(t=e(a.store).getThemeSupports().formats)&&void 0!==t?t:[];return{currentPostFormat:n("format"),suggestion:Ai(r,o())}}),[]),{editPost:n}=(0,s.useDispatch)(Jn),o=[(0,Qt.__)("Suggestion:"),(0,r.createElement)("span",{className:"editor-post-publish-panel__link",key:"label"},(0,Qt.__)("Use a post format"))];return t&&t.id!==e?(0,r.createElement)(ko.PanelBody,{initialOpen:!1,title:o},(0,r.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,r.createElement)("p",null,(0,r.createElement)(Ni,{onUpdatePostFormat:e=>n({format:e}),suggestedPostFormat:t.id,suggestionText:(0,Qt.sprintf)((0,Qt.__)('Apply the "%1$s" format.'),t.caption)}))):null}const Ri={per_page:-1,orderby:"name",order:"asc",_fields:"id,name,parent",context:"view"},Li=8,Oi=[];function Ui({slug:e}){var t,n;const[o,i]=(0,r.useState)(!1),[c,u]=(0,r.useState)(""),[d,p]=(0,r.useState)(""),[m,h]=(0,r.useState)(!1),[g,f]=(0,r.useState)(""),[_,v]=(0,r.useState)([]),y=(0,l.useDebounce)(_i.speak,500),{hasCreateAction:b,hasAssignAction:E,terms:S,loading:w,availableTerms:k,taxonomy:P}=(0,s.useSelect)((t=>{var n,o;const{getCurrentPost:r,getEditedPostAttribute:i}=t(Jn),{getTaxonomy:s,getEntityRecords:l,isResolving:c}=t(a.store),u=s(e),d=r();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?i(u.rest_base):Oi,loading:c("getEntityRecords",["taxonomy",e,Ri]),availableTerms:l("taxonomy",e,Ri)||Oi,taxonomy:u}}),[e]),{editPost:C}=(0,s.useDispatch)(Jn),{saveEntityRecord:T}=(0,s.useDispatch)(a.store),x=(0,r.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),r=n(t);return o===r?0:o&&!r?-1:!o&&r?1:0})),o}(tr(k),S)),[k]);if(!E)return null;const B=e=>{C({[P.rest_base]:e})},I=e=>e.map((e=>(0,r.createElement)("div",{key:e.id,className:"editor-post-taxonomies__hierarchical-terms-choice"},(0,r.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,No.decodeEntities)(e.name)}),!!e.children.length&&(0,r.createElement)("div",{className:"editor-post-taxonomies__hierarchical-terms-subchoices"},I(e.children))))),A=(t,n,o)=>{var r;return null!==(r=P?.labels?.[t])&&void 0!==r?r:"category"===e?n:o},N=A("add_new_item",(0,Qt.__)("Add new category"),(0,Qt.__)("Add new term")),D=A("new_item_name",(0,Qt.__)("Add new category"),(0,Qt.__)("Add new term")),R=A("parent_item",(0,Qt.__)("Parent Category"),(0,Qt.__)("Parent Term")),L=`${R}`,O=N,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>=Li;return(0,r.createElement)(ko.Flex,{direction:"column",gap:"4"},M&&(0,r.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};f(e),v(t);const o=n(t),r=(0,Qt.sprintf)((0,Qt._n)("%d result found.","%d results found.",o),o);y(r,"assertive")}}),(0,r.createElement)("div",{className:"editor-post-taxonomies__hierarchical-terms-list",tabIndex:"0",role:"group","aria-label":F},I(""!==g?_:x)),!w&&b&&(0,r.createElement)(ko.FlexItem,null,(0,r.createElement)(ko.Button,{onClick:()=>{h(!m)},className:"editor-post-taxonomies__hierarchical-terms-add","aria-expanded":m,variant:"link"},N)),m&&(0,r.createElement)("form",{onSubmit:async t=>{var n;if(t.preventDefault(),""===c||o)return;const r=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(r)return S.some((e=>e===r.id))||B([...S,r.id]),u(""),void p("");i(!0);const s=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,_i.speak)(m,"assertive"),i(!1),u(""),p(""),B([...S,s.id])}},(0,r.createElement)(ko.Flex,{direction:"column",gap:"4"},(0,r.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,r.createElement)(ko.TreeSelect,{__nextHasNoMarginBottom:!0,label:R,noOptionLabel:L,onChange:e=>{p(e)},selectedId:d,tree:x}),(0,r.createElement)(ko.FlexItem,null,(0,r.createElement)(ko.Button,{variant:"secondary",type:"submit",className:"editor-post-taxonomies__hierarchical-terms-submit"},O)))))}var Fi=(0,ko.withFilters)("editor.PostTaxonomyType")(Ui);var Mi=function(){const e=(0,s.useSelect)((e=>{const t=e(Jn).getCurrentPostType(),{canUser:n,getEntityRecord:o,getTaxonomy:r}=e(a.store),i=r("category"),s=n("read","settings")?o("root","site")?.default_category:void 0,l=s?o("taxonomy","category",s):void 0,c=i&&i.types.some((e=>e===t)),u=i&&e(Jn).getEditedPostAttribute(i.rest_base);return!!i&&!!l&&c&&(0===u?.length||1===u?.length&&l?.id===u[0])}),[]),[t,n]=(0,r.useState)(!1);if((0,r.useEffect)((()=>{e&&n(!0)}),[e]),!t)return null;const o=[(0,Qt.__)("Suggestion:"),(0,r.createElement)("span",{className:"editor-post-publish-panel__link",key:"label"},(0,Qt.__)("Assign a category"))];return(0,r.createElement)(ko.PanelBody,{initialOpen:!1,title:o},(0,r.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,r.createElement)(Fi,{slug:"category"}))};var zi=(0,r.createElement)(S.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.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 Hi(e){const t=[];return e.forEach((e=>{t.push(e),t.push(...Hi(e.innerBlocks))})),t}function Vi(e){const{selectBlock:t}=(0,s.useDispatch)(u.store);return(0,r.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 Wi(){const[e,t]=(0,r.useState)(!1),{editorBlocks:n,mediaUpload:o}=(0,s.useSelect)((e=>({editorBlocks:e(Jn).getEditorBlocks(),mediaUpload:e(u.store).getSettings().mediaUpload})),[]),i=Hi(n).filter((e=>"core/image"===e.name&&e.attributes.url&&!e.attributes.id)),{updateBlockAttributes:a}=(0,s.useDispatch)(u.store);if(!o||!i.length)return null;const l=[(0,Qt.__)("Suggestion:"),(0,r.createElement)("span",{className:"editor-post-publish-panel__link",key:"label"},(0,Qt.__)("External media"))];return(0,r.createElement)(ko.PanelBody,{initialOpen:!0,title:l},(0,r.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,r.createElement)("div",{style:{display:"inline-flex",flexWrap:"wrap",gap:"8px"}},(0,r.createElement)(ko.__unstableAnimatePresence,null,i.map((e=>(0,r.createElement)(Vi,{key:e.clientId,...e})))),e?(0,r.createElement)(ko.Spinner,null):(0,r.createElement)(ko.Button,{icon:zi,variant:"primary",onClick:function(){t(!0),Promise.all(i.map((e=>window.fetch(e.attributes.url.includes("?")?e.attributes.url:e.attributes.url+"?").then((e=>e.blob())).then((t=>new Promise(((n,r)=>{o({filesList:[t],onFileChange:([t])=>{(0,_r.isBlobURL)(t.url)||(a(e.clientId,{id:t.id,url:t.url}),n())},onError(){r()}})}))))))).finally((()=>{t(!1)}))}},(0,Qt.__)("Upload all"))))}var ji=function({children:e}){const{isBeingScheduled:t,isRequestingSiteIcon:n,hasPublishAction:o,siteIconUrl:i,siteTitle:l,siteHome:c}=(0,s.useSelect)((e=>{var t;const{getCurrentPost:n,isEditedPostBeingScheduled:o}=e(Jn),{getEntityRecord:r,isResolving:i}=e(a.store),s=r("root","__unstableBase",void 0)||{};return{hasPublishAction:null!==(t=n()._links?.["wp:action-publish"])&&void 0!==t&&t,isBeingScheduled:o(),isRequestingSiteIcon:i("getEntityRecord",["root","__unstableBase",void 0]),siteIconUrl:s.site_icon_url,siteTitle:s.name,siteHome:s.home&&(0,y.filterURLForDisplay)(s.home)}}),[]);let u,d,p=(0,r.createElement)(ko.Icon,{className:"components-site-icon",size:"36px",icon:jr});return i&&(p=(0,r.createElement)("img",{alt:(0,Qt.__)("Site Icon"),className:"components-site-icon",src:i})),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 youre ready, submit your work for review, and an Editor will be able to approve it for you.")),(0,r.createElement)("div",{className:"editor-post-publish-panel__prepublish"},(0,r.createElement)("div",null,(0,r.createElement)("strong",null,u)),(0,r.createElement)("p",null,d),(0,r.createElement)("div",{className:"components-site-card"},p,(0,r.createElement)("div",{className:"components-site-info"},(0,r.createElement)("span",{className:"components-site-name"},(0,No.decodeEntities)(l)||(0,Qt.__)("(Untitled)")),(0,r.createElement)("span",{className:"components-site-home"},c))),(0,r.createElement)(Wi,null),o&&(0,r.createElement)(r.Fragment,null,(0,r.createElement)(ko.PanelBody,{initialOpen:!1,title:[(0,Qt.__)("Visibility:"),(0,r.createElement)("span",{className:"editor-post-publish-panel__link",key:"label"},(0,r.createElement)(Yr,null))]},(0,r.createElement)(Gr,null)),(0,r.createElement)(ko.PanelBody,{initialOpen:!1,title:[(0,Qt.__)("Publish:"),(0,r.createElement)("span",{className:"editor-post-publish-panel__link",key:"label"},(0,r.createElement)(mi,null))]},(0,r.createElement)(pi,null))),(0,r.createElement)(Di,null),(0,r.createElement)(Ii,null),(0,r.createElement)(Mi,null),e)};const $i="%postname%",Gi="%pagename%";function Ki({text:e,onCopy:t,children:n}){const o=(0,l.useCopyToClipboard)(e,t);return(0,r.createElement)(ko.Button,{variant:"secondary",ref:o},n)}class Yi extends r.Component{constructor(){super(...arguments),this.state={showCopyConfirmation:!1},this.onCopy=this.onCopy.bind(this),this.onSelectInput=this.onSelectInput.bind(this),this.postLink=(0,r.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,i=o?.labels?.singular_name,s=o?.labels?.view_item,a=o?.labels?.add_new_item,l="future"===n.status?(e=>{const{slug:t}=e;return e.permalink_template.includes($i)?e.permalink_template.replace($i,t):e.permalink_template.includes(Gi)?e.permalink_template.replace(Gi,t):e.permalink_template})(n):n.link,c=(0,y.addQueryArgs)("post-new.php",{post_type:n.type}),u=t?(0,r.createElement)(r.Fragment,null,(0,Qt.__)("is now scheduled. It will go live on")," ",(0,r.createElement)(mi,null),"."):(0,Qt.__)("is now live.");return(0,r.createElement)("div",{className:"post-publish-panel__postpublish"},(0,r.createElement)(ko.PanelBody,{className:"post-publish-panel__postpublish-header"},(0,r.createElement)("a",{ref:this.postLink,href:l},(0,No.decodeEntities)(n.title)||(0,Qt.__)("(no title)"))," ",u),(0,r.createElement)(ko.PanelBody,null,(0,r.createElement)("p",{className:"post-publish-panel__postpublish-subheader"},(0,r.createElement)("strong",null,(0,Qt.__)("Whats next?"))),(0,r.createElement)("div",{className:"post-publish-panel__postpublish-post-address-container"},(0,r.createElement)(ko.TextControl,{__nextHasNoMarginBottom:!0,className:"post-publish-panel__postpublish-post-address",readOnly:!0,label:(0,Qt.sprintf)((0,Qt.__)("%s address"),i),value:(0,y.safeDecodeURIComponent)(l),onFocus:this.onSelectInput}),(0,r.createElement)("div",{className:"post-publish-panel__postpublish-post-address__copy-button-wrap"},(0,r.createElement)(Ki,{text:l,onCopy:this.onCopy},this.state.showCopyConfirmation?(0,Qt.__)("Copied!"):(0,Qt.__)("Copy")))),(0,r.createElement)("div",{className:"post-publish-panel__postpublish-buttons"},!t&&(0,r.createElement)(ko.Button,{variant:"primary",href:l},s),(0,r.createElement)(ko.Button,{variant:t?"primary":"secondary",href:c},a))),e)}}var qi=(0,s.withSelect)((e=>{const{getEditedPostAttribute:t,getCurrentPost:n,isCurrentPostScheduled:o}=e(Jn),{getPostType:r}=e(a.store);return{post:n(),postType:r(t("type")),isScheduled:o()}}))(Yi);class Qi extends r.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:i,isScheduled:s,isSaving:a,isSavingNonPostEntityChanges:l,onClose:c,onTogglePublishSidebar:u,PostPublishExtension:d,PrePublishExtension:p,...m}=this.props,{hasPublishAction:h,isDirty:g,isPostTypeViewable:f,..._}=m,v=o||s&&n,y=!v&&!a,b=v&&!a;return(0,r.createElement)("div",{className:"editor-post-publish-panel",..._},(0,r.createElement)("div",{className:"editor-post-publish-panel__header"},b?(0,r.createElement)(ko.Button,{onClick:c,icon:Wr,label:(0,Qt.__)("Close panel")}):(0,r.createElement)(r.Fragment,null,(0,r.createElement)("div",{className:"editor-post-publish-panel__header-publish-button"},(0,r.createElement)(Vr,{focusOnMount:!0,onSubmit:this.onSubmit,forceIsDirty:e,forceIsSaving:t})),(0,r.createElement)("div",{className:"editor-post-publish-panel__header-cancel-button"},(0,r.createElement)(ko.Button,{disabled:l,onClick:c,variant:"secondary"},(0,Qt.__)("Cancel"))))),(0,r.createElement)("div",{className:"editor-post-publish-panel__content"},y&&(0,r.createElement)(ji,null,p&&(0,r.createElement)(p,null)),b&&(0,r.createElement)(qi,{focusOnMount:!0},d&&(0,r.createElement)(d,null)),a&&(0,r.createElement)(ko.Spinner,null)),(0,r.createElement)("div",{className:"editor-post-publish-panel__footer"},(0,r.createElement)(ko.CheckboxControl,{__nextHasNoMarginBottom:!0,label:(0,Qt.__)("Always show pre-publish checks."),checked:i,onChange:u})))}}var Xi=(0,l.compose)([(0,s.withSelect)((e=>{var t;const{getPostType:n}=e(a.store),{getCurrentPost:o,getEditedPostAttribute:r,isCurrentPostPublished:i,isCurrentPostScheduled:s,isEditedPostBeingScheduled:l,isEditedPostDirty:c,isSavingPost:u,isSavingNonPostEntityChanges:d}=e(Jn),{isPublishSidebarEnabled:p}=e(Jn),m=n(r("type"));return{hasPublishAction:null!==(t=o()._links?.["wp:action-publish"])&&void 0!==t&&t,isPostTypeViewable:m?.viewable,isBeingScheduled:l(),isDirty:c(),isPublished:i(),isPublishSidebarEnabled:p(),isSaving:u(),isSavingNonPostEntityChanges:d(),isScheduled:s()}})),(0,s.withDispatch)(((e,{isPublishSidebarEnabled:t})=>{const{disablePublishSidebar:n,enablePublishSidebar:o}=e(Jn);return{onTogglePublishSidebar:()=>{t?n():o()}}})),ko.withFocusReturn,ko.withConstrainedTabbing])(Qi);var Zi=(0,r.createElement)(S.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.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"}));var Ji=function({icon:e,size:t=24,...n}){return(0,r.cloneElement)(e,{width:t,height:t,...n})};var es=(0,r.createElement)(S.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.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"}));var ts=(0,r.createElement)(S.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.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 ns({forceIsDirty:e,forceIsSaving:t,showIconLabels:n=!1}){const[o,i]=(0,r.useState)(!1),a=(0,l.useViewportMatch)("small"),{isAutosaving:c,isDirty:u,isNew:d,isPending:p,isPublished:m,isSaveable:h,isSaving:g,isScheduled:f,hasPublishAction:_}=(0,s.useSelect)((n=>{var o;const{isEditedPostNew:r,isCurrentPostPublished:i,isCurrentPostScheduled:s,isEditedPostDirty:a,isSavingPost:l,isEditedPostSaveable:c,getCurrentPost:u,isAutosavingPost:d,getEditedPostAttribute:p}=n(Jn);return{isAutosaving:d(),isDirty:e||a(),isNew:r(),isPending:"pending"===p("status"),isPublished:i(),isSaving:t||l(),isSaveable:c(),isScheduled:s(),hasPublishAction:null!==(o=u()?._links?.["wp:action-publish"])&&void 0!==o&&o}}),[e,t]),{savePost:v}=(0,s.useDispatch)(Jn),y=(0,l.usePrevious)(g);if((0,r.useEffect)((()=>{let e;return y&&!g&&(i(!0),e=setTimeout((()=>{i(!1)}),1e3)),()=>clearTimeout(e)}),[g]),!_&&p)return null;if(m||f)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,r.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:Zi,label:P||b,"aria-disabled":k},w&&(0,r.createElement)(Ji,{icon:S?es:ts}),P)}var os=(0,l.compose)([(0,s.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 rs({children:e}){return(0,r.createElement)(Qo,{supportKeys:"slug"},e)}class is extends r.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,r=(0,y.cleanForSlug)(o);r!==t&&n(r)}render(){const{editedSlug:e}=this.state;return(0,r.createElement)(rs,null,(0,r.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"}))}}var ss=(0,l.compose)([(0,s.withSelect)((e=>{const{getCurrentPost:t,getEditedPostAttribute:n}=e(Jn),{id:o}=t();return{postSlug:n("slug"),postTitle:n("title"),postID:o}})),(0,s.withDispatch)((e=>{const{editPost:t}=e(Jn);return{onUpdateSlug(e){t({slug:e})}}}))])(is);var as=(0,l.compose)([(0,s.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}));var ls=(0,l.compose)([(0,s.withSelect)((e=>({postSticky:e(Jn).getEditedPostAttribute("sticky")}))),(0,s.withDispatch)((e=>({onUpdateSticky(t){e(Jn).editPost({sticky:t})}})))])((function({onUpdateSticky:e,postSticky:t=!1}){return(0,r.createElement)(as,null,(0,r.createElement)(ko.CheckboxControl,{__nextHasNoMarginBottom:!0,label:(0,Qt.__)("Stick to the top of the blog"),checked:t,onChange:()=>e(!t)}))}));var cs=(0,l.compose)([(0,s.withSelect)((e=>{const{isSavingPost:t,isCurrentPostPublished:n,isCurrentPostScheduled:o}=e(Jn);return{isSaving:t(),isPublished:n(),isScheduled:o()}})),(0,s.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[i,s]=(0,r.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,r.createElement)(ko.FlexItem,{isBlock:!0},(0,r.createElement)(ko.Button,{className:"editor-post-switch-to-draft",onClick:()=>{s(!0)},disabled:e,variant:"secondary",style:{width:"100%",display:"block"}},(0,Qt.__)("Switch to draft")),(0,r.createElement)(ko.__experimentalConfirmDialog,{isOpen:i,onConfirm:()=>{s(!1),o()},onCancel:()=>s(!1)},a))}));function us(){const{meta:e,postType:t}=(0,s.useSelect)((e=>{const{getEditedPostAttribute:t}=e(Jn);return{meta:t("meta"),postType:t("type")}}),[]);if("wp_block"!==t)return null;const n=e?.sync_status,o=!n;return(0,r.createElement)(ko.PanelRow,{className:"edit-post-sync-status"},(0,r.createElement)("span",null,(0,Qt.__)("Sync status")),(0,r.createElement)("div",null,o?(0,Qt.__)("Fully synced"):(0,Qt.__)("Not synced")))}const ds=e=>e;var ps=(0,l.compose)([(0,s.withSelect)((e=>({postType:e(Jn).getCurrentPostType(),taxonomies:e(a.store).getTaxonomies({per_page:-1})})))])((function({postType:e,taxonomies:t,taxonomyWrapper:n=ds}){return(null!=t?t:[]).filter((t=>t.types.includes(e))).filter((e=>e.visibility?.show_ui)).map((e=>{const t=e.hierarchical?Fi:Ti;return(0,r.createElement)(r.Fragment,{key:`taxonomy-${e.slug}`},n((0,r.createElement)(t,{slug:e.slug}),e))}))}));var ms=(0,l.compose)([(0,s.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})),hs=n(773);function gs(){const e=(0,s.useSelect)((e=>e(Jn).getEditedPostContent()),[]),{editPost:t,resetEditorBlocks:n}=(0,s.useDispatch)(Jn),[o,a]=(0,r.useState)(e),[c,u]=(0,r.useState)(!1),d=(0,l.useInstanceId)(gs),p=(0,r.useRef)();c||o===e||a(e);return(0,r.useEffect)((()=>()=>{if(p.current){const e=(0,i.parse)(p.current);n(e)}}),[]),(0,r.createElement)(r.Fragment,null,(0,r.createElement)(ko.VisuallyHidden,{as:"label",htmlFor:`post-content-${d}`},(0,Qt.__)("Type text or HTML")),(0,r.createElement)(hs.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,i.parse)(o);n(e),u(!1)}},className:"editor-post-text-editor",id:`post-content-${d}`,placeholder:(0,Qt.__)("Start writing with text or HTML")}))}var fs=window.wp.dom;const _s=/[\r\n]+/g;var vs=(0,r.forwardRef)((function(e,t){const n=(0,r.useRef)(),[o,a]=(0,r.useState)(!1),{editPost:c}=(0,s.useDispatch)(Jn),{insertDefaultBlock:d,clearSelectedBlock:p,insertBlocks:m}=(0,s.useDispatch)(u.store),{isCleanNewPost:h,title:g,placeholder:f,hasFixedToolbar:_}=(0,s.useSelect)((e=>{const{getEditedPostAttribute:t,isCleanNewPost:n}=e(Jn),{getSettings:o}=e(u.store),{titlePlaceholder:r,hasFixedToolbar:i}=o();return{isCleanNewPost:n(),title:t("title"),placeholder:r,hasFixedToolbar:i}}),[]);function v(e){m(e,0)}function y(e){c({title:e})}(0,r.useImperativeHandle)(t,(()=>({focus:()=>{n?.current?.focus()}}))),(0,r.useEffect)((()=>{if(!n.current)return;const{defaultView:e}=n.current.ownerDocument,{name:t,parent:o}=e,r="editor-canvas"===t?o.document:e.document,{activeElement:i,body:s}=r;!h||i&&s!==i||n.current.focus()}),[h]);const[b,E]=(0,r.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":_}),k=(0,No.decodeEntities)(f)||(0,Qt.__)("Add title"),{ref:P}=(0,io.__unstableUseRichText)({value:g,onChange:function(e){y(e.replace(_s," "))},placeholder:k,selectionStart:b.start,selectionEnd:b.end,onSelectionChange(e,t){E((n=>{const{start:o,end:r}=n;return o===e&&r===t?n:{start:e,end:t}}))},__unstableDisableFormats:!0,preserveWhiteSpace:!0});return(0,r.createElement)(Qo,{supportKeys:"title"},(0,r.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 r=(0,i.pasteHandler)({HTML:o,plainText:n});if(e.preventDefault(),r.length)if("string"!=typeof r){const[e]=r;g||"core/heading"!==e.name&&"core/paragraph"!==e.name?v(r):(y((0,fs.__unstableStripHTML)(e.attributes.content)),v(r.slice(1)))}else{const e={...(0,io.create)({html:g}),...b},t=(0,io.insert)(e,(0,io.create)({html:(0,fs.__unstableStripHTML)(r)}));y((0,io.toHTMLString)({value:t})),E({start:t.start,end:t.end})}}}))}));function ys(){const{isNew:e,isDeleting:t,postId:n}=(0,s.useSelect)((e=>{const t=e(Jn);return{isNew:t.isEditedPostNew(),isDeleting:t.isDeletingPost(),postId:t.getCurrentPostId()}}),[]),{trashPost:o}=(0,s.useDispatch)(Jn);return e||!n?null:(0,r.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"))}var bs=(0,s.withSelect)((e=>{const{isEditedPostNew:t,getCurrentPostId:n,getCurrentPostType:o}=e(Jn),{getPostType:r,canUser:i}=e(a.store),s=n(),l=r(o()),c=l?.rest_base||"";return{isNew:t(),postId:s,canUserDelete:!(!s||!c)&&i("delete",c,s)}}))((function({isNew:e,postId:t,canUserDelete:n,children:o}){return!e&&t&&n?o:null}));function Es({onClose:e}){const{isEditable:t,postSlug:n,viewPostLabel:o,postLink:i,permalinkPrefix:l,permalinkSuffix:c}=(0,s.useSelect)((e=>{var t;const n=e(Jn).getCurrentPost(),o=e(Jn).getCurrentPostType(),r=e(a.store).getPostType(o),i=e(Jn).getPermalinkParts(),s=null!==(t=n?._links?.["wp:action-publish"])&&void 0!==t&&t;return{isEditable:e(Jn).isPermalinkEditable()&&s,postSlug:(0,y.safeDecodeURIComponent)(e(Jn).getEditedPostSlug()),viewPostLabel:r?.labels.view_item,postLink:n.link,permalinkPrefix:i?.prefix,permalinkSuffix:i?.suffix}}),[]),{editPost:d}=(0,s.useDispatch)(Jn),[p,m]=(0,r.useState)(!1);return(0,r.createElement)("div",{className:"editor-post-url"},(0,r.createElement)(u.__experimentalInspectorPopoverHeader,{title:(0,Qt.__)("URL"),onClose:e}),t&&(0,r.createElement)(ko.TextControl,{__nextHasNoMarginBottom:!0,label:(0,Qt.__)("Permalink"),value:p?"":n,autoComplete:"off",spellCheck:"false",help:(0,r.createElement)(r.Fragment,null,(0,Qt.__)("The last part of the URL.")," ",(0,r.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,r.createElement)("h3",{className:"editor-post-url__link-label"},null!=o?o:(0,Qt.__)("View post")),(0,r.createElement)("p",null,(0,r.createElement)(ko.ExternalLink,{className:"editor-post-url__link",href:i,target:"_blank"},t?(0,r.createElement)(r.Fragment,null,(0,r.createElement)("span",{className:"editor-post-url__link-prefix"},l),(0,r.createElement)("span",{className:"editor-post-url__link-slug"},n),(0,r.createElement)("span",{className:"editor-post-url__link-suffix"},c)):i)))}function Ss({children:e}){const t=(0,s.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 ws(){return ks()}function ks(){const e=(0,s.useSelect)((e=>e(Jn).getPermalink()),[]);return(0,y.filterURLForDisplay)((0,y.safeDecodeURIComponent)(e))}var Ps=(0,l.compose)([(0,s.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})}));var Cs=(0,r.createElement)(S.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.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"})),Ts=window.wp.wordcount;function xs(){const e=(0,s.useSelect)((e=>e(Jn).getEditedPostAttribute("content")),[]),t=(0,Qt._x)("words","Word count type. Do not translate!");return(0,r.createElement)("span",{className:"word-count"},(0,Ts.count)(e,t))}const Bs=189;function Is(){const e=(0,s.useSelect)((e=>e(Jn).getEditedPostAttribute("content")),[]),t=(0,Qt._x)("words","Word count type. Do not translate!"),n=Math.round((0,Ts.count)(e,t)/Bs),o=0===n?(0,r.createInterpolateElement)((0,Qt.__)("<span>< 1</span> minute"),{span:(0,r.createElement)("span",null)}):(0,r.createInterpolateElement)((0,Qt.sprintf)((0,Qt._n)("<span>%d</span> minute","<span>%d</span> minutes",n),n),{span:(0,r.createElement)("span",null)});return(0,r.createElement)("span",{className:"time-to-read"},o)}function As(){const e=(0,s.useSelect)((e=>e(Jn).getEditedPostAttribute("content")),[]);return(0,Ts.count)(e,"characters_including_spaces")}var Ns=function({hasOutlineItemsDisabled:e,onRequestClose:t}){const{headingCount:n,paragraphCount:o,numberOfBlocks:i}=(0,s.useSelect)((e=>{const{getGlobalBlockCount:t}=e(u.store);return{headingCount:t("core/heading"),paragraphCount:t("core/paragraph"),numberOfBlocks:t()}}),[]);return(0,r.createElement)(r.Fragment,null,(0,r.createElement)("div",{className:"table-of-contents__wrapper",role:"note","aria-label":(0,Qt.__)("Document Statistics"),tabIndex:"0"},(0,r.createElement)("ul",{role:"list",className:"table-of-contents__counts"},(0,r.createElement)("li",{className:"table-of-contents__count"},(0,Qt.__)("Words"),(0,r.createElement)(xs,null)),(0,r.createElement)("li",{className:"table-of-contents__count"},(0,Qt.__)("Characters"),(0,r.createElement)("span",{className:"table-of-contents__number"},(0,r.createElement)(As,null))),(0,r.createElement)("li",{className:"table-of-contents__count"},(0,Qt.__)("Time to read"),(0,r.createElement)(Is,null)),(0,r.createElement)("li",{className:"table-of-contents__count"},(0,Qt.__)("Headings"),(0,r.createElement)("span",{className:"table-of-contents__number"},n)),(0,r.createElement)("li",{className:"table-of-contents__count"},(0,Qt.__)("Paragraphs"),(0,r.createElement)("span",{className:"table-of-contents__number"},o)),(0,r.createElement)("li",{className:"table-of-contents__count"},(0,Qt.__)("Blocks"),(0,r.createElement)("span",{className:"table-of-contents__number"},i)))),n>0&&(0,r.createElement)(r.Fragment,null,(0,r.createElement)("hr",null),(0,r.createElement)("h2",{className:"table-of-contents__title"},(0,Qt.__)("Document Outline")),(0,r.createElement)(fo,{onSelect:t,hasOutlineItemsDisabled:e})))};var Ds=(0,r.forwardRef)((function({hasOutlineItemsDisabled:e,repositionDropdown:t,...n},o){const i=(0,s.useSelect)((e=>!!e(u.store).getBlockCount()),[]);return(0,r.createElement)(ko.Dropdown,{popoverProps:{placement:t?"right":"bottom"},className:"table-of-contents",contentClassName:"table-of-contents__popover",renderToggle:({isOpen:e,onToggle:t})=>(0,r.createElement)(ko.Button,{...n,ref:o,onClick:i?t:void 0,icon:Cs,"aria-expanded":e,"aria-haspopup":"true",label:(0,Qt.__)("Details"),tooltipPosition:"bottom","aria-disabled":!i}),renderContent:({onClose:t})=>(0,r.createElement)(Ns,{onRequestClose:t,hasOutlineItemsDisabled:e})})}));function Rs(){const e=(0,s.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,r.useEffect)((()=>(window.addEventListener("beforeunload",t),()=>{window.removeEventListener("beforeunload",t)})),[]),null}var Ls=window.wp.reusableBlocks;var Os=(0,l.createHigherOrderComponent)((e=>(0,s.withRegistry)((t=>{const{useSubRegistry:n=!0,registry:o,...i}=t;if(!n)return(0,r.createElement)(e,{...i});const[a,l]=(0,r.useState)(null);return(0,r.useEffect)((()=>{const e=(0,s.createRegistry)({"core/block-editor":u.storeConfig},o);e.registerStore("core/editor",Zn),l(e)}),[o]),a?(0,r.createElement)(s.RegistryProvider,{value:a},(0,r.createElement)(e,{...i})):null}))),"withRegistryProvider");const Us=(e,t)=>`<a ${Fs(e)}>${t}</a>`,Fs=e=>`href="${e}" target="_blank" rel="noreferrer noopener"`,Ms=e=>{const{title:t,foreign_landing_url:n,creator:o,creator_url:r,license:i,license_version:s,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})(i,s),c=(0,No.decodeEntities)(o);let u;return u=c?t?(0,Qt.sprintf)((0,Qt._x)('"%1$s" by %2$s/ %3$s',"caption"),Us(n,(0,No.decodeEntities)(t)),r?Us(r,c):c,a?Us(`${a}?ref=openverse`,l):l):(0,Qt.sprintf)((0,Qt._x)("<a %1$s>Work</a> by %2$s/ %3$s","caption"),Fs(n),r?Us(r,c):c,a?Us(`${a}?ref=openverse`,l):l):t?(0,Qt.sprintf)((0,Qt._x)('"%1$s"/ %2$s',"caption"),Us(n,(0,No.decodeEntities)(t)),a?Us(`${a}?ref=openverse`,l):l):(0,Qt.sprintf)((0,Qt._x)("<a %1$s>Work</a>/ %2$s","caption"),Fs(n),a?Us(`${a}?ref=openverse`,l):l),u.replace(/\s{2}/g," ")},zs=async(e={})=>(await(0,s.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})));var Hs=[{name:"images",labels:{name:(0,Qt.__)("Images"),search_items:(0,Qt.__)("Search images")},mediaType:"image",async fetch(e={}){return zs({...e,media_type:"image"})}},{name:"videos",labels:{name:(0,Qt.__)("Videos"),search_items:(0,Qt.__)("Search videos")},mediaType:"video",async fetch(e={}){return zs({...e,media_type:"video"})}},{name:"audio",labels:{name:(0,Qt.__)("Audio"),search_items:(0,Qt.__)("Search audio")},mediaType:"audio",async fetch(e={}){return zs({...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 r=n[e]||e;o.searchParams.set(r,t)}));const r=await window.fetch(o,{headers:{"User-Agent":"WordPress/inserter-media-fetch"}});return(await r.json()).results.map((e=>({...e,title:e.title?.toLowerCase().startsWith("file:")?e.title.slice(5):e.title,sourceId:e.id,id:void 0,caption:Ms(e),previewUrl:e.thumbnail})))},getReportUrl:({sourceId:e})=>`https://wordpress.org/openverse/image/${e}/report/`,isExternalResource:!0}],Vs=window.wp.mediaUtils;const Ws=()=>{};function js({additionalData:e={},allowedTypes:t,filesList:n,maxUploadFileSize:o,onError:r=Ws,onFileChange:i}){const{getCurrentPostId:a,getEditorSettings:l}=(0,s.select)(Jn),c=l().allowedMimeTypes;o=o||l().maxUploadFileSize,(0,Vs.uploadMedia)({allowedTypes:t,filesList:n,onFileChange:i,additionalData:{post:a(),...e},maxUploadFileSize:o,onError:({message:e})=>r(e),wpAllowedMimeTypes:c})}const $s=[],Gs=["__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"];var Ks=function(e,t){var n,o;const{reusableBlocks:i,hasUploadPermissions:l,canUseUnfilteredHTML:c,userCanCreatePages:u,pageOnFront:d,postType:p}=(0,s.useSelect)((e=>{var t;const{canUserUseUnfilteredHTML:n,getCurrentPostType:o}=e(Jn),i="web"===r.Platform.OS,{canUser:s,getEntityRecord:l}=e(a.store),c=s("read","settings")?l("root","site"):void 0;return{canUseUnfilteredHTML:n(),reusableBlocks:i?e(a.store).getEntityRecords("postType","wp_block",{per_page:-1}):$s,hasUploadPermissions:null===(t=s("create","media"))||void 0===t||t,userCanCreatePages:s("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:f}=(0,s.useSelect)((e=>({restBlockPatterns:e(a.store).getBlockPatterns(),restBlockPatternCategories:e(a.store).getBlockPatternCategories()})),[]),_=(0,r.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,r.useMemo)((()=>[...h||[],...f||[]].filter(((e,t,n)=>t===n.findIndex((t=>e.name===t.name))))),[h,f]),{undo:y}=(0,s.useDispatch)(Jn),{saveEntityRecord:b}=(0,s.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,r.useMemo)((()=>({...Object.fromEntries(Object.entries(e).filter((([e])=>Gs.includes(e)))),mediaUpload:l?js:void 0,__experimentalReusableBlocks:i,__experimentalBlockPatterns:_,__experimentalBlockPatternCategories:v,__experimentalFetchLinkSuggestions:(t,n)=>(0,a.__experimentalFetchLinkSuggestions)(t,n,e),inserterMediaCategories:Hs,__experimentalFetchRichUrlData:a.__experimentalFetchUrlData,__experimentalCanUserUseUnfilteredHTML:c,__experimentalUndo:y,outlineMode:t,__experimentalCreatePageEntity:E,__experimentalUserCanCreatePages:u,pageOnFront:d,__experimentalPreferPatternsOnRoot:t})),[e,l,i,_,v,c,y,t,u,d])},Ys=window.wp.privateApis;const{lock:qs,unlock:Qs}=(0,Ys.__dangerousOptInToUnstableAPIsOnlyForCoreModules)("I know using unstable features means my plugin or theme will inevitably break on the next WordPress release.","@wordpress/editor"),{ExperimentalBlockEditorProvider:Xs}=Qs(u.privateApis),Zs=Os((({__unstableTemplate:e,post:t,settings:n,recovery:o,initialEdits:i,children:l,BlockEditorProviderComponent:c=Xs})=>{const d=(0,r.useMemo)((()=>"wp_template"===t.type?{}:{postId:t.id,postType:t.type}),[t.id,t.type]),{editorSettings:p,selection:m,isReady:h}=(0,s.useSelect)((e=>{const{getEditorSettings:t,getEditorSelection:n,__unstableIsEditorReady:o}=e(Jn);return{editorSettings:t(),isReady:o(),selection:n()}}),[]),{id:g,type:f}=null!=e?e:t,[_,v,y]=(0,a.useEntityBlockEditor)("postType",f,{id:g}),b=Ks(p,!!e),{updatePostLock:E,setupEditor:S,updateEditorSettings:w,__experimentalTearDownEditor:k}=(0,s.useDispatch)(Jn),{createWarningNotice:P}=(0,s.useDispatch)(Kt.store);return(0,r.useLayoutEffect)((()=>{if(!o)return E(n.postLock),S(t,i,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,r.useEffect)((()=>{w(n)}),[n]),h?(0,r.createElement)(a.EntityProvider,{kind:"root",type:"site"},(0,r.createElement)(a.EntityProvider,{kind:"postType",type:t.type,id:t.id},(0,r.createElement)(u.BlockContextProvider,{value:d},(0,r.createElement)(c,{value:_,onChange:y,onInput:v,selection:m,settings:b,useSubRegistry:!1},l,(0,r.createElement)(Ls.ReusableBlocksMenuItems,null))))):null}));var Js=function(e){return(0,r.createElement)(Zs,{...e,BlockEditorProviderComponent:u.BlockEditorProvider},e.children)},ea=window.wp.serverSideRender,ta=n.n(ea);function na(e,t,n=[]){const o=(0,r.forwardRef)(((n,o)=>(E()("wp.editor."+e,{since:"5.3",alternative:"wp.blockEditor."+e,version:"6.2"}),(0,r.createElement)(t,{ref:o,...n}))));return n.forEach((n=>{o[n]=na(e+"."+n,t[n])})),o}function oa(e,t){return(...n)=>(E()("wp.editor."+e,{since:"5.3",alternative:"wp.blockEditor."+e,version:"6.2"}),t(...n))}const ra=na("RichText",u.RichText,["Content"]);ra.isEmpty=oa("RichText.isEmpty",u.RichText.isEmpty);const ia=na("Autocomplete",u.Autocomplete),sa=na("AlignmentToolbar",u.AlignmentToolbar),aa=na("BlockAlignmentToolbar",u.BlockAlignmentToolbar),la=na("BlockControls",u.BlockControls,["Slot"]),ca=na("BlockEdit",u.BlockEdit),ua=na("BlockEditorKeyboardShortcuts",u.BlockEditorKeyboardShortcuts),da=na("BlockFormatControls",u.BlockFormatControls,["Slot"]),pa=na("BlockIcon",u.BlockIcon),ma=na("BlockInspector",u.BlockInspector),ha=na("BlockList",u.BlockList),ga=na("BlockMover",u.BlockMover),fa=na("BlockNavigationDropdown",u.BlockNavigationDropdown),_a=na("BlockSelectionClearer",u.BlockSelectionClearer),va=na("BlockSettingsMenu",u.BlockSettingsMenu),ya=na("BlockTitle",u.BlockTitle),ba=na("BlockToolbar",u.BlockToolbar),Ea=na("ColorPalette",u.ColorPalette),Sa=na("ContrastChecker",u.ContrastChecker),wa=na("CopyHandler",u.CopyHandler),ka=na("DefaultBlockAppender",u.DefaultBlockAppender),Pa=na("FontSizePicker",u.FontSizePicker),Ca=na("Inserter",u.Inserter),Ta=na("InnerBlocks",u.InnerBlocks,["ButtonBlockAppender","DefaultBlockAppender","Content"]),xa=na("InspectorAdvancedControls",u.InspectorAdvancedControls,["Slot"]),Ba=na("InspectorControls",u.InspectorControls,["Slot"]),Ia=na("PanelColorSettings",u.PanelColorSettings),Aa=na("PlainText",u.PlainText),Na=na("RichTextShortcut",u.RichTextShortcut),Da=na("RichTextToolbarButton",u.RichTextToolbarButton),Ra=na("__unstableRichTextInputEvent",u.__unstableRichTextInputEvent),La=na("MediaPlaceholder",u.MediaPlaceholder),Oa=na("MediaUpload",u.MediaUpload),Ua=na("MediaUploadCheck",u.MediaUploadCheck),Fa=na("MultiSelectScrollIntoView",u.MultiSelectScrollIntoView),Ma=na("NavigableToolbar",u.NavigableToolbar),za=na("ObserveTyping",u.ObserveTyping),Ha=na("SkipToSelectedBlock",u.SkipToSelectedBlock),Va=na("URLInput",u.URLInput),Wa=na("URLInputButton",u.URLInputButton),ja=na("URLPopover",u.URLPopover),$a=na("Warning",u.Warning),Ga=na("WritingFlow",u.WritingFlow),Ka=oa("createCustomColorsHOC",u.createCustomColorsHOC),Ya=oa("getColorClassName",u.getColorClassName),qa=oa("getColorObjectByAttributeValues",u.getColorObjectByAttributeValues),Qa=oa("getColorObjectByColorValue",u.getColorObjectByColorValue),Xa=oa("getFontSize",u.getFontSize),Za=oa("getFontSizeClass",u.getFontSizeClass),Ja=oa("withColorContext",u.withColorContext),el=oa("withColors",u.withColors),tl=oa("withFontSizes",u.withFontSizes);function nl(e){return E()("wp.editor.cleanForSlug",{since:"12.7",plugin:"Gutenberg",alternative:"wp.url.cleanForSlug"}),(0,y.cleanForSlug)(e)}const ol={};qs(ol,{ExperimentalEditorProvider:Zs,EntitiesSavedStatesExtensible:zo})}(),(window.wp=window.wp||{}).editor=o}();