mirror of
https://github.com/WordPress/WordPress.git
synced 2024-11-09 20:30:43 +01:00
e4a97cc8e9
The following dependencies are being updated: - `copy-webpack-plugin` from `10.2.4` to `11.0.0`. - `dotenv` from `16.0.1` to `16.0.2`. - `dotenv-expand` from `8.0.3` to `9.0.0`. - `sass` from `1.53.0` to `1.55.0`. - `sinon-test` from `3.1.3` to `3.1.4`. - `source-map-loader` from `3.0.1` to `4.0.0`. - `terser-webpack-plugin` from `5.3.1` to `5.3.6`. - `uglify-js` from `3.16.1` to `3.17.1`. - `uuid` from `8.3.2` to `9.0.0`. - `webpack` from `5.72.0` to `5.74.0`. This also contains changes after running `npm audit fix`. Fixes #56641. Built from https://develop.svn.wordpress.org/trunk@54296 git-svn-id: http://core.svn.wordpress.org/trunk@53855 1a063a9b-81f0-0310-95a4-ce76da25c4cd
12 lines
140 KiB
JavaScript
12 lines
140 KiB
JavaScript
/*! 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=" ","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","Ţ":"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,""),i=function(e){return e.replace(o,(function(e){return t[e]}))};e.exports=i,e.exports.has=function(e){return!!e.match(r)},e.exports.remove=i},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 Ps},Autocomplete:function(){return ws},AutosaveMonitor:function(){return ao},BlockAlignmentToolbar:function(){return ks},BlockControls:function(){return Cs},BlockEdit:function(){return Ts},BlockEditorKeyboardShortcuts:function(){return xs},BlockFormatControls:function(){return Bs},BlockIcon:function(){return As},BlockInspector:function(){return Is},BlockList:function(){return Ns},BlockMover:function(){return Rs},BlockNavigationDropdown:function(){return Ds},BlockSelectionClearer:function(){return Ls},BlockSettingsMenu:function(){return Os},BlockTitle:function(){return Us},BlockToolbar:function(){return Fs},ColorPalette:function(){return Ms},ContrastChecker:function(){return zs},CopyHandler:function(){return Vs},DefaultBlockAppender:function(){return Hs},DocumentOutline:function(){return yo},DocumentOutlineCheck:function(){return bo},EditorHistoryRedo:function(){return Ao},EditorHistoryUndo:function(){return Io},EditorKeyboardShortcutsRegister:function(){return Co},EditorNotices:function(){return Ro},EditorProvider:function(){return vs},EditorSnackbars:function(){return Do},EntitiesSavedStates:function(){return zo},ErrorBoundary:function(){return Wo},FontSizePicker:function(){return Ws},InnerBlocks:function(){return js},Inserter:function(){return Gs},InspectorAdvancedControls:function(){return $s},InspectorControls:function(){return Ks},LocalAutosaveMonitor:function(){return Yo},MediaPlaceholder:function(){return Js},MediaUpload:function(){return ea},MediaUploadCheck:function(){return ta},MultiSelectScrollIntoView:function(){return na},NavigableToolbar:function(){return oa},ObserveTyping:function(){return ra},PageAttributesCheck:function(){return qo},PageAttributesOrder:function(){return Zo},PageAttributesParent:function(){return sr},PageTemplate:function(){return ar},PanelColorSettings:function(){return Ys},PlainText:function(){return qs},PostAuthor:function(){return dr},PostAuthorCheck:function(){return pr},PostComments:function(){return mr},PostExcerpt:function(){return hr},PostExcerptCheck:function(){return gr},PostFeaturedImage:function(){return Cr},PostFeaturedImageCheck:function(){return _r},PostFormat:function(){return Br},PostFormatCheck:function(){return Tr},PostLastRevision:function(){return Nr},PostLastRevisionCheck:function(){return Ir},PostLockedModal:function(){return Rr},PostPendingStatus:function(){return Lr},PostPendingStatusCheck:function(){return Dr},PostPingbacks:function(){return Or},PostPreviewButton:function(){return Fr},PostPublishButton:function(){return Hr},PostPublishButtonLabel:function(){return Mr},PostPublishPanel:function(){return Ai},PostSavedState:function(){return Oi},PostSchedule:function(){return Xr},PostScheduleCheck:function(){return Ui},PostScheduleLabel:function(){return Zr},PostSlug:function(){return zi},PostSlugCheck:function(){return Fi},PostSticky:function(){return Hi},PostStickyCheck:function(){return Vi},PostSwitchToDraftButton:function(){return Li},PostTaxonomies:function(){return Gi},PostTaxonomiesCheck:function(){return ji},PostTaxonomiesFlatTermSelector:function(){return di},PostTaxonomiesHierarchicalTermSelector:function(){return Ei},PostTextEditor:function(){return Ki},PostTitle:function(){return qi},PostTrash:function(){return Qi},PostTrashCheck:function(){return Xi},PostTypeSupportCheck:function(){return Qo},PostURL:function(){return Zi},PostURLCheck:function(){return Ji},PostURLLabel:function(){return es},PostVisibility:function(){return $r},PostVisibilityCheck:function(){return ns},PostVisibilityLabel:function(){return Yr},RichText:function(){return Ss},RichTextShortcut:function(){return Qs},RichTextToolbarButton:function(){return Xs},ServerSideRender:function(){return ys()},SkipToSelectedBlock:function(){return ia},TableOfContents:function(){return cs},TextEditorGlobalKeyboardShortcuts:function(){return Po},ThemeSupportCheck:function(){return vr},URLInput:function(){return sa},URLInputButton:function(){return aa},URLPopover:function(){return la},UnsavedChangesWarning:function(){return us},VisualEditorGlobalKeyboardShortcuts:function(){return wo},Warning:function(){return ca},WordCount:function(){return is},WritingFlow:function(){return ua},__unstableRichTextInputEvent:function(){return Zs},cleanForSlug:function(){return ba},createCustomColorsHOC:function(){return da},getColorClassName:function(){return pa},getColorObjectByAttributeValues:function(){return ma},getColorObjectByColorValue:function(){return ha},getFontSize:function(){return ga},getFontSizeClass:function(){return fa},getTemplatePartIcon:function(){return O},mediaUpload:function(){return gs},store:function(){return no},storeConfig:function(){return to},transformStyles:function(){return p.transformStyles},usePostScheduleLabel:function(){return Jr},usePostURLLabel:function(){return ts},usePostVisibilityLabel:function(){return qr},userAutocompleter:function(){return io},withColorContext:function(){return va},withColors:function(){return _a},withFontSizes:function(){return ya}});var e={};n.r(e),n.d(e,{__experimentalGetDefaultTemplatePartAreas:function(){return Vt},__experimentalGetDefaultTemplateType:function(){return Ht},__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 Ie},getAdjacentBlockClientId:function(){return at},getAutosaveAttribute:function(){return ee},getBlock:function(){return $e},getBlockAttributes:function(){return je},getBlockCount:function(){return Ze},getBlockHierarchyRootClientId:function(){return st},getBlockIndex:function(){return Et},getBlockInsertionPoint:function(){return It},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 Z},getCurrentPostId:function(){return Y},getCurrentPostLastRevisionId:function(){return Q},getCurrentPostRevisionsCount:function(){return q},getCurrentPostType:function(){return K},getEditedPostAttribute:function(){return J},getEditedPostContent:function(){return be},getEditedPostPreviewLink:function(){return _e},getEditedPostSlug:function(){return Pe},getEditedPostVisibility:function(){return te},getEditorBlocks:function(){return De},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 _t},getNextBlockClientId:function(){return ct},getPermalink:function(){return we},getPermalinkParts:function(){return ke},getPostEdits:function(){return X},getPostLockUser:function(){return Ae},getPostTypeLabel:function(){return Gt},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 Dt},getTemplateLock:function(){return Lt},hasChangedContent:function(){return H},hasEditorRedo:function(){return z},hasEditorUndo:function(){return M},hasInserterItems:function(){return Ft},hasMultiSelection:function(){return kt},hasNonPostEntityChanges:function(){return G},hasSelectedBlock:function(){return nt},hasSelectedInnerBlock:function(){return wt},inSomeHistory:function(){return Ve},isAncestorMultiSelected:function(){return vt},isAutosavingPost:function(){return fe},isBlockInsertionPointVisible:function(){return Nt},isBlockMultiSelected:function(){return ft},isBlockSelected:function(){return St},isBlockValid:function(){return Ge},isBlockWithinSelection:function(){return Pt},isCaretWithinFormattedText:function(){return At},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 W},isEditedPostEmpty:function(){return ae},isEditedPostNew:function(){return V},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 ve},isPublishSidebarEnabled:function(){return Re},isPublishingPost:function(){return Ee},isSavingNonPostEntityChanges:function(){return me},isSavingPost:function(){return pe},isSelectionEnabled:function(){return Tt},isTyping:function(){return Bt},isValidTemplate:function(){return Rt}});var t={};function r(){return r=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},r.apply(this,arguments)}n.r(t),n.d(t,{__experimentalTearDownEditor:function(){return tn},autosave:function(){return un},clearSelectedBlock:function(){return Nn},createUndoLevel:function(){return mn},disablePublishSidebar:function(){return fn},editPost:function(){return sn},enablePublishSidebar:function(){return gn},enterFormattedText:function(){return Xn},exitFormattedText:function(){return Zn},hideInsertionPoint:function(){return Hn},insertBlock:function(){return Mn},insertBlocks:function(){return zn},insertDefaultBlock:function(){return Jn},lockPostAutosaving:function(){return yn},lockPostSaving:function(){return vn},mergeBlocks:function(){return jn},moveBlockToPosition:function(){return Fn},moveBlocksDown:function(){return On},moveBlocksUp:function(){return Un},multiSelect:function(){return In},receiveBlocks:function(){return kn},redo:function(){return dn},refreshPost:function(){return ln},removeBlock:function(){return Kn},removeBlocks:function(){return $n},replaceBlock:function(){return Ln},replaceBlocks:function(){return Dn},resetBlocks:function(){return Pn},resetEditorBlocks:function(){return En},resetPost:function(){return nn},savePost:function(){return an},selectBlock:function(){return xn},setTemplateValidity:function(){return Wn},setupEditor:function(){return en},setupEditorState:function(){return rn},showInsertionPoint:function(){return Vn},startMultiSelect:function(){return Bn},startTyping:function(){return qn},stopMultiSelect:function(){return An},stopTyping:function(){return Qn},synchronizeTemplate:function(){return Gn},toggleBlockMode:function(){return Yn},toggleSelection:function(){return Rn},trashPost:function(){return cn},undo:function(){return pn},unlockPostAutosaving:function(){return bn},unlockPostSaving:function(){return _n},updateBlock:function(){return Cn},updateBlockAttributes:function(){return Tn},updateBlockListSettings:function(){return eo},updateEditorSettings:function(){return Sn},updatePost:function(){return on},updatePostLock:function(){return hn}});var i=window.wp.element,s=window.lodash,a=window.wp.blocks,l=window.wp.data,c=window.wp.coreData,u=window.wp.compose,d=window.wp.hooks,p=window.wp.blockEditor;const m={...p.SETTINGS_DEFAULTS,richEditingEnabled:!0,codeEditingEnabled:!0,enableCustomFields:void 0,supportsLayout:!0};function h(e){return e&&"object"==typeof e&&"raw"in e?e.raw:e}var g=(0,l.combineReducers)({postId:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0;return"SETUP_EDITOR_STATE"===t.type?t.post.id:e},postType:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0;return"SETUP_EDITOR_STATE"===t.type?t.post.type:e},saving:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;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(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;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(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{isLocked:!1},t=arguments.length>1?arguments[1]:void 0;return"UPDATE_POST_LOCK"===t.type?t.lock:e},template:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{isValid:!0},t=arguments.length>1?arguments[1]:void 0;return"SET_TEMPLATE_VALIDITY"===t.type?{...e,isValid:t.isValid}:e},postSavingLock:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;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(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SETUP_EDITOR_STATE":return!0;case"TEAR_DOWN_EDITOR":return!1}return e},editorSettings:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:m,t=arguments.length>1?arguments[1]:void 0;return"UPDATE_EDITOR_SETTINGS"===t.type?{...e,...t.settings}:e},postAutosavingLock:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;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}}),f={};function v(e){return[e]}function _(e,t,n){var o;if(e.length!==t.length)return!1;for(o=n;o<e.length;o++)if(e[o]!==t[o])return!1;return!0}function y(e,t){var n,o=t||v;function r(e){var t,o,r,i,s,a=n,l=!0;for(t=0;t<e.length;t++){if(o=e[t],!(s=o)||"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(f)||((i=function(){var e={clear:function(){e.head=null}};return e}()).isUniqueByDependants=l,a.set(f,i)),a.get(f)}function i(){n=new WeakMap}function s(){var t,n,i,s,a,l=arguments.length;for(s=new Array(l),i=0;i<l;i++)s[i]=arguments[i];for((t=r(a=o.apply(null,s))).isUniqueByDependants||(t.lastDependants&&!_(a,t.lastDependants,0)&&t.clear(),t.lastDependants=a),n=t.head;n;){if(_(n.args,s,1))return n!==t.head&&(n.prev.next=n.next,n.next&&(n.next.prev=n.prev),n.next=t.head,n.prev=null,t.head.prev=n,t.head=n),n.val;n=n.next}return n={val:e.apply(null,s)},s[0]=null,n.args=s,t.head&&(t.head.prev=n,n.next=t.head),t.head=n,n.val}return s.getDependants=o,s.clear=i,i(),s}var b=window.wp.date,E=window.wp.url,S=window.wp.deprecated,w=n.n(S),P=window.wp.primitives;var k=(0,i.createElement)(P.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,i.createElement)(P.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"})),C=window.wp.preferences;const T=new Set(["meta"]),x="SAVE_POST_NOTICE_ID",B="TRASH_POST_NOTICE_ID",A=/%(?:postname|pagename)%/,I=["title","excerpt","content"];var N=(0,i.createElement)(P.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,i.createElement)(P.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 R=(0,i.createElement)(P.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,i.createElement)(P.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,i.createElement)(P.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,i.createElement)(P.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 L=(0,i.createElement)(P.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,i.createElement)(P.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 O(e){return"header"===e?N:"footer"===e?R:"sidebar"===e?D:L}const U={},F=[],M=(0,l.createRegistrySelector)((e=>()=>e(c.store).hasUndo())),z=(0,l.createRegistrySelector)((e=>()=>e(c.store).hasRedo()));function V(e){return"auto-draft"===$(e).status}function H(e){const t=X(e);return"blocks"in t||"content"in t}const W=(0,l.createRegistrySelector)((e=>t=>{const n=K(t),o=Y(t);return!!e(c.store).hasEditsForEntityRecord("postType",n,o)})),G=(0,l.createRegistrySelector)((e=>t=>{const n=e(c.store).__experimentalGetDirtyEntityRecords(),{type:o,id:r}=$(t);return n.some((e=>"postType"!==e.kind||e.name!==o||e.key!==r))}));function j(e){return!W(e)&&V(e)}const $=(0,l.createRegistrySelector)((e=>t=>{const n=Y(t),o=K(t),r=e(c.store).getRawEntityRecord("postType",o,n);return r||U}));function K(e){return e.postType}function Y(e){return e.postId}function q(e){var t,n,o,r;return null!==(t=null===(n=$(e)._links)||void 0===n||null===(o=n["version-history"])||void 0===o||null===(r=o[0])||void 0===r?void 0:r.count)&&void 0!==t?t:0}function Q(e){var t,n,o,r;return null!==(t=null===(n=$(e)._links)||void 0===n||null===(o=n["predecessor-version"])||void 0===o||null===(r=o[0])||void 0===r?void 0:r.id)&&void 0!==t?t:null}const X=(0,l.createRegistrySelector)((e=>t=>{const n=K(t),o=Y(t);return e(c.store).getEntityRecordEdits("postType",n,o)||U}));function Z(e,t){switch(t){case"type":return K(e);case"id":return Y(e);default:const n=$(e);if(!n.hasOwnProperty(t))break;return h(n[t])}}function J(e,t){if("content"===t)return be(e);const n=X(e);return n.hasOwnProperty(t)?T.has(t)?((e,t)=>{const n=X(e);return n.hasOwnProperty(t)?{...Z(e,t),...n[t]}:Z(e,t)})(e,t):n[t]:Z(e,t)}const ee=(0,l.createRegistrySelector)((e=>(t,n)=>{var o;if(!I.includes(n)&&"preview_link"!==n)return;const r=K(t),i=Y(t),s=null===(o=e(c.store).getCurrentUser())||void 0===o?void 0:o.id,a=e(c.store).getAutosave(r,i,s);return a?h(a[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,b.isInTheFuture)(new Date(Number((0,b.getDate)(n.date))-6e4))}function re(e){return"future"===$(e).status&&!oe(e)}function ie(e){const t=$(e);return W(e)||-1===["publish","private","future"].indexOf(t.status)}function se(e){return!pe(e)&&(!!J(e,"title")||!!J(e,"excerpt")||!ae(e)||"native"===i.Platform.OS)}function ae(e){const t=De(e);if(t.length){if(t.length>1)return!1;const e=t[0].name;if(e!==(0,a.getDefaultBlockName)()&&e!==(0,a.getFreeformContentHandlerName)())return!1}return!be(e)}const le=(0,l.createRegistrySelector)((e=>t=>{var n;if(!se(t))return!1;if(xe(t))return!1;const o=K(t),r=Y(t),i=e(c.store).hasFetchedAutosaves(o,r),s=null===(n=e(c.store).getCurrentUser())||void 0===n?void 0:n.id,a=e(c.store).getAutosave(o,r,s);return!!i&&(!a||(!!H(t)||["title","excerpt"].some((e=>h(a[e])!==J(t,e)))))}));function ce(e){const t=J(e,"date"),n=new Date(Number((0,b.getDate)(t))-6e4);return(0,b.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,l.createRegistrySelector)((e=>t=>{const n=K(t),o=Y(t);return e(c.store).isSavingEntityRecord("postType",n,o)})),me=(0,l.createRegistrySelector)((e=>t=>{const n=e(c.store).__experimentalGetEntitiesBeingSaved(),{type:o,id:r}=$(t);return n.some((e=>"postType"!==e.kind||e.name!==o||e.key!==r))})),he=(0,l.createRegistrySelector)((e=>t=>{const n=K(t),o=Y(t);return!e(c.store).getLastEntitySaveError("postType",n,o)})),ge=(0,l.createRegistrySelector)((e=>t=>{const n=K(t),o=Y(t);return!!e(c.store).getLastEntitySaveError("postType",n,o)}));function fe(e){var t;return!!pe(e)&&Boolean(null===(t=e.saving.options)||void 0===t?void 0:t.isAutosave)}function ve(e){var t;return!!pe(e)&&Boolean(null===(t=e.saving.options)||void 0===t?void 0:t.isPreview)}function _e(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,E.addQueryArgs)(t,{preview:!0})));const n=J(e,"featured_media");return t&&n?(0,E.addQueryArgs)(t,{_thumbnail_id:n}):t}function ye(e){const t=De(e);if(t.length>2)return null;let n;if(1===t.length&&(n=t[0].name,"core/embed"===n)){var o;const e=null===(o=t[0].attributes)||void 0===o?void 0:o.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,l.createRegistrySelector)((e=>t=>{const n=Y(t),o=K(t),r=e(c.store).getEditedEntityRecord("postType",o,n);if(r){if("function"==typeof r.content)return r.content(r);if(r.blocks)return(0,a.__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 A.test(t)}function we(e){const t=ke(e);if(!t)return null;const{prefix:n,postName:o,suffix:r}=t;return Se(e)?n+o+r:n}function Pe(e){return J(e,"slug")||(0,E.cleanForSlug)(J(e,"title"))||Y(e)}function ke(e){const t=J(e,"permalink_template");if(!t)return null;const n=J(e,"slug")||J(e,"generated_slug"),[o,r]=t.split(A);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 Ae(e){return e.postLock.user}function Ie(e){return e.postLock.activePostLock}function Ne(e){var t;return Boolean(null===(t=$(e)._links)||void 0===t?void 0:t.hasOwnProperty("wp:action-unfiltered-html"))}const Re=(0,l.createRegistrySelector)((e=>()=>!!e(C.store).get("core/edit-post","isPublishSidebarEnabled")));function De(e){return J(e,"blocks")||F}function Le(e){var t;return w()("select('core/editor').getEditorSelectionStart",{since:"5.8",alternative:"select('core/editor').getEditorSelection"}),null===(t=J(e,"selection"))||void 0===t?void 0:t.selectionStart}function Oe(e){var t;return w()("select('core/editor').getEditorSelectionStart",{since:"5.8",alternative:"select('core/editor').getEditorSelection"}),null===(t=J(e,"selection"))||void 0===t?void 0:t.selectionEnd}function Ue(e){return J(e,"selection")}function Fe(e){return e.isReady}function Me(e){return e.editorSettings}function ze(){return w()("select('core/editor').getStateBeforeOptimisticTransaction",{since:"5.7",hint:"No state history is kept on this store anymore"}),null}function Ve(){return w()("select('core/editor').inSomeHistory",{since:"5.7",hint:"No state history is kept on this store anymore"}),!1}function He(e){return(0,l.createRegistrySelector)((t=>function(n){w()("`wp.data.select( 'core/editor' )."+e+"`",{since:"5.3",alternative:"`wp.data.select( 'core/block-editor' )."+e+"`",version:"6.2"});for(var o=arguments.length,r=new Array(o>1?o-1:0),i=1;i<o;i++)r[i-1]=arguments[i];return t(p.store)[e](...r)}))}const We=He("getBlockName"),Ge=He("isBlockValid"),je=He("getBlockAttributes"),$e=He("getBlock"),Ke=He("getBlocks"),Ye=He("getClientIdsOfDescendants"),qe=He("getClientIdsWithDescendants"),Qe=He("getGlobalBlockCount"),Xe=He("getBlocksByClientId"),Ze=He("getBlockCount"),Je=He("getBlockSelectionStart"),et=He("getBlockSelectionEnd"),tt=He("getSelectedBlockCount"),nt=He("hasSelectedBlock"),ot=He("getSelectedBlockClientId"),rt=He("getSelectedBlock"),it=He("getBlockRootClientId"),st=He("getBlockHierarchyRootClientId"),at=He("getAdjacentBlockClientId"),lt=He("getPreviousBlockClientId"),ct=He("getNextBlockClientId"),ut=He("getSelectedBlocksInitialCaretPosition"),dt=He("getMultiSelectedBlockClientIds"),pt=He("getMultiSelectedBlocks"),mt=He("getFirstMultiSelectedBlockClientId"),ht=He("getLastMultiSelectedBlockClientId"),gt=He("isFirstMultiSelectedBlock"),ft=He("isBlockMultiSelected"),vt=He("isAncestorMultiSelected"),_t=He("getMultiSelectedBlocksStartClientId"),yt=He("getMultiSelectedBlocksEndClientId"),bt=He("getBlockOrder"),Et=He("getBlockIndex"),St=He("isBlockSelected"),wt=He("hasSelectedInnerBlock"),Pt=He("isBlockWithinSelection"),kt=He("hasMultiSelection"),Ct=He("isMultiSelecting"),Tt=He("isSelectionEnabled"),xt=He("getBlockMode"),Bt=He("isTyping"),At=He("isCaretWithinFormattedText"),It=He("getBlockInsertionPoint"),Nt=He("isBlockInsertionPointVisible"),Rt=He("isValidTemplate"),Dt=He("getTemplate"),Lt=He("getTemplateLock"),Ot=He("canInsertBlockType"),Ut=He("getInserterItems"),Ft=He("hasInserterItems"),Mt=He("getBlockListSettings");function zt(e){var t;return null===(t=Me(e))||void 0===t?void 0:t.defaultTemplateTypes}const Vt=y((e=>{var t;const n=(null===(t=Me(e))||void 0===t?void 0:t.defaultTemplatePartAreas)||[];return null==n?void 0:n.map((e=>({...e,icon:O(e.icon)})))}),(e=>{var t;return[null===(t=Me(e))||void 0===t?void 0:t.defaultTemplatePartAreas]})),Ht=y(((e,t)=>{var n;const o=zt(e);return o&&null!==(n=Object.values(o).find((e=>e.slug===t)))&&void 0!==n?n:U}),((e,t)=>[zt(e),t]));function Wt(e,t){var n;if(!t)return U;const{description:o,slug:r,title:i,area:s}=t,{title:a,description:l}=Ht(e,r),c="string"==typeof i?i:null==i?void 0:i.rendered;return{title:c&&c!==r?c:a||r,description:("string"==typeof o?o:null==o?void 0:o.raw)||l,icon:(null===(n=Vt(e).find((e=>s===e.area)))||void 0===n?void 0:n.icon)||k}}const Gt=(0,l.createRegistrySelector)((e=>t=>{var n;const o=K(t),r=e(c.store).getPostType(o);return null==r||null===(n=r.labels)||void 0===n?void 0:n.singular_name}));var jt=window.wp.apiFetch,$t=n.n(jt),Kt=window.wp.notices;function Yt(e,t){return`wp-autosave-block-editor-post-${t?"auto-draft":e}`}function qt(e,t,n,o,r){window.sessionStorage.setItem(Yt(e,t),JSON.stringify({post_title:n,content:o,excerpt:r}))}function Qt(e,t){window.sessionStorage.removeItem(Yt(e,t))}var Xt=window.wp.i18n;function Zt(e){const{previousPost:t,post:n,postType:o}=e;if((0,s.get)(e.options,["isAutosave"]))return[];if("trash"===n.status&&"trash"!==t.status)return[];const r=["publish","private","future"],i=(0,s.includes)(r,t.status),a=(0,s.includes)(r,n.status);let l,c,u=(0,s.get)(o,["viewable"],!1);i||a?i&&!a?(l=o.labels.item_reverted_to_draft,u=!1):l=!i&&a?{publish:o.labels.item_published,private:o.labels.item_published_privately,future:o.labels.item_scheduled}[n.status]:o.labels.item_updated:(l=(0,Xt.__)("Draft saved."),c=!0);const d=[];return u&&d.push({label:c?(0,Xt.__)("View Preview"):o.labels.view_item,url:n.link}),[l,{id:x,type:"snackbar",actions:d}]}function Jt(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,Xt.__)("Publishing failed."),private:(0,Xt.__)("Publishing failed."),future:(0,Xt.__)("Scheduling failed.")};let a=i||-1===r.indexOf(n.status)?(0,Xt.__)("Updating failed."):s[n.status];return o.message&&!/<\/?[^>]*>/.test(o.message)&&(a=[a,o.message].join(" ")),[a,{id:x}]}const en=(e,t,n)=>o=>{let{dispatch:r}=o;r.setupEditorState(e);if("auto-draft"===e.status&&n){let o;o="content"in t?t.content:e.content.raw;let i=(0,a.parse)(o);i=(0,a.synchronizeBlocksWithTemplate)(i,n),r.resetEditorBlocks(i,{__unstableShouldCreateUndoLevel:!1})}t&&Object.values(t).some((t=>{var n,o;let[r,i]=t;return i!==(null!==(n=null===(o=e[r])||void 0===o?void 0:o.raw)&&void 0!==n?n:e[r])}))&&r.editPost(t)};function tn(){return{type:"TEAR_DOWN_EDITOR"}}function nn(){return w()("wp.data.dispatch( 'core/editor' ).resetPost",{since:"6.0",version:"6.3",alternative:"Initialize the editor with the setupEditorState action"}),{type:"DO_NOTHING"}}function on(){return w()("wp.data.dispatch( 'core/editor' ).updatePost",{since:"5.7",alternative:"Use the core entities store instead"}),{type:"DO_NOTHING"}}function rn(e){return{type:"SETUP_EDITOR_STATE",post:e}}const sn=(e,t)=>n=>{let{select:o,registry:r}=n;const{id:i,type:s}=o.getCurrentPost();r.dispatch(c.store).editEntityRecord("postType",s,i,e,t)},an=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return async t=>{let{select:n,dispatch:o,registry:r}=t;if(!n.isEditedPostSaveable())return;const i=n.getEditedPostContent();e.isAutosave||o.editPost({content:i},{undoIgnore:!0});const s=n.getCurrentPost(),a={id:s.id,...r.select(c.store).getEntityRecordNonTransientEdits("postType",s.type,s.id),content:i};o({type:"REQUEST_POST_UPDATE_START",options:e}),await r.dispatch(c.store).saveEntityRecord("postType",s.type,a,e),o({type:"REQUEST_POST_UPDATE_FINISH",options:e});const l=r.select(c.store).getLastEntitySaveError("postType",s.type,s.id);if(l){const e=Jt({post:s,edits:a,error:l});e.length&&r.dispatch(Kt.store).createErrorNotice(...e)}else{const t=n.getCurrentPost(),o=Zt({previousPost:s,post:t,postType:await r.resolveSelect(c.store).getPostType(t.type),options:e});o.length&&r.dispatch(Kt.store).createSuccessNotice(...o),e.isAutosave||r.dispatch(p.store).__unstableMarkLastChangeAsPersistent()}}};function ln(){return w()("wp.data.dispatch( 'core/editor' ).refreshPost",{since:"6.0",version:"6.3",alternative:"Use the core entities store instead"}),{type:"DO_NOTHING"}}const cn=()=>async e=>{let{select:t,dispatch:n,registry:o}=e;const r=t.getCurrentPostType(),i=await o.resolveSelect(c.store).getPostType(r);o.dispatch(Kt.store).removeNotice(B);const{rest_base:s,rest_namespace:a="wp/v2"}=i;n({type:"REQUEST_POST_DELETE_START"});try{const e=t.getCurrentPost();await $t()({path:`/${a}/${s}/${e.id}`,method:"DELETE"}),await n.savePost()}catch(e){o.dispatch(Kt.store).createErrorNotice(...(l={error:e},[l.error.message&&"unknown_error"!==l.error.code?l.error.message:(0,Xt.__)("Trashing failed"),{id:B}]))}var l;n({type:"REQUEST_POST_DELETE_FINISH"})},un=function(){let{local:e=!1,...t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return async n=>{let{select:o,dispatch:r}=n;if(e){const e=o.getCurrentPost(),t=o.isEditedPostNew(),n=o.getEditedPostAttribute("title"),r=o.getEditedPostAttribute("content"),i=o.getEditedPostAttribute("excerpt");qt(e.id,t,n,r,i)}else await r.savePost({isAutosave:!0,...t})}},dn=()=>e=>{let{registry:t}=e;t.dispatch(c.store).redo()},pn=()=>e=>{let{registry:t}=e;t.dispatch(c.store).undo()};function mn(){return w()("wp.data.dispatch( 'core/editor' ).createUndoLevel",{since:"6.0",version:"6.3",alternative:"Use the core entities store instead"}),{type:"DO_NOTHING"}}function hn(e){return{type:"UPDATE_POST_LOCK",lock:e}}const gn=()=>e=>{let{registry:t}=e;t.dispatch(C.store).set("core/edit-post","isPublishSidebarEnabled",!0)},fn=()=>e=>{let{registry:t}=e;t.dispatch(C.store).set("core/edit-post","isPublishSidebarEnabled",!1)};function vn(e){return{type:"LOCK_POST_SAVING",lockName:e}}function _n(e){return{type:"UNLOCK_POST_SAVING",lockName:e}}function yn(e){return{type:"LOCK_POST_AUTOSAVING",lockName:e}}function bn(e){return{type:"UNLOCK_POST_AUTOSAVING",lockName:e}}const En=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return n=>{let{select:o,dispatch:r,registry:i}=n;const{__unstableShouldCreateUndoLevel:s,selection:l}=t,u={blocks:e,selection:l};if(!1!==s){const{id:e,type:t}=o.getCurrentPost();if(i.select(c.store).getEditedEntityRecord("postType",t,e).blocks===u.blocks)return void i.dispatch(c.store).__unstableCreateUndoLevel("postType",t,e);u.content=e=>{let{blocks:t=[]}=e;return(0,a.__unstableSerializeAndClean)(t)}}r.editPost(u)}};function Sn(e){return{type:"UPDATE_EDITOR_SETTINGS",settings:e}}const wn=e=>function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return t=>{let{registry:o}=t;w()("`wp.data.dispatch( 'core/editor' )."+e+"`",{since:"5.3",alternative:"`wp.data.dispatch( 'core/block-editor' )."+e+"`",version:"6.2"}),o.dispatch(p.store)[e](...n)}},Pn=wn("resetBlocks"),kn=wn("receiveBlocks"),Cn=wn("updateBlock"),Tn=wn("updateBlockAttributes"),xn=wn("selectBlock"),Bn=wn("startMultiSelect"),An=wn("stopMultiSelect"),In=wn("multiSelect"),Nn=wn("clearSelectedBlock"),Rn=wn("toggleSelection"),Dn=wn("replaceBlocks"),Ln=wn("replaceBlock"),On=wn("moveBlocksDown"),Un=wn("moveBlocksUp"),Fn=wn("moveBlockToPosition"),Mn=wn("insertBlock"),zn=wn("insertBlocks"),Vn=wn("showInsertionPoint"),Hn=wn("hideInsertionPoint"),Wn=wn("setTemplateValidity"),Gn=wn("synchronizeTemplate"),jn=wn("mergeBlocks"),$n=wn("removeBlocks"),Kn=wn("removeBlock"),Yn=wn("toggleBlockMode"),qn=wn("startTyping"),Qn=wn("stopTyping"),Xn=wn("enterFormattedText"),Zn=wn("exitFormattedText"),Jn=wn("insertDefaultBlock"),eo=wn("updateBlockListSettings"),to={reducer:g,selectors:e,actions:t},no=(0,l.createReduxStore)("core/editor",{...to});(0,l.register)(no);function oo(e){const t=(0,s.mapValues)((0,s.pickBy)(e.attributes,{source:"meta"}),"meta");return(0,s.isEmpty)(t)||(e.edit=(e=>(0,u.createHigherOrderComponent)((t=>n=>{let{attributes:o,setAttributes:a,...u}=n;const d=(0,l.useSelect)((e=>e(no).getCurrentPostType()),[]),[p,m]=(0,c.useEntityProp)("postType",d,"meta"),h=(0,i.useMemo)((()=>({...o,...(0,s.mapValues)(e,(e=>p[e]))})),[o,p]);return(0,i.createElement)(t,r({attributes:h,setAttributes:t=>{const n=Object.fromEntries(Object.entries((0,s.pickBy)(t,((t,n)=>e[n]))).map((t=>{let[n,o]=t;return[e[n],o]})));(0,s.isEmpty)(n)||m(n),a(t)}},u))}),"withMetaAttributeSource"))(t)(e.edit)),e}function ro(e){const t=e.avatar_urls&&e.avatar_urls[24]?(0,i.createElement)("img",{className:"editor-autocompleters__user-avatar",alt:"",src:e.avatar_urls[24]}):(0,i.createElement)("span",{className:"editor-autocompleters__no-avatar"});return(0,i.createElement)(i.Fragment,null,t,(0,i.createElement)("span",{className:"editor-autocompleters__user-name"},e.name),(0,i.createElement)("span",{className:"editor-autocompleters__user-slug"},e.slug))}(0,d.addFilter)("blocks.registerBlockType","core/editor/custom-sources-backwards-compatibility/shim-attribute-source",oo),(0,l.select)(a.store).getBlockTypes().map((e=>{let{name:t}=e;return(0,l.select)(a.store).getBlockType(t)})).forEach(oo);var io={name:"users",className:"editor-autocompleters__user",triggerPrefix:"@",useItems(e){const t=(0,l.useSelect)((t=>{const{getUsers:n}=t(c.store);return n({context:"view",search:encodeURIComponent(e)})}),[e]),n=(0,i.useMemo)((()=>t?t.map((e=>({key:`user-${e.slug}`,value:e,label:ro(e)}))):[]),[t]);return[n]},getOptionCompletion(e){return`@${e.slug}`}};(0,d.addFilter)("editor.Autocomplete.completers","editor/autocompleters/set-default-completers",(function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return e.push((0,s.clone)(io)),e}));class so extends i.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(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]: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 ao=(0,u.compose)([(0,l.withSelect)(((e,t)=>{const{getReferenceByDistinctEdits:n}=e(c.store),{isEditedPostDirty:o,isEditedPostAutosaveable:r,isAutosavingPost:i,getEditorSettings:s}=e(no),{interval:a=s().autosaveInterval}=t;return{editsReference:n(),isDirty:o(),isAutosaveable:r(),isAutosaving:i(),interval:a}})),(0,l.withDispatch)(((e,t)=>({autosave(){const{autosave:n=e(no).autosave}=t;n()}})))])(so),lo=window.wp.richText,co=n(4403),uo=n.n(co);var po=e=>{let{children:t,isValid:n,level:o,href:r,onSelect:s}=e;return(0,i.createElement)("li",{className:uo()("document-outline__item",`is-${o.toLowerCase()}`,{"is-invalid":!n})},(0,i.createElement)("a",{href:r,className:"document-outline__button",onClick:s},(0,i.createElement)("span",{className:"document-outline__emdash","aria-hidden":"true"}),(0,i.createElement)("strong",{className:"document-outline__level"},o),(0,i.createElement)("span",{className:"document-outline__item-content"},t)))};const mo=(0,i.createElement)("em",null,(0,Xt.__)("(Empty heading)")),ho=[(0,i.createElement)("br",{key:"incorrect-break"}),(0,i.createElement)("em",{key:"incorrect-message"},(0,Xt.__)("(Incorrect heading level)"))],go=[(0,i.createElement)("br",{key:"incorrect-break-h1"}),(0,i.createElement)("em",{key:"incorrect-message-h1"},(0,Xt.__)("(Your theme may already use a H1 for the post title)"))],fo=[(0,i.createElement)("br",{key:"incorrect-break-multiple-h1"}),(0,i.createElement)("em",{key:"incorrect-message-multiple-h1"},(0,Xt.__)("(Multiple H1 headings are not recommended)"))],vo=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return e.flatMap((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return"core/heading"===e.name?{...e,level:e.attributes.level,isEmpty:_o(e)}:vo(e.innerBlocks)}))},_o=e=>!e.attributes.content||0===e.attributes.content.length;var yo=(0,u.compose)((0,l.withSelect)((e=>{var t,n;const{getBlocks:o}=e(p.store),{getEditedPostAttribute:r}=e(no),{getPostType:i}=e(c.store),s=i(r("type"));return{title:r("title"),blocks:o(),isTitleSupported:null!==(t=null==s||null===(n=s.supports)||void 0===n?void 0:n.title)&&void 0!==t&&t}})))((e=>{let{blocks:t=[],title:n,onSelect:o,isTitleSupported:r,hasOutlineItemsDisabled:s}=e;const a=vo(t);if(a.length<1)return null;let l=1;const c=document.querySelector(".editor-post-title__input"),u=r&&n&&c,d=a.reduce(((e,t)=>({...e,[t.level]:(e[t.level]||0)+1})),{})[1]>1;return(0,i.createElement)("div",{className:"document-outline"},(0,i.createElement)("ul",null,u&&(0,i.createElement)(po,{level:(0,Xt.__)("Title"),isValid:!0,onSelect:o,href:`#${c.id}`,isDisabled:s},n),a.map(((e,t)=>{const n=e.level>l+1,r=!(e.isEmpty||n||!e.level||1===e.level&&(d||u));return l=e.level,(0,i.createElement)(po,{key:t,level:`H${e.level}`,isValid:r,isDisabled:s,href:`#block-${e.clientId}`,onSelect:o},e.isEmpty?mo:(0,lo.getTextContent)((0,lo.create)({html:e.attributes.content})),n&&ho,1===e.level&&d&&fo,u&&1===e.level&&!d&&go)}))))}));var bo=(0,l.withSelect)((e=>({blocks:e(p.store).getBlocks()})))((function(e){let{blocks:t,children:n}=e;return(0,s.filter)(t,(e=>"core/heading"===e.name)).length<1?null:n})),Eo=window.wp.keyboardShortcuts;var So=function(e){let{resetBlocksOnSave:t}=e;const{resetEditorBlocks:n,savePost:o}=(0,l.useDispatch)(no),{isEditedPostDirty:r,getPostEdits:i,isPostSavingLocked:s}=(0,l.useSelect)(no);return(0,Eo.useShortcut)("core/editor/save",(e=>{if(e.preventDefault(),!s()&&r()){if(t){const e=i();if(e.content&&"string"==typeof e.content){const t=(0,a.parse)(e.content);n(t)}}o()}})),null};var wo=function(){const{redo:e,undo:t}=(0,l.useDispatch)(no);return(0,Eo.useShortcut)("core/editor/undo",(e=>{t(),e.preventDefault()})),(0,Eo.useShortcut)("core/editor/redo",(t=>{e(),t.preventDefault()})),(0,i.createElement)(So,null)};function Po(){return(0,i.createElement)(So,{resetBlocksOnSave:!0})}var ko=window.wp.keycodes;var Co=function(){const{registerShortcut:e}=(0,l.useDispatch)(Eo.store);return(0,i.useEffect)((()=>{e({name:"core/editor/save",category:"global",description:(0,Xt.__)("Save your changes."),keyCombination:{modifier:"primary",character:"s"}}),e({name:"core/editor/undo",category:"global",description:(0,Xt.__)("Undo your last changes."),keyCombination:{modifier:"primary",character:"z"}}),e({name:"core/editor/redo",category:"global",description:(0,Xt.__)("Redo your last undo."),keyCombination:{modifier:"primaryShift",character:"z"},aliases:(0,ko.isAppleOS)()?[]:[{modifier:"primary",character:"y"}]})}),[e]),(0,i.createElement)(p.BlockEditorKeyboardShortcuts.Register,null)},To=window.wp.components;var xo=(0,i.createElement)(P.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,i.createElement)(P.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 Bo=(0,i.createElement)(P.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,i.createElement)(P.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 Ao=(0,i.forwardRef)((function(e,t){const n=(0,ko.isAppleOS)()?ko.displayShortcut.primaryShift("z"):ko.displayShortcut.primary("y"),o=(0,l.useSelect)((e=>e(no).hasEditorRedo()),[]),{redo:s}=(0,l.useDispatch)(no);return(0,i.createElement)(To.Button,r({},e,{ref:t,icon:(0,Xt.isRTL)()?Bo:xo,label:(0,Xt.__)("Redo"),shortcut:n,"aria-disabled":!o,onClick:o?s:void 0,className:"editor-history__redo"}))}));var Io=(0,i.forwardRef)((function(e,t){const n=(0,l.useSelect)((e=>e(no).hasEditorUndo()),[]),{undo:o}=(0,l.useDispatch)(no);return(0,i.createElement)(To.Button,r({},e,{ref:t,icon:(0,Xt.isRTL)()?xo:Bo,label:(0,Xt.__)("Undo"),shortcut:ko.displayShortcut.primary("z"),"aria-disabled":!n,onClick:n?o:void 0,className:"editor-history__undo"}))}));var No=(0,u.compose)([(0,l.withSelect)((e=>({isValid:e(p.store).isValidTemplate()}))),(0,l.withDispatch)((e=>{const{setTemplateValidity:t,synchronizeTemplate:n}=e(p.store);return{resetTemplateValidity:()=>t(!0),synchronizeTemplate:n}}))])((function(e){let{isValid:t,...n}=e;return t?null:(0,i.createElement)(To.Notice,{className:"editor-template-validation-notice",isDismissible:!1,status:"warning",actions:[{label:(0,Xt.__)("Keep it as is"),onClick:n.resetTemplateValidity},{label:(0,Xt.__)("Reset the template"),onClick:()=>{window.confirm((0,Xt.__)("Resetting the template may result in loss of content, do you want to continue?"))&&n.synchronizeTemplate()}}]},(0,Xt.__)("The content of your post doesn’t match the template assigned to your post type."))}));var Ro=(0,u.compose)([(0,l.withSelect)((e=>({notices:e(Kt.store).getNotices()}))),(0,l.withDispatch)((e=>({onRemove:e(Kt.store).removeNotice})))])((function(e){let{notices:t,onRemove:n}=e;const o=(0,s.filter)(t,{isDismissible:!0,type:"default"}),r=(0,s.filter)(t,{isDismissible:!1,type:"default"});return(0,i.createElement)(i.Fragment,null,(0,i.createElement)(To.NoticeList,{notices:r,className:"components-editor-notices__pinned"}),(0,i.createElement)(To.NoticeList,{notices:o,className:"components-editor-notices__dismissible",onRemove:n},(0,i.createElement)(No,null)))}));function Do(){const e=(0,l.useSelect)((e=>e(Kt.store).getNotices()),[]),{removeNotice:t}=(0,l.useDispatch)(Kt.store),n=(0,s.filter)(e,{type:"snackbar"});return(0,i.createElement)(To.SnackbarList,{notices:n,className:"components-editor-notices__snackbar",onRemove:t})}var Lo=window.wp.htmlEntities;function Oo(e){let{record:t,checked:n,onChange:o,closePanel:r}=e;const{name:s,kind:a,title:u,key:d}=t,m=(0,l.useSelect)((e=>{var t;const{blocks:n=[]}=e(c.store).getEditedEntityRecord(a,s,d),o=e(p.store).getBlockParents(null===(t=n[0])||void 0===t?void 0:t.clientId);return o[o.length-1]}),[]),h=(0,l.useSelect)((e=>{if("postType"!==a||"wp_template"!==s)return u;const t=e(c.store).getEditedEntityRecord(a,s,d);return e(no).__experimentalGetTemplateInfo(t).title}),[s,a,u,d]),g=(0,l.useSelect)((e=>e(p.store).getSelectedBlockClientId()===m),[m]),f=g?(0,Xt.__)("Selected"):(0,Xt.__)("Select"),{selectBlock:v}=(0,l.useDispatch)(p.store),_=(0,i.useCallback)((()=>v(m)),[m]),y=(0,i.useCallback)((()=>{v(m),r()}),[m]);return(0,i.createElement)(To.PanelRow,null,(0,i.createElement)(To.CheckboxControl,{label:(0,i.createElement)("strong",null,(0,Lo.decodeEntities)(h)||(0,Xt.__)("Untitled")),checked:n,onChange:o}),m?(0,i.createElement)(i.Fragment,null,(0,i.createElement)(To.Button,{onClick:_,className:"entities-saved-states__find-entity",disabled:g},f),(0,i.createElement)(To.Button,{onClick:y,className:"entities-saved-states__find-entity-small",disabled:g},f)):null)}function Uo(e){let{list:t,unselectedEntities:n,setUnselectedEntities:o,closePanel:r}=e;const a=t.length,u=t[0],d=(0,l.useSelect)((e=>e(c.store).getEntityConfig(u.kind,u.name)),[u.kind,u.name]),{name:p}=u;let m=d.label;"wp_template_part"===p&&(m=1===a?(0,Xt.__)("Template Part"):(0,Xt.__)("Template Parts"));const h=function(e,t){switch(e){case"site":return 1===t?(0,Xt.__)("This change will affect your whole site."):(0,Xt.__)("These changes will affect your whole site.");case"wp_template":return(0,Xt.__)("This change will affect pages and posts that use this template.");case"page":case"post":return(0,Xt.__)("The following content has been modified.")}}(p,a);return(0,i.createElement)(To.PanelBody,{title:m,initialOpen:!0},h&&(0,i.createElement)(To.PanelRow,null,h),t.map((e=>(0,i.createElement)(Oo,{key:e.key||e.property,record:e,checked:!(0,s.some)(n,(t=>t.kind===e.kind&&t.name===e.name&&t.key===e.key&&t.property===e.property)),onChange:t=>o(e,t),closePanel:r}))))}const Fo={title:(0,Xt.__)("Title"),description:(0,Xt.__)("Tagline"),site_logo:(0,Xt.__)("Logo"),site_icon:(0,Xt.__)("Icon"),show_on_front:(0,Xt.__)("Show on front"),page_on_front:(0,Xt.__)("Page on front")},Mo=[{kind:"postType",name:"wp_navigation"}];function zo(e){let{close:t}=e;const n=(0,i.useRef)(),{dirtyEntityRecords:o}=(0,l.useSelect)((e=>{const t=e(c.store).__experimentalGetDirtyEntityRecords().filter((e=>!("root"===e.kind&&"site"===e.name))),n=e(c.store).getEntityRecordEdits("root","site"),o=[];for(const e in n)o.push({kind:"root",name:"site",title:Fo[e]||e,property:e});return{dirtyEntityRecords:[...t,...o]}}),[]),{editEntityRecord:a,saveEditedEntityRecord:d,__experimentalSaveSpecifiedEntityEdits:m}=(0,l.useDispatch)(c.store),{__unstableMarkLastChangeAsPersistent:h}=(0,l.useDispatch)(p.store),{createSuccessNotice:g,createErrorNotice:f}=(0,l.useDispatch)(Kt.store),v=(0,s.groupBy)(o,"name"),{site:_,wp_template:y,wp_template_part:b,...E}=v,S=[_,y,b,...Object.values(E)].filter(Array.isArray),[w,P]=(0,i.useState)([]),k=(e,t)=>{let{kind:n,name:o,key:r,property:i}=e;P(t?w.filter((e=>e.kind!==n||e.name!==o||e.key!==r||e.property!==i)):[...w,{kind:n,name:o,key:r,property:i}])},C=(0,i.useCallback)((()=>t()),[t]),[T,x]=(0,u.__experimentalUseDialog)({onClose:()=>C()});return(0,i.createElement)("div",r({ref:T},x,{className:"entities-saved-states__panel"}),(0,i.createElement)(To.Flex,{className:"entities-saved-states__panel-header",gap:2},(0,i.createElement)(To.FlexItem,{isBlock:!0,as:To.Button,ref:n,variant:"primary",disabled:o.length-w.length==0,onClick:()=>{const e=o.filter((e=>{let{kind:t,name:n,key:o,property:r}=e;return!(0,s.some)(w,(e=>e.kind===t&&e.name===n&&e.key===o&&e.property===r))}));t(e);const n=[],r=[];e.forEach((e=>{let{kind:t,name:o,key:i,property:s}=e;"root"===t&&"site"===o?n.push(s):(Mo.some((e=>e.kind===t&&e.name===o))&&a(t,o,i,{status:"publish"}),r.push(d(t,o,i)))})),n.length&&r.push(m("root","site",void 0,n)),h(),Promise.all(r).then((e=>{e.some((e=>void 0===e))?f((0,Xt.__)("Saving failed.")):g((0,Xt.__)("Site updated."),{type:"snackbar"})})).catch((e=>f(`${(0,Xt.__)("Saving failed.")} ${e}`)))},className:"editor-entities-saved-states__save-button"},(0,Xt.__)("Save")),(0,i.createElement)(To.FlexItem,{isBlock:!0,as:To.Button,variant:"secondary",onClick:C},(0,Xt.__)("Cancel"))),(0,i.createElement)("div",{className:"entities-saved-states__text-prompt"},(0,i.createElement)("strong",null,(0,Xt.__)("Are you ready to save?")),(0,i.createElement)("p",null,(0,Xt.__)("The following changes have been made to your site, templates, and content."))),S.map((e=>(0,i.createElement)(Uo,{key:e[0].name,list:e,closePanel:C,unselectedEntities:w,setUnselectedEntities:k}))))}function Vo(e){let{text:t,children:n}=e;const o=(0,u.useCopyToClipboard)(t);return(0,i.createElement)(To.Button,{variant:"secondary",ref:o},n)}class Ho extends i.Component{constructor(){super(...arguments),this.reboot=this.reboot.bind(this),this.getContent=this.getContent.bind(this),this.state={error:null}}componentDidCatch(e){this.setState({error:e}),(0,d.doAction)("editor.ErrorBoundary.errorLogged",e)}reboot(){this.props.onError()}getContent(){try{return(0,l.select)(no).getEditedPostContent()}catch(e){}}render(){const{error:e}=this.state;return e?(0,i.createElement)(p.Warning,{className:"editor-error-boundary",actions:[(0,i.createElement)(To.Button,{key:"recovery",onClick:this.reboot,variant:"secondary"},(0,Xt.__)("Attempt Recovery")),(0,i.createElement)(Vo,{key:"copy-post",text:this.getContent},(0,Xt.__)("Copy Post Text")),(0,i.createElement)(Vo,{key:"copy-error",text:e.stack},(0,Xt.__)("Copy Error"))]},(0,Xt.__)("The editor has encountered an unexpected error.")):this.props.children}}var Wo=Ho;const Go=window.requestIdleCallback?window.requestIdleCallback:window.requestAnimationFrame;let jo,$o=0;function Ko(){const{postId:e,isEditedPostNew:t,hasRemoteAutosave:n}=(0,l.useSelect)((e=>({postId:e(no).getCurrentPostId(),isEditedPostNew:e(no).isEditedPostNew(),hasRemoteAutosave:!!e(no).getEditorSettings().autosave})),[]),{getEditedPostAttribute:o}=(0,l.useSelect)(no),{createWarningNotice:r,removeNotice:s}=(0,l.useDispatch)(Kt.store),{editPost:c,resetEditorBlocks:u}=(0,l.useDispatch)(no);(0,i.useEffect)((()=>{let i=function(e,t){return window.sessionStorage.getItem(Yt(e,t))}(e,t);if(!i)return;try{i=JSON.parse(i)}catch(e){return}const{post_title:l,content:d,excerpt:p}=i,m={title:l,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"+ ++$o;r((0,Xt.__)("The backup of this post in your browser is different from the version below."),{id:h,actions:[{label:(0,Xt.__)("Restore the backup"),onClick(){const{content:e,...t}=m;c(t),u((0,a.parse)(m.content)),s(h)}}]})}),[t,e])}var Yo=(0,u.ifCondition)((()=>{if(void 0===jo)try{window.sessionStorage.setItem("__wpEditorTestSessionStorage",""),window.sessionStorage.removeItem("__wpEditorTestSessionStorage"),jo=!0}catch(e){jo=!1}return jo}))((function(){const{autosave:e}=(0,l.useDispatch)(no),t=(0,i.useCallback)((()=>{Go((()=>e({local:!0})))}),[]);Ko(),function(){const{postId:e,isEditedPostNew:t,isDirty:n,isAutosaving:o,didError:r}=(0,l.useSelect)((e=>({postId:e(no).getCurrentPostId(),isEditedPostNew:e(no).isEditedPostNew(),isDirty:e(no).isEditedPostDirty(),isAutosaving:e(no).isAutosavingPost(),didError:e(no).didPostSaveRequestFail()})),[]),s=(0,i.useRef)(n),a=(0,i.useRef)(o);(0,i.useEffect)((()=>{!r&&(a.current&&!o||s.current&&!n)&&Qt(e,t),s.current=n,a.current=o}),[n,o,r]);const c=(0,u.usePrevious)(t),d=(0,u.usePrevious)(e);(0,i.useEffect)((()=>{d===e&&c&&!t&&Qt(e,!0)}),[t,e])}();const{localAutosaveInterval:n}=(0,l.useSelect)((e=>({localAutosaveInterval:e(no).getEditorSettings().localAutosaveInterval})),[]);return(0,i.createElement)(ao,{interval:n,autosave:t})}));var qo=function(e){let{children:t}=e;const n=(0,l.useSelect)((e=>{const{getEditedPostAttribute:t}=e(no),{getPostType:n}=e(c.store);return n(t("type"))}),[]);return(0,s.get)(n,["supports","page-attributes"],!1)?t:null};var Qo=(0,l.withSelect)((e=>{const{getEditedPostAttribute:t}=e(no),{getPostType:n}=e(c.store);return{postType:n(t("type"))}}))((function(e){let{postType:t,children:n,supportKeys:o}=e,r=!0;return t&&(r=(0,s.some)((0,s.castArray)(o),(e=>!!t.supports[e]))),r?n:null}));const Xo=e=>{let{onUpdateOrder:t,order:n=0}=e;const[o,r]=(0,i.useState)(null),s=null===o?n:o;return(0,i.createElement)(To.TextControl,{className:"editor-page-attributes__order",type:"number",label:(0,Xt.__)("Order"),value:s,onChange:e=>{var n;r(e);const o=Number(e);Number.isInteger(o)&&""!==(null===(n=e.trim)||void 0===n?void 0:n.call(e))&&t(Number(e))},size:6,onBlur:()=>{r(null)}})};var Zo=(0,u.compose)([(0,l.withSelect)((e=>({order:e(no).getEditedPostAttribute("menu_order")}))),(0,l.withDispatch)((e=>({onUpdateOrder(t){e(no).editPost({menu_order:t})}})))])((function(e){return(0,i.createElement)(Qo,{supportKeys:"page-attributes"},(0,i.createElement)(Xo,e))})),Jo=n(4793),er=n.n(Jo);function tr(e){const t=e.map((e=>({children:[],parent:null,...e}))),n=(0,s.groupBy)(t,"parent");if(n.null&&n.null.length)return t;const 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,s.unescape)(e.replace("'","'")),or=e=>({...e,name:nr(e.name)});function rr(e){var t;return null!=e&&null!==(t=e.title)&&void 0!==t&&t.rendered?(0,Lo.decodeEntities)(e.title.rendered):`#${e.id} (${(0,Xt.__)("no title")})`}const ir=(e,t)=>{const n=er()(e||"").toLowerCase(),o=er()(t||"").toLowerCase();return n===o?0:n.startsWith(o)?n.length:1/0};var sr=function(){const{editPost:e}=(0,l.useDispatch)(no),[t,n]=(0,i.useState)(!1),{parentPost:o,parentPostId:r,items:a,postType:u}=(0,l.useSelect)((e=>{const{getPostType:n,getEntityRecords:o,getEntityRecord:r}=e(c.store),{getCurrentPostId:i,getEditedPostAttribute:a}=e(no),l=a("type"),u=a("parent"),d=n(l),p=i(),m=(0,s.get)(d,["hierarchical"],!1),h={per_page:100,exclude:p,parent_exclude:p,orderby:"menu_order",order:"asc",_fields:"id,title,parent"};return t&&(h.search=t),{parentPostId:u,parentPost:u?r("postType",l,u):null,items:m?o("postType",l,h):[],postType:d}}),[t]),d=(0,s.get)(u,["hierarchical"],!1),p=(0,s.get)(u,["labels","parent_item_colon"]),m=a||[],h=(0,i.useMemo)((()=>{const e=function(n){let o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;const r=n.map((t=>[{value:t.id,label:"— ".repeat(o)+(0,s.unescape)(t.name),rawName:t.name},...e(t.children||[],o+1)])),i=r.sort(((e,n)=>{let[o]=e,[r]=n;return ir(o.rawName,t)>=ir(r.rawName,t)?1:-1}));return i.flat()};let n=m.map((e=>({id:e.id,parent:e.parent,name:rr(e)})));t||(n=tr(n));const i=e(n),a=(0,s.find)(i,(e=>e.value===r));return o&&!a&&i.unshift({value:r,label:rr(o)}),i}),[m,t]);return d&&p?(0,i.createElement)(To.ComboboxControl,{className:"editor-page-attributes__parent",label:p,value:r,options:h,onFilterValueChange:(0,s.debounce)((e=>{n(e)}),300),onChange:t=>{e({parent:t})}}):null};var ar=function(){const{availableTemplates:e,selectedTemplate:t,isViewable:n}=(0,l.useSelect)((e=>{var t,n;const{getEditedPostAttribute:o,getEditorSettings:r,getCurrentPostType:i}=e(no),{getPostType:s}=e(c.store);return{selectedTemplate:o("template"),availableTemplates:r().availableTemplates,isViewable:null!==(t=null===(n=s(i()))||void 0===n?void 0:n.viewable)&&void 0!==t&&t}}),[]),{editPost:o}=(0,l.useDispatch)(no);return!n||(0,s.isEmpty)(e)?null:(0,i.createElement)(To.SelectControl,{label:(0,Xt.__)("Template:"),value:t,onChange:e=>{o({template:e||""})},options:(0,s.map)(e,((e,t)=>({value:t,label:e})))})};const lr={who:"authors",per_page:50,_fields:"id,name",context:"view"};var cr=function(){const[e,t]=(0,i.useState)(),{authorId:n,isLoading:o,authors:r,postAuthor:a}=(0,l.useSelect)((t=>{const{getUser:n,getUsers:o,isResolving:r}=t(c.store),{getEditedPostAttribute:i}=t(no),s=n(i("author"),{context:"view"}),a={...lr};return e&&(a.search=e),{authorId:i("author"),postAuthor:s,authors:o(a),isLoading:r("core","getUsers",[a])}}),[e]),{editPost:u}=(0,l.useDispatch)(no),d=(0,i.useMemo)((()=>{const e=(null!=r?r:[]).map((e=>({value:e.id,label:(0,Lo.decodeEntities)(e.name)})));return e.findIndex((e=>{let{value:t}=e;return(null==a?void 0:a.id)===t}))<0&&a?[{value:a.id,label:(0,Lo.decodeEntities)(a.name)},...e]:e}),[r,a]);return a?(0,i.createElement)(To.ComboboxControl,{label:(0,Xt.__)("Author"),options:d,value:n,onFilterValueChange:(0,s.debounce)((e=>{t(e)}),300),onChange:e=>{e&&u({author:e})},isLoading:o,allowReset:!1}):null};var ur=function(){const{editPost:e}=(0,l.useDispatch)(no),{postAuthor:t,authors:n}=(0,l.useSelect)((e=>({postAuthor:e(no).getEditedPostAttribute("author"),authors:e(c.store).getUsers(lr)})),[]),o=(0,i.useMemo)((()=>(null!=n?n:[]).map((e=>({value:e.id,label:(0,Lo.decodeEntities)(e.name)})))),[n]);return(0,i.createElement)(To.SelectControl,{className:"post-author-selector",label:(0,Xt.__)("Author"),options:o,onChange:t=>{const n=Number(t);e({author:n})},value:t})};var dr=function(){return(0,l.useSelect)((e=>{const t=e(c.store).getUsers(lr);return(null==t?void 0:t.length)>=25}),[])?(0,i.createElement)(cr,null):(0,i.createElement)(ur,null)};function pr(e){let{children:t}=e;const{hasAssignAuthorAction:n,hasAuthors:o}=(0,l.useSelect)((e=>{const t=e(no).getCurrentPost(),n=e(c.store).getUsers(lr);return{hasAssignAuthorAction:(0,s.get)(t,["_links","wp:action-assign-author"],!1),hasAuthors:(null==n?void 0:n.length)>=1}}),[]);return n&&o?(0,i.createElement)(Qo,{supportKeys:"author"},t):null}var mr=(0,u.compose)([(0,l.withSelect)((e=>({commentStatus:e(no).getEditedPostAttribute("comment_status")}))),(0,l.withDispatch)((e=>({editPost:e(no).editPost})))])((function(e){let{commentStatus:t="open",...n}=e;return(0,i.createElement)(To.CheckboxControl,{label:(0,Xt.__)("Allow comments"),checked:"open"===t,onChange:()=>n.editPost({comment_status:"open"===t?"closed":"open"})})}));var hr=(0,u.compose)([(0,l.withSelect)((e=>({excerpt:e(no).getEditedPostAttribute("excerpt")}))),(0,l.withDispatch)((e=>({onUpdateExcerpt(t){e(no).editPost({excerpt:t})}})))])((function(e){let{excerpt:t,onUpdateExcerpt:n}=e;return(0,i.createElement)("div",{className:"editor-post-excerpt"},(0,i.createElement)(To.TextareaControl,{label:(0,Xt.__)("Write an excerpt (optional)"),className:"editor-post-excerpt__textarea",onChange:e=>n(e),value:t}),(0,i.createElement)(To.ExternalLink,{href:(0,Xt.__)("https://wordpress.org/support/article/settings-sidebar/#excerpt")},(0,Xt.__)("Learn more about manual excerpts")))}));var gr=function(e){return(0,i.createElement)(Qo,r({},e,{supportKeys:"excerpt"}))},fr=window.wp.blob;var vr=(0,l.withSelect)((e=>{const{getThemeSupports:t}=e(c.store),{getEditedPostAttribute:n}=e(no);return{postType:n("type"),themeSupports:t()}}))((function(e){let{themeSupports:t,children:n,postType:o,supportKeys:r}=e;return(0,s.some)((0,s.castArray)(r),(e=>{const n=(0,s.get)(t,[e],!1);return"post-thumbnails"===e&&Array.isArray(n)?(0,s.includes)(n,o):n}))?n:null}));var _r=function(e){return(0,i.createElement)(vr,{supportKeys:"post-thumbnails"},(0,i.createElement)(Qo,r({},e,{supportKeys:"thumbnail"})))};const yr=["image"],br=(0,Xt.__)("Featured image"),Er=(0,Xt.__)("Set featured image"),Sr=(0,Xt.__)("Remove image"),wr=(0,i.createElement)("p",null,(0,Xt.__)("To edit the featured image, you need permission to upload media."));const Pr=(0,l.withSelect)((e=>{const{getMedia:t,getPostType:n}=e(c.store),{getCurrentPostId:o,getEditedPostAttribute:r}=e(no),i=r("featured_media");return{media:i?t(i,{context:"view"}):null,currentPostId:o(),postType:n(r("type")),featuredImageId:i}})),kr=(0,l.withDispatch)(((e,t,n)=>{let{noticeOperations:o}=t,{select:r}=n;const{editPost:i}=e(no);return{onUpdateImage(e){i({featured_media:e.id})},onDropImage(e){r(p.store).getSettings().mediaUpload({allowedTypes:["image"],filesList:e,onFileChange(e){let[t]=e;i({featured_media:t.id})},onError(e){o.removeAllNotices(),o.createErrorNotice(e)}})},onRemoveImage(){i({featured_media:0})}}}));var Cr=(0,u.compose)(To.withNotices,Pr,kr,(0,To.withFilters)("editor.PostFeaturedImage"))((function(e){var t,n;let{currentPostId:o,featuredImageId:r,onUpdateImage:a,onRemoveImage:c,media:u,postType:m,noticeUI:h,noticeOperations:g}=e;const[f,v]=(0,i.useState)(!1),_=(0,l.useSelect)((e=>e(p.store).getSettings().mediaUpload),[]),y=(0,s.get)(m,["labels"],{}),{mediaWidth:b,mediaHeight:E,mediaSourceUrl:S}=function(e,t){var n,o,r,i;if(!e)return{};const s=(0,d.applyFilters)("editor.PostFeaturedImage.imageSize","large",e.id,t);if(s in(null!==(n=null==e||null===(o=e.media_details)||void 0===o?void 0:o.sizes)&&void 0!==n?n:{}))return{mediaWidth:e.media_details.sizes[s].width,mediaHeight:e.media_details.sizes[s].height,mediaSourceUrl:e.media_details.sizes[s].source_url};const a=(0,d.applyFilters)("editor.PostFeaturedImage.imageSize","thumbnail",e.id,t);return a in(null!==(r=null==e||null===(i=e.media_details)||void 0===i?void 0:i.sizes)&&void 0!==r?r:{})?{mediaWidth:e.media_details.sizes[a].width,mediaHeight:e.media_details.sizes[a].height,mediaSourceUrl:e.media_details.sizes[a].source_url}:{mediaWidth:e.media_details.width,mediaHeight:e.media_details.height,mediaSourceUrl:e.source_url}}(u,o);function w(e){_({allowedTypes:["image"],filesList:e,onFileChange(e){let[t]=e;(0,fr.isBlobURL)(null==t?void 0:t.url)?v(!0):(a(t),v(!1))},onError(e){g.removeAllNotices(),g.createErrorNotice(e)}})}return(0,i.createElement)(_r,null,h,(0,i.createElement)("div",{className:"editor-post-featured-image"},u&&(0,i.createElement)("div",{id:`editor-post-featured-image-${r}-describedby`,className:"hidden"},u.alt_text&&(0,Xt.sprintf)((0,Xt.__)("Current image: %s"),u.alt_text),!u.alt_text&&(0,Xt.sprintf)((0,Xt.__)("The current image has no alternative text. The file name is: %s"),(null===(t=u.media_details.sizes)||void 0===t||null===(n=t.full)||void 0===n?void 0:n.file)||u.slug)),(0,i.createElement)(p.MediaUploadCheck,{fallback:wr},(0,i.createElement)(p.MediaUpload,{title:y.featured_image||br,onSelect:a,unstableFeaturedImageFlow:!0,allowedTypes:yr,modalClass:"editor-post-featured-image__media-modal",render:e=>{let{open:t}=e;return(0,i.createElement)("div",{className:"editor-post-featured-image__container"},(0,i.createElement)(To.Button,{className:r?"editor-post-featured-image__preview":"editor-post-featured-image__toggle",onClick:t,"aria-label":r?(0,Xt.__)("Edit or update the image"):null,"aria-describedby":r?`editor-post-featured-image-${r}-describedby`:null},!!r&&u&&(0,i.createElement)(To.ResponsiveWrapper,{naturalWidth:b,naturalHeight:E,isInline:!0},(0,i.createElement)("img",{src:S,alt:""})),f&&(0,i.createElement)(To.Spinner,null),!r&&!f&&(y.set_featured_image||Er)),(0,i.createElement)(To.DropZone,{onFilesDrop:w}))},value:r})),!!r&&(0,i.createElement)(p.MediaUploadCheck,null,u&&(0,i.createElement)(p.MediaUpload,{title:y.featured_image||br,onSelect:a,unstableFeaturedImageFlow:!0,allowedTypes:yr,modalClass:"editor-post-featured-image__media-modal",render:e=>{let{open:t}=e;return(0,i.createElement)(To.Button,{onClick:t,variant:"secondary"},(0,Xt.__)("Replace Image"))}}),(0,i.createElement)(To.Button,{onClick:c,variant:"link",isDestructive:!0},y.remove_featured_image||Sr))))}));var Tr=(0,l.withSelect)((e=>({disablePostFormats:e(no).getEditorSettings().disablePostFormats})))((function(e){let{disablePostFormats:t,...n}=e;return!t&&(0,i.createElement)(Qo,r({},n,{supportKeys:"post-formats"}))}));const xr=[{id:"aside",caption:(0,Xt.__)("Aside")},{id:"audio",caption:(0,Xt.__)("Audio")},{id:"chat",caption:(0,Xt.__)("Chat")},{id:"gallery",caption:(0,Xt.__)("Gallery")},{id:"image",caption:(0,Xt.__)("Image")},{id:"link",caption:(0,Xt.__)("Link")},{id:"quote",caption:(0,Xt.__)("Quote")},{id:"standard",caption:(0,Xt.__)("Standard")},{id:"status",caption:(0,Xt.__)("Status")},{id:"video",caption:(0,Xt.__)("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,u.useInstanceId)(Br)}`,{postFormat:t,suggestedFormat:n,supportedFormats:o}=(0,l.useSelect)((e=>{const{getEditedPostAttribute:t,getSuggestedPostFormat:n}=e(no),o=t("format"),r=e(c.store).getThemeSupports();return{postFormat:null!=o?o:"standard",suggestedFormat:n(),supportedFormats:r.formats}}),[]),r=xr.filter((e=>(0,s.includes)(o,e.id)||t===e.id)),a=(0,s.find)(r,(e=>e.id===n)),{editPost:d}=(0,l.useDispatch)(no),p=e=>d({format:e});return(0,i.createElement)(Tr,null,(0,i.createElement)("div",{className:"editor-post-format"},(0,i.createElement)(To.SelectControl,{label:(0,Xt.__)("Post Format"),value:t,onChange:e=>p(e),id:e,options:r.map((e=>({label:e.caption,value:e.id})))}),a&&a.id!==t&&(0,i.createElement)("p",{className:"editor-post-format__suggestion"},(0,i.createElement)(To.Button,{variant:"link",onClick:()=>p(a.id)},(0,Xt.sprintf)((0,Xt.__)("Apply suggested format: %s"),a.caption)))))}var Ar=(0,i.createElement)(P.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,i.createElement)(P.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 Ir=(0,l.withSelect)((e=>{const{getCurrentPostLastRevisionId:t,getCurrentPostRevisionsCount:n}=e(no);return{lastRevisionId:t(),revisionsCount:n()}}))((function(e){let{lastRevisionId:t,revisionsCount:n,children:o}=e;return!t||n<2?null:(0,i.createElement)(Qo,{supportKeys:"revisions"},o)}));var Nr=(0,l.withSelect)((e=>{const{getCurrentPostLastRevisionId:t,getCurrentPostRevisionsCount:n}=e(no);return{lastRevisionId:t(),revisionsCount:n()}}))((function(e){let{lastRevisionId:t,revisionsCount:n}=e;return(0,i.createElement)(Ir,null,(0,i.createElement)(To.Button,{href:(0,E.addQueryArgs)("revision.php",{revision:t,gutenberg:!0}),className:"editor-post-last-revision__title",icon:Ar},(0,Xt.sprintf)((0,Xt._n)("%d Revision","%d Revisions",n),n)))}));function Rr(){const e="core/editor/post-locked-modal-"+(0,u.useInstanceId)(Rr),{autosave:t,updatePostLock:n}=(0,l.useDispatch)(no),{isLocked:o,isTakeover:r,user:a,postId:p,postLockUtils:m,activePostLock:h,postType:g,previewLink:f}=(0,l.useSelect)((e=>{const{isPostLocked:t,isPostLockTakeover:n,getPostLockUser:o,getCurrentPostId:r,getActivePostLock:i,getEditedPostAttribute:s,getEditedPostPreviewLink:a,getEditorSettings:l}=e(no),{getPostType:u}=e(c.store);return{isLocked:t(),isTakeover:n(),user:o(),postId:r(),postLockUtils:l().postLockUtils,activePostLock:i(),postType:u(s("type")),previewLink:a()}}),[]);if((0,i.useEffect)((()=>{function r(){if(o||!h)return;const e=new window.FormData;if(e.append("action","wp-remove-post-lock"),e.append("_wpnonce",m.unlockNonce),e.append("post_ID",p),e.append("active_post_lock",h),window.navigator.sendBeacon)window.navigator.sendBeacon(m.ajaxUrl,e);else{const t=new window.XMLHttpRequest;t.open("POST",m.ajaxUrl,!1),t.send(e)}}return(0,d.addAction)("heartbeat.send",e,(function(e){o||(e["wp-refresh-post-lock"]={lock:h,post_id:p})})),(0,d.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,d.removeAction)("heartbeat.send",e),(0,d.removeAction)("heartbeat.tick",e),window.removeEventListener("beforeunload",r)}}),[]),!o)return null;const v=a.name,_=a.avatar,y=(0,E.addQueryArgs)("post.php",{"get-post-lock":"1",lockKey:!0,post:p,action:"edit",_wpnonce:m.nonce}),b=(0,E.addQueryArgs)("edit.php",{post_type:(0,s.get)(g,["slug"])}),S=(0,Xt.__)("Exit editor");return(0,i.createElement)(To.Modal,{title:r?(0,Xt.__)("Someone else has taken over this post"):(0,Xt.__)("This post is already being edited"),focusOnMount:!0,shouldCloseOnClickOutside:!1,shouldCloseOnEsc:!1,isDismissible:!1,className:"editor-post-locked-modal"},!!_&&(0,i.createElement)("img",{src:_,alt:(0,Xt.__)("Avatar"),className:"editor-post-locked-modal__avatar",width:64,height:64}),(0,i.createElement)("div",null,!!r&&(0,i.createElement)("p",null,(0,i.createInterpolateElement)(v?(0,Xt.sprintf)((0,Xt.__)("<strong>%s</strong> now has editing control of this post (<PreviewLink />). Don’t worry, your changes up to this moment have been saved."),v):(0,Xt.__)("Another user now has editing control of this post (<PreviewLink />). Don’t worry, your changes up to this moment have been saved."),{strong:(0,i.createElement)("strong",null),PreviewLink:(0,i.createElement)(To.ExternalLink,{href:f},(0,Xt.__)("preview"))})),!r&&(0,i.createElement)(i.Fragment,null,(0,i.createElement)("p",null,(0,i.createInterpolateElement)(v?(0,Xt.sprintf)((0,Xt.__)("<strong>%s</strong> is currently working on this post (<PreviewLink />), which means you cannot make changes, unless you take over."),v):(0,Xt.__)("Another user is currently working on this post (<PreviewLink />), which means you cannot make changes, unless you take over."),{strong:(0,i.createElement)("strong",null),PreviewLink:(0,i.createElement)(To.ExternalLink,{href:f},(0,Xt.__)("preview"))})),(0,i.createElement)("p",null,(0,Xt.__)("If you take over, the other user will lose editing control to the post, but their changes will be saved."))),(0,i.createElement)(To.Flex,{className:"editor-post-locked-modal__buttons",justify:"flex-end",expanded:!1},!r&&(0,i.createElement)(To.FlexItem,null,(0,i.createElement)(To.Button,{variant:"tertiary",href:y},(0,Xt.__)("Take over"))),(0,i.createElement)(To.FlexItem,null,(0,i.createElement)(To.Button,{variant:"primary",href:b},S)))))}var Dr=(0,u.compose)((0,l.withSelect)((e=>{const{isCurrentPostPublished:t,getCurrentPostType:n,getCurrentPost:o}=e(no);return{hasPublishAction:(0,s.get)(o(),["_links","wp:action-publish"],!1),isPublished:t(),postType:n()}})))((function(e){let{hasPublishAction:t,isPublished:n,children:o}=e;return n||!t?null:o}));var Lr=(0,u.compose)((0,l.withSelect)((e=>({status:e(no).getEditedPostAttribute("status")}))),(0,l.withDispatch)((e=>({onUpdateStatus(t){e(no).editPost({status:t})}}))))((function(e){let{status:t,onUpdateStatus:n}=e;return(0,i.createElement)(Dr,null,(0,i.createElement)(To.CheckboxControl,{label:(0,Xt.__)("Pending review"),checked:"pending"===t,onChange:()=>{n("pending"===t?"draft":"pending")}}))}));var Or=(0,u.compose)([(0,l.withSelect)((e=>({pingStatus:e(no).getEditedPostAttribute("ping_status")}))),(0,l.withDispatch)((e=>({editPost:e(no).editPost})))])((function(e){let{pingStatus:t="open",...n}=e;return(0,i.createElement)(To.CheckboxControl,{label:(0,Xt.__)("Allow pingbacks & trackbacks"),checked:"open"===t,onChange:()=>n.editPost({ping_status:"open"===t?"closed":"open"})})}));class Ur extends i.Component{constructor(){super(...arguments),this.buttonRef=(0,i.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,i.renderToString)((0,i.createElement)("div",{className:"editor-post-preview-button__interstitial-message"},(0,i.createElement)(To.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 96 96"},(0,i.createElement)(To.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,i.createElement)(To.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,i.createElement)("p",null,(0,Xt.__)("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,d.applyFilters)("editor.PostPreview.interstitialMarkup",t),e.write(t),e.title=(0,Xt.__)("Generating preview…"),e.close()}(this.previewWindow.document)):this.setPreviewWindowLink(e.target.href)}render(){const{previewLink:e,currentPostLink:t,isSaveable:n,role:o}=this.props,r=e||t,s=uo()({"editor-post-preview":!this.props.className},this.props.className);return(0,i.createElement)(To.Button,{variant:this.props.className?void 0:"tertiary",className:s,href:r,target:this.getWindowTarget(),disabled:!n,onClick:this.openPreviewWindow,ref:this.buttonRef,role:o},this.props.textContent?this.props.textContent:(0,i.createElement)(i.Fragment,null,(0,Xt._x)("Preview","imperative verb"),(0,i.createElement)(To.VisuallyHidden,{as:"span"},(0,Xt.__)("(opens in a new tab)"))))}}var Fr=(0,u.compose)([(0,l.withSelect)(((e,t)=>{let{forcePreviewLink:n,forceIsAutosaveable:o}=t;const{getCurrentPostId:r,getCurrentPostAttribute:i,getEditedPostAttribute:a,isEditedPostSaveable:l,isEditedPostAutosaveable:u,getEditedPostPreviewLink:d,isPostLocked:p}=e(no),{getPostType:m}=e(c.store),h=d(),g=m(a("type"));return{postId:r(),currentPostLink:i("link"),previewLink:void 0!==n?n:h,isSaveable:l(),isAutosaveable:o||u(),isViewable:(0,s.get)(g,["viewable"],!1),isDraft:-1!==["draft","auto-draft"].indexOf(a("status")),isPostLocked:p()}})),(0,l.withDispatch)((e=>({autosave:e(no).autosave,savePost:e(no).savePost}))),(0,u.ifCondition)((e=>{let{isViewable:t}=e;return t}))])(Ur);var Mr=(0,u.compose)([(0,l.withSelect)(((e,t)=>{let{forceIsSaving:n}=t;const{isCurrentPostPublished:o,isEditedPostBeingScheduled:r,isSavingPost:i,isPublishingPost:a,getCurrentPost:l,getCurrentPostType:c,isAutosavingPost:u}=e(no);return{isPublished:o(),isBeingScheduled:r(),isSaving:n||i(),isPublishing:a(),hasPublishAction:(0,s.get)(l(),["_links","wp:action-publish"],!1),postType:c(),isAutosaving:u()}}))])((function(e){let{isPublished:t,isBeingScheduled:n,isSaving:o,isPublishing:r,hasPublishAction:i,isAutosaving:s,hasNonPostEntityChanges:a}=e;return r?(0,Xt.__)("Publishing…"):t&&o&&!s?(0,Xt.__)("Updating…"):n&&o&&!s?(0,Xt.__)("Scheduling…"):i?t?a?(0,Xt.__)("Update…"):(0,Xt.__)("Update"):n?a?(0,Xt.__)("Schedule…"):(0,Xt.__)("Schedule"):(0,Xt.__)("Publish"):a?(0,Xt.__)("Submit for Review…"):(0,Xt.__)("Submit for Review")}));const zr=()=>{};class Vr extends i.Component{constructor(e){super(e),this.buttonNode=(0,i.createRef)(),this.createOnClick=this.createOnClick.bind(this),this.closeEntitiesSavedStates=this.closeEntitiesSavedStates.bind(this),this.state={entitiesSavedStatesCallback:!1}}componentDidMount(){this.props.focusOnMount&&this.buttonNode.current.focus()}createOnClick(e){var t=this;return function(){for(var n=arguments.length,o=new Array(n),r=0;r<n;r++)o[r]=arguments[r];const{hasNonPostEntityChanges:i,setEntitiesSavedStatesCallback:s}=t.props;return i&&s?(t.setState({entitiesSavedStatesCallback:()=>e(...o)}),s((()=>t.closeEntitiesSavedStates)),zr):e(...o)}}closeEntitiesSavedStates(e){const{postType:t,postId:n}=this.props,{entitiesSavedStatesCallback:o}=this.state;this.setState({entitiesSavedStatesCallback:!1},(()=>{e&&(0,s.some)(e,(e=>"postType"===e.kind&&e.name===t&&e.key===n))&&o()}))}render(){const{forceIsDirty:e,forceIsSaving:t,hasPublishAction:n,isBeingScheduled:o,isOpen:s,isPostSavingLocked:a,isPublishable:l,isPublished:c,isSaveable:u,isSaving:d,isAutoSaving:p,isToggle:m,onSave:h,onStatusChange:g,onSubmit:f=zr,onToggle:v,visibility:_,hasNonPostEntityChanges:y,isSavingNonPostEntityChanges:b}=this.props,E=(d||t||!u||a||!l&&!e)&&(!y||b),S=(c||d||t||!u||!l&&!e)&&(!y||b);let w;w=n?"private"===_?"private":o?"future":"publish":"pending";const P={"aria-disabled":E,className:"editor-post-publish-button",isBusy:!p&&d&&c,variant:"primary",onClick:this.createOnClick((()=>{E||(f(),g(w),h())}))},k={"aria-disabled":S,"aria-expanded":s,className:"editor-post-publish-panel__toggle",isBusy:d&&c,variant:"primary",onClick:this.createOnClick((()=>{S||v()}))},C=o?(0,Xt.__)("Schedule…"):(0,Xt.__)("Publish"),T=(0,i.createElement)(Mr,{forceIsSaving:t,hasNonPostEntityChanges:y}),x=m?k:P,B=m?C:T;return(0,i.createElement)(i.Fragment,null,(0,i.createElement)(To.Button,r({ref:this.buttonNode},x,{className:uo()(x.className,"editor-post-publish-button__button",{"has-changes-dot":y})}),B))}}var Hr=(0,u.compose)([(0,l.withSelect)((e=>{const{isSavingPost:t,isAutosavingPost:n,isEditedPostBeingScheduled:o,getEditedPostVisibility:r,isCurrentPostPublished:i,isEditedPostSaveable:a,isEditedPostPublishable:l,isPostSavingLocked:c,getCurrentPost:u,getCurrentPostType:d,getCurrentPostId:p,hasNonPostEntityChanges:m,isSavingNonPostEntityChanges:h}=e(no),g=n();return{isSaving:t()||g,isAutoSaving:g,isBeingScheduled:o(),visibility:r(),isSaveable:a(),isPostSavingLocked:c(),isPublishable:l(),isPublished:i(),hasPublishAction:(0,s.get)(u(),["_links","wp:action-publish"],!1),postType:d(),postId:p(),hasNonPostEntityChanges:m(),isSavingNonPostEntityChanges:h()}})),(0,l.withDispatch)((e=>{const{editPost:t,savePost:n}=e(no);return{onStatusChange:e=>t({status:e},{undoIgnore:!0}),onSave:n}}))])(Vr);var Wr=(0,i.createElement)(P.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,i.createElement)(P.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 Gr=(0,i.createElement)(P.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},(0,i.createElement)(P.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 jr={public:{label:(0,Xt.__)("Public"),info:(0,Xt.__)("Visible to everyone.")},private:{label:(0,Xt.__)("Private"),info:(0,Xt.__)("Only visible to site admins and editors.")},password:{label:(0,Xt.__)("Password protected"),info:(0,Xt.__)("Only those with the password can view this post.")}};function $r(e){let{onClose:t}=e;const n=(0,u.useInstanceId)($r),{status:o,visibility:r,password:s}=(0,l.useSelect)((e=>({status:e(no).getEditedPostAttribute("status"),visibility:e(no).getEditedPostVisibility(),password:e(no).getEditedPostAttribute("password")}))),{editPost:a,savePost:c}=(0,l.useDispatch)(no),[d,m]=(0,i.useState)(!!s),[h,g]=(0,i.useState)(!1);return(0,i.createElement)("div",{className:"editor-post-visibility"},(0,i.createElement)(p.__experimentalInspectorPopoverHeader,{title:(0,Xt.__)("Visibility"),help:(0,Xt.__)("Control how this post is viewed."),onClose:t}),(0,i.createElement)("fieldset",{className:"editor-post-visibility__fieldset"},(0,i.createElement)(To.VisuallyHidden,{as:"legend"},(0,Xt.__)("Visibility")),(0,i.createElement)(Kr,{instanceId:n,value:"public",label:jr.public.label,info:jr.public.info,checked:"public"===r&&!d,onChange:()=>{a({status:"private"===r?"draft":o,password:""}),m(!1)}}),(0,i.createElement)(Kr,{instanceId:n,value:"private",label:jr.private.label,info:jr.private.info,checked:"private"===r,onChange:()=>{g(!0)}}),(0,i.createElement)(Kr,{instanceId:n,value:"password",label:jr.password.label,info:jr.password.info,checked:d,onChange:()=>{a({status:"private"===r?"draft":o,password:s||""}),m(!0)}}),d&&(0,i.createElement)("div",{className:"editor-post-visibility__password"},(0,i.createElement)(To.VisuallyHidden,{as:"label",htmlFor:`editor-post-visibility__password-input-${n}`},(0,Xt.__)("Create password")),(0,i.createElement)("input",{className:"editor-post-visibility__password-input",id:`editor-post-visibility__password-input-${n}`,type:"text",onChange:e=>{a({password:e.target.value})},value:s,placeholder:(0,Xt.__)("Use a secure password")}))),(0,i.createElement)(To.__experimentalConfirmDialog,{isOpen:h,onConfirm:()=>{a({status:"private",password:""}),m(!1),g(!1),c()},onCancel:()=>{g(!1)}},(0,Xt.__)("Would you like to privately publish this post now?")))}function Kr(e){let{instanceId:t,value:n,label:o,info:s,...a}=e;return(0,i.createElement)("div",{className:"editor-post-visibility__choice"},(0,i.createElement)("input",r({type:"radio",name:`editor-post-visibility__setting-${t}`,value:n,id:`editor-post-${n}-${t}`,"aria-describedby":`editor-post-${n}-${t}-description`,className:"editor-post-visibility__radio"},a)),(0,i.createElement)("label",{htmlFor:`editor-post-${n}-${t}`,className:"editor-post-visibility__label"},o),(0,i.createElement)("p",{id:`editor-post-${n}-${t}-description`,className:"editor-post-visibility__info"},s))}function Yr(){return qr()}function qr(){var e;const t=(0,l.useSelect)((e=>e(no).getEditedPostVisibility()));return null===(e=jr[t])||void 0===e?void 0:e.label}function Qr(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Date,t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];const n=new Date(e);return new Date(n.getFullYear(),n.getMonth()+(t?0:1),t?1:0).toISOString()}function Xr(e){let{onClose:t}=e;const{postDate:n,postType:o}=(0,l.useSelect)((e=>({postDate:e(no).getEditedPostAttribute("date"),postType:e(no).getCurrentPostType()})),[]),{editPost:r}=(0,l.useDispatch)(no),[s,a]=(0,i.useState)(Qr(n)),u=(0,l.useSelect)((e=>e(c.store).getEntityRecords("postType",o,{status:"publish,future",after:Qr(s),before:Qr(s,!1),exclude:[e(no).getCurrentPostId()]})),[s,o]),d=(0,i.useMemo)((()=>(u||[]).map((e=>{let{title:t,type:n,date:o}=e;return{title:null==t?void 0:t.rendered,type:n,date:new Date(o)}}))),[u]),m=(0,b.getSettings)(),h=/a(?!\\)/i.test(m.formats.time.toLowerCase().replace(/\\\\/g,"").split("").reverse().join(""));return(0,i.createElement)(p.__experimentalPublishDateTimePicker,{currentDate:n,onChange:e=>r({date:e}),is12Hour:h,events:d,onMonthPreviewed:a,onClose:t})}function Zr(e){return Jr(e)}function Jr(){let{full:e=!1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{date:t,isFloating:n}=(0,l.useSelect)((e=>({date:e(no).getEditedPostAttribute("date"),isFloating:e(no).isEditedPostDateFloating()})),[]);return e?ei(t):ti(t,{isFloating:n})}function ei(e){const t=(0,b.getDate)(e),n=function(){const{timezone:e}=(0,b.getSettings)();if(e.abbr&&isNaN(Number(e.abbr)))return e.abbr;return`UTC${e.offset<0?"":"+"}${e.offset}`}(),o=(0,b.dateI18n)((0,Xt._x)("F j, Y g:i a","post schedule full date format"),t);return(0,Xt.isRTL)()?`${n} ${o}`:`${o} ${n}`}function ti(e){let{isFloating:t=!1,now:n=new Date}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!e||t)return(0,Xt.__)("Immediately");if(!ni(n))return ei(e);const o=(0,b.getDate)(e);if(oi(o,n))return(0,Xt.sprintf)((0,Xt.__)("Today at %s"),(0,b.dateI18n)((0,Xt._x)("g:i a","post schedule time format"),o));const r=new Date(n);return r.setDate(r.getDate()+1),oi(o,r)?(0,Xt.sprintf)((0,Xt.__)("Tomorrow at %s"),(0,b.dateI18n)((0,Xt._x)("g:i a","post schedule time format"),o)):o.getFullYear()===n.getFullYear()?(0,b.dateI18n)((0,Xt._x)("F j g:i a","post schedule date format without year"),o):(0,b.dateI18n)((0,Xt._x)("F j, Y g:i a","post schedule full date format"),o)}function ni(e){const{timezone:t}=(0,b.getSettings)();return Number(t.offset)===e.getTimezoneOffset()/60*-1}function oi(e,t){return e.getDate()===t.getDate()&&e.getMonth()===t.getMonth()&&e.getFullYear()===t.getFullYear()}var ri=window.wp.a11y;const ii={per_page:10,orderby:"count",order:"desc",hide_empty:!0,_fields:"id,name,count",context:"view"};function si(e){let{onSelect:t,taxonomy:n}=e;const{_terms:o,showTerms:r}=(0,l.useSelect)((e=>{const t=e(c.store).getEntityRecords("taxonomy",n.slug,ii);return{_terms:t,showTerms:(null==t?void 0:t.length)>=3}}),[]);if(!r)return null;const a=(e=>(0,s.map)(e,or))(o),u=(0,s.get)(n,["labels","most_used"]);return(0,i.createElement)("div",{className:"editor-post-taxonomies__flat-term-most-used"},(0,i.createElement)("h3",{className:"editor-post-taxonomies__flat-term-most-used-label"},u),(0,i.createElement)("ul",{role:"list",className:"editor-post-taxonomies__flat-term-most-used-list"},a.map((e=>(0,i.createElement)("li",{key:e.id},(0,i.createElement)(To.Button,{variant:"link",onClick:()=>t(e)},e.name))))))}const ai=[],li={per_page:20,orderby:"count",order:"desc",_fields:"id,name",context:"view"},ci=(e,t)=>nr(e).toLowerCase()===nr(t).toLowerCase(),ui=(e,t)=>e.map((e=>(0,s.find)(t,(t=>ci(t.name,e))).id));function di(e){let{slug:t}=e;const[n,o]=(0,i.useState)([]),[r,a]=(0,i.useState)(""),d=(0,u.useDebounce)(a,500),{terms:p,termIds:m,taxonomy:h,hasAssignAction:g,hasCreateAction:f,hasResolvedTerms:v}=(0,l.useSelect)((e=>{const{getCurrentPost:n,getEditedPostAttribute:o}=e(no),{getEntityRecords:r,getTaxonomy:i,hasFinishedResolution:a}=e(c.store),l=n(),u=i(t),d=u?o(u.rest_base):ai,p={...li,include:d.join(","),per_page:-1};return{hasCreateAction:!!u&&(0,s.get)(l,["_links","wp:action-create-"+u.rest_base],!1),hasAssignAction:!!u&&(0,s.get)(l,["_links","wp:action-assign-"+u.rest_base],!1),taxonomy:u,termIds:d,terms:d.length?r("taxonomy",t,p):ai,hasResolvedTerms:a("getEntityRecords",["taxonomy",t,p])}}),[t]),{searchResults:_}=(0,l.useSelect)((e=>{const{getEntityRecords:n}=e(c.store);return{searchResults:r?n("taxonomy",t,{...li,search:r}):ai}}),[r]);(0,i.useEffect)((()=>{if(v){const e=(null!=p?p:[]).map((e=>nr(e.name)));o(e)}}),[p,v]);const y=(0,i.useMemo)((()=>(null!=_?_:[]).map((e=>nr(e.name)))),[_]),{editPost:b}=(0,l.useDispatch)(no);if(!g)return null;function E(e){b({[h.rest_base]:e})}const S=(0,s.get)(h,["labels","add_new_item"],"post_tag"===t?(0,Xt.__)("Add new tag"):(0,Xt.__)("Add new Term")),w=(0,s.get)(h,["labels","singular_name"],"post_tag"===t?(0,Xt.__)("Tag"):(0,Xt.__)("Term")),P=(0,Xt.sprintf)((0,Xt._x)("%s added","term"),w),k=(0,Xt.sprintf)((0,Xt._x)("%s removed","term"),w),C=(0,Xt.sprintf)((0,Xt._x)("Remove %s","term"),w);return(0,i.createElement)(i.Fragment,null,(0,i.createElement)(To.FormTokenField,{value:n,suggestions:y,onChange:function(e){var t;const n=[...null!=p?p:[],...null!=_?_:[]],r=e.reduce(((e,t)=>(e.some((e=>e.toLowerCase()===t.toLowerCase()))||e.push(t),e)),[]),i=r.filter((e=>!(0,s.find)(n,(t=>ci(t.name,e)))));if(o(r),0===i.length)return E(ui(r,n));if(!f)return;const a=null!==(t=null==h?void 0:h.rest_namespace)&&void 0!==t?t:"wp/v2";Promise.all(i.map((e=>function(e,t,n){const o=(0,s.escape)(e);return $t()({path:`/${n}/${t}`,method:"POST",data:{name:o}}).catch((t=>"term_exists"!==t.code?Promise.reject(t):Promise.resolve({id:t.data.term_id,name:e}))).then(or)}(e,h.rest_base,a)))).then((e=>{const t=n.concat(e);return E(ui(r,t))}))},onInputChange:d,maxSuggestions:20,label:S,messages:{added:P,removed:k,remove:C}}),(0,i.createElement)(si,{taxonomy:h,onSelect:function(e){if(m.includes(e.id))return;const n=[...m,e.id],o=(0,Xt.sprintf)((0,Xt._x)("%s added","term"),(0,s.get)(h,["labels","singular_name"],"post_tag"===t?(0,Xt.__)("Tag"):(0,Xt.__)("Term")));(0,ri.speak)(o,"assertive"),E(n)}}))}var pi=(0,To.withFilters)("editor.PostTaxonomyType")(di);const mi=()=>{const e=[(0,Xt.__)("Suggestion:"),(0,i.createElement)("span",{className:"editor-post-publish-panel__link",key:"label"},(0,Xt.__)("Add tags"))];return(0,i.createElement)(To.PanelBody,{initialOpen:!1,title:e},(0,i.createElement)("p",null,(0,Xt.__)("Tags help users and search engines navigate your site and find your content. Add a few keywords to describe your post.")),(0,i.createElement)(pi,{slug:"post_tag"}))};class hi extends i.Component{constructor(e){super(e),this.state={hadTagsWhenOpeningThePanel:e.hasTags}}render(){return this.state.hadTagsWhenOpeningThePanel?null:(0,i.createElement)(mi,null)}}var gi=(0,u.compose)((0,l.withSelect)((e=>{const t=e(no).getCurrentPostType(),n=e(c.store).getTaxonomy("post_tag"),o=n&&e(no).getEditedPostAttribute(n.rest_base);return{areTagsFetched:void 0!==n,isPostTypeSupported:n&&(0,s.some)(n.types,(e=>e===t)),hasTags:o&&o.length}})),(0,u.ifCondition)((e=>{let{areTagsFetched:t,isPostTypeSupported:n}=e;return n&&t})))(hi);const fi=(e,t)=>{const n=xr.filter((t=>(0,s.includes)(e,t.id)));return(0,s.find)(n,(e=>e.id===t))},vi=e=>{let{suggestedPostFormat:t,suggestionText:n,onUpdatePostFormat:o}=e;return(0,i.createElement)(To.Button,{variant:"link",onClick:()=>o(t)},n)};function _i(){const{currentPostFormat:e,suggestion:t}=(0,l.useSelect)((e=>{const{getEditedPostAttribute:t,getSuggestedPostFormat:n}=e(no),o=(0,s.get)(e(c.store).getThemeSupports(),["formats"],[]);return{currentPostFormat:t("format"),suggestion:fi(o,n())}}),[]),{editPost:n}=(0,l.useDispatch)(no),o=[(0,Xt.__)("Suggestion:"),(0,i.createElement)("span",{className:"editor-post-publish-panel__link",key:"label"},(0,Xt.__)("Use a post format"))];return t&&t.id!==e?(0,i.createElement)(To.PanelBody,{initialOpen:!1,title:o},(0,i.createElement)("p",null,(0,Xt.__)("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,i.createElement)("p",null,(0,i.createElement)(vi,{onUpdatePostFormat:e=>n({format:e}),suggestedPostFormat:t.id,suggestionText:(0,Xt.sprintf)((0,Xt.__)('Apply the "%1$s" format.'),t.caption)}))):null}const yi={per_page:-1,orderby:"name",order:"asc",_fields:"id,name,parent",context:"view"},bi=[];function Ei(e){let{slug:t}=e;const[n,o]=(0,i.useState)(!1),[r,a]=(0,i.useState)(""),[d,p]=(0,i.useState)(""),[m,h]=(0,i.useState)(!1),[g,f]=(0,i.useState)(""),[v,_]=(0,i.useState)([]),y=(0,u.useDebounce)(ri.speak,500),{hasCreateAction:b,hasAssignAction:E,terms:S,loading:w,availableTerms:P,taxonomy:k}=(0,l.useSelect)((e=>{const{getCurrentPost:n,getEditedPostAttribute:o}=e(no),{getTaxonomy:r,getEntityRecords:i,isResolving:a}=e(c.store),l=r(t);return{hasCreateAction:!!l&&(0,s.get)(n(),["_links","wp:action-create-"+l.rest_base],!1),hasAssignAction:!!l&&(0,s.get)(n(),["_links","wp:action-assign-"+l.rest_base],!1),terms:l?o(l.rest_base):bi,loading:a("getEntityRecords",["taxonomy",t,yi]),availableTerms:i("taxonomy",t,yi)||bi,taxonomy:l}}),[t]),{editPost:C}=(0,l.useDispatch)(no),{saveEntityRecord:T}=(0,l.useDispatch)(c.store),x=(0,i.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(P),S)),[P]);if(!E)return null;const B=e=>{C({[k.rest_base]:e})},A=e=>e.map((e=>(0,i.createElement)("div",{key:e.id,className:"editor-post-taxonomies__hierarchical-terms-choice"},(0,i.createElement)(To.CheckboxControl,{checked:-1!==S.indexOf(e.id),onChange:()=>{(e=>{const t=S.includes(e)?(0,s.without)(S,e):[...S,e];B(t)})(parseInt(e.id,10))},label:(0,s.unescape)(e.name)}),!!e.children.length&&(0,i.createElement)("div",{className:"editor-post-taxonomies__hierarchical-terms-subchoices"},A(e.children))))),I=(e,n,o)=>(0,s.get)(k,["labels",e],"category"===t?n:o),N=I("add_new_item",(0,Xt.__)("Add new category"),(0,Xt.__)("Add new term")),R=I("new_item_name",(0,Xt.__)("Add new category"),(0,Xt.__)("Add new term")),D=I("parent_item",(0,Xt.__)("Parent Category"),(0,Xt.__)("Parent Term")),L=`— ${D} —`,O=N,U=(0,s.get)(k,["labels","search_items"],(0,Xt.__)("Search Terms")),F=(0,s.get)(k,["name"],(0,Xt.__)("Terms")),M=P.length>=8;return(0,i.createElement)(i.Fragment,null,M&&(0,i.createElement)(To.TextControl,{className:"editor-post-taxonomies__hierarchical-terms-filter",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),_(t);const o=n(t),r=(0,Xt.sprintf)((0,Xt._n)("%d result found.","%d results found.",o),o);y(r,"assertive")}}),(0,i.createElement)("div",{className:"editor-post-taxonomies__hierarchical-terms-list",tabIndex:"0",role:"group","aria-label":F},A(""!==g?v:x)),!w&&b&&(0,i.createElement)(To.Button,{onClick:()=>{h(!m)},className:"editor-post-taxonomies__hierarchical-terms-add","aria-expanded":m,variant:"link"},N),m&&(0,i.createElement)("form",{onSubmit:async e=>{if(e.preventDefault(),""===r||n)return;const i=function(e,t,n){return(0,s.find)(e,(e=>(!e.parent&&!t||parseInt(e.parent)===parseInt(t))&&e.name.toLowerCase()===n.toLowerCase()))}(P,d,r);if(i)return(0,s.some)(S,(e=>e===i.id))||B([...S,i.id]),a(""),void p("");o(!0);const l=await(c={name:r,parent:d||void 0},T("taxonomy",t,c));var c;const u=(0,Xt.sprintf)((0,Xt._x)("%s added","term"),(0,s.get)(k,["labels","singular_name"],"category"===t?(0,Xt.__)("Category"):(0,Xt.__)("Term")));(0,ri.speak)(u,"assertive"),o(!1),a(""),p(""),B([...S,l.id])}},(0,i.createElement)(To.TextControl,{className:"editor-post-taxonomies__hierarchical-terms-input",label:R,value:r,onChange:e=>{a(e)},required:!0}),!!P.length&&(0,i.createElement)(To.TreeSelect,{label:D,noOptionLabel:L,onChange:e=>{p(e)},selectedId:d,tree:x}),(0,i.createElement)(To.Button,{variant:"secondary",type:"submit",className:"editor-post-taxonomies__hierarchical-terms-submit"},O)))}var Si=(0,To.withFilters)("editor.PostTaxonomyType")(Ei);var wi=function(){const e=(0,l.useSelect)((e=>{var t;const n=e(no).getCurrentPostType(),o=e(c.store).getTaxonomy("category"),r=null===(t=e(c.store).getEntityRecord("root","site"))||void 0===t?void 0:t.default_category,i=e(c.store).getEntityRecord("taxonomy","category",r),a=o&&(0,s.some)(o.types,(e=>e===n)),l=o&&e(no).getEditedPostAttribute(o.rest_base);return!!o&&!!i&&a&&(0===(null==l?void 0:l.length)||1===(null==l?void 0:l.length)&&i.id===l[0])}),[]),[t,n]=(0,i.useState)(!1);if((0,i.useEffect)((()=>{e&&n(!0)}),[e]),!t)return null;const o=[(0,Xt.__)("Suggestion:"),(0,i.createElement)("span",{className:"editor-post-publish-panel__link",key:"label"},(0,Xt.__)("Assign a category"))];return(0,i.createElement)(To.PanelBody,{initialOpen:!1,title:o},(0,i.createElement)("p",null,(0,Xt.__)("Categories provide a helpful way to group related posts together and to quickly tell readers what a post is about.")),(0,i.createElement)(Si,{slug:"category"}))};var Pi=function(e){let{children:t}=e;const{isBeingScheduled:n,isRequestingSiteIcon:o,hasPublishAction:r,siteIconUrl:a,siteTitle:u,siteHome:d}=(0,l.useSelect)((e=>{const{getCurrentPost:t,isEditedPostBeingScheduled:n}=e(no),{getEntityRecord:o,isResolving:r}=e(c.store),i=o("root","__unstableBase",void 0)||{};return{hasPublishAction:(0,s.get)(t(),["_links","wp:action-publish"],!1),isBeingScheduled:n(),isRequestingSiteIcon:r("getEntityRecord",["root","__unstableBase",void 0]),siteIconUrl:i.site_icon_url,siteTitle:i.name,siteHome:i.home&&(0,E.filterURLForDisplay)(i.home)}}),[]);let p,m,h=(0,i.createElement)(To.Icon,{className:"components-site-icon",size:"36px",icon:Gr});return a&&(h=(0,i.createElement)("img",{alt:(0,Xt.__)("Site Icon"),className:"components-site-icon",src:a})),o&&(h=null),r?n?(p=(0,Xt.__)("Are you ready to schedule?"),m=(0,Xt.__)("Your work will be published at the specified date and time.")):(p=(0,Xt.__)("Are you ready to publish?"),m=(0,Xt.__)("Double-check your settings before publishing.")):(p=(0,Xt.__)("Are you ready to submit for review?"),m=(0,Xt.__)("When you’re ready, submit your work for review, and an Editor will be able to approve it for you.")),(0,i.createElement)("div",{className:"editor-post-publish-panel__prepublish"},(0,i.createElement)("div",null,(0,i.createElement)("strong",null,p)),(0,i.createElement)("p",null,m),(0,i.createElement)("div",{className:"components-site-card"},h,(0,i.createElement)("div",{className:"components-site-info"},(0,i.createElement)("span",{className:"components-site-name"},(0,Lo.decodeEntities)(u)||(0,Xt.__)("(Untitled)")),(0,i.createElement)("span",{className:"components-site-home"},d))),r&&(0,i.createElement)(i.Fragment,null,(0,i.createElement)(To.PanelBody,{initialOpen:!1,title:[(0,Xt.__)("Visibility:"),(0,i.createElement)("span",{className:"editor-post-publish-panel__link",key:"label"},(0,i.createElement)(Yr,null))]},(0,i.createElement)($r,null)),(0,i.createElement)(To.PanelBody,{initialOpen:!1,title:[(0,Xt.__)("Publish:"),(0,i.createElement)("span",{className:"editor-post-publish-panel__link",key:"label"},(0,i.createElement)(Zr,null))]},(0,i.createElement)(Xr,null))),(0,i.createElement)(_i,null),(0,i.createElement)(gi,null),(0,i.createElement)(wi,null),t)};const ki="%postname%";function Ci(e){let{text:t,onCopy:n,children:o}=e;const r=(0,u.useCopyToClipboard)(t,n);return(0,i.createElement)(To.Button,{variant:"secondary",ref:r},o)}class Ti extends i.Component{constructor(){super(...arguments),this.state={showCopyConfirmation:!1},this.onCopy=this.onCopy.bind(this),this.onSelectInput=this.onSelectInput.bind(this),this.postLink=(0,i.createRef)()}componentDidMount(){this.props.focusOnMount&&this.postLink.current.focus()}componentWillUnmount(){clearTimeout(this.dismissCopyConfirmation)}onCopy(){this.setState({showCopyConfirmation:!0}),clearTimeout(this.dismissCopyConfirmation),this.dismissCopyConfirmation=setTimeout((()=>{this.setState({showCopyConfirmation:!1})}),4e3)}onSelectInput(e){e.target.select()}render(){const{children:e,isScheduled:t,post:n,postType:o}=this.props,r=(0,s.get)(o,["labels","singular_name"]),a=(0,s.get)(o,["labels","view_item"]),l=(0,s.get)(o,["labels","add_new_item"]),c="future"===n.status?(e=>{const{slug:t}=e;return e.permalink_template.includes(ki)?e.permalink_template.replace(ki,t):e.permalink_template})(n):n.link,u=(0,E.addQueryArgs)("post-new.php",{post_type:n.type}),d=t?(0,i.createElement)(i.Fragment,null,(0,Xt.__)("is now scheduled. It will go live on")," ",(0,i.createElement)(Zr,null),"."):(0,Xt.__)("is now live.");return(0,i.createElement)("div",{className:"post-publish-panel__postpublish"},(0,i.createElement)(To.PanelBody,{className:"post-publish-panel__postpublish-header"},(0,i.createElement)("a",{ref:this.postLink,href:c},(0,Lo.decodeEntities)(n.title)||(0,Xt.__)("(no title)"))," ",d),(0,i.createElement)(To.PanelBody,null,(0,i.createElement)("p",{className:"post-publish-panel__postpublish-subheader"},(0,i.createElement)("strong",null,(0,Xt.__)("What’s next?"))),(0,i.createElement)("div",{className:"post-publish-panel__postpublish-post-address-container"},(0,i.createElement)(To.TextControl,{className:"post-publish-panel__postpublish-post-address",readOnly:!0,label:(0,Xt.sprintf)((0,Xt.__)("%s address"),r),value:(0,E.safeDecodeURIComponent)(c),onFocus:this.onSelectInput}),(0,i.createElement)("div",{className:"post-publish-panel__postpublish-post-address__copy-button-wrap"},(0,i.createElement)(Ci,{text:c,onCopy:this.onCopy},this.state.showCopyConfirmation?(0,Xt.__)("Copied!"):(0,Xt.__)("Copy")))),(0,i.createElement)("div",{className:"post-publish-panel__postpublish-buttons"},!t&&(0,i.createElement)(To.Button,{variant:"primary",href:c},a),(0,i.createElement)(To.Button,{variant:t?"primary":"secondary",href:u},l))),e)}}var xi=(0,l.withSelect)((e=>{const{getEditedPostAttribute:t,getCurrentPost:n,isCurrentPostScheduled:o}=e(no),{getPostType:r}=e(c.store);return{post:n(),postType:r(t("type")),isScheduled:o()}}))(Ti);class Bi extends i.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:s,isScheduled:a,isSaving:l,isSavingNonPostEntityChanges:c,onClose:u,onTogglePublishSidebar:d,PostPublishExtension:p,PrePublishExtension:m,...h}=this.props,{hasPublishAction:g,isDirty:f,isPostTypeViewable:v,..._}=h,y=o||a&&n,b=!y&&!l,E=y&&!l;return(0,i.createElement)("div",r({className:"editor-post-publish-panel"},_),(0,i.createElement)("div",{className:"editor-post-publish-panel__header"},E?(0,i.createElement)(To.Button,{onClick:u,icon:Wr,label:(0,Xt.__)("Close panel")}):(0,i.createElement)(i.Fragment,null,(0,i.createElement)("div",{className:"editor-post-publish-panel__header-publish-button"},(0,i.createElement)(Hr,{focusOnMount:!0,onSubmit:this.onSubmit,forceIsDirty:e,forceIsSaving:t})),(0,i.createElement)("div",{className:"editor-post-publish-panel__header-cancel-button"},(0,i.createElement)(To.Button,{disabled:c,onClick:u,variant:"secondary"},(0,Xt.__)("Cancel"))))),(0,i.createElement)("div",{className:"editor-post-publish-panel__content"},b&&(0,i.createElement)(Pi,null,m&&(0,i.createElement)(m,null)),E&&(0,i.createElement)(xi,{focusOnMount:!0},p&&(0,i.createElement)(p,null)),l&&(0,i.createElement)(To.Spinner,null)),(0,i.createElement)("div",{className:"editor-post-publish-panel__footer"},(0,i.createElement)(To.CheckboxControl,{label:(0,Xt.__)("Always show pre-publish checks."),checked:s,onChange:d})))}}var Ai=(0,u.compose)([(0,l.withSelect)((e=>{const{getPostType:t}=e(c.store),{getCurrentPost:n,getEditedPostAttribute:o,isCurrentPostPublished:r,isCurrentPostScheduled:i,isEditedPostBeingScheduled:a,isEditedPostDirty:l,isSavingPost:u,isSavingNonPostEntityChanges:d}=e(no),{isPublishSidebarEnabled:p}=e(no),m=t(o("type"));return{hasPublishAction:(0,s.get)(n(),["_links","wp:action-publish"],!1),isPostTypeViewable:(0,s.get)(m,["viewable"],!1),isBeingScheduled:a(),isDirty:l(),isPublished:r(),isPublishSidebarEnabled:p(),isSaving:u(),isSavingNonPostEntityChanges:d(),isScheduled:i()}})),(0,l.withDispatch)(((e,t)=>{let{isPublishSidebarEnabled:n}=t;const{disablePublishSidebar:o,enablePublishSidebar:r}=e(no);return{onTogglePublishSidebar:()=>{n?o():r()}}})),To.withFocusReturn,To.withConstrainedTabbing])(Bi);var Ii=(0,i.createElement)(P.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,i.createElement)(P.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 Ni=function(e){let{icon:t,size:n=24,...o}=e;return(0,i.cloneElement)(t,{width:n,height:n,...o})};var Ri=(0,i.createElement)(P.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,i.createElement)(P.Path,{d:"M16.7 7.1l-6.3 8.5-3.3-2.5-.9 1.2 4.5 3.4L17.9 8z"}));var Di=(0,i.createElement)(P.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,i.createElement)(P.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"}));var Li=(0,u.compose)([(0,l.withSelect)((e=>{const{isSavingPost:t,isCurrentPostPublished:n,isCurrentPostScheduled:o}=e(no);return{isSaving:t(),isPublished:n(),isScheduled:o()}})),(0,l.withDispatch)((e=>{const{editPost:t,savePost:n}=e(no);return{onClick:()=>{t({status:"draft"}),n()}}}))])((function(e){let{isSaving:t,isPublished:n,isScheduled:o,onClick:r}=e;const s=(0,u.useViewportMatch)("small","<"),[a,l]=(0,i.useState)(!1);if(!n&&!o)return null;let c;return n?c=(0,Xt.__)("Are you sure you want to unpublish this post?"):o&&(c=(0,Xt.__)("Are you sure you want to unschedule this post?")),(0,i.createElement)(i.Fragment,null,(0,i.createElement)(To.Button,{className:"editor-post-switch-to-draft",onClick:()=>{l(!0)},disabled:t,variant:"tertiary"},s?(0,Xt.__)("Draft"):(0,Xt.__)("Switch to draft")),(0,i.createElement)(To.__experimentalConfirmDialog,{isOpen:a,onConfirm:()=>{l(!1),r()},onCancel:()=>l(!1)},c))}));function Oi(e){let{forceIsDirty:t,forceIsSaving:n,showIconLabels:o=!1}=e;const[r,s]=(0,i.useState)(!1),a=(0,u.useViewportMatch)("small"),{isAutosaving:c,isDirty:d,isNew:p,isPending:m,isPublished:h,isSaveable:g,isSaving:f,isScheduled:v,hasPublishAction:_}=(0,l.useSelect)((e=>{var o,r,i;const{isEditedPostNew:s,isCurrentPostPublished:a,isCurrentPostScheduled:l,isEditedPostDirty:c,isSavingPost:u,isEditedPostSaveable:d,getCurrentPost:p,isAutosavingPost:m,getEditedPostAttribute:h}=e(no);return{isAutosaving:m(),isDirty:t||c(),isNew:s(),isPending:"pending"===h("status"),isPublished:a(),isSaving:n||u(),isSaveable:d(),isScheduled:l(),hasPublishAction:null!==(o=null===(r=p())||void 0===r||null===(i=r._links)||void 0===i?void 0:i["wp:action-publish"])&&void 0!==o&&o}}),[t,n]),{savePost:y}=(0,l.useDispatch)(no),b=(0,u.usePrevious)(f);if((0,i.useEffect)((()=>{let e;return b&&!f&&(s(!0),e=setTimeout((()=>{s(!1)}),1e3)),()=>clearTimeout(e)}),[f]),!_&&m)return null;if(h||v)return(0,i.createElement)(Li,null);const E=m?(0,Xt.__)("Save as pending"):(0,Xt.__)("Save draft"),S=(0,Xt.__)("Save"),w=r||!p&&!d,P=f||w,k=f||w||!g;let C;return f?C=c?(0,Xt.__)("Autosaving"):(0,Xt.__)("Saving"):w?C=(0,Xt.__)("Saved"):a?C=E:o&&(C=S),(0,i.createElement)(To.Button,{className:g||f?uo()({"editor-post-save-draft":!P,"editor-post-saved-state":P,"is-saving":f,"is-autosaving":c,"is-saved":w,[(0,To.__unstableGetAnimateClassName)({type:"loading"})]:f}):void 0,onClick:k?void 0:()=>y(),shortcut:ko.displayShortcut.primary("s"),variant:a?"tertiary":void 0,icon:a?void 0:Ii,label:o?void 0:E,"aria-disabled":k},P&&(0,i.createElement)(Ni,{icon:w?Ri:Di}),C)}var Ui=(0,u.compose)([(0,l.withSelect)((e=>{const{getCurrentPost:t,getCurrentPostType:n}=e(no);return{hasPublishAction:(0,s.get)(t(),["_links","wp:action-publish"],!1),postType:n()}}))])((function(e){let{hasPublishAction:t,children:n}=e;return t?n:null}));function Fi(e){let{children:t}=e;return(0,i.createElement)(Qo,{supportKeys:"slug"},t)}class Mi extends i.Component{constructor(e){let{postSlug:t,postTitle:n,postID:o}=e;super(...arguments),this.state={editedSlug:(0,E.safeDecodeURIComponent)(t)||(0,E.cleanForSlug)(n)||o},this.setSlug=this.setSlug.bind(this)}setSlug(e){const{postSlug:t,onUpdateSlug:n}=this.props,{value:o}=e.target,r=(0,E.cleanForSlug)(o);r!==t&&n(r)}render(){const{editedSlug:e}=this.state;return(0,i.createElement)(Fi,null,(0,i.createElement)(To.TextControl,{label:(0,Xt.__)("Slug"),autoComplete:"off",spellCheck:"false",value:e,onChange:e=>this.setState({editedSlug:e}),onBlur:this.setSlug,className:"editor-post-slug"}))}}var zi=(0,u.compose)([(0,l.withSelect)((e=>{const{getCurrentPost:t,getEditedPostAttribute:n}=e(no),{id:o}=t();return{postSlug:n("slug"),postTitle:n("title"),postID:o}})),(0,l.withDispatch)((e=>{const{editPost:t}=e(no);return{onUpdateSlug(e){t({slug:e})}}}))])(Mi);var Vi=(0,u.compose)([(0,l.withSelect)((e=>{const t=e(no).getCurrentPost();return{hasStickyAction:(0,s.get)(t,["_links","wp:action-sticky"],!1),postType:e(no).getCurrentPostType()}}))])((function(e){let{hasStickyAction:t,postType:n,children:o}=e;return"post"===n&&t?o:null}));var Hi=(0,u.compose)([(0,l.withSelect)((e=>({postSticky:e(no).getEditedPostAttribute("sticky")}))),(0,l.withDispatch)((e=>({onUpdateSticky(t){e(no).editPost({sticky:t})}})))])((function(e){let{onUpdateSticky:t,postSticky:n=!1}=e;return(0,i.createElement)(Vi,null,(0,i.createElement)(To.CheckboxControl,{label:(0,Xt.__)("Stick to the top of the blog"),checked:n,onChange:()=>t(!n)}))}));const Wi=e=>e;var Gi=(0,u.compose)([(0,l.withSelect)((e=>({postType:e(no).getCurrentPostType(),taxonomies:e(c.store).getTaxonomies({per_page:-1})})))])((function(e){let{postType:t,taxonomies:n,taxonomyWrapper:o=Wi}=e;const r=(0,s.filter)(n,(e=>(0,s.includes)(e.types,t)));return(0,s.filter)(r,(e=>{var t;return null===(t=e.visibility)||void 0===t?void 0:t.show_ui})).map((e=>{const t=e.hierarchical?Si:pi;return(0,i.createElement)(i.Fragment,{key:`taxonomy-${e.slug}`},o((0,i.createElement)(t,{slug:e.slug}),e))}))}));var ji=(0,u.compose)([(0,l.withSelect)((e=>({postType:e(no).getCurrentPostType(),taxonomies:e(c.store).getTaxonomies({per_page:-1})})))])((function(e){let{postType:t,taxonomies:n,children:o}=e;return(0,s.some)(n,(e=>(0,s.includes)(e.types,t)))?o:null})),$i=n(773);function Ki(){const e=(0,l.useSelect)((e=>e(no).getEditedPostContent()),[]),{editPost:t,resetEditorBlocks:n}=(0,l.useDispatch)(no),[o,r]=(0,i.useState)(e),[s,c]=(0,i.useState)(!1),d=(0,u.useInstanceId)(Ki),p=(0,i.useRef)();s||o===e||r(e);return(0,i.useEffect)((()=>()=>{if(p.current){const e=(0,a.parse)(p.current);n(e)}}),[]),(0,i.createElement)(i.Fragment,null,(0,i.createElement)(To.VisuallyHidden,{as:"label",htmlFor:`post-content-${d}`},(0,Xt.__)("Type text or HTML")),(0,i.createElement)($i.Z,{autoComplete:"off",dir:"auto",value:o,onChange:e=>{const n=e.target.value;t({content:n}),r(n),c(!0),p.current=n},onBlur:()=>{if(s){const e=(0,a.parse)(o);n(e),c(!1)}},className:"editor-post-text-editor",id:`post-content-${d}`,placeholder:(0,Xt.__)("Start writing with text or HTML")}))}const Yi=/[\r\n]+/g;var qi=(0,i.forwardRef)((function(e,t){const n=(0,i.useRef)(),[o,r]=(0,i.useState)(!1),{editPost:s}=(0,l.useDispatch)(no),{insertDefaultBlock:c,clearSelectedBlock:d,insertBlocks:m}=(0,l.useDispatch)(p.store),{isCleanNewPost:h,title:g,placeholder:f,isFocusMode:v,hasFixedToolbar:_}=(0,l.useSelect)((e=>{const{getEditedPostAttribute:t,isCleanNewPost:n}=e(no),{getSettings:o}=e(p.store),{titlePlaceholder:r,focusMode:i,hasFixedToolbar:s}=o();return{isCleanNewPost:n(),title:t("title"),placeholder:r,isFocusMode:i,hasFixedToolbar:s}}),[]);function y(e){m(e,0)}function b(e){s({title:e})}(0,i.useImperativeHandle)(t,(()=>({focus:()=>{var e;null==n||null===(e=n.current)||void 0===e||e.focus()}}))),(0,i.useEffect)((()=>{if(!n.current)return;const{ownerDocument:e}=n.current,{activeElement:t,body:o}=e;!h||t&&o!==t||n.current.focus()}),[h]);const[E,S]=(0,i.useState)({});function w(){r(!1),S({})}const P=uo()("wp-block wp-block-post-title block-editor-block-list__block editor-post-title editor-post-title__input rich-text",{"is-selected":o,"is-focus-mode":v,"has-fixed-toolbar":_}),k=(0,Lo.decodeEntities)(f)||(0,Xt.__)("Add title"),{ref:C}=(0,lo.__unstableUseRichText)({value:g,onChange:function(e){b(e.replace(Yi," "))},placeholder:k,selectionStart:E.start,selectionEnd:E.end,onSelectionChange(e,t){S((n=>{const{start:o,end:r}=n;return o===e&&r===t?n:{start:e,end:t}}))},__unstableDisableFormats:!0,preserveWhiteSpace:!0});return(0,i.createElement)(Qo,{supportKeys:"title"},(0,i.createElement)("h1",{ref:(0,u.useMergeRefs)([C,n]),contentEditable:!0,className:P,"aria-label":k,role:"textbox","aria-multiline":"true",onFocus:function(){r(!0),d()},onBlur:w,onKeyDown:function(e){e.keyCode===ko.ENTER&&(e.preventDefault(),c(void 0,void 0,0))},onKeyPress:w,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,a.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?y(r):(b(e.attributes.content),y(r.slice(1)))}else{const e={...(0,lo.create)({html:g}),...E},t=(0,lo.insert)(e,(0,lo.create)({html:r}));b((0,lo.toHTMLString)({value:t})),S({start:t.start,end:t.end})}}}))}));function Qi(){const{isNew:e,isDeleting:t,postId:n}=(0,l.useSelect)((e=>{const t=e(no);return{isNew:t.isEditedPostNew(),isDeleting:t.isDeletingPost(),postId:t.getCurrentPostId()}}),[]),{trashPost:o}=(0,l.useDispatch)(no);return e||!n?null:(0,i.createElement)(To.Button,{className:"editor-post-trash",isDestructive:!0,variant:"secondary",isBusy:t,"aria-disabled":t,onClick:t?void 0:()=>o()},(0,Xt.__)("Move to trash"))}var Xi=(0,l.withSelect)((e=>{const{isEditedPostNew:t,getCurrentPostId:n,getCurrentPostType:o}=e(no),{getPostType:r,canUser:i}=e(c.store),s=n(),a=r(o()),l=(null==a?void 0:a.rest_base)||"";return{isNew:t(),postId:s,canUserDelete:!(!s||!l)&&i("delete",l,s)}}))((function(e){let{isNew:t,postId:n,canUserDelete:o,children:r}=e;return!t&&n&&o?r:null}));function Zi(e){let{onClose:t}=e;const{isEditable:n,postSlug:o,viewPostLabel:r,postLink:s,permalinkPrefix:a,permalinkSuffix:u}=(0,l.useSelect)((e=>{const t=e(no).getCurrentPostType(),n=e(c.store).getPostType(t),o=e(no).getPermalinkParts();return{isEditable:e(no).isPermalinkEditable(),postSlug:(0,E.safeDecodeURIComponent)(e(no).getEditedPostSlug()),viewPostLabel:null==n?void 0:n.labels.view_item,postLink:e(no).getCurrentPost().link,permalinkPrefix:null==o?void 0:o.prefix,permalinkSuffix:null==o?void 0:o.suffix}}),[]),{editPost:d}=(0,l.useDispatch)(no),[m,h]=(0,i.useState)(!1);return(0,i.createElement)("div",{className:"editor-post-url"},(0,i.createElement)(p.__experimentalInspectorPopoverHeader,{title:(0,Xt.__)("URL"),onClose:t}),n&&(0,i.createElement)(To.TextControl,{label:(0,Xt.__)("Permalink"),value:m?"":o,autoComplete:"off",spellCheck:"false",help:(0,i.createElement)(i.Fragment,null,(0,Xt.__)("The last part of the URL.")," ",(0,i.createElement)(To.ExternalLink,{href:(0,Xt.__)("https://wordpress.org/support/article/settings-sidebar/#permalink")},(0,Xt.__)("Learn more."))),onChange:e=>{d({slug:e}),e?m&&h(!1):m||h(!0)},onBlur:e=>{d({slug:(0,E.cleanForSlug)(e.target.value)}),m&&h(!1)}}),n&&(0,i.createElement)("h3",{className:"editor-post-url__link-label"},null!=r?r:(0,Xt.__)("View post")),(0,i.createElement)("p",null,(0,i.createElement)(To.ExternalLink,{className:"editor-post-url__link",href:s,target:"_blank"},n?(0,i.createElement)(i.Fragment,null,(0,i.createElement)("span",{className:"editor-post-url__link-prefix"},a),(0,i.createElement)("span",{className:"editor-post-url__link-slug"},o),(0,i.createElement)("span",{className:"editor-post-url__link-suffix"},u)):s)))}function Ji(e){let{children:t}=e;const n=(0,l.useSelect)((e=>{const t=e(no).getCurrentPostType(),n=e(c.store).getPostType(t);if(null==n||!n.viewable)return!1;if(!e(no).getCurrentPost().link)return!1;return!!e(no).getPermalinkParts()}),[]);return n?t:null}function es(){return ts()}function ts(){const e=(0,l.useSelect)((e=>e(no).getPermalink()),[]);return(0,E.filterURLForDisplay)((0,E.safeDecodeURIComponent)(e))}var ns=(0,u.compose)([(0,l.withSelect)((e=>{const{getCurrentPost:t,getCurrentPostType:n}=e(no);return{hasPublishAction:(0,s.get)(t(),["_links","wp:action-publish"],!1),postType:n()}}))])((function(e){let{hasPublishAction:t,render:n}=e;return n({canEdit:t})}));var os=(0,i.createElement)(P.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,i.createElement)(P.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"})),rs=window.wp.wordcount;function is(){const e=(0,l.useSelect)((e=>e(no).getEditedPostAttribute("content")),[]),t=(0,Xt._x)("words","Word count type. Do not translate!");return(0,i.createElement)("span",{className:"word-count"},(0,rs.count)(e,t))}function ss(){const e=(0,l.useSelect)((e=>e(no).getEditedPostAttribute("content")),[]),t=(0,Xt._x)("words","Word count type. Do not translate!"),n=Math.round((0,rs.count)(e,t)/189),o=0===n?(0,i.createInterpolateElement)((0,Xt.__)("<span>< 1</span> minute"),{span:(0,i.createElement)("span",{className:"table-of-contents__number"})}):(0,i.createInterpolateElement)((0,Xt.sprintf)((0,Xt._n)("<span>%d</span> minute","<span>%d</span> minutes",n),n),{span:(0,i.createElement)("span",{className:"table-of-contents__number"})});return(0,i.createElement)("span",{className:"time-to-read"},o)}function as(){const e=(0,l.useSelect)((e=>e(no).getEditedPostAttribute("content")),[]);return(0,rs.count)(e,"characters_including_spaces")}var ls=function(e){let{hasOutlineItemsDisabled:t,onRequestClose:n}=e;const{headingCount:o,paragraphCount:r,numberOfBlocks:s}=(0,l.useSelect)((e=>{const{getGlobalBlockCount:t}=e(p.store);return{headingCount:t("core/heading"),paragraphCount:t("core/paragraph"),numberOfBlocks:t()}}),[]);return(0,i.createElement)(i.Fragment,null,(0,i.createElement)("div",{className:"table-of-contents__wrapper",role:"note","aria-label":(0,Xt.__)("Document Statistics"),tabIndex:"0"},(0,i.createElement)("ul",{role:"list",className:"table-of-contents__counts"},(0,i.createElement)("li",{className:"table-of-contents__count"},(0,Xt.__)("Words"),(0,i.createElement)(is,null)),(0,i.createElement)("li",{className:"table-of-contents__count"},(0,Xt.__)("Characters"),(0,i.createElement)("span",{className:"table-of-contents__number"},(0,i.createElement)(as,null))),(0,i.createElement)("li",{className:"table-of-contents__count"},(0,Xt.__)("Time to read"),(0,i.createElement)(ss,null)),(0,i.createElement)("li",{className:"table-of-contents__count"},(0,Xt.__)("Headings"),(0,i.createElement)("span",{className:"table-of-contents__number"},o)),(0,i.createElement)("li",{className:"table-of-contents__count"},(0,Xt.__)("Paragraphs"),(0,i.createElement)("span",{className:"table-of-contents__number"},r)),(0,i.createElement)("li",{className:"table-of-contents__count"},(0,Xt.__)("Blocks"),(0,i.createElement)("span",{className:"table-of-contents__number"},s)))),o>0&&(0,i.createElement)(i.Fragment,null,(0,i.createElement)("hr",null),(0,i.createElement)("h2",{className:"table-of-contents__title"},(0,Xt.__)("Document Outline")),(0,i.createElement)(yo,{onSelect:n,hasOutlineItemsDisabled:t})))};var cs=(0,i.forwardRef)((function(e,t){let{hasOutlineItemsDisabled:n,repositionDropdown:o,...s}=e;const a=(0,l.useSelect)((e=>!!e(p.store).getBlockCount()),[]);return(0,i.createElement)(To.Dropdown,{position:o?"middle right right":"bottom",className:"table-of-contents",contentClassName:"table-of-contents__popover",renderToggle:e=>{let{isOpen:n,onToggle:o}=e;return(0,i.createElement)(To.Button,r({},s,{ref:t,onClick:a?o:void 0,icon:os,"aria-expanded":n,"aria-haspopup":"true",label:(0,Xt.__)("Details"),tooltipPosition:"bottom","aria-disabled":!a}))},renderContent:e=>{let{onClose:t}=e;return(0,i.createElement)(ls,{onRequestClose:t,hasOutlineItemsDisabled:n})}})}));function us(){const e=(0,l.useSelect)((e=>()=>{const{__experimentalGetDirtyEntityRecords:t}=e(c.store);return t().length>0}),[]),t=t=>{if(e())return t.returnValue=(0,Xt.__)("You have unsaved changes. If you proceed, they will be lost."),t.returnValue};return(0,i.useEffect)((()=>(window.addEventListener("beforeunload",t),()=>{window.removeEventListener("beforeunload",t)})),[]),null}var ds=window.wp.reusableBlocks;var ps=(0,u.createHigherOrderComponent)((e=>(0,l.withRegistry)((t=>{const{useSubRegistry:n=!0,registry:o,...r}=t;if(!n)return(0,i.createElement)(e,r);const[s,a]=(0,i.useState)(null);return(0,i.useEffect)((()=>{const e=(0,l.createRegistry)({"core/block-editor":p.storeConfig},o);e.registerStore("core/editor",to),a(e)}),[o]),s?(0,i.createElement)(l.RegistryProvider,{value:s},(0,i.createElement)(e,r)):null}))),"withRegistryProvider"),ms=window.wp.mediaUtils;const hs=()=>{};function gs(e){let{additionalData:t={},allowedTypes:n,filesList:o,maxUploadFileSize:r,onError:i=hs,onFileChange:s}=e;const{getCurrentPostId:a,getEditorSettings:c}=(0,l.select)(no),u=c().allowedMimeTypes;r=r||c().maxUploadFileSize,(0,ms.uploadMedia)({allowedTypes:n,filesList:o,onFileChange:s,additionalData:{post:a(),...t},maxUploadFileSize:r,onError:e=>{let{message:t}=e;return i(t)},wpAllowedMimeTypes:u})}var fs=function(e,t){var n,o;const{reusableBlocks:r,hasUploadPermissions:a,canUseUnfilteredHTML:u,userCanCreatePages:d,pageOnFront:p,postType:m}=(0,l.useSelect)((e=>{var t;const{canUserUseUnfilteredHTML:n,getCurrentPostType:o}=e(no),r="web"===i.Platform.OS,{canUser:s,getEntityRecord:a}=e(c.store),l=s("read","settings")?a("root","site"):void 0;return{canUseUnfilteredHTML:n(),reusableBlocks:r?e(c.store).getEntityRecords("postType","wp_block",{per_page:-1}):[],hasUploadPermissions:null===(t=s("create","media"))||void 0===t||t,userCanCreatePages:s("create","pages"),pageOnFront:null==l?void 0:l.page_on_front,postType:o()}}),[]),h=null!==(n=e.__experimentalAdditionalBlockPatterns)&&void 0!==n?n:e.__experimentalBlockPatterns,g=null!==(o=e.__experimentalAdditionalBlockPatternCategories)&&void 0!==o?o:e.__experimentalBlockPatternCategories,{restBlockPatterns:f,restBlockPatternCategories:v}=(0,l.useSelect)((e=>({restBlockPatterns:e(c.store).getBlockPatterns(),restBlockPatternCategories:e(c.store).getBlockPatternCategories()})),[]),_=(0,i.useMemo)((()=>[...h||[],...f||[]].filter(((e,t,n)=>t===n.findIndex((t=>e.name===t.name)))).filter((e=>{let{postTypes:t}=e;return!t||Array.isArray(t)&&t.includes(m)}))),[h,f,m]),y=(0,i.useMemo)((()=>[...g||[],...v||[]].filter(((e,t,n)=>t===n.findIndex((t=>e.name===t.name))))),[g,v]),{undo:b}=(0,l.useDispatch)(no),{saveEntityRecord:E}=(0,l.useDispatch)(c.store),S=e=>d?E("postType","page",e):Promise.reject({message:(0,Xt.__)("You do not have permission to create Pages.")});return(0,i.useMemo)((()=>({...(0,s.pick)(e,["__experimentalBlockDirectory","__experimentalDiscussionSettings","__experimentalFeatures","__experimentalPreferredStyleVariations","__experimentalSetIsInserterOpened","__unstableGalleryWithImageBlocks","alignWide","allowedBlockTypes","bodyPlaceholder","canLockBlocks","codeEditingEnabled","colors","disableCustomColors","disableCustomFontSizes","disableCustomSpacingSizes","disableCustomGradients","disableLayoutStyles","enableCustomLineHeight","enableCustomSpacing","enableCustomUnits","focusMode","fontSizes","gradients","generateAnchors","hasFixedToolbar","hasReducedUI","hasInlineToolbar","imageDefaultSize","imageDimensions","imageEditing","imageSizes","isRTL","keepCaretInsideBlock","maxWidth","onUpdateDefaultBlockStyles","styles","template","templateLock","titlePlaceholder","supportsLayout","widgetTypesToHideFromLegacyWidgetBlock","__unstableResolvedAssets"]),mediaUpload:a?gs:void 0,__experimentalReusableBlocks:r,__experimentalBlockPatterns:_,__experimentalBlockPatternCategories:y,__experimentalFetchLinkSuggestions:(t,n)=>(0,c.__experimentalFetchLinkSuggestions)(t,n,e),__experimentalFetchRichUrlData:c.__experimentalFetchUrlData,__experimentalCanUserUseUnfilteredHTML:u,__experimentalUndo:b,outlineMode:t,__experimentalCreatePageEntity:S,__experimentalUserCanCreatePages:d,pageOnFront:p,__experimentalPreferPatternsOnRoot:t})),[e,a,r,_,y,u,b,t,d,p])};var vs=ps((function(e){let{__unstableTemplate:t,post:n,settings:o,recovery:r,initialEdits:s,children:a}=e;const u=(0,i.useMemo)((()=>"wp_template"===n.type?{}:{postId:n.id,postType:n.type}),[n.id,n.type]),{selection:d,isReady:m}=(0,l.useSelect)((e=>{const{getEditorSelection:t,__unstableIsEditorReady:n}=e(no);return{isReady:n(),selection:t()}}),[]),{id:h,type:g}=null!=t?t:n,[f,v,_]=(0,c.useEntityBlockEditor)("postType",g,{id:h}),y=fs(o,!!t),{updatePostLock:b,setupEditor:E,updateEditorSettings:S,__experimentalTearDownEditor:w}=(0,l.useDispatch)(no),{createWarningNotice:P}=(0,l.useDispatch)(Kt.store);return(0,i.useLayoutEffect)((()=>{if(!r)return b(o.postLock),E(n,s,o.template),o.autosave&&P((0,Xt.__)("There is an autosave of this post that is more recent than the version below."),{id:"autosave-exists",actions:[{label:(0,Xt.__)("View the autosave"),url:o.autosave.editLink}]}),()=>{w()}}),[]),(0,i.useEffect)((()=>{S(o)}),[o]),m?(0,i.createElement)(c.EntityProvider,{kind:"root",type:"site"},(0,i.createElement)(c.EntityProvider,{kind:"postType",type:n.type,id:n.id},(0,i.createElement)(p.BlockContextProvider,{value:u},(0,i.createElement)(p.BlockEditorProvider,{value:f,onChange:_,onInput:v,selection:d,settings:y,useSubRegistry:!1},a,(0,i.createElement)(ds.ReusableBlocksMenuItems,null))))):null})),_s=window.wp.serverSideRender,ys=n.n(_s);function bs(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];const o=(0,i.forwardRef)(((n,o)=>(w()("wp.editor."+e,{since:"5.3",alternative:"wp.blockEditor."+e,version:"6.2"}),(0,i.createElement)(t,r({ref:o},n)))));return n.forEach((n=>{o[n]=bs(e+"."+n,t[n])})),o}function Es(e,t){return function(){return w()("wp.editor."+e,{since:"5.3",alternative:"wp.blockEditor."+e,version:"6.2"}),t(...arguments)}}const Ss=bs("RichText",p.RichText,["Content"]);Ss.isEmpty=Es("RichText.isEmpty",p.RichText.isEmpty);const ws=bs("Autocomplete",p.Autocomplete),Ps=bs("AlignmentToolbar",p.AlignmentToolbar),ks=bs("BlockAlignmentToolbar",p.BlockAlignmentToolbar),Cs=bs("BlockControls",p.BlockControls,["Slot"]),Ts=bs("BlockEdit",p.BlockEdit),xs=bs("BlockEditorKeyboardShortcuts",p.BlockEditorKeyboardShortcuts),Bs=bs("BlockFormatControls",p.BlockFormatControls,["Slot"]),As=bs("BlockIcon",p.BlockIcon),Is=bs("BlockInspector",p.BlockInspector),Ns=bs("BlockList",p.BlockList),Rs=bs("BlockMover",p.BlockMover),Ds=bs("BlockNavigationDropdown",p.BlockNavigationDropdown),Ls=bs("BlockSelectionClearer",p.BlockSelectionClearer),Os=bs("BlockSettingsMenu",p.BlockSettingsMenu),Us=bs("BlockTitle",p.BlockTitle),Fs=bs("BlockToolbar",p.BlockToolbar),Ms=bs("ColorPalette",p.ColorPalette),zs=bs("ContrastChecker",p.ContrastChecker),Vs=bs("CopyHandler",p.CopyHandler),Hs=bs("DefaultBlockAppender",p.DefaultBlockAppender),Ws=bs("FontSizePicker",p.FontSizePicker),Gs=bs("Inserter",p.Inserter),js=bs("InnerBlocks",p.InnerBlocks,["ButtonBlockAppender","DefaultBlockAppender","Content"]),$s=bs("InspectorAdvancedControls",p.InspectorAdvancedControls,["Slot"]),Ks=bs("InspectorControls",p.InspectorControls,["Slot"]),Ys=bs("PanelColorSettings",p.PanelColorSettings),qs=bs("PlainText",p.PlainText),Qs=bs("RichTextShortcut",p.RichTextShortcut),Xs=bs("RichTextToolbarButton",p.RichTextToolbarButton),Zs=bs("__unstableRichTextInputEvent",p.__unstableRichTextInputEvent),Js=bs("MediaPlaceholder",p.MediaPlaceholder),ea=bs("MediaUpload",p.MediaUpload),ta=bs("MediaUploadCheck",p.MediaUploadCheck),na=bs("MultiSelectScrollIntoView",p.MultiSelectScrollIntoView),oa=bs("NavigableToolbar",p.NavigableToolbar),ra=bs("ObserveTyping",p.ObserveTyping),ia=bs("SkipToSelectedBlock",p.SkipToSelectedBlock),sa=bs("URLInput",p.URLInput),aa=bs("URLInputButton",p.URLInputButton),la=bs("URLPopover",p.URLPopover),ca=bs("Warning",p.Warning),ua=bs("WritingFlow",p.WritingFlow),da=Es("createCustomColorsHOC",p.createCustomColorsHOC),pa=Es("getColorClassName",p.getColorClassName),ma=Es("getColorObjectByAttributeValues",p.getColorObjectByAttributeValues),ha=Es("getColorObjectByColorValue",p.getColorObjectByColorValue),ga=Es("getFontSize",p.getFontSize),fa=Es("getFontSizeClass",p.getFontSizeClass),va=Es("withColorContext",p.withColorContext),_a=Es("withColors",p.withColors),ya=Es("withFontSizes",p.withFontSizes);function ba(e){return w()("wp.editor.cleanForSlug",{since:"12.7",plugin:"Gutenberg",alternative:"wp.url.cleanForSlug"}),(0,E.cleanForSlug)(e)}}(),(window.wp=window.wp||{}).editor=o}(); |