Current File : /home/resuelf/www/wp-content/plugins/gutenberg/build/edit-site/index.min.js
!function(){var e={6411:function(e,t){var n,a;n=function(e,t){"use strict";var n,a,r="function"==typeof Map?new Map:(n=[],a=[],{has:function(e){return n.indexOf(e)>-1},get:function(e){return a[n.indexOf(e)]},set:function(e,t){-1===n.indexOf(e)&&(n.push(e),a.push(t))},delete:function(e){var t=n.indexOf(e);t>-1&&(n.splice(t,1),a.splice(t,1))}}),s=function(e){return new Event(e,{bubbles:!0})};try{new Event("test")}catch(e){s=function(e){var t=document.createEvent("Event");return t.initEvent(e,!0,!1),t}}function i(e){if(e&&e.nodeName&&"TEXTAREA"===e.nodeName&&!r.has(e)){var t=null,n=null,a=null,i=function(){e.clientWidth!==n&&d()},o=function(t){window.removeEventListener("resize",i,!1),e.removeEventListener("input",d,!1),e.removeEventListener("keyup",d,!1),e.removeEventListener("autosize:destroy",o,!1),e.removeEventListener("autosize:update",d,!1),Object.keys(t).forEach((function(n){e.style[n]=t[n]})),r.delete(e)}.bind(e,{height:e.style.height,resize:e.style.resize,overflowY:e.style.overflowY,overflowX:e.style.overflowX,wordWrap:e.style.wordWrap});e.addEventListener("autosize:destroy",o,!1),"onpropertychange"in e&&"oninput"in e&&e.addEventListener("keyup",d,!1),window.addEventListener("resize",i,!1),e.addEventListener("input",d,!1),e.addEventListener("autosize:update",d,!1),e.style.overflowX="hidden",e.style.wordWrap="break-word",r.set(e,{destroy:o,update:d}),"vertical"===(l=window.getComputedStyle(e,null)).resize?e.style.resize="none":"both"===l.resize&&(e.style.resize="horizontal"),t="content-box"===l.boxSizing?-(parseFloat(l.paddingTop)+parseFloat(l.paddingBottom)):parseFloat(l.borderTopWidth)+parseFloat(l.borderBottomWidth),isNaN(t)&&(t=0),d()}var l;function c(t){var n=e.style.width;e.style.width="0px",e.offsetWidth,e.style.width=n,e.style.overflowY=t}function u(){if(0!==e.scrollHeight){var a=function(e){for(var t=[];e&&e.parentNode&&e.parentNode instanceof Element;)e.parentNode.scrollTop&&t.push({node:e.parentNode,scrollTop:e.parentNode.scrollTop}),e=e.parentNode;return t}(e),r=document.documentElement&&document.documentElement.scrollTop;e.style.height="",e.style.height=e.scrollHeight+t+"px",n=e.clientWidth,a.forEach((function(e){e.node.scrollTop=e.scrollTop})),r&&(document.documentElement.scrollTop=r)}}function d(){u();var t=Math.round(parseFloat(e.style.height)),n=window.getComputedStyle(e,null),r="content-box"===n.boxSizing?Math.round(parseFloat(n.height)):e.offsetHeight;if(r<t?"hidden"===n.overflowY&&(c("scroll"),u(),r="content-box"===n.boxSizing?Math.round(parseFloat(window.getComputedStyle(e,null).height)):e.offsetHeight):"hidden"!==n.overflowY&&(c("hidden"),u(),r="content-box"===n.boxSizing?Math.round(parseFloat(window.getComputedStyle(e,null).height)):e.offsetHeight),a!==r){a=r;var i=s("autosize:resized");try{e.dispatchEvent(i)}catch(e){}}}}function o(e){var t=r.get(e);t&&t.destroy()}function l(e){var t=r.get(e);t&&t.update()}var c=null;"undefined"==typeof window||"function"!=typeof window.getComputedStyle?((c=function(e){return e}).destroy=function(e){return e},c.update=function(e){return e}):((c=function(e,t){return e&&Array.prototype.forEach.call(e.length?e:[e],(function(e){return i(e)})),e}).destroy=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],o),e},c.update=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],l),e}),t.default=c,e.exports=t.default},void 0===(a=n.apply(t,[e,t]))||(e.exports=a)},4403:function(e,t){var n;!function(){"use strict";var a={}.hasOwnProperty;function r(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var s=typeof n;if("string"===s||"number"===s)e.push(n);else if(Array.isArray(n)){if(n.length){var i=r.apply(null,n);i&&e.push(i)}}else if("object"===s)if(n.toString===Object.prototype.toString)for(var o in n)a.call(n,o)&&n[o]&&e.push(o);else e.push(n.toString())}}return e.join(" ")}e.exports?(r.default=r,e.exports=r):void 0===(n=function(){return r}.apply(t,[]))||(e.exports=n)}()},4827:function(e){e.exports=function(e,t,n){return((n=window.getComputedStyle)?n(e):e.currentStyle)[t.replace(/-(\w)/gi,(function(e,t){return t.toUpperCase()}))]}},1919:function(e){"use strict";var t=function(e){return function(e){return!!e&&"object"==typeof e}(e)&&!function(e){var t=Object.prototype.toString.call(e);return"[object RegExp]"===t||"[object Date]"===t||function(e){return e.$$typeof===n}(e)}(e)},n="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function a(e,t){return!1!==t.clone&&t.isMergeableObject(e)?o((n=e,Array.isArray(n)?[]:{}),e,t):e;var n}function r(e,t,n){return e.concat(t).map((function(e){return a(e,n)}))}function s(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 i(e,t){try{return t in e}catch(e){return!1}}function o(e,n,l){(l=l||{}).arrayMerge=l.arrayMerge||r,l.isMergeableObject=l.isMergeableObject||t,l.cloneUnlessOtherwiseSpecified=a;var c=Array.isArray(n);return c===Array.isArray(e)?c?l.arrayMerge(e,n,l):function(e,t,n){var r={};return n.isMergeableObject(e)&&s(e).forEach((function(t){r[t]=a(e[t],n)})),s(t).forEach((function(s){(function(e,t){return i(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))})(e,s)||(i(e,s)&&n.isMergeableObject(t[s])?r[s]=function(e,t){if(!t.customMerge)return o;var n=t.customMerge(e);return"function"==typeof n?n:o}(s,n)(e[s],t[s],n):r[s]=a(t[s],n))})),r}(e,n,l):a(n,l)}o.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce((function(e,n){return o(e,n,t)}),{})};var l=o;e.exports=l},9894:function(e,t,n){var a=n(4827);e.exports=function(e){var t=a(e,"line-height"),n=parseFloat(t,10);if(t===n+""){var r=e.style.lineHeight;e.style.lineHeight=t+"em",t=a(e,"line-height"),n=parseFloat(t,10),r?e.style.lineHeight=r:delete e.style.lineHeight}if(-1!==t.indexOf("pt")?(n*=4,n/=3):-1!==t.indexOf("mm")?(n*=96,n/=25.4):-1!==t.indexOf("cm")?(n*=96,n/=2.54):-1!==t.indexOf("in")?n*=96:-1!==t.indexOf("pc")&&(n*=16),n=Math.round(n),"normal"===t){var s=e.nodeName,i=document.createElement(s);i.innerHTML="&nbsp;","TEXTAREA"===s.toUpperCase()&&i.setAttribute("rows","1");var o=a(e,"font-size");i.style.fontSize=o,i.style.padding="0px",i.style.border="0px";var l=document.body;l.appendChild(i),n=i.offsetHeight,l.removeChild(i)}return n}},5372:function(e,t,n){"use strict";var a=n(9567);function r(){}function s(){}s.resetWarningCache=r,e.exports=function(){function e(e,t,n,r,s,i){if(i!==a){var o=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw o.name="Invariant Violation",o}}function t(){return e}e.isRequired=e;var n={array: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:s,resetWarningCache:r};return n.PropTypes=n,n}},2652:function(e,t,n){e.exports=n(5372)()},9567:function(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},5438:function(e,t,n){"use strict";var a,r=this&&this.__extends||(a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function __(){this.constructor=e}a(e,t),e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)}),s=this&&this.__assign||Object.assign||function(e){for(var t,n=1,a=arguments.length;n<a;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},i=this&&this.__rest||function(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(n[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(a=Object.getOwnPropertySymbols(e);r<a.length;r++)t.indexOf(a[r])<0&&(n[a[r]]=e[a[r]])}return n};t.__esModule=!0;var o=n(9196),l=n(2652),c=n(6411),u=n(9894),d="autosize:resized",m=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={lineHeight:null},t.textarea=null,t.onResize=function(e){t.props.onResize&&t.props.onResize(e)},t.updateLineHeight=function(){t.textarea&&t.setState({lineHeight:u(t.textarea)})},t.onChange=function(e){var n=t.props.onChange;t.currentValue=e.currentTarget.value,n&&n(e)},t}return r(t,e),t.prototype.componentDidMount=function(){var e=this,t=this.props,n=t.maxRows,a=t.async;"number"==typeof n&&this.updateLineHeight(),"number"==typeof n||a?setTimeout((function(){return e.textarea&&c(e.textarea)})):this.textarea&&c(this.textarea),this.textarea&&this.textarea.addEventListener(d,this.onResize)},t.prototype.componentWillUnmount=function(){this.textarea&&(this.textarea.removeEventListener(d,this.onResize),c.destroy(this.textarea))},t.prototype.render=function(){var e=this,t=this.props,n=(t.onResize,t.maxRows),a=(t.onChange,t.style),r=(t.innerRef,t.children),l=i(t,["onResize","maxRows","onChange","style","innerRef","children"]),c=this.state.lineHeight,u=n&&c?c*n:null;return o.createElement("textarea",s({},l,{onChange:this.onChange,style:u?s({},a,{maxHeight:u}):a,ref:function(t){e.textarea=t,"function"==typeof e.props.innerRef?e.props.innerRef(t):e.props.innerRef&&(e.props.innerRef.current=t)}}),r)},t.prototype.componentDidUpdate=function(){this.textarea&&c.update(this.textarea)},t.defaultProps={rows:1,async:!1},t.propTypes={rows:l.number,maxRows:l.number,onResize:l.func,innerRef:l.any,async:l.bool},t}(o.Component);t.TextareaAutosize=o.forwardRef((function(e,t){return o.createElement(m,s({},e,{innerRef:t}))}))},773:function(e,t,n){"use strict";var a=n(5438);t.Z=a.TextareaAutosize},4793:function(e){var t={"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","Ấ":"A","Ắ":"A","Ẳ":"A","Ẵ":"A","Ặ":"A","Æ":"AE","Ầ":"A","Ằ":"A","Ȃ":"A","Ả":"A","Ạ":"A","Ẩ":"A","Ẫ":"A","Ậ":"A","Ç":"C","Ḉ":"C","È":"E","É":"E","Ê":"E","Ë":"E","Ế":"E","Ḗ":"E","Ề":"E","Ḕ":"E","Ḝ":"E","Ȇ":"E","Ẻ":"E","Ẽ":"E","Ẹ":"E","Ể":"E","Ễ":"E","Ệ":"E","Ì":"I","Í":"I","Î":"I","Ï":"I","Ḯ":"I","Ȋ":"I","Ỉ":"I","Ị":"I","Ð":"D","Ñ":"N","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","Ố":"O","Ṍ":"O","Ṓ":"O","Ȏ":"O","Ỏ":"O","Ọ":"O","Ổ":"O","Ỗ":"O","Ộ":"O","Ờ":"O","Ở":"O","Ỡ":"O","Ớ":"O","Ợ":"O","Ù":"U","Ú":"U","Û":"U","Ü":"U","Ủ":"U","Ụ":"U","Ử":"U","Ữ":"U","Ự":"U","Ý":"Y","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","ấ":"a","ắ":"a","ẳ":"a","ẵ":"a","ặ":"a","æ":"ae","ầ":"a","ằ":"a","ȃ":"a","ả":"a","ạ":"a","ẩ":"a","ẫ":"a","ậ":"a","ç":"c","ḉ":"c","è":"e","é":"e","ê":"e","ë":"e","ế":"e","ḗ":"e","ề":"e","ḕ":"e","ḝ":"e","ȇ":"e","ẻ":"e","ẽ":"e","ẹ":"e","ể":"e","ễ":"e","ệ":"e","ì":"i","í":"i","î":"i","ï":"i","ḯ":"i","ȋ":"i","ỉ":"i","ị":"i","ð":"d","ñ":"n","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","ố":"o","ṍ":"o","ṓ":"o","ȏ":"o","ỏ":"o","ọ":"o","ổ":"o","ỗ":"o","ộ":"o","ờ":"o","ở":"o","ỡ":"o","ớ":"o","ợ":"o","ù":"u","ú":"u","û":"u","ü":"u","ủ":"u","ụ":"u","ử":"u","ữ":"u","ự":"u","ý":"y","ÿ":"y","Ā":"A","ā":"a","Ă":"A","ă":"a","Ą":"A","ą":"a","Ć":"C","ć":"c","Ĉ":"C","ĉ":"c","Ċ":"C","ċ":"c","Č":"C","č":"c","C̆":"C","c̆":"c","Ď":"D","ď":"d","Đ":"D","đ":"d","Ē":"E","ē":"e","Ĕ":"E","ĕ":"e","Ė":"E","ė":"e","Ę":"E","ę":"e","Ě":"E","ě":"e","Ĝ":"G","Ǵ":"G","ĝ":"g","ǵ":"g","Ğ":"G","ğ":"g","Ġ":"G","ġ":"g","Ģ":"G","ģ":"g","Ĥ":"H","ĥ":"h","Ħ":"H","ħ":"h","Ḫ":"H","ḫ":"h","Ĩ":"I","ĩ":"i","Ī":"I","ī":"i","Ĭ":"I","ĭ":"i","Į":"I","į":"i","İ":"I","ı":"i","IJ":"IJ","ij":"ij","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","Ḱ":"K","ḱ":"k","K̆":"K","k̆":"k","Ĺ":"L","ĺ":"l","Ļ":"L","ļ":"l","Ľ":"L","ľ":"l","Ŀ":"L","ŀ":"l","Ł":"l","ł":"l","Ḿ":"M","ḿ":"m","M̆":"M","m̆":"m","Ń":"N","ń":"n","Ņ":"N","ņ":"n","Ň":"N","ň":"n","ʼn":"n","N̆":"N","n̆":"n","Ō":"O","ō":"o","Ŏ":"O","ŏ":"o","Ő":"O","ő":"o","Œ":"OE","œ":"oe","P̆":"P","p̆":"p","Ŕ":"R","ŕ":"r","Ŗ":"R","ŗ":"r","Ř":"R","ř":"r","R̆":"R","r̆":"r","Ȓ":"R","ȓ":"r","Ś":"S","ś":"s","Ŝ":"S","ŝ":"s","Ş":"S","Ș":"S","ș":"s","ş":"s","Š":"S","š":"s","Ţ":"T","ţ":"t","ț":"t","Ț":"T","Ť":"T","ť":"t","Ŧ":"T","ŧ":"t","T̆":"T","t̆":"t","Ũ":"U","ũ":"u","Ū":"U","ū":"u","Ŭ":"U","ŭ":"u","Ů":"U","ů":"u","Ű":"U","ű":"u","Ų":"U","ų":"u","Ȗ":"U","ȗ":"u","V̆":"V","v̆":"v","Ŵ":"W","ŵ":"w","Ẃ":"W","ẃ":"w","X̆":"X","x̆":"x","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Y̆":"Y","y̆":"y","Ź":"Z","ź":"z","Ż":"Z","ż":"z","Ž":"Z","ž":"z","ſ":"s","ƒ":"f","Ơ":"O","ơ":"o","Ư":"U","ư":"u","Ǎ":"A","ǎ":"a","Ǐ":"I","ǐ":"i","Ǒ":"O","ǒ":"o","Ǔ":"U","ǔ":"u","Ǖ":"U","ǖ":"u","Ǘ":"U","ǘ":"u","Ǚ":"U","ǚ":"u","Ǜ":"U","ǜ":"u","Ứ":"U","ứ":"u","Ṹ":"U","ṹ":"u","Ǻ":"A","ǻ":"a","Ǽ":"AE","ǽ":"ae","Ǿ":"O","ǿ":"o","Þ":"TH","þ":"th","Ṕ":"P","ṕ":"p","Ṥ":"S","ṥ":"s","X́":"X","x́":"x","Ѓ":"Г","ѓ":"г","Ќ":"К","ќ":"к","A̋":"A","a̋":"a","E̋":"E","e̋":"e","I̋":"I","i̋":"i","Ǹ":"N","ǹ":"n","Ồ":"O","ồ":"o","Ṑ":"O","ṑ":"o","Ừ":"U","ừ":"u","Ẁ":"W","ẁ":"w","Ỳ":"Y","ỳ":"y","Ȁ":"A","ȁ":"a","Ȅ":"E","ȅ":"e","Ȉ":"I","ȉ":"i","Ȍ":"O","ȍ":"o","Ȑ":"R","ȑ":"r","Ȕ":"U","ȕ":"u","B̌":"B","b̌":"b","Č̣":"C","č̣":"c","Ê̌":"E","ê̌":"e","F̌":"F","f̌":"f","Ǧ":"G","ǧ":"g","Ȟ":"H","ȟ":"h","J̌":"J","ǰ":"j","Ǩ":"K","ǩ":"k","M̌":"M","m̌":"m","P̌":"P","p̌":"p","Q̌":"Q","q̌":"q","Ř̩":"R","ř̩":"r","Ṧ":"S","ṧ":"s","V̌":"V","v̌":"v","W̌":"W","w̌":"w","X̌":"X","x̌":"x","Y̌":"Y","y̌":"y","A̧":"A","a̧":"a","B̧":"B","b̧":"b","Ḑ":"D","ḑ":"d","Ȩ":"E","ȩ":"e","Ɛ̧":"E","ɛ̧":"e","Ḩ":"H","ḩ":"h","I̧":"I","i̧":"i","Ɨ̧":"I","ɨ̧":"i","M̧":"M","m̧":"m","O̧":"O","o̧":"o","Q̧":"Q","q̧":"q","U̧":"U","u̧":"u","X̧":"X","x̧":"x","Z̧":"Z","z̧":"z","й":"и","Й":"И","ё":"е","Ё":"Е"},n=Object.keys(t).join("|"),a=new RegExp(n,"g"),r=new RegExp(n,"");function s(e){return t[e]}var i=function(e){return e.replace(a,s)};e.exports=i,e.exports.has=function(e){return!!e.match(r)},e.exports.remove=i},1497:function(e){e.exports=function e(t,n,a){function r(i,o){if(!n[i]){if(!t[i]){if(s)return s(i,!0);var l=new Error("Cannot find module '"+i+"'");throw l.code="MODULE_NOT_FOUND",l}var c=n[i]={exports:{}};t[i][0].call(c.exports,(function(e){return r(t[i][1][e]||e)}),c,c.exports,e,t,n,a)}return n[i].exports}for(var s=void 0,i=0;i<a.length;i++)r(a[i]);return r}({1:[function(e,t,n){"use strict";var a="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;function r(e,t){return Object.prototype.hasOwnProperty.call(e,t)}n.assign=function(e){for(var t=Array.prototype.slice.call(arguments,1);t.length;){var n=t.shift();if(n){if("object"!=typeof n)throw new TypeError(n+"must be non-object");for(var a in n)r(n,a)&&(e[a]=n[a])}}return e},n.shrinkBuf=function(e,t){return e.length===t?e:e.subarray?e.subarray(0,t):(e.length=t,e)};var s={arraySet:function(e,t,n,a,r){if(t.subarray&&e.subarray)e.set(t.subarray(n,n+a),r);else for(var s=0;s<a;s++)e[r+s]=t[n+s]},flattenChunks:function(e){var t,n,a,r,s,i;for(a=0,t=0,n=e.length;t<n;t++)a+=e[t].length;for(i=new Uint8Array(a),r=0,t=0,n=e.length;t<n;t++)s=e[t],i.set(s,r),r+=s.length;return i}},i={arraySet:function(e,t,n,a,r){for(var s=0;s<a;s++)e[r+s]=t[n+s]},flattenChunks:function(e){return[].concat.apply([],e)}};n.setTyped=function(e){e?(n.Buf8=Uint8Array,n.Buf16=Uint16Array,n.Buf32=Int32Array,n.assign(n,s)):(n.Buf8=Array,n.Buf16=Array,n.Buf32=Array,n.assign(n,i))},n.setTyped(a)},{}],2:[function(e,t,n){"use strict";var a=e("./common"),r=!0,s=!0;try{String.fromCharCode.apply(null,[0])}catch(e){r=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(e){s=!1}for(var i=new a.Buf8(256),o=0;o<256;o++)i[o]=o>=252?6:o>=248?5:o>=240?4:o>=224?3:o>=192?2:1;function l(e,t){if(t<65534&&(e.subarray&&s||!e.subarray&&r))return String.fromCharCode.apply(null,a.shrinkBuf(e,t));for(var n="",i=0;i<t;i++)n+=String.fromCharCode(e[i]);return n}i[254]=i[254]=1,n.string2buf=function(e){var t,n,r,s,i,o=e.length,l=0;for(s=0;s<o;s++)55296==(64512&(n=e.charCodeAt(s)))&&s+1<o&&56320==(64512&(r=e.charCodeAt(s+1)))&&(n=65536+(n-55296<<10)+(r-56320),s++),l+=n<128?1:n<2048?2:n<65536?3:4;for(t=new a.Buf8(l),i=0,s=0;i<l;s++)55296==(64512&(n=e.charCodeAt(s)))&&s+1<o&&56320==(64512&(r=e.charCodeAt(s+1)))&&(n=65536+(n-55296<<10)+(r-56320),s++),n<128?t[i++]=n:n<2048?(t[i++]=192|n>>>6,t[i++]=128|63&n):n<65536?(t[i++]=224|n>>>12,t[i++]=128|n>>>6&63,t[i++]=128|63&n):(t[i++]=240|n>>>18,t[i++]=128|n>>>12&63,t[i++]=128|n>>>6&63,t[i++]=128|63&n);return t},n.buf2binstring=function(e){return l(e,e.length)},n.binstring2buf=function(e){for(var t=new a.Buf8(e.length),n=0,r=t.length;n<r;n++)t[n]=e.charCodeAt(n);return t},n.buf2string=function(e,t){var n,a,r,s,o=t||e.length,c=new Array(2*o);for(a=0,n=0;n<o;)if((r=e[n++])<128)c[a++]=r;else if((s=i[r])>4)c[a++]=65533,n+=s-1;else{for(r&=2===s?31:3===s?15:7;s>1&&n<o;)r=r<<6|63&e[n++],s--;s>1?c[a++]=65533:r<65536?c[a++]=r:(r-=65536,c[a++]=55296|r>>10&1023,c[a++]=56320|1023&r)}return l(c,a)},n.utf8border=function(e,t){var n;for((t=t||e.length)>e.length&&(t=e.length),n=t-1;n>=0&&128==(192&e[n]);)n--;return n<0||0===n?t:n+i[e[n]]>t?n:t}},{"./common":1}],3:[function(e,t,n){"use strict";t.exports=function(e,t,n,a){for(var r=65535&e|0,s=e>>>16&65535|0,i=0;0!==n;){n-=i=n>2e3?2e3:n;do{s=s+(r=r+t[a++]|0)|0}while(--i);r%=65521,s%=65521}return r|s<<16|0}},{}],4:[function(e,t,n){"use strict";t.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],5:[function(e,t,n){"use strict";var a=function(){for(var e,t=[],n=0;n<256;n++){e=n;for(var a=0;a<8;a++)e=1&e?3988292384^e>>>1:e>>>1;t[n]=e}return t}();t.exports=function(e,t,n,r){var s=a,i=r+n;e^=-1;for(var o=r;o<i;o++)e=e>>>8^s[255&(e^t[o])];return-1^e}},{}],6:[function(e,t,n){"use strict";t.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},{}],7:[function(e,t,n){"use strict";t.exports=function(e,t){var n,a,r,s,i,o,l,c,u,d,m,p,h,f,g,y,v,_,b,E,w,x,S,C,k;n=e.state,a=e.next_in,C=e.input,r=a+(e.avail_in-5),s=e.next_out,k=e.output,i=s-(t-e.avail_out),o=s+(e.avail_out-257),l=n.dmax,c=n.wsize,u=n.whave,d=n.wnext,m=n.window,p=n.hold,h=n.bits,f=n.lencode,g=n.distcode,y=(1<<n.lenbits)-1,v=(1<<n.distbits)-1;e:do{h<15&&(p+=C[a++]<<h,h+=8,p+=C[a++]<<h,h+=8),_=f[p&y];t:for(;;){if(p>>>=b=_>>>24,h-=b,0==(b=_>>>16&255))k[s++]=65535&_;else{if(!(16&b)){if(0==(64&b)){_=f[(65535&_)+(p&(1<<b)-1)];continue t}if(32&b){n.mode=12;break e}e.msg="invalid literal/length code",n.mode=30;break e}E=65535&_,(b&=15)&&(h<b&&(p+=C[a++]<<h,h+=8),E+=p&(1<<b)-1,p>>>=b,h-=b),h<15&&(p+=C[a++]<<h,h+=8,p+=C[a++]<<h,h+=8),_=g[p&v];n:for(;;){if(p>>>=b=_>>>24,h-=b,!(16&(b=_>>>16&255))){if(0==(64&b)){_=g[(65535&_)+(p&(1<<b)-1)];continue n}e.msg="invalid distance code",n.mode=30;break e}if(w=65535&_,h<(b&=15)&&(p+=C[a++]<<h,(h+=8)<b&&(p+=C[a++]<<h,h+=8)),(w+=p&(1<<b)-1)>l){e.msg="invalid distance too far back",n.mode=30;break e}if(p>>>=b,h-=b,w>(b=s-i)){if((b=w-b)>u&&n.sane){e.msg="invalid distance too far back",n.mode=30;break e}if(x=0,S=m,0===d){if(x+=c-b,b<E){E-=b;do{k[s++]=m[x++]}while(--b);x=s-w,S=k}}else if(d<b){if(x+=c+d-b,(b-=d)<E){E-=b;do{k[s++]=m[x++]}while(--b);if(x=0,d<E){E-=b=d;do{k[s++]=m[x++]}while(--b);x=s-w,S=k}}}else if(x+=d-b,b<E){E-=b;do{k[s++]=m[x++]}while(--b);x=s-w,S=k}for(;E>2;)k[s++]=S[x++],k[s++]=S[x++],k[s++]=S[x++],E-=3;E&&(k[s++]=S[x++],E>1&&(k[s++]=S[x++]))}else{x=s-w;do{k[s++]=k[x++],k[s++]=k[x++],k[s++]=k[x++],E-=3}while(E>2);E&&(k[s++]=k[x++],E>1&&(k[s++]=k[x++]))}break}}break}}while(a<r&&s<o);a-=E=h>>3,p&=(1<<(h-=E<<3))-1,e.next_in=a,e.next_out=s,e.avail_in=a<r?r-a+5:5-(a-r),e.avail_out=s<o?o-s+257:257-(s-o),n.hold=p,n.bits=h}},{}],8:[function(e,t,n){"use strict";var a=e("../utils/common"),r=e("./adler32"),s=e("./crc32"),i=e("./inffast"),o=e("./inftrees"),l=1,c=2,u=0,d=-2,m=1,p=12,h=30,f=852,g=592;function y(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function v(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new a.Buf16(320),this.work=new a.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function _(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=m,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new a.Buf32(f),t.distcode=t.distdyn=new a.Buf32(g),t.sane=1,t.back=-1,u):d}function b(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,_(e)):d}function E(e,t){var n,a;return e&&e.state?(a=e.state,t<0?(n=0,t=-t):(n=1+(t>>4),t<48&&(t&=15)),t&&(t<8||t>15)?d:(null!==a.window&&a.wbits!==t&&(a.window=null),a.wrap=n,a.wbits=t,b(e))):d}function w(e,t){var n,a;return e?(a=new v,e.state=a,a.window=null,(n=E(e,t))!==u&&(e.state=null),n):d}var x,S,C=!0;function k(e){if(C){var t;for(x=new a.Buf32(512),S=new a.Buf32(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(o(l,e.lens,0,288,x,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;o(c,e.lens,0,32,S,0,e.work,{bits:5}),C=!1}e.lencode=x,e.lenbits=9,e.distcode=S,e.distbits=5}function T(e,t,n,r){var s,i=e.state;return null===i.window&&(i.wsize=1<<i.wbits,i.wnext=0,i.whave=0,i.window=new a.Buf8(i.wsize)),r>=i.wsize?(a.arraySet(i.window,t,n-i.wsize,i.wsize,0),i.wnext=0,i.whave=i.wsize):((s=i.wsize-i.wnext)>r&&(s=r),a.arraySet(i.window,t,n-r,s,i.wnext),(r-=s)?(a.arraySet(i.window,t,n-r,r,0),i.wnext=r,i.whave=i.wsize):(i.wnext+=s,i.wnext===i.wsize&&(i.wnext=0),i.whave<i.wsize&&(i.whave+=s))),0}n.inflateReset=b,n.inflateReset2=E,n.inflateResetKeep=_,n.inflateInit=function(e){return w(e,15)},n.inflateInit2=w,n.inflate=function(e,t){var n,f,g,v,_,b,E,w,x,S,C,P,N,I,M,A,O,R,D,F,B,L,V,z,G=0,H=new a.Buf8(4),U=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!e||!e.state||!e.output||!e.input&&0!==e.avail_in)return d;(n=e.state).mode===p&&(n.mode=13),_=e.next_out,g=e.output,E=e.avail_out,v=e.next_in,f=e.input,b=e.avail_in,w=n.hold,x=n.bits,S=b,C=E,L=u;e:for(;;)switch(n.mode){case m:if(0===n.wrap){n.mode=13;break}for(;x<16;){if(0===b)break e;b--,w+=f[v++]<<x,x+=8}if(2&n.wrap&&35615===w){n.check=0,H[0]=255&w,H[1]=w>>>8&255,n.check=s(n.check,H,2,0),w=0,x=0,n.mode=2;break}if(n.flags=0,n.head&&(n.head.done=!1),!(1&n.wrap)||(((255&w)<<8)+(w>>8))%31){e.msg="incorrect header check",n.mode=h;break}if(8!=(15&w)){e.msg="unknown compression method",n.mode=h;break}if(x-=4,B=8+(15&(w>>>=4)),0===n.wbits)n.wbits=B;else if(B>n.wbits){e.msg="invalid window size",n.mode=h;break}n.dmax=1<<B,e.adler=n.check=1,n.mode=512&w?10:p,w=0,x=0;break;case 2:for(;x<16;){if(0===b)break e;b--,w+=f[v++]<<x,x+=8}if(n.flags=w,8!=(255&n.flags)){e.msg="unknown compression method",n.mode=h;break}if(57344&n.flags){e.msg="unknown header flags set",n.mode=h;break}n.head&&(n.head.text=w>>8&1),512&n.flags&&(H[0]=255&w,H[1]=w>>>8&255,n.check=s(n.check,H,2,0)),w=0,x=0,n.mode=3;case 3:for(;x<32;){if(0===b)break e;b--,w+=f[v++]<<x,x+=8}n.head&&(n.head.time=w),512&n.flags&&(H[0]=255&w,H[1]=w>>>8&255,H[2]=w>>>16&255,H[3]=w>>>24&255,n.check=s(n.check,H,4,0)),w=0,x=0,n.mode=4;case 4:for(;x<16;){if(0===b)break e;b--,w+=f[v++]<<x,x+=8}n.head&&(n.head.xflags=255&w,n.head.os=w>>8),512&n.flags&&(H[0]=255&w,H[1]=w>>>8&255,n.check=s(n.check,H,2,0)),w=0,x=0,n.mode=5;case 5:if(1024&n.flags){for(;x<16;){if(0===b)break e;b--,w+=f[v++]<<x,x+=8}n.length=w,n.head&&(n.head.extra_len=w),512&n.flags&&(H[0]=255&w,H[1]=w>>>8&255,n.check=s(n.check,H,2,0)),w=0,x=0}else n.head&&(n.head.extra=null);n.mode=6;case 6:if(1024&n.flags&&((P=n.length)>b&&(P=b),P&&(n.head&&(B=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Array(n.head.extra_len)),a.arraySet(n.head.extra,f,v,P,B)),512&n.flags&&(n.check=s(n.check,f,P,v)),b-=P,v+=P,n.length-=P),n.length))break e;n.length=0,n.mode=7;case 7:if(2048&n.flags){if(0===b)break e;P=0;do{B=f[v+P++],n.head&&B&&n.length<65536&&(n.head.name+=String.fromCharCode(B))}while(B&&P<b);if(512&n.flags&&(n.check=s(n.check,f,P,v)),b-=P,v+=P,B)break e}else n.head&&(n.head.name=null);n.length=0,n.mode=8;case 8:if(4096&n.flags){if(0===b)break e;P=0;do{B=f[v+P++],n.head&&B&&n.length<65536&&(n.head.comment+=String.fromCharCode(B))}while(B&&P<b);if(512&n.flags&&(n.check=s(n.check,f,P,v)),b-=P,v+=P,B)break e}else n.head&&(n.head.comment=null);n.mode=9;case 9:if(512&n.flags){for(;x<16;){if(0===b)break e;b--,w+=f[v++]<<x,x+=8}if(w!==(65535&n.check)){e.msg="header crc mismatch",n.mode=h;break}w=0,x=0}n.head&&(n.head.hcrc=n.flags>>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=p;break;case 10:for(;x<32;){if(0===b)break e;b--,w+=f[v++]<<x,x+=8}e.adler=n.check=y(w),w=0,x=0,n.mode=11;case 11:if(0===n.havedict)return e.next_out=_,e.avail_out=E,e.next_in=v,e.avail_in=b,n.hold=w,n.bits=x,2;e.adler=n.check=1,n.mode=p;case p:if(5===t||6===t)break e;case 13:if(n.last){w>>>=7&x,x-=7&x,n.mode=27;break}for(;x<3;){if(0===b)break e;b--,w+=f[v++]<<x,x+=8}switch(n.last=1&w,x-=1,3&(w>>>=1)){case 0:n.mode=14;break;case 1:if(k(n),n.mode=20,6===t){w>>>=2,x-=2;break e}break;case 2:n.mode=17;break;case 3:e.msg="invalid block type",n.mode=h}w>>>=2,x-=2;break;case 14:for(w>>>=7&x,x-=7&x;x<32;){if(0===b)break e;b--,w+=f[v++]<<x,x+=8}if((65535&w)!=(w>>>16^65535)){e.msg="invalid stored block lengths",n.mode=h;break}if(n.length=65535&w,w=0,x=0,n.mode=15,6===t)break e;case 15:n.mode=16;case 16:if(P=n.length){if(P>b&&(P=b),P>E&&(P=E),0===P)break e;a.arraySet(g,f,v,P,_),b-=P,v+=P,E-=P,_+=P,n.length-=P;break}n.mode=p;break;case 17:for(;x<14;){if(0===b)break e;b--,w+=f[v++]<<x,x+=8}if(n.nlen=257+(31&w),w>>>=5,x-=5,n.ndist=1+(31&w),w>>>=5,x-=5,n.ncode=4+(15&w),w>>>=4,x-=4,n.nlen>286||n.ndist>30){e.msg="too many length or distance symbols",n.mode=h;break}n.have=0,n.mode=18;case 18:for(;n.have<n.ncode;){for(;x<3;){if(0===b)break e;b--,w+=f[v++]<<x,x+=8}n.lens[U[n.have++]]=7&w,w>>>=3,x-=3}for(;n.have<19;)n.lens[U[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,V={bits:n.lenbits},L=o(0,n.lens,0,19,n.lencode,0,n.work,V),n.lenbits=V.bits,L){e.msg="invalid code lengths set",n.mode=h;break}n.have=0,n.mode=19;case 19:for(;n.have<n.nlen+n.ndist;){for(;A=(G=n.lencode[w&(1<<n.lenbits)-1])>>>16&255,O=65535&G,!((M=G>>>24)<=x);){if(0===b)break e;b--,w+=f[v++]<<x,x+=8}if(O<16)w>>>=M,x-=M,n.lens[n.have++]=O;else{if(16===O){for(z=M+2;x<z;){if(0===b)break e;b--,w+=f[v++]<<x,x+=8}if(w>>>=M,x-=M,0===n.have){e.msg="invalid bit length repeat",n.mode=h;break}B=n.lens[n.have-1],P=3+(3&w),w>>>=2,x-=2}else if(17===O){for(z=M+3;x<z;){if(0===b)break e;b--,w+=f[v++]<<x,x+=8}x-=M,B=0,P=3+(7&(w>>>=M)),w>>>=3,x-=3}else{for(z=M+7;x<z;){if(0===b)break e;b--,w+=f[v++]<<x,x+=8}x-=M,B=0,P=11+(127&(w>>>=M)),w>>>=7,x-=7}if(n.have+P>n.nlen+n.ndist){e.msg="invalid bit length repeat",n.mode=h;break}for(;P--;)n.lens[n.have++]=B}}if(n.mode===h)break;if(0===n.lens[256]){e.msg="invalid code -- missing end-of-block",n.mode=h;break}if(n.lenbits=9,V={bits:n.lenbits},L=o(l,n.lens,0,n.nlen,n.lencode,0,n.work,V),n.lenbits=V.bits,L){e.msg="invalid literal/lengths set",n.mode=h;break}if(n.distbits=6,n.distcode=n.distdyn,V={bits:n.distbits},L=o(c,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,V),n.distbits=V.bits,L){e.msg="invalid distances set",n.mode=h;break}if(n.mode=20,6===t)break e;case 20:n.mode=21;case 21:if(b>=6&&E>=258){e.next_out=_,e.avail_out=E,e.next_in=v,e.avail_in=b,n.hold=w,n.bits=x,i(e,C),_=e.next_out,g=e.output,E=e.avail_out,v=e.next_in,f=e.input,b=e.avail_in,w=n.hold,x=n.bits,n.mode===p&&(n.back=-1);break}for(n.back=0;A=(G=n.lencode[w&(1<<n.lenbits)-1])>>>16&255,O=65535&G,!((M=G>>>24)<=x);){if(0===b)break e;b--,w+=f[v++]<<x,x+=8}if(A&&0==(240&A)){for(R=M,D=A,F=O;A=(G=n.lencode[F+((w&(1<<R+D)-1)>>R)])>>>16&255,O=65535&G,!(R+(M=G>>>24)<=x);){if(0===b)break e;b--,w+=f[v++]<<x,x+=8}w>>>=R,x-=R,n.back+=R}if(w>>>=M,x-=M,n.back+=M,n.length=O,0===A){n.mode=26;break}if(32&A){n.back=-1,n.mode=p;break}if(64&A){e.msg="invalid literal/length code",n.mode=h;break}n.extra=15&A,n.mode=22;case 22:if(n.extra){for(z=n.extra;x<z;){if(0===b)break e;b--,w+=f[v++]<<x,x+=8}n.length+=w&(1<<n.extra)-1,w>>>=n.extra,x-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=23;case 23:for(;A=(G=n.distcode[w&(1<<n.distbits)-1])>>>16&255,O=65535&G,!((M=G>>>24)<=x);){if(0===b)break e;b--,w+=f[v++]<<x,x+=8}if(0==(240&A)){for(R=M,D=A,F=O;A=(G=n.distcode[F+((w&(1<<R+D)-1)>>R)])>>>16&255,O=65535&G,!(R+(M=G>>>24)<=x);){if(0===b)break e;b--,w+=f[v++]<<x,x+=8}w>>>=R,x-=R,n.back+=R}if(w>>>=M,x-=M,n.back+=M,64&A){e.msg="invalid distance code",n.mode=h;break}n.offset=O,n.extra=15&A,n.mode=24;case 24:if(n.extra){for(z=n.extra;x<z;){if(0===b)break e;b--,w+=f[v++]<<x,x+=8}n.offset+=w&(1<<n.extra)-1,w>>>=n.extra,x-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg="invalid distance too far back",n.mode=h;break}n.mode=25;case 25:if(0===E)break e;if(P=C-E,n.offset>P){if((P=n.offset-P)>n.whave&&n.sane){e.msg="invalid distance too far back",n.mode=h;break}P>n.wnext?(P-=n.wnext,N=n.wsize-P):N=n.wnext-P,P>n.length&&(P=n.length),I=n.window}else I=g,N=_-n.offset,P=n.length;P>E&&(P=E),E-=P,n.length-=P;do{g[_++]=I[N++]}while(--P);0===n.length&&(n.mode=21);break;case 26:if(0===E)break e;g[_++]=n.length,E--,n.mode=21;break;case 27:if(n.wrap){for(;x<32;){if(0===b)break e;b--,w|=f[v++]<<x,x+=8}if(C-=E,e.total_out+=C,n.total+=C,C&&(e.adler=n.check=n.flags?s(n.check,g,C,_-C):r(n.check,g,C,_-C)),C=E,(n.flags?w:y(w))!==n.check){e.msg="incorrect data check",n.mode=h;break}w=0,x=0}n.mode=28;case 28:if(n.wrap&&n.flags){for(;x<32;){if(0===b)break e;b--,w+=f[v++]<<x,x+=8}if(w!==(4294967295&n.total)){e.msg="incorrect length check",n.mode=h;break}w=0,x=0}n.mode=29;case 29:L=1;break e;case h:L=-3;break e;case 31:return-4;default:return d}return e.next_out=_,e.avail_out=E,e.next_in=v,e.avail_in=b,n.hold=w,n.bits=x,(n.wsize||C!==e.avail_out&&n.mode<h&&(n.mode<27||4!==t))&&T(e,e.output,e.next_out,C-e.avail_out)?(n.mode=31,-4):(S-=e.avail_in,C-=e.avail_out,e.total_in+=S,e.total_out+=C,n.total+=C,n.wrap&&C&&(e.adler=n.check=n.flags?s(n.check,g,C,e.next_out-C):r(n.check,g,C,e.next_out-C)),e.data_type=n.bits+(n.last?64:0)+(n.mode===p?128:0)+(20===n.mode||15===n.mode?256:0),(0===S&&0===C||4===t)&&L===u&&(L=-5),L)},n.inflateEnd=function(e){if(!e||!e.state)return d;var t=e.state;return t.window&&(t.window=null),e.state=null,u},n.inflateGetHeader=function(e,t){var n;return e&&e.state?0==(2&(n=e.state).wrap)?d:(n.head=t,t.done=!1,u):d},n.inflateSetDictionary=function(e,t){var n,a=t.length;return e&&e.state?0!==(n=e.state).wrap&&11!==n.mode?d:11===n.mode&&r(1,t,a,0)!==n.check?-3:T(e,t,a,a)?(n.mode=31,-4):(n.havedict=1,u):d},n.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":1,"./adler32":3,"./crc32":5,"./inffast":7,"./inftrees":9}],9:[function(e,t,n){"use strict";var a=e("../utils/common"),r=15,s=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],i=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],o=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],l=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];t.exports=function(e,t,n,c,u,d,m,p){var h,f,g,y,v,_,b,E,w,x=p.bits,S=0,C=0,k=0,T=0,P=0,N=0,I=0,M=0,A=0,O=0,R=null,D=0,F=new a.Buf16(16),B=new a.Buf16(16),L=null,V=0;for(S=0;S<=r;S++)F[S]=0;for(C=0;C<c;C++)F[t[n+C]]++;for(P=x,T=r;T>=1&&0===F[T];T--);if(P>T&&(P=T),0===T)return u[d++]=20971520,u[d++]=20971520,p.bits=1,0;for(k=1;k<T&&0===F[k];k++);for(P<k&&(P=k),M=1,S=1;S<=r;S++)if(M<<=1,(M-=F[S])<0)return-1;if(M>0&&(0===e||1!==T))return-1;for(B[1]=0,S=1;S<r;S++)B[S+1]=B[S]+F[S];for(C=0;C<c;C++)0!==t[n+C]&&(m[B[t[n+C]]++]=C);if(0===e?(R=L=m,_=19):1===e?(R=s,D-=257,L=i,V-=257,_=256):(R=o,L=l,_=-1),O=0,C=0,S=k,v=d,N=P,I=0,g=-1,y=(A=1<<P)-1,1===e&&A>852||2===e&&A>592)return 1;for(;;){b=S-I,m[C]<_?(E=0,w=m[C]):m[C]>_?(E=L[V+m[C]],w=R[D+m[C]]):(E=96,w=0),h=1<<S-I,k=f=1<<N;do{u[v+(O>>I)+(f-=h)]=b<<24|E<<16|w|0}while(0!==f);for(h=1<<S-1;O&h;)h>>=1;if(0!==h?(O&=h-1,O+=h):O=0,C++,0==--F[S]){if(S===T)break;S=t[n+m[C]]}if(S>P&&(O&y)!==g){for(0===I&&(I=P),v+=k,M=1<<(N=S-I);N+I<T&&!((M-=F[N+I])<=0);)N++,M<<=1;if(A+=1<<N,1===e&&A>852||2===e&&A>592)return 1;u[g=O&y]=P<<24|N<<16|v-d|0}}return 0!==O&&(u[v+O]=S-I<<24|64<<16|0),p.bits=P,0}},{"../utils/common":1}],10:[function(e,t,n){"use strict";t.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],11:[function(e,t,n){"use strict";t.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],"/lib/inflate.js":[function(e,t,n){"use strict";var a=e("./zlib/inflate"),r=e("./utils/common"),s=e("./utils/strings"),i=e("./zlib/constants"),o=e("./zlib/messages"),l=e("./zlib/zstream"),c=e("./zlib/gzheader"),u=Object.prototype.toString;function d(e){if(!(this instanceof d))return new d(e);this.options=r.assign({chunkSize:16384,windowBits:0,to:""},e||{});var t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),!(t.windowBits>=0&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&0==(15&t.windowBits)&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new l,this.strm.avail_out=0;var n=a.inflateInit2(this.strm,t.windowBits);if(n!==i.Z_OK)throw new Error(o[n]);if(this.header=new c,a.inflateGetHeader(this.strm,this.header),t.dictionary&&("string"==typeof t.dictionary?t.dictionary=s.string2buf(t.dictionary):"[object ArrayBuffer]"===u.call(t.dictionary)&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(n=a.inflateSetDictionary(this.strm,t.dictionary))!==i.Z_OK))throw new Error(o[n])}function m(e,t){var n=new d(t);if(n.push(e,!0),n.err)throw n.msg||o[n.err];return n.result}d.prototype.push=function(e,t){var n,o,l,c,d,m=this.strm,p=this.options.chunkSize,h=this.options.dictionary,f=!1;if(this.ended)return!1;o=t===~~t?t:!0===t?i.Z_FINISH:i.Z_NO_FLUSH,"string"==typeof e?m.input=s.binstring2buf(e):"[object ArrayBuffer]"===u.call(e)?m.input=new Uint8Array(e):m.input=e,m.next_in=0,m.avail_in=m.input.length;do{if(0===m.avail_out&&(m.output=new r.Buf8(p),m.next_out=0,m.avail_out=p),(n=a.inflate(m,i.Z_NO_FLUSH))===i.Z_NEED_DICT&&h&&(n=a.inflateSetDictionary(this.strm,h)),n===i.Z_BUF_ERROR&&!0===f&&(n=i.Z_OK,f=!1),n!==i.Z_STREAM_END&&n!==i.Z_OK)return this.onEnd(n),this.ended=!0,!1;m.next_out&&(0!==m.avail_out&&n!==i.Z_STREAM_END&&(0!==m.avail_in||o!==i.Z_FINISH&&o!==i.Z_SYNC_FLUSH)||("string"===this.options.to?(l=s.utf8border(m.output,m.next_out),c=m.next_out-l,d=s.buf2string(m.output,l),m.next_out=c,m.avail_out=p-c,c&&r.arraySet(m.output,m.output,l,c,0),this.onData(d)):this.onData(r.shrinkBuf(m.output,m.next_out)))),0===m.avail_in&&0===m.avail_out&&(f=!0)}while((m.avail_in>0||0===m.avail_out)&&n!==i.Z_STREAM_END);return n===i.Z_STREAM_END&&(o=i.Z_FINISH),o===i.Z_FINISH?(n=a.inflateEnd(this.strm),this.onEnd(n),this.ended=!0,n===i.Z_OK):o!==i.Z_SYNC_FLUSH||(this.onEnd(i.Z_OK),m.avail_out=0,!0)},d.prototype.onData=function(e){this.chunks.push(e)},d.prototype.onEnd=function(e){e===i.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=r.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},n.Inflate=d,n.inflate=m,n.inflateRaw=function(e,t){return(t=t||{}).raw=!0,m(e,t)},n.ungzip=m},{"./utils/common":1,"./utils/strings":2,"./zlib/constants":4,"./zlib/gzheader":6,"./zlib/inflate":8,"./zlib/messages":10,"./zlib/zstream":11}]},{},[])("/lib/inflate.js")},808:function(e){e.exports=function e(t,n,a){function r(i,o){if(!n[i]){if(!t[i]){if(s)return s(i,!0);var l=new Error("Cannot find module '"+i+"'");throw l.code="MODULE_NOT_FOUND",l}var c=n[i]={exports:{}};t[i][0].call(c.exports,(function(e){return r(t[i][1][e]||e)}),c,c.exports,e,t,n,a)}return n[i].exports}for(var s=void 0,i=0;i<a.length;i++)r(a[i]);return r}({1:[function(e,t,n){var a=4096,r=new Uint32Array([0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535,131071,262143,524287,1048575,2097151,4194303,8388607,16777215]);function s(e){this.buf_=new Uint8Array(8224),this.input_=e,this.reset()}s.READ_SIZE=a,s.IBUF_MASK=8191,s.prototype.reset=function(){this.buf_ptr_=0,this.val_=0,this.pos_=0,this.bit_pos_=0,this.bit_end_pos_=0,this.eos_=0,this.readMoreInput();for(var e=0;e<4;e++)this.val_|=this.buf_[this.pos_]<<8*e,++this.pos_;return this.bit_end_pos_>0},s.prototype.readMoreInput=function(){if(!(this.bit_end_pos_>256))if(this.eos_){if(this.bit_pos_>this.bit_end_pos_)throw new Error("Unexpected end of input "+this.bit_pos_+" "+this.bit_end_pos_)}else{var e=this.buf_ptr_,t=this.input_.read(this.buf_,e,a);if(t<0)throw new Error("Unexpected end of input");if(t<a){this.eos_=1;for(var n=0;n<32;n++)this.buf_[e+t+n]=0}if(0===e){for(n=0;n<32;n++)this.buf_[8192+n]=this.buf_[n];this.buf_ptr_=a}else this.buf_ptr_=0;this.bit_end_pos_+=t<<3}},s.prototype.fillBitWindow=function(){for(;this.bit_pos_>=8;)this.val_>>>=8,this.val_|=this.buf_[8191&this.pos_]<<24,++this.pos_,this.bit_pos_=this.bit_pos_-8>>>0,this.bit_end_pos_=this.bit_end_pos_-8>>>0},s.prototype.readBits=function(e){32-this.bit_pos_<e&&this.fillBitWindow();var t=this.val_>>>this.bit_pos_&r[e];return this.bit_pos_+=e,t},t.exports=s},{}],2:[function(e,t,n){n.lookup=new Uint8Array([0,0,0,0,0,0,0,0,0,4,4,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,12,16,12,12,20,12,16,24,28,12,12,32,12,36,12,44,44,44,44,44,44,44,44,44,44,32,32,24,40,28,12,12,48,52,52,52,48,52,52,52,48,52,52,52,52,52,48,52,52,52,52,52,48,52,52,52,52,52,24,12,28,12,12,12,56,60,60,60,56,60,60,60,56,60,60,60,60,60,56,60,60,60,60,60,56,60,60,60,60,60,24,12,28,12,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0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,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,7,0,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,56,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,6,6,6,6,7,7,7,7,8,8,8,8,9,9,9,9,10,10,10,10,11,11,11,11,12,12,12,12,13,13,13,13,14,14,14,14,15,15,15,15,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,22,22,22,22,23,23,23,23,24,24,24,24,25,25,25,25,26,26,26,26,27,27,27,27,28,28,28,28,29,29,29,29,30,30,30,30,31,31,31,31,32,32,32,32,33,33,33,33,34,34,34,34,35,35,35,35,36,36,36,36,37,37,37,37,38,38,38,38,39,39,39,39,40,40,40,40,41,41,41,41,42,42,42,42,43,43,43,43,44,44,44,44,45,45,45,45,46,46,46,46,47,47,47,47,48,48,48,48,49,49,49,49,50,50,50,50,51,51,51,51,52,52,52,52,53,53,53,53,54,54,54,54,55,55,55,55,56,56,56,56,57,57,57,57,58,58,58,58,59,59,59,59,60,60,60,60,61,61,61,61,62,62,62,62,63,63,63,63,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),n.lookupOffsets=new Uint16Array([1024,1536,1280,1536,0,256,768,512])},{}],3:[function(e,t,n){var a=e("./streams").BrotliInput,r=e("./streams").BrotliOutput,s=e("./bit_reader"),i=e("./dictionary"),o=e("./huffman").HuffmanCode,l=e("./huffman").BrotliBuildHuffmanTable,c=e("./context"),u=e("./prefix"),d=e("./transform"),m=8,p=16,h=256,f=704,g=26,y=6,v=2,_=8,b=255,E=1080,w=18,x=new Uint8Array([1,2,3,4,0,5,17,6,16,7,8,9,10,11,12,13,14,15]),S=16,C=new Uint8Array([3,2,1,0,3,3,3,3,3,3,2,2,2,2,2,2]),k=new Int8Array([0,0,0,0,-1,1,-2,2,-3,3,-1,1,-2,2,-3,3]),T=new Uint16Array([256,402,436,468,500,534,566,598,630,662,694,726,758,790,822,854,886,920,952,984,1016,1048,1080]);function P(e){var t;return 0===e.readBits(1)?16:(t=e.readBits(3))>0?17+t:(t=e.readBits(3))>0?8+t:17}function N(e){if(e.readBits(1)){var t=e.readBits(3);return 0===t?1:e.readBits(t)+(1<<t)}return 0}function I(){this.meta_block_length=0,this.input_end=0,this.is_uncompressed=0,this.is_metadata=!1}function M(e){var t,n,a,r=new I;if(r.input_end=e.readBits(1),r.input_end&&e.readBits(1))return r;if(7===(t=e.readBits(2)+4)){if(r.is_metadata=!0,0!==e.readBits(1))throw new Error("Invalid reserved bit");if(0===(n=e.readBits(2)))return r;for(a=0;a<n;a++){var s=e.readBits(8);if(a+1===n&&n>1&&0===s)throw new Error("Invalid size byte");r.meta_block_length|=s<<8*a}}else for(a=0;a<t;++a){var i=e.readBits(4);if(a+1===t&&t>4&&0===i)throw new Error("Invalid size nibble");r.meta_block_length|=i<<4*a}return++r.meta_block_length,r.input_end||r.is_metadata||(r.is_uncompressed=e.readBits(1)),r}function A(e,t,n){var a;return n.fillBitWindow(),(a=e[t+=n.val_>>>n.bit_pos_&b].bits-_)>0&&(n.bit_pos_+=_,t+=e[t].value,t+=n.val_>>>n.bit_pos_&(1<<a)-1),n.bit_pos_+=e[t].bits,e[t].value}function O(e,t,n,a){var r,s,i=new Uint8Array(e);if(a.readMoreInput(),1===(r=a.readBits(2))){for(var c=e-1,u=0,d=new Int32Array(4),h=a.readBits(2)+1;c;)c>>=1,++u;for(f=0;f<h;++f)d[f]=a.readBits(u)%e,i[d[f]]=2;switch(i[d[0]]=1,h){case 1:break;case 3:if(d[0]===d[1]||d[0]===d[2]||d[1]===d[2])throw new Error("[ReadHuffmanCode] invalid symbols");break;case 2:if(d[0]===d[1])throw new Error("[ReadHuffmanCode] invalid symbols");i[d[1]]=1;break;case 4:if(d[0]===d[1]||d[0]===d[2]||d[0]===d[3]||d[1]===d[2]||d[1]===d[3]||d[2]===d[3])throw new Error("[ReadHuffmanCode] invalid symbols");a.readBits(1)?(i[d[2]]=3,i[d[3]]=3):i[d[0]]=2}}else{var f,g=new Uint8Array(w),y=32,v=0,b=[new o(2,0),new o(2,4),new o(2,3),new o(3,2),new o(2,0),new o(2,4),new o(2,3),new o(4,1),new o(2,0),new o(2,4),new o(2,3),new o(3,2),new o(2,0),new o(2,4),new o(2,3),new o(4,5)];for(f=r;f<w&&y>0;++f){var E,S=x[f],C=0;a.fillBitWindow(),C+=a.val_>>>a.bit_pos_&15,a.bit_pos_+=b[C].bits,E=b[C].value,g[S]=E,0!==E&&(y-=32>>E,++v)}if(1!==v&&0!==y)throw new Error("[ReadHuffmanCode] invalid num_codes or space");!function(e,t,n,a){for(var r=0,s=m,i=0,c=0,u=32768,d=[],h=0;h<32;h++)d.push(new o(0,0));for(l(d,0,5,e,w);r<t&&u>0;){var f,g=0;if(a.readMoreInput(),a.fillBitWindow(),g+=a.val_>>>a.bit_pos_&31,a.bit_pos_+=d[g].bits,(f=255&d[g].value)<p)i=0,n[r++]=f,0!==f&&(s=f,u-=32768>>f);else{var y,v,_=f-14,b=0;if(f===p&&(b=s),c!==b&&(i=0,c=b),y=i,i>0&&(i-=2,i<<=_),r+(v=(i+=a.readBits(_)+3)-y)>t)throw new Error("[ReadHuffmanCodeLengths] symbol + repeat_delta > num_symbols");for(var E=0;E<v;E++)n[r+E]=c;r+=v,0!==c&&(u-=v<<15-c)}}if(0!==u)throw new Error("[ReadHuffmanCodeLengths] space = "+u);for(;r<t;r++)n[r]=0}(g,e,i,a)}if(0===(s=l(t,n,_,i,e)))throw new Error("[ReadHuffmanCode] BuildHuffmanTable failed: ");return s}function R(e,t,n){var a,r;return a=A(e,t,n),r=u.kBlockLengthPrefixCode[a].nbits,u.kBlockLengthPrefixCode[a].offset+n.readBits(r)}function D(e,t,n){var a;return e<S?(n+=C[e],a=t[n&=3]+k[e]):a=e-S+1,a}function F(e,t){for(var n=e[t],a=t;a;--a)e[a]=e[a-1];e[0]=n}function B(e,t){this.alphabet_size=e,this.num_htrees=t,this.codes=new Array(t+t*T[e+31>>>5]),this.htrees=new Uint32Array(t)}function L(e,t){var n,a,r={num_htrees:null,context_map:null},s=0;t.readMoreInput();var i=r.num_htrees=N(t)+1,l=r.context_map=new Uint8Array(e);if(i<=1)return r;for(t.readBits(1)&&(s=t.readBits(4)+1),n=[],a=0;a<E;a++)n[a]=new o(0,0);for(O(i+s,n,0,t),a=0;a<e;){var c;if(t.readMoreInput(),0===(c=A(n,0,t)))l[a]=0,++a;else if(c<=s)for(var u=1+(1<<c)+t.readBits(c);--u;){if(a>=e)throw new Error("[DecodeContextMap] i >= context_map_size");l[a]=0,++a}else l[a]=c-s,++a}return t.readBits(1)&&function(e,t){var n,a=new Uint8Array(256);for(n=0;n<256;++n)a[n]=n;for(n=0;n<t;++n){var r=e[n];e[n]=a[r],r&&F(a,r)}}(l,e),r}function V(e,t,n,a,r,s,i){var o,l=2*n,c=n,u=A(t,n*E,i);(o=0===u?r[l+(1&s[c])]:1===u?r[l+(s[c]-1&1)]+1:u-2)>=e&&(o-=e),a[n]=o,r[l+(1&s[c])]=o,++s[c]}function z(e,t,n,a,r,i){var o,l=r+1,c=n&r,u=i.pos_&s.IBUF_MASK;if(t<8||i.bit_pos_+(t<<3)<i.bit_end_pos_)for(;t-- >0;)i.readMoreInput(),a[c++]=i.readBits(8),c===l&&(e.write(a,l),c=0);else{if(i.bit_end_pos_<32)throw new Error("[CopyUncompressedBlockToOutput] br.bit_end_pos_ < 32");for(;i.bit_pos_<32;)a[c]=i.val_>>>i.bit_pos_,i.bit_pos_+=8,++c,--t;if(u+(o=i.bit_end_pos_-i.bit_pos_>>3)>s.IBUF_MASK){for(var d=s.IBUF_MASK+1-u,m=0;m<d;m++)a[c+m]=i.buf_[u+m];o-=d,c+=d,t-=d,u=0}for(m=0;m<o;m++)a[c+m]=i.buf_[u+m];if(t-=o,(c+=o)>=l)for(e.write(a,l),c-=l,m=0;m<c;m++)a[m]=a[l+m];for(;c+t>=l;){if(o=l-c,i.input_.read(a,c,o)<o)throw new Error("[CopyUncompressedBlockToOutput] not enough bytes");e.write(a,l),t-=o,c=0}if(i.input_.read(a,c,t)<t)throw new Error("[CopyUncompressedBlockToOutput] not enough bytes");i.reset()}}function G(e){var t=e.bit_pos_+7&-8;return 0==e.readBits(t-e.bit_pos_)}function H(e){var t=new a(e),n=new s(t);return P(n),M(n).meta_block_length}function U(e,t){var n,a,r,l,m,p,_,b,w,x,C=0,k=0,T=0,I=[16,15,11,4],F=0,H=0,U=0,W=[new B(0,0),new B(0,0),new B(0,0)],j=128+s.READ_SIZE;a=(1<<(x=P(w=new s(e))))-16,l=(r=1<<x)-1,m=new Uint8Array(r+j+i.maxDictionaryWordLength),p=r,_=[],b=[];for(var Z=0;Z<3*E;Z++)_[Z]=new o(0,0),b[Z]=new o(0,0);for(;!k;){var q,Y,K,X,J,Q,$,ee,te,ne=0,ae=[1<<28,1<<28,1<<28],re=[0],se=[1,1,1],ie=[0,1,0,1,0,1],oe=[0],le=null,ce=null,ue=null,de=null,me=0,pe=null,he=0,fe=0,ge=0;for(n=0;n<3;++n)W[n].codes=null,W[n].htrees=null;w.readMoreInput();var ye=M(w);if(C+(ne=ye.meta_block_length)>t.buffer.length){var ve=new Uint8Array(C+ne);ve.set(t.buffer),t.buffer=ve}if(k=ye.input_end,q=ye.is_uncompressed,ye.is_metadata)for(G(w);ne>0;--ne)w.readMoreInput(),w.readBits(8);else if(0!==ne)if(q)w.bit_pos_=w.bit_pos_+7&-8,z(t,ne,C,m,l,w),C+=ne;else{for(n=0;n<3;++n)se[n]=N(w)+1,se[n]>=2&&(O(se[n]+2,_,n*E,w),O(g,b,n*E,w),ae[n]=R(b,n*E,w),oe[n]=1);for(w.readMoreInput(),X=(1<<(Y=w.readBits(2)))-1,J=(K=S+(w.readBits(4)<<Y))+(48<<Y),ce=new Uint8Array(se[0]),n=0;n<se[0];++n)w.readMoreInput(),ce[n]=w.readBits(2)<<1;var _e=L(se[0]<<y,w);Q=_e.num_htrees,le=_e.context_map;var be=L(se[2]<<v,w);for($=be.num_htrees,ue=be.context_map,W[0]=new B(h,Q),W[1]=new B(f,se[1]),W[2]=new B(J,$),n=0;n<3;++n)W[n].decode(w);for(de=0,pe=0,ee=ce[re[0]],fe=c.lookupOffsets[ee],ge=c.lookupOffsets[ee+1],te=W[1].htrees[0];ne>0;){var Ee,we,xe,Se,Ce,ke,Te,Pe,Ne,Ie,Me,Ae;for(w.readMoreInput(),0===ae[1]&&(V(se[1],_,1,re,ie,oe,w),ae[1]=R(b,E,w),te=W[1].htrees[re[1]]),--ae[1],(we=(Ee=A(W[1].codes,te,w))>>6)>=2?(we-=2,Te=-1):Te=0,xe=u.kInsertRangeLut[we]+(Ee>>3&7),Se=u.kCopyRangeLut[we]+(7&Ee),Ce=u.kInsertLengthPrefixCode[xe].offset+w.readBits(u.kInsertLengthPrefixCode[xe].nbits),ke=u.kCopyLengthPrefixCode[Se].offset+w.readBits(u.kCopyLengthPrefixCode[Se].nbits),H=m[C-1&l],U=m[C-2&l],Ne=0;Ne<Ce;++Ne)w.readMoreInput(),0===ae[0]&&(V(se[0],_,0,re,ie,oe,w),ae[0]=R(b,0,w),de=re[0]<<y,ee=ce[re[0]],fe=c.lookupOffsets[ee],ge=c.lookupOffsets[ee+1]),me=le[de+(c.lookup[fe+H]|c.lookup[ge+U])],--ae[0],U=H,H=A(W[0].codes,W[0].htrees[me],w),m[C&l]=H,(C&l)===l&&t.write(m,r),++C;if((ne-=Ce)<=0)break;if(Te<0&&(w.readMoreInput(),0===ae[2]&&(V(se[2],_,2,re,ie,oe,w),ae[2]=R(b,2*E,w),pe=re[2]<<v),--ae[2],he=ue[pe+(255&(ke>4?3:ke-2))],(Te=A(W[2].codes,W[2].htrees[he],w))>=K&&(Ae=(Te-=K)&X,Te=K+((Oe=(2+(1&(Te>>=Y))<<(Me=1+(Te>>1)))-4)+w.readBits(Me)<<Y)+Ae)),(Pe=D(Te,I,F))<0)throw new Error("[BrotliDecompress] invalid distance");if(Ie=C&l,Pe>(T=C<a&&T!==a?C:a)){if(!(ke>=i.minDictionaryWordLength&&ke<=i.maxDictionaryWordLength))throw new Error("Invalid backward reference. pos: "+C+" distance: "+Pe+" len: "+ke+" bytes left: "+ne);var Oe=i.offsetsByLength[ke],Re=Pe-T-1,De=i.sizeBitsByLength[ke],Fe=Re>>De;if(Oe+=(Re&(1<<De)-1)*ke,!(Fe<d.kNumTransforms))throw new Error("Invalid backward reference. pos: "+C+" distance: "+Pe+" len: "+ke+" bytes left: "+ne);var Be=d.transformDictionaryWord(m,Ie,Oe,ke,Fe);if(C+=Be,ne-=Be,(Ie+=Be)>=p){t.write(m,r);for(var _x=0;_x<Ie-p;_x++)m[_x]=m[p+_x]}}else{if(Te>0&&(I[3&F]=Pe,++F),ke>ne)throw new Error("Invalid backward reference. pos: "+C+" distance: "+Pe+" len: "+ke+" bytes left: "+ne);for(Ne=0;Ne<ke;++Ne)m[C&l]=m[C-Pe&l],(C&l)===l&&t.write(m,r),++C,--ne}H=m[C-1&l],U=m[C-2&l]}C&=1073741823}}t.write(m,C&l)}B.prototype.decode=function(e){var t,n=0;for(t=0;t<this.num_htrees;++t)this.htrees[t]=n,n+=O(this.alphabet_size,this.codes,n,e)},n.BrotliDecompressedSize=H,n.BrotliDecompressBuffer=function(e,t){var n=new a(e);null==t&&(t=H(e));var s=new Uint8Array(t),i=new r(s);return U(n,i),i.pos<i.buffer.length&&(i.buffer=i.buffer.subarray(0,i.pos)),i.buffer},n.BrotliDecompress=U,i.init()},{"./bit_reader":1,"./context":2,"./dictionary":6,"./huffman":7,"./prefix":9,"./streams":10,"./transform":11}],4:[function(e,t,n){var a=e("base64-js");n.init=function(){return(0,e("./decode").BrotliDecompressBuffer)(a.toByteArray(e("./dictionary.bin.js")))}},{"./decode":3,"./dictionary.bin.js":5,"base64-js":8}],5:[function(e,t,n){t.exports="W5/fcQLn5gKf2XUbAiQ1XULX+TZz6ADToDsgqk6qVfeC0e4m6OO2wcQ1J76ZBVRV1fRkEsdu//62zQsFEZWSTCnMhcsQKlS2qOhuVYYMGCkV0fXWEoMFbESXrKEZ9wdUEsyw9g4bJlEt1Y6oVMxMRTEVbCIwZzJzboK5j8m4YH02qgXYhv1V+PM435sLVxyHJihaJREEhZGqL03txGFQLm76caGO/ovxKvzCby/3vMTtX/459f0igi7WutnKiMQ6wODSoRh/8Lx1V3Q99MvKtwB6bHdERYRY0hStJoMjNeTsNX7bn+Y7e4EQ3bf8xBc7L0BsyfFPK43dGSXpL6clYC/I328h54/VYrQ5i0648FgbGtl837svJ35L3Mot/+nPlNpWgKx1gGXQYqX6n+bbZ7wuyCHKcUok12Xjqub7NXZGzqBx0SD+uziNf87t7ve42jxSKQoW3nyxVrWIGlFShhCKxjpZZ5MeGna0+lBkk+kaN8F9qFBAFgEogyMBdcX/T1W/WnMOi/7ycWUQloEBKGeC48Mkiwq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sLy/9/kAtQ+/wKH+hI/IROWj5FPvTZAT9f7j4ZXQyG4M0TujMAFXYkKvEHv1xhySekgXGGqNxWeWKlf8dDAlLuB1cb/qOD+rk7cmwt+1yKpk9cudqBanTi6zTbXRtV8qylNtjyOVKy1HTz0GW9rjt6sSjAZcT5R+KdtyYb0zyqG9pSLuCw5WBwAn7fjBjKLLoxLXMI+52L9cLwIR2B6OllJZLHJ8vDxmWdtF+QJnmt1rsHPIWY20lftk8fYePkAIg6Hgn532QoIpegMxiWgAOfe5/U44APR8Ac0NeZrVh3gEhs12W+tVSiWiUQekf/YBECUy5fdYbA08dd7VzPAP9aiVcIB9k6tY7WdJ1wNV+bHeydNtmC6G5ICtFC1ZwmJU/j8hf0I8TRVKSiz5oYIa93EpUI78X8GYIAZabx47/n8LDAAJ0nNtP1rpROprqKMBRecShca6qXuTSI3jZBLOB3Vp381B5rCGhjSvh/NSVkYp2qIdP/Bg="},{}],6:[function(e,t,n){var a=e("./dictionary-browser");n.init=function(){n.dictionary=a.init()},n.offsetsByLength=new Uint32Array([0,0,0,0,0,4096,9216,21504,35840,44032,53248,63488,74752,87040,93696,100864,104704,106752,108928,113536,115968,118528,119872,121280,122016]),n.sizeBitsByLength=new Uint8Array([0,0,0,0,10,10,11,11,10,10,10,10,10,9,9,8,7,7,8,7,7,6,6,5,5]),n.minDictionaryWordLength=4,n.maxDictionaryWordLength=24},{"./dictionary-browser":4}],7:[function(e,t,n){function a(e,t){this.bits=e,this.value=t}n.HuffmanCode=a;var r=15;function s(e,t){for(var n=1<<t-1;e&n;)n>>=1;return(e&n-1)+n}function i(e,t,n,r,s){do{e[t+(r-=n)]=new a(s.bits,s.value)}while(r>0)}function o(e,t,n){for(var a=1<<t-n;t<r&&!((a-=e[t])<=0);)++t,a<<=1;return t-n}n.BrotliBuildHuffmanTable=function(e,t,n,l,c){var u,d,m,p,h,f,g,y,v,_,b=t,E=new Int32Array(16),w=new Int32Array(16);for(_=new Int32Array(c),d=0;d<c;d++)E[l[d]]++;for(w[1]=0,u=1;u<r;u++)w[u+1]=w[u]+E[u];for(d=0;d<c;d++)0!==l[d]&&(_[w[l[d]]++]=d);if(v=y=1<<(g=n),1===w[15]){for(m=0;m<v;++m)e[t+m]=new a(0,65535&_[0]);return v}for(m=0,d=0,u=1,p=2;u<=n;++u,p<<=1)for(;E[u]>0;--E[u])i(e,t+m,p,y,new a(255&u,65535&_[d++])),m=s(m,u);for(f=v-1,h=-1,u=n+1,p=2;u<=r;++u,p<<=1)for(;E[u]>0;--E[u])(m&f)!==h&&(t+=y,v+=y=1<<(g=o(E,u,n)),e[b+(h=m&f)]=new a(g+n&255,t-b-h&65535)),i(e,t+(m>>n),p,y,new a(u-n&255,65535&_[d++])),m=s(m,u);return v}},{}],8:[function(e,t,n){"use strict";n.byteLength=function(e){var t=l(e),n=t[0],a=t[1];return 3*(n+a)/4-a},n.toByteArray=function(e){for(var t,n=l(e),a=n[0],i=n[1],o=new s(function(e,t,n){return 3*(t+n)/4-n}(0,a,i)),c=0,u=i>0?a-4:a,d=0;d<u;d+=4)t=r[e.charCodeAt(d)]<<18|r[e.charCodeAt(d+1)]<<12|r[e.charCodeAt(d+2)]<<6|r[e.charCodeAt(d+3)],o[c++]=t>>16&255,o[c++]=t>>8&255,o[c++]=255&t;return 2===i&&(t=r[e.charCodeAt(d)]<<2|r[e.charCodeAt(d+1)]>>4,o[c++]=255&t),1===i&&(t=r[e.charCodeAt(d)]<<10|r[e.charCodeAt(d+1)]<<4|r[e.charCodeAt(d+2)]>>2,o[c++]=t>>8&255,o[c++]=255&t),o},n.fromByteArray=function(e){for(var t,n=e.length,r=n%3,s=[],i=16383,o=0,l=n-r;o<l;o+=i)s.push(c(e,o,o+i>l?l:o+i));return 1===r?(t=e[n-1],s.push(a[t>>2]+a[t<<4&63]+"==")):2===r&&(t=(e[n-2]<<8)+e[n-1],s.push(a[t>>10]+a[t>>4&63]+a[t<<2&63]+"=")),s.join("")};for(var a=[],r=[],s="undefined"!=typeof Uint8Array?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0;o<64;++o)a[o]=i[o],r[i.charCodeAt(o)]=o;function l(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function c(e,t,n){for(var r,s=[],i=t;i<n;i+=3)r=(e[i]<<16&16711680)+(e[i+1]<<8&65280)+(255&e[i+2]),s.push(a[(o=r)>>18&63]+a[o>>12&63]+a[o>>6&63]+a[63&o]);var o;return s.join("")}r["-".charCodeAt(0)]=62,r["_".charCodeAt(0)]=63},{}],9:[function(e,t,n){function a(e,t){this.offset=e,this.nbits=t}n.kBlockLengthPrefixCode=[new a(1,2),new a(5,2),new a(9,2),new a(13,2),new a(17,3),new a(25,3),new a(33,3),new a(41,3),new a(49,4),new a(65,4),new a(81,4),new a(97,4),new a(113,5),new a(145,5),new a(177,5),new a(209,5),new a(241,6),new a(305,6),new a(369,7),new a(497,8),new a(753,9),new a(1265,10),new a(2289,11),new a(4337,12),new a(8433,13),new a(16625,24)],n.kInsertLengthPrefixCode=[new a(0,0),new a(1,0),new a(2,0),new a(3,0),new a(4,0),new a(5,0),new a(6,1),new a(8,1),new a(10,2),new a(14,2),new a(18,3),new a(26,3),new a(34,4),new a(50,4),new a(66,5),new a(98,5),new a(130,6),new a(194,7),new a(322,8),new a(578,9),new a(1090,10),new a(2114,12),new a(6210,14),new a(22594,24)],n.kCopyLengthPrefixCode=[new a(2,0),new a(3,0),new a(4,0),new a(5,0),new a(6,0),new a(7,0),new a(8,0),new a(9,0),new a(10,1),new a(12,1),new a(14,2),new a(18,2),new a(22,3),new a(30,3),new a(38,4),new a(54,4),new a(70,5),new a(102,5),new a(134,6),new a(198,7),new a(326,8),new a(582,9),new a(1094,10),new a(2118,24)],n.kInsertRangeLut=[0,0,8,8,0,16,8,16,16],n.kCopyRangeLut=[0,8,0,8,16,0,16,8,16]},{}],10:[function(e,t,n){function a(e){this.buffer=e,this.pos=0}function r(e){this.buffer=e,this.pos=0}a.prototype.read=function(e,t,n){this.pos+n>this.buffer.length&&(n=this.buffer.length-this.pos);for(var a=0;a<n;a++)e[t+a]=this.buffer[this.pos+a];return this.pos+=n,n},n.BrotliInput=a,r.prototype.write=function(e,t){if(this.pos+t>this.buffer.length)throw new Error("Output buffer is not large enough");return this.buffer.set(e.subarray(0,t),this.pos),this.pos+=t,t},n.BrotliOutput=r},{}],11:[function(e,t,n){var a=e("./dictionary"),r=10,s=11;function i(e,t,n){this.prefix=new Uint8Array(e.length),this.transform=t,this.suffix=new Uint8Array(n.length);for(var a=0;a<e.length;a++)this.prefix[a]=e.charCodeAt(a);for(a=0;a<n.length;a++)this.suffix[a]=n.charCodeAt(a)}var o=[new i("",0,""),new i("",0," "),new i(" ",0," "),new i("",12,""),new i("",r," "),new i("",0," the "),new i(" ",0,""),new i("s ",0," "),new i("",0," of "),new i("",r,""),new i("",0," and "),new i("",13,""),new i("",1,""),new i(", ",0," "),new i("",0,", "),new i(" ",r," "),new i("",0," in "),new i("",0," to "),new i("e ",0," "),new i("",0,'"'),new i("",0,"."),new i("",0,'">'),new i("",0,"\n"),new i("",3,""),new i("",0,"]"),new i("",0," for "),new i("",14,""),new i("",2,""),new i("",0," a "),new i("",0," that "),new i(" ",r,""),new i("",0,". "),new i(".",0,""),new i(" ",0,", "),new i("",15,""),new i("",0," with "),new i("",0,"'"),new i("",0," from "),new i("",0," by "),new i("",16,""),new i("",17,""),new i(" the ",0,""),new i("",4,""),new i("",0,". The "),new i("",s,""),new i("",0," on "),new i("",0," as "),new i("",0," is "),new i("",7,""),new i("",1,"ing "),new i("",0,"\n\t"),new i("",0,":"),new i(" ",0,". "),new i("",0,"ed "),new i("",20,""),new i("",18,""),new i("",6,""),new i("",0,"("),new i("",r,", "),new i("",8,""),new i("",0," at "),new i("",0,"ly "),new i(" the ",0," of "),new i("",5,""),new i("",9,""),new i(" ",r,", "),new i("",r,'"'),new i(".",0,"("),new i("",s," "),new i("",r,'">'),new i("",0,'="'),new i(" ",0,"."),new i(".com/",0,""),new i(" the ",0," of the "),new i("",r,"'"),new i("",0,". This "),new i("",0,","),new i(".",0," "),new i("",r,"("),new i("",r,"."),new i("",0," not "),new i(" ",0,'="'),new i("",0,"er "),new i(" ",s," "),new i("",0,"al "),new i(" ",s,""),new i("",0,"='"),new i("",s,'"'),new i("",r,". "),new i(" ",0,"("),new i("",0,"ful "),new i(" ",r,". "),new i("",0,"ive "),new i("",0,"less "),new i("",s,"'"),new i("",0,"est "),new i(" ",r,"."),new i("",s,'">'),new i(" ",0,"='"),new i("",r,","),new i("",0,"ize "),new i("",s,"."),new i(" ",0,""),new i(" ",0,","),new i("",r,'="'),new i("",s,'="'),new i("",0,"ous "),new i("",s,", "),new i("",r,"='"),new i(" ",r,","),new i(" ",s,'="'),new i(" ",s,", "),new i("",s,","),new i("",s,"("),new i("",s,". "),new i(" ",s,"."),new i("",s,"='"),new i(" ",s,". "),new i(" ",r,'="'),new i(" ",s,"='"),new i(" ",r,"='")];function l(e,t){return e[t]<192?(e[t]>=97&&e[t]<=122&&(e[t]^=32),1):e[t]<224?(e[t+1]^=32,2):(e[t+2]^=5,3)}n.kTransforms=o,n.kNumTransforms=o.length,n.transformDictionaryWord=function(e,t,n,i,c){var u,d=o[c].prefix,m=o[c].suffix,p=o[c].transform,h=p<12?0:p-11,f=0,g=t;h>i&&(h=i);for(var y=0;y<d.length;)e[t++]=d[y++];for(n+=h,i-=h,p<=9&&(i-=p),f=0;f<i;f++)e[t++]=a.dictionary[n+f];if(u=t-i,p===r)l(e,u);else if(p===s)for(;i>0;){var v=l(e,u);u+=v,i-=v}for(var _=0;_<m.length;)e[t++]=m[_++];return t-g}},{"./dictionary":6}],12:[function(e,t,n){t.exports=e("./dec/decode").BrotliDecompressBuffer},{"./dec/decode":3}]},{},[12])(12)},9196:function(e){"use strict";e.exports=window.React}},t={};function n(a){var r=t[a];if(void 0!==r)return r.exports;var s=t[a]={exports:{}};return e[a].call(s.exports,s,s.exports,n),s.exports}n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var a in t)n.o(t,a)&&!n.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var a={};!function(){"use strict";n.r(a),n.d(a,{PluginMoreMenuItem:function(){return aE},PluginSidebar:function(){return tE},PluginSidebarMoreMenuItem:function(){return nE},PluginTemplateSettingPanel:function(){return rg},initializeEditor:function(){return rE},reinitializeEditor:function(){return sE},store:function(){return ia}});var e={};n.r(e),n.d(e,{closeModal:function(){return B},disableComplementaryArea:function(){return I},enableComplementaryArea:function(){return N},openModal:function(){return F},pinItem:function(){return M},setDefaultComplementaryArea:function(){return P},setFeatureDefaults:function(){return D},setFeatureValue:function(){return R},toggleFeature:function(){return O},unpinItem:function(){return A}});var t={};n.r(t),n.d(t,{getActiveComplementaryArea:function(){return L},isComplementaryAreaLoading:function(){return V},isFeatureActive:function(){return G},isItemPinned:function(){return z},isModalActive:function(){return H}});var r={};n.r(r),n.d(r,{__experimentalSetPreviewDeviceType:function(){return ln},addTemplate:function(){return un},closeGeneralSidebar:function(){return Pn},openGeneralSidebar:function(){return Tn},openNavigationPanelToMenu:function(){return bn},removeTemplate:function(){return dn},revertTemplate:function(){return kn},setEditedEntity:function(){return hn},setEditedPostContext:function(){return gn},setHasPageContentFocus:function(){return In},setHomeTemplateId:function(){return fn},setIsInserterOpened:function(){return wn},setIsListViewOpened:function(){return xn},setIsNavigationPanelOpened:function(){return En},setIsSaveViewOpened:function(){return Cn},setNavigationMenu:function(){return pn},setNavigationPanelActiveMenu:function(){return vn},setPage:function(){return yn},setTemplate:function(){return cn},setTemplatePart:function(){return mn},switchEditorMode:function(){return Nn},toggleDistractionFree:function(){return Mn},toggleFeature:function(){return on},updateSettings:function(){return Sn}});var s={};n.r(s),n.d(s,{setCanvasMode:function(){return An},setEditorCanvasContainerView:function(){return On}});var i={};n.r(i),n.d(i,{__experimentalGetInsertionPoint:function(){return qn},__experimentalGetPreviewDeviceType:function(){return Bn},getCanUserCreateMedia:function(){return Ln},getCurrentTemplateNavigationPanelSubMenu:function(){return Qn},getCurrentTemplateTemplateParts:function(){return Xn},getEditedPostContext:function(){return Wn},getEditedPostId:function(){return Un},getEditedPostType:function(){return Hn},getEditorMode:function(){return Jn},getHomeTemplateId:function(){return Gn},getNavigationPanelActiveMenu:function(){return $n},getPage:function(){return jn},getReusableBlocks:function(){return Vn},getSettings:function(){return zn},hasPageContentFocus:function(){return na},isFeatureActive:function(){return Fn},isInserterOpened:function(){return Zn},isListViewOpened:function(){return Yn},isNavigationOpened:function(){return ea},isPage:function(){return ta},isSaveViewOpened:function(){return Kn}});var o={};n.r(o),n.d(o,{getCanvasMode:function(){return aa},getEditorCanvasContainerView:function(){return ra}});var l=n(9196),c=window.wp.blocks,u=window.wp.blockLibrary,d=window.wp.data,m=window.wp.deprecated,h=n.n(m),f=window.wp.element,g=window.wp.editor,y=n(4403),v=n.n(y),_=window.wp.components,b=window.wp.i18n,E=window.wp.primitives,w=(0,l.createElement)(E.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(E.Path,{d:"M16.7 7.1l-6.3 8.5-3.3-2.5-.9 1.2 4.5 3.4L17.9 8z"})),x=(0,l.createElement)(E.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(E.Path,{d:"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"})),S=(0,l.createElement)(E.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(E.Path,{fillRule:"evenodd",d:"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",clipRule:"evenodd"})),C=window.wp.viewport,k=window.wp.preferences,T=(0,l.createElement)(E.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(E.Path,{d:"M12 13.06l3.712 3.713 1.061-1.06L13.061 12l3.712-3.712-1.06-1.06L12 10.938 8.288 7.227l-1.061 1.06L10.939 12l-3.712 3.712 1.06 1.061L12 13.061z"}));const P=(e,t)=>({type:"SET_DEFAULT_COMPLEMENTARY_AREA",scope:e,area:t}),N=(e,t)=>({registry:n,dispatch:a})=>{t&&(n.select(k.store).get(e,"isComplementaryAreaVisible")||n.dispatch(k.store).set(e,"isComplementaryAreaVisible",!0),a({type:"ENABLE_COMPLEMENTARY_AREA",scope:e,area:t}))},I=e=>({registry:t})=>{t.select(k.store).get(e,"isComplementaryAreaVisible")&&t.dispatch(k.store).set(e,"isComplementaryAreaVisible",!1)},M=(e,t)=>({registry:n})=>{if(!t)return;const a=n.select(k.store).get(e,"pinnedItems");!0!==a?.[t]&&n.dispatch(k.store).set(e,"pinnedItems",{...a,[t]:!0})},A=(e,t)=>({registry:n})=>{if(!t)return;const a=n.select(k.store).get(e,"pinnedItems");n.dispatch(k.store).set(e,"pinnedItems",{...a,[t]:!1})};function O(e,t){return function({registry:n}){h()("dispatch( 'core/interface' ).toggleFeature",{since:"6.0",alternative:"dispatch( 'core/preferences' ).toggle"}),n.dispatch(k.store).toggle(e,t)}}function R(e,t,n){return function({registry:a}){h()("dispatch( 'core/interface' ).setFeatureValue",{since:"6.0",alternative:"dispatch( 'core/preferences' ).set"}),a.dispatch(k.store).set(e,t,!!n)}}function D(e,t){return function({registry:n}){h()("dispatch( 'core/interface' ).setFeatureDefaults",{since:"6.0",alternative:"dispatch( 'core/preferences' ).setDefaults"}),n.dispatch(k.store).setDefaults(e,t)}}function F(e){return{type:"OPEN_MODAL",name:e}}function B(){return{type:"CLOSE_MODAL"}}const L=(0,d.createRegistrySelector)((e=>(t,n)=>{const a=e(k.store).get(n,"isComplementaryAreaVisible");if(void 0!==a)return!1===a?null:t?.complementaryAreas?.[n]})),V=(0,d.createRegistrySelector)((e=>(t,n)=>{const a=e(k.store).get(n,"isComplementaryAreaVisible"),r=t?.complementaryAreas?.[n];return a&&void 0===r})),z=(0,d.createRegistrySelector)((e=>(t,n,a)=>{var r;const s=e(k.store).get(n,"pinnedItems");return null===(r=s?.[a])||void 0===r||r})),G=(0,d.createRegistrySelector)((e=>(t,n,a)=>(h()("select( 'core/interface' ).isFeatureActive( scope, featureName )",{since:"6.0",alternative:"select( 'core/preferences' ).get( scope, featureName )"}),!!e(k.store).get(n,a))));function H(e,t){return e.activeModal===t}var U=(0,d.combineReducers)({complementaryAreas:function(e={},t){switch(t.type){case"SET_DEFAULT_COMPLEMENTARY_AREA":{const{scope:n,area:a}=t;return e[n]?e:{...e,[n]:a}}case"ENABLE_COMPLEMENTARY_AREA":{const{scope:n,area:a}=t;return{...e,[n]:a}}}return e},activeModal:function(e=null,t){switch(t.type){case"OPEN_MODAL":return t.name;case"CLOSE_MODAL":return null}return e}});const W=(0,d.createReduxStore)("core/interface",{reducer:U,actions:e,selectors:t});(0,d.register)(W);var j=window.wp.plugins,Z=(0,j.withPluginContext)(((e,t)=>({icon:t.icon||e.icon,identifier:t.identifier||`${e.name}/${t.name}`}))),q=Z((function({as:e=_.Button,scope:t,identifier:n,icon:a,selectedIcon:r,name:s,...i}){const o=e,c=(0,d.useSelect)((e=>e(W).getActiveComplementaryArea(t)===n),[n,t]),{enableComplementaryArea:u,disableComplementaryArea:m}=(0,d.useDispatch)(W);return(0,l.createElement)(o,{icon:r&&c?r:a,"aria-controls":n.replace("/",":"),onClick:()=>{c?m(t):u(t,n)},...i})})),Y=({smallScreenTitle:e,children:t,className:n,toggleButtonProps:a})=>{const r=(0,l.createElement)(q,{icon:T,...a});return(0,l.createElement)(l.Fragment,null,(0,l.createElement)("div",{className:"components-panel__header interface-complementary-area-header__small"},e&&(0,l.createElement)("span",{className:"interface-complementary-area-header__small-title"},e),r),(0,l.createElement)("div",{className:v()("components-panel__header","interface-complementary-area-header",n),tabIndex:-1},t,r))};const K=()=>{};function X({name:e,as:t=_.Button,onClick:n,...a}){return(0,l.createElement)(_.Fill,{name:e},(({onClick:e})=>(0,l.createElement)(t,{onClick:n||e?(...t)=>{(n||K)(...t),(e||K)(...t)}:void 0,...a})))}X.Slot=function({name:e,as:t=_.ButtonGroup,fillProps:n={},bubblesVirtually:a,...r}){return(0,l.createElement)(_.Slot,{name:e,bubblesVirtually:a,fillProps:n},(e=>{if(!f.Children.toArray(e).length)return null;const n=[];f.Children.forEach(e,(({props:{__unstableExplicitMenuItem:e,__unstableTarget:t}})=>{t&&e&&n.push(t)}));const a=f.Children.map(e,(e=>!e.props.__unstableExplicitMenuItem&&n.includes(e.props.__unstableTarget)?null:e));return(0,l.createElement)(t,{...r},a)}))};var J=X;const Q=({__unstableExplicitMenuItem:e,__unstableTarget:t,...n})=>(0,l.createElement)(_.MenuItem,{...n});function $({scope:e,target:t,__unstableExplicitMenuItem:n,...a}){return(0,l.createElement)(q,{as:a=>(0,l.createElement)(J,{__unstableExplicitMenuItem:n,__unstableTarget:`${e}/${t}`,as:Q,name:`${e}/plugin-more-menu`,...a}),role:"menuitemcheckbox",selectedIcon:w,name:t,scope:e,...a})}function ee({scope:e,...t}){return(0,l.createElement)(_.Fill,{name:`PinnedItems/${e}`,...t})}ee.Slot=function({scope:e,className:t,...n}){return(0,l.createElement)(_.Slot,{name:`PinnedItems/${e}`,...n},(e=>e?.length>0&&(0,l.createElement)("div",{className:v()(t,"interface-pinned-items")},e)))};var te=ee;function ne({scope:e,children:t,className:n,id:a}){return(0,l.createElement)(_.Fill,{name:`ComplementaryArea/${e}`},(0,l.createElement)("div",{id:a,className:n},t))}const ae=Z((function({children:e,className:t,closeLabel:n=(0,b.__)("Close plugin"),identifier:a,header:r,headerClassName:s,icon:i,isPinnable:o=!0,panelClassName:c,scope:u,name:m,smallScreenTitle:p,title:h,toggleShortcut:g,isActiveByDefault:y}){const{isLoading:E,isActive:T,isPinned:P,activeArea:N,isSmall:I,isLarge:M,showIconLabels:A}=(0,d.useSelect)((e=>{const{getActiveComplementaryArea:t,isComplementaryAreaLoading:n,isItemPinned:r}=e(W),{get:s}=e(k.store),i=t(u);return{isLoading:n(u),isActive:i===a,isPinned:r(u,a),activeArea:i,isSmall:e(C.store).isViewportMatch("< medium"),isLarge:e(C.store).isViewportMatch("large"),showIconLabels:s("core","showIconLabels")}}),[a,u]);!function(e,t,n,a,r){const s=(0,f.useRef)(!1),i=(0,f.useRef)(!1),{enableComplementaryArea:o,disableComplementaryArea:l}=(0,d.useDispatch)(W);(0,f.useEffect)((()=>{a&&r&&!s.current?(l(e),i.current=!0):i.current&&!r&&s.current?(i.current=!1,o(e,t)):i.current&&n&&n!==t&&(i.current=!1),r!==s.current&&(s.current=r)}),[a,r,e,t,n,l,o])}(u,a,N,T,I);const{enableComplementaryArea:O,disableComplementaryArea:R,pinItem:D,unpinItem:F}=(0,d.useDispatch)(W);return(0,f.useEffect)((()=>{y&&void 0===N&&!I?O(u,a):void 0===N&&I&&R(u,a)}),[N,y,u,a,I,O,R]),(0,l.createElement)(l.Fragment,null,o&&(0,l.createElement)(te,{scope:u},P&&(0,l.createElement)(q,{scope:u,identifier:a,isPressed:T&&(!A||M),"aria-expanded":T,"aria-disabled":E,label:h,icon:A?w:i,showTooltip:!A,variant:A?"tertiary":void 0,size:"compact"})),m&&o&&(0,l.createElement)($,{target:m,scope:u,icon:i},h),T&&(0,l.createElement)(ne,{className:v()("interface-complementary-area",t),scope:u,id:a.replace("/",":")},(0,l.createElement)(Y,{className:s,closeLabel:n,onClose:()=>R(u),smallScreenTitle:p,toggleButtonProps:{label:n,shortcut:g,scope:u,identifier:a}},r||(0,l.createElement)(l.Fragment,null,(0,l.createElement)("strong",null,h),o&&(0,l.createElement)(_.Button,{className:"interface-complementary-area__pin-unpin-item",icon:P?x:S,label:P?(0,b.__)("Unpin from toolbar"):(0,b.__)("Pin to toolbar"),onClick:()=>(P?F:D)(u,a),isPressed:P,"aria-expanded":P}))),(0,l.createElement)(_.Panel,{className:c},e)))}));ae.Slot=function({scope:e,...t}){return(0,l.createElement)(_.Slot,{name:`ComplementaryArea/${e}`,...t})};var re=ae,se=window.wp.compose;function ie({children:e,className:t,ariaLabel:n,as:a="div",...r}){return(0,l.createElement)(a,{className:v()("interface-navigable-region",t),"aria-label":n,role:"region",tabIndex:"-1",...r},e)}const oe={hidden:{opacity:0},hover:{opacity:1,transition:{type:"tween",delay:.2,delayChildren:.2}},distractionFreeInactive:{opacity:1,transition:{delay:0}}};var le=(0,f.forwardRef)((function({isDistractionFree:e,footer:t,header:n,editorNotices:a,sidebar:r,secondarySidebar:s,notices:i,content:o,actions:c,labels:u,className:d,enableRegionNavigation:m=!0,shortcuts:p},h){const g=(0,_.__unstableUseNavigateRegions)(p);!function(e){(0,f.useEffect)((()=>{const t=document&&document.querySelector(`html:not(.${e})`);if(t)return t.classList.toggle(e),()=>{t.classList.toggle(e)}}),[e])}("interface-interface-skeleton__html-container");const y={
/* translators: accessibility text for the top bar landmark region. */
header:(0,b.__)("Header"),
/* translators: accessibility text for the content landmark region. */
body:(0,b.__)("Content"),
/* translators: accessibility text for the secondary sidebar landmark region. */
secondarySidebar:(0,b.__)("Block Library"),
/* translators: accessibility text for the settings landmark region. */
sidebar:(0,b.__)("Settings"),
/* translators: accessibility text for the publish landmark region. */
actions:(0,b.__)("Publish"),
/* translators: accessibility text for the footer landmark region. */
footer:(0,b.__)("Footer"),...u};return(0,l.createElement)("div",{...m?g:{},ref:(0,se.useMergeRefs)([h,m?g.ref:void 0]),className:v()(d,"interface-interface-skeleton",g.className,!!t&&"has-footer")},(0,l.createElement)("div",{className:"interface-interface-skeleton__editor"},!!n&&(0,l.createElement)(ie,{as:_.__unstableMotion.div,className:"interface-interface-skeleton__header","aria-label":y.header,initial:e?"hidden":"distractionFreeInactive",whileHover:e?"hover":"distractionFreeInactive",animate:e?"hidden":"distractionFreeInactive",variants:oe,transition:e?{type:"tween",delay:.8}:void 0},n),e&&(0,l.createElement)("div",{className:"interface-interface-skeleton__header"},a),(0,l.createElement)("div",{className:"interface-interface-skeleton__body"},!!s&&(0,l.createElement)(ie,{className:"interface-interface-skeleton__secondary-sidebar",ariaLabel:y.secondarySidebar},s),!!i&&(0,l.createElement)("div",{className:"interface-interface-skeleton__notices"},i),(0,l.createElement)(ie,{className:"interface-interface-skeleton__content",ariaLabel:y.body},o),!!r&&(0,l.createElement)(ie,{className:"interface-interface-skeleton__sidebar",ariaLabel:y.sidebar},r),!!c&&(0,l.createElement)(ie,{className:"interface-interface-skeleton__actions",ariaLabel:y.actions},c))),!!t&&(0,l.createElement)(ie,{className:"interface-interface-skeleton__footer",ariaLabel:y.footer},t))})),ce=(0,l.createElement)(E.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(E.Path,{d:"M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z"}));function ue({as:e=_.DropdownMenu,className:t,label:
/* translators: button label text should, if possible, be under 16 characters. */
n=(0,b.__)("Options"),popoverProps:a,toggleProps:r,children:s}){return(0,l.createElement)(e,{className:v()("interface-more-menu-dropdown",t),icon:ce,label:n,popoverProps:{placement:"bottom-end",...a,className:v()("interface-more-menu-dropdown__content",a?.className)},toggleProps:{tooltipPosition:"bottom",...r,size:"compact"}},(e=>s(e)))}function de({closeModal:e,children:t}){return(0,l.createElement)(_.Modal,{className:"interface-preferences-modal",title:(0,b.__)("Preferences"),onRequestClose:e},t)}var me=(0,f.forwardRef)((function({icon:e,size:t=24,...n},a){return(0,f.cloneElement)(e,{width:t,height:t,...n,ref:a})})),pe=(0,l.createElement)(E.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(E.Path,{d:"M14.6 7l-1.2-1L8 12l5.4 6 1.2-1-4.6-5z"})),he=(0,l.createElement)(E.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(E.Path,{d:"M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z"}));const fe="preferences-menu";function ge({sections:e}){const t=(0,se.useViewportMatch)("medium"),[n,a]=(0,f.useState)(fe),{tabs:r,sectionsContentMap:s}=(0,f.useMemo)((()=>{let t={tabs:[],sectionsContentMap:{}};return e.length&&(t=e.reduce(((e,{name:t,tabLabel:n,content:a})=>(e.tabs.push({name:t,title:n}),e.sectionsContentMap[t]=a,e)),{tabs:[],sectionsContentMap:{}})),t}),[e]),i=(0,f.useCallback)((e=>s[e.name]||null),[s]);let o;return o=t?(0,l.createElement)(_.TabPanel,{className:"interface-preferences__tabs",tabs:r,initialTabName:n!==fe?n:void 0,onSelect:a,orientation:"vertical"},i):(0,l.createElement)(_.__experimentalNavigatorProvider,{initialPath:"/",className:"interface-preferences__provider"},(0,l.createElement)(_.__experimentalNavigatorScreen,{path:"/"},(0,l.createElement)(_.Card,{isBorderless:!0,size:"small"},(0,l.createElement)(_.CardBody,null,(0,l.createElement)(_.__experimentalItemGroup,null,r.map((e=>(0,l.createElement)(_.__experimentalNavigatorButton,{key:e.name,path:e.name,as:_.__experimentalItem,isAction:!0},(0,l.createElement)(_.__experimentalHStack,{justify:"space-between"},(0,l.createElement)(_.FlexItem,null,(0,l.createElement)(_.__experimentalTruncate,null,e.title)),(0,l.createElement)(_.FlexItem,null,(0,l.createElement)(me,{icon:(0,b.isRTL)()?pe:he})))))))))),e.length&&e.map((e=>(0,l.createElement)(_.__experimentalNavigatorScreen,{key:`${e.name}-menu`,path:e.name},(0,l.createElement)(_.Card,{isBorderless:!0,size:"large"},(0,l.createElement)(_.CardHeader,{isBorderless:!1,justify:"left",size:"small",gap:"6"},(0,l.createElement)(_.__experimentalNavigatorBackButton,{icon:(0,b.isRTL)()?he:pe,"aria-label":(0,b.__)("Navigate to the previous view")}),(0,l.createElement)(_.__experimentalText,{size:"16"},e.tabLabel)),(0,l.createElement)(_.CardBody,null,e.content)))))),o}var ye=({description:e,title:t,children:n})=>(0,l.createElement)("fieldset",{className:"interface-preferences-modal__section"},(0,l.createElement)("legend",{className:"interface-preferences-modal__section-legend"},(0,l.createElement)("h2",{className:"interface-preferences-modal__section-title"},t),e&&(0,l.createElement)("p",{className:"interface-preferences-modal__section-description"},e)),(0,l.createElement)("div",{className:"interface-preferences-modal__section-content"},n)),ve=function({help:e,label:t,isChecked:n,onChange:a,children:r}){return(0,l.createElement)("div",{className:"interface-preferences-modal__option"},(0,l.createElement)(_.ToggleControl,{__nextHasNoMarginBottom:!0,help:e,label:t,checked:n,onChange:a}),r)},_e=window.wp.widgets,be=window.wp.hooks,Ee=window.wp.mediaUtils;(0,be.addFilter)("editor.MediaUpload","core/edit-site/components/media-upload",(()=>Ee.MediaUpload));var we=window.wp.blockEditor,xe=window.wp.notices,Se=window.wp.coreData,Ce={grad:.9,turn:360,rad:360/(2*Math.PI)},ke=function(e){return"string"==typeof e?e.length>0:"number"==typeof e},Te=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=Math.pow(10,t)),Math.round(n*e)/n+0},Pe=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=1),e>n?n:e>t?e:t},Ne=function(e){return(e=isFinite(e)?e%360:0)>0?e:e+360},Ie=function(e){return{r:Pe(e.r,0,255),g:Pe(e.g,0,255),b:Pe(e.b,0,255),a:Pe(e.a)}},Me=function(e){return{r:Te(e.r),g:Te(e.g),b:Te(e.b),a:Te(e.a,3)}},Ae=/^#([0-9a-f]{3,8})$/i,Oe=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},Re=function(e){var t=e.r,n=e.g,a=e.b,r=e.a,s=Math.max(t,n,a),i=s-Math.min(t,n,a),o=i?s===t?(n-a)/i:s===n?2+(a-t)/i:4+(t-n)/i:0;return{h:60*(o<0?o+6:o),s:s?i/s*100:0,v:s/255*100,a:r}},De=function(e){var t=e.h,n=e.s,a=e.v,r=e.a;t=t/360*6,n/=100,a/=100;var s=Math.floor(t),i=a*(1-n),o=a*(1-(t-s)*n),l=a*(1-(1-t+s)*n),c=s%6;return{r:255*[a,o,i,i,l,a][c],g:255*[l,a,a,o,i,i][c],b:255*[i,i,l,a,a,o][c],a:r}},Fe=function(e){return{h:Ne(e.h),s:Pe(e.s,0,100),l:Pe(e.l,0,100),a:Pe(e.a)}},Be=function(e){return{h:Te(e.h),s:Te(e.s),l:Te(e.l),a:Te(e.a,3)}},Le=function(e){return De((n=(t=e).s,{h:t.h,s:(n*=((a=t.l)<50?a:100-a)/100)>0?2*n/(a+n)*100:0,v:a+n,a:t.a}));var t,n,a},Ve=function(e){return{h:(t=Re(e)).h,s:(r=(200-(n=t.s))*(a=t.v)/100)>0&&r<200?n*a/100/(r<=100?r:200-r)*100:0,l:r/2,a:t.a};var t,n,a,r},ze=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Ge=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,He=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Ue=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,We={string:[[function(e){var t=Ae.exec(e);return t?(e=t[1]).length<=4?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:4===e.length?Te(parseInt(e[3]+e[3],16)/255,2):1}:6===e.length||8===e.length?{r:parseInt(e.substr(0,2),16),g:parseInt(e.substr(2,2),16),b:parseInt(e.substr(4,2),16),a:8===e.length?Te(parseInt(e.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(e){var t=He.exec(e)||Ue.exec(e);return t?t[2]!==t[4]||t[4]!==t[6]?null:Ie({r:Number(t[1])/(t[2]?100/255:1),g:Number(t[3])/(t[4]?100/255:1),b:Number(t[5])/(t[6]?100/255:1),a:void 0===t[7]?1:Number(t[7])/(t[8]?100:1)}):null},"rgb"],[function(e){var t=ze.exec(e)||Ge.exec(e);if(!t)return null;var n,a,r=Fe({h:(n=t[1],a=t[2],void 0===a&&(a="deg"),Number(n)*(Ce[a]||1)),s:Number(t[3]),l:Number(t[4]),a:void 0===t[5]?1:Number(t[5])/(t[6]?100:1)});return Le(r)},"hsl"]],object:[[function(e){var t=e.r,n=e.g,a=e.b,r=e.a,s=void 0===r?1:r;return ke(t)&&ke(n)&&ke(a)?Ie({r:Number(t),g:Number(n),b:Number(a),a:Number(s)}):null},"rgb"],[function(e){var t=e.h,n=e.s,a=e.l,r=e.a,s=void 0===r?1:r;if(!ke(t)||!ke(n)||!ke(a))return null;var i=Fe({h:Number(t),s:Number(n),l:Number(a),a:Number(s)});return Le(i)},"hsl"],[function(e){var t=e.h,n=e.s,a=e.v,r=e.a,s=void 0===r?1:r;if(!ke(t)||!ke(n)||!ke(a))return null;var i=function(e){return{h:Ne(e.h),s:Pe(e.s,0,100),v:Pe(e.v,0,100),a:Pe(e.a)}}({h:Number(t),s:Number(n),v:Number(a),a:Number(s)});return De(i)},"hsv"]]},je=function(e,t){for(var n=0;n<t.length;n++){var a=t[n][0](e);if(a)return[a,t[n][1]]}return[null,void 0]},Ze=function(e,t){var n=Ve(e);return{h:n.h,s:Pe(n.s+100*t,0,100),l:n.l,a:n.a}},qe=function(e){return(299*e.r+587*e.g+114*e.b)/1e3/255},Ye=function(e,t){var n=Ve(e);return{h:n.h,s:n.s,l:Pe(n.l+100*t,0,100),a:n.a}},Ke=function(){function e(e){this.parsed=function(e){return"string"==typeof e?je(e.trim(),We.string):"object"==typeof e&&null!==e?je(e,We.object):[null,void 0]}(e)[0],this.rgba=this.parsed||{r:0,g:0,b:0,a:1}}return e.prototype.isValid=function(){return null!==this.parsed},e.prototype.brightness=function(){return Te(qe(this.rgba),2)},e.prototype.isDark=function(){return qe(this.rgba)<.5},e.prototype.isLight=function(){return qe(this.rgba)>=.5},e.prototype.toHex=function(){return t=(e=Me(this.rgba)).r,n=e.g,a=e.b,s=(r=e.a)<1?Oe(Te(255*r)):"","#"+Oe(t)+Oe(n)+Oe(a)+s;var e,t,n,a,r,s},e.prototype.toRgb=function(){return Me(this.rgba)},e.prototype.toRgbString=function(){return t=(e=Me(this.rgba)).r,n=e.g,a=e.b,(r=e.a)<1?"rgba("+t+", "+n+", "+a+", "+r+")":"rgb("+t+", "+n+", "+a+")";var e,t,n,a,r},e.prototype.toHsl=function(){return Be(Ve(this.rgba))},e.prototype.toHslString=function(){return t=(e=Be(Ve(this.rgba))).h,n=e.s,a=e.l,(r=e.a)<1?"hsla("+t+", "+n+"%, "+a+"%, "+r+")":"hsl("+t+", "+n+"%, "+a+"%)";var e,t,n,a,r},e.prototype.toHsv=function(){return e=Re(this.rgba),{h:Te(e.h),s:Te(e.s),v:Te(e.v),a:Te(e.a,3)};var e},e.prototype.invert=function(){return Xe({r:255-(e=this.rgba).r,g:255-e.g,b:255-e.b,a:e.a});var e},e.prototype.saturate=function(e){return void 0===e&&(e=.1),Xe(Ze(this.rgba,e))},e.prototype.desaturate=function(e){return void 0===e&&(e=.1),Xe(Ze(this.rgba,-e))},e.prototype.grayscale=function(){return Xe(Ze(this.rgba,-1))},e.prototype.lighten=function(e){return void 0===e&&(e=.1),Xe(Ye(this.rgba,e))},e.prototype.darken=function(e){return void 0===e&&(e=.1),Xe(Ye(this.rgba,-e))},e.prototype.rotate=function(e){return void 0===e&&(e=15),this.hue(this.hue()+e)},e.prototype.alpha=function(e){return"number"==typeof e?Xe({r:(t=this.rgba).r,g:t.g,b:t.b,a:e}):Te(this.rgba.a,3);var t},e.prototype.hue=function(e){var t=Ve(this.rgba);return"number"==typeof e?Xe({h:e,s:t.s,l:t.l,a:t.a}):Te(t.h)},e.prototype.isEqual=function(e){return this.toHex()===Xe(e).toHex()},e}(),Xe=function(e){return e instanceof Ke?e:new Ke(e)},Je=[],Qe=function(e){var t=e/255;return t<.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)},$e=function(e){return.2126*Qe(e.r)+.7152*Qe(e.g)+.0722*Qe(e.b)},et=window.wp.privateApis;const{lock:tt,unlock:nt}=(0,et.__dangerousOptInToUnstableAPIsOnlyForCoreModules)("I know using unstable features means my theme or plugin will inevitably break in the next version of WordPress.","@wordpress/edit-site"),{useGlobalSetting:at,useGlobalStyle:rt}=nt(we.privateApis);function st(){const[e="black"]=rt("color.text"),[t="white"]=rt("color.background"),[n=e]=rt("elements.h1.color.text"),[a]=at("color.palette.core"),[r]=at("color.palette.theme"),[s]=at("color.palette.custom"),i=(null!=r?r:[]).concat(null!=s?s:[]).concat(null!=a?a:[]),o=i.filter((({color:e})=>e!==t&&e!==n)).slice(0,2);return{paletteColors:i,highlightedColors:o}}!function(e){e.forEach((function(e){Je.indexOf(e)<0&&(e(Ke,We),Je.push(e))}))}([function(e){e.prototype.luminance=function(){return e=$e(this.rgba),void 0===(t=2)&&(t=0),void 0===n&&(n=Math.pow(10,t)),Math.round(n*e)/n+0;var e,t,n},e.prototype.contrast=function(t){void 0===t&&(t="#FFF");var n,a,r,s,i,o,l,c=t instanceof e?t:new e(t);return s=this.rgba,i=c.toRgb(),n=(o=$e(s))>(l=$e(i))?(o+.05)/(l+.05):(l+.05)/(o+.05),void 0===(a=2)&&(a=0),void 0===r&&(r=Math.pow(10,a)),Math.floor(r*n)/r+0},e.prototype.isReadable=function(e,t){return void 0===e&&(e="#FFF"),void 0===t&&(t={}),this.contrast(e)>=(i=void 0===(s=(n=t).size)?"normal":s,"AAA"===(r=void 0===(a=n.level)?"AA":a)&&"normal"===i?7:"AA"===r&&"large"===i?3:4.5);var n,a,r,s,i}}]);const{cleanEmptyObject:it,GlobalStylesContext:ot}=nt(we.privateApis),lt={...c.__EXPERIMENTAL_STYLE_PROPERTY,blockGap:{value:["spacing","blockGap"]}},ct={"border.color":"color","color.background":"color","color.text":"color","elements.link.color.text":"color","elements.link.:hover.color.text":"color","elements.link.typography.fontFamily":"font-family","elements.link.typography.fontSize":"font-size","elements.button.color.text":"color","elements.button.color.background":"color","elements.button.typography.fontFamily":"font-family","elements.button.typography.fontSize":"font-size","elements.caption.color.text":"color","elements.heading.color":"color","elements.heading.color.background":"color","elements.heading.typography.fontFamily":"font-family","elements.heading.gradient":"gradient","elements.heading.color.gradient":"gradient","elements.h1.color":"color","elements.h1.color.background":"color","elements.h1.typography.fontFamily":"font-family","elements.h1.color.gradient":"gradient","elements.h2.color":"color","elements.h2.color.background":"color","elements.h2.typography.fontFamily":"font-family","elements.h2.color.gradient":"gradient","elements.h3.color":"color","elements.h3.color.background":"color","elements.h3.typography.fontFamily":"font-family","elements.h3.color.gradient":"gradient","elements.h4.color":"color","elements.h4.color.background":"color","elements.h4.typography.fontFamily":"font-family","elements.h4.color.gradient":"gradient","elements.h5.color":"color","elements.h5.color.background":"color","elements.h5.typography.fontFamily":"font-family","elements.h5.color.gradient":"gradient","elements.h6.color":"color","elements.h6.color.background":"color","elements.h6.typography.fontFamily":"font-family","elements.h6.color.gradient":"gradient","color.gradient":"gradient",blockGap:"spacing","typography.fontSize":"font-size","typography.fontFamily":"font-family"},ut={"border.color":"borderColor","color.background":"backgroundColor","color.text":"textColor","color.gradient":"gradient","typography.fontSize":"fontSize","typography.fontFamily":"fontFamily"},dt=["border","color","spacing","typography"],mt=(e,t)=>{let n=e;return t.forEach((e=>{n=n?.[e]})),n},pt=["borderColor","borderWidth","borderStyle"],ht=["top","right","bottom","left"];function ft(e,t,n){if(!t?.[e]||n?.[e]?.style)return[];const{color:a,style:r,width:s}=t[e];return!a&&!s||r?[]:[{path:["border",e,"style"],value:"solid"}]}function gt(e,t,n){return e&&"object"==typeof e?(t.reduce(((e,a,r)=>(void 0===e[a]&&(Number.isInteger(t[r+1])?e[a]=[]:e[a]={}),r===t.length-1&&(e[a]=n),e[a])),e),e):e}function yt(e){return e?JSON.parse(JSON.stringify(e)):{}}function vt({name:e,attributes:t,setAttributes:n}){const{user:a,setUserConfig:r}=(0,f.useContext)(ot),s=function(e,t,n){const a=function(e,t){const{supportedPanels:n}=(0,d.useSelect)((n=>({supportedPanels:nt(n(c.store)).getSupportedStyles(e,t)})),[e,t]);return n}(e),r=n?.styles?.blocks?.[e];return(0,f.useMemo)((()=>{const e=a.flatMap((e=>{if(!lt[e])return[];const{value:n}=lt[e],a=n.join("."),r=t[ut[a]],s=r?`var:preset|${ct[a]}|${r}`:mt(t.style,n);if("linkColor"===e){const e=s?[{path:n,value:s}]:[],a=["elements","link",":hover","color","text"],r=mt(t.style,a);return r&&e.push({path:a,value:r}),e}if(pt.includes(e)&&s){const e=[{path:n,value:s}];return ht.forEach((t=>{const a=[...n];a.splice(-1,0,t),e.push({path:a,value:s})})),e}return s?[{path:n,value:s}]:[]}));return function(e,t,n){if(!e&&!t)return[];const a=[...ft("top",e,n),...ft("right",e,n),...ft("bottom",e,n),...ft("left",e,n)],{color:r,style:s,width:i}=e||{};return(t||r||i)&&!s&&ht.forEach((e=>{n?.[e]?.style||a.push({path:["border",e,"style"],value:"solid"})})),a}(t.style?.border,t.borderColor,r?.border).forEach((t=>e.push(t))),e}),[a,t,r])}(e,t,a),{__unstableMarkNextChangeAsNotPersistent:i}=(0,d.useDispatch)(we.store),{createSuccessNotice:o}=(0,d.useDispatch)(xe.store),u=(0,f.useCallback)((()=>{if(0!==s.length&&s.length>0){const{style:l}=t,u=yt(l),d=yt(a);for(const{path:t,value:n}of s)gt(u,t,void 0),gt(d,["styles","blocks",e,...t],n);const m={borderColor:void 0,backgroundColor:void 0,textColor:void 0,gradient:void 0,fontSize:void 0,fontFamily:void 0,style:it(u)};i(),n(m),r((()=>d),{undoIgnore:!0}),o((0,b.sprintf)(
// translators: %s: Title of the block e.g. 'Heading'.
(0,b.__)("%s styles applied."),(0,c.getBlockType)(e).title),{type:"snackbar",actions:[{label:(0,b.__)("Undo"),onClick(){i(),n(t),r((()=>a),{undoIgnore:!0})}}]})}}),[i,t,s,o,e,n,r,a]);return(0,l.createElement)(_.BaseControl,{className:"edit-site-push-changes-to-global-styles-control",help:(0,b.sprintf)(
// translators: %s: Title of the block e.g. 'Heading'.
(0,b.__)("Apply this block’s typography, spacing, dimensions, and color styles to all %s blocks."),(0,c.getBlockType)(e).title)},(0,l.createElement)(_.BaseControl.VisualLabel,null,(0,b.__)("Styles")),(0,l.createElement)(_.Button,{variant:"primary",disabled:0===s.length,onClick:u},(0,b.__)("Apply globally")))}const _t=(0,se.createHigherOrderComponent)((e=>t=>{const n=(0,we.useBlockEditingMode)(),a=(0,d.useSelect)((e=>e(Se.store).getCurrentTheme()?.is_block_theme),[]),r=dt.some((e=>(0,c.hasBlockSupport)(t.name,e)));return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(e,{...t}),"default"===n&&r&&a&&(0,l.createElement)(we.InspectorAdvancedControls,null,(0,l.createElement)(vt,{...t})))}));(0,be.addFilter)("editor.BlockEdit","core/edit-site/push-changes-to-global-styles",_t);var bt=window.wp.router,Et=window.wp.url;function wt(){return void 0!==(0,Et.getQueryArg)(window.location.href,"wp_theme_preview")}function xt(){return wt()?(0,Et.getQueryArg)(window.location.href,"wp_theme_preview"):null}const{useHistory:St}=nt(bt.privateApis);function Ct(e,t={},n,a=!1){const r=(0,Et.getQueryArgs)(window.location.href),s=(0,Et.removeQueryArgs)(window.location.href,...Object.keys(r));return wt()&&(t={...t,wp_theme_preview:xt()}),{href:(0,Et.addQueryArgs)(s,t),onClick:function(r){r.preventDefault(),a?e.replace(t,n):e.push(t,n)}}}function kt(e,t,n){return Ct(St(),e,t,n)}function Tt({params:e={},state:t,replace:n=!1,children:a,...r}){const{href:s,onClick:i}=kt(e,t,n);return(0,l.createElement)("a",{href:s,onClick:i,...r},a)}var Pt=window.wp.patterns;const Nt="wp_navigation",It="wp_template",Mt="wp_template_part",At={custom:"custom",theme:"theme",plugin:"plugin"},Ot="uncategorized",{PATTERN_TYPES:Rt,PATTERN_DEFAULT_CATEGORY:Dt,PATTERN_USER_CATEGORY:Ft,EXCLUDED_PATTERN_SOURCES:Bt,PATTERN_SYNC_TYPES:Lt}=nt(Pt.privateApis),Vt=[Mt,Nt,Rt.user],zt={[It]:(0,b.__)("Template"),[Mt]:(0,b.__)("Template part"),[Rt.user]:(0,b.__)("Pattern"),[Nt]:(0,b.__)("Navigation")},Gt="grid",Ht="table",Ut="list",Wt="enumeration",jt="in",Zt="notIn",{useLocation:qt}=nt(bt.privateApis);function Yt({attributes:e}){const{theme:t,slug:n}=e,{params:a}=qt(),r=(0,d.useSelect)((e=>{const{getCurrentTheme:a,getEntityRecord:r}=e(Se.store);return r("postType",Mt,`${t||a()?.stylesheet}//${n}`)}),[t,n]),s=kt({postId:r?.id,postType:r?.type,canvas:"edit"},{fromTemplateId:a.postId||r?.id});return r?(0,l.createElement)(we.BlockControls,{group:"other"},(0,l.createElement)(_.ToolbarButton,{...s,onClick:e=>{s.onClick(e)}},(0,b.__)("Edit"))):null}const Kt=(0,se.createHigherOrderComponent)((e=>t=>{const{attributes:n,name:a}=t,r="core/template-part"===a&&n.slug;return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(e,{...t}),r&&(0,l.createElement)(Yt,{attributes:n}))}),"withEditBlockControls");(0,be.addFilter)("editor.BlockEdit","core/edit-site/template-part-edit-button",Kt);const{useLocation:Xt}=nt(bt.privateApis);function Jt({attributes:e}){const{ref:t}=e,{params:n}=Xt(),a=(0,we.useBlockEditingMode)(),r=(0,d.useSelect)((e=>e(Se.store).getEntityRecord("postType",Nt,t)),[t]),s=kt({postId:r?.id,postType:r?.type,canvas:"edit"},{fromTemplateId:n.postId||r?.id});return r&&"default"===a?(0,l.createElement)(we.BlockControls,{group:"other"},(0,l.createElement)(_.ToolbarButton,{...s,onClick:e=>{s.onClick(e)}},(0,b.__)("Edit"))):null}const Qt=(0,se.createHigherOrderComponent)((e=>t=>{const{attributes:n,name:a}=t,r="core/navigation"===a&&n.ref;return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(e,{...t}),r&&(0,l.createElement)(Jt,{attributes:n}))}),"withEditBlockControls");(0,be.addFilter)("editor.BlockEdit","core/edit-site/navigation-edit-button",Qt);var $t=(0,d.combineReducers)({settings:function(e={},t){return"UPDATE_SETTINGS"===t.type?{...e,...t.settings}:e},editedPost:function(e={},t){switch(t.type){case"SET_EDITED_POST":return{postType:t.postType,id:t.id,context:t.context};case"SET_EDITED_POST_CONTEXT":return{...e,context:t.context}}return e},saveViewPanel:function(e=!1,t){switch(t.type){case"SET_IS_SAVE_VIEW_OPENED":return t.isOpen;case"SET_CANVAS_MODE":return!1}return e},canvasMode:function(e="init",t){return"SET_CANVAS_MODE"===t.type?t.mode:e},editorCanvasContainerView:function(e=void 0,t){return"SET_EDITOR_CANVAS_CONTAINER_VIEW"===t.type?t.view:e}}),en=window.wp.apiFetch,tn=n.n(en),nn=window.wp.a11y,an=window.wp.htmlEntities;const rn="core/edit-site";function sn(e){return!!e&&e?.source===At.custom&&e?.has_theme_file}function on(e){return function({registry:t}){h()("dispatch( 'core/edit-site' ).toggleFeature( featureName )",{since:"6.0",alternative:"dispatch( 'core/preferences').toggle( 'core/edit-site', featureName )"}),t.dispatch(k.store).toggle("core/edit-site",e)}}const ln=e=>({registry:t})=>{h()("dispatch( 'core/edit-site' ).__experimentalSetPreviewDeviceType",{since:"6.5",version:"6.7",hint:"registry.dispatch( editorStore ).setDeviceType"}),t.dispatch(g.store).setDeviceType(e)};function cn(){return h()("dispatch( 'core/edit-site' ).setTemplate",{since:"6.5",version:"6.8",hint:"The setTemplate is not needed anymore, the correct entity is resolved from the URL automatically."}),{type:"NOTHING"}}const un=e=>async({dispatch:t,registry:n})=>{h()("dispatch( 'core/edit-site' ).addTemplate",{since:"6.5",version:"6.8",hint:"use saveEntityRecord directly"});const a=await n.dispatch(Se.store).saveEntityRecord("postType",It,e);e.content&&n.dispatch(Se.store).editEntityRecord("postType",It,a.id,{blocks:(0,c.parse)(e.content)},{undoIgnore:!0}),t({type:"SET_EDITED_POST",postType:It,id:a.id})},dn=e=>async({registry:t})=>{try{await t.dispatch(Se.store).deleteEntityRecord("postType",e.type,e.id,{force:!0});const n=t.select(Se.store).getLastEntityDeleteError("postType",e.type,e.id);if(n)throw n;const a="string"==typeof e.title?e.title:e.title?.rendered;t.dispatch(xe.store).createSuccessNotice((0,b.sprintf)(/* translators: The template/part's name. */
(0,b.__)('"%s" deleted.'),(0,an.decodeEntities)(a)),{type:"snackbar",id:"site-editor-template-deleted-success"})}catch(e){const n=e.message&&"unknown_error"!==e.code?e.message:(0,b.__)("An error occurred while deleting the template.");t.dispatch(xe.store).createErrorNotice(n,{type:"snackbar"})}};function mn(e){return{type:"SET_EDITED_POST",postType:Mt,id:e}}function pn(e){return{type:"SET_EDITED_POST",postType:Nt,id:e}}function hn(e,t,n){return{type:"SET_EDITED_POST",postType:e,id:t,context:n}}function fn(){return h()("dispatch( 'core/edit-site' ).setHomeTemplateId",{since:"6.2",version:"6.4"}),{type:"NOTHING"}}function gn(e){return{type:"SET_EDITED_POST_CONTEXT",context:e}}function yn(){return h()("dispatch( 'core/edit-site' ).setPage",{since:"6.5",version:"6.8",hint:"The setPage is not needed anymore, the correct entity is resolved from the URL automatically."}),{type:"NOTHING"}}function vn(){return h()("dispatch( 'core/edit-site' ).setNavigationPanelActiveMenu",{since:"6.2",version:"6.4"}),{type:"NOTHING"}}function bn(){return h()("dispatch( 'core/edit-site' ).openNavigationPanelToMenu",{since:"6.2",version:"6.4"}),{type:"NOTHING"}}function En(){return h()("dispatch( 'core/edit-site' ).setIsNavigationPanelOpened",{since:"6.2",version:"6.4"}),{type:"NOTHING"}}const wn=e=>({registry:t})=>{h()("dispatch( 'core/edit-site' ).setIsInserterOpened",{since:"6.5",alternative:"dispatch( 'core/editor').setIsInserterOpened"}),t.dispatch(g.store).setIsInserterOpened(e)},xn=e=>({registry:t})=>{h()("dispatch( 'core/edit-site' ).setIsListViewOpened",{since:"6.5",alternative:"dispatch( 'core/editor').setIsListViewOpened"}),t.dispatch(g.store).setIsListViewOpened(e)};function Sn(e){return{type:"UPDATE_SETTINGS",settings:e}}function Cn(e){return{type:"SET_IS_SAVE_VIEW_OPENED",isOpen:e}}const kn=(e,{allowUndo:t=!0}={})=>async({registry:n})=>{const a="edit-site-template-reverted";if(n.dispatch(xe.store).removeNotice(a),sn(e))try{const r=n.select(Se.store).getEntityConfig("postType",e.type);if(!r)return void n.dispatch(xe.store).createErrorNotice((0,b.__)("The editor has encountered an unexpected error. Please reload."),{type:"snackbar"});const s=(0,Et.addQueryArgs)(`${r.baseURL}/${e.id}`,{context:"edit",source:"theme"}),i=await tn()({path:s});if(!i)return void n.dispatch(xe.store).createErrorNotice((0,b.__)("The editor has encountered an unexpected error. Please reload."),{type:"snackbar"});const o=({blocks:e=[]})=>(0,c.__unstableSerializeAndClean)(e),l=n.select(Se.store).getEditedEntityRecord("postType",e.type,e.id);n.dispatch(Se.store).editEntityRecord("postType",e.type,e.id,{content:o,blocks:l.blocks,source:"custom"},{undoIgnore:!0});const u=(0,c.parse)(i?.content?.raw);if(n.dispatch(Se.store).editEntityRecord("postType",e.type,i.id,{content:o,blocks:u,source:"theme"}),t){const t=()=>{n.dispatch(Se.store).editEntityRecord("postType",e.type,l.id,{content:o,blocks:l.blocks,source:"custom"})};n.dispatch(xe.store).createSuccessNotice((0,b.__)("Template reverted."),{type:"snackbar",id:a,actions:[{label:(0,b.__)("Undo"),onClick:t}]})}}catch(e){const t=e.message&&"unknown_error"!==e.code?e.message:(0,b.__)("Template revert failed. Please reload.");n.dispatch(xe.store).createErrorNotice(t,{type:"snackbar"})}else n.dispatch(xe.store).createErrorNotice((0,b.__)("This template is not revertable."),{type:"snackbar"})},Tn=e=>({dispatch:t,registry:n})=>{n.select(k.store).get("core","distractionFree")&&t.toggleDistractionFree(),n.dispatch(W).enableComplementaryArea(rn,e)},Pn=()=>({registry:e})=>{e.dispatch(W).disableComplementaryArea(rn)},Nn=e=>({dispatch:t,registry:n})=>{n.dispatch("core/preferences").set("core/edit-site","editorMode",e),"visual"!==e&&n.dispatch(we.store).clearSelectedBlock(),"visual"===e?(0,nn.speak)((0,b.__)("Visual editor selected"),"assertive"):"text"===e&&(n.select(k.store).get("core","distractionFree")&&t.toggleDistractionFree(),(0,nn.speak)((0,b.__)("Code editor selected"),"assertive"))},In=e=>({dispatch:t,registry:n})=>{h()("dispatch( 'core/edit-site' ).setHasPageContentFocus",{since:"6.5"}),e&&n.dispatch(we.store).clearSelectedBlock(),t({type:"SET_HAS_PAGE_CONTENT_FOCUS",hasPageContentFocus:e})},Mn=()=>({dispatch:e,registry:t})=>{const n=t.select(k.store).get("core","distractionFree");n||t.batch((()=>{t.dispatch(k.store).set("core","fixedToolbar",!0),t.dispatch(g.store).setIsInserterOpened(!1),t.dispatch(g.store).setIsListViewOpened(!1),e.closeGeneralSidebar()})),t.batch((()=>{t.dispatch(k.store).set("core","distractionFree",!n),t.dispatch(xe.store).createInfoNotice(n?(0,b.__)("Distraction free off."):(0,b.__)("Distraction free on."),{id:"core/edit-site/distraction-free-mode/notice",type:"snackbar"})}))},An=e=>({registry:t,dispatch:n})=>{t.dispatch(we.store).__unstableSetEditorMode("edit"),n({type:"SET_CANVAS_MODE",mode:e}),"edit"===e&&t.select(k.store).get("core","showListViewByDefault")&&!t.select(k.store).get("core","distractionFree")?t.dispatch(g.store).setIsListViewOpened(!0):t.dispatch(g.store).setIsListViewOpened(!1),t.dispatch(g.store).setIsInserterOpened(!1)},On=e=>({dispatch:t})=>{t({type:"SET_EDITOR_CANVAS_CONTAINER_VIEW",view:e})},Rn=[],Dn=function(e,t){var n,a,r=0;function s(){var s,i,o=n,l=arguments.length;e:for(;o;){if(o.args.length===arguments.length){for(i=0;i<l;i++)if(o.args[i]!==arguments[i]){o=o.next;continue e}return o!==n&&(o===a&&(a=o.prev),o.prev.next=o.next,o.next&&(o.next.prev=o.prev),o.next=n,o.prev=null,n.prev=o,n=o),o.val}o=o.next}for(s=new Array(l),i=0;i<l;i++)s[i]=arguments[i];return o={args:s,val:e.apply(null,s)},n?(n.prev=o,o.next=n):a=o,r===t.maxSize?(a=a.prev).next=null:r++,n=o,o.val}return t=t||{},s.clear=function(){n=null,a=null,r=0},s}((function(e=Rn,t){const n=t?t.reduce(((e,t)=>({...e,[t.id]:t})),{}):{},a=[],r=[...e];for(;r.length;){const{innerBlocks:e,...t}=r.shift();if(r.unshift(...e),(0,c.isTemplatePart)(t)){const{attributes:{theme:e,slug:r}}=t,s=n[`${e}//${r}`];s&&a.push({templatePart:s,block:t})}}return a})),Fn=(0,d.createRegistrySelector)((e=>(t,n)=>(h()("select( 'core/edit-site' ).isFeatureActive",{since:"6.0",alternative:"select( 'core/preferences' ).get"}),!!e(k.store).get("core/edit-site",n)))),Bn=(0,d.createRegistrySelector)((e=>()=>(h()("select( 'core/edit-site' ).__experimentalGetPreviewDeviceType",{since:"6.5",version:"6.7",alternative:"select( 'core/editor' ).getDeviceType"}),e(g.store).getDeviceType()))),Ln=(0,d.createRegistrySelector)((e=>()=>e(Se.store).canUser("create","media"))),Vn=(0,d.createRegistrySelector)((e=>()=>(h()("select( 'core/core' ).getEntityRecords( 'postType', 'wp_block' )",{since:"6.5",version:"6.8"}),"web"===f.Platform.OS?e(Se.store).getEntityRecords("postType","wp_block",{per_page:-1}):[])));function zn(e){return e.settings}function Gn(){h()("select( 'core/edit-site' ).getHomeTemplateId",{since:"6.2",version:"6.4"})}function Hn(e){return e.editedPost.postType}function Un(e){return e.editedPost.id}function Wn(e){return e.editedPost.context}function jn(e){return{context:e.editedPost.context}}const Zn=(0,d.createRegistrySelector)((e=>()=>(h()("select( 'core/edit-site' ).isInserterOpened",{since:"6.5",alternative:"select( 'core/editor' ).isInserterOpened"}),e(g.store).isInserterOpened()))),qn=(0,d.createRegistrySelector)((e=>()=>(h()("select( 'core/edit-site' ).__experimentalGetInsertionPoint",{since:"6.5",version:"6.7"}),nt(e(g.store)).getInsertionPoint()))),Yn=(0,d.createRegistrySelector)((e=>()=>(h()("select( 'core/edit-site' ).isListViewOpened",{since:"6.5",alternative:"select( 'core/editor' ).isListViewOpened"}),e(g.store).isListViewOpened())));function Kn(e){return e.saveViewPanel}const Xn=(0,d.createRegistrySelector)((e=>()=>{const t=e(Se.store).getEntityRecords("postType",Mt,{per_page:-1}),n=e(we.store).__experimentalGetGlobalBlocksByName("core/template-part"),a=e(we.store).getBlocksByClientId(n);return Dn(a,t)})),Jn=(0,d.createRegistrySelector)((e=>()=>e(k.store).get("core/edit-site","editorMode")));function Qn(){h()("dispatch( 'core/edit-site' ).getCurrentTemplateNavigationPanelSubMenu",{since:"6.2",version:"6.4"})}function $n(){h()("dispatch( 'core/edit-site' ).getNavigationPanelActiveMenu",{since:"6.2",version:"6.4"})}function ea(){h()("dispatch( 'core/edit-site' ).isNavigationOpened",{since:"6.2",version:"6.4"})}function ta(e){return!!e.editedPost.context?.postId}function na(){return h()("select( 'core/edit-site' ).hasPageContentFocus",{since:"6.5"}),!1}function aa(e){return e.canvasMode}function ra(e){return e.editorCanvasContainerView}const sa={reducer:$t,actions:r,selectors:i},ia=(0,d.createReduxStore)(rn,sa);(0,d.register)(ia),nt(ia).registerPrivateSelectors(o),nt(ia).registerPrivateActions(s);var oa=window.wp.keyboardShortcuts,la=window.wp.commands,ca=window.wp.coreCommands,ua=(0,l.createElement)(E.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,l.createElement)(E.Path,{d:"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"})),da=(0,l.createElement)(E.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,l.createElement)(E.Path,{d:"M12 4c-4.4 0-8 3.6-8 8v.1c0 4.1 3.2 7.5 7.2 7.9h.8c4.4 0 8-3.6 8-8s-3.6-8-8-8zm0 15V5c3.9 0 7 3.1 7 7s-3.1 7-7 7z"})),ma=(0,l.createElement)(E.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(E.Path,{d:"M15.5 7.5h-7V9h7V7.5Zm-7 3.5h7v1.5h-7V11Zm7 3.5h-7V16h7v-1.5Z"}),(0,l.createElement)(E.Path,{d:"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"})),pa=(0,l.createElement)(E.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(E.Path,{d:"M18 5.5H6a.5.5 0 00-.5.5v3h13V6a.5.5 0 00-.5-.5zm.5 5H10v8h8a.5.5 0 00.5-.5v-7.5zm-10 0h-3V18a.5.5 0 00.5.5h2.5v-8zM6 4h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2V6a2 2 0 012-2z"})),ha=(0,l.createElement)(E.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(E.Path,{d:"M21.3 10.8l-5.6-5.6c-.7-.7-1.8-.7-2.5 0l-5.6 5.6c-.7.7-.7 1.8 0 2.5l5.6 5.6c.3.3.8.5 1.2.5s.9-.2 1.2-.5l5.6-5.6c.8-.7.8-1.9.1-2.5zm-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"}));function fa(e){return(0,l.createElement)(_.Button,{...e,className:v()("edit-site-sidebar-button",e.className)})}const{useLocation:ga}=nt(bt.privateApis);function ya({isRoot:e,title:t,actions:n,meta:a,content:r,footer:s,description:i,backPath:o}){const{dashboardLink:c,dashboardLinkText:u}=(0,d.useSelect)((e=>{const{getSettings:t}=nt(e(ia));return{dashboardLink:t().__experimentalDashboardLink,dashboardLinkText:t().__experimentalDashboardLinkText}}),[]),{getTheme:m}=(0,d.useSelect)(Se.store),p=ga(),h=(0,_.__experimentalUseNavigator)(),f=m(xt()),g=(0,b.isRTL)()?he:pe;return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(_.__experimentalVStack,{className:v()("edit-site-sidebar-navigation-screen__main",{"has-footer":!!s}),spacing:0,justify:"flex-start"},(0,l.createElement)(_.__experimentalHStack,{spacing:4,alignment:"flex-start",className:"edit-site-sidebar-navigation-screen__title-icon"},!e&&(0,l.createElement)(fa,{onClick:()=>{const e=null!=o?o:p.state?.backPath;e?h.goTo(e,{isBack:!0}):h.goToParent()},icon:g,label:(0,b.__)("Back"),showTooltip:!1}),e&&(0,l.createElement)(fa,{icon:g,label:u||(0,b.__)("Go to the Dashboard"),href:c||"index.php"}),(0,l.createElement)(_.__experimentalHeading,{className:"edit-site-sidebar-navigation-screen__title",color:"#e0e0e0",level:1,size:20},wt()?(0,b.sprintf)("Previewing %1$s: %2$s",f?.name?.rendered,t):t),n&&(0,l.createElement)("div",{className:"edit-site-sidebar-navigation-screen__actions"},n)),a&&(0,l.createElement)(l.Fragment,null,(0,l.createElement)("div",{className:"edit-site-sidebar-navigation-screen__meta"},a)),(0,l.createElement)("div",{className:"edit-site-sidebar-navigation-screen__content"},i&&(0,l.createElement)("p",{className:"edit-site-sidebar-navigation-screen__description"},i),r)),s&&(0,l.createElement)("footer",{className:"edit-site-sidebar-navigation-screen__footer"},s))}var va=(0,l.createElement)(E.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(E.Path,{d:"m13.1 16-3.4-4 3.4-4 1.1 1-2.6 3 2.6 3-1.1 1z"})),_a=(0,l.createElement)(E.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(E.Path,{d:"M10.8622 8.04053L14.2805 12.0286L10.8622 16.0167L9.72327 15.0405L12.3049 12.0286L9.72327 9.01672L10.8622 8.04053Z"}));function ba({className:e,icon:t,withChevron:n=!1,suffix:a,children:r,...s}){return(0,l.createElement)(_.__experimentalItem,{className:v()("edit-site-sidebar-navigation-item",{"with-suffix":!n&&a},e),...s},(0,l.createElement)(_.__experimentalHStack,{justify:"flex-start"},t&&(0,l.createElement)(me,{style:{fill:"currentcolor"},icon:t,size:24}),(0,l.createElement)(_.FlexBlock,null,r),n&&(0,l.createElement)(me,{icon:(0,b.isRTL)()?va:_a,className:"edit-site-sidebar-navigation-item__drilldown-indicator",size:24}),!n&&a))}var Ea=(0,l.createElement)(E.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,l.createElement)(E.Path,{d:"M3.99961 13C4.67043 13.3354 4.6703 13.3357 4.67017 13.3359L4.67298 13.3305C4.67621 13.3242 4.68184 13.3135 4.68988 13.2985C4.70595 13.2686 4.7316 13.2218 4.76695 13.1608C4.8377 13.0385 4.94692 12.8592 5.09541 12.6419C5.39312 12.2062 5.84436 11.624 6.45435 11.0431C7.67308 9.88241 9.49719 8.75 11.9996 8.75C14.502 8.75 16.3261 9.88241 17.5449 11.0431C18.1549 11.624 18.6061 12.2062 18.9038 12.6419C19.0523 12.8592 19.1615 13.0385 19.2323 13.1608C19.2676 13.2218 19.2933 13.2686 19.3093 13.2985C19.3174 13.3135 19.323 13.3242 19.3262 13.3305L19.3291 13.3359C19.3289 13.3357 19.3288 13.3354 19.9996 13C20.6704 12.6646 20.6703 12.6643 20.6701 12.664L20.6697 12.6632L20.6688 12.6614L20.6662 12.6563L20.6583 12.6408C20.6517 12.6282 20.6427 12.6108 20.631 12.5892C20.6078 12.5459 20.5744 12.4852 20.5306 12.4096C20.4432 12.2584 20.3141 12.0471 20.1423 11.7956C19.7994 11.2938 19.2819 10.626 18.5794 9.9569C17.1731 8.61759 14.9972 7.25 11.9996 7.25C9.00203 7.25 6.82614 8.61759 5.41987 9.9569C4.71736 10.626 4.19984 11.2938 3.85694 11.7956C3.68511 12.0471 3.55605 12.2584 3.4686 12.4096C3.42484 12.4852 3.39142 12.5459 3.36818 12.5892C3.35656 12.6108 3.34748 12.6282 3.34092 12.6408L3.33297 12.6563L3.33041 12.6614L3.32948 12.6632L3.32911 12.664C3.32894 12.6643 3.32879 12.6646 3.99961 13ZM11.9996 16C13.9326 16 15.4996 14.433 15.4996 12.5C15.4996 10.567 13.9326 9 11.9996 9C10.0666 9 8.49961 10.567 8.49961 12.5C8.49961 14.433 10.0666 16 11.9996 16Z"})),wa=(0,l.createElement)(E.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(E.Path,{d:"m19 7-3-3-8.5 8.5-1 4 4-1L19 7Zm-7 11.5H5V20h7v-1.5Z"})),xa=wa,Sa=window.wp.keycodes,Ca=n(1919),ka=n.n(Ca);function Ta(e){return"[object Object]"===Object.prototype.toString.call(e)}function Pa(e){var t,n;return!1!==Ta(e)&&(void 0===(t=e.constructor)||!1!==Ta(n=t.prototype)&&!1!==n.hasOwnProperty("isPrototypeOf"))}const{GlobalStylesContext:Na,cleanEmptyObject:Ia}=nt(we.privateApis);function Ma(e,t){return ka()(e,t,{isMergeableObject:Pa})}function Aa({children:e}){const t=function(){const[e,t,n]=function(){const{globalStylesId:e,isReady:t,settings:n,styles:a}=(0,d.useSelect)((e=>{const{getEditedEntityRecord:t,hasFinishedResolution:n}=e(Se.store),a=e(Se.store).__experimentalGetCurrentGlobalStylesId(),r=a?t("root","globalStyles",a):void 0;let s=!1;return n("__experimentalGetCurrentGlobalStylesId")&&(s=!a||n("getEditedEntityRecord",["root","globalStyles",a])),{globalStylesId:a,isReady:s,settings:r?.settings,styles:r?.styles}}),[]),{getEditedEntityRecord:r}=(0,d.useSelect)(Se.store),{editEntityRecord:s}=(0,d.useDispatch)(Se.store);return[t,(0,f.useMemo)((()=>({settings:null!=n?n:{},styles:null!=a?a:{}})),[n,a]),(0,f.useCallback)(((t,n={})=>{var a,i;const o=r("root","globalStyles",e),l=t({styles:null!==(a=o?.styles)&&void 0!==a?a:{},settings:null!==(i=o?.settings)&&void 0!==i?i:{}});s("root","globalStyles",e,{styles:Ia(l.styles)||{},settings:Ia(l.settings)||{}},n)}),[e])]}(),[a,r]=function(){const e=(0,d.useSelect)((e=>e(Se.store).__experimentalGetCurrentThemeBaseGlobalStyles()),[]);return[!!e,e]}(),s=(0,f.useMemo)((()=>r&&t?Ma(r,t):{}),[t,r]);return(0,f.useMemo)((()=>({isReady:e&&a,user:t,base:r,merged:s,setUserConfig:n})),[s,t,r,n,e,a])}();return t.isReady?(0,l.createElement)(Na.Provider,{value:t},e):null}const{useGlobalStyle:Oa,useGlobalStylesOutput:Ra}=nt(we.privateApis),Da={start:{scale:1,opacity:1},hover:{scale:0,opacity:0}},Fa={hover:{opacity:1},start:{opacity:.5}},Ba={hover:{scale:1,opacity:1},start:{scale:0,opacity:0}},La={leading:!0,trailing:!0};var Va=({label:e,isFocused:t,withHoverView:n})=>{const[a]=Oa("typography.fontWeight"),[r="serif"]=Oa("typography.fontFamily"),[s=r]=Oa("elements.h1.typography.fontFamily"),[i=a]=Oa("elements.h1.typography.fontWeight"),[o="black"]=Oa("color.text"),[c=o]=Oa("elements.h1.color.text"),[u="white"]=Oa("color.background"),[d]=Oa("color.gradient"),[m]=Ra(),p=(0,se.useReducedMotion)(),[h,g]=(0,f.useState)(!1),[y,{width:v}]=(0,se.useResizeObserver)(),[b,E]=(0,f.useState)(v),[w,x]=(0,f.useState)(),S=(0,se.useThrottle)(E,250,La);(0,f.useLayoutEffect)((()=>{v&&S(v)}),[v,S]),(0,f.useLayoutEffect)((()=>{const e=b?b/248:1,t=e-(w||0);!(Math.abs(t)>.1)&&w||x(e)}),[b,w]);const C=w||(v?v/248:1),{paletteColors:k,highlightedColors:T}=st(),P=(0,f.useMemo)((()=>m?[...m,{css:"html{overflow:hidden}body{min-width: 0;padding: 0;border: none;}",isGlobalStyles:!0}]:m),[m]),N=!!v;return(0,l.createElement)(l.Fragment,null,(0,l.createElement)("div",{style:{position:"relative"}},y),N&&(0,l.createElement)(we.__unstableIframe,{className:"edit-site-global-styles-preview__iframe",style:{width:"100%",height:152*C},onMouseEnter:()=>g(!0),onMouseLeave:()=>g(!1),tabIndex:-1},(0,l.createElement)(we.__unstableEditorStyles,{styles:P}),(0,l.createElement)(_.__unstableMotion.div,{style:{height:152*C,width:"100%",background:null!=d?d:u,cursor:n?"pointer":void 0},initial:"start",animate:(h||t)&&!p&&e?"hover":"start"},(0,l.createElement)(_.__unstableMotion.div,{variants:Da,style:{height:"100%",overflow:"hidden"}},(0,l.createElement)(_.__experimentalHStack,{spacing:10*C,justify:"center",style:{height:"100%",overflow:"hidden"}},(0,l.createElement)(_.__unstableMotion.div,{style:{fontFamily:s,fontSize:65*C,color:c,fontWeight:i},animate:{scale:1,opacity:1},initial:{scale:.1,opacity:0},transition:{delay:.3,type:"tween"}},"Aa"),(0,l.createElement)(_.__experimentalVStack,{spacing:4*C},T.map((({slug:e,color:t},n)=>(0,l.createElement)(_.__unstableMotion.div,{key:e,style:{height:32*C,width:32*C,background:t,borderRadius:32*C/2},animate:{scale:1,opacity:1},initial:{scale:.1,opacity:0},transition:{delay:1===n?.2:.1}})))))),(0,l.createElement)(_.__unstableMotion.div,{variants:n&&Fa,style:{height:"100%",width:"100%",position:"absolute",top:0,overflow:"hidden",filter:"blur(60px)",opacity:.1}},(0,l.createElement)(_.__experimentalHStack,{spacing:0,justify:"flex-start",style:{height:"100%",overflow:"hidden"}},k.slice(0,4).map((({color:e},t)=>(0,l.createElement)("div",{key:t,style:{height:"100%",background:e,flexGrow:1}}))))),(0,l.createElement)(_.__unstableMotion.div,{variants:Ba,style:{height:"100%",width:"100%",overflow:"hidden",position:"absolute",top:0}},(0,l.createElement)(_.__experimentalVStack,{spacing:3*C,justify:"center",style:{height:"100%",overflow:"hidden",padding:10*C,boxSizing:"border-box"}},e&&(0,l.createElement)("div",{style:{fontSize:40*C,fontFamily:s,color:c,fontWeight:i,lineHeight:"1em",textAlign:"center"}},e))))))};const{GlobalStylesContext:za,areGlobalStyleConfigsEqual:Ga}=nt(we.privateApis);function Ha({variation:e}){const[t,n]=(0,f.useState)(!1),{base:a,user:r,setUserConfig:s}=(0,f.useContext)(za),i=(0,f.useMemo)((()=>{var t,n;return{user:{settings:null!==(t=e.settings)&&void 0!==t?t:{},styles:null!==(n=e.styles)&&void 0!==n?n:{}},base:a,merged:Ma(a,e),setUserConfig:()=>{}}}),[e,a]),o=()=>{s((()=>({settings:e.settings,styles:e.styles})))},c=(0,f.useMemo)((()=>Ga(r,e)),[r,e]);let u=e?.title;return e?.description&&(u=(0,b.sprintf)(/* translators: %1$s: variation title. %2$s variation description. */
(0,b.__)("%1$s (%2$s)"),e?.title,e?.description)),(0,l.createElement)(za.Provider,{value:i},(0,l.createElement)("div",{className:v()("edit-site-global-styles-variations_item",{"is-active":c}),role:"button",onClick:o,onKeyDown:e=>{e.keyCode===Sa.ENTER&&(e.preventDefault(),o())},tabIndex:"0","aria-label":u,"aria-current":c,onFocus:()=>n(!0),onBlur:()=>n(!1)},(0,l.createElement)("div",{className:"edit-site-global-styles-variations_item-preview"},(0,l.createElement)(Va,{label:e?.title,isFocused:t,withHoverView:!0}))))}function Ua(){const e=(0,d.useSelect)((e=>e(Se.store).__experimentalGetCurrentThemeGlobalStylesVariations()),[]),t=(0,f.useMemo)((()=>[{title:(0,b.__)("Default"),settings:{},styles:{}},...(null!=e?e:[]).map((e=>{var t,n;return{...e,settings:null!==(t=e.settings)&&void 0!==t?t:{},styles:null!==(n=e.styles)&&void 0!==n?n:{}}}))]),[e]);return(0,l.createElement)(_.__experimentalGrid,{columns:2,className:"edit-site-global-styles-style-variations-container"},t.map(((e,t)=>(0,l.createElement)(Ha,{key:t,variation:e}))))}function Wa({variation:e="default",direction:t,resizeWidthBy:n}){return(0,l.createElement)(l.Fragment,null,(0,l.createElement)("button",{className:`resizable-editor__drag-handle is-${t} is-variation-${e}`,"aria-label":(0,b.__)("Drag to resize"),"aria-describedby":`resizable-editor__resize-help-${t}`,onKeyDown:function(e){const{keyCode:a}=e;"left"===t&&a===Sa.LEFT||"right"===t&&a===Sa.RIGHT?n(20):("left"===t&&a===Sa.RIGHT||"right"===t&&a===Sa.LEFT)&&n(-20)},type:"button"}),(0,l.createElement)(_.VisuallyHidden,{id:`resizable-editor__resize-help-${t}`},(0,b.__)("Use left and right arrow keys to resize the canvas.")))}const ja={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};var Za=function({enableResizing:e,height:t,children:n}){const[a,r]=(0,f.useState)("100%"),s=(0,f.useRef)(),i=(0,f.useCallback)((e=>{s.current&&r(s.current.offsetWidth+e)}),[]);return(0,l.createElement)(_.ResizableBox,{ref:e=>{s.current=e?.resizable},size:{width:e?a:"100%",height:e&&t?t:"100%"},onResizeStop:(e,t,n)=>{r(n.style.width)},minWidth:300,maxWidth:"100%",maxHeight:"100%",enable:{left:e,right:e},showHandle:e,resizeRatio:2,handleComponent:{left:(0,l.createElement)(Wa,{direction:"left",resizeWidthBy:i}),right:(0,l.createElement)(Wa,{direction:"right",resizeWidthBy:i})},handleClasses:void 0,handleStyles:{left:ja,right:ja}},n)};function qa(e){switch(e){case"style-book":return(0,b.__)("Style Book");case"global-styles-revisions":case"global-styles-revisions:style-book":return(0,b.__)("Global styles revisions");default:return""}}const{createPrivateSlotFill:Ya}=nt(_.privateApis),{privateKey:Ka,Slot:Xa,Fill:Ja}=Ya("EditSiteEditorCanvasContainerSlot");function Qa({children:e,closeButtonLabel:t,onClose:n,enableResizing:a=!1}){const{editorCanvasContainerView:r,showListViewByDefault:s}=(0,d.useSelect)((e=>({editorCanvasContainerView:nt(e(ia)).getEditorCanvasContainerView(),showListViewByDefault:e(k.store).get("core","showListViewByDefault")})),[]),[i,o]=(0,f.useState)(!1),{setEditorCanvasContainerView:c}=nt((0,d.useDispatch)(ia)),{setIsListViewOpened:u}=(0,d.useDispatch)(g.store),m=(0,se.useFocusOnMount)("firstElement"),p=(0,se.useFocusReturn)(),h=(0,f.useMemo)((()=>qa(r)),[r]);function y(){u(s),c(void 0),o(!0),"function"==typeof n&&n()}const v=Array.isArray(e)?f.Children.map(e,((e,t)=>0===t?(0,f.cloneElement)(e,{ref:p}):e)):(0,f.cloneElement)(e,{ref:p});if(i)return null;const E=n||t;return(0,l.createElement)(Ja,null,(0,l.createElement)(Za,{enableResizing:a},(0,l.createElement)("section",{className:"edit-site-editor-canvas-container",ref:E?m:null,onKeyDown:function(e){e.keyCode!==Sa.ESCAPE||e.defaultPrevented||(e.preventDefault(),y())},"aria-label":h},E&&(0,l.createElement)(_.Button,{className:"edit-site-editor-canvas-container__close-button",icon:T,label:t||(0,b.__)("Close"),onClick:y,showTooltip:!1}),v)))}Qa.Slot=Xa;var $a=Qa;const{ExperimentalBlockEditorProvider:er,useGlobalStyle:tr,GlobalStylesContext:nr,useGlobalStylesOutputWithConfig:ar}=nt(we.privateApis),{CompositeV2:rr,CompositeItemV2:sr,useCompositeStoreV2:ir,Tabs:or}=nt(_.privateApis);function lr(e){return!e||0===Object.keys(e).length}function cr(){return[{name:"core/heading",title:(0,b.__)("Headings"),category:"text",blocks:[(0,c.createBlock)("core/heading",{content:(0,b.__)("Code Is Poetry"),level:1}),(0,c.createBlock)("core/heading",{content:(0,b.__)("Code Is Poetry"),level:2}),(0,c.createBlock)("core/heading",{content:(0,b.__)("Code Is Poetry"),level:3}),(0,c.createBlock)("core/heading",{content:(0,b.__)("Code Is Poetry"),level:4}),(0,c.createBlock)("core/heading",{content:(0,b.__)("Code Is Poetry"),level:5})]},...(0,c.getBlockTypes)().filter((e=>{const{name:t,example:n,supports:a}=e;return"core/heading"!==t&&!!n&&!1!==a.inserter})).map((e=>({name:e.name,title:e.title,category:e.category,blocks:(0,c.getBlockFromExample)(e.name,e.example)})))]}const ur=({category:e,examples:t,isSelected:n,onClick:a,onSelect:r,settings:s,sizes:i,title:o})=>{const[c,u]=(0,f.useState)(!1),d={role:"button",onFocus:()=>u(!0),onBlur:()=>u(!1),onKeyDown:e=>{if(e.defaultPrevented)return;const{keyCode:t}=e;!a||t!==Sa.ENTER&&t!==Sa.SPACE||(e.preventDefault(),a(e))},onClick:e=>{e.defaultPrevented||a&&(e.preventDefault(),a(e))},readonly:!0},m=a?"body { cursor: pointer; } body * { pointer-events: none; }":"";return(0,l.createElement)(we.__unstableIframe,{className:v()("edit-site-style-book__iframe",{"is-focused":c&&!!a,"is-button":!!a}),name:"style-book-canvas",tabIndex:0,...a?d:{}},(0,l.createElement)(we.__unstableEditorStyles,{styles:s.styles}),(0,l.createElement)("style",null,'.is-root-container { display: flow-root; }\n\t\t\t\t\t\tbody { position: relative; padding: 32px !important; }\n\t.edit-site-style-book__examples {\n\t\tmax-width: 900px;\n\t\tmargin: 0 auto;\n\t}\n\n\t.edit-site-style-book__example {\n\t\tborder-radius: 2px;\n\t\tcursor: pointer;\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\t\tgap: 40px;\n\t\tmargin-bottom: 40px;\n\t\tpadding: 16px;\n\t\twidth: 100%;\n\t\tbox-sizing: border-box;\n\t\tscroll-margin-top: 32px;\n\t\tscroll-margin-bottom: 32px;\n\t}\n\n\t.edit-site-style-book__example.is-selected {\n\t\tbox-shadow: 0 0 0 1px var(--wp-components-color-accent, var(--wp-admin-theme-color, #007cba));\n\t}\n\n\t.edit-site-style-book__example:focus:not(:disabled) {\n\t\tbox-shadow: 0 0 0 var(--wp-admin-border-width-focus) var(--wp-components-color-accent, var(--wp-admin-theme-color, #007cba));\n\t\toutline: 3px solid transparent;\n\t}\n\n\t.edit-site-style-book__examples.is-wide .edit-site-style-book__example {\n\t\tflex-direction: row;\n\t}\n\n\t.edit-site-style-book__example-title {\n\t\tfont-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;\n\t\tfont-size: 11px;\n\t\tfont-weight: 500;\n\t\tline-height: normal;\n\t\tmargin: 0;\n\t\ttext-align: left;\n\t\ttext-transform: uppercase;\n\t}\n\n\t.edit-site-style-book__examples.is-wide .edit-site-style-book__example-title {\n\t\ttext-align: right;\n\t\twidth: 120px;\n\t}\n\n\t.edit-site-style-book__example-preview {\n\t\twidth: 100%;\n\t}\n\n\t.edit-site-style-book__example-preview .block-editor-block-list__insertion-point,\n\t.edit-site-style-book__example-preview .block-list-appender {\n\t\tdisplay: none;\n\t}\n\n\t.edit-site-style-book__example-preview .is-root-container > .wp-block:first-child {\n\t\tmargin-top: 0;\n\t}\n\t.edit-site-style-book__example-preview .is-root-container > .wp-block:last-child {\n\t\tmargin-bottom: 0;\n\t}\n'+m),(0,l.createElement)(dr,{className:v()("edit-site-style-book__examples",{"is-wide":i.width>600}),examples:t,category:e,label:o?(0,b.sprintf)(
// translators: %s: Category of blocks, e.g. Text.
(0,b.__)("Examples of blocks in the %s category"),o):(0,b.__)("Examples of blocks"),isSelected:n,onSelect:r,key:e}))},dr=(0,f.memo)((({className:e,examples:t,category:n,label:a,isSelected:r,onSelect:s})=>{const i=ir({orientation:"vertical"});return(0,l.createElement)(rr,{store:i,className:e,"aria-label":a,role:"grid"},t.filter((e=>!n||e.category===n)).map((e=>(0,l.createElement)(mr,{key:e.name,id:`example-${e.name}`,title:e.title,blocks:e.blocks,isSelected:r(e.name),onClick:()=>{s?.(e.name)}}))))})),mr=({id:e,title:t,blocks:n,isSelected:a,onClick:r})=>{const s=(0,d.useSelect)((e=>e(we.store).getSettings()),[]),i=(0,f.useMemo)((()=>({...s,__unstableIsPreviewMode:!0})),[s]),o=(0,f.useMemo)((()=>Array.isArray(n)?n:[n]),[n]);return(0,l.createElement)("div",{role:"row"},(0,l.createElement)("div",{role:"gridcell"},(0,l.createElement)(sr,{className:v()("edit-site-style-book__example",{"is-selected":a}),id:e,"aria-label":(0,b.sprintf)(
// translators: %s: Title of a block, e.g. Heading.
(0,b.__)("Open %s styles in Styles panel"),t),render:(0,l.createElement)("div",null),role:"button",onClick:r},(0,l.createElement)("span",{className:"edit-site-style-book__example-title"},t),(0,l.createElement)("div",{className:"edit-site-style-book__example-preview","aria-hidden":!0},(0,l.createElement)(_.Disabled,{className:"edit-site-style-book__example-preview__content"},(0,l.createElement)(er,{value:o,settings:i},(0,l.createElement)(we.BlockList,{renderAppender:!1})))))))};var pr=function({enableResizing:e=!0,isSelected:t,onClick:n,onSelect:a,showCloseButton:r=!0,onClose:s,showTabs:i=!0,userConfig:o={}}){const[u,m]=(0,se.useResizeObserver)(),[p]=tr("color.text"),[h]=tr("color.background"),g=(0,f.useMemo)(cr,[]),y=(0,f.useMemo)((()=>(0,c.getCategories)().filter((e=>g.some((t=>t.category===e.slug)))).map((e=>({name:e.slug,title:e.title,icon:e.icon})))),[g]),{base:_}=(0,f.useContext)(nr),E=(0,f.useMemo)((()=>lr(o)||lr(_)?{}:Ma(_,o)),[_,o]),w=(0,d.useSelect)((e=>e(we.store).getSettings()),[]),x=(0,f.useMemo)((()=>({...w,__unstableIsPreviewMode:!0})),[w]),[S]=ar(E);return x.styles=lr(S)||lr(o)?x.styles:S,(0,l.createElement)($a,{onClose:s,enableResizing:e,closeButtonLabel:r?(0,b.__)("Close Style Book"):null},(0,l.createElement)("div",{className:v()("edit-site-style-book",{"is-wide":m.width>600,"is-button":!!n}),style:{color:p,background:h}},u,i?(0,l.createElement)("div",{className:"edit-site-style-book__tabs"},(0,l.createElement)(or,null,(0,l.createElement)(or.TabList,null,y.map((e=>(0,l.createElement)(or.Tab,{tabId:e.name,key:e.name},e.title)))),y.map((e=>(0,l.createElement)(or.TabPanel,{key:e.name,tabId:e.name,focusable:!1},(0,l.createElement)(ur,{category:e.name,examples:g,isSelected:t,onSelect:a,settings:x,sizes:m,title:e.title})))))):(0,l.createElement)(ur,{examples:g,isSelected:t,onClick:n,onSelect:a,settings:x,sizes:m})))};const hr={per_page:-1,_fields:"id,name,avatar_urls",context:"view",capabilities:["edit_theme_options"]},fr={per_page:100,page:1},gr=[],{GlobalStylesContext:yr}=nt(we.privateApis);function vr({query:e}={}){const{user:t}=(0,f.useContext)(yr),n={...fr,...e},{authors:a,currentUser:r,isDirty:s,revisions:i,isLoadingGlobalStylesRevisions:o,revisionsCount:l}=(0,d.useSelect)((e=>{var t;const{__experimentalGetDirtyEntityRecords:a,getCurrentUser:r,getUsers:s,getRevisions:i,__experimentalGetCurrentGlobalStylesId:o,getEntityRecord:l,isResolving:c}=e(Se.store),u=a(),d=r(),m=u.length>0,p=o(),h=p?l("root","globalStyles",p):void 0,f=null!==(t=h?._links?.["version-history"]?.[0]?.count)&&void 0!==t?t:0,g=i("root","globalStyles",p,n)||gr;return{authors:s(hr)||gr,currentUser:d,isDirty:m,revisions:g,isLoadingGlobalStylesRevisions:c("getRevisions",["root","globalStyles",p,n]),revisionsCount:f}}),[e]);return(0,f.useMemo)((()=>{if(!a.length||o)return{revisions:gr,hasUnsavedChanges:s,isLoading:!0,revisionsCount:l};const e=i.map((e=>({...e,author:a.find((t=>t.id===e.author))})));if(i.length){if("unsaved"!==e[0].id&&1===n.page&&(e[0].isLatest=!0),s&&t&&Object.keys(t).length>0&&r&&1===n.page){const n={id:"unsaved",styles:t?.styles,settings:t?.settings,author:{name:r?.name,avatar_urls:r?.avatar_urls},modified:new Date};e.unshift(n)}n.page===Math.ceil(l/n.per_page)&&e.push({id:"parent",styles:{},settings:{}})}return{revisions:e,hasUnsavedChanges:s,isLoading:!1,revisionsCount:l}}),[s,i,r,a,t,o])}var _r=window.wp.date,br=(0,l.createElement)(E.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(E.Path,{d:"M5.5 12h1.75l-2.5 3-2.5-3H4a8 8 0 113.134 6.35l.907-1.194A6.5 6.5 0 105.5 12zm9.53 1.97l-2.28-2.28V8.5a.75.75 0 00-1.5 0V12a.747.747 0 00.218.529l1.282-.84-1.28.842 2.5 2.5a.75.75 0 101.06-1.061z"}));function Er({children:e}){return(0,l.createElement)(_.__experimentalText,{className:"edit-site-sidebar-navigation-details-screen-panel__label"},e)}function wr({label:e,children:t,className:n,...a}){return(0,l.createElement)(_.__experimentalHStack,{key:e,spacing:5,alignment:"left",className:v()("edit-site-sidebar-navigation-details-screen-panel__row",n),...a},t)}function xr({children:e}){return(0,l.createElement)(_.__experimentalText,{className:"edit-site-sidebar-navigation-details-screen-panel__value"},e)}function Sr({title:e,children:t,spacing:n}){return(0,l.createElement)(_.__experimentalVStack,{className:"edit-site-sidebar-navigation-details-screen-panel",spacing:n},e&&(0,l.createElement)(_.__experimentalHeading,{className:"edit-site-sidebar-navigation-details-screen-panel__heading",level:2},e),t)}function Cr({record:e,...t}){const n={};return e?._links?.["predecessor-version"]?.[0]?.id&&(n.href=(0,Et.addQueryArgs)("revision.php",{revision:e?._links["predecessor-version"][0].id}),n.as="a"),(0,l.createElement)(_.__experimentalItemGroup,{className:"edit-site-sidebar-navigation-screen-details-footer"},(0,l.createElement)(ba,{"aria-label":(0,b.__)("Revisions"),...n,...t},(0,l.createElement)(wr,{justify:"space-between"},(0,l.createElement)(Er,null,(0,b.__)("Last modified")),(0,l.createElement)(xr,null,(0,f.createInterpolateElement)((0,b.sprintf)(/* translators: %s: is the relative time when the post was last modified. */
(0,b.__)("<time>%s</time>"),(0,_r.humanTimeDiff)(e.modified)),{time:(0,l.createElement)("time",{dateTime:e.modified})})),(0,l.createElement)(_.Icon,{className:"edit-site-sidebar-navigation-screen-details-footer__icon",icon:br}))))}const kr=()=>{};function Tr(e){const{openGeneralSidebar:t}=(0,d.useDispatch)(ia),{setCanvasMode:n}=nt((0,d.useDispatch)(ia));return(0,d.useSelect)((e=>!!e(Se.store).__experimentalGetCurrentThemeGlobalStylesVariations()?.length),[])?(0,l.createElement)(_.__experimentalNavigatorButton,{...e,as:ba,path:"/wp_global_styles"}):(0,l.createElement)(ba,{...e,onClick:()=>{n("edit"),t("edit-site/global-styles")}})}function Pr(){const{storedSettings:e}=(0,d.useSelect)((e=>{const{getSettings:t}=nt(e(ia));return{storedSettings:t()}}),[]);return(0,l.createElement)(we.BlockEditorProvider,{settings:e,onChange:kr,onInput:kr},(0,l.createElement)(Ua,null))}function Nr(){const{revisions:e,isLoading:t}=vr(),{openGeneralSidebar:n}=(0,d.useDispatch)(ia),{setIsListViewOpened:a}=(0,d.useDispatch)(g.store),r=(0,se.useViewportMatch)("medium","<"),{setCanvasMode:s,setEditorCanvasContainerView:i}=nt((0,d.useDispatch)(ia)),{isViewMode:o,isStyleBookOpened:c,revisionsCount:u}=(0,d.useSelect)((e=>{var t;const{getCanvasMode:n,getEditorCanvasContainerView:a}=nt(e(ia)),{getEntityRecord:r,__experimentalGetCurrentGlobalStylesId:s}=e(Se.store),i=s(),o=i?r("root","globalStyles",i):void 0;return{isViewMode:"view"===n(),isStyleBookOpened:"style-book"===a(),revisionsCount:null!==(t=o?._links?.["version-history"]?.[0]?.count)&&void 0!==t?t:0}}),[]),m=(0,f.useCallback)((async()=>Promise.all([s("edit"),n("edit-site/global-styles")])),[s,n]),p=(0,f.useCallback)((async()=>{await m(),i("style-book"),a(!1)}),[m,i,a]),h=(0,f.useCallback)((async()=>{await m(),i("global-styles-revisions")}),[m,i]),y=u>0,v=e?.[0]?.modified,_=y&&!t&&v;return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(ya,{title:(0,b.__)("Styles"),description:(0,b.__)("Choose a different style combination for the theme styles."),content:(0,l.createElement)(Pr,null),footer:_&&(0,l.createElement)(Cr,{record:e?.[0],onClick:h}),actions:(0,l.createElement)(l.Fragment,null,!r&&(0,l.createElement)(fa,{icon:Ea,label:(0,b.__)("Style Book"),onClick:()=>i(c?void 0:"style-book"),isPressed:c}),(0,l.createElement)(fa,{icon:xa,label:(0,b.__)("Edit styles"),onClick:async()=>await m()}))}),c&&!r&&o&&(0,l.createElement)(pr,{enableResizing:!1,isSelected:()=>!1,onClick:p,onSelect:p,showCloseButton:!1,showTabs:!1}))}const Ir="isTemplatePartMoveHintVisible";function Mr(){const e=(0,d.useSelect)((e=>{var t;return null===(t=e(k.store).get("core",Ir))||void 0===t||t}),[]),{set:t}=(0,d.useDispatch)(k.store);return e?(0,l.createElement)(_.Notice,{politeness:"polite",className:"edit-site-sidebar__notice",onRemove:()=>{t("core",Ir,!1)}},(0,b.__)('Looking for template parts? Find them in "Patterns".')):null}function Ar(){const{location:e}=(0,_.__experimentalUseNavigator)(),{setEditorCanvasContainerView:t}=nt((0,d.useDispatch)(ia));return(0,f.useEffect)((()=>{"/"===e?.path&&t(void 0)}),[t,e?.path]),(0,l.createElement)(ya,{isRoot:!0,title:(0,b.__)("Design"),description:(0,b.__)("Customize the appearance of your website using the block editor."),content:(0,l.createElement)(l.Fragment,null,(0,l.createElement)(_.__experimentalItemGroup,null,(0,l.createElement)(_.__experimentalNavigatorButton,{as:ba,path:"/navigation",withChevron:!0,icon:ua},(0,b.__)("Navigation")),(0,l.createElement)(Tr,{withChevron:!0,icon:da},(0,b.__)("Styles")),(0,l.createElement)(_.__experimentalNavigatorButton,{as:ba,path:"/page",withChevron:!0,icon:ma},(0,b.__)("Pages")),(0,l.createElement)(_.__experimentalNavigatorButton,{as:ba,path:"/wp_template",withChevron:!0,icon:pa},(0,b.__)("Templates")),(0,l.createElement)(_.__experimentalNavigatorButton,{as:ba,path:"/patterns",withChevron:!0,icon:ha},(0,b.__)("Patterns"))),(0,l.createElement)(Mr,null))})}var Or=(0,l.createElement)(E.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(E.Path,{d:"M12 4L4 7.9V20h16V7.9L12 4zm6.5 14.5H14V13h-4v5.5H5.5V8.8L12 5.7l6.5 3.1v9.7z"})),Rr=(0,l.createElement)(E.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,l.createElement)(E.Path,{d:"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"})),Dr=(0,l.createElement)(E.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(E.Path,{d:"m21.5 9.1-6.6-6.6-4.2 5.6c-1.2-.1-2.4.1-3.6.7-.1 0-.1.1-.2.1-.5.3-.9.6-1.2.9l3.7 3.7-5.7 5.7v1.1h1.1l5.7-5.7 3.7 3.7c.4-.4.7-.8.9-1.2.1-.1.1-.2.2-.3.6-1.1.8-2.4.6-3.6l5.6-4.1zm-7.3 3.5.1.9c.1.9 0 1.8-.4 2.6l-6-6c.8-.4 1.7-.5 2.6-.4l.9.1L15 4.9 19.1 9l-4.9 3.6z"})),Fr=(0,l.createElement)(E.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,l.createElement)(E.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M11.934 7.406a1 1 0 0 0 .914.594H19a.5.5 0 0 1 .5.5v9a.5.5 0 0 1-.5.5H5a.5.5 0 0 1-.5-.5V6a.5.5 0 0 1 .5-.5h5.764a.5.5 0 0 1 .447.276l.723 1.63Zm1.064-1.216a.5.5 0 0 0 .462.31H19a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h5.764a2 2 0 0 1 1.789 1.106l.445 1.084ZM8.5 10.5h7V12h-7v-1.5Zm7 3.5h-7v1.5h7V14Z"})),Br=(0,l.createElement)(E.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(E.Path,{d:"M13 5c-3.3 0-6 2.7-6 6 0 1.4.5 2.7 1.3 3.7l-3.8 3.8 1.1 1.1 3.8-3.8c1 .8 2.3 1.3 3.7 1.3 3.3 0 6-2.7 6-6S16.3 5 13 5zm0 10.5c-2.5 0-4.5-2-4.5-4.5s2-4.5 4.5-4.5 4.5 2 4.5 4.5-2 4.5-4.5 4.5z"})),Lr=(0,l.createElement)(E.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(E.Path,{d:"M19 5H5c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm.5 12c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5V7c0-.3.2-.5.5-.5h14c.3 0 .5.2.5.5v10zm-11-7.6h-.7l-3.1 4.3h2.8V15h1v-1.3h.7v-.8h-.7V9.4zm-.9 3.5H6.3l1.2-1.7v1.7zm5.6-3.2c-.4-.2-.8-.4-1.2-.4-.5 0-.9.1-1.2.4-.4.2-.6.6-.8 1-.2.4-.3.9-.3 1.5s.1 1.1.3 1.6c.2.4.5.8.8 1 .4.2.8.4 1.2.4.5 0 .9-.1 1.2-.4.4-.2.6-.6.8-1 .2-.4.3-1 .3-1.6 0-.6-.1-1.1-.3-1.5-.1-.5-.4-.8-.8-1zm0 3.6c-.1.3-.3.5-.5.7-.2.1-.4.2-.7.2-.3 0-.5-.1-.7-.2-.2-.1-.4-.4-.5-.7-.1-.3-.2-.7-.2-1.2 0-.7.1-1.2.4-1.5.3-.3.6-.5 1-.5s.7.2 1 .5c.3.3.4.8.4 1.5-.1.5-.1.9-.2 1.2zm5-3.9h-.7l-3.1 4.3h2.8V15h1v-1.3h.7v-.8h-.7V9.4zm-1 3.5H16l1.2-1.7v1.7z"})),Vr=(0,l.createElement)(E.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,l.createElement)(E.Path,{d:"M4 4v1.5h16V4H4zm8 8.5h8V11h-8v1.5zM4 20h16v-1.5H4V20zm4-8c0-1.1-.9-2-2-2s-2 .9-2 2 .9 2 2 2 2-.9 2-2z"})),zr=(0,l.createElement)(E.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,l.createElement)(E.Path,{d:"M6 5.5h3a.5.5 0 01.5.5v3a.5.5 0 01-.5.5H6a.5.5 0 01-.5-.5V6a.5.5 0 01.5-.5zM4 6a2 2 0 012-2h3a2 2 0 012 2v3a2 2 0 01-2 2H6a2 2 0 01-2-2V6zm11-.5h3a.5.5 0 01.5.5v3a.5.5 0 01-.5.5h-3a.5.5 0 01-.5-.5V6a.5.5 0 01.5-.5zM13 6a2 2 0 012-2h3a2 2 0 012 2v3a2 2 0 01-2 2h-3a2 2 0 01-2-2V6zm5 8.5h-3a.5.5 0 00-.5.5v3a.5.5 0 00.5.5h3a.5.5 0 00.5-.5v-3a.5.5 0 00-.5-.5zM15 13a2 2 0 00-2 2v3a2 2 0 002 2h3a2 2 0 002-2v-3a2 2 0 00-2-2h-3zm-9 1.5h3a.5.5 0 01.5.5v3a.5.5 0 01-.5.5H6a.5.5 0 01-.5-.5v-3a.5.5 0 01.5-.5zM4 15a2 2 0 012-2h3a2 2 0 012 2v3a2 2 0 01-2 2H6a2 2 0 01-2-2v-3z",fillRule:"evenodd",clipRule:"evenodd"})),Gr=(0,l.createElement)(E.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(E.Path,{fillRule:"evenodd",d:"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",clipRule:"evenodd"})),Hr=(0,l.createElement)(E.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(E.Path,{fillRule:"evenodd",d:"M8.95 11.25H4v1.5h4.95v4.5H13V18c0 1.1.9 2 2 2h3c1.1 0 2-.9 2-2v-3c0-1.1-.9-2-2-2h-3c-1.1 0-2 .9-2 2v.75h-2.55v-7.5H13V9c0 1.1.9 2 2 2h3c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2h-3c-1.1 0-2 .9-2 2v.75H8.95v4.5ZM14.5 15v3c0 .3.2.5.5.5h3c.3 0 .5-.2.5-.5v-3c0-.3-.2-.5-.5-.5h-3c-.3 0-.5.2-.5.5Zm0-6V6c0-.3.2-.5.5-.5h3c.3 0 .5.2.5.5v3c0 .3-.2.5-.5.5h-3c-.3 0-.5-.2-.5-.5Z",clipRule:"evenodd"})),Ur=(0,l.createElement)(E.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,l.createElement)(E.Path,{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm.5 16c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5V7h15v12zM9 10H7v2h2v-2zm0 4H7v2h2v-2zm4-4h-2v2h2v-2zm4 0h-2v2h2v-2zm-4 4h-2v2h2v-2zm4 0h-2v2h2v-2z"})),Wr=(0,l.createElement)(E.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(E.Path,{d:"M4.75 4a.75.75 0 0 0-.75.75v7.826c0 .2.08.39.22.53l6.72 6.716a2.313 2.313 0 0 0 3.276-.001l5.61-5.611-.531-.53.532.528a2.315 2.315 0 0 0 0-3.264L13.104 4.22a.75.75 0 0 0-.53-.22H4.75ZM19 12.576a.815.815 0 0 1-.236.574l-5.61 5.611a.814.814 0 0 1-1.153 0L5.5 12.264V5.5h6.763l6.5 6.502a.816.816 0 0 1 .237.574ZM8.75 9.75a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z"})),jr=(0,l.createElement)(E.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(E.Path,{d:"m7 6.5 4 2.5-4 2.5z"}),(0,l.createElement)(E.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"m5 3c-1.10457 0-2 .89543-2 2v14c0 1.1046.89543 2 2 2h14c1.1046 0 2-.8954 2-2v-14c0-1.10457-.8954-2-2-2zm14 1.5h-14c-.27614 0-.5.22386-.5.5v10.7072l3.62953-2.6465c.25108-.1831.58905-.1924.84981-.0234l2.92666 1.8969 3.5712-3.4719c.2911-.2831.7545-.2831 1.0456 0l2.9772 2.8945v-9.3568c0-.27614-.2239-.5-.5-.5zm-14.5 14.5v-1.4364l4.09643-2.987 2.99567 1.9417c.2936.1903.6798.1523.9307-.0917l3.4772-3.3806 3.4772 3.3806.0228-.0234v2.5968c0 .2761-.2239.5-.5.5h-14c-.27614 0-.5-.2239-.5-.5z"})),Zr=(0,l.createElement)(E.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(E.Path,{d:"M11 12.5V17.5H12.5V12.5H17.5V11H12.5V6H11V11H6V12.5H11Z"})),qr=(0,l.createElement)(E.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(E.Path,{d:"m7.3 9.7 1.4 1.4c.2-.2.3-.3.4-.5 0 0 0-.1.1-.1.3-.5.4-1.1.3-1.6L12 7 9 4 7.2 6.5c-.6-.1-1.1 0-1.6.3 0 0-.1 0-.1.1-.3.1-.4.2-.6.4l1.4 1.4L4 11v1h1l2.3-2.3zM4 20h9v-1.5H4V20zm0-5.5V16h16v-1.5H4z"}));const Yr=(e,t)=>{let n=e;return t.split(".").forEach((e=>{n=n?.[e]})),n},Kr=()=>(0,d.useSelect)((e=>e(Se.store).getEntityRecords("postType",It,{per_page:-1})),[]),Xr=()=>(0,d.useSelect)((e=>e(g.store).__experimentalGetDefaultTemplateTypes()),[]),Jr=()=>{const e=(0,d.useSelect)((e=>e(Se.store).getPostTypes({per_page:-1})),[]);return(0,f.useMemo)((()=>{const t=["attachment"];return e?.filter((({viewable:e,slug:n})=>e&&!t.includes(n)))}),[e])};function Qr(e){const t=(0,f.useMemo)((()=>e?.reduce(((e,{labels:t})=>{const n=t.singular_name.toLowerCase();return e[n]=(e[n]||0)+1,e}),{})));return(0,f.useCallback)((({labels:e,slug:n})=>{const a=e.singular_name.toLowerCase();return t[a]>1&&a!==n}),[t])}function $r(){const e=Jr(),t=(0,f.useMemo)((()=>e?.filter((e=>e.has_archive))),[e]),n=Kr(),a=Qr(t);return(0,f.useMemo)((()=>t?.filter((e=>!(n||[]).some((t=>t.slug==="archive-"+e.slug)))).map((e=>{let t;return t=a(e)?(0,b.sprintf)(
// translators: %1s: Name of the post type e.g: "Post"; %2s: Slug of the post type e.g: "book".
(0,b.__)("Archive: %1$s (%2$s)"),e.labels.singular_name,e.slug):(0,b.sprintf)(
// translators: %s: Name of the post type e.g: "Post".
(0,b.__)("Archive: %s"),e.labels.singular_name),{slug:"archive-"+e.slug,description:(0,b.sprintf)(
// translators: %s: Name of the post type e.g: "Post".
(0,b.__)("Displays an archive with the latest posts of type: %s."),e.labels.singular_name),title:t,icon:e.icon?.startsWith("dashicons-")?e.icon.slice(10):Fr,templatePrefix:"archive"}}))||[]),[t,n,a])}const es=e=>{const t=Jr(),n=Kr(),a=Xr(),r=Qr(t),s=(0,f.useMemo)((()=>t?.reduce(((e,{slug:t})=>{let n=t;return"page"!==t&&(n=`single-${n}`),e[t]=n,e}),{})),[t]),i=rs("postType",s),o=(n||[]).map((({slug:e})=>e)),l=(t||[]).reduce(((t,n)=>{const{slug:l,labels:c,icon:u}=n,d=s[l],m=a?.find((({slug:e})=>e===d)),p=o?.includes(d),h=r(n);let f=(0,b.sprintf)(
// translators: %s: Name of the post type e.g: "Post".
(0,b.__)("Single item: %s"),c.singular_name);h&&(f=(0,b.sprintf)(
// translators: %1s: Name of the post type e.g: "Post"; %2s: Slug of the post type e.g: "book".
(0,b.__)("Single item: %1$s (%2$s)"),c.singular_name,l));const g=m?{...m,templatePrefix:s[l]}:{slug:d,title:f,description:(0,b.sprintf)(
// translators: %s: Name of the post type e.g: "Post".
(0,b.__)("Displays a single item: %s."),c.singular_name),icon:u?.startsWith("dashicons-")?u.slice(10):qr,templatePrefix:s[l]},y=i?.[l]?.hasEntities;return y&&(g.onClick=t=>{e({type:"postType",slug:l,config:{recordNamePath:"title.rendered",queryArgs:({search:e})=>({_fields:"id,title,slug,link",orderBy:e?"relevance":"modified",exclude:i[l].existingEntitiesIds}),getSpecificTemplate:e=>{const t=`${s[l]}-${e.slug}`;return{title:t,slug:t,templatePrefix:s[l]}}},labels:c,hasGeneralTemplate:p,template:t})}),p&&!y||t.push(g),t}),[]),c=(0,f.useMemo)((()=>l.reduce(((e,t)=>{const{slug:n}=t;let a="postTypesMenuItems";return"page"===n&&(a="defaultPostTypesMenuItems"),e[a].push(t),e}),{defaultPostTypesMenuItems:[],postTypesMenuItems:[]})),[l]);return c},ts=e=>{const t=(()=>{const e=(0,d.useSelect)((e=>e(Se.store).getTaxonomies({per_page:-1})),[]);return(0,f.useMemo)((()=>e?.filter((({visibility:e})=>e?.publicly_queryable))),[e])})(),n=Kr(),a=Xr(),r=(0,f.useMemo)((()=>t?.reduce(((e,{slug:t})=>{let n=t;return["category","post_tag"].includes(t)||(n=`taxonomy-${n}`),"post_tag"===t&&(n="tag"),e[t]=n,e}),{})),[t]),s=t?.reduce(((e,{labels:t})=>{const n=t.singular_name.toLowerCase();return e[n]=(e[n]||0)+1,e}),{}),i=rs("taxonomy",r),o=(n||[]).map((({slug:e})=>e)),l=(t||[]).reduce(((t,n)=>{const{slug:l,labels:c}=n,u=r[l],d=a?.find((({slug:e})=>e===u)),m=o?.includes(u),p=((e,t)=>{if(["category","post_tag"].includes(t))return!1;const n=e.singular_name.toLowerCase();return s[n]>1&&n!==t})(c,l);let h=c.singular_name;p&&(h=(0,b.sprintf)(
// translators: %1s: Name of the taxonomy e.g: "Category"; %2s: Slug of the taxonomy e.g: "product_cat".
(0,b.__)("%1$s (%2$s)"),c.singular_name,l));const f=d?{...d,templatePrefix:r[l]}:{slug:u,title:h,description:(0,b.sprintf)(
// translators: %s: Name of the taxonomy e.g: "Product Categories".
(0,b.__)("Displays taxonomy: %s."),c.singular_name),icon:Hr,templatePrefix:r[l]},g=i?.[l]?.hasEntities;return g&&(f.onClick=t=>{e({type:"taxonomy",slug:l,config:{queryArgs:({search:e})=>({_fields:"id,name,slug,link",orderBy:e?"name":"count",exclude:i[l].existingEntitiesIds}),getSpecificTemplate:e=>{const t=`${r[l]}-${e.slug}`;return{title:t,slug:t,templatePrefix:r[l]}}},labels:c,hasGeneralTemplate:m,template:t})}),m&&!g||t.push(f),t}),[]);return(0,f.useMemo)((()=>l.reduce(((e,t)=>{const{slug:n}=t;let a="taxonomiesMenuItems";return["category","tag"].includes(n)&&(a="defaultTaxonomiesMenuItems"),e[a].push(t),e}),{defaultTaxonomiesMenuItems:[],taxonomiesMenuItems:[]})),[l])},ns={user:"author"},as={user:{who:"authors"}},rs=(e,t,n={})=>{const a=((e,t,n={})=>{const a=(e=>{const t=Kr();return(0,f.useMemo)((()=>Object.entries(e||{}).reduce(((e,[n,a])=>{const r=(t||[]).reduce(((e,t)=>{const n=`${a}-`;return t.slug.startsWith(n)&&e.push(t.slug.substring(n.length)),e}),[]);return r.length&&(e[n]=r),e}),{})),[e,t])})(t);return(0,d.useSelect)((t=>Object.entries(a||{}).reduce(((a,[r,s])=>{const i=t(Se.store).getEntityRecords(e,r,{_fields:"id",context:"view",slug:s,...n[r]});return i?.length&&(a[r]=i),a}),{})),[a])})(e,t,n);return(0,d.useSelect)((r=>Object.keys(t||{}).reduce(((t,s)=>{const i=a?.[s]?.map((({id:e})=>e))||[];return t[s]={hasEntities:!!r(Se.store).getEntityRecords(e,s,{per_page:1,_fields:"id",context:"view",exclude:i,...n[s]})?.length,existingEntitiesIds:i},t}),{})),[t,a])},{CompositeV2:ss,CompositeItemV2:is,useCompositeStoreV2:os}=nt(_.privateApis),ls=[];function cs({suggestion:e,search:t,onSelect:n,entityForSuggestions:a}){const r="edit-site-custom-template-modal__suggestions_list__list-item";return(0,l.createElement)(is,{render:(0,l.createElement)(_.Button,{role:"option",className:r,onClick:()=>n(a.config.getSpecificTemplate(e))})},(0,l.createElement)(_.__experimentalText,{size:"body",lineHeight:1.53846153846,weight:500,className:`${r}__title`},(0,l.createElement)(_.TextHighlight,{text:(0,an.decodeEntities)(e.name),highlight:t})),e.link&&(0,l.createElement)(_.__experimentalText,{size:"body",lineHeight:1.53846153846,className:`${r}__info`},e.link))}function us({entityForSuggestions:e,onSelect:t}){const n=os({orientation:"vertical"}),[a,r,s]=(0,se.useDebouncedInput)(),i=function(e,t){const{config:n}=e,a=(0,f.useMemo)((()=>({order:"asc",context:"view",search:t,per_page:t?20:10,...n.queryArgs(t)})),[t,n]),{records:r,hasResolved:s}=(0,Se.useEntityRecords)(e.type,e.slug,a),[i,o]=(0,f.useState)(ls);return(0,f.useEffect)((()=>{if(!s)return;let e=ls;var t,a;r?.length&&(e=r,n.recordNamePath&&(t=e,a=n.recordNamePath,e=(t||[]).map((e=>({...e,name:(0,an.decodeEntities)(Yr(e,a))}))))),o(e)}),[r,s]),i}(e,s),{labels:o}=e,[c,u]=(0,f.useState)(!1);return!c&&i?.length>9&&u(!0),(0,l.createElement)(l.Fragment,null,c&&(0,l.createElement)(_.SearchControl,{__nextHasNoMarginBottom:!0,onChange:r,value:a,label:o.search_items,placeholder:o.search_items}),!!i?.length&&(0,l.createElement)(ss,{store:n,role:"listbox",className:"edit-site-custom-template-modal__suggestions_list","aria-label":(0,b.__)("Suggestions list")},i.map((n=>(0,l.createElement)(cs,{key:n.slug,suggestion:n,search:s,onSelect:t,entityForSuggestions:e})))),s&&!i?.length&&(0,l.createElement)(_.__experimentalText,{as:"p",className:"edit-site-custom-template-modal__no-results"},o.not_found))}var ds=function({onSelect:e,entityForSuggestions:t}){const[n,a]=(0,f.useState)(t.hasGeneralTemplate);return(0,l.createElement)(_.__experimentalVStack,{spacing:4,className:"edit-site-custom-template-modal__contents-wrapper",alignment:"left"},!n&&(0,l.createElement)(l.Fragment,null,(0,l.createElement)(_.__experimentalText,{as:"p"},(0,b.__)("Select whether to create a single template for all items or a specific one.")),(0,l.createElement)(_.Flex,{className:"edit-site-custom-template-modal__contents",gap:"4",align:"initial"},(0,l.createElement)(_.FlexItem,{isBlock:!0,as:_.Button,onClick:()=>{const{slug:n,title:a,description:r,templatePrefix:s}=t.template;e({slug:n,title:a,description:r,templatePrefix:s})}},(0,l.createElement)(_.__experimentalText,{as:"span",weight:500,lineHeight:1.53846153846},t.labels.all_items),(0,l.createElement)(_.__experimentalText,{as:"span",lineHeight:1.53846153846},
// translators: The user is given the choice to set up a template for all items of a post type or taxonomy, or just a specific one.
(0,b.__)("For all items"))),(0,l.createElement)(_.FlexItem,{isBlock:!0,as:_.Button,onClick:()=>{a(!0)}},(0,l.createElement)(_.__experimentalText,{as:"span",weight:500,lineHeight:1.53846153846},t.labels.singular_name),(0,l.createElement)(_.__experimentalText,{as:"span",lineHeight:1.53846153846},
// translators: The user is given the choice to set up a template for all items of a post type or taxonomy, or just a specific one.
(0,b.__)("For a specific item"))))),n&&(0,l.createElement)(l.Fragment,null,(0,l.createElement)(_.__experimentalText,{as:"p"},(0,b.__)("This template will be used only for the specific item chosen.")),(0,l.createElement)(us,{entityForSuggestions:t,onSelect:e})))},ms=function(){return ms=Object.assign||function(e){for(var t,n=1,a=arguments.length;n<a;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},ms.apply(this,arguments)};function ps(e){return e.toLowerCase()}Object.create,Object.create,"function"==typeof SuppressedError&&SuppressedError;var hs=[/([a-z0-9])([A-Z])/g,/([A-Z])([A-Z][a-z])/g],fs=/[^A-Z0-9]+/gi;function gs(e,t){void 0===t&&(t={});for(var n=t.splitRegexp,a=void 0===n?hs:n,r=t.stripRegexp,s=void 0===r?fs:r,i=t.transform,o=void 0===i?ps:i,l=t.delimiter,c=void 0===l?" ":l,u=ys(ys(e,a,"$1\0$2"),s,"\0"),d=0,m=u.length;"\0"===u.charAt(d);)d++;for(;"\0"===u.charAt(m-1);)m--;return u.slice(d,m).split("\0").map(o).join(c)}function ys(e,t,n){return t instanceof RegExp?e.replace(t,n):t.reduce((function(e,t){return e.replace(t,n)}),e)}function vs(e,t){return void 0===t&&(t={}),function(e,t){return void 0===t&&(t={}),gs(e,ms({delimiter:"."},t))}(e,ms({delimiter:"-"},t))}var _s=function({onClose:e,createTemplate:t}){const[n,a]=(0,f.useState)(""),r=(0,b.__)("Custom Template"),[s,i]=(0,f.useState)(!1);return(0,l.createElement)("form",{onSubmit:async function(e){if(e.preventDefault(),!s){i(!0);try{await t({slug:"wp-custom-template-"+vs(n||r),title:n||r},!1)}finally{i(!1)}}}},(0,l.createElement)(_.__experimentalVStack,{spacing:6},(0,l.createElement)(_.TextControl,{__nextHasNoMarginBottom:!0,label:(0,b.__)("Name"),value:n,onChange:a,placeholder:r,disabled:s,help:(0,b.__)('Describe the template, e.g. "Post with sidebar". A custom template can be manually applied to any post or page.')}),(0,l.createElement)(_.__experimentalHStack,{className:"edit-site-custom-generic-template__modal-actions",justify:"right"},(0,l.createElement)(_.Button,{variant:"tertiary",onClick:()=>{e()}},(0,b.__)("Cancel")),(0,l.createElement)(_.Button,{variant:"primary",type:"submit",isBusy:s,"aria-disabled":s},(0,b.__)("Create")))))};function bs(){const e="edit-site-template-actions-loading-screen-modal";return(0,l.createElement)(_.Modal,{isFullScreen:!0,isDismissible:!1,shouldCloseOnClickOutside:!1,shouldCloseOnEsc:!1,onRequestClose:()=>{},__experimentalHideHeader:!0,className:e},(0,l.createElement)("div",{className:`${e}__content`},(0,l.createElement)(_.Spinner,null)))}const{useHistory:Es}=nt(bt.privateApis),ws=["front-page","home","single","page","index","archive","author","category","date","tag","search","404"],xs={"front-page":Or,home:Rr,single:Dr,page:ma,archive:Fr,search:Br,404:Lr,index:Vr,category:zr,author:Gr,taxonomy:Hr,date:Ur,tag:Wr,attachment:jr};function Ss({title:e,direction:t,className:n,description:a,icon:r,onClick:s,children:i}){return(0,l.createElement)(_.Button,{className:n,onClick:s,label:a,showTooltip:!!a},(0,l.createElement)(_.Flex,{as:"span",spacing:2,align:"center",justify:"center",style:{width:"100%"},direction:t},(0,l.createElement)("div",{className:"edit-site-add-new-template__template-icon"},(0,l.createElement)(_.Icon,{icon:r})),(0,l.createElement)(_.__experimentalVStack,{className:"edit-site-add-new-template__template-name",alignment:"center",spacing:0},(0,l.createElement)(_.__experimentalText,{weight:500,lineHeight:1.53846153846},e),i)))}const Cs={templatesList:1,customTemplate:2,customGenericTemplate:3};function ks({postType:e,toggleProps:t,showIcon:n=!0}){const[a,r]=(0,f.useState)(!1),[s,i]=(0,f.useState)(Cs.templatesList),[o,c]=(0,f.useState)({}),[u,m]=(0,f.useState)(!1),p=Es(),{saveEntityRecord:h}=(0,d.useDispatch)(Se.store),{createErrorNotice:g,createSuccessNotice:y}=(0,d.useDispatch)(xe.store),{homeUrl:E}=(0,d.useSelect)((e=>{const{getUnstableBase:t}=e(Se.store);return{homeUrl:t()?.home}}),[]),w={"front-page":E,date:(0,b.sprintf)(
// translators: %s: The homepage url.
(0,b.__)("E.g. %s"),E+"/"+(new Date).getFullYear())};async function x(e,t=!0){if(!u){m(!0);try{const{title:n,description:a,slug:r}=e,s=await h("postType",It,{description:a,slug:r.toString(),status:"publish",title:n,is_wp_suggestion:t},{throwOnError:!0});p.push({postId:s.id,postType:s.type,canvas:"edit"}),y((0,b.sprintf)(
// translators: %s: Title of the created template e.g: "Category".
(0,b.__)('"%s" successfully created.'),(0,an.decodeEntities)(s.title?.rendered||n)),{type:"snackbar"})}catch(e){const t=e.message&&"unknown_error"!==e.code?e.message:(0,b.__)("An error occurred while creating the template.");g(t,{type:"snackbar"})}finally{m(!1)}}}const S=()=>{r(!1),i(Cs.templatesList)},C=function(e,t){const n=Kr(),a=Xr(),r=(n||[]).map((({slug:e})=>e)),s=t=>{i(Cs.customTemplate),e(t)},o=[...(a||[]).filter((e=>ws.includes(e.slug)&&!r.includes(e.slug)))],{defaultTaxonomiesMenuItems:l,taxonomiesMenuItems:c}=ts(s),{defaultPostTypesMenuItems:u,postTypesMenuItems:d}=es(s),m=function(e){const t=Kr(),n=Xr(),a=rs("root",ns,as);let r=n?.find((({slug:e})=>"author"===e));r||(r={description:(0,b.__)("Displays latest posts written by a single author."),slug:"author",title:"Author"});const s=!!t?.find((({slug:e})=>"author"===e));if(a.user?.hasEntities&&(r={...r,templatePrefix:"author"},r.onClick=t=>{e({type:"root",slug:"user",config:{queryArgs:({search:e})=>({_fields:"id,name,slug,link",orderBy:e?"name":"registered_date",exclude:a.user.existingEntitiesIds,who:"authors"}),getSpecificTemplate:e=>{const t=`author-${e.slug}`;return{title:t,slug:t,templatePrefix:"author"}}},labels:{singular_name:(0,b.__)("Author"),search_items:(0,b.__)("Search Authors"),not_found:(0,b.__)("No authors found."),all_items:(0,b.__)("All Authors")},hasGeneralTemplate:s,template:t})}),!s||a.user?.hasEntities)return r}(s);[...l,...u,m].forEach((e=>{if(!e)return;const t=o.findIndex((t=>t.slug===e.slug));t>-1?o[t]=e:o.push(e)})),o?.sort(((e,t)=>ws.indexOf(e.slug)-ws.indexOf(t.slug)));return[...o,...$r(),...d,...c]}(c);if(!C.length)return null;const{as:k=_.Button,...T}=null!=t?t:{};let P=(0,b.__)("Add template");return s===Cs.customTemplate?P=(0,b.sprintf)(
// translators: %s: Name of the post type e.g: "Post".
(0,b.__)("Add template: %s"),o.labels.singular_name):s===Cs.customGenericTemplate&&(P=(0,b.__)("Create custom template")),(0,l.createElement)(l.Fragment,null,u&&(0,l.createElement)(bs,null),(0,l.createElement)(k,{...T,onClick:()=>r(!0),icon:n?Zr:null,label:e.labels.add_new_item},n?null:e.labels.add_new_item),a&&(0,l.createElement)(_.Modal,{title:P,className:v()("edit-site-add-new-template__modal",{"edit-site-add-new-template__modal_template_list":s===Cs.templatesList,"edit-site-custom-template-modal":s===Cs.customTemplate}),onRequestClose:S,overlayClassName:s===Cs.customGenericTemplate?"edit-site-custom-generic-template__modal":void 0},s===Cs.templatesList&&(0,l.createElement)(_.__experimentalGrid,{columns:3,gap:4,align:"flex-start",justify:"center",className:"edit-site-add-new-template__template-list__contents"},(0,l.createElement)(_.Flex,{className:"edit-site-add-new-template__template-list__prompt"},(0,b.__)("Select what the new template should apply to:")),C.map((e=>{const{title:t,slug:n,onClick:a}=e;return(0,l.createElement)(Ss,{key:n,title:t,direction:"column",className:"edit-site-add-new-template__template-button",description:w[n],icon:xs[n]||pa,onClick:()=>a?a(e):x(e)})})),(0,l.createElement)(Ss,{title:(0,b.__)("Custom template"),direction:"row",className:"edit-site-add-new-template__custom-template-button",icon:xa,onClick:()=>i(Cs.customGenericTemplate)},(0,l.createElement)(_.__experimentalText,{lineHeight:1.53846153846},(0,b.__)("A custom template can be manually applied to any post or page.")))),s===Cs.customTemplate&&(0,l.createElement)(ds,{onSelect:x,entityForSuggestions:o}),s===Cs.customGenericTemplate&&(0,l.createElement)(_s,{onClose:S,createTemplate:x})))}function Ts({templateType:e=It,...t}){const n=(0,d.useSelect)((t=>t(Se.store).getPostType(e)),[e]);return n&&e===It?(0,l.createElement)(ks,{...t,postType:n}):null}const Ps=({postType:e,postId:t,...n})=>{const a=kt({postType:e,postId:t});return(0,l.createElement)(ba,{...a,...n})};function Ns(){const e=(0,se.useViewportMatch)("medium","<"),{records:t,isResolving:n}=(0,Se.useEntityRecords)("postType",It,{per_page:-1}),a=t?[...t]:[];a.sort(((e,t)=>e.title.rendered.localeCompare(t.title.rendered)));const r=kt({path:"/wp_template/all"}),s=!e;return(0,l.createElement)(ya,{title:(0,b.__)("Templates"),description:(0,b.__)("Express the layout of your site with templates."),actions:s&&(0,l.createElement)(Ts,{templateType:It,toggleProps:{as:fa}}),content:(0,l.createElement)(l.Fragment,null,n&&(0,b.__)("Loading templates…"),!n&&(0,l.createElement)(_.__experimentalItemGroup,null,!t?.length&&(0,l.createElement)(_.__experimentalItem,null,(0,b.__)("No templates found")),a.map((e=>(0,l.createElement)(Ps,{postType:It,postId:e.id,key:e.id,withChevron:!0},(0,an.decodeEntities)(e.title?.rendered||e.slug)))))),footer:!e&&(0,l.createElement)(ba,{withChevron:!0,...r},(0,b.__)("Manage all templates"))})}function Is({postId:e,area:t,title:n}){const a=(0,d.useSelect)((e=>e(g.store).__experimentalGetDefaultTemplatePartAreas().find((e=>e.area===t))),[t]),r=kt({postType:Mt,postId:e});return(0,l.createElement)(ba,{className:"edit-site-sidebar-navigation-screen-template__template-area-button",...r,icon:a?.icon,withChevron:!0},(0,l.createElement)(_.__experimentalTruncate,{limit:20,ellipsizeMode:"tail",numberOfLines:1,className:"edit-site-sidebar-navigation-screen-template__template-area-label-text"},(0,an.decodeEntities)(n)))}function Ms(){const{templatePartAreas:e,currentTemplateParts:t}=(0,d.useSelect)((e=>{const{getSettings:t,getCurrentTemplateTemplateParts:n}=nt(e(ia));return{templatePartAreas:t()?.defaultTemplatePartAreas,currentTemplateParts:n()}}),[]),n=(0,f.useMemo)((()=>{const n=new Set;return t.length&&e?t.filter((e=>{if(!n.has(e.templatePart.id))return n.add(e.templatePart.id),e})).map((({templatePart:t,block:n})=>({...e?.find((({area:e})=>e===t?.area)),...t,clientId:n.clientId}))):[]}),[t,e]);return n.length?(0,l.createElement)(Sr,{title:(0,b.__)("Areas"),spacing:3},(0,l.createElement)(_.__experimentalItemGroup,null,n.map((({clientId:e,label:t,area:n,theme:a,slug:r,title:s})=>(0,l.createElement)(wr,{key:e},(0,l.createElement)(Is,{postId:`${a}//${r}`,title:s?.rendered||t,area:n})))))):null}function As(e,t){const{record:n,title:a,description:r,isLoaded:s,icon:i}=(0,d.useSelect)((n=>{const{getEditedPostType:a,getEditedPostId:r}=n(ia),{getEditedEntityRecord:s,hasFinishedResolution:i}=n(Se.store),{__experimentalGetTemplateInfo:o}=n(g.store),l=null!=e?e:a(),c=null!=t?t:r(),u=s("postType",l,c),d=c&&i("getEditedEntityRecord",["postType",l,c]),m=o(u);return{record:u,title:m.title,description:m.description,isLoaded:d,icon:m.icon}}),[e,t]);return{isLoaded:s,icon:i,record:n,getTitle:()=>a?(0,an.decodeEntities)(a):null,getDescription:()=>r?(0,an.decodeEntities)(r):null}}var Os=(0,l.createElement)(E.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(E.Path,{d:"M10.5 4v4h3V4H15v4h1.5a1 1 0 011 1v4l-3 4v2a1 1 0 01-1 1h-3a1 1 0 01-1-1v-2l-3-4V9a1 1 0 011-1H9V4h1.5zm.5 12.5v2h2v-2l3-4v-3H8v3l3 4z"})),Rs=(0,l.createElement)(E.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(E.Path,{d:"M12 3.3c-4.8 0-8.8 3.9-8.8 8.8 0 4.8 3.9 8.8 8.8 8.8 4.8 0 8.8-3.9 8.8-8.8s-4-8.8-8.8-8.8zm6.5 5.5h-2.6C15.4 7.3 14.8 6 14 5c2 .6 3.6 2 4.5 3.8zm.7 3.2c0 .6-.1 1.2-.2 1.8h-2.9c.1-.6.1-1.2.1-1.8s-.1-1.2-.1-1.8H19c.2.6.2 1.2.2 1.8zM12 18.7c-1-.7-1.8-1.9-2.3-3.5h4.6c-.5 1.6-1.3 2.9-2.3 3.5zm-2.6-4.9c-.1-.6-.1-1.1-.1-1.8 0-.6.1-1.2.1-1.8h5.2c.1.6.1 1.1.1 1.8s-.1 1.2-.1 1.8H9.4zM4.8 12c0-.6.1-1.2.2-1.8h2.9c-.1.6-.1 1.2-.1 1.8 0 .6.1 1.2.1 1.8H5c-.2-.6-.2-1.2-.2-1.8zM12 5.3c1 .7 1.8 1.9 2.3 3.5H9.7c.5-1.6 1.3-2.9 2.3-3.5zM10 5c-.8 1-1.4 2.3-1.8 3.8H5.5C6.4 7 8 5.6 10 5zM5.5 15.3h2.6c.4 1.5 1 2.8 1.8 3.7-1.8-.6-3.5-2-4.4-3.7zM14 19c.8-1 1.4-2.2 1.8-3.7h2.6C17.6 17 16 18.4 14 19z"}));function Ds(e,t){return(0,d.useSelect)((n=>{const{getEntityRecord:a,getMedia:r,getUser:s,getEditedEntityRecord:i}=n(Se.store),o=i("postType",e,t),l=o?.original_source,c=o?.author_text;switch(l){case"theme":return{type:l,icon:pa,text:c,isCustomized:o.source===At.custom};case"plugin":return{type:l,icon:Os,text:c,isCustomized:o.source===At.custom};case"site":{const e=a("root","__unstableBase");return{type:l,icon:Rs,imageUrl:e?.site_logo?r(e.site_logo)?.source_url:void 0,text:c,isCustomized:!1}}default:{const e=s(o.author);return{type:"user",icon:Gr,imageUrl:e?.avatar_urls?.[48],text:c,isCustomized:!1}}}}),[e,t])}function Fs({imageUrl:e}){const[t,n]=(0,f.useState)(!1);return(0,l.createElement)("div",{className:v()("edit-site-list-added-by__avatar",{"is-loaded":t})},(0,l.createElement)("img",{onLoad:()=>n(!0),alt:"",src:e}))}function Bs({postType:e,postId:t}){const{text:n,icon:a,imageUrl:r,isCustomized:s}=Ds(e,t);return(0,l.createElement)(_.__experimentalHStack,{alignment:"left"},r?(0,l.createElement)(Fs,{imageUrl:r}):(0,l.createElement)("div",{className:"edit-site-list-added-by__icon"},(0,l.createElement)(_.Icon,{icon:a})),(0,l.createElement)("span",null,n,s&&(0,l.createElement)("span",{className:"edit-site-list-added-by__customized-info"},e===It?(0,b._x)("Customized","template"):(0,b._x)("Customized","template part"))))}function Ls(e){return!!e&&e.source===At.custom&&!e.has_theme_file}function Vs({template:e,onClose:t}){const n=(0,an.decodeEntities)(e.title.rendered),[a,r]=(0,f.useState)(n),[s,i]=(0,f.useState)(!1),{editEntityRecord:o,__experimentalSaveSpecifiedEntityEdits:c}=(0,d.useDispatch)(Se.store),{createSuccessNotice:u,createErrorNotice:m}=(0,d.useDispatch)(xe.store);return e.type!==It||e.is_custom?(0,l.createElement)(l.Fragment,null,(0,l.createElement)(_.MenuItem,{onClick:()=>{i(!0),r(n)}},(0,b.__)("Rename")),s&&(0,l.createElement)(_.Modal,{title:(0,b.__)("Rename"),onRequestClose:()=>{i(!1)},overlayClassName:"edit-site-list__rename-modal"},(0,l.createElement)("form",{onSubmit:async function(n){n.preventDefault();try{await o("postType",e.type,e.id,{title:a}),r(""),i(!1),t(),await c("postType",e.type,e.id,["title"],{throwOnError:!0}),u(e.type===It?(0,b.__)("Template renamed."):(0,b.__)("Template part renamed."),{type:"snackbar"})}catch(t){const n=e.type===It?(0,b.__)("An error occurred while renaming the template."):(0,b.__)("An error occurred while renaming the template part."),a=t.message&&"unknown_error"!==t.code?t.message:n;m(a,{type:"snackbar"})}}},(0,l.createElement)(_.__experimentalVStack,{spacing:"5"},(0,l.createElement)(_.TextControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,b.__)("Name"),value:a,onChange:r,required:!0}),(0,l.createElement)(_.__experimentalHStack,{justify:"right"},(0,l.createElement)(_.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:()=>{i(!1)}},(0,b.__)("Cancel")),(0,l.createElement)(_.Button,{__next40pxDefaultSize:!0,variant:"primary",type:"submit"},(0,b.__)("Save"))))))):null}function zs({postType:e,postId:t,className:n,toggleProps:a,onRemove:r}){const s=(0,d.useSelect)((n=>n(Se.store).getEntityRecord("postType",e,t)),[e,t]),{removeTemplate:i,revertTemplate:o}=(0,d.useDispatch)(ia),{saveEditedEntityRecord:c}=(0,d.useDispatch)(Se.store),{createSuccessNotice:u,createErrorNotice:m}=(0,d.useDispatch)(xe.store),p=Ls(s),h=sn(s);return p||h?(0,l.createElement)(_.DropdownMenu,{icon:ce,label:(0,b.__)("Actions"),className:n,toggleProps:a},(({onClose:e})=>(0,l.createElement)(_.MenuGroup,null,p&&(0,l.createElement)(l.Fragment,null,(0,l.createElement)(Vs,{template:s,onClose:e}),(0,l.createElement)(Gs,{onRemove:()=>{i(s),r?.(),e()},title:s.title.rendered})),h&&(0,l.createElement)(_.MenuItem,{info:(0,b.__)("Use the template as supplied by the theme."),onClick:()=>{!async function(){try{await o(s,{allowUndo:!1}),await c("postType",s.type,s.id),u((0,b.sprintf)(/* translators: The template/part's name. */
(0,b.__)('"%s" reverted.'),(0,an.decodeEntities)(s.title.rendered)),{type:"snackbar",id:"edit-site-template-reverted"})}catch(e){const t=s.type===It?(0,b.__)("An error occurred while reverting the template."):(0,b.__)("An error occurred while reverting the template part."),n=e.message&&"unknown_error"!==e.code?e.message:t;m(n,{type:"snackbar"})}}(),e()}},(0,b.__)("Clear customizations"))))):null}function Gs({onRemove:e,title:t}){const[n,a]=(0,f.useState)(!1);return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(_.MenuItem,{isDestructive:!0,onClick:()=>a(!0)},(0,b.__)("Delete")),(0,l.createElement)(_.__experimentalConfirmDialog,{isOpen:n,onConfirm:e,onCancel:()=>a(!1),confirmButtonText:(0,b.__)("Delete")},(0,b.sprintf)(
// translators: %s: The template or template part's title.
(0,b.__)('Are you sure you want to delete "%s"?'),(0,an.decodeEntities)(t))))}const Hs={};function Us(){const{editEntityRecord:e}=(0,d.useDispatch)(Se.store),{allowCommentsOnNewPosts:t,postsPerPage:n,postsPageTitle:a,postsPageId:r}=(0,d.useSelect)((e=>{const{getEntityRecord:t}=e(Se.store),n=t("root","site"),a=n?.page_for_posts?t("postType","page",n?.page_for_posts):Hs;return{allowCommentsOnNewPosts:"open"===n?.default_comment_status,postsPageTitle:a?.title?.rendered,postsPageId:a?.id,postsPerPage:n?.posts_per_page}}),[]),[s,i]=(0,f.useState)(""),[o,c]=(0,f.useState)(1),[u,m]=(0,f.useState)("");return(0,f.useEffect)((()=>{i(t),m(a),c(n)}),[a,t,n]),(0,l.createElement)(l.Fragment,null,(0,l.createElement)(Sr,{spacing:6},r&&(0,l.createElement)(wr,null,(0,l.createElement)(_.__experimentalInputControl,{className:"edit-site-sidebar-navigation-screen__input-control",placeholder:(0,b.__)("No Title"),size:"__unstable-large",value:u,onChange:(0,se.debounce)((t=>{m(t),e("postType","page",r,{title:t})}),300),label:(0,b.__)("Blog title"),help:(0,b.__)("Set the Posts Page title. Appears in search results, and when the page is shared on social media.")})),(0,l.createElement)(wr,null,(0,l.createElement)(_.__experimentalNumberControl,{className:"edit-site-sidebar-navigation-screen__input-control",placeholder:0,value:o,size:"__unstable-large",spinControls:"custom",step:"1",min:"1",onChange:t=>{c(t),e("root","site",void 0,{posts_per_page:t})},label:(0,b.__)("Posts per page"),help:(0,b.__)("Set the default number of posts to display on blog pages, including categories and tags. Some templates may override this setting.")}))),(0,l.createElement)(Sr,{title:(0,b.__)("Discussion"),spacing:3},(0,l.createElement)(wr,null,(0,l.createElement)(_.CheckboxControl,{className:"edit-site-sidebar-navigation-screen__input-control",label:(0,b.__)("Allow comments on new posts"),help:(0,b.__)("Changes will apply to new posts only. Individual posts may override these settings."),checked:s,onChange:t=>{i(t),e("root","site",void 0,{default_comment_status:t?"open":null})}}))))}function Ws(){const e=(0,_.__experimentalUseNavigator)(),{params:{postType:t,postId:n}}=e,{setCanvasMode:a}=nt((0,d.useDispatch)(ia)),{title:r,content:s,description:i,footer:o}=function(e,t){const{getDescription:n,getTitle:a,record:r}=As(e,t),s=(0,d.useSelect)((e=>e(Se.store).getCurrentTheme()),[]),i=Ds(e,t),o="theme"===i.type&&r.theme===s?.stylesheet,c=a();let u=n();!u&&i.text&&(u=(0,b.__)("This is a custom template that can be applied manually to any Post or Page."));const m="home"===r?.slug||"index"===r?.slug?(0,l.createElement)(l.Fragment,null,(0,l.createElement)(Us,null),(0,l.createElement)(Ms,null)):(0,l.createElement)(Ms,null),p=r?.modified?(0,l.createElement)(Cr,{record:r}):null;return{title:c,description:(0,l.createElement)(l.Fragment,null,u,i.text&&!o&&(0,l.createElement)("span",{className:"edit-site-sidebar-navigation-screen-template__added-by-description"},(0,l.createElement)("span",{className:"edit-site-sidebar-navigation-screen-template__added-by-description-author"},(0,l.createElement)("span",{className:"edit-site-sidebar-navigation-screen-template__added-by-description-author-icon"},i.imageUrl?(0,l.createElement)("img",{src:i.imageUrl,alt:"",width:"24",height:"24"}):(0,l.createElement)(_.Icon,{icon:i.icon})),i.text),i.isCustomized&&(0,l.createElement)("span",{className:"edit-site-sidebar-navigation-screen-template__added-by-description-customized"},(0,b._x)("(Customized)","template")))),content:m,footer:p}}(t,n);return(0,l.createElement)(ya,{title:r,actions:(0,l.createElement)(l.Fragment,null,(0,l.createElement)(zs,{postType:t,postId:n,toggleProps:{as:fa},onRemove:()=>{e.goTo(`/${t}/all`)}}),(0,l.createElement)(fa,{onClick:()=>a("edit"),label:(0,b.__)("Edit"),icon:wa})),description:i,content:s,footer:o})}var js=(0,l.createElement)(E.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,l.createElement)(E.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M12.848 8a1 1 0 0 1-.914-.594l-.723-1.63a.5.5 0 0 0-.447-.276H5a.5.5 0 0 0-.5.5v11.5a.5.5 0 0 0 .5.5h14a.5.5 0 0 0 .5-.5v-9A.5.5 0 0 0 19 8h-6.152Zm.612-1.5a.5.5 0 0 1-.462-.31l-.445-1.084A2 2 0 0 0 10.763 4H5a2 2 0 0 0-2 2v11.5a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-9a2 2 0 0 0-2-2h-5.54Z"})),Zs=(0,l.createElement)(E.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(E.Path,{d:"M21.3 10.8l-5.6-5.6c-.7-.7-1.8-.7-2.5 0l-5.6 5.6c-.7.7-.7 1.8 0 2.5l5.6 5.6c.3.3.8.5 1.2.5s.9-.2 1.2-.5l5.6-5.6c.8-.7.8-1.9.1-2.5zm-17.6 1L10 5.5l-1-1-6.3 6.3c-.7.7-.7 1.8 0 2.5L9 19.5l1.1-1.1-6.3-6.3c-.2 0-.2-.2-.1-.3z"})),qs=(0,l.createElement)(E.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(E.Path,{d:"M18.5 15v3.5H13V6.7l4.5 4.1 1-1.1-6.2-5.8-5.8 5.8 1 1.1 4-4v11.7h-6V15H4v5h16v-5z"}));const Ys=()=>(0,d.useSelect)((e=>e(Se.store).getEntityRecords("postType",Mt,{per_page:-1})),[]),Ks=(e,t)=>{const n=e.toLowerCase(),a=t.map((e=>e.title.rendered.toLowerCase()));if(!a.includes(n))return e;let r=2;for(;a.includes(`${n} ${r}`);)r++;return`${e} ${r}`},Xs=e=>vs(e).replace(/[^\w-]+/g,"")||"wp-custom-part";function Js({modalTitle:e=(0,b.__)("Create template part"),...t}){return(0,l.createElement)(_.Modal,{title:e,onRequestClose:t.closeModal,overlayClassName:"edit-site-create-template-part-modal"},(0,l.createElement)(Qs,{...t}))}function Qs({defaultArea:e=Ot,blocks:t=[],confirmLabel:n=(0,b.__)("Create"),closeModal:a,onCreate:r,onError:s,defaultTitle:i=""}){const{createErrorNotice:o}=(0,d.useDispatch)(xe.store),{saveEntityRecord:u}=(0,d.useDispatch)(Se.store),m=Ys(),[p,h]=(0,f.useState)(i),[y,v]=(0,f.useState)(e),[E,x]=(0,f.useState)(!1),S=(0,se.useInstanceId)(Js),C=(0,d.useSelect)((e=>e(g.store).__experimentalGetDefaultTemplatePartAreas()),[]);return(0,l.createElement)("form",{onSubmit:async e=>{e.preventDefault(),await async function(){if(p&&!E)try{x(!0);const e=Ks(p,m),n=Xs(e),a=await u("postType",Mt,{slug:n,title:e,content:(0,c.serialize)(t),area:y},{throwOnError:!0});await r(a)}catch(e){const t=e.message&&"unknown_error"!==e.code?e.message:(0,b.__)("An error occurred while creating the template part.");o(t,{type:"snackbar"}),s?.()}finally{x(!1)}}()}},(0,l.createElement)(_.__experimentalVStack,{spacing:"4"},(0,l.createElement)(_.TextControl,{__nextHasNoMarginBottom:!0,label:(0,b.__)("Name"),value:p,onChange:h,required:!0}),(0,l.createElement)(_.BaseControl,{label:(0,b.__)("Area"),id:`edit-site-create-template-part-modal__area-selection-${S}`,className:"edit-site-create-template-part-modal__area-base-control"},(0,l.createElement)(_.__experimentalRadioGroup,{label:(0,b.__)("Area"),className:"edit-site-create-template-part-modal__area-radio-group",id:`edit-site-create-template-part-modal__area-selection-${S}`,onChange:v,checked:y},C.map((({icon:e,label:t,area:n,description:a})=>(0,l.createElement)(_.__experimentalRadio,{key:t,value:n,className:"edit-site-create-template-part-modal__area-radio"},(0,l.createElement)(_.Flex,{align:"start",justify:"start"},(0,l.createElement)(_.FlexItem,null,(0,l.createElement)(_.Icon,{icon:e})),(0,l.createElement)(_.FlexBlock,{className:"edit-site-create-template-part-modal__option-label"},t,(0,l.createElement)("div",null,a)),(0,l.createElement)(_.FlexItem,{className:"edit-site-create-template-part-modal__checkbox"},y===n&&(0,l.createElement)(_.Icon,{icon:w})))))))),(0,l.createElement)(_.__experimentalHStack,{justify:"right"},(0,l.createElement)(_.Button,{variant:"tertiary",onClick:()=>{a()}},(0,b.__)("Cancel")),(0,l.createElement)(_.Button,{variant:"primary",type:"submit","aria-disabled":!p||E,isBusy:E},n))))}const $s=(e,t,n)=>t===n.findIndex((t=>e.name===t.name));var ei={};function ti(e){return[e]}function ni(e,t,n){var a;if(e.length!==t.length)return!1;for(a=n;a<e.length;a++)if(e[a]!==t[a])return!1;return!0}function ai(e,t){var n,a=t||ti;function r(){n=new WeakMap}function s(){var t,r,s,i,o,l=arguments.length;for(i=new Array(l),s=0;s<l;s++)i[s]=arguments[s];for(t=function(e){var t,a,r,s,i,o=n,l=!0;for(t=0;t<e.length;t++){if(!(i=a=e[t])||"object"!=typeof i){l=!1;break}o.has(a)?o=o.get(a):(r=new WeakMap,o.set(a,r),o=r)}return o.has(ei)||((s=function(){var e={clear:function(){e.head=null}};return e}()).isUniqueByDependants=l,o.set(ei,s)),o.get(ei)}(o=a.apply(null,i)),t.isUniqueByDependants||(t.lastDependants&&!ni(o,t.lastDependants,0)&&t.clear(),t.lastDependants=o),r=t.head;r;){if(ni(r.args,i,1))return r!==t.head&&(r.prev.next=r.next,r.next&&(r.next.prev=r.prev),r.next=t.head,r.prev=null,t.head.prev=r,t.head=r),r.val;r=r.next}return r={val:e.apply(null,i)},i[0]=null,r.args=i,t.head&&(t.head.prev=r,r.next=t.head),t.head=r,r.val}return s.getDependants=a,s.clear=r,r(),s}var ri=n(4793),si=n.n(ri);const ii=e=>e.name||"",oi=e=>e.title,li=e=>e.description||"",ci=e=>e.keywords||[],ui=()=>!1;function di(e=""){return gs(e,{splitRegexp:[/([\p{Ll}\p{Lo}\p{N}])([\p{Lu}\p{Lt}])/gu,/([\p{Lu}\p{Lt}])([\p{Lu}\p{Lt}][\p{Ll}\p{Lo}])/gu],stripRegexp:/(\p{C}|\p{P}|\p{S})+/giu}).split(" ").filter(Boolean)}function mi(e=""){return(e=(e=si()(e)).replace(/^\//,"")).toLowerCase()}const pi=(e="")=>di(mi(e)),hi=(e=[],t="",n={})=>{const a=pi(t),r=n.categoryId!==Dt&&!a.length,s={...n,onlyFilterByCategory:r},i=r?0:1,o=e.map((e=>[e,fi(e,t,s)])).filter((([,e])=>e>i));return 0===a.length||o.sort((([,e],[,t])=>t-e)),o.map((([e])=>e))};function fi(e,t,n){const{categoryId:a,getName:r=ii,getTitle:s=oi,getDescription:i=li,getKeywords:o=ci,hasCategory:l=ui,onlyFilterByCategory:c}=n;let u=a===Dt||a===Ft&&e.type===Rt.user||l(e,a)?1:0;if(!u||c)return u;const d=r(e),m=s(e),p=i(e),h=o(e),f=mi(t),g=mi(m);if(f===g)u+=30;else if(g.startsWith(f))u+=20;else{const e=[d,m,p,...h].join(" ");0===(y=di(f),v=e,y.filter((e=>!pi(v).some((t=>t.includes(e)))))).length&&(u+=10)}var y,v;return u}const gi=[],yi=(e,t)=>e&&t?e+"//"+t:null,vi=ai(((e,t,n="")=>{var a;const{getEntityRecords:r,getIsResolving:s}=e(Se.store),{__experimentalGetDefaultTemplatePartAreas:i}=e(g.store),o={per_page:-1},l=(null!==(a=r("postType",Mt,o))&&void 0!==a?a:gi).map((e=>(e=>({blocks:(0,c.parse)(e.content.raw,{__unstableSkipMigrationLogs:!0}),categories:[e.area],description:e.description||"",isCustom:e.source===At.custom,keywords:e.keywords||[],id:yi(e.theme,e.slug),name:yi(e.theme,e.slug),title:(0,an.decodeEntities)(e.title.rendered),type:e.type,templatePart:e}))(e))),u=(i()||[]).map((e=>e.area)),d=s("getEntityRecords",["postType",Mt,o]);return{patterns:hi(l,n,{categoryId:t,hasCategory:(e,t)=>t!==Ot?e.templatePart.area===t:e.templatePart.area===t||!u.includes(e.templatePart.area)}),isResolving:d}}),(e=>[e(Se.store).getEntityRecords("postType",Mt,{per_page:-1}),e(Se.store).getIsResolving("getEntityRecords",["postType",Mt,{per_page:-1}]),e(g.store).__experimentalGetDefaultTemplatePartAreas()])),_i=ai((e=>{var t;const{getSettings:n}=nt(e(ia)),a=n();return{patterns:[...(null!==(t=a.__experimentalAdditionalBlockPatterns)&&void 0!==t?t:a.__experimentalBlockPatterns)||[],...e(Se.store).getBlockPatterns()||[]].filter((e=>!Bt.includes(e.source))).filter($s).filter((e=>!1!==e.inserter)).map((e=>({...e,keywords:e.keywords||[],type:Rt.theme,blocks:(0,c.parse)(e.content,{__unstableSkipMigrationLogs:!0})}))),isResolving:!1}}),(e=>[e(Se.store).getBlockPatterns(),nt(e(ia)).getSettings()])),bi=ai(((e,t,n,a="")=>{const{patterns:r}=_i(e),{patterns:s}=Ei(e);let i=[...r||[],...s||[]];return n&&(i=i.filter((e=>e.type===Rt.user?e.syncStatus===n:n===Lt.unsynced))),i=hi(i,a,t?{categoryId:t,hasCategory:(e,t)=>e.categories?.includes(t)}:{hasCategory:e=>!e.hasOwnProperty("categories")}),{patterns:i,isResolving:!1}}),(e=>[_i(e),Ei(e)])),Ei=ai(((e,t,n="")=>{const{getEntityRecords:a,getIsResolving:r,getUserPatternCategories:s}=e(Se.store),i={per_page:-1},o=a("postType",Rt.user,i),l=s(),u=new Map;l.forEach((e=>u.set(e.id,e)));let d=o?o.map((e=>((e,t)=>({blocks:(0,c.parse)(e.content.raw,{__unstableSkipMigrationLogs:!0}),...e.wp_pattern_category.length>0&&{categories:e.wp_pattern_category.map((e=>t&&t.get(e)?t.get(e).slug:e))},termLabels:e.wp_pattern_category.map((e=>t?.get(e)?t.get(e).label:e)),id:e.id,name:e.slug,syncStatus:e.wp_pattern_sync_status||Lt.full,title:e.title.raw,type:e.type,patternPost:e}))(e,u))):gi;const m=r("getEntityRecords",["postType",Rt.user,i]);return t&&(d=d.filter((e=>e.syncStatus===t))),d=hi(d,n,{hasCategory:()=>!0}),{patterns:d,isResolving:m,categories:l}}),(e=>[e(Se.store).getEntityRecords("postType",Rt.user,{per_page:-1}),e(Se.store).getIsResolving("getEntityRecords",["postType",Rt.user,{per_page:-1}]),e(Se.store).getUserPatternCategories()]));var wi=(e,t,{search:n="",syncStatus:a}={})=>(0,d.useSelect)((r=>e===Mt?vi(r,t,n):e===Rt.theme?bi(r,t,a,n):e===Rt.user?Ei(r,a,n):{patterns:gi,isResolving:!1}),[t,e,n,a]);function xi(){const e=function(){const e=(0,d.useSelect)((e=>{var t;const{getSettings:n}=nt(e(ia)),a=n();return null!==(t=a.__experimentalAdditionalBlockPatternCategories)&&void 0!==t?t:a.__experimentalBlockPatternCategories}));return[...e||[],...(0,d.useSelect)((e=>e(Se.store).getBlockPatternCategories()))||[]]}();e.push({name:Ot,label:(0,b.__)("Uncategorized")});const t=function(){const e=(0,d.useSelect)((e=>{var t;const{getSettings:n}=nt(e(ia));return null!==(t=n().__experimentalAdditionalBlockPatterns)&&void 0!==t?t:n().__experimentalBlockPatterns})),t=(0,d.useSelect)((e=>e(Se.store).getBlockPatterns()));return(0,f.useMemo)((()=>[...e||[],...t||[]].filter((e=>!Bt.includes(e.source))).filter($s).filter((e=>!1!==e.inserter))),[e,t])}(),{patterns:n,categories:a}=wi(Rt.user),r=(0,f.useMemo)((()=>{const r={},s=[];e.forEach((e=>{r[e.name]||(r[e.name]={...e,count:0})})),a.forEach((e=>{r[e.name]||(r[e.name]={...e,count:0})})),t.forEach((e=>{e.categories?.forEach((e=>{r[e]&&(r[e].count+=1)})),e.categories?.length||(r.uncategorized.count+=1)})),n.forEach((e=>{e.categories?.forEach((e=>{r[e]&&(r[e].count+=1)})),e.categories?.length||(r.uncategorized.count+=1)})),[...e,...a].forEach((e=>{r[e.name].count&&!s.find((t=>t.name===e.name))&&s.push(r[e.name])}));const i=s.sort(((e,t)=>e.label.localeCompare(t.label)));return i.unshift({name:Ft,label:(0,b.__)("My patterns"),count:n.length}),i.unshift({name:Dt,label:(0,b.__)("All patterns"),description:(0,b.__)("A list of all patterns from all sources."),count:t.length+n.length}),i}),[e,t,a,n]);return{patternCategories:r,hasPatterns:!!r.length}}const{useHistory:Si,useLocation:Ci}=nt(bt.privateApis),{CreatePatternModal:ki}=nt(Pt.privateApis);function Ti(){const e=Si(),{params:t}=Ci(),[n,a]=(0,f.useState)(!1),[r,s]=(0,f.useState)(!1),i=(0,d.useSelect)((e=>e(Se.store).getCurrentTheme()?.is_block_theme),[]),{createPatternFromFile:o}=nt((0,d.useDispatch)(Pt.store)),{createSuccessNotice:c,createErrorNotice:u}=(0,d.useDispatch)(xe.store),m=(0,f.useRef)(),{patternCategories:p}=xi();function h(){a(!1),s(!1)}const g=[{icon:ha,onClick:()=>a(!0),title:(0,b.__)("Create pattern")}];return i&&g.push({icon:Zs,onClick:()=>s(!0),title:(0,b.__)("Create template part")}),g.push({icon:qs,onClick:()=>{m.current.click()},title:(0,b.__)("Import pattern from JSON")}),(0,l.createElement)(l.Fragment,null,(0,l.createElement)(_.DropdownMenu,{controls:g,toggleProps:{as:fa},icon:Zr,label:(0,b.__)("Create pattern")}),n&&(0,l.createElement)(ki,{onClose:()=>a(!1),onSuccess:function({pattern:t,categoryId:n}){a(!1),e.push({postId:t.id,postType:Rt.user,categoryType:Rt.theme,categoryId:n,canvas:"edit"})},onError:h}),r&&(0,l.createElement)(Js,{closeModal:()=>s(!1),blocks:[],onCreate:function(t){s(!1),e.push({postId:t.id,postType:Mt,canvas:"edit"})},onError:h}),(0,l.createElement)("input",{type:"file",accept:".json",hidden:!0,ref:m,onChange:async n=>{const a=n.target.files?.[0];if(a)try{const n=t.categoryType!==Mt&&p.find((e=>e.name===t.categoryId))?.id,r=await o(a,n?[n]:void 0);n||e.push({path:"/patterns",categoryType:Rt.theme,categoryId:Dt}),c((0,b.sprintf)(
// translators: %s: The imported pattern's title.
(0,b.__)('Imported "%s" from JSON.'),r.title.raw),{type:"snackbar",id:"import-pattern-success"})}catch(e){u(e.message,{type:"snackbar",id:"import-pattern-error"})}finally{n.target.value=""}}}))}function Pi({count:e,icon:t,id:n,isActive:a,label:r,type:s}){const i=kt({path:"/patterns",categoryType:s,categoryId:n});if(e)return(0,l.createElement)(ba,{...i,icon:t,suffix:(0,l.createElement)("span",null,e),"aria-current":a?"true":void 0},r)}const Ni=e=>{const t=e||[],n=(0,d.useSelect)((e=>e(g.store).__experimentalGetDefaultTemplatePartAreas()),[]),a={header:{},footer:{},sidebar:{},uncategorized:{}};return n.forEach((e=>a[e.area]={...e,templateParts:[]})),t.reduce(((e,t)=>(e[e[t.area]?t.area:Ot].templateParts.push(t),e)),a)};function Ii({areas:e,currentArea:t,currentType:n}){return(0,l.createElement)(l.Fragment,null,(0,l.createElement)("div",{className:"edit-site-sidebar-navigation-screen-patterns__group-header"},(0,l.createElement)(_.__experimentalHeading,{level:2},(0,b.__)("Template parts"))),(0,l.createElement)(_.__experimentalItemGroup,{className:"edit-site-sidebar-navigation-screen-patterns__group"},Object.entries(e).map((([e,{label:a,templateParts:r}])=>(0,l.createElement)(Pi,{key:e,count:r?.length,icon:(0,g.getTemplatePartIcon)(e),label:a,id:e,type:Mt,isActive:t===e&&n===Mt})))))}function Mi({categories:e,currentCategory:t,currentType:n}){return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(_.__experimentalItemGroup,{className:"edit-site-sidebar-navigation-screen-patterns__group"},e.map((e=>(0,l.createElement)(Pi,{key:e.name,count:e.count,label:e.label,icon:js,id:e.name,type:"pattern",isActive:t===`${e.name}`&&(n===Rt.theme||n===Rt.user)})))))}function Ai(){const e=(0,se.useViewportMatch)("medium","<"),{categoryType:t,categoryId:n}=(0,Et.getQueryArgs)(window.location.href),a=n||Dt,r=t||Rt.theme,{templatePartAreas:s,hasTemplateParts:i,isLoading:o}=function(){const{records:e,isResolving:t}=(0,Se.useEntityRecords)("postType",Mt,{per_page:-1});return{hasTemplateParts:!!e&&!!e.length,isLoading:t,templatePartAreas:Ni(e)}}(),{patternCategories:c,hasPatterns:u}=xi(),m=(0,d.useSelect)((e=>e(Se.store).getCurrentTheme()?.is_block_theme),[]),p=(0,d.useSelect)((e=>!!e(ia).getSettings().supportsTemplatePartsMode),[]),h=kt({path:"/wp_template_part/all",didAccessPatternsPage:!m&&p?1:void 0}),f=e?void 0:(0,l.createElement)(_.__experimentalItemGroup,null,(0,l.createElement)(ba,{as:"a",href:"edit.php?post_type=wp_block",withChevron:!0},(0,b.__)("Manage all of my patterns")),(m||p)&&(0,l.createElement)(ba,{withChevron:!0,...h},(0,b.__)("Manage all template parts")));return(0,l.createElement)(ya,{isRoot:!m,title:(0,b.__)("Patterns"),description:(0,b.__)("Manage what patterns are available when editing the site."),actions:(0,l.createElement)(Ti,null),footer:f,content:(0,l.createElement)(l.Fragment,null,o&&(0,b.__)("Loading patterns…"),!o&&(0,l.createElement)(l.Fragment,null,!i&&!u&&(0,l.createElement)(_.__experimentalItemGroup,{className:"edit-site-sidebar-navigation-screen-patterns__group"},(0,l.createElement)(_.__experimentalItem,null,(0,b.__)("No template parts or patterns found"))),u&&(0,l.createElement)(Mi,{categories:c,currentCategory:a,currentType:r}),i&&(0,l.createElement)(Ii,{areas:s,currentArea:a,currentType:r})))})}const{useLocation:Oi}=nt(bt.privateApis),Ri=[It,Mt,Nt,Rt.user];function Di(e){const{postType:t,postId:n,context:a,isReady:r}=function({postId:e,postType:t}){const{hasLoadedAllDependencies:n,homepageId:a,url:r,frontPageTemplateId:s}=(0,d.useSelect)((e=>{const{getSite:t,getUnstableBase:n,getEntityRecords:a}=e(Se.store),r=t(),s=n(),i=a("postType",It,{per_page:-1});let o;if(i){const e=i.find((e=>"front-page"===e.slug));o=!!e&&e.id}return{hasLoadedAllDependencies:!!s&&!!r,homepageId:"page"===r?.show_on_front&&["number","string"].includes(typeof r.page_on_front)?r.page_on_front.toString():null,url:s?.home,frontPageTemplateId:o}}),[]),i=(0,d.useSelect)((i=>{if(Ri.includes(t))return;const{getEditedEntityRecord:o,getEntityRecords:l,getDefaultTemplateId:c,__experimentalGetTemplateForLink:u}=i(Se.store);function d(e,t){if("page"===e&&a===t){if(void 0===s)return;if(s)return s}const n=o("postType",e,t);if(!n)return;const r=n.template;if(r){const e=l("postType",It,{per_page:-1})?.find((({slug:e})=>e===r));if(e)return e.id}return c({slug:`${e}-${n?.slug}`})}if(n){if(t&&e)return d(t,e);if(a)return d("page",a);if(r){const e=u(r);return e?.id}}}),[a,n,r,e,t,s]),o=(0,f.useMemo)((()=>Ri.includes(t)?{}:t&&e?{postType:t,postId:e}:a?{postType:"page",postId:a}:{}),[a,t,e]);return Ri.includes(t)?{isReady:!0,postType:t,postId:e,context:o}:n?{isReady:void 0!==i,postType:It,postId:i,context:o}:{isReady:!1}}(e),{setEditedEntity:s}=(0,d.useDispatch)(ia);(0,f.useEffect)((()=>{r&&s(t,n,a)}),[r,t,n,a,s])}function Fi(){const{params:e={}}=Oi();return Di(e)}function Bi(e,t){var n=e.toLowerCase();return 0===t?function(e){return e.charAt(0).toUpperCase()+e.substr(1)}(n):n}var Li=(0,l.createElement)(E.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,l.createElement)(E.Path,{d:"M6.5 12.4L12 8l5.5 4.4-.9 1.2L12 10l-4.5 3.6-1-1.2z"})),Vi=(0,l.createElement)(E.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,l.createElement)(E.Path,{d:"M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z"}));const{useLocation:zi,useHistory:Gi}=nt(bt.privateApis);function Hi(e){var t;let n=null!==(t=e?.path)&&void 0!==t?t:"/";if(e?.postType&&e?.postId)switch(e.postType){case Rt.user:case It:case Mt:case"page":n=`/${encodeURIComponent(e.postType)}/${encodeURIComponent(e.postId)}`;break;default:n=`/navigation/${encodeURIComponent(e.postType)}/${encodeURIComponent(e.postId)}`}return n}const Ui={className:"block-editor-block-settings-menu__popover",placement:"bottom-start"},{useLocation:Wi,useHistory:ji}=nt(bt.privateApis);function Zi(e){const t=Wi(),n=ji(),{block:a}=e,{clientId:r}=a,{moveBlocksDown:s,moveBlocksUp:i,removeBlocks:o}=(0,d.useDispatch)(we.store),c=(0,b.sprintf)(/* translators: %s: block name */
(0,b.__)("Remove %s"),(0,we.BlockTitle)({clientId:r,maximumLength:25})),u=(0,b.sprintf)(/* translators: %s: block name */
(0,b.__)("Go to %s"),(0,we.BlockTitle)({clientId:r,maximumLength:25})),m=(0,d.useSelect)((e=>{const{getBlockRootClientId:t}=e(we.store);return t(r)}),[r]),p=(0,f.useCallback)((e=>{const{attributes:a,name:r}=e;"post-type"===a.kind&&a.id&&a.type&&n&&n.push({postType:a.type,postId:a.id,...wt()&&{wp_theme_preview:xt()}},{backPath:Hi(t.params)}),"core/page-list-item"===r&&a.id&&n&&n.push({postType:"page",postId:a.id,...wt()&&{wp_theme_preview:xt()}},{backPath:Hi(t.params)})}),[n]);return(0,l.createElement)(_.DropdownMenu,{icon:ce,label:(0,b.__)("Options"),className:"block-editor-block-settings-menu",popoverProps:Ui,noIcons:!0,...e},(({onClose:e})=>(0,l.createElement)(l.Fragment,null,(0,l.createElement)(_.MenuGroup,null,(0,l.createElement)(_.MenuItem,{icon:Li,onClick:()=>{i([r],m),e()}},(0,b.__)("Move up")),(0,l.createElement)(_.MenuItem,{icon:Vi,onClick:()=>{s([r],m),e()}},(0,b.__)("Move down")),"page"===a.attributes?.type&&a.attributes?.id&&(0,l.createElement)(_.MenuItem,{onClick:()=>{p(a),e()}},u)),(0,l.createElement)(_.MenuGroup,null,(0,l.createElement)(_.MenuItem,{onClick:()=>{o([r],!1),e()}},c)))))}const{PrivateListView:qi}=nt(we.privateApis),Yi=["postType","page",{per_page:100,_fields:["id","link","menu_order","parent","title","type"],orderby:"menu_order",order:"asc"}];function Ki({rootClientId:e}){const{listViewRootClientId:t,isLoading:n}=(0,d.useSelect)((t=>{const{areInnerBlocksControlled:n,getBlockName:a,getBlockCount:r,getBlockOrder:s}=t(we.store),{isResolving:i}=t(Se.store),o=s(e),l=1===o.length&&"core/page-list"===a(o[0])&&r(o[0])>0,c=i("getEntityRecords",Yi);return{listViewRootClientId:l?o[0]:e,isLoading:!n(e)||c}}),[e]),{replaceBlock:a,__unstableMarkNextChangeAsNotPersistent:r}=(0,d.useDispatch)(we.store),s=(0,f.useCallback)((e=>{"core/navigation-link"!==e.name||e.attributes.url||(r(),a(e.clientId,(0,c.createBlock)("core/navigation-link",e.attributes)))}),[r,a]);return(0,l.createElement)(l.Fragment,null,!n&&(0,l.createElement)(qi,{rootClientId:t,onSelect:s,blockSettingsMenu:Zi,showAppender:!1}),(0,l.createElement)("div",{className:"edit-site-sidebar-navigation-screen-navigation-menus__helper-block-editor"},(0,l.createElement)(we.BlockList,null)))}const Xi=()=>{};function Ji({navigationMenuId:e}){const{storedSettings:t}=(0,d.useSelect)((e=>{const{getSettings:t}=nt(e(ia));return{storedSettings:t()}}),[]),n=(0,f.useMemo)((()=>e?[(0,c.createBlock)("core/navigation",{ref:e})]:[]),[e]);return e&&n?.length?(0,l.createElement)(we.BlockEditorProvider,{settings:t,value:n,onChange:Xi,onInput:Xi},(0,l.createElement)("div",{className:"edit-site-sidebar-navigation-screen-navigation-menus__content"},(0,l.createElement)(Ki,{rootClientId:n[0].clientId}))):null}function Qi(e){return(0,d.useSelect)((t=>{if(!e)return;const n=t(Se.store).getEditedEntityRecord("postType",Nt,e);return"trash"===n.status?void 0:n.title}),[e])}function $i({id:e}){const t=Qi(e);return e&&void 0!==t?(0,l.createElement)(l.Fragment,null,(0,l.createElement)(_.__experimentalHeading,{className:"edit-site-sidebar-navigation-screen-template-part-navigation-menu__title",size:"11",upperCase:!0,weight:500},t||(0,b.__)("Navigation")),(0,l.createElement)(Ji,{navigationMenuId:e})):null}function eo({id:e}){const t=Qi(e),n=kt({postId:e,postType:Nt});return e&&void 0!==t?(0,l.createElement)(ba,{withChevron:!0,...n},t||(0,b.__)("(no title)")):null}function to({menus:e}){return(0,l.createElement)(_.__experimentalItemGroup,{className:"edit-site-sidebar-navigation-screen-template-part-navigation-menu-list"},e.map((e=>(0,l.createElement)(eo,{key:e,id:e}))))}function no({menus:e}){return e.length?1===e.length?(0,l.createElement)($i,{id:e[0]}):(0,l.createElement)(l.Fragment,null,(0,l.createElement)(_.__experimentalHeading,{className:"edit-site-sidebar-navigation-screen-template-part-navigation-menu__title",size:"11",upperCase:!0,weight:500},(0,b.__)("Navigation")),(0,l.createElement)(to,{menus:e})):null}function ao(e,t){const{record:n}=As(e,t);if(e!==Mt)return;const a=function(e){return e?.blocks?e?.blocks:e?.content&&"function"!=typeof e.content?(0,c.parse)(e.content):[]}(n),r=function(e,t){if(!t?.length)return[];const n=t=>{if(!t)return[];const a=[];for(const r of t)if(r.name===e&&a.push(r),r?.innerBlocks){const e=n(r.innerBlocks);e.length&&a.push(...e)}return a};return n(t)}("core/navigation",a);if(!r.length)return;const s=r?.map((e=>e.attributes.ref)),i=[...new Set(s)].filter((e=>e));return i?.length?(0,l.createElement)(no,{menus:i}):void 0}function ro(){const e=(0,_.__experimentalUseNavigator)(),{params:{postType:t,postId:n}}=e,{categoryType:a}=(0,Et.getQueryArgs)(window.location.href),{setCanvasMode:r}=nt((0,d.useDispatch)(ia));Fi();const s=function(e,t){const{getDescription:n,getTitle:a,record:r}=As(e,t),s=(0,d.useSelect)((e=>e(g.store).__experimentalGetDefaultTemplatePartAreas()),[]),{currentTheme:i,userPatternCategories:o}=(0,d.useSelect)((e=>{const{getCurrentTheme:t,getUserPatternCategories:n}=e(Se.store);return{currentTheme:t(),userPatternCategories:n()}}),[]),c=Ds(e,t),u="theme"===c.type&&r.theme===i?.stylesheet,m=a();let p=n();!p&&c.text&&(p=e===Rt.user?(0,b.sprintf)(
// translators: %s: pattern title e.g: "Header".
(0,b.__)("This is the %s pattern."),a()):(0,b.sprintf)(
// translators: %s: template part title e.g: "Header".
(0,b.__)("This is the %s template part."),a())),!p&&e===Rt.user&&r?.title&&(p=(0,b.sprintf)(
// translators: %s: user created pattern title e.g. "Footer".
(0,b.__)("This is the %s pattern."),r.title));const h=r?.modified?(0,l.createElement)(Cr,{record:r}):null,f=[];if((e===Rt.user||e===Mt)&&(f.push({label:(0,b.__)("Syncing"),value:r.wp_pattern_sync_status===Lt.unsynced?(0,b.__)("Not synced"):(0,b.__)("Fully synced")}),0===r.wp_pattern_category?.length&&f.push({label:(0,b.__)("Categories"),value:(0,b.__)("Uncategorized")}),r.wp_pattern_category?.length>0)){const e=new Map;o.forEach((t=>e.set(t.id,t)));const t=r.wp_pattern_category.filter((t=>e.get(t))).map((t=>e.get(t).label));f.push({label:(0,b.__)("Categories"),value:t.length>0?t.join(", "):""})}if(e===Mt){const e=s.find((e=>e.area===r.area));let t=e?.label;t||(t=r.area?(0,b.sprintf)(
// translators: %s: Sentenced cased template part area e.g: "My custom area".
(0,b.__)("%s (removed)"),(void 0===y&&(y={}),gs(r.area,ms({delimiter:" ",transform:Bi},y)))):(0,b.__)("None")),f.push({label:(0,b.__)("Area"),value:t})}var y;return e===Mt&&c.text&&!u&&f.push({label:(0,b.__)("Added by"),value:(0,l.createElement)("span",{className:"edit-site-sidebar-navigation-screen-pattern__added-by-description-author"},c.text)}),e!==Mt||!c.text||r.origin!==At.plugin&&!0!==r.has_theme_file||f.push({label:(0,b.__)("Customized"),value:(0,l.createElement)("span",{className:"edit-site-sidebar-navigation-screen-pattern__added-by-description-customized"},c.isCustomized?(0,b.__)("Yes"):(0,b.__)("No"))}),{title:m,description:p,content:(0,l.createElement)(l.Fragment,null,ao(e,t),!!f.length&&(0,l.createElement)(Sr,{spacing:5,title:(0,b.__)("Details")},f.map((({label:e,value:t})=>(0,l.createElement)(wr,{key:e},(0,l.createElement)(Er,null,e),(0,l.createElement)(xr,null,t)))))),footer:h}}(t,n),i=a||t!==Mt?"/patterns":"/wp_template_part/all";return(0,l.createElement)(ya,{actions:(0,l.createElement)(l.Fragment,null,(0,l.createElement)(zs,{postType:t,postId:n,toggleProps:{as:fa},onRemove:()=>{e.goTo(i)}}),(0,l.createElement)(fa,{onClick:()=>r("edit"),label:(0,b.__)("Edit"),icon:wa})),backPath:i,...s})}const so={per_page:100,status:["publish","draft"],order:"desc",orderby:"date"},io=e=>e?.trim()?.length>0;function oo({menuTitle:e,onClose:t,onSave:n}){const[a,r]=(0,f.useState)(e),s=a!==e&&io(a);return(0,l.createElement)(_.Modal,{title:(0,b.__)("Rename"),onRequestClose:t},(0,l.createElement)("form",{className:"sidebar-navigation__rename-modal-form"},(0,l.createElement)(_.__experimentalVStack,{spacing:"3"},(0,l.createElement)(_.TextControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,value:a,placeholder:(0,b.__)("Navigation title"),onChange:r}),(0,l.createElement)(_.__experimentalHStack,{justify:"right"},(0,l.createElement)(_.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:t},(0,b.__)("Cancel")),(0,l.createElement)(_.Button,{__next40pxDefaultSize:!0,disabled:!s,variant:"primary",type:"submit",onClick:e=>{e.preventDefault(),s&&(n({title:a}),t())}},(0,b.__)("Save"))))))}function lo({onClose:e,onConfirm:t}){return(0,l.createElement)(_.__experimentalConfirmDialog,{isOpen:!0,onConfirm:n=>{n.preventDefault(),t(),e()},onCancel:e,confirmButtonText:(0,b.__)("Delete")},(0,b.__)("Are you sure you want to delete this Navigation menu?"))}const co={position:"bottom right"};function uo(e){const{onDelete:t,onSave:n,onDuplicate:a,menuTitle:r}=e,[s,i]=(0,f.useState)(!1),[o,c]=(0,f.useState)(!1),u=()=>{i(!1),c(!1)};return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(_.DropdownMenu,{className:"sidebar-navigation__more-menu",label:(0,b.__)("Actions"),icon:ce,popoverProps:co},(({onClose:e})=>(0,l.createElement)("div",null,(0,l.createElement)(_.MenuGroup,null,(0,l.createElement)(_.MenuItem,{onClick:()=>{i(!0),e()}},(0,b.__)("Rename")),(0,l.createElement)(_.MenuItem,{onClick:()=>{a(),e()}},(0,b.__)("Duplicate")),(0,l.createElement)(_.MenuItem,{isDestructive:!0,onClick:()=>{c(!0),e()}},(0,b.__)("Delete")))))),o&&(0,l.createElement)(lo,{onClose:u,onConfirm:t}),s&&(0,l.createElement)(oo,{onClose:u,menuTitle:r,onSave:n}))}function mo(e,t,n){return e?.rendered?"publish"===n?(0,an.decodeEntities)(e?.rendered):(0,b.sprintf)(
// translators: %1s: title of the menu; %2s: status of the menu (draft, pending, etc.).
(0,b.__)("%1$s (%2$s)"),(0,an.decodeEntities)(e?.rendered),n):(0,b.sprintf)((0,b.__)("(no title %s)"),t)}function po({postId:e}){const t=kt({postId:e,postType:Nt,canvas:"edit"});return(0,l.createElement)(fa,{...t,label:(0,b.__)("Edit"),icon:wa})}function ho({navigationMenu:e,handleDelete:t,handleDuplicate:n,handleSave:a}){const r=e?.title?.rendered;return(0,l.createElement)(xo,{actions:(0,l.createElement)(l.Fragment,null,(0,l.createElement)(uo,{menuTitle:(0,an.decodeEntities)(r),onDelete:t,onSave:a,onDuplicate:n}),(0,l.createElement)(po,{postId:e?.id})),title:mo(e?.title,e?.id,e?.status),description:(0,b.__)("Navigation menus are a curated collection of blocks that allow visitors to get around your site.")},(0,l.createElement)(Ji,{navigationMenuId:e?.id}))}const fo="wp_navigation";function go(){const{params:{postId:e}}=(0,_.__experimentalUseNavigator)(),{record:t,isResolving:n}=(0,Se.useEntityRecord)("postType",fo,e),{isSaving:a,isDeleting:r}=(0,d.useSelect)((t=>{const{isSavingEntityRecord:n,isDeletingEntityRecord:a}=t(Se.store);return{isSaving:n("postType",fo,e),isDeleting:a("postType",fo,e)}}),[e]),s=n||a||r,i=t?.title?.rendered||t?.slug,{handleSave:o,handleDelete:c,handleDuplicate:u}=bo(),m=()=>c(t),p=e=>o(t,e),h=()=>u(t);return s?(0,l.createElement)(xo,{description:(0,b.__)("Navigation menus are a curated collection of blocks that allow visitors to get around your site.")},(0,l.createElement)(_.Spinner,{className:"edit-site-sidebar-navigation-screen-navigation-menus__loading"})):s||t?t?.content?.raw?(0,l.createElement)(ho,{navigationMenu:t,handleDelete:m,handleSave:p,handleDuplicate:h}):(0,l.createElement)(xo,{actions:(0,l.createElement)(uo,{menuTitle:(0,an.decodeEntities)(i),onDelete:m,onSave:p,onDuplicate:h}),title:mo(t?.title,t?.id,t?.status),description:(0,b.__)("This Navigation Menu is empty.")}):(0,l.createElement)(xo,{description:(0,b.__)("Navigation Menu missing.")})}function yo(){const{goTo:e}=(0,_.__experimentalUseNavigator)(),{deleteEntityRecord:t}=(0,d.useDispatch)(Se.store),{createSuccessNotice:n,createErrorNotice:a}=(0,d.useDispatch)(xe.store);return async r=>{const s=r?.id;try{await t("postType",fo,s,{force:!0},{throwOnError:!0}),n((0,b.__)("Deleted Navigation menu"),{type:"snackbar"}),e("/navigation")}catch(e){a((0,b.sprintf)(/* translators: %s: error message describing why the navigation menu could not be deleted. */
(0,b.__)("Unable to delete Navigation menu (%s)."),e?.message),{type:"snackbar"})}}}function vo(){const{getEditedEntityRecord:e}=(0,d.useSelect)((e=>{const{getEditedEntityRecord:t}=e(Se.store);return{getEditedEntityRecord:t}}),[]),{editEntityRecord:t,__experimentalSaveSpecifiedEntityEdits:n}=(0,d.useDispatch)(Se.store),{createSuccessNotice:a,createErrorNotice:r}=(0,d.useDispatch)(xe.store);return async(s,i)=>{if(!i)return;const o=s?.id,l=e("postType",Nt,o);t("postType",fo,o,i);const c=Object.keys(i);try{await n("postType",fo,o,c,{throwOnError:!0}),a((0,b.__)("Renamed Navigation menu"),{type:"snackbar"})}catch(e){t("postType",fo,o,l),r((0,b.sprintf)(/* translators: %s: error message describing why the navigation menu could not be renamed. */
(0,b.__)("Unable to rename Navigation menu (%s)."),e?.message),{type:"snackbar"})}}}function _o(){const{goTo:e}=(0,_.__experimentalUseNavigator)(),{saveEntityRecord:t}=(0,d.useDispatch)(Se.store),{createSuccessNotice:n,createErrorNotice:a}=(0,d.useDispatch)(xe.store);return async r=>{const s=r?.title?.rendered||r?.slug;try{const a=await t("postType",fo,{title:(0,b.sprintf)(/* translators: %s: Navigation menu title */
(0,b.__)("%s (Copy)"),s),content:r?.content?.raw,status:"publish"},{throwOnError:!0});a&&(n((0,b.__)("Duplicated Navigation menu"),{type:"snackbar"}),e(`/navigation/${fo}/${a.id}`))}catch(e){a((0,b.sprintf)(/* translators: %s: error message describing why the navigation menu could not be deleted. */
(0,b.__)("Unable to duplicate Navigation menu (%s)."),e?.message),{type:"snackbar"})}}}function bo(){return{handleDelete:yo(),handleSave:vo(),handleDuplicate:_o()}}let Eo=!1;function wo(){const{records:e,isResolving:t,hasResolved:n}=(0,Se.useEntityRecords)("postType",Nt,so),a=t&&!n,{getNavigationFallbackId:r}=nt((0,d.useSelect)(Se.store)),s=e?.[0];s&&(Eo=!0),s||t||!n||Eo||r();const{handleSave:i,handleDelete:o,handleDuplicate:c}=bo(),u=!!e?.length;return a?(0,l.createElement)(xo,null,(0,l.createElement)(_.Spinner,{className:"edit-site-sidebar-navigation-screen-navigation-menus__loading"})):a||u?1===e?.length?(0,l.createElement)(ho,{navigationMenu:s,handleDelete:()=>o(s),handleDuplicate:()=>c(s),handleSave:e=>i(s,e)}):(0,l.createElement)(xo,null,(0,l.createElement)(_.__experimentalItemGroup,null,e?.map((({id:e,title:t,status:n},a)=>(0,l.createElement)(So,{postId:e,key:e,withChevron:!0,icon:ua},function(e,t,n){return e?"publish"===n?(0,an.decodeEntities)(e):(0,b.sprintf)(
// translators: %1s: title of the menu; %2s: status of the menu (draft, pending, etc.).
(0,b.__)("%1$s (%2$s)"),(0,an.decodeEntities)(e),n):(0,b.sprintf)((0,b.__)("(no title %s)"),t)}(t?.rendered,a+1,n)))))):(0,l.createElement)(xo,{description:(0,b.__)("No Navigation Menus found.")})}function xo({children:e,actions:t,title:n,description:a}){return(0,l.createElement)(ya,{title:n||(0,b.__)("Navigation"),actions:t,description:a||(0,b.__)("Manage your Navigation menus."),content:e})}const So=({postId:e,...t})=>{const n=kt({postId:e,postType:Nt});return(0,l.createElement)(ba,{...n,...t})},Co={[It]:{title:(0,b.__)("All templates"),description:(0,b.__)("Create new templates, or reset any customizations made to the templates supplied by your theme.")},[Mt]:{title:(0,b.__)("All template parts"),description:(0,b.__)("Create new template parts, or reset any customizations made to the template parts supplied by your theme."),backPath:"/patterns"}},{useLocation:ko}=nt(bt.privateApis);function To(){const{params:{postType:e}}=(0,_.__experimentalUseNavigator)(),{params:{didAccessPatternsPage:t}}=ko(),n=(0,d.useSelect)((e=>!!e(ia).getSettings().supportsTemplatePartsMode),[]);return(0,l.createElement)(ya,{isRoot:n&&!t,title:Co[e].title,description:Co[e].description,backPath:Co[e].backPath})}function Po({className:e="edit-site-save-button__button",variant:t="primary",showTooltip:n=!0,defaultLabel:a,icon:r,__next40pxDefaultSize:s=!1}){const{isDirty:i,isSaving:o,isSaveViewOpen:c,previewingThemeName:u}=(0,d.useSelect)((e=>{const{__experimentalGetDirtyEntityRecords:t,isSavingEntityRecord:n,isResolving:a}=e(Se.store),r=t(),{isSaveViewOpened:s}=e(ia),i=a("activateTheme"),o=e(Se.store).getTheme(xt());return{isDirty:r.length>0,isSaving:r.some((e=>n(e.kind,e.name,e.key)))||i,isSaveViewOpen:s(),previewingThemeName:o?.name?.rendered}}),[]),{setIsSaveViewOpened:m}=(0,d.useDispatch)(ia),p=wt()||i,h=o||!p,f=wt()?o?(0,b.sprintf)(/* translators: %s: The name of theme to be activated. */
(0,b.__)("Activating %s"),u):h?(0,b.__)("Saved"):i?(0,b.sprintf)(/* translators: %s: The name of theme to be activated. */
(0,b.__)("Activate %s & Save"),u):(0,b.sprintf)(/* translators: %s: The name of theme to be activated. */
(0,b.__)("Activate %s"),u):o?(0,b.__)("Saving"):h?(0,b.__)("Saved"):a||(0,b.__)("Save");return(0,l.createElement)(_.Button,{variant:t,className:e,"aria-disabled":h,"aria-expanded":c,isBusy:o,onClick:h?void 0:()=>m(!0),label:f,shortcut:h?void 0:Sa.displayShortcut.primary("s"),showTooltip:n,icon:r,__next40pxDefaultSize:s,size:"compact"},f)}const{useLocation:No}=nt(bt.privateApis),Io=[{kind:"postType",name:Nt}];function Mo(){const e="site-edit-save-notice",{params:t}=No(),{__unstableMarkLastChangeAsPersistent:n}=(0,d.useDispatch)(we.store),{createSuccessNotice:a,createErrorNotice:r,removeNotice:s}=(0,d.useDispatch)(xe.store),{dirtyCurrentEntity:i,countUnsavedChanges:o,isDirty:c,isSaving:u}=(0,d.useSelect)((e=>{const{__experimentalGetDirtyEntityRecords:n,isSavingEntityRecord:a}=e(Se.store),r=n();let s=null;return 1===r.length&&(t.path?.includes("wp_global_styles")?s=r.find((e=>"globalStyles"===e.name)):t.postId&&(s=r.find((e=>e.name===t.postType&&String(e.key)===t.postId)))),{dirtyCurrentEntity:s,isDirty:r.length>0,isSaving:r.some((e=>a(e.kind,e.name,e.key))),countUnsavedChanges:r.length}}),[t.path,t.postType,t.postId]),{editEntityRecord:m,saveEditedEntityRecord:p,__experimentalSaveSpecifiedEntityEdits:h}=(0,d.useDispatch)(Se.store),f=u||!c&&!wt();let g=i?(0,b.__)("Save"):(0,b.sprintf)(
// translators: %d: number of unsaved changes (number).
(0,b._n)("Review %d change…","Review %d changes…",o),o);u&&(g=(0,b.__)("Saving"));const{homeUrl:y}=(0,d.useSelect)((e=>{const{getUnstableBase:t}=e(Se.store);return{homeUrl:t()?.home}}),[]);return(0,l.createElement)(_.__experimentalHStack,{className:"edit-site-save-hub",alignment:"right",spacing:4},i?(0,l.createElement)(_.Button,{variant:"primary",onClick:async()=>{if(!i)return;s(e);const{kind:t,name:o,key:l,property:c}=i;try{"root"===i.kind&&"site"===o?await h("root","site",void 0,[c]):(Io.some((e=>e.kind===t&&e.name===o))&&m(t,o,l,{status:"publish"}),await p(t,o,l)),n(),a((0,b.__)("Site updated."),{type:"snackbar",actions:[{label:(0,b.__)("View site"),url:y}],id:e})}catch(e){r(`${(0,b.__)("Saving failed.")} ${e}`)}},isBusy:u,disabled:u,"aria-disabled":u,className:"edit-site-save-hub__button",__next40pxDefaultSize:!0},g):(0,l.createElement)(Po,{className:"edit-site-save-hub__button",variant:f?null:"primary",showTooltip:!1,icon:f&&!u?w:null,defaultLabel:g,__next40pxDefaultSize:!0}))}function Ao({onSave:e,onClose:t}){const[n,a]=(0,f.useState)(!1),[r,s]=(0,f.useState)(""),{saveEntityRecord:i}=(0,d.useDispatch)(Se.store),{createErrorNotice:o,createSuccessNotice:c}=(0,d.useDispatch)(xe.store);return(0,l.createElement)(_.Modal,{title:(0,b.__)("Draft a new page"),onRequestClose:t},(0,l.createElement)("form",{onSubmit:async function(t){if(t.preventDefault(),!n){a(!0);try{const t=await i("postType","page",{status:"draft",title:r,slug:r||(0,b.__)("No title")},{throwOnError:!0});e(t),c((0,b.sprintf)(
// translators: %s: Title of the created template e.g: "Category".
(0,b.__)('"%s" successfully created.'),t.title?.rendered||r),{type:"snackbar"})}catch(e){const t=e.message&&"unknown_error"!==e.code?e.message:(0,b.__)("An error occurred while creating the page.");o(t,{type:"snackbar"})}finally{a(!1)}}}},(0,l.createElement)(_.__experimentalVStack,{spacing:3},(0,l.createElement)(_.TextControl,{label:(0,b.__)("Page title"),onChange:s,placeholder:(0,b.__)("No title"),value:r}),(0,l.createElement)(_.__experimentalHStack,{spacing:2,justify:"end"},(0,l.createElement)(_.Button,{variant:"tertiary",onClick:t},(0,b.__)("Cancel")),(0,l.createElement)(_.Button,{variant:"primary",type:"submit",isBusy:n,"aria-disabled":n},(0,b.__)("Create draft"))))))}const{useHistory:Oo}=nt(bt.privateApis),Ro=({postType:e="page",postId:t,...n})=>{const a=kt({postType:e,postId:t},{backPath:"/page"});return(0,l.createElement)(ba,{...a,...n})};function Do(){const{records:e,isResolving:t}=(0,Se.useEntityRecords)("postType","page",{status:"any",per_page:-1}),{records:n,isResolving:a}=(0,Se.useEntityRecords)("postType",It,{per_page:-1}),r=n?.filter((({slug:e})=>["404","search"].includes(e))),s=n?.find((e=>"front-page"===e.slug))||n?.find((e=>"home"===e.slug))||n?.find((e=>"index"===e.slug)),i=e?.concat(r,[s]),{frontPage:o,postsPage:c}=(0,d.useSelect)((e=>{const{getEntityRecord:t}=e(Se.store),n=t("root","site");return{frontPage:n?.page_on_front,postsPage:n?.page_for_posts}}),[]),u=o===c,m=e&&[...e];if(!u&&m?.length){const e=m.findIndex((e=>e.id===o)),t=m.splice(e,1);m?.splice(0,0,...t);const n=m.findIndex((e=>e.id===c)),a=m.splice(n,1);m.splice(1,0,...a)}const[p,h]=(0,f.useState)(!1),g=Oo(),y=e=>{let t=ma;const a=c&&c===e?(n?.find((e=>"home"===e.slug))||n?.find((e=>"index"===e.slug)))?.id:null;switch(e){case o:t=Or;break;case c:t=Rr}return{icon:t,postType:a?It:"page",postId:a||e}},v=kt({path:"/pages"}),E=window?.__experimentalAdminViews?{...v}:{href:"edit.php?post_type=page",onClick:()=>{document.location="edit.php?post_type=page"}};return(0,l.createElement)(l.Fragment,null,p&&(0,l.createElement)(Ao,{onSave:({type:e,id:t})=>{g.push({postId:t,postType:e,canvas:"edit"}),h(!1)},onClose:()=>h(!1)}),(0,l.createElement)(ya,{title:(0,b.__)("Pages"),description:(0,b.__)("Browse and edit pages on your site."),actions:(0,l.createElement)(fa,{icon:Zr,label:(0,b.__)("Draft a new page"),onClick:()=>h(!0)}),content:(0,l.createElement)(l.Fragment,null,(t||a)&&(0,l.createElement)(_.__experimentalItemGroup,null,(0,l.createElement)(_.__experimentalItem,null,(0,b.__)("Loading pages…"))),!(t||a)&&(0,l.createElement)(_.__experimentalItemGroup,null,!i?.length&&(0,l.createElement)(_.__experimentalItem,null,(0,b.__)("No page found")),u&&s&&(0,l.createElement)(Ro,{postType:It,postId:s.id,key:s.id,icon:Or,withChevron:!0},(0,l.createElement)(_.__experimentalTruncate,{numberOfLines:1},(0,an.decodeEntities)(s.title?.rendered||(0,b.__)("(no title)")))),m?.map((({id:e,title:t})=>(0,l.createElement)(Ro,{...y(e),key:e,withChevron:!0},(0,l.createElement)(_.__experimentalTruncate,{numberOfLines:1},(0,an.decodeEntities)(t?.rendered||(0,b.__)("(no title)")))))))),footer:(0,l.createElement)(_.__experimentalVStack,{spacing:0},r?.map((e=>(0,l.createElement)(Ro,{postType:It,postId:e.id,key:e.id,icon:pa,withChevron:!0},(0,l.createElement)(_.__experimentalTruncate,{numberOfLines:1},(0,an.decodeEntities)(e.title?.rendered||(0,b.__)("(no title)")))))),(0,l.createElement)(ba,{className:"edit-site-sidebar-navigation-screen-pages__see-all",...E},(0,b.__)("Manage all pages")))}))}var Fo=(0,l.createElement)(E.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(E.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"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"}));const Bo={[Ht]:{},[Gt]:{mediaField:"featured-image",primaryField:"title"},[Ut]:{primaryField:"title",mediaField:"featured-image"}},Lo={type:Ut,search:"",filters:[],page:1,perPage:20,sort:{field:"date",direction:"desc"},hiddenFields:["date","featured-image"],layout:{...Bo[Ut]}},Vo={page:[{title:(0,b.__)("All"),slug:"all",view:Lo},{title:(0,b.__)("Drafts"),slug:"drafts",view:{...Lo,filters:[{field:"status",operator:jt,value:"draft"}]}},{title:(0,b.__)("Trash"),slug:"trash",icon:Fo,view:{...Lo,filters:[{field:"status",operator:jt,value:"trash"}]}}]};var zo=(0,l.createElement)(E.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,l.createElement)(E.Path,{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM5 4.5h14c.3 0 .5.2.5.5v3.5h-15V5c0-.3.2-.5.5-.5zm8 5.5h6.5v3.5H13V10zm-1.5 3.5h-7V10h7v3.5zm-7 5.5v-4h7v4.5H5c-.3 0-.5-.2-.5-.5zm14.5.5h-6V15h6.5v4c0 .3-.2.5-.5.5z"})),Go=(0,l.createElement)(E.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(E.Path,{d:"M4 8.8h8.9V7.2H4v1.6zm0 7h8.9v-1.5H4v1.5zM18 13c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0-3c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2z"})),Ho=(0,l.createElement)(E.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(E.Path,{d:"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"})),Uo=(0,l.createElement)(E.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,l.createElement)(E.Path,{d:"M4.67 10.664s-2.09 1.11-2.917 1.582l.494.87 1.608-.914.002.002c.343.502.86 1.17 1.563 1.84.348.33.742.663 1.185.976L5.57 16.744l.858.515 1.02-1.701a9.1 9.1 0 0 0 4.051 1.18V19h1v-2.263a9.1 9.1 0 0 0 4.05-1.18l1.021 1.7.858-.514-1.034-1.723c.442-.313.837-.646 1.184-.977.703-.669 1.22-1.337 1.563-1.839l.002-.003 1.61.914.493-.87c-1.75-.994-2.918-1.58-2.918-1.58l-.003.005a8.29 8.29 0 0 1-.422.689 10.097 10.097 0 0 1-1.36 1.598c-1.218 1.16-3.042 2.293-5.544 2.293-2.503 0-4.327-1.132-5.546-2.293a10.099 10.099 0 0 1-1.359-1.599 8.267 8.267 0 0 1-.422-.689l-.003-.005Z"})),Wo=(0,l.createElement)(E.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,l.createElement)(E.Path,{d:"M10 17.5H14V16H10V17.5ZM6 6V7.5H18V6H6ZM8 12.5H16V11H8V12.5Z"}));const{lock:jo,unlock:Zo}=(0,et.__dangerousOptInToUnstableAPIsOnlyForCoreModules)("I know using unstable features means my theme or plugin will inevitably break in the next version of WordPress.","@wordpress/dataviews"),{DropdownMenuV2:qo,DropdownMenuGroupV2:Yo,DropdownMenuItemV2:Ko,DropdownMenuItemLabelV2:Xo,kebabCase:Jo}=Zo(_.privateApis);function Qo({action:e,onClick:t}){return(0,l.createElement)(_.Button,{label:e.label,icon:e.icon,isDestructive:e.isDestructive,size:"compact",onClick:t})}function $o({action:e,onClick:t}){return(0,l.createElement)(Ko,{onClick:t,hideOnClick:!e.RenderModal},(0,l.createElement)(Xo,null,e.label))}function el({action:e,item:t,ActionTrigger:n}){const[a,r]=(0,f.useState)(!1),s={action:e,onClick:()=>r(!0)},{RenderModal:i,hideModalHeader:o}=e;return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(n,{...s}),a&&(0,l.createElement)(_.Modal,{title:!o&&e.modalHeader||e.label,__experimentalHideHeader:!!o,onRequestClose:()=>{r(!1)},overlayClassName:`dataviews-action-modal dataviews-action-modal__${Jo(e.id)}`},(0,l.createElement)(i,{item:t,closeModal:()=>r(!1)})))}function tl({actions:e,item:t}){return(0,l.createElement)(Yo,null,e.map((e=>e.RenderModal?(0,l.createElement)(el,{key:e.id,action:e,item:t,ActionTrigger:$o}):(0,l.createElement)($o,{key:e.id,action:e,onClick:()=>e.callback(t)}))))}function nl({item:e,actions:t,isCompact:n}){const{primaryActions:a,secondaryActions:r}=(0,f.useMemo)((()=>t.reduce(((t,n)=>(n.isEligible&&!n.isEligible(e)||(n.isPrimary&&n.icon?t.primaryActions.push(n):t.secondaryActions.push(n)),t)),{primaryActions:[],secondaryActions:[]})),[t,e]);return n?(0,l.createElement)(al,{item:e,primaryActions:a,secondaryActions:r}):(0,l.createElement)(_.__experimentalHStack,{spacing:1,justify:"flex-end",style:{flexShrink:"0",width:"auto"}},!!a.length&&a.map((t=>t.RenderModal?(0,l.createElement)(el,{key:t.id,action:t,item:e,ActionTrigger:Qo}):(0,l.createElement)(Qo,{key:t.id,action:t,onClick:()=>t.callback(e)}))),(0,l.createElement)(qo,{trigger:(0,l.createElement)(_.Button,{size:"compact",icon:ce,label:(0,b.__)("Actions"),disabled:!r.length}),placement:"bottom-end"},(0,l.createElement)(tl,{actions:r,item:e})))}function al({item:e,primaryActions:t,secondaryActions:n}){return(0,l.createElement)(qo,{trigger:(0,l.createElement)(_.Button,{size:"compact",icon:ce,label:(0,b.__)("Actions"),disabled:!t.length&&!n.length}),placement:"bottom-end"},!!t.length&&(0,l.createElement)(tl,{actions:t,item:e}),!!n.length&&(0,l.createElement)(tl,{actions:n,item:e}))}const{DropdownMenuItemV2:rl}=Zo(_.privateApis),sl=(0,l.createElement)(E.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(E.Circle,{cx:12,cy:12,r:3})),il=(0,f.forwardRef)((function({checked:e,name:t,value:n,hideOnClick:a,onChange:r,onClick:s,...i},o){return(0,l.createElement)(rl,{ref:o,role:"menuitemradio",name:t,"aria-checked":e,hideOnClick:!!a,prefix:e?(0,l.createElement)(_.Icon,{icon:sl}):(0,l.createElement)("span",{className:"dataviews-filters__custom-menu-radio-item-prefix","aria-hidden":"true"}),onClick:e=>{s?.(e),r?.({...e,target:{...e.target,value:n}})},...i})})),{DropdownMenuV2:ol,DropdownMenuGroupV2:ll,DropdownMenuItemV2:cl,DropdownMenuRadioItemV2:ul,DropdownMenuSeparatorV2:dl,DropdownMenuItemLabelV2:ml,DropdownMenuItemHelpTextV2:pl}=Zo(_.privateApis),hl={asc:"↑",desc:"↓"},fl=(0,f.forwardRef)((function({field:e,view:t,onChangeView:n,onHide:a},r){const s=!1!==e.enableHiding,i=!1!==e.enableSorting,o=t.sort?.field===e.id;let c,u,d,m,p;const h=(e=>{let t=e.filterBy?.operators;return t&&Array.isArray(t)||(t=Object.keys(El)),t.filter((e=>Object.keys(El).includes(e)))})(e);e.type===vl&&h.length>0&&(c={field:e.id,operators:h,elements:e.elements||[]},u=t.filters.find((e=>e.field===c.field)),p=t.filters.filter((e=>e.field!==c.field)),d=c.elements.find((e=>e.value===u?.value)),m=u?.operator||c.operators[0]);const f=!!c;return i||s||f?(0,l.createElement)(ol,{align:"start",trigger:(0,l.createElement)(_.Button,{size:"compact",className:"dataviews-view-table-header-button",ref:r,variant:"tertiary"},e.header,o&&(0,l.createElement)("span",{"aria-hidden":"true"},o&&hl[t.sort.direction])),style:{minWidth:"240px"}},(0,l.createElement)(gl,null,i&&(0,l.createElement)(ll,null,Object.entries(wl).map((([a,r])=>{const s=o&&t.sort.direction===a,i=`${e.id}-${a}`;return(0,l.createElement)(ul,{key:i,name:"view-table-sorting",value:i,checked:s,onChange:()=>{n({...t,sort:{field:e.id,direction:a}})}},(0,l.createElement)(ml,null,r.label))}))),s&&(0,l.createElement)(cl,{prefix:(0,l.createElement)(_.Icon,{icon:Uo}),onClick:()=>{a(e),n({...t,hiddenFields:t.hiddenFields.concat(e.id)})}},(0,l.createElement)(ml,null,(0,b.__)("Hide"))),f&&(0,l.createElement)(ll,null,(0,l.createElement)(ol,{key:c.field,trigger:(0,l.createElement)(cl,{prefix:(0,l.createElement)(_.Icon,{icon:Wo}),suffix:d&&(0,l.createElement)("span",{"aria-hidden":"true"},m in El&&`${El[m].label} `,d?.label)},(0,l.createElement)(ml,null,(0,b.__)("Filter by")))},(0,l.createElement)(gl,null,(0,l.createElement)(ll,null,c.elements.map((e=>{const a=d?.value===e.value;return(0,l.createElement)(il,{key:e.value,name:`view-table-${c.field}`,value:e.value,checked:a,onClick:()=>{n({...t,page:1,filters:[...p,{field:c.field,operator:m,value:a?void 0:e.value}]})}},(0,l.createElement)(ml,null,e.label),!!e.description&&(0,l.createElement)(pl,null,e.description))}))),c.operators.length>1&&(0,l.createElement)(ol,{trigger:(0,l.createElement)(cl,{suffix:(0,l.createElement)("span",{"aria-hidden":"true"},El[m]?.label)},(0,l.createElement)(ml,null,(0,b.__)("Conditions")))},Object.entries(El).map((([e,{label:a,key:r}])=>(0,l.createElement)(ul,{key:r,name:`view-table-${c.field}-conditions`,value:e,checked:m===e,onChange:e=>n({...t,page:1,filters:[...p,{field:c.field,operator:e.target.value,value:u?.value}]})},(0,l.createElement)(ml,null,a)))))))))):e.header}));function gl({children:e}){return f.Children.toArray(e).filter(Boolean).map(((e,t)=>(0,l.createElement)(f.Fragment,{key:t},t>0&&(0,l.createElement)(dl,null),e)))}var yl=(0,l.createElement)(E.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(E.Path,{d:"M12 3.2c-4.8 0-8.8 3.9-8.8 8.8 0 4.8 3.9 8.8 8.8 8.8 4.8 0 8.8-3.9 8.8-8.8 0-4.8-4-8.8-8.8-8.8zm0 16c-4 0-7.2-3.3-7.2-7.2C4.8 8 8 4.8 12 4.8s7.2 3.3 7.2 7.2c0 4-3.2 7.2-7.2 7.2zM11 17h2v-6h-2v6zm0-8h2V7h-2v2z"}));const vl="enumeration",_l="in",bl="notIn",El={[_l]:{key:"in-filter",label:(0,b.__)("Is")},[bl]:{key:"not-in-filter",label:(0,b.__)("Is not")}},wl={asc:{label:(0,b.__)("Sort ascending")},desc:{label:(0,b.__)("Sort descending")}},xl="table",Sl="list",Cl=[{type:xl,label:(0,b.__)("Table"),component:function({view:e,onChangeView:t,fields:n,actions:a,data:r,getItemId:s,isLoading:i=!1,deferredRendering:o}){const c=(0,f.useRef)(new Map),u=(0,f.useRef)(),[d,m]=(0,f.useState)();(0,f.useEffect)((()=>{u.current&&(u.current.focus(),u.current=void 0)}));const p=(0,se.useAsyncList)(r),h=(0,f.useId)();if(d)return u.current=d,void m();const g=e=>{const t=c.current.get(e.id),n=c.current.get(t.fallback);m(n?.node)},y=n.filter((t=>!e.hiddenFields.includes(t.id)&&![e.layout.mediaField,e.layout.primaryField].includes(t.id))),_=o?p:r,E=!!_?.length,w={asc:"ascending",desc:"descending"};return(0,l.createElement)("div",null,(0,l.createElement)("table",{className:"dataviews-view-table","aria-busy":i,"aria-describedby":h},(0,l.createElement)("thead",null,(0,l.createElement)("tr",null,y.map(((n,a)=>(0,l.createElement)("th",{key:n.id,style:{width:n.width||void 0,minWidth:n.minWidth||void 0,maxWidth:n.maxWidth||void 0},"data-field-id":n.id,"aria-sort":e.sort?.field===n.id&&w[e.sort.direction],scope:"col"},(0,l.createElement)(fl,{ref:e=>{e?c.current.set(n.id,{node:e,fallback:y[a>0?a-1:1]?.id}):c.current.delete(n.id)},field:n,view:e,onChangeView:t,onHide:g})))),!!a?.length&&(0,l.createElement)("th",{"data-field-id":"actions"},(0,l.createElement)("span",{className:"dataviews-view-table-header"},(0,b.__)("Actions"))))),(0,l.createElement)("tbody",null,E&&_.map((e=>(0,l.createElement)("tr",{key:s(e)},y.map((t=>(0,l.createElement)("td",{key:t.id,style:{width:t.width||void 0,minWidth:t.minWidth||void 0,maxWidth:t.maxWidth||void 0}},t.render({item:e})))),!!a?.length&&(0,l.createElement)("td",null,(0,l.createElement)(nl,{item:e,actions:a}))))))),(0,l.createElement)("div",{className:v()({"dataviews-loading":i,"dataviews-no-results":!E&&!i}),id:h},!E&&(0,l.createElement)("p",null,i?(0,b.__)("Loading…"):(0,b.__)("No results"))))},icon:zo},{type:"grid",label:(0,b.__)("Grid"),component:function({data:e,fields:t,view:n,actions:a,getItemId:r,deferredRendering:s}){const i=t.find((e=>e.id===n.layout.mediaField)),o=t.find((e=>e.id===n.layout.primaryField)),c=t.filter((e=>!n.hiddenFields.includes(e.id)&&![n.layout.mediaField,n.layout.primaryField].includes(e.id))),u=(0,se.useAsyncList)(e,{step:3}),d=s?u:e;return(0,l.createElement)(_.__experimentalGrid,{gap:8,columns:2,alignment:"top",className:"dataviews-view-grid"},d.map((e=>(0,l.createElement)(_.__experimentalVStack,{spacing:3,key:r(e),className:"dataviews-view-grid__card"},(0,l.createElement)("div",{className:"dataviews-view-grid__media"},i?.render({item:e})),(0,l.createElement)(_.__experimentalHStack,{className:"dataviews-view-grid__primary-field",justify:"space-between"},(0,l.createElement)(_.FlexBlock,null,o?.render({item:e})),(0,l.createElement)(nl,{item:e,actions:a,isCompact:!0})),(0,l.createElement)(_.__experimentalVStack,{className:"dataviews-view-grid__fields",spacing:3},c.map((t=>{const n=t.render({item:e});return n?(0,l.createElement)(_.__experimentalVStack,{className:"dataviews-view-grid__field",key:t.id,spacing:1},(0,l.createElement)("div",{className:"dataviews-view-grid__field-header"},t.header),(0,l.createElement)("div",{className:"dataviews-view-grid__field-value"},n)):null})))))))},icon:zr},{type:Sl,label:(0,b.__)("List"),component:function({view:e,fields:t,data:n,getItemId:a,onSelectionChange:r,onDetailsChange:s,selection:i,deferredRendering:o}){const c=(0,se.useAsyncList)(n,{step:3}),u=o?c:n,d=t.find((t=>t.id===e.layout.mediaField)),m=t.find((t=>t.id===e.layout.primaryField)),p=t.filter((t=>!e.hiddenFields.includes(t.id)&&![e.layout.primaryField,e.layout.mediaField].includes(t.id))),h=e=>t=>{const{keyCode:n}=t;[Sa.ENTER,Sa.SPACE].includes(n)&&r([e])};return(0,l.createElement)("ul",{className:"dataviews-view-list"},u.map((e=>(0,l.createElement)("li",{key:a(e),className:v()({"is-selected":i.includes(e.id)})},(0,l.createElement)(_.__experimentalHStack,{className:"dataviews-view-list__item-wrapper"},(0,l.createElement)("div",{role:"button",tabIndex:0,"aria-pressed":i.includes(e.id),onKeyDown:h(e),className:"dataviews-view-list__item",onClick:()=>r([e])},(0,l.createElement)(_.__experimentalHStack,{spacing:3,justify:"start"},(0,l.createElement)("div",{className:"dataviews-view-list__media-wrapper"},d?.render({item:e})||(0,l.createElement)("div",{className:"dataviews-view-list__media-placeholder"})),(0,l.createElement)(_.__experimentalVStack,{spacing:1},m?.render({item:e}),(0,l.createElement)("div",{className:"dataviews-view-list__fields"},p.map((t=>(0,l.createElement)("span",{key:t.id,className:"dataviews-view-list__field"},t.render({item:e})))))))),s&&(0,l.createElement)(_.Button,{className:"dataviews-view-list__details-button",onClick:()=>s([e]),icon:yl,label:(0,b.__)("View details"),size:"compact"}))))))},icon:(0,b.isRTL)()?Go:Ho}],{useLocation:kl}=nt(bt.privateApis);function Tl({title:e,slug:t,customViewId:n,type:a,icon:r,isActive:s,isCustom:i,suffix:o}){const{params:{path:c}}=kl(),u=r||Cl.find((e=>e.type===a)).icon,d=kt({path:c,activeView:"true"===i?n:t,isCustom:i});return(0,l.createElement)(_.__experimentalHStack,{justify:"flex-start",className:v()("edit-site-sidebar-dataviews-dataview-item",{"is-selected":s})},(0,l.createElement)(ba,{icon:u,...d,"aria-current":s?"true":void 0},e),o)}const{useHistory:Pl,useLocation:Nl}=nt(bt.privateApis);function Il({type:e,setIsAdding:t}){const{params:{path:n}}=Nl(),a=Pl(),{saveEntityRecord:r}=(0,d.useDispatch)(Se.store),[s,i]=(0,f.useState)(""),[o,c]=(0,f.useState)(!1);return(0,l.createElement)("form",{onSubmit:async i=>{i.preventDefault(),c(!0);const{getEntityRecords:o}=(0,d.resolveSelect)(Se.store);let l;const u=await o("taxonomy","wp_dataviews_type",{slug:e});if(u&&u.length>0)l=u[0].id;else{const t=await r("taxonomy","wp_dataviews_type",{name:e});t&&t.id&&(l=t.id)}const m=await r("postType","wp_dataviews",{title:s,status:"publish",wp_dataviews_type:l,content:JSON.stringify(Vo[e][0].view)});a.push({path:n,activeView:m.id,isCustom:"true"}),c(!1),t(!1)}},(0,l.createElement)(_.__experimentalVStack,{spacing:"5"},(0,l.createElement)(_.TextControl,{__nextHasNoMarginBottom:!0,label:(0,b.__)("Name"),value:s,onChange:i,placeholder:(0,b.__)("My view"),className:"patterns-create-modal__name-input"}),(0,l.createElement)(_.__experimentalHStack,{justify:"right"},(0,l.createElement)(_.Button,{variant:"tertiary",onClick:()=>{t(!1)}},(0,b.__)("Cancel")),(0,l.createElement)(_.Button,{variant:"primary",type:"submit","aria-disabled":!s||o,isBusy:o},(0,b.__)("Create")))))}function Ml({type:e}){const[t,n]=(0,f.useState)(!1);return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(ba,{icon:Zr,onClick:()=>{n(!0)},className:"dataviews__siderbar-content-add-new-item"},(0,b.__)("New view")),t&&(0,l.createElement)(_.Modal,{title:(0,b.__)("Add new view"),onRequestClose:()=>{n(!1)}},(0,l.createElement)(Il,{type:e,setIsAdding:n})))}const{useHistory:Al,useLocation:Ol}=nt(bt.privateApis),Rl=[];function Dl({dataviewId:e,currentTitle:t,setIsRenaming:n}){const{editEntityRecord:a}=(0,d.useDispatch)(Se.store),[r,s]=(0,f.useState)(t);return(0,l.createElement)("form",{onSubmit:async t=>{t.preventDefault(),await a("postType","wp_dataviews",e,{title:r}),n(!1)}},(0,l.createElement)(_.__experimentalVStack,{spacing:"5"},(0,l.createElement)(_.TextControl,{__nextHasNoMarginBottom:!0,label:(0,b.__)("Name"),value:r,onChange:s,placeholder:(0,b.__)("My view"),className:"patterns-create-modal__name-input"}),(0,l.createElement)(_.__experimentalHStack,{justify:"right"},(0,l.createElement)(_.Button,{variant:"tertiary",onClick:()=>{n(!1)}},(0,b.__)("Cancel")),(0,l.createElement)(_.Button,{variant:"primary",type:"submit","aria-disabled":!r},(0,b.__)("Rename")))))}function Fl({dataviewId:e,isActive:t}){const{params:{path:n}}=Ol(),a=Al(),{dataview:r}=(0,d.useSelect)((t=>{const{getEditedEntityRecord:n}=t(Se.store);return{dataview:n("postType","wp_dataviews",e)}}),[e]),{deleteEntityRecord:s}=(0,d.useDispatch)(Se.store),i=(0,f.useMemo)((()=>JSON.parse(r.content).type),[r.content]),[o,c]=(0,f.useState)(!1);return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(Tl,{title:r.title,type:i,isActive:t,isCustom:"true",customViewId:e,suffix:(0,l.createElement)(_.DropdownMenu,{icon:ce,label:(0,b.__)("Actions"),className:"edit-site-sidebar-dataviews-dataview-item__dropdown-menu",toggleProps:{style:{color:"inherit"},size:"small"}},(({onClose:e})=>(0,l.createElement)(_.MenuGroup,null,(0,l.createElement)(_.MenuItem,{onClick:()=>{c(!0),e()}},(0,b.__)("Rename")),(0,l.createElement)(_.MenuItem,{onClick:async()=>{await s("postType","wp_dataviews",r.id,{force:!0}),t&&a.replace({path:n}),e()},isDestructive:!0},(0,b.__)("Delete")))))}),o&&(0,l.createElement)(_.Modal,{title:(0,b.__)("Rename view"),onRequestClose:()=>{c(!1)}},(0,l.createElement)(Dl,{dataviewId:e,setIsRenaming:c,currentTitle:r.title})))}function Bl({type:e,activeView:t,isCustom:n}){const a=function(e){return(0,d.useSelect)((t=>{const{getEntityRecords:n}=t(Se.store),a=n("taxonomy","wp_dataviews_type",{slug:e});return a&&0!==a.length&&n("postType","wp_dataviews",{wp_dataviews_type:a[0].id,orderby:"date",order:"asc"})||Rl}))}(e);return(0,l.createElement)(l.Fragment,null,(0,l.createElement)("div",{className:"edit-site-sidebar-navigation-screen-dataviews__group-header"},(0,l.createElement)(_.__experimentalHeading,{level:2},(0,b.__)("Custom Views"))),(0,l.createElement)(_.__experimentalItemGroup,null,a.map((e=>(0,l.createElement)(Fl,{key:e.id,dataviewId:e.id,isActive:"true"===n&&Number(t)===e.id}))),(0,l.createElement)(Ml,{type:e})))}const{useLocation:Ll}=nt(bt.privateApis),Vl={"/page":"page"};function zl(){const{params:{path:e,activeView:t="all",isCustom:n="false"}}=Ll();if(!e||!Vl[e])return null;const a=Vl[e];return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(_.__experimentalItemGroup,null,Vo[a].map((e=>(0,l.createElement)(Tl,{key:e.slug,slug:e.slug,title:e.title,icon:e.icon,type:e.view.type,isActive:"false"===n&&e.slug===t,isCustom:"false"})))),(0,l.createElement)(Bl,{activeView:t,type:a,isCustom:"true"}))}const Gl=({postType:e="page",postId:t,...n})=>{const a=kt({postType:e,postId:t},{backPath:"/page"});return(0,l.createElement)(ba,{...a,...n})};function Hl(){const{records:e}=(0,Se.useEntityRecords)("postType",It,{per_page:-1}),t=(0,f.useMemo)((()=>e?.filter((({slug:e})=>["404","search"].includes(e)))),[e]);return(0,l.createElement)(ya,{title:(0,b.__)("Pages"),content:(0,l.createElement)(zl,null),footer:(0,l.createElement)(_.__experimentalVStack,{spacing:0},t?.map((e=>(0,l.createElement)(Gl,{postType:It,postId:e.id,key:e.id,icon:pa,withChevron:!0},(0,l.createElement)(_.__experimentalTruncate,{numberOfLines:1},(0,an.decodeEntities)(e.title?.rendered||(0,b.__)("(no title)")))))))})}var Ul=window.wp.dom,Wl=window.wp.escapeHtml,jl=window.wp.wordcount;function Zl({status:e,date:t,short:n}){const a=(0,_r.humanTimeDiff)(t);let r=e;switch(e){case"publish":r=t?(0,f.createInterpolateElement)((0,b.sprintf)(/* translators: %s: is the relative time when the post was published. */
(0,b.__)("Published <time>%s</time>"),a),{time:(0,l.createElement)("time",{dateTime:t})}):(0,b.__)("Published");break;case"future":const e=(0,_r.dateI18n)(n?"M j":"F j",(0,_r.getDate)(t));r=t?(0,f.createInterpolateElement)((0,b.sprintf)(/* translators: %s: is the formatted date and time on which the post is scheduled to be published. */
(0,b.__)("Scheduled: <time>%s</time>"),e),{time:(0,l.createElement)("time",{dateTime:t})}):(0,b.__)("Scheduled");break;case"draft":r=(0,b.__)("Draft");break;case"pending":r=(0,b.__)("Pending");break;case"private":r=(0,b.__)("Private");break;case"protected":r=(0,b.__)("Password protected")}return(0,l.createElement)("div",{className:v()("edit-site-sidebar-navigation-screen-page__status",{[`has-status has-${e}-status`]:!!e})},r)}const ql=189;function Yl({id:e}){const{record:t}=(0,Se.useEntityRecord)("postType","page",e),{parentTitle:n,templateTitle:a,isPostsPage:r}=(0,d.useSelect)((e=>{const{getEditedPostId:n}=nt(e(ia)),a=e(Se.store).getEntityRecord("postType",It,n()),r=a?.title?.rendered,s=t?.parent?e(Se.store).getEntityRecord("postType","page",t.parent,{_fields:["title"]})?.title?.rendered:null,{getEntityRecord:i}=e(Se.store),o=i("root","site");return{parentTitle:s,templateTitle:r,isPostsPage:t?.id===o?.page_for_posts}}),[t?.parent,t?.id]);return(0,l.createElement)(Sr,{spacing:5,title:(0,b.__)("Details")},function(e){if(!e)return[];const t=[{label:(0,b.__)("Status"),value:(0,l.createElement)(Zl,{status:e?.password?"protected":e.status,date:e?.date,short:!0})},{label:(0,b.__)("Slug"),value:(0,l.createElement)(_.__experimentalTruncate,{numberOfLines:1},(0,Et.safeDecodeURIComponent)(e.slug||e.generated_slug))}];e?.templateTitle&&t.push({label:(0,b.__)("Template"),value:(0,an.decodeEntities)(e.templateTitle)}),e?.parentTitle&&t.push({label:(0,b.__)("Parent"),value:(0,an.decodeEntities)(e.parentTitle||(0,b.__)("(no title)"))})
/*
   * translators: If your word count is based on single characters (e.g. East Asian characters),
   * enter 'characters_excluding_spaces' or 'characters_including_spaces'. Otherwise, enter 'words'.
   * Do not translate into your own language.
   */;const n=(0,b._x)("words","Word count type. Do not translate!"),a=e?.content?.rendered?(0,jl.count)(e.content.rendered,n):0,r=Math.round(a/ql);return a&&!e?.isPostsPage&&t.push({label:(0,b.__)("Words"),value:a.toLocaleString()||(0,b.__)("Unknown")},{label:(0,b.__)("Time to read"),value:r>1?(0,b.sprintf)(/* translators: %s: is the number of minutes. */
(0,b.__)("%s mins"),r.toLocaleString()):(0,b.__)("< 1 min")}),t}({parentTitle:n,templateTitle:a,isPostsPage:r,...t}).map((({label:e,value:t})=>(0,l.createElement)(wr,{key:e},(0,l.createElement)(Er,null,e),(0,l.createElement)(xr,null,t)))))}function Kl({postId:e,onRemove:t}){const{createSuccessNotice:n,createErrorNotice:a}=(0,d.useDispatch)(xe.store),{deleteEntityRecord:r}=(0,d.useDispatch)(Se.store),s=(0,d.useSelect)((t=>t(Se.store).getEntityRecord("postType","page",e)),[e]);return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(_.MenuItem,{onClick:()=>async function(){try{await r("postType","page",e,{},{throwOnError:!0}),n((0,b.sprintf)(/* translators: The page's title. */
(0,b.__)('"%s" moved to the Trash.'),(0,an.decodeEntities)(s.title.rendered)),{type:"snackbar",id:"edit-site-page-trashed"}),t?.()}catch(e){const t=e.message&&"unknown_error"!==e.code?e.message:(0,b.__)("An error occurred while moving the page to the trash.");a(t,{type:"snackbar"})}}(),isDestructive:!0,variant:"secondary"},(0,b.__)("Move to Trash")))}function Xl({postId:e,toggleProps:t,onRemove:n}){return(0,l.createElement)(_.DropdownMenu,{icon:ce,label:(0,b.__)("Actions"),toggleProps:t},(()=>(0,l.createElement)(_.MenuGroup,null,(0,l.createElement)(Kl,{postId:e,onRemove:n}))))}const{useHistory:Jl}=nt(bt.privateApis);function Ql({backPath:e}){const{setCanvasMode:t}=nt((0,d.useDispatch)(ia)),n=Jl(),{params:{postId:a},goTo:r}=(0,_.__experimentalUseNavigator)(),{record:s,hasResolved:i}=(0,Se.useEntityRecord)("postType","page",a),{featuredMediaAltText:o,featuredMediaSourceUrl:c}=(0,d.useSelect)((e=>{const{getEntityRecord:t}=e(Se.store),n=s?.featured_media?t("postType","attachment",s?.featured_media):null;return{featuredMediaSourceUrl:n?.media_details.sizes?.medium?.source_url||n?.source_url,featuredMediaAltText:(0,Wl.escapeAttribute)(n?.alt_text||n?.description?.raw||"")}}),[s]);(0,f.useEffect)((()=>{i&&!s&&n.push({path:"/page",postId:void 0,postType:void 0,canvas:"view"})}),[i,n]);const u=o?(0,an.decodeEntities)(o):(0,an.decodeEntities)(s?.title?.rendered||(0,b.__)("Featured image"));return s?(0,l.createElement)(ya,{backPath:e,title:(0,an.decodeEntities)(s?.title?.rendered||(0,b.__)("(no title)")),actions:(0,l.createElement)(l.Fragment,null,(0,l.createElement)(Xl,{postId:a,toggleProps:{as:fa},onRemove:()=>{r("/page")}}),(0,l.createElement)(fa,{onClick:()=>t("edit"),label:(0,b.__)("Edit"),icon:wa})),meta:(0,l.createElement)(_.ExternalLink,{className:"edit-site-sidebar-navigation-screen__page-link",href:s.link},(0,Et.filterURLForDisplay)((0,Et.safeDecodeURIComponent)(s.link))),content:(0,l.createElement)(l.Fragment,null,!!c&&(0,l.createElement)(_.__experimentalVStack,{className:"edit-site-sidebar-navigation-screen-page__featured-image-wrapper",alignment:"left",spacing:2},(0,l.createElement)("div",{className:"edit-site-sidebar-navigation-screen-page__featured-image has-image"},(0,l.createElement)("img",{alt:u,src:c}))),!!s?.excerpt?.rendered&&(0,l.createElement)(_.__experimentalTruncate,{className:"edit-site-sidebar-navigation-screen-page__excerpt",numberOfLines:3},(0,Ul.__unstableStripHTML)(s.excerpt.rendered)),(0,l.createElement)(Yl,{id:a})),footer:s?.modified?(0,l.createElement)(Cr,{record:s}):null}):null}const{useLocation:$l}=nt(bt.privateApis);function ec({className:e,...t}){return(0,l.createElement)(_.__experimentalNavigatorScreen,{className:v()("edit-site-sidebar__screen-wrapper",e),...t})}function tc(){return function(){const e=Gi(),{params:t}=zi(),{location:n,params:a,goTo:r}=(0,_.__experimentalUseNavigator)(),s=(0,f.useRef)(!0);(0,f.useEffect)((()=>{function r(n){if(a=n,r=t,Object.entries(a).every((([e,t])=>r[e]===t)))return;var a,r;const s={...t,...n};e.push(s)}s.current?s.current=!1:a?.postType&&a?.postId?r({postType:a?.postType,postId:a?.postId,path:void 0}):n.path.startsWith("/page/")&&a?.postId?r({postType:"page",postId:a?.postId,path:void 0}):"/patterns"===n.path?r({postType:void 0,postId:void 0,canvas:void 0,path:n.path}):r({postType:void 0,postId:void 0,categoryType:void 0,categoryId:void 0,path:"/"===n.path?void 0:n.path})}),[n?.path,a]),(0,f.useEffect)((()=>{const e=Hi(t);n.path!==e&&r(e)}),[t])}(),(0,l.createElement)(l.Fragment,null,(0,l.createElement)(ec,{path:"/"},(0,l.createElement)(Ar,null)),(0,l.createElement)(ec,{path:"/navigation"},(0,l.createElement)(wo,null)),(0,l.createElement)(ec,{path:"/navigation/:postType/:postId"},(0,l.createElement)(go,null)),(0,l.createElement)(ec,{path:"/wp_global_styles"},(0,l.createElement)(Nr,null)),(0,l.createElement)(ec,{path:"/page"},window?.__experimentalAdminViews?(0,l.createElement)(Hl,null):(0,l.createElement)(Do,null)),(0,l.createElement)(ec,{path:"/page/:postId"},(0,l.createElement)(Ql,null)),(0,l.createElement)(ec,{path:"/:postType(wp_template)"},(0,l.createElement)(Ns,null)),(0,l.createElement)(ec,{path:"/patterns"},(0,l.createElement)(Ai,null)),(0,l.createElement)(ec,{path:"/:postType(wp_template|wp_template_part)/all"},(0,l.createElement)(To,null)),(0,l.createElement)(ec,{path:"/:postType(wp_template_part|wp_block)/:postId"},(0,l.createElement)(ro,null)),(0,l.createElement)(ec,{path:"/:postType(wp_template)/:postId"},(0,l.createElement)(Ws,null)))}var nc=(0,f.memo)((function(){const{params:e}=$l(),t=(0,f.useRef)(Hi(e));return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(_.__experimentalNavigatorProvider,{className:"edit-site-sidebar__content",initialPath:t.current},(0,l.createElement)(tc,null)),(0,l.createElement)(Mo,null))})),ac=(0,l.createElement)(E.SVG,{width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(E.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"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"})),rc=(0,l.createElement)(E.SVG,{width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(E.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"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"}));function sc({className:e,identifier:t,title:n,icon:a,children:r,closeLabel:s,header:i,headerClassName:o,panelClassName:c}){return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(re,{className:e,scope:"core/edit-site",identifier:t,title:n,smallScreenTitle:n,icon:a,closeLabel:s,header:i,headerClassName:o,panelClassName:c},r),(0,l.createElement)($,{scope:"core/edit-site",identifier:t,icon:a},n))}function ic({className:e,...t}){return(0,l.createElement)(_.Icon,{className:v()(e,"edit-site-global-styles-icon-with-current-color"),...t})}function oc({icon:e,children:t,...n}){return(0,l.createElement)(_.__experimentalItem,{...n},e&&(0,l.createElement)(_.__experimentalHStack,{justify:"flex-start"},(0,l.createElement)(ic,{icon:e,size:24}),(0,l.createElement)(_.FlexItem,null,t)),!e&&t)}function lc(e){return(0,l.createElement)(_.__experimentalNavigatorButton,{as:oc,...e})}var cc=(0,l.createElement)(E.SVG,{xmlns:"http://www.w3.org/2000/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2-1 3 0 3.4 2.7 6.1 6.1 6.1s6.1-2.7 6.1-6.1c0-.8-.3-1.8-1-3zm-5.1 7.6c-2.5 0-4.6-2.1-4.6-4.6 0-.3.1-1 .8-2.3.5-.9 1.1-1.9 2-3.1.7-.9 1.3-1.7 1.8-2.3.7.8 1.3 1.6 1.8 2.3.8 1.1 1.5 2.2 2 3.1.7 1.3.8 2 .8 2.3 0 2.5-2.1 4.6-4.6 4.6z"}));const{useHasDimensionsPanel:dc,useHasTypographyPanel:mc,useHasColorPanel:pc,useGlobalSetting:hc,useSettingsForBlockElement:fc}=nt(we.privateApis);var gc=function(){const[e]=hc(""),t=fc(e),n=mc(t),a=pc(t),r=dc(t);return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(_.__experimentalItemGroup,null,n&&(0,l.createElement)(lc,{icon:cc,path:"/typography","aria-label":(0,b.__)("Typography styles")},(0,b.__)("Typography")),a&&(0,l.createElement)(lc,{icon:uc,path:"/colors","aria-label":(0,b.__)("Colors styles")},(0,b.__)("Colors")),r&&(0,l.createElement)(lc,{icon:pa,path:"/layout","aria-label":(0,b.__)("Layout styles")},(0,b.__)("Layout"))))};const{useGlobalStyle:yc}=nt(we.privateApis);var vc=function(){const[e]=yc("css"),{hasVariations:t,canEditCSS:n}=(0,d.useSelect)((e=>{const{getEntityRecord:t,__experimentalGetCurrentGlobalStylesId:n,__experimentalGetCurrentThemeGlobalStylesVariations:a}=e(Se.store),r=n(),s=r?t("root","globalStyles",r):void 0;return{hasVariations:!!a()?.length,canEditCSS:!!s?._links?.["wp:action-edit-css"]}}),[]);return(0,l.createElement)(_.Card,{size:"small",className:"edit-site-global-styles-screen-root"},(0,l.createElement)(_.CardBody,null,(0,l.createElement)(_.__experimentalVStack,{spacing:4},(0,l.createElement)(_.Card,null,(0,l.createElement)(_.CardMedia,null,(0,l.createElement)(Va,null))),t&&(0,l.createElement)(_.__experimentalItemGroup,null,(0,l.createElement)(lc,{path:"/variations","aria-label":(0,b.__)("Browse styles")},(0,l.createElement)(_.__experimentalHStack,{justify:"space-between"},(0,l.createElement)(_.FlexItem,null,(0,b.__)("Browse styles")),(0,l.createElement)(ic,{icon:(0,b.isRTL)()?pe:he})))),(0,l.createElement)(gc,null))),(0,l.createElement)(_.CardDivider,null),(0,l.createElement)(_.CardBody,null,(0,l.createElement)(_.__experimentalSpacer,{as:"p",paddingTop:2,paddingX:"13px",marginBottom:4},(0,b.__)("Customize the appearance of specific blocks for the whole site.")),(0,l.createElement)(_.__experimentalItemGroup,null,(0,l.createElement)(lc,{path:"/blocks","aria-label":(0,b.__)("Blocks styles")},(0,l.createElement)(_.__experimentalHStack,{justify:"space-between"},(0,l.createElement)(_.FlexItem,null,(0,b.__)("Blocks")),(0,l.createElement)(ic,{icon:(0,b.isRTL)()?pe:he}))))),n&&!!e&&(0,l.createElement)(l.Fragment,null,(0,l.createElement)(_.CardDivider,null),(0,l.createElement)(_.CardBody,null,(0,l.createElement)(_.__experimentalSpacer,{as:"p",paddingTop:2,paddingX:"13px",marginBottom:4},(0,b.__)("Add your own CSS to customize the appearance and layout of your site.")),(0,l.createElement)(_.__experimentalItemGroup,null,(0,l.createElement)(lc,{path:"/css","aria-label":(0,b.__)("Additional CSS")},(0,l.createElement)(_.__experimentalHStack,{justify:"space-between"},(0,l.createElement)(_.FlexItem,null,(0,b.__)("Additional CSS")),(0,l.createElement)(ic,{icon:(0,b.isRTL)()?pe:he})))))))};function _c(e){var t;return t=(0,d.useSelect)((t=>{const{getBlockStyles:n}=t(c.store);return n(e)}),[e]),t?.filter((e=>"block"===e.source))}function bc({name:e}){const t=_c(e);return(0,l.createElement)(_.__experimentalItemGroup,{isBordered:!0,isSeparated:!0},t.map(((t,n)=>t?.isDefault?null:(0,l.createElement)(lc,{key:n,path:"/blocks/"+encodeURIComponent(e)+"/variations/"+encodeURIComponent(t.name),"aria-label":t.label},t.label))))}var Ec=function({title:e,description:t,onBack:n}){return(0,l.createElement)(_.__experimentalVStack,{spacing:0},(0,l.createElement)(_.__experimentalView,null,(0,l.createElement)(_.__experimentalSpacer,{marginBottom:0,paddingX:4,paddingY:3},(0,l.createElement)(_.__experimentalHStack,{spacing:2},(0,l.createElement)(_.__experimentalNavigatorToParentButton,{style:{minWidth:24,padding:0},icon:(0,b.isRTL)()?he:pe,isSmall:!0,"aria-label":(0,b.__)("Navigate to the previous view"),onClick:n}),(0,l.createElement)(_.__experimentalSpacer,null,(0,l.createElement)(_.__experimentalHeading,{className:"edit-site-global-styles-header",level:2,size:13},e))))),t&&(0,l.createElement)("p",{className:"edit-site-global-styles-header__description"},t))};const{useHasDimensionsPanel:wc,useHasTypographyPanel:xc,useHasBorderPanel:Sc,useGlobalSetting:Cc,useSettingsForBlockElement:kc,useHasColorPanel:Tc}=nt(we.privateApis);function Pc(e){const[t]=Cc("",e),n=kc(t,e),a=xc(n),r=Tc(n),s=Sc(n),i=wc(n),o=s||i,l=!!_c(e)?.length;return a||r||o||l}function Nc({block:e}){if(!Pc(e.name))return null;const t=(0,b.sprintf)(
// translators: %s: is the name of a block e.g., 'Image' or 'Table'.
(0,b.__)("%s block styles"),e.title);return(0,l.createElement)(lc,{path:"/blocks/"+encodeURIComponent(e.name),"aria-label":t},(0,l.createElement)(_.__experimentalHStack,{justify:"flex-start"},(0,l.createElement)(we.BlockIcon,{icon:e.icon}),(0,l.createElement)(_.FlexItem,null,e.title)))}const Ic=(0,f.memo)((function({filterValue:e}){const t=function(){const e=(0,d.useSelect)((e=>e(c.store).getBlockTypes()),[]),{core:t,noncore:n}=e.reduce(((e,t)=>{const{core:n,noncore:a}=e;return(t.name.startsWith("core/")?n:a).push(t),e}),{core:[],noncore:[]});return[...t,...n]}(),n=(0,se.useDebounce)(nn.speak,500),{isMatchingSearchTerm:a}=(0,d.useSelect)(c.store),r=e?t.filter((t=>a(t,e))):t,s=(0,f.useRef)();return(0,f.useEffect)((()=>{if(!e)return;const t=s.current.childElementCount,a=(0,b.sprintf)(/* translators: %d: number of results. */
(0,b._n)("%d result found.","%d results found.",t),t);n(a,t)}),[e,n]),(0,l.createElement)("div",{ref:s,className:"edit-site-block-types-item-list"},r.map((e=>(0,l.createElement)(Nc,{block:e,key:"menu-itemblock-"+e.name}))))}));var Mc=function(){const[e,t]=(0,f.useState)(""),n=(0,f.useDeferredValue)(e);return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(Ec,{title:(0,b.__)("Blocks"),description:(0,b.__)("Customize the appearance of specific blocks and for the whole site.")}),(0,l.createElement)(_.SearchControl,{__nextHasNoMarginBottom:!0,className:"edit-site-block-types-search",onChange:t,value:e,label:(0,b.__)("Search for blocks"),placeholder:(0,b.__)("Search")}),(0,l.createElement)(Ic,{filterValue:n}))},Ac=({name:e,variation:t=""})=>{var n;const a=(0,c.getBlockType)(e)?.example,r=(0,f.useMemo)((()=>{if(!a)return null;let n=a;return t&&(n={...n,attributes:{...n.attributes,className:"is-style-"+t}}),(0,c.getBlockFromExample)(e,n)}),[e,a,t]),s=null!==(n=a?.viewportWidth)&&void 0!==n?n:null,i="150px";return a?(0,l.createElement)(_.__experimentalSpacer,{marginX:4,marginBottom:4},(0,l.createElement)("div",{className:"edit-site-global-styles__block-preview-panel",style:{maxHeight:i,boxSizing:"initial"}},(0,l.createElement)(we.BlockPreview,{blocks:r,viewportWidth:s,minHeight:i,additionalStyles:[{css:`\n\t\t\t\t\t\t\t\tbody{\n\t\t\t\t\t\t\t\t\tmin-height:${i};\n\t\t\t\t\t\t\t\t\tdisplay:flex;align-items:center;justify-content:center;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t`}]}))):null},Oc=function({children:e,level:t}){return(0,l.createElement)(_.__experimentalHeading,{className:"edit-site-global-styles-subtitle",level:null!=t?t:2},e)};function Rc(e){if(!e)return e;const t=e.color||e.width;return!e.style&&t?{...e,style:"solid"}:!e.style||t?e:void 0}const{useHasDimensionsPanel:Dc,useHasTypographyPanel:Fc,useHasBorderPanel:Bc,useGlobalSetting:Lc,useSettingsForBlockElement:Vc,useHasColorPanel:zc,useHasEffectsPanel:Gc,useHasFiltersPanel:Hc,useHasImageSettingsPanel:Uc,useGlobalStyle:Wc,BorderPanel:jc,ColorPanel:Zc,TypographyPanel:qc,DimensionsPanel:Yc,EffectsPanel:Kc,FiltersPanel:Xc,ImageSettingsPanel:Jc,AdvancedPanel:Qc}=nt(we.privateApis);var $c=function({name:e,variation:t}){let n=[];t&&(n=["variations",t].concat(n));const a=n.join("."),[r]=Wc(a,e,"user",{shouldDecodeEncode:!1}),[s,i]=Wc(a,e,"all",{shouldDecodeEncode:!1}),[o]=Lc("",e,"user"),[u,m]=Lc("",e),p=Vc(u,e),h=(0,c.getBlockType)(e);p?.spacing?.blockGap&&h?.supports?.spacing?.blockGap&&(!0===h?.supports?.spacing?.__experimentalSkipSerialization||h?.supports?.spacing?.__experimentalSkipSerialization?.some?.((e=>"blockGap"===e)))&&(p.spacing.blockGap=!1);const g=_c(e),y=Fc(p),v=zc(p),E=Bc(p),w=Dc(p),x=Gc(p),S=Hc(p),C=Uc(e,o,p),k=!!g?.length&&!t,{canEditCSS:T}=(0,d.useSelect)((e=>{const{getEntityRecord:t,__experimentalGetCurrentGlobalStylesId:n}=e(Se.store),a=n(),r=a?t("root","globalStyles",a):void 0;return{canEditCSS:!!r?._links?.["wp:action-edit-css"]}}),[]),P=t?g.find((e=>e.name===t)):null,N=(0,f.useMemo)((()=>({...s,layout:p.layout})),[s,p.layout]),I=(0,f.useMemo)((()=>({...r,layout:o.layout})),[r,o.layout]);return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(Ec,{title:t?P.label:h.title}),(0,l.createElement)(Ac,{name:e,variation:t}),k&&(0,l.createElement)("div",{className:"edit-site-global-styles-screen-variations"},(0,l.createElement)(_.__experimentalVStack,{spacing:3},(0,l.createElement)(Oc,null,(0,b.__)("Style Variations")),(0,l.createElement)(bc,{name:e}))),v&&(0,l.createElement)(Zc,{inheritedValue:s,value:r,onChange:i,settings:p}),y&&(0,l.createElement)(qc,{inheritedValue:s,value:r,onChange:i,settings:p}),w&&(0,l.createElement)(Yc,{inheritedValue:N,value:I,onChange:e=>{const t={...e};delete t.layout,i(t),e.layout!==o.layout&&m({...o,layout:e.layout})},settings:p,includeLayoutControls:!0}),E&&(0,l.createElement)(jc,{inheritedValue:s,value:r,onChange:e=>{if(!e?.border)return void i(e);const{radius:t,...n}=e.border,a=function(e){return e?(0,_.__experimentalHasSplitBorders)(e)?{top:Rc(e.top),right:Rc(e.right),bottom:Rc(e.bottom),left:Rc(e.left)}:Rc(e):e}(n),r=(0,_.__experimentalHasSplitBorders)(a)?{color:null,style:null,width:null,...a}:{top:a,right:a,bottom:a,left:a};i({...e,border:{...r,radius:t}})},settings:p}),x&&(0,l.createElement)(Kc,{inheritedValue:N,value:I,onChange:i,settings:p,includeLayoutControls:!0}),S&&(0,l.createElement)(Xc,{inheritedValue:N,value:I,onChange:i,settings:p,includeLayoutControls:!0}),C&&(0,l.createElement)(Jc,{onChange:e=>{m(void 0===e?{...u,lightbox:void 0}:{...u,lightbox:{...u.lightbox,...e}})},value:o,inheritedValue:p}),T&&(0,l.createElement)(_.PanelBody,{title:(0,b.__)("Advanced"),initialOpen:!1},(0,l.createElement)("p",null,(0,b.sprintf)(
// translators: %s: is the name of a block e.g., 'Image' or 'Table'.
(0,b.__)("Add your own CSS to customize the appearance of the %s block. You do not need to include a CSS selector, just add the property and value."),h?.title)),(0,l.createElement)(Qc,{value:r,onChange:i,inheritedValue:s})))};const{useGlobalStyle:eu}=nt(we.privateApis);function tu({parentMenu:e,element:t,label:n}){const a="text"!==t&&t?`elements.${t}.`:"",r="link"===t?{textDecoration:"underline"}:{},[s]=eu(a+"typography.fontFamily"),[i]=eu(a+"typography.fontStyle"),[o]=eu(a+"typography.fontWeight"),[c]=eu(a+"typography.letterSpacing"),[u]=eu(a+"color.background"),[d]=eu(a+"color.gradient"),[m]=eu(a+"color.text"),p=(0,b.sprintf)(
// translators: %s: is a subset of Typography, e.g., 'text' or 'links'.
(0,b.__)("Typography %s styles"),n);return(0,l.createElement)(lc,{path:e+"/typography/"+t,"aria-label":p},(0,l.createElement)(_.__experimentalHStack,{justify:"flex-start"},(0,l.createElement)(_.FlexItem,{className:"edit-site-global-styles-screen-typography__indicator",style:{fontFamily:null!=s?s:"serif",background:null!=d?d:u,color:m,fontStyle:i,fontWeight:o,letterSpacing:c,...r}},(0,b.__)("Aa")),(0,l.createElement)(_.FlexItem,null,n)))}var nu=function(){return(0,l.createElement)(_.__experimentalVStack,{spacing:3},(0,l.createElement)(Oc,{level:3},(0,b.__)("Elements")),(0,l.createElement)(_.__experimentalItemGroup,{isBordered:!0,isSeparated:!0},(0,l.createElement)(tu,{parentMenu:"",element:"text",label:(0,b.__)("Text")}),(0,l.createElement)(tu,{parentMenu:"",element:"link",label:(0,b.__)("Links")}),(0,l.createElement)(tu,{parentMenu:"",element:"heading",label:(0,b.__)("Headings")}),(0,l.createElement)(tu,{parentMenu:"",element:"caption",label:(0,b.__)("Captions")}),(0,l.createElement)(tu,{parentMenu:"",element:"button",label:(0,b.__)("Buttons")})))};const au=["otf","ttf","woff","woff2"],ru={100:(0,b._x)("Thin","font weight"),200:(0,b._x)("Extra-light","font weight"),300:(0,b._x)("Light","font weight"),400:(0,b._x)("Normal","font weight"),500:(0,b._x)("Medium","font weight"),600:(0,b._x)("Semi-bold","font weight"),700:(0,b._x)("Bold","font weight"),800:(0,b._x)("Extra-bold","font weight"),900:(0,b._x)("Black","font weight")},su={normal:(0,b._x)("Normal","font style"),italic:(0,b._x)("Italic","font style")};function iu(e,t={}){return e.name||!e.fontFamily&&!e.slug||(e.name=e.fontFamily||e.slug),{...e,...t}}function ou(e){return`${ru[e.fontWeight]||e.fontWeight} ${"normal"===e.fontStyle?"":su[e.fontStyle]||e.fontStyle}`}function lu(e=[],t=[]){const n=new Map;for(const t of e)n.set(`${t.fontWeight}${t.fontStyle}`,t);for(const e of t)n.set(`${e.fontWeight}${e.fontStyle}`,e);return Array.from(n.values())}async function cu(e,t,n="all"){let a;"string"==typeof t?a=`url(${t})`:t instanceof File&&(a=await t.arrayBuffer());const r=new FontFace(e.fontFamily,a,{style:e.fontStyle,weight:e.fontWeight}),s=await r.load();"document"!==n&&"all"!==n||document.fonts.add(s),("iframe"===n||"all"===n)&&document.querySelector('iframe[name="editor-canvas"]').contentDocument.fonts.add(s)}function uu(e,t){if(!e)return;let n;var a;return n=Array.isArray(e)?e[0]:e,n.startsWith("file:.")&&t&&(n=n.replace("file:.",t)),("string"!=typeof(a=n)||a===decodeURIComponent(a))&&(n=encodeURI(n)),n}function du(e,t,n){const a=t=>t.slug===e.slug,r=n.find(a);return t?(r=>{const s=e=>e.fontWeight===t.fontWeight&&e.fontStyle===t.fontStyle;if(!r)return[...n,{...e,fontFace:[t]}];let i=r.fontFace||[];return i=i.find(s)?i.filter((e=>!s(e))):[...i,t],0===i.length?n.filter((e=>!a(e))):n.map((e=>a(e)?{...e,fontFace:i}:e))})(r):(t=>t?n.filter((e=>!a(e))):[...n,e])(r)}const{useGlobalSetting:mu}=nt(we.privateApis),pu=(0,f.createContext)({});var hu=function({children:e}){const{__experimentalSaveSpecifiedEntityEdits:t}=(0,d.useDispatch)(Se.store),{globalStylesId:n}=(0,d.useSelect)((e=>{const{__experimentalGetCurrentGlobalStylesId:t}=e(Se.store);return{globalStylesId:t()}})),a=(0,Se.useEntityRecord)("root","globalStyles",n),r=!!a?.edits?.settings?.typography?.fontFamilies,[s,i]=(0,f.useState)(!1),[o,c]=(0,f.useState)(0),u=()=>{c(Date.now())},{records:m=[],isResolving:p,hasResolved:h}=(0,Se.useEntityRecords)("postType","wp_font_family",{refreshKey:o}),g=(m||[]).map((e=>JSON.parse(e.content.raw)))||[],[y,v]=mu("typography.fontFamilies"),[b]=mu("typography.fontFamilies",void 0,"base"),[E,w]=(0,f.useState)(!1),[x,S]=(0,f.useState)(null),C=b?.theme?b.theme.map((e=>iu(e,{source:"theme"}))).sort(((e,t)=>e.name.localeCompare(t.name))):[],k=y?.theme?y.theme.map((e=>iu(e,{source:"theme"}))).sort(((e,t)=>e.name.localeCompare(t.name))):[],T=y?.custom?y.custom.map((e=>iu(e,{source:"custom"}))).sort(((e,t)=>e.name.localeCompare(t.name))):[],P=g?g.map((e=>iu(e,{source:"custom"}))).sort(((e,t)=>e.name.localeCompare(t.name))):[];(0,f.useEffect)((()=>{E||S(null)}),[E]);const[N]=(0,f.useState)(new Set),{site:I,currentTheme:M}=(0,d.useSelect)((e=>({site:e(Se.store).getSite(),currentTheme:e(Se.store).getCurrentTheme()}))),A=I?.url+"/wp-content/themes/"+M?.stylesheet,O=e=>e.reduce(((e,t)=>{const n=Array.isArray(t?.fontFace)?t?.fontFace.map((e=>`${e.fontStyle+e.fontWeight}`)):["normal400"];return e[t.slug]=n,e}),{}),R=e=>O("theme"===e?k:T),[D,F]=(0,f.useState)([]);return(0,f.useEffect)((()=>{(async()=>{const e=await async function(){return tn()({path:"/wp/v2/font-collections",method:"GET"})}();F(e)})()}),[]),(0,l.createElement)(pu.Provider,{value:{libraryFontSelected:x,handleSetLibraryFontSelected:e=>{if(!e)return void S(null);const t=("theme"===e.source?C:P).find((t=>t.slug===e.slug));S({...t||e,source:e.source})},themeFonts:k,baseThemeFonts:C,customFonts:T,baseCustomFonts:P,isFontActivated:(e,t,n,a)=>t||n?!!R(a)[e]?.includes(t+n):!!R(a)[e],getFontFacesActivated:(e,t)=>R(t)[e]||[],loadFontFaceAsset:async e=>{if(!e.src)return;const t=uu(e.src,A);t&&!N.has(t)&&(cu(e,t,"document"),N.add(t))},installFont:async function(e){i(!0);try{const a=function(e){const t=new FormData,{kebabCase:n}=nt(_.privateApis),a={...e,slug:n(e.slug)};if(a?.fontFace){const e=a.fontFace.map(((e,n)=>{if(e.file){const a=`file-${n}`;t.append(a,e.file,e.file.name);const{file:r,...s}=e;return{...s,uploadedFile:a}}return e}));a.fontFace=e}return t.append("font_family_settings",JSON.stringify(a)),t}(e),r=await async function(e){const t={path:"/wp/v2/font-families",method:"POST",body:e};return tn()(t)}(a),s=function(e,t){const n=[];for(const a of e){const e=t.find((e=>e.slug===a.slug));if(e)if(a?.fontFace){const t=a.fontFace.filter((t=>(e?.fontFace||[]).find((e=>e.fontWeight===t.fontWeight&&e.fontStyle===t.fontStyle))));n.push({...a,fontFace:t})}else n.push(a)}return n}(r?.successes||[],[e]);return(e=>{const t=function(e=[],t=[]){const n=new Map;for(const t of e)n.set(t.slug,{...t});for(const e of t)if(n.has(e.slug)){const{fontFace:t,...a}=e,r=lu(n.get(e.slug).fontFace,t);n.set(e.slug,{...a,fontFace:r})}else n.set(e.slug,{...e});return Array.from(n.values())}(y?.custom,e);v({...y,custom:t}),e.forEach((e=>{e.fontFace&&e.fontFace.forEach((e=>{cu(e,uu(e.src),"iframe")}))}))})(s),t("root","globalStyles",n,["settings.typography.fontFamilies"]),u(),i(!1),r}catch(e){return i(!1),{errors:[e]}}},uninstallFont:async function(e){try{const a=await async function(e){const t={path:"/wp/v2/font-families",method:"DELETE",data:{font_families:e}};return tn()(t)}([e]);return 0===a.errors.length&&((e=>{var t;const n=(null!==(t=y?.[e.source])&&void 0!==t?t:[]).filter((t=>t.slug!==e.slug));v({...y,[e.source]:n})})(e),await t("root","globalStyles",n,["settings.typography.fontFamilies"])),u(),a}catch(e){return console.error(e),{errors:[e]}}},toggleActivateFont:(e,t)=>{var n;const a=du(e,t,null!==(n=y?.[e.source])&&void 0!==n?n:[]);v({...y,[e.source]:a})},getAvailableFontsOutline:O,modalTabOpen:E,toggleModal:e=>{w(e||null)},refreshLibrary:u,saveFontFamilies:()=>{t("root","globalStyles",n,["settings.typography.fontFamilies"])},fontFamiliesHasChanges:r,isResolvingLibrary:p,hasResolvedLibrary:h,isInstalling:s,collections:D,getFontCollection:async e=>{try{if(D.find((t=>t.id===e))?.data)return;const t=await async function(e){const t={path:`/wp/v2/font-collections/${e}`,method:"GET"};return tn()(t)}(e),n=D.map((n=>n.id===e?{...n,data:{...t?.data}}:n));F(n)}catch(e){throw console.error(e),e}}}},e)},fu=function({title:e,description:t,handleBack:n,children:a,footer:r}){return(0,l.createElement)("div",{className:"font-library-modal__tabpanel-layout"},(0,l.createElement)(_.__experimentalSpacer,{margin:4}),(0,l.createElement)(_.__experimentalVStack,{spacing:4,justify:"space-between"},(0,l.createElement)("header",null,(0,l.createElement)(_.__experimentalVStack,{spacing:2},(0,l.createElement)(_.__experimentalHStack,{justify:"flex-start"},!!n&&(0,l.createElement)(_.Button,{variant:"tertiary",onClick:n,icon:pe,size:"small"}),e&&(0,l.createElement)(_.__experimentalHeading,{level:2,size:13,className:"edit-site-global-styles-header"},e)),t&&(0,l.createElement)(_.__experimentalText,null,t))),(0,l.createElement)("main",null,a),r&&(0,l.createElement)("footer",null,r)))},gu=function({title:e,children:t,pageSize:n=32}){const[a,r]=(0,f.useState)(null),[s,i]=(0,f.useState)(1),o=s*n,c=t.slice(0,o);return(0,f.useEffect)((()=>{if(a){const e=new window.IntersectionObserver((([e])=>{e.isIntersecting&&i((e=>e+1))}));return e.observe(a),()=>e.disconnect()}}),[a]),(0,l.createElement)("div",{className:"font-library-modal__fonts-grid"},(0,l.createElement)(_.__experimentalVStack,{spacing:0},e&&(0,l.createElement)(l.Fragment,null,(0,l.createElement)(_.__experimentalText,{className:"font-library-modal__subtitle"},e),(0,l.createElement)(_.__experimentalSpacer,{margin:2})),(0,l.createElement)("div",{className:"font-library-modal__fonts-grid__main"},c.map(((e,t)=>t===o-1?(0,l.createElement)("div",{ref:r},e):e)))))};function yu(e){return e.split(",").map((e=>(e=e.trim()).startsWith("'")||-1===e.indexOf(" ")?e:`'${e}'`)).join(", ")}function vu(e){const t={fontFamily:yu(e.fontFamily)};if(!Array.isArray(e.fontFace))return t.fontWeight="400",t.fontStyle="normal",t;if(e.fontFace){const a=e.fontFace.filter((e=>"normal"===e.fontStyle.toLowerCase()));if(a.length>0){t.fontStyle="normal";const e=function(e){const t=[];return e.forEach((e=>{const n=String(e.fontWeight).split(" ");if(2===n.length){const e=parseInt(n[0]),a=parseInt(n[1]);for(let n=e;n<=a;n+=100)t.push(n)}else 1===n.length&&t.push(parseInt(n[0]))})),t}(a),r=(400,0===(n=e).length?null:(n.sort(((e,t)=>Math.abs(400-e)-Math.abs(400-t))),n[0]));t.fontWeight=String(r)||"400"}else t.fontStyle=e.fontFace.length&&e.fontFace[0].fontStyle||"normal",t.fontWeight=e.fontFace.length&&String(e.fontFace[0].fontWeight)||"400"}var n;return t}var _u=function({customPreviewUrl:e,fontFace:t,text:n,style:a={}}){const r=(0,f.useRef)(null),[s,i]=(0,f.useState)(!1),[o,c]=(0,f.useState)(!1),{loadFontFaceAsset:u}=(0,f.useContext)(pu),d=null!=e?e:function(e){return e.preview?e.preview:e.src?Array.isArray(e.src)?e.src[0]:e.src:void 0}(t),m=d&&d.match(/\.(png|jpg|jpeg|gif|svg)$/i);var p;const h={whiteSpace:"nowrap",flexShrink:0,fontSize:"18px",opacity:o?"1":"0",transition:"opacity 0.3s ease-in-out",fontFamily:yu((p=t).fontFamily),fontStyle:p.fontStyle||"normal",fontWeight:p.fontWeight||"400",...a};return(0,f.useEffect)((()=>{const e=new window.IntersectionObserver((([e])=>{i(e.isIntersecting)}),{});return e.observe(r.current),()=>e.disconnect()}),[r]),(0,f.useEffect)((()=>{(async()=>{s&&(!m&&t.src&&await u(t),c(!0))})()}),[t,s,u]),(0,l.createElement)("div",{ref:r},m?(0,l.createElement)("img",{src:d,loading:"lazy",alt:n,style:{height:"23px",width:"auto"}}):(0,l.createElement)(_.__experimentalText,{style:h},n))},bu=function({face:e,font:t}){const{isFontActivated:n,toggleActivateFont:a}=(0,f.useContext)(pu),r=t?.fontFace?n(t.slug,e.fontStyle,e.fontWeight,t.source):n(t.slug,null,null,t.source),s=t.name+" "+ou(e),{kebabCase:i}=nt(_.privateApis),o=i(`${t.slug}-${ou(e)}`);return(0,l.createElement)("label",{className:"font-library-modal__library-font-variant",htmlFor:o},(0,l.createElement)(_.Flex,{justify:"space-between",align:"center",gap:"1rem"},(0,l.createElement)(_u,{fontFace:e,text:s}),(0,l.createElement)(_.CheckboxControl,{checked:r,onChange:()=>{t?.fontFace?a(t,e):a(t)},__nextHasNoMarginBottom:!0,id:o,label:!1})))};function Eu(e){switch(e){case"normal":return 400;case"bold":return 700;case"bolder":return 500;case"lighter":return 300;default:return parseInt(e,10)}}function wu(e){return e.sort(((e,t)=>"normal"===e.fontStyle&&"normal"!==t.fontStyle?-1:"normal"===t.fontStyle&&"normal"!==e.fontStyle?1:e.fontStyle===t.fontStyle?Eu(e.fontWeight)-Eu(t.fontWeight):e.fontStyle.localeCompare(t.fontStyle)))}var xu=function({font:e}){const t=e.fontFace&&e.fontFace.length?wu(e.fontFace):[{fontFamily:e.fontFamily,fontStyle:"normal",fontWeight:"400"}];return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(_.__experimentalSpacer,{margin:4}),(0,l.createElement)(_.__experimentalVStack,{spacing:0},(0,l.createElement)(_.__experimentalSpacer,{margin:8}),t.map(((t,n)=>(0,l.createElement)(bu,{font:e,face:t,key:`face${n}`})))),(0,l.createElement)(_.__experimentalSpacer,{margin:8}))},Su=function({font:e,onClick:t,variantsText:n}){const a={fontStyle:"normal",fontWeight:"400",fontFamily:e.fontFamily,fake:!0},r=e.fontFace&&e.fontFace.length?e?.fontFace?.find((e=>"normal"===e.fontStyle&&"400"===e.fontWeight))||e.fontFace[0]:a,s=vu(e),i=e.fontFace?.length||1,o={cursor:t?"pointer":"default"};return(0,l.createElement)(_.Button,{onClick:t,style:o,className:"font-library-modal__font-card"},(0,l.createElement)(_.Flex,{justify:"space-between",wrap:!1},(0,l.createElement)(_u,{customPreviewUrl:e.preview,fontFace:r,text:e.name,style:s}),(0,l.createElement)(_.Flex,{justify:"flex-end"},(0,l.createElement)(_.FlexItem,null,(0,l.createElement)(_.__experimentalText,{className:"font-library-modal__font-card__count"},n||i+" "+(0,b._n)("variant","variants",i))),(0,l.createElement)(_.FlexItem,null,(0,l.createElement)(_.Icon,{icon:he})))))},Cu=function({font:e,...t}){const{getFontFacesActivated:n}=(0,f.useContext)(pu),a=e.fontFace?.length||1,r=n(e.slug,e.source).length,s=(0,b.sprintf)(/* translators: %1$d: Active font variants, %2$d: Total font variants */
(0,b.__)("%1$s/%2$s variants active"),r,a);return(0,l.createElement)(Su,{font:e,variantsText:s,...t})},ku=function({font:e,isConfirmDeleteOpen:t,handleConfirmUninstall:n,handleCancelUninstall:a}){return(0,l.createElement)(_.__experimentalConfirmDialog,{isOpen:t,cancelButtonText:(0,b.__)("Cancel"),confirmButtonText:(0,b.__)("Delete"),onCancel:a,onConfirm:n},e&&(0,b.sprintf)(/* translators: %s: Name of the font. */
(0,b.__)('Are you sure you want to delete "%s" font and all its variants and assets?'),e.name))};function Tu(e){const{errors:t=[],successes:n=[]}=e;return t.length&&!n.length?{type:"error",message:(0,b.__)("Error installing the fonts.")}:!t.length&&n.length?{type:"success",message:(0,b.__)("Fonts were installed successfully.")}:t.length&&n.length?{type:"warning",message:(0,b.__)("Some fonts were installed successfully and some failed.")}:void 0}const{ProgressBar:Pu}=nt(_.privateApis);function Nu({shouldDisplayDeleteButton:e,handleUninstallClick:t}){const{saveFontFamilies:n,fontFamiliesHasChanges:a,isInstalling:r}=(0,f.useContext)(pu);return(0,l.createElement)(_.__experimentalHStack,{justify:"space-between"},r&&(0,l.createElement)(Pu,null),(0,l.createElement)("div",null,e&&(0,l.createElement)(_.Button,{variant:"tertiary",onClick:t},(0,b.__)("Delete"))),(0,l.createElement)(_.Button,{disabled:!a,variant:"primary",onClick:n},(0,b.__)("Update")))}var Iu=function(){const{baseCustomFonts:e,libraryFontSelected:t,baseThemeFonts:n,handleSetLibraryFontSelected:a,refreshLibrary:r,uninstallFont:s,isResolvingLibrary:i}=(0,f.useContext)(pu),[o,c]=(0,f.useState)(!1),u=()=>{a(null)},d=e=>{a(e)},[m,p]=(0,f.useState)(null),h=async()=>{const e=await s(t),n=function(e){const{errors:t=[],successes:n=[]}=e;return t.length&&!n.length?{type:"error",message:(0,b.__)("Error uninstalling the fonts.")}:!t.length&&n.length?{type:"success",message:(0,b.__)("Fonts were uninstalled successfully.")}:t.length&&n.length?{type:"warning",message:(0,b.__)("Some fonts were uninstalled successfully and some failed.")}:void 0}(e);p(n),e?.errors?.length||u(),c(!1)},g=()=>{c(!1)},y=t?(0,b.__)("Choose font variants. Keep in mind that too many variants could make your site slower."):null,v=!!t&&"theme"!==t?.source;return(0,f.useEffect)((()=>{r()}),[]),(0,f.useEffect)((()=>{if(m){const e=setTimeout((()=>{p(null)}),5e3);return()=>clearTimeout(e)}}),[m]),(0,l.createElement)(fu,{title:t?.name||"",description:y,handleBack:!!t&&u,footer:(0,l.createElement)(Nu,{shouldDisplayDeleteButton:v,handleUninstallClick:async()=>{c(!0)}})},(0,l.createElement)(ku,{font:t,isConfirmDeleteOpen:o,handleConfirmUninstall:h,handleCancelUninstall:g}),m&&(0,l.createElement)(l.Fragment,null,(0,l.createElement)(_.FlexItem,null,(0,l.createElement)(_.__experimentalSpacer,{margin:2}),(0,l.createElement)(_.Notice,{isDismissible:!1,status:m.type,className:"font-library-modal__font-collection__notice"},m.message)),(0,l.createElement)(_.__experimentalSpacer,{margin:4})),!t&&(0,l.createElement)(l.Fragment,null,i&&(0,l.createElement)(_.Spinner,null),e.length>0&&(0,l.createElement)(l.Fragment,null,(0,l.createElement)(_.__experimentalSpacer,{margin:2}),(0,l.createElement)(gu,null,e.map((e=>(0,l.createElement)(Cu,{font:e,key:e.slug,onClick:()=>{d(e)}})))),(0,l.createElement)(_.__experimentalSpacer,{margin:8})),n.length>0&&(0,l.createElement)(l.Fragment,null,(0,l.createElement)(gu,{title:(0,b.__)("Theme Fonts")},n.map((e=>(0,l.createElement)(Cu,{font:e,key:e.slug,onClick:()=>{d(e)}})))))),t&&(0,l.createElement)(xu,{font:t,isConfirmDeleteOpen:o,handleConfirmUninstall:h,handleCancelUninstall:g}))},Mu=function({face:e,font:t,handleToggleVariant:n,selected:a}){const r=t.name+" "+ou(e),{kebabCase:s}=nt(_.privateApis),i=s(`${t.slug}-${ou(e)}`);return(0,l.createElement)("label",{className:"font-library-modal__library-font-variant",htmlFor:i},(0,l.createElement)(_.Flex,{justify:"space-between",align:"center",gap:"1rem"},(0,l.createElement)(_u,{fontFace:e,text:r}),(0,l.createElement)(_.CheckboxControl,{checked:a,onChange:()=>{t?.fontFace?n(t,e):n(t)},__nextHasNoMarginBottom:!0,id:i,label:!1})))};function Au(e,t,n){return t?!!n[e]?.[`${t.fontStyle}-${t.fontWeight}`]:!!n[e]}var Ou=function({font:e,handleToggleVariant:t,fontToInstallOutline:n}){const a=e.fontFace&&e.fontFace.length?wu(e.fontFace):[{fontFamily:e.fontFamily,fontStyle:"normal",fontWeight:"400"}];return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(_.__experimentalSpacer,{margin:4}),(0,l.createElement)(_.__experimentalVStack,{spacing:0},(0,l.createElement)(_.__experimentalSpacer,{margin:8}),a.map(((a,r)=>(0,l.createElement)(Mu,{font:e,face:a,key:`face${r}`,handleToggleVariant:t,selected:Au(e.slug,e.fontFace?a:null,n)})))),(0,l.createElement)(_.__experimentalSpacer,{margin:8}))},Ru=function(){return(0,l.createElement)("div",{className:"font-library__google-fonts-confirm"},(0,l.createElement)(_.Card,null,(0,l.createElement)(_.CardBody,null,(0,l.createElement)(_.__experimentalText,{as:"h3"},"Connect to Google Fonts"),(0,l.createElement)(_.__experimentalSpacer,{margin:6}),(0,l.createElement)(_.__experimentalText,{as:"p"},(0,b.__)("To install fonts from Google you must give permission to connect directly to Google servers. The fonts you install will be downloaded from Google and stored on your site. Your site will then use these locally-hosted fonts.")),(0,l.createElement)(_.__experimentalSpacer,{margin:3}),(0,l.createElement)(_.__experimentalText,{as:"p"},(0,b.__)("You can alternatively upload files directly on the Library tab.")),(0,l.createElement)(_.__experimentalSpacer,{margin:6}),(0,l.createElement)(_.Button,{variant:"primary",onClick:()=>{window.localStorage.setItem("wp-font-library-default-font-collection-permission","true"),window.dispatchEvent(new Event("storage"))}},(0,b.__)("Allow access to Google Fonts")))))};const Du={id:"all",name:(0,b.__)("All")};function Fu({handleInstall:e}){const{isInstalling:t}=(0,f.useContext)(pu);return(0,l.createElement)(_.Flex,{justify:"flex-end"},(0,l.createElement)(_.Button,{variant:"primary",onClick:e,isBusy:t,disabled:t},(0,b.__)("Install")))}var Bu=function({id:e}){var t;const n="default-font-collection"===e,a=()=>"true"===window.localStorage.getItem("wp-font-library-default-font-collection-permission"),[r,s]=(0,f.useState)(null),[i,o]=(0,f.useState)(null),[c,u]=(0,f.useState)([]),[d,m]=(0,f.useState)({}),[p,h]=(0,f.useState)(n&&!a()),{collections:g,getFontCollection:y,installFont:v}=(0,f.useContext)(pu),E=g.find((t=>t.id===e));(0,f.useEffect)((()=>{const e=()=>{h(n&&!a())};return e(),window.addEventListener("storage",e),()=>window.removeEventListener("storage",e)}),[e,n]),(0,f.useEffect)((()=>{(async()=>{try{await y(e),P()}catch(e){s({type:"error",message:e?.message,duration:0})}})()}),[e,y]),(0,f.useEffect)((()=>{o(null),s(null)}),[e]),(0,f.useEffect)((()=>{u([])}),[i]),(0,f.useEffect)((()=>{if(r&&0!==r?.duration){var e;const t=setTimeout((()=>{s(null)}),null!==(e=r.duration)&&void 0!==e?e:5e3);return()=>clearTimeout(t)}}),[r]);const w=(0,f.useMemo)((()=>{var e;return null!==(e=E?.data?.fontFamilies)&&void 0!==e?e:[]}),[E]),x=null!==(t=E?.data?.categories)&&void 0!==t?t:[],S=[Du,...x],C=(0,f.useMemo)((()=>function(e,t){const{category:n,search:a}=t;let r=e||[];return n&&"all"!==n&&(r=r.filter((e=>e.category===n))),a&&(r=r.filter((e=>e.name.toLowerCase().includes(a.toLowerCase())))),r}(w,d)),[w,d]),k=(0,se.debounce)((e=>{m({...d,search:e})}),300),P=()=>{m({})},N=function(e){return e.reduce(((e,t)=>({...e,[t.slug]:(t?.fontFace||[]).reduce(((e,t)=>({...e,[`${t.fontStyle}-${t.fontWeight}`]:!0})),{})})),{})}(c);return(0,l.createElement)(fu,{title:i?i.name:E.name,description:i?(0,b.__)("Select font variants to install."):E.description,handleBack:!!i&&(()=>{o(null)}),footer:c.length>0&&(0,l.createElement)(Fu,{handleInstall:async()=>{const e=Tu(await v(c[0]));s(e),u([])}})},p&&(0,l.createElement)(l.Fragment,null,(0,l.createElement)(_.__experimentalSpacer,{margin:8}),(0,l.createElement)(Ru,null)),r&&(0,l.createElement)(l.Fragment,null,(0,l.createElement)(_.FlexItem,null,(0,l.createElement)(_.__experimentalSpacer,{margin:2}),(0,l.createElement)(_.Notice,{isDismissible:!1,status:r.type,className:"font-library-modal__font-collection__notice"},r.message)),(0,l.createElement)(_.__experimentalSpacer,{margin:2})),!p&&!i&&(0,l.createElement)(_.Flex,null,(0,l.createElement)(_.FlexItem,null,(0,l.createElement)(_.__experimentalInputControl,{value:d.search,placeholder:(0,b.__)("Font name…"),label:(0,b.__)("Search"),onChange:k,prefix:(0,l.createElement)(_.Icon,{icon:Br}),suffix:d?.search?(0,l.createElement)(_.Icon,{icon:T,onClick:()=>{m({...d,search:""})}}):null})),(0,l.createElement)(_.FlexItem,null,(0,l.createElement)(_.SelectControl,{label:(0,b.__)("Category"),value:d.category,onChange:e=>{m({...d,category:e})}},S&&S.map((e=>(0,l.createElement)("option",{value:e.id,key:e.id},e.name)))))),(0,l.createElement)(_.__experimentalSpacer,{margin:4}),!p&&!E?.data?.fontFamilies&&!r&&(0,l.createElement)(_.Spinner,null),!p&&!!E?.data?.fontFamilies?.length&&!C.length&&(0,l.createElement)(_.__experimentalText,null,(0,b.__)("No fonts found. Try with a different search term")),!p&&i&&(0,l.createElement)(Ou,{font:i,handleToggleVariant:(e,t)=>{const n=du(e,t,c);u(n)},fontToInstallOutline:N}),!p&&!i&&(0,l.createElement)(gu,null,C.map((e=>(0,l.createElement)(Su,{key:e.slug,font:e,onClick:()=>{o(e)}})))))},Lu=n(808),Vu=n.n(Lu),zu=n(1497),Gu=n.n(zu);globalThis.fetch;class Hu{constructor(e,t={},n){this.type=e,this.detail=t,this.msg=n,Object.defineProperty(this,"__mayPropagate",{enumerable:!1,writable:!0}),this.__mayPropagate=!0}preventDefault(){}stopPropagation(){this.__mayPropagate=!1}valueOf(){return this}toString(){return this.msg?`[${this.type} event]: ${this.msg}`:`[${this.type} event]`}}class Uu{constructor(){this.listeners={}}addEventListener(e,t,n){let a=this.listeners[e]||[];n?a.unshift(t):a.push(t),this.listeners[e]=a}removeEventListener(e,t){let n=this.listeners[e]||[],a=n.findIndex((e=>e===t));a>-1&&(n.splice(a,1),this.listeners[e]=n)}dispatch(e){let t=this.listeners[e.type];if(t)for(let n=0,a=t.length;n<a&&e.__mayPropagate;n++)t[n](e)}}const Wu=new Date("1904-01-01T00:00:00+0000").getTime();class ju{constructor(e,t,n){this.name=(n||e.tag||"").trim(),this.length=e.length,this.start=e.offset,this.offset=0,this.data=t,["getInt8","getUint8","getInt16","getUint16","getInt32","getUint32","getBigInt64","getBigUint64"].forEach((e=>{let t=e.replace(/get(Big)?/,"").toLowerCase(),n=parseInt(e.replace(/[^\d]/g,""))/8;Object.defineProperty(this,t,{get:()=>this.getValue(e,n)})}))}get currentPosition(){return this.start+this.offset}set currentPosition(e){this.start=e,this.offset=0}skip(e=0,t=8){this.offset+=e*t/8}getValue(e,t){let n=this.start+this.offset;this.offset+=t;try{return this.data[e](n)}catch(n){throw console.error("parser",e,t,this),console.error("parser",this.start,this.offset),n}}flags(e){if(8===e||16===e||32===e||64===e)return this[`uint${e}`].toString(2).padStart(e,0).split("").map((e=>"1"===e));console.error("Error parsing flags: flag types can only be 1, 2, 4, or 8 bytes long"),console.trace()}get tag(){const e=this.uint32;return t=[e>>24&255,e>>16&255,e>>8&255,255&e],Array.from(t).map((e=>String.fromCharCode(e))).join("");var t}get fixed(){return this.int16+Math.round(1e3*this.uint16/65356)/1e3}get legacyFixed(){let e=this.uint16,t=this.uint16.toString(16).padStart(4,0);return parseFloat(`${e}.${t}`)}get uint24(){return(this.uint8<<16)+(this.uint8<<8)+this.uint8}get uint128(){let e=0;for(let t=0;t<5;t++){let t=this.uint8;if(e=128*e+(127&t),t<128)break}return e}get longdatetime(){return new Date(Wu+1e3*parseInt(this.int64.toString()))}get fword(){return this.int16}get ufword(){return this.uint16}get Offset16(){return this.uint16}get Offset32(){return this.uint32}get F2DOT14(){const e=p.uint16;return[0,1,-2,-1][e>>14]+(16383&e)/16384}verifyLength(){this.offset!=this.length&&console.error(`unexpected parsed table size (${this.offset}) for "${this.name}" (expected ${this.length})`)}readBytes(e=0,t=0,n=8,a=!1){if(0===(e=e||this.length))return[];t&&(this.currentPosition=t);const r=`${a?"":"u"}int${n}`,s=[];for(;e--;)s.push(this[r]);return s}}class Zu{constructor(e){const t={enumerable:!1,get:()=>e};Object.defineProperty(this,"parser",t);const n=e.currentPosition,a={enumerable:!1,get:()=>n};Object.defineProperty(this,"start",a)}load(e){Object.keys(e).forEach((t=>{let n=Object.getOwnPropertyDescriptor(e,t);n.get?this[t]=n.get.bind(this):void 0!==n.value&&(this[t]=n.value)})),this.parser.length&&this.parser.verifyLength()}}class qu extends Zu{constructor(e,t,n){const{parser:a,start:r}=super(new ju(e,t,n)),s={enumerable:!1,get:()=>a};Object.defineProperty(this,"p",s);const i={enumerable:!1,get:()=>r};Object.defineProperty(this,"tableStart",i)}}function Yu(e,t,n){let a;Object.defineProperty(e,t,{get:()=>a||(a=n(),a),enumerable:!0})}class Ku extends qu{constructor(e,t,n){const{p:a}=super({offset:0,length:12},t,"sfnt");this.version=a.uint32,this.numTables=a.uint16,this.searchRange=a.uint16,this.entrySelector=a.uint16,this.rangeShift=a.uint16,a.verifyLength(),this.directory=[...new Array(this.numTables)].map((e=>new Xu(a))),this.tables={},this.directory.forEach((e=>{Yu(this.tables,e.tag.trim(),(()=>n(this.tables,{tag:e.tag,offset:e.offset,length:e.length},t)))}))}}class Xu{constructor(e){this.tag=e.tag,this.checksum=e.uint32,this.offset=e.uint32,this.length=e.uint32}}const Ju=Gu().inflate||void 0;class Qu extends qu{constructor(e,t,n){const{p:a}=super({offset:0,length:44},t,"woff");this.signature=a.tag,this.flavor=a.uint32,this.length=a.uint32,this.numTables=a.uint16,a.uint16,this.totalSfntSize=a.uint32,this.majorVersion=a.uint16,this.minorVersion=a.uint16,this.metaOffset=a.uint32,this.metaLength=a.uint32,this.metaOrigLength=a.uint32,this.privOffset=a.uint32,this.privLength=a.uint32,a.verifyLength(),this.directory=[...new Array(this.numTables)].map((e=>new $u(a))),ed(this,t,n)}}class $u{constructor(e){this.tag=e.tag,this.offset=e.uint32,this.compLength=e.uint32,this.origLength=e.uint32,this.origChecksum=e.uint32}}function ed(e,t,n){e.tables={},e.directory.forEach((a=>{Yu(e.tables,a.tag.trim(),(()=>{let r=0,s=t;if(a.compLength!==a.origLength){const e=t.buffer.slice(a.offset,a.offset+a.compLength);let n;if(!Ju){const e="no brotli decoder available to decode WOFF2 font";throw font.onerror&&font.onerror(e),new Error(e)}n=Ju(new Uint8Array(e)),s=new DataView(n.buffer)}else r=a.offset;return n(e.tables,{tag:a.tag,offset:r,length:a.origLength},s)}))}))}const td=Vu();class nd extends qu{constructor(e,t,n){const{p:a}=super({offset:0,length:48},t,"woff2");this.signature=a.tag,this.flavor=a.uint32,this.length=a.uint32,this.numTables=a.uint16,a.uint16,this.totalSfntSize=a.uint32,this.totalCompressedSize=a.uint32,this.majorVersion=a.uint16,this.minorVersion=a.uint16,this.metaOffset=a.uint32,this.metaLength=a.uint32,this.metaOrigLength=a.uint32,this.privOffset=a.uint32,this.privLength=a.uint32,a.verifyLength(),this.directory=[...new Array(this.numTables)].map((e=>new ad(a)));let r,s=a.currentPosition;this.directory[0].offset=0,this.directory.forEach(((e,t)=>{let n=this.directory[t+1];n&&(n.offset=e.offset+(void 0!==e.transformLength?e.transformLength:e.origLength))}));let i=t.buffer.slice(s);if(!td){const t="no brotli decoder available to decode WOFF2 font";throw e.onerror&&e.onerror(t),new Error(t)}r=td(new Uint8Array(i)),function(e,t,n){e.tables={},e.directory.forEach((a=>{Yu(e.tables,a.tag.trim(),(()=>{const r=a.offset,s=r+(a.transformLength?a.transformLength:a.origLength),i=new DataView(t.slice(r,s).buffer);try{return n(e.tables,{tag:a.tag,offset:0,length:a.origLength},i)}catch(e){console.error(e)}}))}))}(this,r,n)}}class ad{constructor(e){this.flags=e.uint8;const t=this.tagNumber=63&this.flags;this.tag=63===t?e.tag:["cmap","head","hhea","hmtx","maxp","name","OS/2","post","cvt ","fpgm","glyf","loca","prep","CFF ","VORG","EBDT","EBLC","gasp","hdmx","kern","LTSH","PCLT","VDMX","vhea","vmtx","BASE","GDEF","GPOS","GSUB","EBSC","JSTF","MATH","CBDT","CBLC","COLR","CPAL","SVG ","sbix","acnt","avar","bdat","bloc","bsln","cvar","fdsc","feat","fmtx","fvar","gvar","hsty","just","lcar","mort","morx","opbd","prop","trak","Zapf","Silf","Glat","Gloc","Feat","Sill"][63&t];let n=0!=(this.transformVersion=(192&this.flags)>>6);"glyf"!==this.tag&&"loca"!==this.tag||(n=3!==this.transformVersion),this.origLength=e.uint128,n&&(this.transformLength=e.uint128)}}const rd={};let sd=!1;function id(e,t,n){let a=t.tag.replace(/[^\w\d]/g,""),r=rd[a];return r?new r(t,n,e):(console.warn(`lib-font has no definition for ${a}. The table was skipped.`),{})}function od(){let e=0;function t(n,a){if(!sd)return e>10?a(new Error("loading took too long")):(e++,setTimeout((()=>t(n)),250));n(id)}return new Promise(((e,n)=>t(e)))}Promise.all([Promise.resolve().then((function(){return Id})),Promise.resolve().then((function(){return Md})),Promise.resolve().then((function(){return Ad})),Promise.resolve().then((function(){return Rd})),Promise.resolve().then((function(){return Dd})),Promise.resolve().then((function(){return Ld})),Promise.resolve().then((function(){return Vd})),Promise.resolve().then((function(){return Gd})),Promise.resolve().then((function(){return Qd})),Promise.resolve().then((function(){return um})),Promise.resolve().then((function(){return op})),Promise.resolve().then((function(){return lp})),Promise.resolve().then((function(){return dp})),Promise.resolve().then((function(){return hp})),Promise.resolve().then((function(){return fp})),Promise.resolve().then((function(){return gp})),Promise.resolve().then((function(){return vp})),Promise.resolve().then((function(){return _p})),Promise.resolve().then((function(){return bp})),Promise.resolve().then((function(){return Ep})),Promise.resolve().then((function(){return wp})),Promise.resolve().then((function(){return xp})),Promise.resolve().then((function(){return Cp})),Promise.resolve().then((function(){return Ip})),Promise.resolve().then((function(){return Ap})),Promise.resolve().then((function(){return Op})),Promise.resolve().then((function(){return Rp})),Promise.resolve().then((function(){return Dp})),Promise.resolve().then((function(){return Fp})),Promise.resolve().then((function(){return Vp})),Promise.resolve().then((function(){return Wp})),Promise.resolve().then((function(){return qp})),Promise.resolve().then((function(){return Kp})),Promise.resolve().then((function(){return Qp})),Promise.resolve().then((function(){return $p})),Promise.resolve().then((function(){return eh})),Promise.resolve().then((function(){return nh})),Promise.resolve().then((function(){return ah})),Promise.resolve().then((function(){return oh})),Promise.resolve().then((function(){return lh})),Promise.resolve().then((function(){return uh}))]).then((e=>{e.forEach((e=>{let t=Object.keys(e)[0];rd[t]=e[t]})),sd=!0}));const ld=[0,1,0,0],cd=[79,84,84,79],ud=[119,79,70,70],dd=[119,79,70,50];function md(e,t){if(e.length===t.length){for(let n=0;n<e.length;n++)if(e[n]!==t[n])return;return!0}}class pd extends Uu{constructor(e,t={}){super(),this.name=e,this.options=t,this.metrics=!1}get src(){return this.__src}set src(e){this.__src=e,(async()=>{globalThis.document&&!this.options.skipStyleSheet&&await async function(e,t,n={}){if(!globalThis.document)return;let a=function(e,t){let n=e.lastIndexOf("."),a=(e.substring(n+1)||"").toLowerCase(),r={ttf:"truetype",otf:"opentype",woff:"woff",woff2:"woff2"}[a];if(r)return r;let s={eot:"The .eot format is not supported: it died in January 12, 2016, when Microsoft retired all versions of IE that didn't already support WOFF.",svg:"The .svg format is not supported: SVG fonts (not to be confused with OpenType with embedded SVG) were so bad we took the entire fonts chapter out of the SVG specification again.",fon:"The .fon format is not supported: this is an ancient Windows bitmap font format.",ttc:"Based on the current CSS specification, font collections are not (yet?) supported."}[a];if(s||(s=`${e} is not a known webfont format.`),t)throw new Error(s);console.warn(`Could not load font: ${s}`)}(t,n.errorOnStyle);if(!a)return;let r=document.createElement("style");r.className="injected-by-Font-js";let s=[];return n.styleRules&&(s=Object.entries(n.styleRules).map((([e,t])=>`${e}: ${t};`))),r.textContent=`\n@font-face {\n    font-family: "${e}";\n    ${s.join("\n\t")}\n    src: url("${t}") format("${a}");\n}`,globalThis.document.head.appendChild(r),r}(this.name,e,this.options),this.loadFont(e)})()}async loadFont(e,t){fetch(e).then((e=>function(e){if(!e.ok)throw new Error(`HTTP ${e.status} - ${e.statusText}`);return e}(e)&&e.arrayBuffer())).then((n=>this.fromDataBuffer(n,t||e))).catch((n=>{const a=new Hu("error",n,`Failed to load font at ${t||e}`);this.dispatch(a),this.onerror&&this.onerror(a)}))}async fromDataBuffer(e,t){this.fontData=new DataView(e);let n=function(e){const t=[e.getUint8(0),e.getUint8(1),e.getUint8(2),e.getUint8(3)];return md(t,ld)||md(t,cd)?"SFNT":md(t,ud)?"WOFF":md(t,dd)?"WOFF2":void 0}(this.fontData);if(!n)throw new Error(`${t} is either an unsupported font format, or not a font at all.`);await this.parseBasicData(n);const a=new Hu("load",{font:this});this.dispatch(a),this.onload&&this.onload(a)}async parseBasicData(e){return od().then((t=>("SFNT"===e&&(this.opentype=new Ku(this,this.fontData,t)),"WOFF"===e&&(this.opentype=new Qu(this,this.fontData,t)),"WOFF2"===e&&(this.opentype=new nd(this,this.fontData,t)),this.opentype)))}getGlyphId(e){return this.opentype.tables.cmap.getGlyphId(e)}reverse(e){return this.opentype.tables.cmap.reverse(e)}supports(e){return 0!==this.getGlyphId(e)}supportsVariation(e){return!1!==this.opentype.tables.cmap.supportsVariation(e)}measureText(e,t=16){if(this.__unloaded)throw new Error("Cannot measure text: font was unloaded. Please reload before calling measureText()");let n=document.createElement("div");n.textContent=e,n.style.fontFamily=this.name,n.style.fontSize=`${t}px`,n.style.color="transparent",n.style.background="transparent",n.style.top="0",n.style.left="0",n.style.position="absolute",document.body.appendChild(n);let a=n.getBoundingClientRect();document.body.removeChild(n);const r=this.opentype.tables["OS/2"];return a.fontSize=t,a.ascender=r.sTypoAscender,a.descender=r.sTypoDescender,a}unload(){if(this.styleElement.parentNode){this.styleElement.parentNode.removeElement(this.styleElement);const e=new Hu("unload",{font:this});this.dispatch(e),this.onunload&&this.onunload(e)}this._unloaded=!0}load(){if(this.__unloaded){delete this.__unloaded,document.head.appendChild(this.styleElement);const e=new Hu("load",{font:this});this.dispatch(e),this.onload&&this.onload(e)}}}globalThis.Font=pd;class hd extends Zu{constructor(e,t,n){super(e),this.plaformID=t,this.encodingID=n}}class fd extends hd{constructor(e,t,n){super(e,t,n),this.format=0,this.length=e.uint16,this.language=e.uint16,this.glyphIdArray=[...new Array(256)].map((t=>e.uint8))}supports(e){return e.charCodeAt&&(e=-1,console.warn("supports(character) not implemented for cmap subtable format 0. only supports(id) is implemented.")),0<=e&&e<=255}reverse(e){return console.warn("reverse not implemented for cmap subtable format 0"),{}}getSupportedCharCodes(){return[{start:1,end:256}]}}class gd extends hd{constructor(e,t,n){super(e,t,n),this.format=2,this.length=e.uint16,this.language=e.uint16,this.subHeaderKeys=[...new Array(256)].map((t=>e.uint16));const a=Math.max(...this.subHeaderKeys),r=e.currentPosition;Yu(this,"subHeaders",(()=>(e.currentPosition=r,[...new Array(a)].map((t=>new yd(e))))));const s=r+8*a;Yu(this,"glyphIndexArray",(()=>(e.currentPosition=s,[...new Array(a)].map((t=>e.uint16)))))}supports(e){e.charCodeAt&&(e=-1,console.warn("supports(character) not implemented for cmap subtable format 2. only supports(id) is implemented."));const t=e&&255,n=e&&65280,a=this.subHeaders[n],r=this.subHeaders[a],s=r.firstCode,i=s+r.entryCount;return s<=t&&t<=i}reverse(e){return console.warn("reverse not implemented for cmap subtable format 2"),{}}getSupportedCharCodes(e=!1){return e?this.subHeaders.map((e=>({firstCode:e.firstCode,lastCode:e.lastCode}))):this.subHeaders.map((e=>({start:e.firstCode,end:e.lastCode})))}}class yd{constructor(e){this.firstCode=e.uint16,this.entryCount=e.uint16,this.lastCode=this.first+this.entryCount,this.idDelta=e.int16,this.idRangeOffset=e.uint16}}class vd extends hd{constructor(e,t,n){super(e,t,n),this.format=4,this.length=e.uint16,this.language=e.uint16,this.segCountX2=e.uint16,this.segCount=this.segCountX2/2,this.searchRange=e.uint16,this.entrySelector=e.uint16,this.rangeShift=e.uint16;const a=e.currentPosition;Yu(this,"endCode",(()=>e.readBytes(this.segCount,a,16)));const r=a+2+this.segCountX2;Yu(this,"startCode",(()=>e.readBytes(this.segCount,r,16)));const s=r+this.segCountX2;Yu(this,"idDelta",(()=>e.readBytes(this.segCount,s,16,!0)));const i=s+this.segCountX2;Yu(this,"idRangeOffset",(()=>e.readBytes(this.segCount,i,16)));const o=i+this.segCountX2,l=this.length-(o-this.tableStart);Yu(this,"glyphIdArray",(()=>e.readBytes(l,o,16))),Yu(this,"segments",(()=>this.buildSegments(i,o,e)))}buildSegments(e,t,n){return[...new Array(this.segCount)].map(((t,a)=>{let r=this.startCode[a],s=this.endCode[a],i=this.idDelta[a],o=this.idRangeOffset[a],l=e+2*a,c=[];if(0===o)for(let e=r+i,t=s+i;e<=t;e++)c.push(e);else for(let e=0,t=s-r;e<=t;e++)n.currentPosition=l+o+2*e,c.push(n.uint16);return{startCode:r,endCode:s,idDelta:i,idRangeOffset:o,glyphIDs:c}}))}reverse(e){let t=this.segments.find((t=>t.glyphIDs.includes(e)));if(!t)return{};const n=t.startCode+t.glyphIDs.indexOf(e);return{code:n,unicode:String.fromCodePoint(n)}}getGlyphId(e){if(e.charCodeAt&&(e=e.charCodeAt(0)),55296<=e&&e<=57343)return 0;if(65534==(65534&e)||65535==(65535&e))return 0;let t=this.segments.find((t=>t.startCode<=e&&e<=t.endCode));return t?t.glyphIDs[e-t.startCode]:0}supports(e){return 0!==this.getGlyphId(e)}getSupportedCharCodes(e=!1){return e?this.segments:this.segments.map((e=>({start:e.startCode,end:e.endCode})))}}class _d extends hd{constructor(e,t,n){super(e,t,n),this.format=6,this.length=e.uint16,this.language=e.uint16,this.firstCode=e.uint16,this.entryCount=e.uint16,this.lastCode=this.firstCode+this.entryCount-1,Yu(this,"glyphIdArray",(()=>[...new Array(this.entryCount)].map((t=>e.uint16))))}supports(e){if(e.charCodeAt&&(e=-1,console.warn("supports(character) not implemented for cmap subtable format 6. only supports(id) is implemented.")),e<this.firstCode)return{};if(e>this.firstCode+this.entryCount)return{};const t=e-this.firstCode;return{code:t,unicode:String.fromCodePoint(t)}}reverse(e){let t=this.glyphIdArray.indexOf(e);if(t>-1)return this.firstCode+t}getSupportedCharCodes(e=!1){return e?[{firstCode:this.firstCode,lastCode:this.lastCode}]:[{start:this.firstCode,end:this.lastCode}]}}class bd extends hd{constructor(e,t,n){super(e,t,n),this.format=8,e.uint16,this.length=e.uint32,this.language=e.uint32,this.is32=[...new Array(8192)].map((t=>e.uint8)),this.numGroups=e.uint32,Yu(this,"groups",(()=>[...new Array(this.numGroups)].map((t=>new Ed(e)))))}supports(e){return e.charCodeAt&&(e=-1,console.warn("supports(character) not implemented for cmap subtable format 8. only supports(id) is implemented.")),-1!==this.groups.findIndex((t=>t.startcharCode<=e&&e<=t.endcharCode))}reverse(e){return console.warn("reverse not implemented for cmap subtable format 8"),{}}getSupportedCharCodes(e=!1){return e?this.groups:this.groups.map((e=>({start:e.startcharCode,end:e.endcharCode})))}}class Ed{constructor(e){this.startcharCode=e.uint32,this.endcharCode=e.uint32,this.startGlyphID=e.uint32}}class wd extends hd{constructor(e,t,n){super(e,t,n),this.format=10,e.uint16,this.length=e.uint32,this.language=e.uint32,this.startCharCode=e.uint32,this.numChars=e.uint32,this.endCharCode=this.startCharCode+this.numChars,Yu(this,"glyphs",(()=>[...new Array(this.numChars)].map((t=>e.uint16))))}supports(e){return e.charCodeAt&&(e=-1,console.warn("supports(character) not implemented for cmap subtable format 10. only supports(id) is implemented.")),!(e<this.startCharCode)&&!(e>this.startCharCode+this.numChars)&&e-this.startCharCode}reverse(e){return console.warn("reverse not implemented for cmap subtable format 10"),{}}getSupportedCharCodes(e=!1){return e?[{startCharCode:this.startCharCode,endCharCode:this.endCharCode}]:[{start:this.startCharCode,end:this.endCharCode}]}}class xd extends hd{constructor(e,t,n){super(e,t,n),this.format=12,e.uint16,this.length=e.uint32,this.language=e.uint32,this.numGroups=e.uint32,Yu(this,"groups",(()=>[...new Array(this.numGroups)].map((t=>new Sd(e)))))}supports(e){return e.charCodeAt&&(e=e.charCodeAt(0)),55296<=e&&e<=57343||65534==(65534&e)||65535==(65535&e)?0:-1!==this.groups.findIndex((t=>t.startCharCode<=e&&e<=t.endCharCode))}reverse(e){for(let t of this.groups){let n=t.startGlyphID;if(n>e)continue;if(n===e)return t.startCharCode;if(n+(t.endCharCode-t.startCharCode)<e)continue;const a=t.startCharCode+(e-n);return{code:a,unicode:String.fromCodePoint(a)}}return{}}getSupportedCharCodes(e=!1){return e?this.groups:this.groups.map((e=>({start:e.startCharCode,end:e.endCharCode})))}}class Sd{constructor(e){this.startCharCode=e.uint32,this.endCharCode=e.uint32,this.startGlyphID=e.uint32}}class Cd extends hd{constructor(e,t,n){super(e,t,n),this.format=13,e.uint16,this.length=e.uint32,this.language=e.uint32,this.numGroups=e.uint32,Yu(this,"groups",[...new Array(this.numGroups)].map((t=>new kd(e))))}supports(e){return e.charCodeAt&&(e=e.charCodeAt(0)),-1!==this.groups.findIndex((t=>t.startCharCode<=e&&e<=t.endCharCode))}reverse(e){return console.warn("reverse not implemented for cmap subtable format 13"),{}}getSupportedCharCodes(e=!1){return e?this.groups:this.groups.map((e=>({start:e.startCharCode,end:e.endCharCode})))}}class kd{constructor(e){this.startCharCode=e.uint32,this.endCharCode=e.uint32,this.glyphID=e.uint32}}class Td extends hd{constructor(e,t,n){super(e,t,n),this.subTableStart=e.currentPosition,this.format=14,this.length=e.uint32,this.numVarSelectorRecords=e.uint32,Yu(this,"varSelectors",(()=>[...new Array(this.numVarSelectorRecords)].map((t=>new Pd(e)))))}supports(){return console.warn("supports not implemented for cmap subtable format 14"),0}getSupportedCharCodes(){return console.warn("getSupportedCharCodes not implemented for cmap subtable format 14"),[]}reverse(e){return console.warn("reverse not implemented for cmap subtable format 14"),{}}supportsVariation(e){return this.varSelector.find((t=>t.varSelector===e))||!1}getSupportedVariations(){return this.varSelectors.map((e=>e.varSelector))}}class Pd{constructor(e){this.varSelector=e.uint24,this.defaultUVSOffset=e.Offset32,this.nonDefaultUVSOffset=e.Offset32}}class Nd{constructor(e,t){const n=this.platformID=e.uint16,a=this.encodingID=e.uint16,r=this.offset=e.Offset32;Yu(this,"table",(()=>(e.currentPosition=t+r,function(e,t,n){const a=e.uint16;return 0===a?new fd(e,t,n):2===a?new gd(e,t,n):4===a?new vd(e,t,n):6===a?new _d(e,t,n):8===a?new bd(e,t,n):10===a?new wd(e,t,n):12===a?new xd(e,t,n):13===a?new Cd(e,t,n):14===a?new Td(e,t,n):{}}(e,n,a))))}}var Id=Object.freeze({__proto__:null,cmap:class extends qu{constructor(e,t){const{p:n}=super(e,t);this.version=n.uint16,this.numTables=n.uint16,this.encodingRecords=[...new Array(this.numTables)].map((e=>new Nd(n,this.tableStart)))}getSubTable(e){return this.encodingRecords[e].table}getSupportedEncodings(){return this.encodingRecords.map((e=>({platformID:e.platformID,encodingId:e.encodingID})))}getSupportedCharCodes(e,t){const n=this.encodingRecords.findIndex((n=>n.platformID===e&&n.encodingID===t));return-1!==n&&this.getSubTable(n).getSupportedCharCodes()}reverse(e){for(let t=0;t<this.numTables;t++){let n=this.getSubTable(t).reverse(e);if(n)return n}}getGlyphId(e){let t=0;return this.encodingRecords.some(((n,a)=>{let r=this.getSubTable(a);return!!r.getGlyphId&&(t=r.getGlyphId(e),0!==t)})),t}supports(e){return this.encodingRecords.some(((t,n)=>{const a=this.getSubTable(n);return a.supports&&!1!==a.supports(e)}))}supportsVariation(e){return this.encodingRecords.some(((t,n)=>{const a=this.getSubTable(n);return a.supportsVariation&&!1!==a.supportsVariation(e)}))}}}),Md=Object.freeze({__proto__:null,head:class extends qu{constructor(e,t){const{p:n}=super(e,t);this.load({majorVersion:n.uint16,minorVersion:n.uint16,fontRevision:n.fixed,checkSumAdjustment:n.uint32,magicNumber:n.uint32,flags:n.flags(16),unitsPerEm:n.uint16,created:n.longdatetime,modified:n.longdatetime,xMin:n.int16,yMin:n.int16,xMax:n.int16,yMax:n.int16,macStyle:n.flags(16),lowestRecPPEM:n.uint16,fontDirectionHint:n.uint16,indexToLocFormat:n.uint16,glyphDataFormat:n.uint16})}}}),Ad=Object.freeze({__proto__:null,hhea:class extends qu{constructor(e,t){const{p:n}=super(e,t);this.majorVersion=n.uint16,this.minorVersion=n.uint16,this.ascender=n.fword,this.descender=n.fword,this.lineGap=n.fword,this.advanceWidthMax=n.ufword,this.minLeftSideBearing=n.fword,this.minRightSideBearing=n.fword,this.xMaxExtent=n.fword,this.caretSlopeRise=n.int16,this.caretSlopeRun=n.int16,this.caretOffset=n.int16,n.int16,n.int16,n.int16,n.int16,this.metricDataFormat=n.int16,this.numberOfHMetrics=n.uint16,n.verifyLength()}}});class Od{constructor(e,t){this.advanceWidth=e,this.lsb=t}}var Rd=Object.freeze({__proto__:null,hmtx:class extends qu{constructor(e,t,n){const{p:a}=super(e,t),r=n.hhea.numberOfHMetrics,s=n.maxp.numGlyphs,i=a.currentPosition;if(Yu(this,"hMetrics",(()=>(a.currentPosition=i,[...new Array(r)].map((e=>new Od(a.uint16,a.int16)))))),r<s){const e=i+4*r;Yu(this,"leftSideBearings",(()=>(a.currentPosition=e,[...new Array(s-r)].map((e=>a.int16)))))}}}}),Dd=Object.freeze({__proto__:null,maxp:class extends qu{constructor(e,t){const{p:n}=super(e,t);this.version=n.legacyFixed,this.numGlyphs=n.uint16,1===this.version&&(this.maxPoints=n.uint16,this.maxContours=n.uint16,this.maxCompositePoints=n.uint16,this.maxCompositeContours=n.uint16,this.maxZones=n.uint16,this.maxTwilightPoints=n.uint16,this.maxStorage=n.uint16,this.maxFunctionDefs=n.uint16,this.maxInstructionDefs=n.uint16,this.maxStackElements=n.uint16,this.maxSizeOfInstructions=n.uint16,this.maxComponentElements=n.uint16,this.maxComponentDepth=n.uint16),n.verifyLength()}}});class Fd{constructor(e,t){this.length=e,this.offset=t}}class Bd{constructor(e,t){this.platformID=e.uint16,this.encodingID=e.uint16,this.languageID=e.uint16,this.nameID=e.uint16,this.length=e.uint16,this.offset=e.Offset16,Yu(this,"string",(()=>(e.currentPosition=t.stringStart+this.offset,function(e,t){const{platformID:n,length:a}=t;if(0===a)return"";if(0===n||3===n){const t=[];for(let n=0,r=a/2;n<r;n++)t[n]=String.fromCharCode(e.uint16);return t.join("")}const r=e.readBytes(a),s=[];return r.forEach((function(e,t){s[t]=String.fromCharCode(e)})),s.join("")}(e,this))))}}var Ld=Object.freeze({__proto__:null,name:class extends qu{constructor(e,t){const{p:n}=super(e,t);this.format=n.uint16,this.count=n.uint16,this.stringOffset=n.Offset16,this.nameRecords=[...new Array(this.count)].map((e=>new Bd(n,this))),1===this.format&&(this.langTagCount=n.uint16,this.langTagRecords=[...new Array(this.langTagCount)].map((e=>new Fd(n.uint16,n.Offset16)))),this.stringStart=this.tableStart+this.stringOffset}get(e){let t=this.nameRecords.find((t=>t.nameID===e));if(t)return t.string}}}),Vd=Object.freeze({__proto__:null,OS2:class extends qu{constructor(e,t){const{p:n}=super(e,t);return this.version=n.uint16,this.xAvgCharWidth=n.int16,this.usWeightClass=n.uint16,this.usWidthClass=n.uint16,this.fsType=n.uint16,this.ySubscriptXSize=n.int16,this.ySubscriptYSize=n.int16,this.ySubscriptXOffset=n.int16,this.ySubscriptYOffset=n.int16,this.ySuperscriptXSize=n.int16,this.ySuperscriptYSize=n.int16,this.ySuperscriptXOffset=n.int16,this.ySuperscriptYOffset=n.int16,this.yStrikeoutSize=n.int16,this.yStrikeoutPosition=n.int16,this.sFamilyClass=n.int16,this.panose=[...new Array(10)].map((e=>n.uint8)),this.ulUnicodeRange1=n.flags(32),this.ulUnicodeRange2=n.flags(32),this.ulUnicodeRange3=n.flags(32),this.ulUnicodeRange4=n.flags(32),this.achVendID=n.tag,this.fsSelection=n.uint16,this.usFirstCharIndex=n.uint16,this.usLastCharIndex=n.uint16,this.sTypoAscender=n.int16,this.sTypoDescender=n.int16,this.sTypoLineGap=n.int16,this.usWinAscent=n.uint16,this.usWinDescent=n.uint16,0===this.version?n.verifyLength():(this.ulCodePageRange1=n.flags(32),this.ulCodePageRange2=n.flags(32),1===this.version?n.verifyLength():(this.sxHeight=n.int16,this.sCapHeight=n.int16,this.usDefaultChar=n.uint16,this.usBreakChar=n.uint16,this.usMaxContext=n.uint16,this.version<=4?n.verifyLength():(this.usLowerOpticalPointSize=n.uint16,this.usUpperOpticalPointSize=n.uint16,5===this.version?n.verifyLength():void 0)))}}});const zd=[".notdef",".null","nonmarkingreturn","space","exclam","quotedbl","numbersign","dollar","percent","ampersand","quotesingle","parenleft","parenright","asterisk","plus","comma","hyphen","period","slash","zero","one","two","three","four","five","six","seven","eight","nine","colon","semicolon","less","equal","greater","question","at","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","bracketleft","backslash","bracketright","asciicircum","underscore","grave","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","braceleft","bar","braceright","asciitilde","Adieresis","Aring","Ccedilla","Eacute","Ntilde","Odieresis","Udieresis","aacute","agrave","acircumflex","adieresis","atilde","aring","ccedilla","eacute","egrave","ecircumflex","edieresis","iacute","igrave","icircumflex","idieresis","ntilde","oacute","ograve","ocircumflex","odieresis","otilde","uacute","ugrave","ucircumflex","udieresis","dagger","degree","cent","sterling","section","bullet","paragraph","germandbls","registered","copyright","trademark","acute","dieresis","notequal","AE","Oslash","infinity","plusminus","lessequal","greaterequal","yen","mu","partialdiff","summation","product","pi","integral","ordfeminine","ordmasculine","Omega","ae","oslash","questiondown","exclamdown","logicalnot","radical","florin","approxequal","Delta","guillemotleft","guillemotright","ellipsis","nonbreakingspace","Agrave","Atilde","Otilde","OE","oe","endash","emdash","quotedblleft","quotedblright","quoteleft","quoteright","divide","lozenge","ydieresis","Ydieresis","fraction","currency","guilsinglleft","guilsinglright","fi","fl","daggerdbl","periodcentered","quotesinglbase","quotedblbase","perthousand","Acircumflex","Ecircumflex","Aacute","Edieresis","Egrave","Iacute","Icircumflex","Idieresis","Igrave","Oacute","Ocircumflex","apple","Ograve","Uacute","Ucircumflex","Ugrave","dotlessi","circumflex","tilde","macron","breve","dotaccent","ring","cedilla","hungarumlaut","ogonek","caron","Lslash","lslash","Scaron","scaron","Zcaron","zcaron","brokenbar","Eth","eth","Yacute","yacute","Thorn","thorn","minus","multiply","onesuperior","twosuperior","threesuperior","onehalf","onequarter","threequarters","franc","Gbreve","gbreve","Idotaccent","Scedilla","scedilla","Cacute","cacute","Ccaron","ccaron","dcroat"];var Gd=Object.freeze({__proto__:null,post:class extends qu{constructor(e,t){const{p:n}=super(e,t);if(this.version=n.legacyFixed,this.italicAngle=n.fixed,this.underlinePosition=n.fword,this.underlineThickness=n.fword,this.isFixedPitch=n.uint32,this.minMemType42=n.uint32,this.maxMemType42=n.uint32,this.minMemType1=n.uint32,this.maxMemType1=n.uint32,1===this.version||3===this.version)return n.verifyLength();if(this.numGlyphs=n.uint16,2===this.version){this.glyphNameIndex=[...new Array(this.numGlyphs)].map((e=>n.uint16)),this.namesOffset=n.currentPosition,this.glyphNameOffsets=[1];for(let e=0;e<this.numGlyphs;e++){if(this.glyphNameIndex[e]<zd.length){this.glyphNameOffsets.push(this.glyphNameOffsets[e]);continue}let t=n.int8;n.skip(t),this.glyphNameOffsets.push(this.glyphNameOffsets[e]+t+1)}}2.5===this.version&&(this.offset=[...new Array(this.numGlyphs)].map((e=>n.int8)))}getGlyphName(e){if(2!==this.version)return console.warn(`post table version ${this.version} does not support glyph name lookups`),"";let t=this.glyphNameIndex[e];if(t<258)return zd[t];let n=this.glyphNameOffsets[e],a=this.glyphNameOffsets[e+1]-n-1;return 0===a?".notdef.":(this.parser.currentPosition=this.namesOffset+n,this.parser.readBytes(a,this.namesOffset+n,8,!0).map((e=>String.fromCharCode(e))).join(""))}}});class Hd extends qu{constructor(e,t){const{p:n}=super(e,t,"AxisTable");this.baseTagListOffset=n.Offset16,this.baseScriptListOffset=n.Offset16,Yu(this,"baseTagList",(()=>new Ud({offset:e.offset+this.baseTagListOffset},t))),Yu(this,"baseScriptList",(()=>new Wd({offset:e.offset+this.baseScriptListOffset},t)))}}class Ud extends qu{constructor(e,t){const{p:n}=super(e,t,"BaseTagListTable");this.baseTagCount=n.uint16,this.baselineTags=[...new Array(this.baseTagCount)].map((e=>n.tag))}}class Wd extends qu{constructor(e,t){const{p:n}=super(e,t,"BaseScriptListTable");this.baseScriptCount=n.uint16;const a=n.currentPosition;Yu(this,"baseScriptRecords",(()=>(n.currentPosition=a,[...new Array(this.baseScriptCount)].map((e=>new jd(this.start,n))))))}}class jd{constructor(e,t){this.baseScriptTag=t.tag,this.baseScriptOffset=t.Offset16,Yu(this,"baseScriptTable",(()=>(t.currentPosition=e+this.baseScriptOffset,new Zd(t))))}}class Zd{constructor(e){this.start=e.currentPosition,this.baseValuesOffset=e.Offset16,this.defaultMinMaxOffset=e.Offset16,this.baseLangSysCount=e.uint16,this.baseLangSysRecords=[...new Array(this.baseLangSysCount)].map((t=>new qd(this.start,e))),Yu(this,"baseValues",(()=>(e.currentPosition=this.start+this.baseValuesOffset,new Yd(e)))),Yu(this,"defaultMinMax",(()=>(e.currentPosition=this.start+this.defaultMinMaxOffset,new Kd(e))))}}class qd{constructor(e,t){this.baseLangSysTag=t.tag,this.minMaxOffset=t.Offset16,Yu(this,"minMax",(()=>(t.currentPosition=e+this.minMaxOffset,new Kd(t))))}}class Yd{constructor(e){this.parser=e,this.start=e.currentPosition,this.defaultBaselineIndex=e.uint16,this.baseCoordCount=e.uint16,this.baseCoords=[...new Array(this.baseCoordCount)].map((t=>e.Offset16))}getTable(e){return this.parser.currentPosition=this.start+this.baseCoords[e],new Jd(this.parser)}}class Kd{constructor(e){this.minCoord=e.Offset16,this.maxCoord=e.Offset16,this.featMinMaxCount=e.uint16;const t=e.currentPosition;Yu(this,"featMinMaxRecords",(()=>(e.currentPosition=t,[...new Array(this.featMinMaxCount)].map((t=>new Xd(e))))))}}class Xd{constructor(e){this.featureTableTag=e.tag,this.minCoord=e.Offset16,this.maxCoord=e.Offset16}}class Jd{constructor(e){this.baseCoordFormat=e.uint16,this.coordinate=e.int16,2===this.baseCoordFormat&&(this.referenceGlyph=e.uint16,this.baseCoordPoint=e.uint16),3===this.baseCoordFormat&&(this.deviceTable=e.Offset16)}}var Qd=Object.freeze({__proto__:null,BASE:class extends qu{constructor(e,t){const{p:n}=super(e,t);this.majorVersion=n.uint16,this.minorVersion=n.uint16,this.horizAxisOffset=n.Offset16,this.vertAxisOffset=n.Offset16,Yu(this,"horizAxis",(()=>new Hd({offset:e.offset+this.horizAxisOffset},t))),Yu(this,"vertAxis",(()=>new Hd({offset:e.offset+this.vertAxisOffset},t))),1===this.majorVersion&&1===this.minorVersion&&(this.itemVarStoreOffset=n.Offset32,Yu(this,"itemVarStore",(()=>new Hd({offset:e.offset+this.itemVarStoreOffset},t))))}}});class $d{constructor(e){this.classFormat=e.uint16,1===this.classFormat&&(this.startGlyphID=e.uint16,this.glyphCount=e.uint16,this.classValueArray=[...new Array(this.glyphCount)].map((t=>e.uint16))),2===this.classFormat&&(this.classRangeCount=e.uint16,this.classRangeRecords=[...new Array(this.classRangeCount)].map((t=>new em(e))))}}class em{constructor(e){this.startGlyphID=e.uint16,this.endGlyphID=e.uint16,this.class=e.uint16}}class tm extends Zu{constructor(e){super(e),this.coverageFormat=e.uint16,1===this.coverageFormat&&(this.glyphCount=e.uint16,this.glyphArray=[...new Array(this.glyphCount)].map((t=>e.uint16))),2===this.coverageFormat&&(this.rangeCount=e.uint16,this.rangeRecords=[...new Array(this.rangeCount)].map((t=>new nm(e))))}}class nm{constructor(e){this.startGlyphID=e.uint16,this.endGlyphID=e.uint16,this.startCoverageIndex=e.uint16}}class am{constructor(e,t){this.table=e,this.parser=t,this.start=t.currentPosition,this.format=t.uint16,this.variationRegionListOffset=t.Offset32,this.itemVariationDataCount=t.uint16,this.itemVariationDataOffsets=[...new Array(this.itemVariationDataCount)].map((e=>t.Offset32))}}class rm extends Zu{constructor(e){super(e),this.coverageOffset=e.Offset16,this.glyphCount=e.uint16,this.attachPointOffsets=[...new Array(this.glyphCount)].map((t=>e.Offset16))}getPoint(e){return this.parser.currentPosition=this.start+this.attachPointOffsets[e],new sm(this.parser)}}class sm{constructor(e){this.pointCount=e.uint16,this.pointIndices=[...new Array(this.pointCount)].map((t=>e.uint16))}}class im extends Zu{constructor(e){super(e),this.coverageOffset=e.Offset16,Yu(this,"coverage",(()=>(e.currentPosition=this.start+this.coverageOffset,new tm(e)))),this.ligGlyphCount=e.uint16,this.ligGlyphOffsets=[...new Array(this.ligGlyphCount)].map((t=>e.Offset16))}getLigGlyph(e){return this.parser.currentPosition=this.start+this.ligGlyphOffsets[e],new om(this.parser)}}class om extends Zu{constructor(e){super(e),this.caretCount=e.uint16,this.caretValueOffsets=[...new Array(this.caretCount)].map((t=>e.Offset16))}getCaretValue(e){return this.parser.currentPosition=this.start+this.caretValueOffsets[e],new lm(this.parser)}}class lm{constructor(e){this.caretValueFormat=e.uint16,1===this.caretValueFormat&&(this.coordinate=e.int16),2===this.caretValueFormat&&(this.caretValuePointIndex=e.uint16),3===this.caretValueFormat&&(this.coordinate=e.int16,this.deviceOffset=e.Offset16)}}class cm extends Zu{constructor(e){super(e),this.markGlyphSetTableFormat=e.uint16,this.markGlyphSetCount=e.uint16,this.coverageOffsets=[...new Array(this.markGlyphSetCount)].map((t=>e.Offset32))}getMarkGlyphSet(e){return this.parser.currentPosition=this.start+this.coverageOffsets[e],new tm(this.parser)}}var um=Object.freeze({__proto__:null,GDEF:class extends qu{constructor(e,t){const{p:n}=super(e,t);this.majorVersion=n.uint16,this.minorVersion=n.uint16,this.glyphClassDefOffset=n.Offset16,Yu(this,"glyphClassDefs",(()=>{if(0!==this.glyphClassDefOffset)return n.currentPosition=this.tableStart+this.glyphClassDefOffset,new $d(n)})),this.attachListOffset=n.Offset16,Yu(this,"attachList",(()=>{if(0!==this.attachListOffset)return n.currentPosition=this.tableStart+this.attachListOffset,new rm(n)})),this.ligCaretListOffset=n.Offset16,Yu(this,"ligCaretList",(()=>{if(0!==this.ligCaretListOffset)return n.currentPosition=this.tableStart+this.ligCaretListOffset,new im(n)})),this.markAttachClassDefOffset=n.Offset16,Yu(this,"markAttachClassDef",(()=>{if(0!==this.markAttachClassDefOffset)return n.currentPosition=this.tableStart+this.markAttachClassDefOffset,new $d(n)})),this.minorVersion>=2&&(this.markGlyphSetsDefOffset=n.Offset16,Yu(this,"markGlyphSetsDef",(()=>{if(0!==this.markGlyphSetsDefOffset)return n.currentPosition=this.tableStart+this.markGlyphSetsDefOffset,new cm(n)}))),3===this.minorVersion&&(this.itemVarStoreOffset=n.Offset32,Yu(this,"itemVarStore",(()=>{if(0!==this.itemVarStoreOffset)return n.currentPosition=this.tableStart+this.itemVarStoreOffset,new am(n)})))}}});class dm extends Zu{static EMPTY={scriptCount:0,scriptRecords:[]};constructor(e){super(e),this.scriptCount=e.uint16,this.scriptRecords=[...new Array(this.scriptCount)].map((t=>new mm(e)))}}class mm{constructor(e){this.scriptTag=e.tag,this.scriptOffset=e.Offset16}}class pm extends Zu{constructor(e){super(e),this.defaultLangSys=e.Offset16,this.langSysCount=e.uint16,this.langSysRecords=[...new Array(this.langSysCount)].map((t=>new hm(e)))}}class hm{constructor(e){this.langSysTag=e.tag,this.langSysOffset=e.Offset16}}class fm{constructor(e){this.lookupOrder=e.Offset16,this.requiredFeatureIndex=e.uint16,this.featureIndexCount=e.uint16,this.featureIndices=[...new Array(this.featureIndexCount)].map((t=>e.uint16))}}class gm extends Zu{static EMPTY={featureCount:0,featureRecords:[]};constructor(e){super(e),this.featureCount=e.uint16,this.featureRecords=[...new Array(this.featureCount)].map((t=>new ym(e)))}}class ym{constructor(e){this.featureTag=e.tag,this.featureOffset=e.Offset16}}class vm extends Zu{constructor(e){super(e),this.featureParams=e.Offset16,this.lookupIndexCount=e.uint16,this.lookupListIndices=[...new Array(this.lookupIndexCount)].map((t=>e.uint16))}getFeatureParams(){if(this.featureParams>0){const e=this.parser;e.currentPosition=this.start+this.featureParams;const t=this.featureTag;if("size"===t)return new bm(e);if(t.startsWith("cc"))return new _m(e);if(t.startsWith("ss"))return new Em(e)}}}class _m{constructor(e){this.format=e.uint16,this.featUiLabelNameId=e.uint16,this.featUiTooltipTextNameId=e.uint16,this.sampleTextNameId=e.uint16,this.numNamedParameters=e.uint16,this.firstParamUiLabelNameId=e.uint16,this.charCount=e.uint16,this.character=[...new Array(this.charCount)].map((t=>e.uint24))}}class bm{constructor(e){this.designSize=e.uint16,this.subfamilyIdentifier=e.uint16,this.subfamilyNameID=e.uint16,this.smallEnd=e.uint16,this.largeEnd=e.uint16}}class Em{constructor(e){this.version=e.uint16,this.UINameID=e.uint16}}function wm(e){e.parser.currentPosition-=2,delete e.coverageOffset,delete e.getCoverageTable}class xm extends Zu{constructor(e){super(e),this.substFormat=e.uint16,this.coverageOffset=e.Offset16}getCoverageTable(){let e=this.parser;return e.currentPosition=this.start+this.coverageOffset,new tm(e)}}class Sm{constructor(e){this.glyphSequenceIndex=e.uint16,this.lookupListIndex=e.uint16}}class Cm extends xm{constructor(e){super(e),this.deltaGlyphID=e.int16}}class km extends xm{constructor(e){super(e),this.sequenceCount=e.uint16,this.sequenceOffsets=[...new Array(this.sequenceCount)].map((t=>e.Offset16))}getSequence(e){let t=this.parser;return t.currentPosition=this.start+this.sequenceOffsets[e],new Tm(t)}}class Tm{constructor(e){this.glyphCount=e.uint16,this.substituteGlyphIDs=[...new Array(this.glyphCount)].map((t=>e.uint16))}}class Pm extends xm{constructor(e){super(e),this.alternateSetCount=e.uint16,this.alternateSetOffsets=[...new Array(this.alternateSetCount)].map((t=>e.Offset16))}getAlternateSet(e){let t=this.parser;return t.currentPosition=this.start+this.alternateSetOffsets[e],new Nm(t)}}class Nm{constructor(e){this.glyphCount=e.uint16,this.alternateGlyphIDs=[...new Array(this.glyphCount)].map((t=>e.uint16))}}class Im extends xm{constructor(e){super(e),this.ligatureSetCount=e.uint16,this.ligatureSetOffsets=[...new Array(this.ligatureSetCount)].map((t=>e.Offset16))}getLigatureSet(e){let t=this.parser;return t.currentPosition=this.start+this.ligatureSetOffsets[e],new Mm(t)}}class Mm extends Zu{constructor(e){super(e),this.ligatureCount=e.uint16,this.ligatureOffsets=[...new Array(this.ligatureCount)].map((t=>e.Offset16))}getLigature(e){let t=this.parser;return t.currentPosition=this.start+this.ligatureOffsets[e],new Am(t)}}class Am{constructor(e){this.ligatureGlyph=e.uint16,this.componentCount=e.uint16,this.componentGlyphIDs=[...new Array(this.componentCount-1)].map((t=>e.uint16))}}class Om extends xm{constructor(e){super(e),1===this.substFormat&&(this.subRuleSetCount=e.uint16,this.subRuleSetOffsets=[...new Array(this.subRuleSetCount)].map((t=>e.Offset16))),2===this.substFormat&&(this.classDefOffset=e.Offset16,this.subClassSetCount=e.uint16,this.subClassSetOffsets=[...new Array(this.subClassSetCount)].map((t=>e.Offset16))),3===this.substFormat&&(wm(this),this.glyphCount=e.uint16,this.substitutionCount=e.uint16,this.coverageOffsets=[...new Array(this.glyphCount)].map((t=>e.Offset16)),this.substLookupRecords=[...new Array(this.substitutionCount)].map((t=>new Sm(e))))}getSubRuleSet(e){if(1!==this.substFormat)throw new Error(`lookup type 5.${this.substFormat} has no subrule sets.`);let t=this.parser;return t.currentPosition=this.start+this.subRuleSetOffsets[e],new Rm(t)}getSubClassSet(e){if(2!==this.substFormat)throw new Error(`lookup type 5.${this.substFormat} has no subclass sets.`);let t=this.parser;return t.currentPosition=this.start+this.subClassSetOffsets[e],new Fm(t)}getCoverageTable(e){if(3!==this.substFormat&&!e)return super.getCoverageTable();if(!e)throw new Error(`lookup type 5.${this.substFormat} requires an coverage table index.`);let t=this.parser;return t.currentPosition=this.start+this.coverageOffsets[e],new tm(t)}}class Rm extends Zu{constructor(e){super(e),this.subRuleCount=e.uint16,this.subRuleOffsets=[...new Array(this.subRuleCount)].map((t=>e.Offset16))}getSubRule(e){let t=this.parser;return t.currentPosition=this.start+this.subRuleOffsets[e],new Dm(t)}}class Dm{constructor(e){this.glyphCount=e.uint16,this.substitutionCount=e.uint16,this.inputSequence=[...new Array(this.glyphCount-1)].map((t=>e.uint16)),this.substLookupRecords=[...new Array(this.substitutionCount)].map((t=>new Sm(e)))}}class Fm extends Zu{constructor(e){super(e),this.subClassRuleCount=e.uint16,this.subClassRuleOffsets=[...new Array(this.subClassRuleCount)].map((t=>e.Offset16))}getSubClass(e){let t=this.parser;return t.currentPosition=this.start+this.subClassRuleOffsets[e],new Bm(t)}}class Bm extends Dm{constructor(e){super(e)}}class Lm extends xm{constructor(e){super(e),1===this.substFormat&&(this.chainSubRuleSetCount=e.uint16,this.chainSubRuleSetOffsets=[...new Array(this.chainSubRuleSetCount)].map((t=>e.Offset16))),2===this.substFormat&&(this.backtrackClassDefOffset=e.Offset16,this.inputClassDefOffset=e.Offset16,this.lookaheadClassDefOffset=e.Offset16,this.chainSubClassSetCount=e.uint16,this.chainSubClassSetOffsets=[...new Array(this.chainSubClassSetCount)].map((t=>e.Offset16))),3===this.substFormat&&(wm(this),this.backtrackGlyphCount=e.uint16,this.backtrackCoverageOffsets=[...new Array(this.backtrackGlyphCount)].map((t=>e.Offset16)),this.inputGlyphCount=e.uint16,this.inputCoverageOffsets=[...new Array(this.inputGlyphCount)].map((t=>e.Offset16)),this.lookaheadGlyphCount=e.uint16,this.lookaheadCoverageOffsets=[...new Array(this.lookaheadGlyphCount)].map((t=>e.Offset16)),this.seqLookupCount=e.uint16,this.seqLookupRecords=[...new Array(this.substitutionCount)].map((t=>new Um(e))))}getChainSubRuleSet(e){if(1!==this.substFormat)throw new Error(`lookup type 6.${this.substFormat} has no chainsubrule sets.`);let t=this.parser;return t.currentPosition=this.start+this.chainSubRuleSetOffsets[e],new Vm(t)}getChainSubClassSet(e){if(2!==this.substFormat)throw new Error(`lookup type 6.${this.substFormat} has no chainsubclass sets.`);let t=this.parser;return t.currentPosition=this.start+this.chainSubClassSetOffsets[e],new Gm(t)}getCoverageFromOffset(e){if(3!==this.substFormat)throw new Error(`lookup type 6.${this.substFormat} does not use contextual coverage offsets.`);let t=this.parser;return t.currentPosition=this.start+e,new tm(t)}}class Vm extends Zu{constructor(e){super(e),this.chainSubRuleCount=e.uint16,this.chainSubRuleOffsets=[...new Array(this.chainSubRuleCount)].map((t=>e.Offset16))}getSubRule(e){let t=this.parser;return t.currentPosition=this.start+this.chainSubRuleOffsets[e],new zm(t)}}class zm{constructor(e){this.backtrackGlyphCount=e.uint16,this.backtrackSequence=[...new Array(this.backtrackGlyphCount)].map((t=>e.uint16)),this.inputGlyphCount=e.uint16,this.inputSequence=[...new Array(this.inputGlyphCount-1)].map((t=>e.uint16)),this.lookaheadGlyphCount=e.uint16,this.lookAheadSequence=[...new Array(this.lookAheadGlyphCount)].map((t=>e.uint16)),this.substitutionCount=e.uint16,this.substLookupRecords=[...new Array(this.SubstCount)].map((t=>new Sm(e)))}}class Gm extends Zu{constructor(e){super(e),this.chainSubClassRuleCount=e.uint16,this.chainSubClassRuleOffsets=[...new Array(this.chainSubClassRuleCount)].map((t=>e.Offset16))}getSubClass(e){let t=this.parser;return t.currentPosition=this.start+this.chainSubRuleOffsets[e],new Hm(t)}}class Hm{constructor(e){this.backtrackGlyphCount=e.uint16,this.backtrackSequence=[...new Array(this.backtrackGlyphCount)].map((t=>e.uint16)),this.inputGlyphCount=e.uint16,this.inputSequence=[...new Array(this.inputGlyphCount-1)].map((t=>e.uint16)),this.lookaheadGlyphCount=e.uint16,this.lookAheadSequence=[...new Array(this.lookAheadGlyphCount)].map((t=>e.uint16)),this.substitutionCount=e.uint16,this.substLookupRecords=[...new Array(this.substitutionCount)].map((t=>new Um(e)))}}class Um extends Zu{constructor(e){super(e),this.sequenceIndex=e.uint16,this.lookupListIndex=e.uint16}}class Wm extends Zu{constructor(e){super(e),this.substFormat=e.uint16,this.extensionLookupType=e.uint16,this.extensionOffset=e.Offset32}}class jm extends xm{constructor(e){super(e),this.backtrackGlyphCount=e.uint16,this.backtrackCoverageOffsets=[...new Array(this.backtrackGlyphCount)].map((t=>e.Offset16)),this.lookaheadGlyphCount=e.uint16,this.lookaheadCoverageOffsets=[new Array(this.lookaheadGlyphCount)].map((t=>e.Offset16)),this.glyphCount=e.uint16,this.substituteGlyphIDs=[...new Array(this.glyphCount)].map((t=>e.uint16))}}var Zm={buildSubtable:function(e,t){const n=new[void 0,Cm,km,Pm,Im,Om,Lm,Wm,jm][e](t);return n.type=e,n}};class qm extends Zu{constructor(e){super(e)}}class Ym extends qm{constructor(e){super(e),console.log("lookup type 1")}}class Km extends qm{constructor(e){super(e),console.log("lookup type 2")}}class Xm extends qm{constructor(e){super(e),console.log("lookup type 3")}}class Jm extends qm{constructor(e){super(e),console.log("lookup type 4")}}class Qm extends qm{constructor(e){super(e),console.log("lookup type 5")}}class $m extends qm{constructor(e){super(e),console.log("lookup type 6")}}class ep extends qm{constructor(e){super(e),console.log("lookup type 7")}}class tp extends qm{constructor(e){super(e),console.log("lookup type 8")}}class np extends qm{constructor(e){super(e),console.log("lookup type 9")}}var ap={buildSubtable:function(e,t){const n=new[void 0,Ym,Km,Xm,Jm,Qm,$m,ep,tp,np][e](t);return n.type=e,n}};class rp extends Zu{static EMPTY={lookupCount:0,lookups:[]};constructor(e){super(e),this.lookupCount=e.uint16,this.lookups=[...new Array(this.lookupCount)].map((t=>e.Offset16))}}class sp extends Zu{constructor(e,t){super(e),this.ctType=t,this.lookupType=e.uint16,this.lookupFlag=e.uint16,this.subTableCount=e.uint16,this.subtableOffsets=[...new Array(this.subTableCount)].map((t=>e.Offset16)),this.markFilteringSet=e.uint16}get rightToLeft(){return!0&this.lookupFlag}get ignoreBaseGlyphs(){return!0&this.lookupFlag}get ignoreLigatures(){return!0&this.lookupFlag}get ignoreMarks(){return!0&this.lookupFlag}get useMarkFilteringSet(){return!0&this.lookupFlag}get markAttachmentType(){return!0&this.lookupFlag}getSubTable(e){const t="GSUB"===this.ctType?Zm:ap;return this.parser.currentPosition=this.start+this.subtableOffsets[e],t.buildSubtable(this.lookupType,this.parser)}}class ip extends qu{constructor(e,t,n){const{p:a,tableStart:r}=super(e,t,n);this.majorVersion=a.uint16,this.minorVersion=a.uint16,this.scriptListOffset=a.Offset16,this.featureListOffset=a.Offset16,this.lookupListOffset=a.Offset16,1===this.majorVersion&&1===this.minorVersion&&(this.featureVariationsOffset=a.Offset32);const s=!(this.scriptListOffset||this.featureListOffset||this.lookupListOffset);Yu(this,"scriptList",(()=>s?dm.EMPTY:(a.currentPosition=r+this.scriptListOffset,new dm(a)))),Yu(this,"featureList",(()=>s?gm.EMPTY:(a.currentPosition=r+this.featureListOffset,new gm(a)))),Yu(this,"lookupList",(()=>s?rp.EMPTY:(a.currentPosition=r+this.lookupListOffset,new rp(a)))),this.featureVariationsOffset&&Yu(this,"featureVariations",(()=>s?FeatureVariations.EMPTY:(a.currentPosition=r+this.featureVariationsOffset,new FeatureVariations(a))))}getSupportedScripts(){return this.scriptList.scriptRecords.map((e=>e.scriptTag))}getScriptTable(e){let t=this.scriptList.scriptRecords.find((t=>t.scriptTag===e));this.parser.currentPosition=this.scriptList.start+t.scriptOffset;let n=new pm(this.parser);return n.scriptTag=e,n}ensureScriptTable(e){return"string"==typeof e?this.getScriptTable(e):e}getSupportedLangSys(e){const t=0!==(e=this.ensureScriptTable(e)).defaultLangSys,n=e.langSysRecords.map((e=>e.langSysTag));return t&&n.unshift("dflt"),n}getDefaultLangSysTable(e){let t=(e=this.ensureScriptTable(e)).defaultLangSys;if(0!==t){this.parser.currentPosition=e.start+t;let n=new fm(this.parser);return n.langSysTag="",n.defaultForScript=e.scriptTag,n}}getLangSysTable(e,t="dflt"){if("dflt"===t)return this.getDefaultLangSysTable(e);let n=(e=this.ensureScriptTable(e)).langSysRecords.find((e=>e.langSysTag===t));this.parser.currentPosition=e.start+n.langSysOffset;let a=new fm(this.parser);return a.langSysTag=t,a}getFeatures(e){return e.featureIndices.map((e=>this.getFeature(e)))}getFeature(e){let t;if(t=parseInt(e)==e?this.featureList.featureRecords[e]:this.featureList.featureRecords.find((t=>t.featureTag===e)),!t)return;this.parser.currentPosition=this.featureList.start+t.featureOffset;let n=new vm(this.parser);return n.featureTag=t.featureTag,n}getLookups(e){return e.lookupListIndices.map((e=>this.getLookup(e)))}getLookup(e,t){let n=this.lookupList.lookups[e];return this.parser.currentPosition=this.lookupList.start+n,new sp(this.parser,t)}}var op=Object.freeze({__proto__:null,GSUB:class extends ip{constructor(e,t){super(e,t,"GSUB")}getLookup(e){return super.getLookup(e,"GSUB")}}}),lp=Object.freeze({__proto__:null,GPOS:class extends ip{constructor(e,t){super(e,t,"GPOS")}getLookup(e){return super.getLookup(e,"GPOS")}}});class cp extends Zu{constructor(e){super(e),this.numEntries=e.uint16,this.documentRecords=[...new Array(this.numEntries)].map((t=>new up(e)))}getDocument(e){let t=this.documentRecords[e];if(!t)return"";let n=this.start+t.svgDocOffset;return this.parser.currentPosition=n,this.parser.readBytes(t.svgDocLength)}getDocumentForGlyph(e){let t=this.documentRecords.findIndex((t=>t.startGlyphID<=e&&e<=t.endGlyphID));return-1===t?"":this.getDocument(t)}}class up{constructor(e){this.startGlyphID=e.uint16,this.endGlyphID=e.uint16,this.svgDocOffset=e.Offset32,this.svgDocLength=e.uint32}}var dp=Object.freeze({__proto__:null,SVG:class extends qu{constructor(e,t){const{p:n}=super(e,t);this.version=n.uint16,this.offsetToSVGDocumentList=n.Offset32,n.currentPosition=this.tableStart+this.offsetToSVGDocumentList,this.documentList=new cp(n)}}});class mp{constructor(e){this.tag=e.tag,this.minValue=e.fixed,this.defaultValue=e.fixed,this.maxValue=e.fixed,this.flags=e.flags(16),this.axisNameID=e.uint16}}class pp{constructor(e,t,n){let a=e.currentPosition;this.subfamilyNameID=e.uint16,e.uint16,this.coordinates=[...new Array(t)].map((t=>e.fixed)),e.currentPosition-a<n&&(this.postScriptNameID=e.uint16)}}var hp=Object.freeze({__proto__:null,fvar:class extends qu{constructor(e,t){const{p:n}=super(e,t);this.majorVersion=n.uint16,this.minorVersion=n.uint16,this.axesArrayOffset=n.Offset16,n.uint16,this.axisCount=n.uint16,this.axisSize=n.uint16,this.instanceCount=n.uint16,this.instanceSize=n.uint16;const a=this.tableStart+this.axesArrayOffset;Yu(this,"axes",(()=>(n.currentPosition=a,[...new Array(this.axisCount)].map((e=>new mp(n))))));const r=a+this.axisCount*this.axisSize;Yu(this,"instances",(()=>{let e=[];for(let t=0;t<this.instanceCount;t++)n.currentPosition=r+t*this.instanceSize,e.push(new pp(n,this.axisCount,this.instanceSize));return e}))}getSupportedAxes(){return this.axes.map((e=>e.tag))}getAxis(e){return this.axes.find((t=>t.tag===e))}}}),fp=Object.freeze({__proto__:null,cvt:class extends qu{constructor(e,t){const{p:n}=super(e,t),a=e.length/2;Yu(this,"items",(()=>[...new Array(a)].map((e=>n.fword))))}}}),gp=Object.freeze({__proto__:null,fpgm:class extends qu{constructor(e,t){const{p:n}=super(e,t);Yu(this,"instructions",(()=>[...new Array(e.length)].map((e=>n.uint8))))}}});class yp{constructor(e){this.rangeMaxPPEM=e.uint16,this.rangeGaspBehavior=e.uint16}}var vp=Object.freeze({__proto__:null,gasp:class extends qu{constructor(e,t){const{p:n}=super(e,t);this.version=n.uint16,this.numRanges=n.uint16,Yu(this,"gaspRanges",(()=>[...new Array(this.numRanges)].map((e=>new yp(n)))))}}}),_p=Object.freeze({__proto__:null,glyf:class extends qu{constructor(e,t){super(e,t)}getGlyphData(e,t){return this.parser.currentPosition=this.tableStart+e,this.parser.readBytes(t)}}}),bp=Object.freeze({__proto__:null,loca:class extends qu{constructor(e,t,n){const{p:a}=super(e,t),r=n.maxp.numGlyphs+1;0===n.head.indexToLocFormat?(this.x2=!0,Yu(this,"offsets",(()=>[...new Array(r)].map((e=>a.Offset16))))):Yu(this,"offsets",(()=>[...new Array(r)].map((e=>a.Offset32))))}getGlyphDataOffsetAndLength(e){let t=this.offsets[e]*this.x2?2:1;return{offset:t,length:(this.offsets[e+1]*this.x2?2:1)-t}}}}),Ep=Object.freeze({__proto__:null,prep:class extends qu{constructor(e,t){const{p:n}=super(e,t);Yu(this,"instructions",(()=>[...new Array(e.length)].map((e=>n.uint8))))}}}),wp=Object.freeze({__proto__:null,CFF:class extends qu{constructor(e,t){const{p:n}=super(e,t);Yu(this,"data",(()=>n.readBytes()))}}}),xp=Object.freeze({__proto__:null,CFF2:class extends qu{constructor(e,t){const{p:n}=super(e,t);Yu(this,"data",(()=>n.readBytes()))}}});class Sp{constructor(e){this.glyphIndex=e.uint16,this.vertOriginY=e.int16}}var Cp=Object.freeze({__proto__:null,VORG:class extends qu{constructor(e,t){const{p:n}=super(e,t);this.majorVersion=n.uint16,this.minorVersion=n.uint16,this.defaultVertOriginY=n.int16,this.numVertOriginYMetrics=n.uint16,Yu(this,"vertORiginYMetrics",(()=>[...new Array(this.numVertOriginYMetrics)].map((e=>new Sp(n)))))}}});class kp{constructor(e){this.indexSubTableArrayOffset=e.Offset32,this.indexTablesSize=e.uint32,this.numberofIndexSubTables=e.uint32,this.colorRef=e.uint32,this.hori=new Pp(e),this.vert=new Pp(e),this.startGlyphIndex=e.uint16,this.endGlyphIndex=e.uint16,this.ppemX=e.uint8,this.ppemY=e.uint8,this.bitDepth=e.uint8,this.flags=e.int8}}class Tp{constructor(e){this.hori=new Pp(e),this.vert=new Pp(e),this.ppemX=e.uint8,this.ppemY=e.uint8,this.substitutePpemX=e.uint8,this.substitutePpemY=e.uint8}}class Pp{constructor(e){this.ascender=e.int8,this.descender=e.int8,this.widthMax=e.uint8,this.caretSlopeNumerator=e.int8,this.caretSlopeDenominator=e.int8,this.caretOffset=e.int8,this.minOriginSB=e.int8,this.minAdvanceSB=e.int8,this.maxBeforeBL=e.int8,this.minAfterBL=e.int8,this.pad1=e.int8,this.pad2=e.int8}}class Np extends qu{constructor(e,t,n){const{p:a}=super(e,t,n);this.majorVersion=a.uint16,this.minorVersion=a.uint16,this.numSizes=a.uint32,Yu(this,"bitMapSizes",(()=>[...new Array(this.numSizes)].map((e=>new kp(a)))))}}var Ip=Object.freeze({__proto__:null,EBLC:Np});class Mp extends qu{constructor(e,t,n){const{p:a}=super(e,t,n);this.majorVersion=a.uint16,this.minorVersion=a.uint16}}var Ap=Object.freeze({__proto__:null,EBDT:Mp}),Op=Object.freeze({__proto__:null,EBSC:class extends qu{constructor(e,t){const{p:n}=super(e,t);this.majorVersion=n.uint16,this.minorVersion=n.uint16,this.numSizes=n.uint32,Yu(this,"bitmapScales",(()=>[...new Array(this.numSizes)].map((e=>new Tp(n)))))}}}),Rp=Object.freeze({__proto__:null,CBLC:class extends Np{constructor(e,t){super(e,t,"CBLC")}}}),Dp=Object.freeze({__proto__:null,CBDT:class extends Mp{constructor(e,t){super(e,t,"CBDT")}}}),Fp=Object.freeze({__proto__:null,sbix:class extends qu{constructor(e,t){const{p:n}=super(e,t);this.version=n.uint16,this.flags=n.flags(16),this.numStrikes=n.uint32,Yu(this,"strikeOffsets",(()=>[...new Array(this.numStrikes)].map((e=>n.Offset32))))}}});class Bp{constructor(e){this.gID=e.uint16,this.firstLayerIndex=e.uint16,this.numLayers=e.uint16}}class Lp{constructor(e){this.gID=e.uint16,this.paletteIndex=e.uint16}}var Vp=Object.freeze({__proto__:null,COLR:class extends qu{constructor(e,t){const{p:n}=super(e,t);this.version=n.uint16,this.numBaseGlyphRecords=n.uint16,this.baseGlyphRecordsOffset=n.Offset32,this.layerRecordsOffset=n.Offset32,this.numLayerRecords=n.uint16}getBaseGlyphRecord(e){let t=this.tableStart+this.baseGlyphRecordsOffset;this.parser.currentPosition=t;let n=new Bp(this.parser),a=n.gID,r=this.tableStart+this.layerRecordsOffset-6;this.parser.currentPosition=r;let s=new Bp(this.parser),i=s.gID;if(a===e)return n;if(i===e)return s;for(;t!==r;){let n=t+(r-t)/12;this.parser.currentPosition=n;let a=new Bp(this.parser),s=a.gID;if(s===e)return a;s>e?r=n:s<e&&(t=n)}return!1}getLayers(e){let t=this.getBaseGlyphRecord(e);return this.parser.currentPosition=this.tableStart+this.layerRecordsOffset+4*t.firstLayerIndex,[...new Array(t.numLayers)].map((e=>new Lp(p)))}}});class zp{constructor(e){this.blue=e.uint8,this.green=e.uint8,this.red=e.uint8,this.alpha=e.uint8}}class Gp{constructor(e,t){this.paletteTypes=[...new Array(t)].map((t=>e.uint32))}}class Hp{constructor(e,t){this.paletteLabels=[...new Array(t)].map((t=>e.uint16))}}class Up{constructor(e,t){this.paletteEntryLabels=[...new Array(t)].map((t=>e.uint16))}}var Wp=Object.freeze({__proto__:null,CPAL:class extends qu{constructor(e,t){const{p:n}=super(e,t);this.version=n.uint16,this.numPaletteEntries=n.uint16;const a=this.numPalettes=n.uint16;this.numColorRecords=n.uint16,this.offsetFirstColorRecord=n.Offset32,this.colorRecordIndices=[...new Array(this.numPalettes)].map((e=>n.uint16)),Yu(this,"colorRecords",(()=>(n.currentPosition=this.tableStart+this.offsetFirstColorRecord,[...new Array(this.numColorRecords)].map((e=>new zp(n)))))),1===this.version&&(this.offsetPaletteTypeArray=n.Offset32,this.offsetPaletteLabelArray=n.Offset32,this.offsetPaletteEntryLabelArray=n.Offset32,Yu(this,"paletteTypeArray",(()=>(n.currentPosition=this.tableStart+this.offsetPaletteTypeArray,new Gp(n,a)))),Yu(this,"paletteLabelArray",(()=>(n.currentPosition=this.tableStart+this.offsetPaletteLabelArray,new Hp(n,a)))),Yu(this,"paletteEntryLabelArray",(()=>(n.currentPosition=this.tableStart+this.offsetPaletteEntryLabelArray,new Up(n,a)))))}}});class jp{constructor(e){this.format=e.uint32,this.length=e.uint32,this.offset=e.Offset32}}class Zp{constructor(e){e.uint16,e.uint16,this.signatureLength=e.uint32,this.signature=e.readBytes(this.signatureLength)}}var qp=Object.freeze({__proto__:null,DSIG:class extends qu{constructor(e,t){const{p:n}=super(e,t);this.version=n.uint32,this.numSignatures=n.uint16,this.flags=n.uint16,this.signatureRecords=[...new Array(this.numSignatures)].map((e=>new jp(n)))}getData(e){const t=this.signatureRecords[e];return this.parser.currentPosition=this.tableStart+t.offset,new Zp(this.parser)}}});class Yp{constructor(e,t){this.pixelSize=e.uint8,this.maxWidth=e.uint8,this.widths=e.readBytes(t)}}var Kp=Object.freeze({__proto__:null,hdmx:class extends qu{constructor(e,t,n){const{p:a}=super(e,t),r=n.hmtx.numGlyphs;this.version=a.uint16,this.numRecords=a.int16,this.sizeDeviceRecord=a.int32,this.records=[...new Array(numRecords)].map((e=>new Yp(a,r)))}}});class Xp{constructor(e){this.version=e.uint16,this.length=e.uint16,this.coverage=e.flags(8),this.format=e.uint8,0===this.format&&(this.nPairs=e.uint16,this.searchRange=e.uint16,this.entrySelector=e.uint16,this.rangeShift=e.uint16,Yu(this,"pairs",(()=>[...new Array(this.nPairs)].map((t=>new Jp(e)))))),2===this.format&&console.warn("Kern subtable format 2 is not supported: this parser currently only parses universal table data.")}get horizontal(){return this.coverage[0]}get minimum(){return this.coverage[1]}get crossstream(){return this.coverage[2]}get override(){return this.coverage[3]}}class Jp{constructor(e){this.left=e.uint16,this.right=e.uint16,this.value=e.fword}}var Qp=Object.freeze({__proto__:null,kern:class extends qu{constructor(e,t){const{p:n}=super(e,t);this.version=n.uint16,this.nTables=n.uint16,Yu(this,"tables",(()=>{let e=this.tableStart+4;const t=[];for(let a=0;a<this.nTables;a++){n.currentPosition=e;let a=new Xp(n);t.push(a),e+=a}return t}))}}}),$p=Object.freeze({__proto__:null,LTSH:class extends qu{constructor(e,t){const{p:n}=super(e,t);this.version=n.uint16,this.numGlyphs=n.uint16,this.yPels=n.readBytes(this.numGlyphs)}}}),eh=Object.freeze({__proto__:null,MERG:class extends qu{constructor(e,t){const{p:n}=super(e,t);this.version=n.uint16,this.mergeClassCount=n.uint16,this.mergeDataOffset=n.Offset16,this.classDefCount=n.uint16,this.offsetToClassDefOffsets=n.Offset16,Yu(this,"mergeEntryMatrix",(()=>[...new Array(this.mergeClassCount)].map((e=>n.readBytes(this.mergeClassCount))))),console.warn("Full MERG parsing is currently not supported."),console.warn("If you need this table parsed, please file an issue, or better yet, a PR.")}}});class th{constructor(e,t){this.tableStart=e,this.parser=t,this.tag=t.tag,this.dataOffset=t.Offset32,this.dataLength=t.uint32}getData(){return this.parser.currentField=this.tableStart+this.dataOffset,this.parser.readBytes(this.dataLength)}}var nh=Object.freeze({__proto__:null,meta:class extends qu{constructor(e,t){const{p:n}=super(e,t);this.version=n.uint32,this.flags=n.uint32,n.uint32,this.dataMapsCount=n.uint32,this.dataMaps=[...new Array(this.dataMapsCount)].map((e=>new th(this.tableStart,n)))}}}),ah=Object.freeze({__proto__:null,PCLT:class extends qu{constructor(e,t){super(e,t),console.warn("This font uses a PCLT table, which is currently not supported by this parser."),console.warn("If you need this table parsed, please file an issue, or better yet, a PR.")}}});class rh{constructor(e){this.bCharSet=e.uint8,this.xRatio=e.uint8,this.yStartRatio=e.uint8,this.yEndRatio=e.uint8}}class sh{constructor(e){this.recs=e.uint16,this.startsz=e.uint8,this.endsz=e.uint8,this.records=[...new Array(this.recs)].map((t=>new ih(e)))}}class ih{constructor(e){this.yPelHeight=e.uint16,this.yMax=e.int16,this.yMin=e.int16}}var oh=Object.freeze({__proto__:null,VDMX:class extends qu{constructor(e,t){const{p:n}=super(e,t);this.version=n.uint16,this.numRecs=n.uint16,this.numRatios=n.uint16,this.ratRanges=[...new Array(this.numRatios)].map((e=>new rh(n))),this.offsets=[...new Array(this.numRatios)].map((e=>n.Offset16)),this.VDMXGroups=[...new Array(this.numRecs)].map((e=>new sh(n)))}}}),lh=Object.freeze({__proto__:null,vhea:class extends qu{constructor(e,t){const{p:n}=super(e,t);this.version=n.fixed,this.ascent=this.vertTypoAscender=n.int16,this.descent=this.vertTypoDescender=n.int16,this.lineGap=this.vertTypoLineGap=n.int16,this.advanceHeightMax=n.int16,this.minTopSideBearing=n.int16,this.minBottomSideBearing=n.int16,this.yMaxExtent=n.int16,this.caretSlopeRise=n.int16,this.caretSlopeRun=n.int16,this.caretOffset=n.int16,this.reserved=n.int16,this.reserved=n.int16,this.reserved=n.int16,this.reserved=n.int16,this.metricDataFormat=n.int16,this.numOfLongVerMetrics=n.uint16,n.verifyLength()}}});class ch{constructor(e,t){this.advanceHeight=e,this.topSideBearing=t}}var uh=Object.freeze({__proto__:null,vmtx:class extends qu{constructor(e,t,n){super(e,t);const a=n.vhea.numOfLongVerMetrics,r=n.maxp.numGlyphs,s=p.currentPosition;if(lazy(this,"vMetrics",(()=>(p.currentPosition=s,[...new Array(a)].map((e=>new ch(p.uint16,p.int16)))))),a<r){const e=s+4*a;lazy(this,"topSideBearings",(()=>(p.currentPosition=e,[...new Array(r-a)].map((e=>p.int16)))))}}}});const{ProgressBar:dh}=nt(_.privateApis);var mh=function(){const{installFont:e}=(0,f.useContext)(pu),[t,n]=(0,f.useState)(null),[a,r]=(0,f.useState)(!1),s=au.slice(0,-1).map((e=>`.${e}`)).join(", ")+` ${(0,b.__)("and")} .${au.slice(-1)}`;(0,f.useEffect)((()=>{if(t){const e=setTimeout((()=>{n(null)}),5e3);return()=>clearTimeout(e)}}),[t]);const i=e=>{n(null),r(!0);const t=new Set,a=[...e].filter((e=>{if(t.has(e.name))return!1;const n=e.name.split(".").pop().toLowerCase();return!!au.includes(n)&&(t.add(e.name),!0)}));a.length>0&&o(a)},o=async e=>{const t=await Promise.all(e.map((async e=>{const t=await c(e);return await cu(t,t.file,"all"),t})));await u(t)},c=async e=>{const t=await async function(e){return new Promise(((t,n)=>{const a=new window.FileReader;a.readAsArrayBuffer(e),a.onload=()=>t(a.result),a.onerror=n}))}(e),n=new pd("Uploaded Font");n.fromDataBuffer(t,e.name);const a=(await new Promise((e=>n.onload=e))).detail.font,{name:r}=a.opentype.tables,s=r.get(16)||r.get(1),i=r.get(2).toLowerCase().includes("italic"),o=a.opentype.tables["OS/2"].usWeightClass||"normal",l=!!a.opentype.tables.fvar&&a.opentype.tables.fvar.axes.find((({tag:e})=>"wght"===e));return{file:e,fontFamily:s,fontStyle:i?"italic":"normal",fontWeight:(l?`${l.minValue} ${l.maxValue}`:null)||o}},u=async t=>{const a=function(e){const t=e.reduce(((e,t)=>(e[t.fontFamily]||(e[t.fontFamily]={name:t.fontFamily,fontFamily:t.fontFamily,slug:t.fontFamily.replace(/\s+/g,"-").toLowerCase(),fontFace:[]}),e[t.fontFamily].fontFace.push(t),e)),{});return Object.values(t)}(t);if(a.length>1)return void n({type:"error",message:(0,b.__)("Variants from only one font family can be uploaded at a time.")});const s=Tu(await e(a[0]));n(s),r(!1)};return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(_.__experimentalSpacer,{margin:16}),(0,l.createElement)(_.DropZone,{onFilesDrop:e=>{i(e)}}),(0,l.createElement)(_.__experimentalVStack,{className:"font-library-modal__local-fonts"},!a&&(0,l.createElement)(_.FormFileUpload,{accept:au.map((e=>`.${e}`)).join(","),multiple:!0,onChange:e=>{i(e.target.files)},render:({openFileDialog:e})=>(0,l.createElement)(_.Button,{className:"font-library-modal__upload-area",onClick:e},(0,l.createElement)("span",null,(0,b.__)("Upload font")))}),a&&(0,l.createElement)(_.FlexItem,null,(0,l.createElement)("div",{className:"font-library-modal__upload-area"},(0,l.createElement)(dh,null))),(0,l.createElement)(_.__experimentalSpacer,{margin:2}),(0,l.createElement)(_.__experimentalText,{className:"font-library-modal__upload-area__text"},(0,b.sprintf)(/* translators: %s: supported font formats: ex: .ttf, .woff and .woff2 */
(0,b.__)("Uploaded fonts appear in your library and can be used in your theme. Supported formats: %s."),s)),!a&&t&&(0,l.createElement)(_.FlexItem,null,(0,l.createElement)(_.__experimentalSpacer,{margin:2}),(0,l.createElement)(_.Notice,{isDismissible:!1,status:t.type,className:"font-library-modal__upload-area__notice"},t.message))))},ph=function(){return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(_.__experimentalSpacer,{margin:8}),(0,l.createElement)(mh,null))};const{Tabs:hh}=nt(_.privateApis),fh=[{id:"installed-fonts",title:(0,b.__)("Library")},{id:"upload-fonts",title:(0,b.__)("Upload")}],gh=e=>e.map((({id:t,name:n})=>({id:t,title:1===e.length&&"default-font-collection"===t?(0,b.__)("Install Fonts"):n})));var yh=function({onRequestClose:e,initialTabId:t="installed-fonts"}){const{collections:n}=(0,f.useContext)(pu),a=[...fh,...gh(n||[])];return(0,l.createElement)(_.Modal,{title:(0,b.__)("Fonts"),onRequestClose:e,isFullScreen:!0,className:"font-library-modal"},(0,l.createElement)("div",{className:"font-library-modal__tabs"},(0,l.createElement)(hh,{initialTabId:t},(0,l.createElement)(hh.TabList,null,a.map((({id:e,title:t})=>(0,l.createElement)(hh.Tab,{key:e,tabId:e},t)))),a.map((({id:e})=>{let t;switch(e){case"upload-fonts":t=(0,l.createElement)(ph,null);break;case"installed-fonts":t=(0,l.createElement)(Iu,null);break;default:t=(0,l.createElement)(Bu,{id:e})}return(0,l.createElement)(hh.TabPanel,{key:e,tabId:e,focusable:!1},t)})))))},vh=function({font:e}){const{handleSetLibraryFontSelected:t,toggleModal:n}=(0,f.useContext)(pu),a=e?.fontFace?.length||1,r=vu(e);return(0,l.createElement)(_.__experimentalItem,{onClick:()=>{t(e),n("installed-fonts")}},(0,l.createElement)(_.__experimentalHStack,{justify:"space-between"},(0,l.createElement)(_.FlexItem,{style:r},e.name),(0,l.createElement)(_.FlexItem,{style:{color:"#9e9e9e"}},a," ",(0,b._n)("variant","variants",a))))};function _h(){const{modalTabOpen:e,toggleModal:t,themeFonts:n,customFonts:a}=(0,f.useContext)(pu);return(0,l.createElement)(l.Fragment,null,!!e&&(0,l.createElement)(yh,{onRequestClose:()=>t(),initialTabName:e}),(0,l.createElement)(_.__experimentalVStack,{spacing:3},(0,l.createElement)(_.__experimentalHStack,{justify:"space-between"},(0,l.createElement)(Oc,{level:3},(0,b.__)("Fonts")),(0,l.createElement)(_.__experimentalHStack,{justify:"flex-end"},(0,l.createElement)(_.Tooltip,{text:(0,b.__)("Manage fonts")},(0,l.createElement)(_.Button,{onClick:()=>t("installed-fonts"),"aria-label":(0,b.__)("Manage fonts"),icon:cc,size:"small"})))),(0,l.createElement)(_.__experimentalItemGroup,{isBordered:!0,isSeparated:!0},a.map((e=>(0,l.createElement)(vh,{key:e.slug,font:e}))),n.map((e=>(0,l.createElement)(vh,{key:e.slug,font:e}))))))}var bh=({...e})=>(0,l.createElement)(hu,null,(0,l.createElement)(_h,{...e})),Eh=function(){return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(Ec,{title:(0,b.__)("Typography"),description:(0,b.__)("Manage the typography settings for different elements.")}),(0,l.createElement)("div",{className:"edit-site-global-styles-screen-typography"},(0,l.createElement)(_.__experimentalVStack,{spacing:6},!window.__experimentalDisableFontLibrary&&(0,l.createElement)(bh,null),(0,l.createElement)(nu,null))))};const{useGlobalStyle:wh,useGlobalSetting:xh,useSettingsForBlockElement:Sh,TypographyPanel:Ch}=nt(we.privateApis);function kh({element:e,headingLevel:t}){let n=[];"heading"===e?n=n.concat(["elements",t]):e&&"text"!==e&&(n=n.concat(["elements",e]));const a=n.join("."),[r]=wh(a,void 0,"user",{shouldDecodeEncode:!1}),[s,i]=wh(a,void 0,"all",{shouldDecodeEncode:!1}),[o]=xh(""),c=Sh(o,void 0,"heading"===e?t:e);return(0,l.createElement)(Ch,{inheritedValue:s,value:r,onChange:i,settings:c})}const{useGlobalStyle:Th}=nt(we.privateApis);function Ph({name:e,element:t,headingLevel:n}){let a="";"heading"===t?a=`elements.${n}.`:t&&"text"!==t&&(a=`elements.${t}.`);const[r]=Th(a+"typography.fontFamily",e),[s]=Th(a+"color.gradient",e),[i]=Th(a+"color.background",e),[o]=Th(a+"color.text",e),[c]=Th(a+"typography.fontSize",e),[u]=Th(a+"typography.fontStyle",e),[d]=Th(a+"typography.fontWeight",e),[m]=Th(a+"typography.letterSpacing",e),p="link"===t?{textDecoration:"underline"}:{};return(0,l.createElement)("div",{className:"edit-site-typography-preview",style:{fontFamily:null!=r?r:"serif",background:null!=s?s:i,color:o,fontSize:c,fontStyle:u,fontWeight:d,letterSpacing:m,...p}},"Aa")}const Nh={text:{description:(0,b.__)("Manage the fonts used on the site."),title:(0,b.__)("Text")},link:{description:(0,b.__)("Manage the fonts and typography used on the links."),title:(0,b.__)("Links")},heading:{description:(0,b.__)("Manage the fonts and typography used on headings."),title:(0,b.__)("Headings")},caption:{description:(0,b.__)("Manage the fonts and typography used on captions."),title:(0,b.__)("Captions")},button:{description:(0,b.__)("Manage the fonts and typography used on buttons."),title:(0,b.__)("Buttons")}};var Ih=function({element:e}){const[t,n]=(0,f.useState)("heading");return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(Ec,{title:Nh[e].title,description:Nh[e].description}),(0,l.createElement)(_.__experimentalSpacer,{marginX:4},(0,l.createElement)(Ph,{element:e,headingLevel:t})),"heading"===e&&(0,l.createElement)(_.__experimentalSpacer,{marginX:4,marginBottom:"1em"},(0,l.createElement)(_.__experimentalToggleGroupControl,{label:(0,b.__)("Select heading level"),hideLabelFromVision:!0,value:t,onChange:n,isBlock:!0,size:"__unstable-large",__nextHasNoMarginBottom:!0},(0,l.createElement)(_.__experimentalToggleGroupControlOption,{value:"heading"
/* translators: 'All' refers to selecting all heading levels 
    and applying the same style to h1-h6. */,label:(0,b.__)("All")}),(0,l.createElement)(_.__experimentalToggleGroupControlOption,{value:"h1",label:(0,b.__)("H1")}),(0,l.createElement)(_.__experimentalToggleGroupControlOption,{value:"h2",label:(0,b.__)("H2")}),(0,l.createElement)(_.__experimentalToggleGroupControlOption,{value:"h3",label:(0,b.__)("H3")}),(0,l.createElement)(_.__experimentalToggleGroupControlOption,{value:"h4",label:(0,b.__)("H4")}),(0,l.createElement)(_.__experimentalToggleGroupControlOption,{value:"h5",label:(0,b.__)("H5")}),(0,l.createElement)(_.__experimentalToggleGroupControlOption,{value:"h6",label:(0,b.__)("H6")}))),(0,l.createElement)(kh,{element:e,headingLevel:t}))},Mh=(0,l.createElement)(E.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/SVG"},(0,l.createElement)(E.Path,{d:"M17.192 6.75L15.47 5.03l1.06-1.06 3.537 3.53-3.537 3.53-1.06-1.06 1.723-1.72h-3.19c-.602 0-.993.202-1.28.498-.309.319-.538.792-.695 1.383-.13.488-.222 1.023-.296 1.508-.034.664-.116 1.413-.303 2.117-.193.721-.513 1.467-1.068 2.04-.575.594-1.359.954-2.357.954H4v-1.5h4.003c.601 0 .993-.202 1.28-.498.308-.319.538-.792.695-1.383.149-.557.216-1.093.288-1.662l.039-.31a9.653 9.653 0 0 1 .272-1.653c.193-.722.513-1.467 1.067-2.04.576-.594 1.36-.954 2.358-.954h3.19zM8.004 6.75c.8 0 1.46.23 1.988.628a6.24 6.24 0 0 0-.684 1.396 1.725 1.725 0 0 0-.024-.026c-.287-.296-.679-.498-1.28-.498H4v-1.5h4.003zM12.699 14.726c-.161.459-.38.94-.684 1.396.527.397 1.188.628 1.988.628h3.19l-1.722 1.72 1.06 1.06L20.067 16l-3.537-3.53-1.06 1.06 1.723 1.72h-3.19c-.602 0-.993-.202-1.28-.498a1.96 1.96 0 0 1-.024-.026z"})),Ah=function({className:e,...t}){return(0,l.createElement)(_.Flex,{className:v()("edit-site-global-styles__color-indicator-wrapper",e),...t})};const{useGlobalSetting:Oh}=nt(we.privateApis),Rh=[];var Dh=function({name:e}){const[t]=Oh("color.palette.custom"),[n]=Oh("color.palette.theme"),[a]=Oh("color.palette.default"),[r]=Oh("color.defaultPalette",e),[s]=function(e){const[t,n]=at("color.palette.theme",void 0);return window.__experimentalEnableColorRandomizer?[function(){const e=Math.floor(225*Math.random()),a=t.map((t=>{const{color:n}=t,a=Xe(n).rotate(e).toHex();return{...t,color:a}}));n(a)}]:[]}(),i=(0,f.useMemo)((()=>[...t||Rh,...n||Rh,...a&&r?a:Rh]),[t,n,a,r]),o=e?"/blocks/"+encodeURIComponent(e)+"/colors/palette":"/colors/palette",c=i.length>0?(0,b.sprintf)(
// Translators: %d: Number of palette colors.
(0,b._n)("%d color","%d colors",i.length),i.length):(0,b.__)("Add custom colors");return(0,l.createElement)(_.__experimentalVStack,{spacing:3},(0,l.createElement)(Oc,{level:3},(0,b.__)("Palette")),(0,l.createElement)(_.__experimentalItemGroup,{isBordered:!0,isSeparated:!0},(0,l.createElement)(lc,{path:o,"aria-label":(0,b.__)("Color palettes")},(0,l.createElement)(_.__experimentalHStack,{direction:0===i.length?"row-reverse":"row"},(0,l.createElement)(_.__experimentalZStack,{isLayered:!1,offset:-8},i.slice(0,5).map((({color:e},t)=>(0,l.createElement)(Ah,{key:`${e}-${t}`},(0,l.createElement)(_.ColorIndicator,{colorValue:e}))))),(0,l.createElement)(_.FlexItem,null,c)))),window.__experimentalEnableColorRandomizer&&n?.length>0&&(0,l.createElement)(_.Button,{variant:"secondary",icon:Mh,onClick:s},(0,b.__)("Randomize colors")))};const{useGlobalStyle:Fh,useGlobalSetting:Bh,useSettingsForBlockElement:Lh,ColorPanel:Vh}=nt(we.privateApis);var zh=function(){const[e]=Fh("",void 0,"user",{shouldDecodeEncode:!1}),[t,n]=Fh("",void 0,"all",{shouldDecodeEncode:!1}),[a]=Bh(""),r=Lh(a);return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(Ec,{title:(0,b.__)("Colors"),description:(0,b.__)("Manage palettes and the default color of different global elements on the site.")}),(0,l.createElement)("div",{className:"edit-site-global-styles-screen-colors"},(0,l.createElement)(_.__experimentalVStack,{spacing:10},(0,l.createElement)(Dh,null),(0,l.createElement)(Vh,{inheritedValue:t,value:e,onChange:n,settings:r}))))};const{useGlobalSetting:Gh}=nt(we.privateApis),Hh={placement:"bottom-start",offset:8};function Uh({name:e}){const[t,n]=Gh("color.palette.theme",e),[a]=Gh("color.palette.theme",e,"base"),[r,s]=Gh("color.palette.default",e),[i]=Gh("color.palette.default",e,"base"),[o,c]=Gh("color.palette.custom",e),[u]=Gh("color.defaultPalette",e),d=(0,se.useViewportMatch)("small","<")?Hh:void 0;return(0,l.createElement)(_.__experimentalVStack,{className:"edit-site-global-styles-color-palette-panel",spacing:10},!!t&&!!t.length&&(0,l.createElement)(_.__experimentalPaletteEdit,{canReset:t!==a,canOnlyChangeValues:!0,colors:t,onChange:n,paletteLabel:(0,b.__)("Theme"),paletteLabelHeadingLevel:3,popoverProps:d}),!!r&&!!r.length&&!!u&&(0,l.createElement)(_.__experimentalPaletteEdit,{canReset:r!==i,canOnlyChangeValues:!0,colors:r,onChange:s,paletteLabel:(0,b.__)("Default"),paletteLabelHeadingLevel:3,popoverProps:d}),(0,l.createElement)(_.__experimentalPaletteEdit,{colors:o,onChange:c,paletteLabel:(0,b.__)("Custom"),paletteLabelHeadingLevel:3,emptyMessage:(0,b.__)("Custom colors are empty! Add some colors to create your own color palette."),slugPrefix:"custom-",popoverProps:d}))}const{useGlobalSetting:Wh}=nt(we.privateApis),jh={placement:"bottom-start",offset:8},Zh=()=>{};function qh({name:e}){const[t,n]=Wh("color.gradients.theme",e),[a]=Wh("color.gradients.theme",e,"base"),[r,s]=Wh("color.gradients.default",e),[i]=Wh("color.gradients.default",e,"base"),[o,c]=Wh("color.gradients.custom",e),[u]=Wh("color.defaultGradients",e),[d]=Wh("color.duotone.custom")||[],[m]=Wh("color.duotone.default")||[],[p]=Wh("color.duotone.theme")||[],[h]=Wh("color.defaultDuotone"),f=[...d||[],...p||[],...m&&h?m:[]],g=(0,se.useViewportMatch)("small","<")?jh:void 0;return(0,l.createElement)(_.__experimentalVStack,{className:"edit-site-global-styles-gradient-palette-panel",spacing:10},!!t&&!!t.length&&(0,l.createElement)(_.__experimentalPaletteEdit,{canReset:t!==a,canOnlyChangeValues:!0,gradients:t,onChange:n,paletteLabel:(0,b.__)("Theme"),paletteLabelHeadingLevel:3,popoverProps:g}),!!r&&!!r.length&&!!u&&(0,l.createElement)(_.__experimentalPaletteEdit,{canReset:r!==i,canOnlyChangeValues:!0,gradients:r,onChange:s,paletteLabel:(0,b.__)("Default"),paletteLabelLevel:3,popoverProps:g}),(0,l.createElement)(_.__experimentalPaletteEdit,{gradients:o,onChange:c,paletteLabel:(0,b.__)("Custom"),paletteLabelLevel:3,emptyMessage:(0,b.__)("Custom gradients are empty! Add some gradients to create your own palette."),slugPrefix:"custom-",popoverProps:g}),!!f&&!!f.length&&(0,l.createElement)("div",null,(0,l.createElement)(Oc,{level:3},(0,b.__)("Duotone")),(0,l.createElement)(_.__experimentalSpacer,{margin:3}),(0,l.createElement)(_.DuotonePicker,{duotonePalette:f,disableCustomDuotone:!0,disableCustomColors:!0,clearable:!1,onChange:Zh})))}const{Tabs:Yh}=nt(_.privateApis);var Kh=function({name:e}){return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(Ec,{title:(0,b.__)("Palette"),description:(0,b.__)("Palettes are used to provide default color options for blocks and various design tools. Here you can edit the colors with their labels.")}),(0,l.createElement)(Yh,null,(0,l.createElement)(Yh.TabList,null,(0,l.createElement)(Yh.Tab,{tabId:"solid"},"Solid"),(0,l.createElement)(Yh.Tab,{tabId:"gradient"},"Gradient")),(0,l.createElement)(Yh.TabPanel,{tabId:"solid",focusable:!1},(0,l.createElement)(Uh,{name:e})),(0,l.createElement)(Yh.TabPanel,{tabId:"gradient",focusable:!1},(0,l.createElement)(qh,{name:e}))))};const{useGlobalStyle:Xh,useGlobalSetting:Jh,useSettingsForBlockElement:Qh,DimensionsPanel:$h}=nt(we.privateApis),ef={contentSize:!0,wideSize:!0,padding:!0,margin:!0,blockGap:!0,minHeight:!0,childLayout:!1};function tf(){const[e]=Xh("",void 0,"user",{shouldDecodeEncode:!1}),[t,n]=Xh("",void 0,"all",{shouldDecodeEncode:!1}),[a]=Jh("",void 0,"user"),[r,s]=Jh(""),i=Qh(r),o=(0,f.useMemo)((()=>({...t,layout:i.layout})),[t,i.layout]),c=(0,f.useMemo)((()=>({...e,layout:a.layout})),[e,a.layout]);return(0,l.createElement)($h,{inheritedValue:o,value:c,onChange:e=>{const t={...e};if(delete t.layout,n(t),e.layout!==a.layout){const t={...a,layout:e.layout};t.layout?.definitions&&delete t.layout.definitions,s(t)}},settings:i,includeLayoutControls:!0,defaultControls:ef})}const{useHasDimensionsPanel:nf,useGlobalSetting:af,useSettingsForBlockElement:rf}=nt(we.privateApis);var sf=function(){const[e]=af(""),t=rf(e),n=nf(t);return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(Ec,{title:(0,b.__)("Layout")}),n&&(0,l.createElement)(tf,null))},of=function(){const{mode:e}=(0,d.useSelect)((e=>({mode:e(we.store).__unstableGetEditorMode()})),[]),t=(0,f.useRef)(null);(0,f.useEffect)((()=>{"zoom-out"!==e&&(t.current=!1)}),[e]),(0,f.useEffect)((()=>{if("zoom-out"!==e)return n("zoom-out"),t.current=!0,()=>{t.current&&n(e)}}),[]);const{__unstableSetEditorMode:n}=(0,d.useDispatch)(we.store);return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(Ec,{back:"/",title:(0,b.__)("Browse styles"),description:(0,b.__)("Choose a variation to change the look of the site.")}),(0,l.createElement)(_.Card,{size:"small",isBorderless:!0,className:"edit-site-global-styles-screen-style-variations"},(0,l.createElement)(_.CardBody,null,(0,l.createElement)(Ua,null))))};const{useGlobalStyle:lf,AdvancedPanel:cf}=nt(we.privateApis);var uf=function(){const e=(0,b.__)("Add your own CSS to customize the appearance and layout of your site."),[t]=lf("",void 0,"user",{shouldDecodeEncode:!1}),[n,a]=lf("",void 0,"all",{shouldDecodeEncode:!1});return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(Ec,{title:(0,b.__)("CSS"),description:(0,l.createElement)(l.Fragment,null,e,(0,l.createElement)(_.ExternalLink,{href:"https://wordpress.org/documentation/article/css/",className:"edit-site-global-styles-screen-css-help-link"},(0,b.__)("Learn more about CSS")))}),(0,l.createElement)("div",{className:"edit-site-global-styles-screen-css"},(0,l.createElement)(cf,{value:t,onChange:a,inheritedValue:n})))};const{ExperimentalBlockEditorProvider:df,GlobalStylesContext:mf,useGlobalStylesOutputWithConfig:pf}=nt(we.privateApis);function hf(e){return!e||0===Object.keys(e).length}var ff=function({userConfig:e,blocks:t}){const{base:n}=(0,f.useContext)(mf),a=(0,f.useMemo)((()=>hf(e)||hf(n)?{}:Ma(n,e)),[n,e]),r=(0,f.useMemo)((()=>Array.isArray(t)?t:[t]),[t]),s=(0,d.useSelect)((e=>e(we.store).getSettings()),[]),i=(0,f.useMemo)((()=>({...s,__unstableIsPreviewMode:!0})),[s]),[o]=pf(a),c=hf(o)||hf(e)?i.styles:o;return(0,l.createElement)($a,{title:(0,b.__)("Revisions"),closeButtonLabel:(0,b.__)("Close revisions"),enableResizing:!0},(0,l.createElement)(we.__unstableIframe,{className:"edit-site-revisions__iframe",name:"revisions",tabIndex:0},(0,l.createElement)(we.__unstableEditorStyles,{styles:c}),(0,l.createElement)("style",null,".is-root-container { display: flow-root; } body { position: relative; padding: 32px; }"),(0,l.createElement)(_.Disabled,{className:"edit-site-revisions__example-preview__content"},(0,l.createElement)(df,{value:r,settings:i},(0,l.createElement)(we.BlockList,{renderAppender:!1})))))};const{getGlobalStylesChanges:gf}=nt(we.privateApis);function yf({revision:e,previousRevision:t}){const n=gf(e,t,{maxResults:7});return n.length?(0,l.createElement)("span",{"data-testid":"global-styles-revision-changes",className:"edit-site-global-styles-screen-revisions__changes"},n.join(", ")):null}var vf=function({userRevisions:e,selectedRevisionId:t,onChange:n,canApplyRevision:a,onApplyRevision:r}){const{currentThemeName:s,currentUser:i}=(0,d.useSelect)((e=>{const{getCurrentTheme:t,getCurrentUser:n}=e(Se.store),a=t();return{currentThemeName:a?.name?.rendered||a?.stylesheet,currentUser:n()}}),[]),o=(0,_r.getDate)().getTime(),{datetimeAbbreviated:c}=(0,_r.getSettings)().formats;return(0,l.createElement)("ol",{className:"edit-site-global-styles-screen-revisions__revisions-list","aria-label":(0,b.__)("Global styles revisions list"),role:"group"},e.map(((u,d)=>{const{id:m,author:p,modified:h}=u,f="unsaved"===m,g=f?i:p,y=g?.name||(0,b.__)("User"),E=g?.avatar_urls?.[48],w=t?t===m:0===d,x=!a&&w,S="parent"===m,C=(0,_r.getDate)(h),k=h&&o-C.getTime()>864e5?(0,_r.dateI18n)(c,C):(0,_r.humanTimeDiff)(h),T=function(e,t,n,a){return"parent"===e?(0,b.__)("Reset the styles to the theme defaults"):"unsaved"===e?(0,b.sprintf)(/* translators: %s: author display name */
(0,b.__)("Unsaved changes by %s"),t):a?(0,b.sprintf)(
// translators: %1$s: author display name, %2$s: revision creation date.
(0,b.__)("Changes saved by %1$s on %2$s. This revision matches current editor styles."),t,n):(0,b.sprintf)(
// translators: %1$s: author display name, %2$s: revision creation date.
(0,b.__)("Changes saved by %1$s on %2$s"),t,n)}(m,y,(0,_r.dateI18n)(c,C),x);return(0,l.createElement)("li",{className:v()("edit-site-global-styles-screen-revisions__revision-item",{"is-selected":w,"is-active":x,"is-reset":S}),key:m,"aria-current":w},(0,l.createElement)(_.Button,{className:"edit-site-global-styles-screen-revisions__revision-button",disabled:w,onClick:()=>{n(u)},"aria-label":T},S?(0,l.createElement)("span",{className:"edit-site-global-styles-screen-revisions__description"},(0,b.__)("Default styles"),(0,l.createElement)("span",{className:"edit-site-global-styles-screen-revisions__meta"},s)):(0,l.createElement)("span",{className:"edit-site-global-styles-screen-revisions__description"},f?(0,l.createElement)("span",{className:"edit-site-global-styles-screen-revisions__date"},(0,b.__)("(Unsaved)")):(0,l.createElement)("time",{className:"edit-site-global-styles-screen-revisions__date",dateTime:h},k),(0,l.createElement)("span",{className:"edit-site-global-styles-screen-revisions__meta"},(0,l.createElement)("img",{alt:y,src:E}),y),w&&(0,l.createElement)(yf,{revision:u,previousRevision:d<e.length?e[d+1]:{}}))),w&&(x?(0,l.createElement)("p",{className:"edit-site-global-styles-screen-revisions__applied-text"},(0,b.__)("These styles are already applied to your site.")):(0,l.createElement)(_.Button,{disabled:x,variant:"primary",className:"edit-site-global-styles-screen-revisions__apply-button",onClick:r},S?(0,b.__)("Reset to defaults"):(0,b.__)("Apply"))))})))};function _f({currentPage:e,numPages:t,changePage:n,totalItems:a,className:r,disabled:s=!1,buttonVariant:i="tertiary",label:o=(0,b.__)("Pagination Navigation")}){return(0,l.createElement)(_.__experimentalHStack,{expanded:!1,as:"nav","aria-label":o,spacing:3,justify:"flex-start",className:v()("edit-site-pagination",r)},(0,l.createElement)(_.__experimentalText,{variant:"muted",className:"edit-site-pagination__total"},
// translators: %s: Total number of patterns.
(0,b.sprintf)(
// translators: %s: Total number of patterns.
(0,b._n)("%s item","%s items",a),a)),(0,l.createElement)(_.__experimentalHStack,{expanded:!1,spacing:1},(0,l.createElement)(_.Button,{variant:i,onClick:()=>n(1),disabled:s||1===e,"aria-label":(0,b.__)("First page")},"«"),(0,l.createElement)(_.Button,{variant:i,onClick:()=>n(e-1),disabled:s||1===e,"aria-label":(0,b.__)("Previous page")},"‹")),(0,l.createElement)(_.__experimentalText,{variant:"muted"},(0,b.sprintf)(
// translators: %1$s: Current page number, %2$s: Total number of pages.
(0,b._x)("%1$s of %2$s","paging"),e,t)),(0,l.createElement)(_.__experimentalHStack,{expanded:!1,spacing:1},(0,l.createElement)(_.Button,{variant:i,onClick:()=>n(e+1),disabled:s||e===t,"aria-label":(0,b.__)("Next page")},"›"),(0,l.createElement)(_.Button,{variant:i,onClick:()=>n(t),disabled:s||e===t,"aria-label":(0,b.__)("Last page")},"»")))}const{GlobalStylesContext:bf,areGlobalStyleConfigsEqual:Ef}=nt(we.privateApis);var wf=function(){const{goTo:e}=(0,_.__experimentalUseNavigator)(),{user:t,setUserConfig:n}=(0,f.useContext)(bf),{blocks:a,editorCanvasContainerView:r}=(0,d.useSelect)((e=>({editorCanvasContainerView:nt(e(ia)).getEditorCanvasContainerView(),blocks:e(we.store).getBlocks()})),[]),[s,i]=(0,f.useState)(1),[o,c]=(0,f.useState)([]),{revisions:u,isLoading:m,hasUnsavedChanges:p,revisionsCount:h}=vr({query:{per_page:10,page:s}}),g=Math.ceil(h/10),[y,v]=(0,f.useState)(t),[E,w]=(0,f.useState)(!1),{setEditorCanvasContainerView:x}=nt((0,d.useDispatch)(ia)),S=Ef(y,t),C=()=>{e("/"),x(void 0)},k=e=>{n((()=>({styles:e?.styles,settings:e?.settings}))),w(!1),C()};(0,f.useEffect)((()=>{r&&r.startsWith("global-styles-revisions")||(e("/"),x(r))}),[r]),(0,f.useEffect)((()=>{!m&&u.length&&c(u)}),[u,m]);const T=u[0],P=y?.id,N=!!T?.id&&!S&&!P;(0,f.useEffect)((()=>{N&&v({styles:T?.styles||{},settings:T?.settings||{},id:T?.id})}),[N,T]);const I=!!P&&"unsaved"!==P&&!S,M=!!o.length;return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(Ec,{title:h&&
// translators: %s: number of revisions.
(0,b.sprintf)((0,b.__)("Revisions (%s)"),h),description:(0,b.__)('Click on previously saved styles to preview them. To restore a selected version to the editor, hit "Apply." When you\'re ready, use the Save button to save your changes.'),onBack:C}),!M&&(0,l.createElement)(_.Spinner,{className:"edit-site-global-styles-screen-revisions__loading"}),M&&("global-styles-revisions:style-book"===r?(0,l.createElement)(pr,{userConfig:y,isSelected:()=>{},onClose:()=>{x("global-styles-revisions")}}):(0,l.createElement)(ff,{blocks:a,userConfig:y,closeButtonLabel:(0,b.__)("Close revisions")})),(0,l.createElement)(vf,{onChange:e=>{v({styles:e?.styles||{},settings:e?.settings||{},id:e?.id})},selectedRevisionId:P,userRevisions:o,canApplyRevision:I,onApplyRevision:()=>p?w(!0):k(y)}),g>1&&(0,l.createElement)("div",{className:"edit-site-global-styles-screen-revisions__footer"},(0,l.createElement)(_f,{className:"edit-site-global-styles-screen-revisions__pagination",currentPage:s,numPages:g,changePage:i,totalItems:h,disabled:m,label:(0,b.__)("Global Styles pagination navigation")})),E&&(0,l.createElement)(_.__experimentalConfirmDialog,{isOpen:E,confirmButtonText:(0,b.__)("Apply"),onConfirm:()=>k(y),onCancel:()=>w(!1)},(0,b.__)("Any unsaved changes will be lost when you apply this revision.")))};const{useGlobalStylesReset:xf}=nt(we.privateApis),{Slot:Sf,Fill:Cf}=(0,_.createSlotFill)("GlobalStylesMenu");function kf(){const[e,t]=xf(),{toggle:n}=(0,d.useDispatch)(k.store),{canEditCSS:a}=(0,d.useSelect)((e=>{const{getEntityRecord:t,__experimentalGetCurrentGlobalStylesId:n}=e(Se.store),a=n(),r=a?t("root","globalStyles",a):void 0;return{canEditCSS:!!r?._links?.["wp:action-edit-css"]}}),[]),{setEditorCanvasContainerView:r}=nt((0,d.useDispatch)(ia)),{goTo:s}=(0,_.__experimentalUseNavigator)(),i=()=>{r("global-styles-css"),s("/css")};return(0,l.createElement)(Cf,null,(0,l.createElement)(_.DropdownMenu,{icon:ce,label:(0,b.__)("More")},(({onClose:r})=>(0,l.createElement)(l.Fragment,null,(0,l.createElement)(_.MenuGroup,null,a&&(0,l.createElement)(_.MenuItem,{onClick:i},(0,b.__)("Additional CSS")),(0,l.createElement)(_.MenuItem,{onClick:()=>{n("core/edit-site","welcomeGuideStyles"),r()}},(0,b.__)("Welcome Guide"))),(0,l.createElement)(_.MenuGroup,null,(0,l.createElement)(_.MenuItem,{onClick:()=>{t(),r()},disabled:!e},(0,b.__)("Reset styles")))))))}function Tf({className:e,...t}){return(0,l.createElement)(_.__experimentalNavigatorScreen,{className:["edit-site-global-styles-sidebar__navigator-screen",e].filter(Boolean).join(" "),...t})}function Pf({parentMenu:e,blockStyles:t,blockName:n}){return t.map(((t,a)=>(0,l.createElement)(Tf,{key:a,path:e+"/variations/"+t.name},(0,l.createElement)($c,{name:n,variation:t.name}))))}function Nf({name:e,parentMenu:t=""}){const n=(0,d.useSelect)((t=>{const{getBlockStyles:n}=t(c.store);return n(e)}),[e]);return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(Tf,{path:t+"/colors/palette"},(0,l.createElement)(Kh,{name:e})),!!n?.length&&(0,l.createElement)(Pf,{parentMenu:t,blockStyles:n,blockName:e}))}function If(){const e=(0,_.__experimentalUseNavigator)(),{path:t}=e.location;return(0,l.createElement)(pr,{isSelected:e=>t===`/blocks/${encodeURIComponent(e)}`||t.startsWith(`/blocks/${encodeURIComponent(e)}/`),onSelect:t=>{e.goTo("/blocks/"+encodeURIComponent(t))}})}function Mf(){const e=(0,_.__experimentalUseNavigator)(),{selectedBlockName:t,selectedBlockClientId:n}=(0,d.useSelect)((e=>{const{getSelectedBlockClientId:t,getBlockName:n}=e(we.store),a=t();return{selectedBlockName:n(a),selectedBlockClientId:a}}),[]),a=Pc(t);(0,f.useEffect)((()=>{if(!n||!a)return;const r=e.location.path;if("/blocks"!==r&&!r.startsWith("/blocks/"))return;const s="/blocks/"+encodeURIComponent(t);s!==r&&e.goTo(s,{skipFocus:!0})}),[n,t,a])}function Af(){const{goTo:e}=(0,_.__experimentalUseNavigator)(),t=(0,d.useSelect)((e=>nt(e(ia)).getEditorCanvasContainerView()),[]);(0,f.useEffect)((()=>{switch(t){case"global-styles-revisions":case"global-styles-revisions:style-book":e("/revisions");break;case"global-styles-css":e("/css");break;default:e("/")}}),[t,e])}var Of=function(){const e=(0,c.getBlockTypes)(),t=(0,d.useSelect)((e=>nt(e(ia)).getEditorCanvasContainerView()),[]);return(0,l.createElement)(_.__experimentalNavigatorProvider,{className:"edit-site-global-styles-sidebar__navigator-provider",initialPath:"/"},(0,l.createElement)(Tf,{path:"/"},(0,l.createElement)(vc,null)),(0,l.createElement)(Tf,{path:"/variations"},(0,l.createElement)(of,null)),(0,l.createElement)(Tf,{path:"/blocks"},(0,l.createElement)(Mc,null)),(0,l.createElement)(Tf,{path:"/typography"},(0,l.createElement)(Eh,null)),(0,l.createElement)(Tf,{path:"/typography/text"},(0,l.createElement)(Ih,{element:"text"})),(0,l.createElement)(Tf,{path:"/typography/link"},(0,l.createElement)(Ih,{element:"link"})),(0,l.createElement)(Tf,{path:"/typography/heading"},(0,l.createElement)(Ih,{element:"heading"})),(0,l.createElement)(Tf,{path:"/typography/caption"},(0,l.createElement)(Ih,{element:"caption"})),(0,l.createElement)(Tf,{path:"/typography/button"},(0,l.createElement)(Ih,{element:"button"})),(0,l.createElement)(Tf,{path:"/colors"},(0,l.createElement)(zh,null)),(0,l.createElement)(Tf,{path:"/layout"},(0,l.createElement)(sf,null)),(0,l.createElement)(Tf,{path:"/css"},(0,l.createElement)(uf,null)),(0,l.createElement)(Tf,{path:"/revisions"},(0,l.createElement)(wf,null)),e.map((e=>(0,l.createElement)(Tf,{key:"menu-block-"+e.name,path:"/blocks/"+encodeURIComponent(e.name)},(0,l.createElement)($c,{name:e.name})))),(0,l.createElement)(Nf,null),e.map((e=>(0,l.createElement)(Nf,{key:"screens-block-"+e.name,name:e.name,parentMenu:"/blocks/"+encodeURIComponent(e.name)}))),"style-book"===t&&(0,l.createElement)(If,null),(0,l.createElement)(kf,null),(0,l.createElement)(Mf,null),(0,l.createElement)(Af,null))};function Rf(){const{shouldClearCanvasContainerView:e,isStyleBookOpened:t,showListViewByDefault:n,hasRevisions:a,isRevisionsOpened:r,isRevisionsStyleBookOpened:s}=(0,d.useSelect)((e=>{const{getActiveComplementaryArea:t}=e(W),{getEditorCanvasContainerView:n,getCanvasMode:a}=nt(e(ia)),r=n(),s="visual"===e(ia).getEditorMode(),i="edit"===a(),o=e(k.store).get("core","showListViewByDefault"),{getEntityRecord:l,__experimentalGetCurrentGlobalStylesId:c}=e(Se.store),u=c(),d=u?l("root","globalStyles",u):void 0;return{isStyleBookOpened:"style-book"===r,shouldClearCanvasContainerView:"edit-site/global-styles"!==t("core/edit-site")||!s||!i,showListViewByDefault:o,hasRevisions:!!d?._links?.["version-history"]?.[0]?.count,isRevisionsStyleBookOpened:"global-styles-revisions:style-book"===r,isRevisionsOpened:"global-styles-revisions"===r}}),[]),{setEditorCanvasContainerView:i}=nt((0,d.useDispatch)(ia));(0,f.useEffect)((()=>{e&&i(void 0)}),[e]);const{setIsListViewOpened:o}=(0,d.useDispatch)(g.store),{goTo:c}=(0,_.__experimentalUseNavigator)();return(0,l.createElement)(sc,{className:"edit-site-global-styles-sidebar",identifier:"edit-site/global-styles",title:(0,b.__)("Styles"),icon:da,closeLabel:(0,b.__)("Close Styles"),panelClassName:"edit-site-global-styles-sidebar__panel",header:(0,l.createElement)(_.Flex,{className:"edit-site-global-styles-sidebar__header",role:"menubar","aria-label":(0,b.__)("Styles actions")},(0,l.createElement)(_.FlexBlock,{style:{minWidth:"min-content"}},(0,l.createElement)("strong",null,(0,b.__)("Styles"))),(0,l.createElement)(_.FlexItem,null,(0,l.createElement)(_.Button,{icon:Ea,label:(0,b.__)("Style Book"),isPressed:t||s,disabled:e,onClick:()=>{r?i("global-styles-revisions:style-book"):s?i("global-styles-revisions"):(o(t&&n),i(t?void 0:"style-book"))}})),(0,l.createElement)(_.FlexItem,null,(0,l.createElement)(_.Button,{label:(0,b.__)("Revisions"),icon:br,onClick:()=>(o(!1),s?(c("/"),void i("style-book")):r?(c("/"),void i(void 0)):(c("/revisions"),void i(t?"global-styles-revisions:style-book":"global-styles-revisions"))),disabled:!a,isPressed:r||s})),(0,l.createElement)(Sf,null))},(0,l.createElement)(Of,null))}const Df="edit-site/template",Ff="edit-site/block-inspector";var Bf=({sidebarName:e})=>{const{isEditingPage:t,entityType:n}=(0,d.useSelect)((e=>{const{getEditedPostType:t,isPage:n}=e(ia),{getRenderingMode:a}=e(g.store);return{isEditingPage:n()&&"template-only"!==a(),entityType:t()}})),a=zt[n]||zt[It],{enableComplementaryArea:r}=(0,d.useDispatch)(W);let s;return s=t?e===Df?
// translators: ARIA label for the Template sidebar tab, selected.
(0,b.__)("Page (selected)"):
// translators: ARIA label for the Template Settings Sidebar tab, not selected.
(0,b.__)("Page"):e===Df?
// translators: ARIA label for the Template sidebar tab, selected.
(0,b.sprintf)((0,b.__)("%s (selected)"),a):
// translators: ARIA label for the Template Settings Sidebar tab, not selected.
a,(0,l.createElement)("ul",null,(0,l.createElement)("li",null,(0,l.createElement)(_.Button,{onClick:()=>r(rn,Df),className:v()("edit-site-sidebar-edit-mode__panel-tab",{"is-active":e===Df}),"aria-label":s,"data-label":t?(0,b.__)("Page"):a},t?(0,b.__)("Page"):a)),(0,l.createElement)("li",null,(0,l.createElement)(_.Button,{onClick:()=>r(rn,Ff),className:v()("edit-site-sidebar-edit-mode__panel-tab",{"is-active":e===Ff}),"aria-label":e===Ff?
// translators: ARIA label for the Block Settings Sidebar tab, selected.
(0,b.__)("Block (selected)"):
// translators: ARIA label for the Block Settings Sidebar tab, not selected.
(0,b.__)("Block"),"data-label":(0,b.__)("Block")},(0,b.__)("Block"))))};function Lf({className:e,title:t,icon:n,description:a,actions:r,children:s}){return(0,l.createElement)("div",{className:v()("edit-site-sidebar-card",e)},(0,l.createElement)(_.Icon,{className:"edit-site-sidebar-card__icon",icon:n}),(0,l.createElement)("div",{className:"edit-site-sidebar-card__content"},(0,l.createElement)("div",{className:"edit-site-sidebar-card__header"},(0,l.createElement)("h2",{className:"edit-site-sidebar-card__title"},t),r),(0,l.createElement)("div",{className:"edit-site-sidebar-card__description"},a),s))}const{BlockQuickNavigation:Vf}=nt(we.privateApis);function zf(){const e=(0,d.useSelect)((e=>nt(e(we.store)).getEnabledClientIdsTree()),[]),t=(0,f.useMemo)((()=>e.map((({clientId:e})=>e))),[e]);return(0,l.createElement)(Vf,{clientIds:t})}const{PostPanelRow:Gf}=nt(g.privateApis),Hf=[{label:(0,l.createElement)(l.Fragment,null,(0,b.__)("Draft"),(0,l.createElement)(_.__experimentalText,{variant:"muted"},(0,b.__)("Not ready to publish."))),value:"draft"},{label:(0,l.createElement)(l.Fragment,null,(0,b.__)("Pending"),(0,l.createElement)(_.__experimentalText,{variant:"muted"},(0,b.__)("Waiting for review before publishing."))),value:"pending"},{label:(0,l.createElement)(l.Fragment,null,(0,b.__)("Private"),(0,l.createElement)(_.__experimentalText,{variant:"muted"},(0,b.__)("Only visible to site admins and editors."))),value:"private"},{label:(0,l.createElement)(l.Fragment,null,(0,b.__)("Scheduled"),(0,l.createElement)(_.__experimentalText,{variant:"muted"},(0,b.__)("Publish automatically on a chosen date."))),value:"future"},{label:(0,l.createElement)(l.Fragment,null,(0,b.__)("Published"),(0,l.createElement)(_.__experimentalText,{variant:"muted"},(0,b.__)("Visible to everyone."))),value:"publish"}];function Uf({postType:e,postId:t,status:n,password:a,date:r}){const[s,i]=(0,f.useState)(!!a),o=(0,se.useInstanceId)(Uf),{editEntityRecord:c}=(0,d.useDispatch)(Se.store),{createErrorNotice:u}=(0,d.useDispatch)(xe.store),[m,p]=(0,f.useState)(null),h=(0,f.useMemo)((()=>({anchor:m,"aria-label":(0,b.__)("Change status"),placement:"bottom-end"})),[m]),g=async({status:s=n,password:i=a,date:o=r})=>{try{await c("postType",e,t,{status:s,date:o,password:i})}catch(e){const t=e.message&&"unknown_error"!==e.code?e.message:(0,b.__)("An error occurred while updating the status");u(t,{type:"snackbar"})}},y=e=>{i(e),e||g({password:""})},v=e=>{let t=r,n=a;"publish"===e?new Date(r)>new Date&&(t=null):"future"===e?(!r||new Date(r)<new Date)&&(t=new Date,t.setDate(t.getDate()+7)):"private"===e&&a&&(i(!1),n=""),g({status:e,date:t,password:n})};return(0,l.createElement)(Gf,{label:(0,b.__)("Status")},(0,l.createElement)(_.Dropdown,{contentClassName:"edit-site-change-status__content",popoverProps:h,focusOnMount:!0,ref:p,renderToggle:({onToggle:e})=>(0,l.createElement)(_.Button,{className:"edit-site-summary-field__trigger",variant:"tertiary",onClick:e},(0,l.createElement)(Zl,{status:a?"protected":n})),renderContent:({onClose:e})=>(0,l.createElement)(l.Fragment,null,(0,l.createElement)(we.__experimentalInspectorPopoverHeader,{title:(0,b.__)("Status"),onClose:e}),(0,l.createElement)("form",null,(0,l.createElement)(_.__experimentalVStack,{spacing:5},(0,l.createElement)(_.RadioControl,{className:"edit-site-change-status__options",hideLabelFromVision:!0,label:(0,b.__)("Status"),options:Hf,onChange:v,selected:n}),"private"!==n&&(0,l.createElement)("fieldset",{className:"edit-site-change-status__password-fieldset"},(0,l.createElement)(_.__experimentalText,{as:"legend",className:"edit-site-change-status__password-legend",size:"11",lineHeight:1.4,weight:500,upperCase:!0},(0,b.__)("Password")),(0,l.createElement)(_.ToggleControl,{label:(0,b.__)("Hide this page behind a password"),checked:s,onChange:y}),s&&(0,l.createElement)("div",{className:"edit-site-change-status__password-input"},(0,l.createElement)(_.VisuallyHidden,{as:"label",htmlFor:`edit-site-change-status__password-input-${o}`},(0,b.__)("Create password")),(0,l.createElement)(_.TextControl,{onChange:e=>g({password:e}),value:a,placeholder:(0,b.__)("Use a secure password"),type:"text",id:`edit-site-change-status__password-input-${o}`}))))))}))}function Wf({status:e,date:t,password:n,postId:a,postType:r}){return(0,l.createElement)(_.__experimentalVStack,{spacing:0},(0,l.createElement)(Uf,{status:e,date:t,password:n,postId:a,postType:r}),(0,l.createElement)(g.PostSchedulePanel,null),(0,l.createElement)(g.PostTemplatePanel,null),(0,l.createElement)(g.PostURLPanel,null),(0,l.createElement)(g.PostAuthorPanel,null))}function jf(){const{id:e,type:t,hasResolved:n,status:a,date:r,password:s,title:i,modified:o,renderingMode:c}=(0,d.useSelect)((e=>{const{getEditedPostContext:t}=e(ia),{getEditedEntityRecord:n,hasFinishedResolution:a}=e(Se.store),{getRenderingMode:r}=e(g.store),s=t(),i=["postType",s.postType,s.postId],o=n(...i);return{hasResolved:a("getEditedEntityRecord",i),title:o?.title,id:o?.id,type:o?.type,status:o?.status,date:o?.date,password:o?.password,modified:o?.modified,renderingMode:r()}}),[]);return n?(0,l.createElement)(l.Fragment,null,(0,l.createElement)(_.PanelBody,null,(0,l.createElement)(Lf,{title:(0,an.decodeEntities)(i),icon:ma,description:(0,l.createElement)(_.__experimentalVStack,null,(0,l.createElement)(_.__experimentalText,null,(0,b.sprintf)(
// translators: %s: Human-readable time difference, e.g. "2 days ago".
(0,b.__)("Last edited %s"),(0,_r.humanTimeDiff)(o))))})),(0,l.createElement)(_.PanelBody,{title:(0,b.__)("Summary")},(0,l.createElement)(Wf,{status:a,date:r,password:s,postId:e,postType:t})),"post-only"!==c&&(0,l.createElement)(_.PanelBody,{title:(0,b.__)("Content")},(0,l.createElement)(zf,null)),(0,l.createElement)(g.PostLastRevisionPanel,null),(0,l.createElement)(g.PostTaxonomiesPanel,null),(0,l.createElement)(g.PostFeaturedImagePanel,null),(0,l.createElement)(g.PostExcerptPanel,null),(0,l.createElement)(g.PostDiscussionPanel,null),(0,l.createElement)(g.PageAttributesPanel,null)):null}function Zf({onClick:e,availableTemplates:t}){const{editEntityRecord:n}=(0,d.useDispatch)(Se.store),[a,r]=(0,f.useState)(!1),s=()=>{r(!1)},{postId:i,postType:o}=(0,d.useSelect)((e=>({postId:e(ia).getEditedPostId(),postType:e(ia).getEditedPostType()})),[]);return!t.length||t.length<1?null:(0,l.createElement)(l.Fragment,null,(0,l.createElement)(_.MenuItem,{info:(0,b.__)("Replace the contents of this template with another."),onClick:()=>r(!0)},(0,b.__)("Replace template")),a&&(0,l.createElement)(_.Modal,{title:(0,b.__)("Choose a template"),onRequestClose:s,overlayClassName:"edit-site-template-panel__replace-template-modal",isFullScreen:!0},(0,l.createElement)("div",{className:"edit-site-template-panel__replace-template-modal__content"},(0,l.createElement)(qf,{availableTemplates:t,onSelect:async t=>{s(),e(),await n("postType",o,i,{blocks:t.blocks,content:(0,c.serialize)(t.blocks)})}}))))}function qf({availableTemplates:e,onSelect:t}){const n=(0,se.useAsyncList)(e);return(0,l.createElement)(we.__experimentalBlockPatternsList,{label:(0,b.__)("Templates"),blockPatterns:e,shownPatterns:n,onClickPattern:t})}function Yf(e,t){return e.innerBlocks=e.innerBlocks.map((e=>Yf(e,t))),"core/template-part"===e.name&&void 0===e.attributes.theme&&(e.attributes.theme=t),e}function Kf(e,t,n){return e.filter(((e,n,a)=>(e=>!Bt.includes(e.source))(e)&&((e,t,n)=>t===n.findIndex((t=>e.name===t.name)))(e,n,a)&&(e=>e.templateTypes?.includes(t.slug))(e))).map((e=>({...e,keywords:e.keywords||[],type:Rt.theme,blocks:(0,c.parse)(e.content,{__unstableSkipMigrationLogs:!0}).map((e=>Yf(e,n)))})))}function Xf({template:e}){const t=function(e){const{blockPatterns:t,restBlockPatterns:n,currentThemeStylesheet:a}=(0,d.useSelect)((e=>{var t;const{getSettings:n}=nt(e(ia)),a=n();return{blockPatterns:null!==(t=a.__experimentalAdditionalBlockPatterns)&&void 0!==t?t:a.__experimentalBlockPatterns,restBlockPatterns:e(Se.store).getBlockPatterns(),currentThemeStylesheet:e(Se.store).getCurrentTheme().stylesheet}}),[]);return(0,f.useMemo)((()=>Kf([...t||[],...n||[]],e,a)),[t,n,e,a])}(e),{revertTemplate:n}=(0,d.useDispatch)(ia),a=sn(e);return a||t.length&&!(t.length<1)?(0,l.createElement)(_.DropdownMenu,{icon:ce,label:(0,b.__)("Actions"),className:"edit-site-template-card__actions",toggleProps:{isSmall:!0}},(({onClose:r})=>(0,l.createElement)(_.MenuGroup,null,a&&(0,l.createElement)(_.MenuItem,{info:(0,b.__)("Use the template as supplied by the theme."),onClick:()=>{n(e),r()}},(0,b.__)("Clear customizations")),(0,l.createElement)(Zf,{availableTemplates:t,template:e,onClick:r})))):null}function Jf({area:e,clientId:t}){const{selectBlock:n,toggleBlockHighlight:a}=(0,d.useDispatch)(we.store),r=(0,d.useSelect)((t=>t(g.store).__experimentalGetDefaultTemplatePartAreas().find((t=>t.area===e))),[e]),s=()=>a(t,!0),i=()=>a(t,!1);return(0,l.createElement)(_.Button,{className:"edit-site-template-card__template-areas-item",icon:r?.icon,onMouseOver:s,onMouseLeave:i,onFocus:s,onBlur:i,onClick:()=>{n(t)}},r?.label)}function Qf(){const e=(0,d.useSelect)((e=>e(ia).getCurrentTemplateTemplateParts()),[]);return e.length?(0,l.createElement)("section",{className:"edit-site-template-card__template-areas"},(0,l.createElement)(_.__experimentalHeading,{level:3,className:"edit-site-template-card__template-areas-title"},(0,b.__)("Areas")),(0,l.createElement)("ul",{className:"edit-site-template-card__template-areas-list"},e.map((({templatePart:e,block:t})=>(0,l.createElement)("li",{key:t.clientId},(0,l.createElement)(Jf,{area:e.area,clientId:t.clientId})))))):null}const $f={wp_block:ha,wp_navigation:ua};function eg(){var e;const{title:t,description:n,icon:a,record:r}=(0,d.useSelect)((e=>{const{getEditedPostType:t,getEditedPostId:n}=e(ia),{getEditedEntityRecord:a}=e(Se.store),{__experimentalGetTemplateInfo:r}=e(g.store),s=a("postType",t(),n()),i=r(s);return{title:i.title,description:i.description,icon:i.icon,record:s}}),[]);return t||n?(0,l.createElement)(l.Fragment,null,(0,l.createElement)(_.PanelBody,null,(0,l.createElement)(Lf,{className:"edit-site-template-card",title:(0,an.decodeEntities)(t),icon:null!==(e=$f[r?.type])&&void 0!==e?e:a,description:(0,an.decodeEntities)(n),actions:(0,l.createElement)(Xf,{template:r})},(0,l.createElement)(Qf,null))),(0,l.createElement)(g.PostLastRevisionPanel,null),(0,l.createElement)(g.PostTaxonomiesPanel,null),(0,l.createElement)(g.PostFeaturedImagePanel,null),(0,l.createElement)(g.PostExcerptPanel,null),(0,l.createElement)(g.PostDiscussionPanel,null),(0,l.createElement)(g.PageAttributesPanel,null)):null}const{Fill:tg,Slot:ng}=(0,_.createSlotFill)("PluginTemplateSettingPanel"),ag=tg;ag.Slot=ng;var rg=ag;const{Slot:sg,Fill:ig}=(0,_.createSlotFill)("EditSiteSidebarInspector"),og=ig;function lg(){const{sidebar:e,isEditorSidebarOpened:t,hasBlockSelection:n,supportsGlobalStyles:a,isEditingPage:r}=(0,d.useSelect)((e=>{const t=e(W).getActiveComplementaryArea(rn),n=[Ff,Df].includes(t),a=e(ia).getSettings();return{sidebar:t,isEditorSidebarOpened:n,hasBlockSelection:!!e(we.store).getBlockSelectionStart(),supportsGlobalStyles:!a?.supportsTemplatePartsMode,isEditingPage:e(ia).isPage()&&"template-only"!==e(g.store).getRenderingMode()}}),[]),{enableComplementaryArea:s}=(0,d.useDispatch)(W);(0,f.useEffect)((()=>{t&&(n?r||s(rn,Ff):s(rn,Df))}),[n,t,r,s]);let i=e;return t||(i=n?Ff:Df),(0,l.createElement)(l.Fragment,null,(0,l.createElement)(sc,{identifier:i,title:(0,b.__)("Settings"),icon:(0,b.isRTL)()?ac:rc,closeLabel:(0,b.__)("Close Settings"),header:(0,l.createElement)(Bf,{sidebarName:i}),headerClassName:"edit-site-sidebar-edit-mode__panel-tabs"},i===Df&&(0,l.createElement)(l.Fragment,null,r?(0,l.createElement)(jf,null):(0,l.createElement)(eg,null),(0,l.createElement)(rg.Slot,null)),i===Ff&&(0,l.createElement)(sg,{bubblesVirtually:!0})),a&&(0,l.createElement)(Rf,null))}var cg=n(773);function ug(){const e=(0,se.useInstanceId)(ug),{shortcut:t,content:n,blocks:a,type:r,id:s}=(0,d.useSelect)((e=>{const{getEditedEntityRecord:t}=e(Se.store),{getEditedPostType:n,getEditedPostId:a}=e(ia),{getShortcutRepresentation:r}=e(oa.store),s=n(),i=a(),o=t("postType",s,i);return{shortcut:r("core/edit-site/toggle-mode"),content:o?.content,blocks:o?.blocks,type:s,id:i}}),[]),{editEntityRecord:i}=(0,d.useDispatch)(Se.store),o=(0,f.useMemo)((()=>n instanceof Function?n({blocks:a}):a?(0,c.__unstableSerializeAndClean)(a):n),[n,a]),{switchEditorMode:u}=(0,d.useDispatch)(ia);return(0,l.createElement)("div",{className:"edit-site-code-editor"},(0,l.createElement)("div",{className:"edit-site-code-editor__toolbar"},(0,l.createElement)("h2",null,(0,b.__)("Editing code")),(0,l.createElement)(_.Button,{variant:"tertiary",onClick:()=>u("visual"),shortcut:t},(0,b.__)("Exit code editor"))),(0,l.createElement)("div",{className:"edit-site-code-editor__body"},(0,l.createElement)(_.VisuallyHidden,{as:"label",htmlFor:`code-editor-text-area-${e}`},(0,b.__)("Type text or HTML")),(0,l.createElement)(cg.Z,{autoComplete:"off",dir:"auto",value:o,onChange:e=>{i("postType",r,s,{content:e.target.value,blocks:void 0,selection:void 0})},className:"edit-site-code-editor-text-area",id:`code-editor-text-area-${e}`,placeholder:(0,b.__)("Start writing with text or HTML")})))}var dg=function(){const{getEditorMode:e}=(0,d.useSelect)(ia),t=(0,d.useSelect)((e=>e(W).getActiveComplementaryArea(ia.name)===Ff),[]),{switchEditorMode:n,toggleDistractionFree:a}=(0,d.useDispatch)(ia),{enableComplementaryArea:r,disableComplementaryArea:s}=(0,d.useDispatch)(W),{replaceBlocks:i}=(0,d.useDispatch)(we.store),{getBlockName:o,getSelectedBlockClientId:l,getBlockAttributes:u}=(0,d.useSelect)(we.store),m=(e,t)=>{e.preventDefault();const n=0===t?"core/paragraph":"core/heading",a=l();if(null===a)return;const r=o(a);if("core/paragraph"!==r&&"core/heading"!==r)return;const s=u(a),d="core/paragraph"===r?"align":"textAlign",m="core/paragraph"===n?"align":"textAlign";i(a,(0,c.createBlock)(n,{level:t,content:s.content,[m]:s[d]}))};return(0,oa.useShortcut)("core/edit-site/toggle-block-settings-sidebar",(e=>{e.preventDefault(),t?s(rn):r(rn,Ff)})),(0,oa.useShortcut)("core/edit-site/toggle-mode",(()=>{n("visual"===e()?"text":"visual")})),(0,oa.useShortcut)("core/edit-site/transform-heading-to-paragraph",(e=>m(e,0))),[1,2,3,4,5,6].forEach((e=>{(0,oa.useShortcut)(`core/edit-site/transform-paragraph-to-heading-${e}`,(t=>m(t,e)))})),(0,oa.useShortcut)("core/edit-site/toggle-distraction-free",(()=>{a()})),null};function mg({nonAnimatedSrc:e,animatedSrc:t}){return(0,l.createElement)("picture",{className:"edit-site-welcome-guide__image"},(0,l.createElement)("source",{srcSet:e,media:"(prefers-reduced-motion: reduce)"}),(0,l.createElement)("img",{src:t,width:"312",height:"240",alt:""}))}function pg(){const{toggle:e}=(0,d.useDispatch)(k.store);return(0,d.useSelect)((e=>!!e(k.store).get("core/edit-site","welcomeGuide")),[])?(0,l.createElement)(_.Guide,{className:"edit-site-welcome-guide guide-editor",contentLabel:(0,b.__)("Welcome to the site editor"),finishButtonText:(0,b.__)("Get started"),onFinish:()=>e("core/edit-site","welcomeGuide"),pages:[{image:(0,l.createElement)(mg,{nonAnimatedSrc:"https://s.w.org/images/block-editor/edit-your-site.svg?1",animatedSrc:"https://s.w.org/images/block-editor/edit-your-site.gif?1"}),content:(0,l.createElement)(l.Fragment,null,(0,l.createElement)("h1",{className:"edit-site-welcome-guide__heading"},(0,b.__)("Edit your site")),(0,l.createElement)("p",{className:"edit-site-welcome-guide__text"},(0,b.__)("Design everything on your site — from the header right down to the footer — using blocks.")),(0,l.createElement)("p",{className:"edit-site-welcome-guide__text"},(0,f.createInterpolateElement)((0,b.__)("Click <StylesIconImage /> to start designing your blocks, and choose your typography, layout, and colors."),{StylesIconImage:(0,l.createElement)("img",{alt:(0,b.__)("styles"),src:"data:image/svg+xml,%3Csvg width='18' height='18' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 4c-4.4 0-8 3.6-8 8v.1c0 4.1 3.2 7.5 7.2 7.9h.8c4.4 0 8-3.6 8-8s-3.6-8-8-8zm0 15V5c3.9 0 7 3.1 7 7s-3.1 7-7 7z' fill='%231E1E1E'/%3E%3C/svg%3E%0A"})})))}]}):null}function hg(){const{toggle:e}=(0,d.useDispatch)(k.store),{isActive:t,isStylesOpen:n}=(0,d.useSelect)((e=>{const t=e(W).getActiveComplementaryArea(ia.name);return{isActive:!!e(k.store).get("core/edit-site","welcomeGuideStyles"),isStylesOpen:"edit-site/global-styles"===t}}),[]);if(!t||!n)return null;const a=(0,b.__)("Welcome to Styles");return(0,l.createElement)(_.Guide,{className:"edit-site-welcome-guide guide-styles",contentLabel:a,finishButtonText:(0,b.__)("Get started"),onFinish:()=>e("core/edit-site","welcomeGuideStyles"),pages:[{image:(0,l.createElement)(mg,{nonAnimatedSrc:"https://s.w.org/images/block-editor/welcome-to-styles.svg?1",animatedSrc:"https://s.w.org/images/block-editor/welcome-to-styles.gif?1"}),content:(0,l.createElement)(l.Fragment,null,(0,l.createElement)("h1",{className:"edit-site-welcome-guide__heading"},a),(0,l.createElement)("p",{className:"edit-site-welcome-guide__text"},(0,b.__)("Tweak your site, or give it a whole new look! Get creative — how about a new color palette for your buttons, or choosing a new font? Take a look at what you can do here.")))},{image:(0,l.createElement)(mg,{nonAnimatedSrc:"https://s.w.org/images/block-editor/set-the-design.svg?1",animatedSrc:"https://s.w.org/images/block-editor/set-the-design.gif?1"}),content:(0,l.createElement)(l.Fragment,null,(0,l.createElement)("h1",{className:"edit-site-welcome-guide__heading"},(0,b.__)("Set the design")),(0,l.createElement)("p",{className:"edit-site-welcome-guide__text"},(0,b.__)("You can customize your site as much as you like with different colors, typography, and layouts. Or if you prefer, just leave it up to your theme to handle!")))},{image:(0,l.createElement)(mg,{nonAnimatedSrc:"https://s.w.org/images/block-editor/personalize-blocks.svg?1",animatedSrc:"https://s.w.org/images/block-editor/personalize-blocks.gif?1"}),content:(0,l.createElement)(l.Fragment,null,(0,l.createElement)("h1",{className:"edit-site-welcome-guide__heading"},(0,b.__)("Personalize blocks")),(0,l.createElement)("p",{className:"edit-site-welcome-guide__text"},(0,b.__)("You can adjust your blocks to ensure a cohesive experience across your site — add your unique colors to a branded Button block, or adjust the Heading block to your preferred size.")))},{image:(0,l.createElement)(mg,{nonAnimatedSrc:"https://s.w.org/images/block-editor/welcome-documentation.svg",animatedSrc:"https://s.w.org/images/block-editor/welcome-documentation.gif"}),content:(0,l.createElement)(l.Fragment,null,(0,l.createElement)("h1",{className:"edit-site-welcome-guide__heading"},(0,b.__)("Learn more")),(0,l.createElement)("p",{className:"edit-site-welcome-guide__text"},(0,b.__)("New to block themes and styling your site?")," ",(0,l.createElement)(_.ExternalLink,{href:(0,b.__)("https://wordpress.org/documentation/article/styles-overview/")},(0,b.__)("Here’s a detailed guide to learn how to make the most of it."))))}]})}function fg(){const{toggle:e}=(0,d.useDispatch)(k.store),t=(0,d.useSelect)((e=>{const t=!!e(k.store).get("core/edit-site","welcomeGuidePage"),n=!!e(k.store).get("core/edit-site","welcomeGuide"),{isPage:a}=e(ia);return t&&!n&&a()}),[]);if(!t)return null;const n=(0,b.__)("Editing a page");return(0,l.createElement)(_.Guide,{className:"edit-site-welcome-guide guide-page",contentLabel:n,finishButtonText:(0,b.__)("Continue"),onFinish:()=>e("core/edit-site","welcomeGuidePage"),pages:[{image:(0,l.createElement)("video",{className:"edit-site-welcome-guide__video",autoPlay:!0,loop:!0,muted:!0,width:"312",height:"240"},(0,l.createElement)("source",{src:"https://s.w.org/images/block-editor/editing-your-page.mp4",type:"video/mp4"})),content:(0,l.createElement)(l.Fragment,null,(0,l.createElement)("h1",{className:"edit-site-welcome-guide__heading"},n),(0,l.createElement)("p",{className:"edit-site-welcome-guide__text"},(0,b.__)("It’s now possible to edit page content in the site editor. To customise other parts of the page like the header and footer switch to editing the template using the settings sidebar.")))}]})}function gg(){const{toggle:e}=(0,d.useDispatch)(k.store),t=(0,d.useSelect)((e=>{const t=!!e(k.store).get("core/edit-site","welcomeGuideTemplate"),n=!!e(k.store).get("core/edit-site","welcomeGuide"),{isPage:a}=e(ia),{getRenderingMode:r}=e(g.store);return t&&!n&&a()&&"template-only"===r()}),[]);if(!t)return null;const n=(0,b.__)("Editing a template");return(0,l.createElement)(_.Guide,{className:"edit-site-welcome-guide guide-template",contentLabel:n,finishButtonText:(0,b.__)("Continue"),onFinish:()=>e("core/edit-site","welcomeGuideTemplate"),pages:[{image:(0,l.createElement)("video",{className:"edit-site-welcome-guide__video",autoPlay:!0,loop:!0,muted:!0,width:"312",height:"240"},(0,l.createElement)("source",{src:"https://s.w.org/images/block-editor/editing-your-template.mp4",type:"video/mp4"})),content:(0,l.createElement)(l.Fragment,null,(0,l.createElement)("h1",{className:"edit-site-welcome-guide__heading"},n),(0,l.createElement)("p",{className:"edit-site-welcome-guide__text"},(0,b.__)("Note that the same template can be used by multiple pages, so any changes made here may affect other pages on the site. To switch back to editing the page content click the ‘Back’ button in the toolbar.")))}]})}function yg(){return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(pg,null),(0,l.createElement)(hg,null),(0,l.createElement)(fg,null),(0,l.createElement)(gg,null))}function vg({fallbackContent:e,onChoosePattern:t,postType:n}){const[,,a]=(0,Se.useEntityBlockEditor)("postType",n),r=function(e){const{slug:t,patterns:n}=(0,d.useSelect)((e=>{const{getEditedPostType:t,getEditedPostId:n}=e(ia),{getEntityRecord:a}=e(Se.store),r=n(),s=a("postType",t(),r),{getSettings:i}=e(we.store);return{slug:s.slug,patterns:i().__experimentalBlockPatterns}}),[]),a=(0,d.useSelect)((e=>e(Se.store).getCurrentTheme().stylesheet));return(0,f.useMemo)((()=>[{name:"fallback",blocks:(0,c.parse)(e),title:(0,b.__)("Fallback content")},...n.filter((e=>Array.isArray(e.templateTypes)&&e.templateTypes.some((e=>t.startsWith(e))))).map((e=>({...e,blocks:(0,c.parse)(e.content).map((e=>function(e){return e.innerBlocks.find((e=>"core/template-part"===e.name))&&(e.innerBlocks=e.innerBlocks.map((e=>("core/template-part"===e.name&&void 0===e.attributes.theme&&(e.attributes.theme=a),e)))),"core/template-part"===e.name&&void 0===e.attributes.theme&&(e.attributes.theme=a),e}(e)))})))]),[e,t,n])}(e),s=(0,se.useAsyncList)(r);return(0,l.createElement)(we.__experimentalBlockPatternsList,{blockPatterns:r,shownPatterns:s,onClickPattern:(e,n)=>{a(n,{selection:void 0}),t()}})}function _g({slug:e,isCustom:t,onClose:n,postType:a}){const r=function(e,t=!1){return(0,d.useSelect)((n=>{const{getEntityRecord:a,getDefaultTemplateId:r}=n(Se.store),s=r({slug:e,is_custom:t,ignore_empty:!0});return s?a("postType",It,s)?.content?.raw:void 0}),[e,t])}(e,t);return r?(0,l.createElement)(_.Modal,{className:"edit-site-start-template-options__modal",title:(0,b.__)("Choose a pattern"),closeLabel:(0,b.__)("Cancel"),focusOnMount:"firstElement",onRequestClose:n,isFullScreen:!0},(0,l.createElement)("div",{className:"edit-site-start-template-options__modal-content"},(0,l.createElement)(vg,{fallbackContent:r,slug:e,isCustom:t,postType:a,onChoosePattern:()=>{n()}})),(0,l.createElement)(_.Flex,{className:"edit-site-start-template-options__modal__actions",justify:"flex-end",expanded:!1},(0,l.createElement)(_.FlexItem,null,(0,l.createElement)(_.Button,{variant:"tertiary",onClick:n},(0,b.__)("Skip"))))):null}const bg={INITIAL:"INITIAL",CLOSED:"CLOSED"};function Eg(){const[e,t]=(0,f.useState)(bg.INITIAL),{shouldOpenModal:n,slug:a,isCustom:r,postType:s}=(0,d.useSelect)((e=>{const{getEditedPostType:t,getEditedPostId:n}=e(ia),a=t(),r=n(),{getEditedEntityRecord:s,hasEditsForEntityRecord:i}=e(Se.store),o=s("postType",a,r);return{shouldOpenModal:!i("postType",a,r)&&""===o.content&&It===a&&!e(k.store).get("core/edit-site","welcomeGuide"),slug:o.slug,isCustom:o.is_custom,postType:a}}),[]);return e===bg.INITIAL&&!n||e===bg.CLOSED?null:(0,l.createElement)(_g,{slug:a,isCustom:r,postType:s,onClose:()=>t(bg.CLOSED)})}const{useGlobalStylesOutput:wg}=nt(we.privateApis);function xg(){return function(){const[e,t]=wg(),{getSettings:n}=(0,d.useSelect)(ia),{updateSettings:a}=(0,d.useDispatch)(ia);(0,f.useEffect)((()=>{var r;if(!e||!t)return;const s=n(),i=Object.values(null!==(r=s.styles)&&void 0!==r?r:[]).filter((e=>!e.isGlobalStyles));a({...s,styles:[...i,...e],__experimentalFeatures:t})}),[e,t,a,n])}(),null}const{useLocation:Sg}=nt(bt.privateApis),{ProgressBar:Cg,Theme:kg}=nt(_.privateApis),{useGlobalStyle:Tg}=nt(we.privateApis);function Pg({id:e}){var t;const[n]=Tg("color.text"),[a]=Tg("color.background"),{highlightedColors:r}=st(),s=null!==(t=r[0]?.color)&&void 0!==t?t:n,{elapsed:i,total:o}=(0,d.useSelect)((e=>{var t,n;const a=e(Se.store).countSelectorsByStatus(),r=null!==(t=a.resolving)&&void 0!==t?t:0,s=null!==(n=a.finished)&&void 0!==n?n:0;return{elapsed:s,total:s+r}}),[]);return(0,l.createElement)("div",{className:"edit-site-canvas-loader"},(0,l.createElement)(kg,{accent:s,background:a},(0,l.createElement)(Cg,{id:e,max:o,value:i})))}const{RenamePatternModal:Ng}=nt(Pt.privateApis);function Ig(){const{record:e}=As(),{closeModal:t}=(0,d.useDispatch)(W);return(0,d.useSelect)((e=>e(W).isModalActive(Rg.rename)))?(0,l.createElement)(Ng,{onClose:t,pattern:e}):null}const{DuplicatePatternModal:Mg}=nt(Pt.privateApis),{useHistory:Ag}=nt(bt.privateApis);function Og(){const{record:e}=As(),{categoryType:t,categoryId:n}=(0,Et.getQueryArgs)(window.location.href),{closeModal:a}=(0,d.useDispatch)(W),r=Ag();return(0,d.useSelect)((e=>e(W).isModalActive(Rg.duplicate)))?(0,l.createElement)(Mg,{onClose:a,onSuccess:function({pattern:e}){r.push({categoryType:t,categoryId:n,postType:Rt.user,postId:e.id}),a()},pattern:e}):null}const Rg={rename:"edit-site/pattern-rename",duplicate:"edit-site/pattern-duplicate"};function Dg(){return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(Og,null),(0,l.createElement)(Ig,null))}var Fg=(0,l.createElement)(E.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(E.Path,{d:"M20 11.2H6.8l3.7-3.7-1-1L3.9 12l5.6 5.5 1-1-3.7-3.7H20z"}));const{useLocation:Bg,useHistory:Lg}=nt(bt.privateApis);var Vg=function(){const e=Bg(),t=Lg(),n=e.params.postType===Mt,a=e.params.postType===Nt,r=e.params.postType===Rt.user,s=e.state?.fromTemplateId;return(n||a||r)&&(s||r)?(0,l.createElement)(_.Button,{className:"edit-site-visual-editor__back-button",icon:Fg,onClick:()=>{t.back()}},(0,b.__)("Back")):null};const{EditorCanvas:zg}=nt(g.privateApis);var Gg=function({enableResizing:e,settings:t,children:n,...a}){const{hasBlocks:r,isFocusMode:s,templateType:i,canvasMode:o,isZoomOutMode:c}=(0,d.useSelect)((e=>{const{getBlockCount:t,__unstableGetEditorMode:n}=e(we.store),{getEditedPostType:a,getCanvasMode:r}=nt(e(ia)),s=a();return{templateType:s,isFocusMode:Vt.includes(s),isZoomOutMode:"zoom-out"===n(),canvasMode:r(),hasBlocks:!!t()}}),[]),{setCanvasMode:u}=nt((0,d.useDispatch)(ia)),[m,p]=(0,f.useState)(!1);(0,f.useEffect)((()=>{"edit"===o&&p(!1)}),[o]);const h={"aria-label":(0,b.__)("Editor Canvas"),role:"button",tabIndex:0,onFocus:()=>p(!0),onBlur:()=>p(!1),onKeyDown:e=>{const{keyCode:t}=e;t!==Sa.ENTER&&t!==Sa.SPACE||(e.preventDefault(),u("edit"))},onClick:()=>u("edit"),readonly:!0},g=i===Nt,y=!(g&&s&&r||"view"===o)&&void 0,_=(0,f.useMemo)((()=>[...t.styles,{css:`.is-root-container{display:flow-root;${e?"min-height:0!important;":""}}body{position:relative; ${"view"===o?"cursor: pointer; min-height: 100vh;":""}}}`}]),[t.styles,e,o]);return(0,l.createElement)(zg,{className:v()("edit-site-editor-canvas__block-list",{"is-navigation-block":g}),renderAppender:y,styles:_,iframeProps:{expand:c,scale:c?.45:void 0,frameSize:c?100:void 0,className:v()("edit-site-visual-editor__editor-canvas",{"is-focused":m&&"view"===o}),...a,..."view"===o?h:{}}},n)};const{useHistory:Hg}=nt(bt.privateApis);function Ug(){const e=Hg();return(t,n)=>Ct(e,t,n)}const{useBlockEditorSettings:Wg}=nt(g.privateApis);function jg(){const e=Ug(),{templateSlug:t,canvasMode:n,settings:a,postWithTemplate:r}=(0,d.useSelect)((e=>{const{getEditedPostType:t,getEditedPostId:n,getEditedPostContext:a,getCanvasMode:r,getSettings:s}=nt(e(ia)),{getEditedEntityRecord:i}=e(Se.store),o=i("postType",t(),n()),l=a();return{templateSlug:o.slug,canvasMode:r(),settings:s(),postWithTemplate:l?.postId}}),[]),s=function(e){const t=e?.match(/^(category|tag|taxonomy-([^-]+))$|^(((category|tag)|taxonomy-([^-]+))-(.+))$/);let n,a,r,s=!1;if(t)t[1]?n=t[2]?t[2]:t[1]:t[3]&&(n=t[6]?t[6]:t[4],a=t[7]),n="tag"===n?"post_tag":n;else{const t=e?.match(/^(author)$|^author-(.+)$/);t&&(s=!0,t[2]&&(r=t[2]))}return(0,d.useSelect)((e=>{const{getEntityRecords:t,getTaxonomy:i,getAuthors:o}=e(Se.store);let l,c;if(n&&(l=i(n)?.labels?.singular_name),a){const e=t("taxonomy",n,{slug:a,per_page:1});e&&e[0]&&(c=e[0].name)}if(s&&(l="Author",r)){const e=o({slug:r});e&&e[0]&&(c=e[0].name)}return{archiveTypeLabel:l,archiveNameLabel:c}}),[r,s,n,a])}(t),i=r?"template-locked":"all";return(0,f.useMemo)((()=>({...a,richEditingEnabled:!0,supportsTemplateMode:!0,focusMode:"view"!==n,defaultRenderingMode:i,getPostLinkProps:e,__experimentalArchiveTitleTypeLabel:s.archiveTypeLabel,__experimentalArchiveTitleNameLabel:s.archiveNameLabel})),[a,n,i,e,s.archiveTypeLabel,s.archiveNameLabel])}function Zg(){const{templateType:e,isFocusMode:t,isViewMode:n}=(0,d.useSelect)((e=>{const{getEditedPostType:t,getCanvasMode:n}=nt(e(ia)),a=t();return{templateType:a,isFocusMode:Vt.includes(a),isViewMode:"view"===n()}}),[]),[a,r]=(0,se.useResizeObserver)(),s=function(){const e=jg(),{postType:t,postId:n}=(0,d.useSelect)((e=>{const{getEditedPostType:t,getEditedPostId:n}=nt(e(ia));return{postType:t(),postId:n()}}),[]);return Wg(e,t,n)}(),i=(0,se.useViewportMatch)("small","<"),o=t&&!n&&!i,c=e===Nt&&t;return(0,l.createElement)($a.Slot,null,(([e])=>e?(0,l.createElement)("div",{className:"edit-site-visual-editor is-focus-mode"},e):(0,l.createElement)("div",{className:v()("edit-site-visual-editor",{"is-focus-mode":t||!!e,"is-view-mode":n})},(0,l.createElement)(Vg,null),(0,l.createElement)(Za,{enableResizing:o,height:r.height&&!c?r.height:"100%"},(0,l.createElement)(Gg,{enableResizing:o,settings:s},a)))))}function qg({clientId:e,onClose:t}){const{getBlocks:n}=(0,d.useSelect)(we.store),{replaceBlocks:a}=(0,d.useDispatch)(we.store);return(0,d.useSelect)((t=>t(we.store).canRemoveBlock(e)),[e])?(0,l.createElement)(_.MenuItem,{onClick:()=>{a(e,n(e)),t()}},(0,b.__)("Detach")):null}function Yg({clientIds:e,blocks:t}){const[n,a]=(0,f.useState)(!1),{replaceBlocks:r}=(0,d.useDispatch)(we.store),{createSuccessNotice:s}=(0,d.useDispatch)(xe.store),{canCreate:i}=(0,d.useSelect)((e=>{const{supportsTemplatePartsMode:t}=e(ia).getSettings();return{canCreate:!t}}),[]);return i?(0,l.createElement)(l.Fragment,null,(0,l.createElement)(_.MenuItem,{icon:Zs,onClick:()=>{a(!0)},"aria-expanded":n,"aria-haspopup":"dialog"},(0,b.__)("Create template part")),n&&(0,l.createElement)(Js,{closeModal:()=>{a(!1)},blocks:t,onCreate:async t=>{r(e,(0,c.createBlock)("core/template-part",{slug:t.slug,theme:t.theme})),s((0,b.__)("Template part created."),{type:"snackbar"})}})):null}function Kg(){return(0,l.createElement)(we.BlockSettingsMenuControls,null,(({selectedClientIds:e,onClose:t})=>(0,l.createElement)(Xg,{clientIds:e,onClose:t})))}function Xg({clientIds:e,onClose:t}){const n=(0,d.useSelect)((t=>t(we.store).getBlocksByClientId(e)),[e]);return 1===n.length&&"core/template-part"===n[0]?.name?(0,l.createElement)(qg,{clientId:e[0],onClose:t}):(0,l.createElement)(Yg,{clientIds:e,blocks:n})}const{BlockRemovalWarningModal:Jg}=nt(we.privateApis),{ExperimentalEditorProvider:Qg,InserterSidebar:$g,ListViewSidebar:ey}=nt(g.privateApis),ty={
/* translators: accessibility text for the editor content landmark region. */
body:(0,b.__)("Editor content"),
/* translators: accessibility text for the editor settings landmark region. */
sidebar:(0,b.__)("Editor settings"),
/* translators: accessibility text for the editor publish landmark region. */
actions:(0,b.__)("Editor publish"),
/* translators: accessibility text for the editor footer landmark region. */
footer:(0,b.__)("Editor footer")},ny={"core/query":(0,b.__)("Query Loop displays a list of posts or pages."),"core/post-content":(0,b.__)("Post Content displays the content of a post or page."),"core/post-template":(0,b.__)("Post Template displays each post or page in a Query Loop.")};function ay({isLoading:e}){const{record:t,getTitle:n,isLoaded:a}=As(),{type:r}=t,s=(0,se.useViewportMatch)("medium"),{context:i,contextPost:o,editorMode:c,canvasMode:u,renderingMode:m,blockEditorMode:p,isRightSidebarOpen:h,isInserterOpen:y,isListViewOpen:E,showIconLabels:w,showBlockBreadcrumbs:x}=(0,d.useSelect)((e=>{const{get:t}=e(k.store),{getEditedPostContext:n,getEditorMode:a,getCanvasMode:r}=nt(e(ia)),{__unstableGetEditorMode:s}=e(we.store),{getActiveComplementaryArea:i}=e(W),{getEntityRecord:o}=e(Se.store),{getRenderingMode:l,isInserterOpened:c,isListViewOpened:u}=e(g.store),d=n();return{context:d,contextPost:d?.postId?o("postType",d.postType,d.postId):void 0,editorMode:a(),canvasMode:r(),renderingMode:l(),blockEditorMode:s(),isInserterOpen:c(),isListViewOpen:u(),isRightSidebarOpen:i(ia.name),showBlockBreadcrumbs:t("core","showBlockBreadcrumbs"),showIconLabels:t("core","showIconLabels")}}),[]),S="edit"===u,C="view"===u||"visual"===c,T=x&&S&&C&&"zoom-out"!==p,P=S&&C&&y,N=S&&C&&E,I=E?(0,b.__)("List View"):(0,b.__)("Block Library"),M=!!i?.postId;let A;var O;a&&(A=(0,b.sprintf)(
// translators: A breadcrumb trail for the Admin document title. %1$s: title of template being edited, %2$s: type of template (Template or Template Part).
(0,b.__)("%1$s ‹ %2$s"),n(),null!==(O=zt[r])&&void 0!==O?O:zt[It])),function(e){const t=Sg(),n=(0,d.useSelect)((e=>e(Se.store).getEntityRecord("root","site")?.title),[]),a=(0,f.useRef)(!0);(0,f.useEffect)((()=>{a.current=!1}),[t]),(0,f.useEffect)((()=>{if(!a.current&&e&&n){const t=(0,b.sprintf)(/* translators: Admin document title. 1: Admin screen name, 2: Network or site name. */
(0,b.__)("%1$s ‹ %2$s ‹ Editor — WordPress"),(0,an.decodeEntities)(e),(0,an.decodeEntities)(n));document.title=t,(0,nn.speak)(e,"assertive")}}),[e,n,t])}(a&&A);const R=(0,se.useInstanceId)(Pg,"edit-site-editor__loading-progress"),D=jg(),F=!e&&(M&&!!o&&!!t||!M&&!!t);return(0,l.createElement)(l.Fragment,null,F?null:(0,l.createElement)(Pg,{id:R}),S&&(0,l.createElement)(yg,null),a&&!t&&(0,l.createElement)(_.Notice,{status:"warning",isDismissible:!1},(0,b.__)("You attempted to edit an item that doesn't exist. Perhaps it was deleted?")),F&&(0,l.createElement)(Qg,{post:M?o:t,__unstableTemplate:M?t:void 0,settings:D,useSubRegistry:!1},(0,l.createElement)(lg,null),S&&(0,l.createElement)(Eg,null),(0,l.createElement)(le,{isDistractionFree:!0,enableRegionNavigation:!1,className:v()("edit-site-editor__interface-skeleton",{"show-icon-labels":w}),notices:(0,l.createElement)(g.EditorSnackbars,null),content:(0,l.createElement)(l.Fragment,null,(0,l.createElement)(xg,null),S&&(0,l.createElement)(g.EditorNotices,null),C&&(0,l.createElement)(l.Fragment,null,(0,l.createElement)(Kg,null),(0,l.createElement)(og,null,(0,l.createElement)(we.BlockInspector,null)),!s&&(0,l.createElement)(we.BlockToolbar,{hideDragHandle:!0}),(0,l.createElement)(Zg,null),(0,l.createElement)(Jg,{rules:ny}),(0,l.createElement)(Dg,null)),"text"===c&&S&&(0,l.createElement)(ug,null),S&&(0,l.createElement)(l.Fragment,null,(0,l.createElement)(dg,null),(0,l.createElement)(g.EditorKeyboardShortcutsRegister,null),(0,l.createElement)(g.EditorKeyboardShortcuts,null))),secondarySidebar:S&&(P&&(0,l.createElement)($g,null)||N&&(0,l.createElement)(ey,null)),sidebar:S&&h&&(0,l.createElement)(l.Fragment,null,(0,l.createElement)(re.Slot,{scope:"core/edit-site"})),footer:T&&(0,l.createElement)(we.BlockBreadcrumb,{rootLabelText:M&&"template-only"!==m?(0,b.__)("Page"):(0,b.__)("Template")}),labels:{...ty,secondarySidebar:I}})))}function ry({text:e,children:t}){const n=(0,se.useCopyToClipboard)(e);return(0,l.createElement)(_.Button,{variant:"secondary",ref:n},t)}function sy({message:e,error:t}){const n=[(0,l.createElement)(ry,{key:"copy-error",text:t.stack},(0,b.__)("Copy Error"))];return(0,l.createElement)(we.Warning,{className:"editor-error-boundary",actions:n},e)}class iy extends f.Component{constructor(){super(...arguments),this.state={error:null}}componentDidCatch(e){(0,be.doAction)("editor.ErrorBoundary.errorLogged",e)}static getDerivedStateFromError(e){return{error:e}}render(){return this.state.error?(0,l.createElement)(sy,{message:(0,b.__)("The editor has encountered an unexpected error."),error:this.state.error}):this.props.children}}function oy({path:e,categoryType:t,categoryId:n},a){return["/wp_template/all","/wp_template_part/all"].includes(e)||"/page"===e&&window?.__experimentalAdminViews||"/patterns"===e&&(!a||!!t&&!!n)}var ly=(0,l.createElement)(E.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(E.Path,{d:"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"})),cy=(0,l.createElement)(E.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(E.Path,{d:"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"})),uy=(0,l.createElement)(E.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(E.Path,{d:"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"}));const dy=[{keyCombination:{modifier:"primary",character:"b"},description:(0,b.__)("Make the selected text bold.")},{keyCombination:{modifier:"primary",character:"i"},description:(0,b.__)("Make the selected text italic.")},{keyCombination:{modifier:"primary",character:"k"},description:(0,b.__)("Convert the selected text into a link.")},{keyCombination:{modifier:"primaryShift",character:"k"},description:(0,b.__)("Remove a link.")},{keyCombination:{character:"[["},description:(0,b.__)("Insert a link to a post or page.")},{keyCombination:{modifier:"primary",character:"u"},description:(0,b.__)("Underline the selected text.")},{keyCombination:{modifier:"access",character:"d"},description:(0,b.__)("Strikethrough the selected text.")},{keyCombination:{modifier:"access",character:"x"},description:(0,b.__)("Make the selected text inline code.")},{keyCombination:{modifier:"access",character:"0"},description:(0,b.__)("Convert the current heading to a paragraph.")},{keyCombination:{modifier:"access",character:"1-6"},description:(0,b.__)("Convert the current paragraph or heading to a heading of level 1 to 6.")}];function my({keyCombination:e,forceAriaLabel:t}){const n=e.modifier?Sa.displayShortcutList[e.modifier](e.character):e.character,a=e.modifier?Sa.shortcutAriaLabel[e.modifier](e.character):e.character;return(0,l.createElement)("kbd",{className:"edit-site-keyboard-shortcut-help-modal__shortcut-key-combination","aria-label":t||a},(Array.isArray(n)?n:[n]).map(((e,t)=>"+"===e?(0,l.createElement)(f.Fragment,{key:t},e):(0,l.createElement)("kbd",{key:t,className:"edit-site-keyboard-shortcut-help-modal__shortcut-key"},e))))}function py({description:e,keyCombination:t,aliases:n=[],ariaLabel:a}){return(0,l.createElement)(f.Fragment,null,(0,l.createElement)("div",{className:"edit-site-keyboard-shortcut-help-modal__shortcut-description"},e),(0,l.createElement)("div",{className:"edit-site-keyboard-shortcut-help-modal__shortcut-term"},(0,l.createElement)(my,{keyCombination:t,forceAriaLabel:a}),n.map(((e,t)=>(0,l.createElement)(my,{keyCombination:e,forceAriaLabel:a,key:t})))))}function hy({name:e}){const{keyCombination:t,description:n,aliases:a}=(0,d.useSelect)((t=>{const{getShortcutKeyCombination:n,getShortcutDescription:a,getShortcutAliases:r}=t(oa.store);return{keyCombination:n(e),aliases:r(e),description:a(e)}}),[e]);return t?(0,l.createElement)(py,{keyCombination:t,description:n,aliases:a}):null}const fy="edit-site/keyboard-shortcut-help",gy=({shortcuts:e})=>(0,l.createElement)("ul",{className:"edit-site-keyboard-shortcut-help-modal__shortcut-list",role:"list"},e.map(((e,t)=>(0,l.createElement)("li",{className:"edit-site-keyboard-shortcut-help-modal__shortcut",key:t},"string"==typeof e?(0,l.createElement)(hy,{name:e}):(0,l.createElement)(py,{...e}))))),yy=({title:e,shortcuts:t,className:n})=>(0,l.createElement)("section",{className:v()("edit-site-keyboard-shortcut-help-modal__section",n)},!!e&&(0,l.createElement)("h2",{className:"edit-site-keyboard-shortcut-help-modal__section-title"},e),(0,l.createElement)(gy,{shortcuts:t})),vy=({title:e,categoryName:t,additionalShortcuts:n=[]})=>{const a=(0,d.useSelect)((e=>e(oa.store).getCategoryShortcuts(t)),[t]);return(0,l.createElement)(yy,{title:e,shortcuts:a.concat(n)})};function _y(){const e=(0,d.useSelect)((e=>e(W).isModalActive(fy))),{closeModal:t,openModal:n}=(0,d.useDispatch)(W),a=()=>e?t():n(fy);return(0,oa.useShortcut)("core/edit-site/keyboard-shortcuts",a),e?(0,l.createElement)(_.Modal,{className:"edit-site-keyboard-shortcut-help-modal",title:(0,b.__)("Keyboard shortcuts"),onRequestClose:a},(0,l.createElement)(yy,{className:"edit-site-keyboard-shortcut-help-modal__main-shortcuts",shortcuts:["core/edit-site/keyboard-shortcuts"]}),(0,l.createElement)(vy,{title:(0,b.__)("Global shortcuts"),categoryName:"global"}),(0,l.createElement)(vy,{title:(0,b.__)("Selection shortcuts"),categoryName:"selection"}),(0,l.createElement)(vy,{title:(0,b.__)("Block shortcuts"),categoryName:"block",additionalShortcuts:[{keyCombination:{character:"/"},description:(0,b.__)("Change the block type after adding a new paragraph."),
/* translators: The forward-slash character. e.g. '/'. */
ariaLabel:(0,b.__)("Forward-slash")}]}),(0,l.createElement)(yy,{title:(0,b.__)("Text formatting"),shortcuts:dy})):null}function by(e){const{scope:t="core/edit-site",featureName:n,onToggle:a=(()=>{}),...r}=e,s=(0,d.useSelect)((e=>!!e(k.store).get(t,n)),[t,n]),{toggle:i}=(0,d.useDispatch)(k.store);return(0,l.createElement)(ve,{onChange:()=>{a(),i(t,n)},isChecked:s,...r})}var Ey=(0,se.compose)((0,d.withSelect)(((e,{panelName:t})=>{const{isEditorPanelEnabled:n,isEditorPanelRemoved:a}=e(g.store);return{isRemoved:a(t),isChecked:n(t)}})),(0,se.ifCondition)((({isRemoved:e})=>!e)),(0,d.withDispatch)(((e,{panelName:t})=>({onChange:()=>e(g.store).toggleEditorPanelEnabled(t)}))))(ve);const wy="edit-site/preferences";function xy(){const e=(0,d.useSelect)((e=>e(W).isModalActive(wy))),{closeModal:t,openModal:n}=(0,d.useDispatch)(W),a=(0,d.useRegistry)(),{closeGeneralSidebar:r}=(0,d.useDispatch)(ia),{setIsListViewOpened:s,setIsInserterOpened:i}=(0,d.useDispatch)(g.store),{set:o}=(0,d.useDispatch)(k.store),c=[{name:"general",tabLabel:(0,b.__)("General"),content:(0,l.createElement)(l.Fragment,null,(0,l.createElement)(ye,{title:(0,b.__)("Interface")},(0,l.createElement)(by,{scope:"core",featureName:"showListViewByDefault",help:(0,b.__)("Opens the block list view sidebar by default."),label:(0,b.__)("Always open list view")}),(0,l.createElement)(by,{scope:"core",featureName:"showBlockBreadcrumbs",help:(0,b.__)("Shows block breadcrumbs at the bottom of the editor."),label:(0,b.__)("Display block breadcrumbs")}),(0,l.createElement)(by,{scope:"core",featureName:"allowRightClickOverrides",help:(0,b.__)("Allows contextual list view menus via right-click, overriding browser defaults."),label:(0,b.__)("Allow right-click contextual menus")})),(0,l.createElement)(ye,{title:(0,b.__)("Document settings"),description:(0,b.__)("Select what settings are shown in the document panel.")},(0,l.createElement)(g.PostTaxonomies,{taxonomyWrapper:(e,t)=>(0,l.createElement)(Ey,{label:t.labels.menu_name,panelName:`taxonomy-panel-${t.slug}`})}),(0,l.createElement)(g.PostFeaturedImageCheck,null,(0,l.createElement)(Ey,{label:(0,b.__)("Featured image"),panelName:"featured-image"})),(0,l.createElement)(g.PostExcerptCheck,null,(0,l.createElement)(Ey,{label:(0,b.__)("Excerpt"),panelName:"post-excerpt"})),(0,l.createElement)(g.PostTypeSupportCheck,{supportKeys:["comments","trackbacks"]},(0,l.createElement)(Ey,{label:(0,b.__)("Discussion"),panelName:"discussion-panel"})),(0,l.createElement)(g.PageAttributesCheck,null,(0,l.createElement)(Ey,{label:(0,b.__)("Page attributes"),panelName:"page-attributes"}))))},{name:"appearance",tabLabel:(0,b.__)("Appearance"),content:(0,l.createElement)(ye,{title:(0,b.__)("Appearance"),description:(0,b.__)("Customize the editor interface to suit your needs.")},(0,l.createElement)(by,{scope:"core",featureName:"fixedToolbar",onToggle:()=>{o("core","distractionFree",!1)},help:(0,b.__)("Access all block and document tools in a single place."),label:(0,b.__)("Top toolbar")}),(0,l.createElement)(by,{scope:"core",featureName:"distractionFree",onToggle:()=>{a.batch((()=>{o("core","fixedToolbar",!0),i(!1),s(!1),r()}))},help:(0,b.__)("Reduce visual distractions by hiding the toolbar and other elements to focus on writing."),label:(0,b.__)("Distraction free")}),(0,l.createElement)(by,{scope:"core",featureName:"focusMode",help:(0,b.__)("Highlights the current block and fades other content."),label:(0,b.__)("Spotlight mode")}))},{name:"accessibility",tabLabel:(0,b.__)("Accessibility"),content:(0,l.createElement)(l.Fragment,null,(0,l.createElement)(ye,{title:(0,b.__)("Navigation"),description:(0,b.__)("Optimize the editing experience for enhanced control.")},(0,l.createElement)(by,{scope:"core",featureName:"keepCaretInsideBlock",help:(0,b.__)("Keeps the text cursor within the block boundaries, aiding users with screen readers by preventing unintentional cursor movement outside the block."),label:(0,b.__)("Contain text cursor inside block")})),(0,l.createElement)(ye,{title:(0,b.__)("Interface")},(0,l.createElement)(by,{scope:"core",featureName:"showIconLabels",label:(0,b.__)("Show button text labels"),help:(0,b.__)("Show text instead of icons on buttons across the interface.")})))},{name:"blocks",tabLabel:(0,b.__)("Blocks"),content:(0,l.createElement)(l.Fragment,null,(0,l.createElement)(ye,{title:(0,b.__)("Inserter")},(0,l.createElement)(by,{scope:"core",featureName:"mostUsedBlocks",help:(0,b.__)("Adds a category with the most frequently used blocks in the inserter."),label:(0,b.__)("Show most used blocks")})))}];return e?(0,l.createElement)(de,{closeModal:()=>e?t():n(wy)},(0,l.createElement)(ge,{sections:c})):null}const{Fill:Sy,Slot:Cy}=(0,_.createSlotFill)("EditSiteToolsMoreMenuGroup");Sy.Slot=({fillProps:e})=>(0,l.createElement)(Cy,{fillProps:e},(e=>e&&e.length>0));var ky=Sy,Ty=(0,l.createElement)(E.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(E.Path,{d:"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"})),Py=window.wp.blob;function Ny(){const{createErrorNotice:e}=(0,d.useDispatch)(xe.store);return(0,l.createElement)(_.MenuItem,{role:"menuitem",icon:Ty,onClick:async function(){try{const e=await tn()({path:"/wp-block-editor/v1/export",parse:!1,headers:{Accept:"application/zip"}}),t=await e.blob(),n=e.headers.get("content-disposition").match(/=(.+)\.zip/),a=n[1]?n[1]:"edit-site-export";(0,Py.downloadBlob)(a+".zip",t,"application/zip")}catch(t){let n={};try{n=await t.json()}catch(e){}const a=n.message&&"unknown_error"!==n.code?n.message:(0,b.__)("An error occurred while creating the site export.");e(a,{type:"snackbar"})}},info:(0,b.__)("Download your theme with updated templates and styles.")},(0,b._x)("Export","site exporter menu item"))}function Iy(){const{toggle:e}=(0,d.useDispatch)(k.store);return(0,l.createElement)(_.MenuItem,{onClick:()=>e("core/edit-site","welcomeGuide")},(0,b.__)("Welcome Guide"))}function My(){const{createNotice:e}=(0,d.useDispatch)(xe.store),{getEditedPostId:t,getEditedPostType:n}=(0,d.useSelect)(ia),{getEditedEntityRecord:a}=(0,d.useSelect)(Se.store),r=(0,se.useCopyToClipboard)((function(){const e=a("postType",n(),t());return e?"function"==typeof e.content?e.content(e):e.blocks?(0,c.__unstableSerializeAndClean)(e.blocks):e.content?e.content:void 0:""}),(function(){e("info",(0,b.__)("All content copied."),{isDismissible:!0,type:"snackbar"})}));return(0,l.createElement)(_.MenuItem,{ref:r},(0,b.__)("Copy all blocks"))}const Ay=[{value:"visual",label:(0,b.__)("Visual editor")},{value:"text",label:(0,b.__)("Code editor")}];var Oy=function(){const{shortcut:e,mode:t}=(0,d.useSelect)((e=>({shortcut:e(oa.store).getShortcutRepresentation("core/edit-site/toggle-mode"),mode:e(ia).getEditorMode()})),[]),{switchEditorMode:n}=(0,d.useDispatch)(ia),a=Ay.map((n=>n.value!==t?{...n,shortcut:e}:n));return(0,l.createElement)(_.MenuGroup,{label:(0,b.__)("Editor")},(0,l.createElement)(_.MenuItemsChoice,{choices:a,value:t,onSelect:n}))};function Ry({showIconLabels:e}){const t=(0,d.useRegistry)(),{closeGeneralSidebar:n}=(0,d.useDispatch)(ia),{setIsInserterOpened:a,setIsListViewOpened:r}=(0,d.useDispatch)(g.store),{openModal:s}=(0,d.useDispatch)(W),{set:i}=(0,d.useDispatch)(k.store),o=()=>{t.batch((()=>{i("core","fixedToolbar",!0),a(!1),r(!1),n()}))},c=()=>{i("core","distractionFree",!1)};return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(ue,{toggleProps:{showTooltip:!e,...e&&{variant:"tertiary"}}},(({onClose:e})=>(0,l.createElement)(l.Fragment,null,(0,l.createElement)(_.MenuGroup,{label:(0,b._x)("View","noun")},(0,l.createElement)(k.PreferenceToggleMenuItem,{scope:"core",name:"fixedToolbar",onToggle:c,label:(0,b.__)("Top toolbar"),info:(0,b.__)("Access all block and document tools in a single place"),messageActivated:(0,b.__)("Top toolbar activated"),messageDeactivated:(0,b.__)("Top toolbar deactivated")}),(0,l.createElement)(k.PreferenceToggleMenuItem,{scope:"core",name:"distractionFree",onToggle:o,label:(0,b.__)("Distraction free"),info:(0,b.__)("Write with calmness"),messageActivated:(0,b.__)("Distraction free mode activated"),messageDeactivated:(0,b.__)("Distraction free mode deactivated"),shortcut:Sa.displayShortcut.primaryShift("\\")}),(0,l.createElement)(k.PreferenceToggleMenuItem,{scope:"core",name:"focusMode",label:(0,b.__)("Spotlight mode"),info:(0,b.__)("Focus on one block at a time"),messageActivated:(0,b.__)("Spotlight mode activated"),messageDeactivated:(0,b.__)("Spotlight mode deactivated")})),(0,l.createElement)(Oy,null),(0,l.createElement)(J.Slot,{name:"core/edit-site/plugin-more-menu",label:(0,b.__)("Plugins"),as:_.MenuGroup,fillProps:{onClick:e}}),(0,l.createElement)(_.MenuGroup,{label:(0,b.__)("Tools")},(0,l.createElement)(Ny,null),(0,l.createElement)(_.MenuItem,{onClick:()=>s(fy),shortcut:Sa.displayShortcut.access("h")},(0,b.__)("Keyboard shortcuts")),(0,l.createElement)(Iy,null),(0,l.createElement)(My,null),(0,l.createElement)(_.MenuItem,{icon:uy,role:"menuitem",href:(0,b.__)("https://wordpress.org/documentation/article/site-editor/"),target:"_blank",rel:"noopener noreferrer"},(0,b.__)("Help"),(0,l.createElement)(_.VisuallyHidden,{as:"span"},/* translators: accessibility text */
(0,b.__)("(opens in a new tab)"))),(0,l.createElement)(ky.Slot,{fillProps:{onClose:e}})),(0,l.createElement)(_.MenuGroup,null,(0,l.createElement)(_.MenuItem,{onClick:()=>s(wy)},(0,b.__)("Preferences")))))),(0,l.createElement)(_y,null),(0,l.createElement)(xy,null))}var Dy=(0,l.createElement)(E.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(E.Path,{d:"m12 20-4.5-3.6-.9 1.2L12 22l5.5-4.4-.9-1.2L12 20zm0-16 4.5 3.6.9-1.2L12 2 6.5 6.4l.9 1.2L12 4z"}));const{DocumentTools:Fy}=nt(g.privateApis);function By({blockEditorMode:e,hasFixedToolbar:t,isDistractionFree:n}){const{isVisualMode:a}=(0,d.useSelect)((e=>{const{getEditorMode:t}=e(ia);return{isVisualMode:"visual"===t()}}),[]),{__unstableSetEditorMode:r}=(0,d.useDispatch)(we.store),{setDeviceType:s}=(0,d.useDispatch)(g.store),i=(0,se.useViewportMatch)("medium"),o=window?.__experimentalEnableZoomedOutView&&a,c="zoom-out"===e;return(0,l.createElement)(Fy,{disableBlockTools:!a,listViewLabel:(0,b.__)("List View")},o&&i&&!n&&!t&&(0,l.createElement)(_.ToolbarItem,{as:_.Button,className:"edit-site-header-edit-mode__zoom-out-view-toggle",icon:Dy,isPressed:c
/* translators: button label text should, if possible, be under 16 characters. */,label:(0,b.__)("Zoom-out View"),onClick:()=>{s("Desktop"),r(c?"edit":"zoom-out")},size:"compact"}))}const{PostViewLink:Ly,PreviewDropdown:Vy}=nt(g.privateApis);function zy(){const{templateType:e,isDistractionFree:t,blockEditorMode:n,blockSelectionStart:a,showIconLabels:r,editorCanvasView:s,hasFixedToolbar:i,isZoomOutMode:o}=(0,d.useSelect)((e=>{const{getEditedPostType:t}=e(ia),{getBlockSelectionStart:n,__unstableGetEditorMode:a}=e(we.store),{get:r}=e(k.store),{getDeviceType:s}=e(g.store);return{deviceType:s(),templateType:t(),blockEditorMode:a(),blockSelectionStart:n(),showIconLabels:r("core","showIconLabels"),editorCanvasView:nt(e(ia)).getEditorCanvasContainerView(),hasFixedToolbar:r("core","fixedToolbar"),isDistractionFree:r("core","distractionFree"),isZoomOutMode:"zoom-out"===a()}}),[]),c=(0,se.useViewportMatch)("medium"),u=!o&&i&&c,m=(0,f.useRef)(),p=(0,se.useReducedMotion)(),h=!function(){const e=(0,_.__experimentalUseSlotFills)(Ka);return!!e?.length}(),y=Vt.includes(e),E="zoom-out"===n,[w,x]=(0,f.useState)(!0),S=!!a;(0,f.useEffect)((()=>{a&&x(!1)}),[a]);const C={isDistractionFree:{y:"-50px"},isDistractionFreeHovering:{y:0},view:{y:0},edit:{y:0}},T={type:"tween",duration:p?0:.2,ease:"easeOut"};return(0,l.createElement)("div",{className:v()("edit-site-header-edit-mode",{"show-icon-labels":r})},h&&(0,l.createElement)(_.__unstableMotion.div,{className:"edit-site-header-edit-mode__start",variants:C,transition:T},(0,l.createElement)(By,{blockEditorMode:n,isDistractionFree:t}),u&&(0,l.createElement)(l.Fragment,null,(0,l.createElement)("div",{className:v()("selected-block-tools-wrapper",{"is-collapsed":w})},(0,l.createElement)(we.BlockToolbar,{hideDragHandle:!0})),(0,l.createElement)(_.Popover.Slot,{ref:m,name:"block-toolbar"}),S&&(0,l.createElement)(_.Button,{className:"edit-site-header-edit-mode__block-tools-toggle",icon:w?ly:cy,onClick:()=>{x((e=>!e))},label:w?(0,b.__)("Show block tools"):(0,b.__)("Hide block tools")}))),!t&&(0,l.createElement)("div",{className:v()("edit-site-header-edit-mode__center",{"is-collapsed":!w&&c})},h?(0,l.createElement)(g.DocumentBar,null):qa(s)),(0,l.createElement)("div",{className:"edit-site-header-edit-mode__end"},(0,l.createElement)(_.__unstableMotion.div,{className:"edit-site-header-edit-mode__actions",variants:C,transition:T},c&&(0,l.createElement)("div",{className:v()("edit-site-header-edit-mode__preview-options",{"is-zoomed-out":E})},(0,l.createElement)(Vy,{disabled:y||!h})),(0,l.createElement)(Ly,null),(0,l.createElement)(Po,null),!t&&(0,l.createElement)(te.Slot,{scope:"core/edit-site"}),(0,l.createElement)(Ry,{showIconLabels:r}))))}var Gy=(0,l.createElement)(E.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},(0,l.createElement)(E.Path,{d:"M20 10c0-5.51-4.49-10-10-10C4.48 0 0 4.49 0 10c0 5.52 4.48 10 10 10 5.51 0 10-4.48 10-10zM7.78 15.37L4.37 6.22c.55-.02 1.17-.08 1.17-.08.5-.06.44-1.13-.06-1.11 0 0-1.45.11-2.37.11-.18 0-.37 0-.58-.01C4.12 2.69 6.87 1.11 10 1.11c2.33 0 4.45.87 6.05 2.34-.68-.11-1.65.39-1.65 1.58 0 .74.45 1.36.9 2.1.35.61.55 1.36.55 2.46 0 1.49-1.4 5-1.4 5l-3.03-8.37c.54-.02.82-.17.82-.17.5-.05.44-1.25-.06-1.22 0 0-1.44.12-2.38.12-.87 0-2.33-.12-2.33-.12-.5-.03-.56 1.2-.06 1.22l.92.08 1.26 3.41zM17.41 10c.24-.64.74-1.87.43-4.25.7 1.29 1.05 2.71 1.05 4.25 0 3.29-1.73 6.24-4.4 7.78.97-2.59 1.94-5.2 2.92-7.78zM6.1 18.09C3.12 16.65 1.11 13.53 1.11 10c0-1.3.23-2.48.72-3.59C3.25 10.3 4.67 14.2 6.1 18.09zm4.03-6.63l2.58 6.98c-.86.29-1.76.45-2.71.45-.79 0-1.57-.11-2.29-.33.81-2.38 1.62-4.74 2.42-7.1z"})),Hy=function({className:e}){const{isRequestingSite:t,siteIconUrl:n}=(0,d.useSelect)((e=>{const{getEntityRecord:t}=e(Se.store),n=t("root","__unstableBase",void 0);return{isRequestingSite:!n,siteIconUrl:n?.site_icon_url}}),[]);if(t&&!n)return(0,l.createElement)("div",{className:"edit-site-site-icon__image"});const a=n?(0,l.createElement)("img",{className:"edit-site-site-icon__image",alt:(0,b.__)("Site Icon"),src:n}):(0,l.createElement)(_.Icon,{className:"edit-site-site-icon__icon",size:"48px",icon:Gy});return(0,l.createElement)("div",{className:v()(e,"edit-site-site-icon")},a)};const Uy=(0,f.memo)((({isTransparent:e,className:t})=>{const{canvasMode:n,dashboardLink:a,homeUrl:r,siteTitle:s}=(0,d.useSelect)((e=>{const{getCanvasMode:t,getSettings:n}=nt(e(ia)),{getSite:a,getUnstableBase:r}=e(Se.store);return{canvasMode:t(),dashboardLink:n().__experimentalDashboardLink||"index.php",homeUrl:r()?.home,siteTitle:a()?.title}}),[]),{open:i}=(0,d.useDispatch)(la.store),o=(0,se.useReducedMotion)(),{setCanvasMode:c}=nt((0,d.useDispatch)(ia)),{clearSelectedBlock:u}=(0,d.useDispatch)(we.store),{setDeviceType:m}=(0,d.useDispatch)(g.store),p="view"===n?{href:a,label:(0,b.__)("Go to the Dashboard")}:{href:a,role:"button",label:(0,b.__)("Open Navigation"),onClick:e=>{e.preventDefault(),"edit"===n&&(u(),m("Desktop"),c("view"))}};return(0,l.createElement)(_.__unstableMotion.div,{className:v()("edit-site-site-hub",t),variants:{isDistractionFree:{x:"-100%"},isDistractionFreeHovering:{x:0},view:{x:0},edit:{x:0}},initial:!1,transition:{type:"tween",duration:o?0:.3,ease:"easeOut"}},(0,l.createElement)(_.__experimentalHStack,{justify:"space-between",alignment:"center",className:"edit-site-site-hub__container"},(0,l.createElement)(_.__experimentalHStack,{justify:"flex-start",className:"edit-site-site-hub__text-content",spacing:"0"},(0,l.createElement)(_.__unstableMotion.div,{className:v()("edit-site-site-hub__view-mode-toggle-container",{"has-transparent-background":e}),layout:!0,transition:{type:"tween",duration:o?0:.3,ease:"easeOut"}},(0,l.createElement)(_.Button,{...p,className:"edit-site-layout__view-mode-toggle"},(0,l.createElement)(_.__unstableMotion.div,{initial:!1,animate:{scale:"view"===n?.5:1},whileHover:{scale:"view"===n?.5:.96},transition:{type:"tween",duration:o?0:.3,ease:"easeOut"}},(0,l.createElement)(Hy,{className:"edit-site-layout__view-mode-toggle-icon"})))),(0,l.createElement)(_.__unstableAnimatePresence,null,(0,l.createElement)(_.__unstableMotion.div,{layout:"edit"===n,animate:{opacity:"view"===n?1:0},exit:{opacity:0},className:v()("edit-site-site-hub__site-title",{"is-transparent":e}),transition:{type:"tween",duration:o?0:.2,ease:"easeOut",delay:"view"===n?.1:0}},(0,an.decodeEntities)(s))),"view"===n&&(0,l.createElement)(_.Button,{href:r,target:"_blank",label:(0,b.__)("View site (opens in a new tab)"),"aria-label":(0,b.__)("View site (opens in a new tab)"),icon:uy,className:"edit-site-site-hub__site-view-link"})),"view"===n&&(0,l.createElement)(_.Button,{className:v()("edit-site-site-hub_toggle-command-center",{"is-transparent":e}),icon:Br,onClick:()=>i(),label:(0,b.__)("Open command palette"),shortcut:Sa.displayShortcut.primary("k")})))}));var Wy=Uy;const jy={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},Zy=320,qy={width:"100%",height:"100%"};function Yy(e,t){const n=((e,t,n)=>e+(.46153846153846156-e)*n)(t,0,1-Math.max(0,Math.min(1,(e-Zy)/980)));return e/n}var Ky=function e({isFullWidth:t,isOversized:n,setIsOversized:a,isReady:r,children:s,defaultSize:i,innerContentStyle:o}){const[c,u]=(0,f.useState)(qy),[m,p]=(0,f.useState)(),[h,g]=(0,f.useState)(!1),[y,E]=(0,f.useState)(!1),[w,x]=(0,f.useState)(1),S=(0,d.useSelect)((e=>nt(e(ia)).getCanvasMode()),[]),{setCanvasMode:C}=nt((0,d.useDispatch)(ia)),k={type:"tween",duration:h?0:.5},T=(0,f.useRef)(null),P=(0,se.useInstanceId)(e,"edit-site-resizable-frame-handle-help"),N=i.width/i.height,I={default:{flexGrow:0,height:c.height},fullWidth:{flexGrow:1,height:c.height}},M=h?"active":y?"visible":"hidden";return(0,l.createElement)(_.ResizableBox,{as:_.__unstableMotion.div,ref:T,initial:!1,variants:I,animate:t?"fullWidth":"default",onAnimationComplete:e=>{"fullWidth"===e&&u({width:"100%",height:"100%"})},transition:k,size:c,enable:{top:!1,right:!1,bottom:!1,left:r,topRight:!1,bottomRight:!1,bottomLeft:!1,topLeft:!1},resizeRatio:w,handleClasses:void 0,handleStyles:{left:jy,right:jy},minWidth:Zy,maxWidth:t?"100%":"150%",maxHeight:"100%",onFocus:()=>E(!0),onBlur:()=>E(!1),onMouseOver:()=>E(!0),onMouseOut:()=>E(!1),handleComponent:{left:"view"===S&&(0,l.createElement)(l.Fragment,null,(0,l.createElement)(_.Tooltip,{text:(0,b.__)("Drag to resize")},(0,l.createElement)(_.__unstableMotion.button,{key:"handle",role:"separator","aria-orientation":"vertical",className:v()("edit-site-resizable-frame__handle",{"is-resizing":h}),variants:{hidden:{opacity:0,left:0},visible:{opacity:1,left:-16},active:{opacity:1,left:-16,scaleY:1.3}},animate:M,"aria-label":(0,b.__)("Drag to resize"),"aria-describedby":P,"aria-valuenow":T.current?.resizable?.offsetWidth||void 0,"aria-valuemin":Zy,"aria-valuemax":i.width,onKeyDown:e=>{if(!["ArrowLeft","ArrowRight"].includes(e.key))return;e.preventDefault();const t=20*(e.shiftKey?5:1)*("ArrowLeft"===e.key?1:-1),n=Math.min(Math.max(Zy,T.current.resizable.offsetWidth+t),i.width);u({width:n,height:Yy(n,N)})},initial:"hidden",exit:"hidden",whileFocus:"active",whileHover:"active"})),(0,l.createElement)("div",{hidden:!0,id:P},(0,b.__)("Use left and right arrow keys to resize the canvas. Hold shift to resize in larger increments.")))},onResizeStart:(e,t,n)=>{p(n.offsetWidth),g(!0)},onResize:(e,t,r,s)=>{const o=s.width/w,l=Math.abs(o),c=s.width<0?l:(i.width-m)/2,d=Math.min(l,c),p=0===l?0:d/l;x(1-p+2*p);const h=m+s.width;a(h>i.width),u({height:n?"100%":Yy(h,N)})},onResizeStop:(e,t,r)=>{g(!1),n&&(a(!1),r.ownerDocument.documentElement.offsetWidth-r.offsetWidth>200?u(qy):C("edit"))},className:v()("edit-site-resizable-frame__inner",{"is-resizing":h})},(0,l.createElement)(_.__unstableMotion.div,{className:"edit-site-resizable-frame__inner-content",animate:{borderRadius:t?0:8},transition:k,style:o},s))};const{useLocation:Xy,useHistory:Jy}=nt(bt.privateApis),{useHistory:Qy,useLocation:$y}=nt(bt.privateApis),{EntitiesSavedStatesExtensible:ev}=nt(g.privateApis),tv=({onClose:e})=>{const t=(0,g.useEntitiesSavedStatesIsDirty)();let n;n=t.isDirty?(0,b.__)("Activate & Save"):(0,b.__)("Activate");const a=(0,d.useSelect)((e=>{const t=e(Se.store).getTheme(xt());return t?.name?.rendered}),[]),r=(0,l.createElement)("p",null,(0,b.sprintf)("Saving your changes will change your active theme to %s.",a)),s=function(){const e=Qy(),t=$y(),{startResolution:n,finishResolution:a}=(0,d.useDispatch)(Se.store);return async()=>{if(wt()){const r="themes.php?action=activate&stylesheet="+xt()+"&_wpnonce="+window.WP_BLOCK_THEME_ACTIVATE_NONCE;n("activateTheme"),await window.fetch(r),a("activateTheme");const{wp_theme_preview:s,...i}=t.params;e.replace(i)}}}();return(0,l.createElement)(ev,{...t,additionalPrompt:r,close:e,onSave:async e=>(await s(),e),saveEnabled:!0,saveLabel:n})},nv=({onClose:e})=>wt()?(0,l.createElement)(tv,{onClose:e}):(0,l.createElement)(g.EntitiesSavedStates,{close:e});function av(){const{isSaveViewOpen:e,canvasMode:t}=(0,d.useSelect)((e=>{const{isSaveViewOpened:t,getCanvasMode:n}=nt(e(ia));return{isSaveViewOpen:t(),canvasMode:n()}}),[]),{setIsSaveViewOpened:n}=(0,d.useDispatch)(ia),a=()=>n(!1);return"view"===t?e?(0,l.createElement)(_.Modal,{className:"edit-site-save-panel__modal",onRequestClose:a,__experimentalHideHeader:!0,contentLabel:(0,b.__)("Save site, content, and template changes")},(0,l.createElement)(nv,{onClose:a})):null:(0,l.createElement)(ie,{className:v()("edit-site-layout__actions",{"is-entity-save-view-open":e}),ariaLabel:(0,b.__)("Save panel")},e?(0,l.createElement)(nv,{onClose:a}):(0,l.createElement)("div",{className:"edit-site-editor__toggle-save-panel"},(0,l.createElement)(_.Button,{variant:"secondary",className:"edit-site-editor__toggle-save-panel-button",onClick:()=>n(!0),"aria-expanded":!1},(0,b.__)("Open save panel"))))}var rv=function(){const{registerShortcut:e}=(0,d.useDispatch)(oa.store);return(0,f.useEffect)((()=>{e({name:"core/edit-site/save",category:"global",description:(0,b.__)("Save your changes."),keyCombination:{modifier:"primary",character:"s"}}),e({name:"core/edit-site/toggle-block-settings-sidebar",category:"global",description:(0,b.__)("Show or hide the Settings sidebar."),keyCombination:{modifier:"primaryShift",character:","}}),e({name:"core/edit-site/keyboard-shortcuts",category:"main",description:(0,b.__)("Display these keyboard shortcuts."),keyCombination:{modifier:"access",character:"h"}}),e({name:"core/edit-site/next-region",category:"global",description:(0,b.__)("Navigate to the next part of the editor."),keyCombination:{modifier:"ctrl",character:"`"},aliases:[{modifier:"access",character:"n"}]}),e({name:"core/edit-site/previous-region",category:"global",description:(0,b.__)("Navigate to the previous part of the editor."),keyCombination:{modifier:"ctrlShift",character:"`"},aliases:[{modifier:"access",character:"p"},{modifier:"ctrlShift",character:"~"}]}),e({name:"core/edit-site/toggle-mode",category:"global",description:(0,b.__)("Switch between visual editor and code editor."),keyCombination:{modifier:"secondary",character:"m"}}),e({name:"core/edit-site/transform-heading-to-paragraph",category:"block-library",description:(0,b.__)("Transform heading to paragraph."),keyCombination:{modifier:"access",character:"0"}}),[1,2,3,4,5,6].forEach((t=>{e({name:`core/edit-site/transform-paragraph-to-heading-${t}`,category:"block-library",description:(0,b.__)("Transform paragraph to heading."),keyCombination:{modifier:"access",character:`${t}`}})})),e({name:"core/edit-site/toggle-distraction-free",category:"global",description:(0,b.__)("Toggle distraction free mode."),keyCombination:{modifier:"primaryShift",character:"\\"}})}),[e]),null},sv=function(){const{__experimentalGetDirtyEntityRecords:e,isSavingEntityRecord:t}=(0,d.useSelect)(Se.store),{setIsSaveViewOpened:n}=(0,d.useDispatch)(ia);return(0,oa.useShortcut)("core/edit-site/save",(a=>{a.preventDefault();const r=e(),s=!!r.length;!r.some((e=>t(e.kind,e.name,e.key)))&&s&&n(!0)})),null},iv=(0,l.createElement)(E.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(E.Path,{d:"M12 4.75a7.25 7.25 0 100 14.5 7.25 7.25 0 000-14.5zM3.25 12a8.75 8.75 0 1117.5 0 8.75 8.75 0 01-17.5 0zM12 8.75a1.5 1.5 0 01.167 2.99c-.465.052-.917.44-.917 1.01V14h1.5v-.845A3 3 0 109 10.25h1.5a1.5 1.5 0 011.5-1.5zM11.25 15v1.5h1.5V15h-1.5z"})),ov=(0,l.createElement)(E.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(E.Path,{d:"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"})),lv=(0,l.createElement)(E.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(E.Path,{d:"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"})),cv=(0,l.createElement)(E.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(E.Path,{d:"M4 20h8v-1.5H4V20zM18.9 3.5c-.6-.6-1.5-.6-2.1 0l-7.2 7.2c-.4-.1-.7 0-1.1.1-.5.2-1.5.7-1.9 2.2-.4 1.7-.8 2.2-1.1 2.7-.1.1-.2.3-.3.4l-.6 1.1H6c2 0 3.4-.4 4.7-1.4.8-.6 1.2-1.4 1.3-2.3 0-.3 0-.5-.1-.7L19 5.7c.5-.6.5-1.6-.1-2.2zM9.7 14.7c-.7.5-1.5.8-2.4 1 .2-.5.5-1.2.8-2.3.2-.6.4-1 .8-1.1.5-.1 1 .1 1.3.3.2.2.3.5.2.8 0 .3-.1.9-.7 1.3z"}));const{useGlobalStylesReset:uv}=nt(we.privateApis),{useHistory:dv,useLocation:mv}=nt(bt.privateApis);function pv(){const{openGeneralSidebar:e,setCanvasMode:t}=nt((0,d.useDispatch)(ia)),{params:n}=mv(),a=!oy(n,(0,se.useViewportMatch)("medium","<")),{getCanvasMode:r}=nt((0,d.useSelect)(ia)),s=dv(),i=(0,d.useSelect)((e=>e(Se.store).getCurrentTheme().is_block_theme),[]);return{isLoading:!1,commands:(0,f.useMemo)((()=>i?[{name:"core/edit-site/open-styles",label:(0,b.__)("Open styles"),callback:({close:n})=>{n(),a||s.push({path:"/wp_global_styles",canvas:"edit"}),a&&"edit"!==r()&&t("edit"),e("edit-site/global-styles")},icon:da}]:[]),[s,e,t,a,r,i])}}function hv(){const{openGeneralSidebar:e,setCanvasMode:t}=nt((0,d.useDispatch)(ia)),{params:n}=mv(),a=!oy(n,(0,se.useViewportMatch)("medium","<")),{getCanvasMode:r}=nt((0,d.useSelect)(ia)),{set:s}=(0,d.useDispatch)(k.store),i=dv(),o=(0,d.useSelect)((e=>e(Se.store).getCurrentTheme().is_block_theme),[]);return{isLoading:!1,commands:(0,f.useMemo)((()=>o?[{name:"core/edit-site/toggle-styles-welcome-guide",label:(0,b.__)("Learn about styles"),callback:({close:n})=>{n(),a||i.push({path:"/wp_global_styles",canvas:"edit"}),a&&"edit"!==r()&&t("edit"),e("edit-site/global-styles"),s("core/edit-site","welcomeGuideStyles",!0),setTimeout((()=>{s("core/edit-site","welcomeGuideStyles",!0)}),500)},icon:iv}]:[]),[i,e,t,a,r,o,s])}}function fv(){const[e,t]=uv();return{isLoading:!1,commands:(0,f.useMemo)((()=>e?[{name:"core/edit-site/reset-global-styles",label:(0,b.__)("Reset styles"),icon:(0,b.isRTL)()?ov:lv,callback:({close:e})=>{e(),t()}}]:[]),[e,t])}}function gv(){const{openGeneralSidebar:e,setEditorCanvasContainerView:t,setCanvasMode:n}=nt((0,d.useDispatch)(ia)),{params:a}=mv(),r=!oy(a,(0,se.useViewportMatch)("medium","<")),s=dv(),{canEditCSS:i}=(0,d.useSelect)((e=>{const{getEntityRecord:t,__experimentalGetCurrentGlobalStylesId:n}=e(Se.store),a=n(),r=a?t("root","globalStyles",a):void 0;return{canEditCSS:!!r?._links?.["wp:action-edit-css"]}}),[]),{getCanvasMode:o}=nt((0,d.useSelect)(ia));return{isLoading:!1,commands:(0,f.useMemo)((()=>i?[{name:"core/edit-site/open-styles-css",label:(0,b.__)("Customize CSS"),icon:cv,callback:({close:a})=>{a(),r||s.push({path:"/wp_global_styles",canvas:"edit"}),r&&"edit"!==o()&&n("edit"),e("edit-site/global-styles"),t("global-styles-css")}}]:[]),[s,e,t,i,r,o,n])}}function yv(){const{openGeneralSidebar:e,setEditorCanvasContainerView:t,setCanvasMode:n}=nt((0,d.useDispatch)(ia)),{getCanvasMode:a}=nt((0,d.useSelect)(ia)),{params:r}=mv(),s=!oy(r,(0,se.useViewportMatch)("medium","<")),i=dv(),o=(0,d.useSelect)((e=>{const{getEntityRecord:t,__experimentalGetCurrentGlobalStylesId:n}=e(Se.store),a=n(),r=a?t("root","globalStyles",a):void 0;return!!r?._links?.["version-history"]?.[0]?.count}),[]);return{isLoading:!1,commands:(0,f.useMemo)((()=>o?[{name:"core/edit-site/open-global-styles-revisions",label:(0,b.__)("Style revisions"),icon:br,callback:({close:r})=>{r(),s||i.push({path:"/wp_global_styles",canvas:"edit"}),s&&"edit"!==a()&&n("edit"),e("edit-site/global-styles"),t("global-styles-revisions")}}]:[]),[o,i,e,t,s,a,n])}}var vv=(0,l.createElement)(E.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,l.createElement)(E.Path,{d:"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"})),_v=(0,l.createElement)(E.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(E.Path,{d:"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"})),bv=(0,l.createElement)(E.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(E.Path,{d:"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"}),(0,l.createElement)(E.Path,{d:"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"})),Ev=(0,l.createElement)(E.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,l.createElement)(E.Path,{d:"M3 6h11v1.5H3V6Zm3.5 5.5h11V13h-11v-1.5ZM21 17H10v1.5h11V17Z"}));const{useHistory:wv}=nt(bt.privateApis);function xv(){const{record:e}=As(),{isPage:t,canvasMode:n,renderingMode:a}=(0,d.useSelect)((e=>{const{isPage:t,getCanvasMode:n}=nt(e(ia)),{getRenderingMode:a}=e(g.store);return{isPage:t(),canvasMode:n(),renderingMode:a()}}),[]),{setRenderingMode:r}=(0,d.useDispatch)(g.store);if(!t||"edit"!==n)return{isLoading:!1,commands:[]};const s=[];return"template-only"!==a?s.push({name:"core/switch-to-template-focus",
/* translators: %1$s: template title */
label:(0,b.sprintf)("Edit template: %s",(0,an.decodeEntities)(e.title)),icon:pa,callback:({close:e})=>{r("template-only"),e()}}):s.push({name:"core/switch-to-page-focus",label:(0,b.__)("Back to page"),icon:ma,callback:({close:e})=>{r("template-locked"),e()}}),{isLoading:!1,commands:s}}function Sv(){const{switchEditorMode:e}=(0,d.useDispatch)(ia),{canvasMode:t,editorMode:n}=(0,d.useSelect)((e=>({canvasMode:nt(e(ia)).getCanvasMode(),editorMode:e(ia).getEditorMode()})),[]);if("edit"!==t||"text"!==n)return{isLoading:!1,commands:[]};const a=[];return"text"===n&&a.push({name:"core/exit-code-editor",label:(0,b.__)("Exit code editor"),icon:vv,callback:({close:t})=>{e("visual"),t()}}),{isLoading:!1,commands:a}}function Cv(){const{isLoaded:e,record:t}=As(),{removeTemplate:n,revertTemplate:a}=(0,d.useDispatch)(ia),r=wv(),s=(0,d.useSelect)((e=>e(ia).isPage()&&"template-only"!==e(g.store).getRenderingMode()),[]);if(!e)return{isLoading:!0,commands:[]};const i=[];if(sn(t)&&!s){const e=t.type===It?/* translators: %1$s: template title */
(0,b.sprintf)("Reset template: %s",(0,an.decodeEntities)(t.title)):/* translators: %1$s: template part title */
(0,b.sprintf)("Reset template part: %s",(0,an.decodeEntities)(t.title));i.push({name:"core/reset-template",label:e,icon:(0,b.isRTL)()?ov:lv,callback:({close:e})=>{a(t),e()}})}if(Ls(t)&&!s){const e=t.type===It?/* translators: %1$s: template title */
(0,b.sprintf)("Delete template: %s",(0,an.decodeEntities)(t.title)):/* translators: %1$s: template part title */
(0,b.sprintf)("Delete template part: %s",(0,an.decodeEntities)(t.title)),a=t.type===It?"/wp_template":"/wp_template_part/all";i.push({name:"core/remove-template",label:e,icon:Fo,callback:({close:e})=>{n(t),r.push({path:a}),e()}})}return{isLoading:!e,commands:i}}function kv(){const{openGeneralSidebar:e,closeGeneralSidebar:t,toggleDistractionFree:n,setIsListViewOpened:a,switchEditorMode:r}=(0,d.useDispatch)(ia),{canvasMode:s,editorMode:i,activeSidebar:o,showBlockBreadcrumbs:l,isListViewOpen:c,isDistractionFree:u}=(0,d.useSelect)((e=>{const{get:t}=e(k.store),{getEditorMode:n}=e(ia),{isListViewOpened:a}=e(g.store);return{canvasMode:nt(e(ia)).getCanvasMode(),editorMode:n(),activeSidebar:e(W).getActiveComplementaryArea(ia.name),showBlockBreadcrumbs:t("core","showBlockBreadcrumbs"),isListViewOpen:a(),isDistractionFree:t("core","distractionFree")}}),[]),{openModal:m}=(0,d.useDispatch)(W),{toggle:p}=(0,d.useDispatch)(k.store),{createInfoNotice:h}=(0,d.useDispatch)(xe.store);if("edit"!==s)return{isLoading:!1,commands:[]};const f=[];return f.push({name:"core/open-settings-sidebar",label:(0,b.__)("Toggle settings sidebar"),icon:(0,b.isRTL)()?ac:rc,callback:({close:n})=>{n(),"edit-site/template"===o?t():e("edit-site/template")}}),f.push({name:"core/open-block-inspector",label:(0,b.__)("Toggle block inspector"),icon:_v,callback:({close:n})=>{n(),"edit-site/block-inspector"===o?t():e("edit-site/block-inspector")}}),f.push({name:"core/toggle-spotlight-mode",label:(0,b.__)("Toggle spotlight mode"),callback:({close:e})=>{p("core","focusMode"),e()}}),f.push({name:"core/toggle-distraction-free",label:(0,b.__)("Toggle distraction free"),callback:({close:e})=>{n(),e()}}),f.push({name:"core/toggle-top-toolbar",label:(0,b.__)("Toggle top toolbar"),callback:({close:e})=>{p("core","fixedToolbar"),u&&n(),e()}}),"visual"===i&&f.push({name:"core/toggle-code-editor",label:(0,b.__)("Open code editor"),icon:vv,callback:({close:e})=>{r("text"),e()}}),f.push({name:"core/open-preferences",label:(0,b.__)("Editor preferences"),callback:()=>{m(wy)}}),f.push({name:"core/open-shortcut-help",label:(0,b.__)("Keyboard shortcuts"),icon:bv,callback:()=>{m(fy)}}),f.push({name:"core/toggle-breadcrumbs",label:l?(0,b.__)("Hide block breadcrumbs"):(0,b.__)("Show block breadcrumbs"),callback:({close:e})=>{p("core","showBlockBreadcrumbs"),e(),h(l?(0,b.__)("Breadcrumbs hidden."):(0,b.__)("Breadcrumbs visible."),{id:"core/edit-site/toggle-breadcrumbs/notice",type:"snackbar"})}}),f.push({name:"core/toggle-list-view",label:(0,b.__)("Toggle list view"),icon:Ev,callback:({close:e})=>{a(!c),e()}}),{isLoading:!1,commands:f}}function Tv(){const{isLoaded:e,record:t}=As(),{openModal:n}=(0,d.useDispatch)(W);if(!e)return{isLoading:!0,commands:[]};const a=[];return"wp_block"===t?.type&&(a.push({name:"core/rename-pattern",label:(0,b.__)("Rename pattern"),icon:xa,callback:({close:e})=>{n(Rg.rename),e()}}),a.push({name:"core/duplicate-pattern",label:(0,b.__)("Duplicate pattern"),icon:ha,callback:({close:e})=>{n(Rg.duplicate),e()}})),{isLoading:!1,commands:a}}function Pv({title:e,subTitle:t,actions:n}){return(0,l.createElement)(_.__experimentalHStack,{as:"header",alignment:"left",className:"edit-site-page-header"},(0,l.createElement)(_.FlexBlock,{className:"edit-site-page-header__page-title"},(0,l.createElement)(_.__experimentalHeading,{as:"h2",level:3,weight:500,className:"edit-site-page-header__title"},e),t&&(0,l.createElement)(_.__experimentalText,{as:"p",className:"edit-site-page-header__sub-title"},t)),(0,l.createElement)(_.FlexItem,{className:"edit-site-page-header__actions"},n))}function Nv({title:e,subTitle:t,actions:n,children:a,className:r,hideTitleFromUI:s=!1}){const i=v()("edit-site-page",r);return(0,l.createElement)(ie,{className:i,ariaLabel:e},(0,l.createElement)("div",{className:"edit-site-page-content"},!s&&e&&(0,l.createElement)(Pv,{title:e,subTitle:t,actions:n}),a),(0,l.createElement)(g.EditorSnackbars,null))}const{RenamePatternCategoryModal:Iv}=nt(Pt.privateApis);function Mv({category:e,onClose:t}){const[n,a]=(0,f.useState)(!1);return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(_.MenuItem,{onClick:()=>a(!0)},(0,b.__)("Rename")),n&&(0,l.createElement)(Av,{category:e,onClose:()=>{a(!1),t()}}))}function Av({category:e,onClose:t}){const n={id:e.id,slug:e.slug,name:e.label},a=xi();return(0,l.createElement)(Iv,{category:n,existingCategories:a,onClose:t,overlayClassName:"edit-site-list__rename-modal"})}const{useHistory:Ov}=nt(bt.privateApis);function Rv({category:e,onClose:t}){const[n,a]=(0,f.useState)(!1),r=Ov(),{createSuccessNotice:s,createErrorNotice:i}=(0,d.useDispatch)(xe.store),{deleteEntityRecord:o,invalidateResolution:c}=(0,d.useDispatch)(Se.store);return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(_.MenuItem,{isDestructive:!0,onClick:()=>a(!0)},(0,b.__)("Delete")),(0,l.createElement)(_.__experimentalConfirmDialog,{isOpen:n,onConfirm:async()=>{try{await o("taxonomy","wp_pattern_category",e.id,{force:!0},{throwOnError:!0}),c("getUserPatternCategories"),c("getEntityRecords",["postType",Rt.user,{per_page:-1}]),s((0,b.sprintf)(/* translators: The pattern category's name */
(0,b.__)('"%s" deleted.'),e.label),{type:"snackbar",id:"pattern-category-delete"}),t?.(),r.push({path:"/patterns",categoryType:Rt.theme,categoryId:Dt})}catch(e){const t=e.message&&"unknown_error"!==e.code?e.message:(0,b.__)("An error occurred while deleting the pattern category.");i(t,{type:"snackbar",id:"pattern-category-delete"})}},onCancel:()=>a(!1),confirmButtonText:(0,b.__)("Delete"),className:"edit-site-patterns__delete-modal"},(0,b.sprintf)(
// translators: %s: The pattern category's name.
(0,b.__)('Are you sure you want to delete the category "%s"? The patterns will not be deleted.'),(0,an.decodeEntities)(e.label))))}function Dv({categoryId:e,type:t,titleId:n,descriptionId:a}){const{patternCategories:r}=xi(),s=(0,d.useSelect)((e=>e(g.store).__experimentalGetDefaultTemplatePartAreas()),[]);let i,o,c;if(t===Mt){const t=s.find((t=>t.area===e));i=t?.label,o=t?.description}else t===Rt.theme&&(c=r.find((t=>t.name===e)),i=c?.label,o=c?.description);return i?(0,l.createElement)(_.__experimentalVStack,{className:"edit-site-patterns__section-header"},(0,l.createElement)(_.__experimentalHStack,{justify:"space-between"},(0,l.createElement)(_.__experimentalHeading,{as:"h2",level:4,id:n},i),!!c?.id&&(0,l.createElement)(_.DropdownMenu,{icon:ce,label:(0,b.__)("Actions"),toggleProps:{className:"edit-site-patterns__button",describedBy:(0,b.sprintf)(/* translators: %s: pattern category name */
(0,b.__)("Action menu for %s pattern category"),i)}},(({onClose:e})=>(0,l.createElement)(_.MenuGroup,null,(0,l.createElement)(Mv,{category:c,onClose:e}),(0,l.createElement)(Rv,{category:c,onClose:e}))))),o?(0,l.createElement)(_.__experimentalText,{variant:"muted",as:"p",id:a},o):null):null}var Fv=(0,l.createElement)(E.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(E.Path,{d:"M18.5 10.5H10v8h8a.5.5 0 00.5-.5v-7.5zm-10 0h-3V18a.5.5 0 00.5.5h2.5v-8zM6 4h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2V6a2 2 0 012-2z"})),Bv=(0,l.createElement)(E.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(E.Path,{fillRule:"evenodd",d:"M18 5.5h-8v8h8.5V6a.5.5 0 00-.5-.5zm-9.5 8h-3V6a.5.5 0 01.5-.5h2.5v8zM6 4h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2V6a2 2 0 012-2z"})),Lv=(0,l.createElement)(E.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,l.createElement)(E.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"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"})),Vv=window.wp.reusableBlocks;function zv({item:e,onClose:t}){const[n,a]=(0,f.useState)((()=>e.title)),[r,s]=(0,f.useState)(!1),{editEntityRecord:i,saveEditedEntityRecord:o}=(0,d.useDispatch)(Se.store),{createSuccessNotice:c,createErrorNotice:u}=(0,d.useDispatch)(xe.store);return e.type!==Mt||e.isCustom?(0,l.createElement)(l.Fragment,null,(0,l.createElement)(_.MenuItem,{onClick:()=>{s(!0),a(e.title)}},(0,b.__)("Rename")),r&&(0,l.createElement)(_.Modal,{title:(0,b.__)("Rename"),onRequestClose:()=>{s(!1),t()},overlayClassName:"edit-site-list__rename-modal"},(0,l.createElement)("form",{onSubmit:async function(r){r.preventDefault();try{await i("postType",e.type,e.id,{title:n}),a(""),s(!1),t(),await o("postType",e.type,e.id,{throwOnError:!0}),c(e.type===Mt?(0,b.__)("Template part renamed."):(0,b.__)("Pattern renamed."),{type:"snackbar"})}catch(t){const n=e.type===Mt?(0,b.__)("An error occurred while renaming the template part."):(0,b.__)("An error occurred while renaming the pattern."),a=t.message&&"unknown_error"!==t.code?t.message:n;u(a,{type:"snackbar"})}}},(0,l.createElement)(_.__experimentalVStack,{spacing:"5"},(0,l.createElement)(_.TextControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,b.__)("Name"),value:n,onChange:a,required:!0}),(0,l.createElement)(_.__experimentalHStack,{justify:"right"},(0,l.createElement)(_.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:()=>{s(!1),t()}},(0,b.__)("Cancel")),(0,l.createElement)(_.Button,{__next40pxDefaultSize:!0,variant:"primary",type:"submit"},(0,b.__)("Save"))))))):null}const{DuplicatePatternModal:Gv}=nt(Pt.privateApis),{useHistory:Hv}=nt(bt.privateApis);function Uv({categoryId:e,item:t,label:n=(0,b.__)("Duplicate"),onClose:a}){const{createSuccessNotice:r}=(0,d.useDispatch)(xe.store),[s,i]=(0,f.useState)(!1),o=Hv(),c=()=>i(!1),u=t.type===Mt,m=t.type===Rt.theme;return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(_.MenuItem,{onClick:()=>i(!0),"aria-expanded":s,"aria-haspopup":"dialog"},n),s&&!u&&(0,l.createElement)(Gv,{onClose:c,onSuccess:function({pattern:t}){o.push({categoryType:Rt.theme,categoryId:e,postType:Rt.user,postId:t.id}),a()},pattern:m?t:t.patternPost}),s&&u&&(0,l.createElement)(Js,{blocks:t.blocks,closeModal:c,confirmLabel:(0,b.__)("Duplicate"),defaultArea:t.templatePart.area,defaultTitle:(0,b.sprintf)(/* translators: %s: Existing template part title */
(0,b.__)("%s (Copy)"),t.title),modalTitle:(0,b.__)("Duplicate template part"),onCreate:async function(n){r((0,b.sprintf)(
// translators: %s: The new template part's title e.g. 'Call to action (copy)'.
(0,b.__)('"%s" duplicated.'),t.title),{type:"snackbar",id:"edit-site-patterns-success"}),o.push({postType:Mt,postId:n?.id,categoryType:Mt,categoryId:e}),a()},onError:c}))}const{useGlobalStyle:Wv}=nt(we.privateApis),jv={header:Fv,footer:Bv,uncategorized:Zs};var Zv=(0,f.memo)((function({categoryId:e,item:t,...n}){const a=(0,f.useId)(),[r,s]=(0,f.useState)(!1),[i]=Wv("color.background"),{removeTemplate:o}=(0,d.useDispatch)(ia),{__experimentalDeleteReusableBlock:c}=(0,d.useDispatch)(Vv.store),{createErrorNotice:u,createSuccessNotice:m}=(0,d.useDispatch)(xe.store),p=t.type===Rt.user,h=t.type===Rt.theme,g=t.type===Mt,{onClick:y}=kt({postType:t.type,postId:p?t.id:t.name,categoryId:e,categoryType:g?t.type:Rt.theme}),E=!t.blocks?.length,w=v()("edit-site-patterns__pattern",{"is-placeholder":E}),x=v()("edit-site-patterns__preview",{"is-inactive":h}),S=p||g&&t.isCustom,C=g&&t.templatePart.has_theme_file,k=[];let T;S?k.push((0,b.__)("Press Enter to edit, or Delete to delete the pattern.")):t.description&&k.push(t.description),h&&k.push((0,b.__)("Theme & plugin patterns cannot be edited.")),T=!p&&jv[e]?jv[e]:t.syncStatus===Lt.full?ha:void 0;const P=C?(0,b.__)("Clear"):(0,b.__)("Delete"),N=C?(0,b.__)("Are you sure you want to clear these customizations?"):(0,b.sprintf)(
// translators: %s: The pattern or template part's title e.g. 'Call to action'.
(0,b.__)('Are you sure you want to delete "%s"?'),t.title||t.name),I=i?void 0:[{css:"body { background: #fff; }"}];return(0,l.createElement)("li",{className:w},(0,l.createElement)("button",{className:x,id:`edit-site-patterns-${t.name}`,type:"button",...n,onClick:t.type!==Rt.theme?y:void 0,"aria-disabled":t.type!==Rt.theme?"false":"true","aria-label":t.title,"aria-describedby":k.length?k.map(((e,t)=>`${a}-${t}`)).join(" "):void 0},E&&g&&(0,b.__)("Empty template part"),E&&!g&&(0,b.__)("Empty pattern"),!E&&(0,l.createElement)(we.BlockPreview,{blocks:t.blocks,additionalStyles:I,viewportWidth:t.viewportWidth})),k.map(((e,t)=>(0,l.createElement)("div",{key:t,hidden:!0,id:`${a}-${t}`},e))),(0,l.createElement)(_.__experimentalHStack,{className:"edit-site-patterns__footer",justify:"space-between"},(0,l.createElement)(_.__experimentalHStack,{alignment:"center",justify:"left",spacing:3,className:"edit-site-patterns__pattern-title"},T&&!h&&(0,l.createElement)(_.Tooltip,{placement:"top",text:(0,b.__)("Editing this pattern will also update anywhere it is used")},(0,l.createElement)(me,{className:"edit-site-patterns__pattern-icon",icon:T})),(0,l.createElement)(_.Flex,{as:"span",gap:0,justify:"left"},t.type===Rt.theme?t.title:(0,l.createElement)(_.__experimentalHeading,{level:5},(0,l.createElement)(_.Button,{variant:"link",onClick:y,tabIndex:"-1"},t.title||t.name)),t.type===Rt.theme&&(0,l.createElement)(_.Tooltip,{placement:"top",text:(0,b.__)("This pattern cannot be edited.")},(0,l.createElement)(me,{className:"edit-site-patterns__pattern-lock-icon",icon:Lv,size:24})))),(0,l.createElement)(_.DropdownMenu,{icon:ce,label:(0,b.__)("Actions"),className:"edit-site-patterns__dropdown",popoverProps:{placement:"bottom-end"},toggleProps:{className:"edit-site-patterns__button",describedBy:(0,b.sprintf)(/* translators: %s: pattern name */
(0,b.__)("Action menu for %s pattern"),t.title)}},(({onClose:n})=>(0,l.createElement)(_.MenuGroup,null,S&&!C&&(0,l.createElement)(zv,{item:t,onClose:n}),(0,l.createElement)(Uv,{categoryId:e,item:t,onClose:n,label:(0,b.__)("Duplicate")}),t.type===Rt.user&&(0,l.createElement)(_.MenuItem,{onClick:()=>(()=>{const e={__file:t.type,title:t.title||t.name,content:t.patternPost.content.raw,syncStatus:t.patternPost.wp_pattern_sync_status};return(0,Py.downloadBlob)(`${vs(t.title||t.name)}.json`,JSON.stringify(e,null,2),"application/json")})()},(0,b.__)("Export as JSON")),S&&(0,l.createElement)(_.MenuItem,{isDestructive:!C,onClick:()=>s(!0)},C?(0,b.__)("Clear customizations"):(0,b.__)("Delete")))))),r&&(0,l.createElement)(_.__experimentalConfirmDialog,{confirmButtonText:P,onConfirm:()=>g?o(t):(async()=>{try{await c(t.id),m((0,b.sprintf)(
// translators: %s: The pattern's title e.g. 'Call to action'.
(0,b.__)('"%s" deleted.'),t.title),{type:"snackbar",id:"edit-site-patterns-success"})}catch(e){const t=e.message&&"unknown_error"!==e.code?e.message:(0,b.__)("An error occurred while deleting the pattern.");u(t,{type:"snackbar",id:"edit-site-patterns-error"})}})(),onCancel:()=>s(!1)},N))}));function qv({categoryId:e,items:t,...n}){return t?.length?(0,l.createElement)("ul",{className:"edit-site-patterns__grid",...n},t.map((t=>(0,l.createElement)(Zv,{key:t.name,item:t,categoryId:e})))):null}function Yv(){return(0,l.createElement)("div",{className:"edit-site-patterns__no-results"},(0,b.__)("No patterns found."))}const{useLocation:Kv,useHistory:Xv}=nt(bt.privateApis),Jv={all:(0,b._x)("All","Option that shows all patterns"),[Lt.full]:(0,b._x)("Synced","Option that shows all synchronized patterns"),[Lt.unsynced]:(0,b._x)("Not synced","Option that shows all patterns that are not synchronized")},Qv={all:"",[Lt.full]:(0,b.__)("Patterns that are kept in sync across the site."),[Lt.unsynced]:(0,b.__)("Patterns that can be changed freely without affecting the site.")},$v=20;function e_({categoryId:e,type:t}){const n=Kv(),a=Xv(),r=(0,se.useViewportMatch)("medium","<"),[s,i,o]=(0,se.useDebouncedInput)(""),c=(0,f.useDeferredValue)(o),[u,d]=(0,f.useState)("all"),[m,p]=(0,f.useState)(1),h=(0,f.useDeferredValue)(u),g=t===Rt.theme&&"uncategorized"===e,{patterns:y,isResolving:v}=wi(t,g?"":e,{search:c,syncStatus:"all"===h?void 0:h}),E=(0,f.useId)(),w=`${E}-title`,x=`${E}-description`,S=y.length,C=Jv[u],k=Qv[u],T=y.length,P=m-1,N=Math.ceil(y.length/$v),I=(0,f.useMemo)((()=>y.slice(P*$v,P*$v+$v)),[P,y]),M=(0,se.useAsyncList)(I,{step:10});return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(_.__experimentalVStack,{className:"edit-site-patterns__header",spacing:6},(0,l.createElement)(Dv,{categoryId:e,type:t,titleId:w,descriptionId:x}),(0,l.createElement)(_.Flex,{alignment:"stretch",wrap:!0},r&&(0,l.createElement)(fa,{icon:(0,b.isRTL)()?he:pe,label:(0,b.__)("Back"),onClick:()=>{"/patterns"===n.state?.backPath?a.back():a.push({path:"/patterns"})}}),(0,l.createElement)(_.FlexBlock,{className:"edit-site-patterns__search-block"},(0,l.createElement)(_.SearchControl,{className:"edit-site-patterns__search",onChange:e=>(e=>{p(1),i(e)})(e),placeholder:(0,b.__)("Search patterns"),label:(0,b.__)("Search patterns"),value:s,__nextHasNoMarginBottom:!0})),t===Rt.theme&&(0,l.createElement)(_.__experimentalToggleGroupControl,{className:"edit-site-patterns__sync-status-filter",hideLabelFromVision:!0,label:(0,b.__)("Filter by sync status"),value:u,isBlock:!0,onChange:e=>(e=>{p(1),d(e)})(e),__nextHasNoMarginBottom:!0},Object.entries(Jv).map((([e,t])=>(0,l.createElement)(_.__experimentalToggleGroupControlOption,{className:"edit-site-patterns__sync-status-filter-option",key:e,value:e,label:t})))))),(0,l.createElement)(_.__experimentalVStack,{className:"edit-site-patterns__section",justify:"flex-start",spacing:6},"all"!==u&&(0,l.createElement)(_.__experimentalVStack,{className:"edit-site-patterns__section-header"},(0,l.createElement)(_.__experimentalHeading,{as:"h3",level:5,id:w},C),k?(0,l.createElement)(_.__experimentalText,{variant:"muted",as:"p",id:x},k):null),S&&(0,l.createElement)(qv,{categoryId:e,items:M,"aria-labelledby":w,"aria-describedby":x}),!v&&!S&&(0,l.createElement)(Yv,null)),N>1&&(0,l.createElement)(_f,{className:"edit-site-patterns__pagination",currentPage:m,numPages:N,changePage:e=>{const t=document.querySelector(".edit-site-patterns");t?.scrollTo(0,0),p(e)},totalItems:T}))}function t_(){var e;const t=(0,d.useSelect)((e=>{const{getSettings:t}=nt(e(ia));return t()}),[]),n=null!==(e=t.__experimentalAdditionalBlockPatterns)&&void 0!==e?e:t.__experimentalBlockPatterns,a=(0,d.useSelect)((e=>e(Se.store).getBlockPatterns()),[]),r=(0,f.useMemo)((()=>[...n||[],...a||[]].filter($s)),[n,a]);return(0,f.useMemo)((()=>{const{__experimentalAdditionalBlockPatterns:e,...n}=t;return{...n,__experimentalBlockPatterns:r,__unstableIsPreviewMode:!0}}),[t,r])}const{ExperimentalBlockEditorProvider:n_}=nt(we.privateApis);function a_(){const{categoryType:e,categoryId:t}=(0,Et.getQueryArgs)(window.location.href),n=e||Rt.theme,a=t||Dt,r=t_();return(0,l.createElement)(n_,{settings:r},(0,l.createElement)(Nv,{className:"edit-site-patterns",title:(0,b.__)("Patterns content"),hideTitleFromUI:!0},(0,l.createElement)(e_,{key:`${n}-${a}`,type:n,categoryId:a})))}const r_=({data:e,view:t,fields:n,textFields:a})=>{const r=[...e],s=t.sort.field;if(a.includes(s)){const e=n.find((e=>e.id===s));r.sort(((n,a)=>{var r,s;const i=null!==(r=e.getValue({item:n}))&&void 0!==r?r:"",o=null!==(s=e.getValue({item:a}))&&void 0!==s?s:"";return"asc"===t.sort.direction?i.localeCompare(o):o.localeCompare(i)}))}return r};function s_({data:e,view:t}){const n=(t.page-1)*t.perPage,a=e?.length||0;return e=e?.slice(n,n+t.perPage),{data:e,paginationInfo:{totalItems:a,totalPages:Math.ceil(a/t.perPage)}}}const i_=(0,f.memo)((function({view:e,onChangeView:t,paginationInfo:{totalItems:n=0,totalPages:a}}){return n&&a?!!n&&1!==a&&(0,l.createElement)(_.__experimentalHStack,{expanded:!1,spacing:6,justify:"end",className:"dataviews-pagination"},(0,l.createElement)(_.__experimentalHStack,{justify:"flex-start",expanded:!1,spacing:2},(0,f.createInterpolateElement)((0,b.sprintf)(
// translators: %1$s: Current page number, %2$s: Total number of pages.
(0,b._x)("Page <CurrenPageControl /> of %2$s","paging"),e.page,a),{CurrenPageControl:(0,l.createElement)(_.SelectControl,{"aria-label":(0,b.__)("Current page"),value:e.page,options:Array.from(Array(a)).map(((e,t)=>{const n=t+1;return{value:n,label:n}})),onChange:n=>{t({...e,page:+n})},size:"compact",__nextHasNoMarginBottom:!0})})),(0,l.createElement)(_.__experimentalHStack,{expanded:!1,spacing:1},(0,l.createElement)(_.Button,{onClick:()=>t({...e,page:e.page-1}),disabled:1===e.page,__experimentalIsFocusable:!0,label:(0,b.__)("Previous page"),icon:pe,showTooltip:!0,size:"compact",tooltipPosition:"top"}),(0,l.createElement)(_.Button,{onClick:()=>t({...e,page:e.page+1}),disabled:e.page>=a,__experimentalIsFocusable:!0,label:(0,b.__)("Next page"),icon:he,showTooltip:!0,size:"compact",tooltipPosition:"top"}))):null}));var o_=i_;const{DropdownMenuV2:l_,DropdownMenuGroupV2:c_,DropdownMenuItemV2:u_,DropdownMenuRadioItemV2:d_,DropdownMenuCheckboxItemV2:m_,DropdownMenuItemLabelV2:p_}=Zo(_.privateApis);function h_({view:e,onChangeView:t,supportedLayouts:n}){let a=Cl;if(n&&(a=a.filter((e=>n.includes(e.type)))),1===a.length)return null;const r=a.find((t=>e.type===t.type));return(0,l.createElement)(l_,{trigger:(0,l.createElement)(u_,{suffix:(0,l.createElement)("span",{"aria-hidden":"true"},r.label)},(0,l.createElement)(p_,null,(0,b.__)("Layout")))},a.map((n=>(0,l.createElement)(d_,{key:n.type,value:n.type,name:"view-actions-available-view",checked:n.type===e.type,hideOnClick:!0,onChange:n=>{t({...e,type:n.target.value})}},(0,l.createElement)(p_,null,n.label)))))}const f_=[10,20,50,100];function g_({view:e,onChangeView:t}){return(0,l.createElement)(l_,{trigger:(0,l.createElement)(u_,{suffix:(0,l.createElement)("span",{"aria-hidden":"true"},e.perPage)},(0,l.createElement)(p_,null,(0,b.__)("Rows per page")))},f_.map((n=>(0,l.createElement)(d_,{key:n,value:n,name:"view-actions-page-size",checked:e.perPage===n,onChange:()=>{t({...e,perPage:n,page:1})}},(0,l.createElement)(p_,null,n)))))}function y_({view:e,onChangeView:t,fields:n}){const a=n.filter((t=>!1!==t.enableHiding&&t.id!==e.layout.mediaField));return a?.length?(0,l.createElement)(l_,{trigger:(0,l.createElement)(u_,null,(0,l.createElement)(p_,null,(0,b.__)("Fields")))},a?.map((n=>(0,l.createElement)(m_,{key:n.id,value:n.id,checked:!e.hiddenFields?.includes(n.id),onChange:()=>{t({...e,hiddenFields:e.hiddenFields?.includes(n.id)?e.hiddenFields.filter((e=>e!==n.id)):[...e.hiddenFields||[],n.id]})}},(0,l.createElement)(p_,null,n.header))))):null}function v_({fields:e,view:t,onChangeView:n}){const a=e.filter((e=>!1!==e.enableSorting));if(!a?.length)return null;const r=e.find((e=>e.id===t.sort?.field));return(0,l.createElement)(l_,{trigger:(0,l.createElement)(u_,{suffix:(0,l.createElement)("span",{"aria-hidden":"true"},r?.header)},(0,l.createElement)(p_,null,(0,b.__)("Sort by")))},a?.map((e=>{const a=t.sort?.direction;return(0,l.createElement)(l_,{key:e.id,trigger:(0,l.createElement)(u_,null,(0,l.createElement)(p_,null,e.header)),style:{minWidth:"220px"}},Object.entries(wl).map((([s,i])=>{const o=void 0!==r&&a===s&&e.id===r.id,c=`${e.id}-${s}`;return(0,l.createElement)(d_,{key:c,name:"view-actions-sorting",value:c,checked:o,onChange:()=>{n({...t,sort:{field:e.id,direction:s}})}},(0,l.createElement)(p_,null,i.label))})))})))}const b_=(0,f.memo)((function({fields:e,view:t,onChangeView:n,supportedLayouts:a}){return(0,l.createElement)(l_,{trigger:(0,l.createElement)(_.Button,{size:"compact",icon:Cl.find((e=>e.type===t.type))?.icon||Cl.find((e=>e.type===xl)).icon,label:(0,b.__)("View options")})},(0,l.createElement)(c_,null,window?.__experimentalAdminViews&&(0,l.createElement)(h_,{view:t,onChangeView:n,supportedLayouts:a}),(0,l.createElement)(v_,{fields:e,view:t,onChangeView:n}),(0,l.createElement)(y_,{fields:e,view:t,onChangeView:n}),(0,l.createElement)(g_,{view:t,onChangeView:n})))}));var E_=b_;const{DropdownMenuV2:w_,DropdownMenuGroupV2:x_,DropdownMenuItemV2:S_,DropdownMenuSeparatorV2:C_,DropdownMenuItemLabelV2:k_,DropdownMenuItemHelpTextV2:T_}=Zo(_.privateApis),P_=({activeElement:e,filterInView:t,filter:n})=>void 0===e?n.name:void 0!==e&&t?.operator===_l?(0,b.sprintf)(/* translators: 1: Filter name. 2: Filter value. e.g.: "Author is Admin". */
(0,b.__)("%1$s is %2$s"),n.name,e.label):void 0!==e&&t?.operator===bl?(0,b.sprintf)(/* translators: 1: Filter name. 2: Filter value. e.g.: "Author is not Admin". */
(0,b.__)("%1$s is not %2$s"),n.name,e.label):(0,b.sprintf)(/* translators: 1: Filter name e.g.: "Unknown status for Author". */
(0,b.__)("Unknown status for %1$s"),n.name);function N_({children:e}){return f.Children.toArray(e).filter(Boolean).map(((e,t)=>(0,l.createElement)(f.Fragment,{key:t},t>0&&(0,l.createElement)(C_,null),e)))}function I_({filter:e,view:t,onChangeView:n}){const a=t.filters.find((t=>t.field===e.field)),r=t.filters.filter((t=>t.field!==e.field)),s=e.elements.find((e=>e.value===a?.value)),i=a?.operator||e.operators[0];return(0,l.createElement)(w_,{key:e.field,trigger:(0,l.createElement)(_.Button,{variant:"tertiary",size:"compact",label:e.name},(0,l.createElement)(P_,{activeElement:s,filterInView:a,filter:e}),(0,l.createElement)(_.Icon,{icon:Vi,style:{flexShrink:0}}))},(0,l.createElement)(N_,null,(0,l.createElement)(x_,null,e.elements.map((a=>{const o=s?.value===a.value;return(0,l.createElement)(il,{key:a.value,name:`filter-summary-${e.field}`,value:a.value,checked:o,onClick:()=>n({...t,page:1,filters:[...r,{field:e.field,operator:i,value:o?void 0:a.value}]})},(0,l.createElement)(k_,null,a.label),!!a.description&&(0,l.createElement)(T_,null,a.description))}))),e.operators.length>1&&(0,l.createElement)(w_,{trigger:(0,l.createElement)(S_,{suffix:(0,l.createElement)("span",{"aria-hidden":"true"},El[i]?.label)},(0,l.createElement)(k_,null,(0,b.__)("Conditions")))},Object.entries(El).map((([s,{label:o,key:c}])=>(0,l.createElement)(il,{key:c,name:`filter-summary-${e.field}-conditions`,value:s,checked:i===s,onChange:s=>{n({...t,page:1,filters:[...r,{field:e.field,operator:s.target.value,value:a?.value}]})}},(0,l.createElement)(k_,null,o)))))))}const{DropdownMenuV2:M_,DropdownMenuGroupV2:A_,DropdownMenuItemV2:O_,DropdownMenuRadioItemV2:R_,DropdownMenuSeparatorV2:D_,DropdownMenuItemLabelV2:F_,DropdownMenuItemHelpTextV2:B_}=Zo(_.privateApis);function L_({children:e}){return f.Children.toArray(e).filter(Boolean).map(((e,t)=>(0,l.createElement)(f.Fragment,{key:t},t>0&&(0,l.createElement)(D_,null),e)))}function V_({filters:e,view:t,onChangeView:n}){if(0===e.length)return null;const a=t.filters.reduce(((e,t)=>void 0!==t.value?e+1:e),0);return(0,l.createElement)(M_,{trigger:(0,l.createElement)(_.Button,{__experimentalIsFocusable:!0,label:(0,b.__)("Filters"),size:"compact",icon:Wo,className:"dataviews-filters-button"},t.type===Sl&&a>0?(0,l.createElement)("span",{className:"dataviews-filters-count"},a):null),style:{minWidth:"230px"}},(0,l.createElement)(L_,null,(0,l.createElement)(A_,null,e.map((e=>{const a=t.filters.find((t=>t.field===e.field)),r=t.filters.filter((t=>t.field!==e.field)),s=e.elements.find((e=>e.value===a?.value)),i=a?.operator||e.operators[0];return(0,l.createElement)(M_,{key:e.field,trigger:(0,l.createElement)(O_,{suffix:s&&(0,l.createElement)("span",{"aria-hidden":"true"},i in El&&`${El[i].label} `,s.label)},(0,l.createElement)(F_,null,e.name)),style:{minWidth:"200px"}},(0,l.createElement)(L_,null,(0,l.createElement)(A_,null,e.elements.map((a=>{const o=s?.value===a.value;return(0,l.createElement)(il,{key:a.value,name:`add-filter-${e.field}`,value:a.value,checked:o,onChange:a=>{n({...t,page:1,filters:[...r,{field:e.field,operator:i,value:o?void 0:a.target.value}]})}},(0,l.createElement)(F_,null,a.label),!!a.description&&(0,l.createElement)(B_,null,a.description))}))),e.operators.length>1&&(0,l.createElement)(M_,{trigger:(0,l.createElement)(O_,{suffix:(0,l.createElement)("span",{"aria-hidden":"true"},El[i]?.label)},(0,l.createElement)(F_,null,(0,b.__)("Conditions")))},Object.entries(El).map((([s,{label:o,key:c}])=>(0,l.createElement)(R_,{key:c,name:`add-filter-${e.field}-conditions`,value:s,checked:i===s,onChange:s=>{n({...t,page:1,filters:[...r,{field:e.field,operator:s.target.value,value:a?.value}]})}},(0,l.createElement)(F_,null,o))))),(0,l.createElement)(O_,{key:"reset-filter-"+e.name,disabled:!s,hideOnClick:!1,onClick:()=>{n({...t,page:1,filters:t.filters.filter((t=>t.field!==e.field))})}},(0,l.createElement)(F_,null,(0,b.sprintf)(/* translators: 1: Filter name. e.g.: "Reset Author". */
(0,b.__)("Reset %1$s"),e.name.toLowerCase())))))}))),(0,l.createElement)(O_,{disabled:""===t.search&&0===t.filters?.length,hideOnClick:!1,onClick:()=>{n({...t,page:1,filters:[]})}},(0,l.createElement)(F_,null,(0,b.__)("Reset filters")))))}function z_({view:e,onChangeView:t}){return(0,l.createElement)(_.Button,{disabled:""===e.search&&0===e.filters?.length,__experimentalIsFocusable:!0,size:"compact",variant:"tertiary",onClick:()=>{t({...e,page:1,search:"",filters:[]})}},(0,b.__)("Reset filters"))}const G_=(0,f.memo)((function({fields:e,view:t,onChangeView:n}){const a=[];e.forEach((e=>{if(!e.type)return;const n=(e=>{let t=e.filterBy?.operators;return t&&Array.isArray(t)||(t=[_l,bl]),t.filter((e=>[_l,bl].includes(e)))})(e);if(0!==n.length&&e.type===vl){if(!e.elements?.length)return;a.push({field:e.id,name:e.header,elements:e.elements,operators:n,isVisible:t.filters.some((t=>t.field===e.id&&[_l,bl].includes(t.operator)))})}}));const r=[(0,l.createElement)(V_,{key:"add-filter",filters:a,view:t,onChangeView:n}),...a.map((e=>e.isVisible&&t.type!==Sl?(0,l.createElement)(I_,{key:e.field,filter:e,view:t,onChangeView:n}):null))];return r.length>1&&t.type!==Sl&&r.push((0,l.createElement)(z_,{key:"reset-filters",view:t,onChangeView:n})),r}));var H_=G_;var U_=(0,f.memo)((function({label:e,view:t,onChangeView:n}){const[a,r,s]=(0,se.useDebouncedInput)(t.search);(0,f.useEffect)((()=>{r(t.search)}),[t]);const i=(0,f.useRef)(n);(0,f.useEffect)((()=>{i.current=n}),[n]),(0,f.useEffect)((()=>{i.current({...t,page:1,search:s})}),[s]);const o=e||(0,b.__)("Filter list");return(0,l.createElement)(_.SearchControl,{__nextHasNoMarginBottom:!0,onChange:r,value:a,label:o,placeholder:o,size:"compact"})}));const W_=e=>e.id,j_=()=>{};function Z_({view:e,onChangeView:t,fields:n,search:a=!0,searchLabel:r,actions:s,data:i,getItemId:o=W_,isLoading:c=!1,paginationInfo:u,supportedLayouts:d,onSelectionChange:m=j_,onDetailsChange:p=null,deferredRendering:h=!1}){const[g,y]=(0,f.useState)([]),v=(0,f.useCallback)((e=>{y(e.map((e=>e.id))),m(e)}),[y,m]),b=Cl.find((t=>t.type===e.type)).component,E=(0,f.useMemo)((()=>n.map((e=>({...e,render:e.render||e.getValue})))),[n]);return(0,l.createElement)("div",{className:"dataviews-wrapper"},(0,l.createElement)(_.__experimentalVStack,{spacing:0,justify:"flex-start"},(0,l.createElement)(_.__experimentalHStack,{alignment:"flex-start",className:"dataviews-filters__view-actions"},(0,l.createElement)(_.__experimentalHStack,{justify:"start",wrap:!0},a&&(0,l.createElement)(U_,{label:r,view:e,onChangeView:t}),(0,l.createElement)(H_,{fields:E,view:e,onChangeView:t})),(0,l.createElement)(E_,{fields:E,view:e,onChangeView:t,supportedLayouts:d})),(0,l.createElement)(b,{fields:E,view:e,onChangeView:t,actions:s,data:i,getItemId:o,isLoading:c,onSelectionChange:v,onDetailsChange:p,selection:g,deferredRendering:h}),(0,l.createElement)(o_,{view:e,onChangeView:t,paginationInfo:u})))}const{useHistory:q_}=nt(bt.privateApis),{CreatePatternModalContents:Y_,useDuplicatePatternProps:K_}=nt(Pt.privateApis),X_={id:"export-pattern",label:(0,b.__)("Export as JSON"),isEligible:e=>e.type===Rt.user,callback:e=>{const t={__file:e.type,title:e.title||e.name,content:e.patternPost.content.raw,syncStatus:e.patternPost.wp_pattern_sync_status};return(0,Py.downloadBlob)(`${vs(e.title||e.name)}.json`,JSON.stringify(t,null,2),"application/json")}},J_={id:"rename-pattern",label:(0,b.__)("Rename"),isEligible:e=>{const t=e.type===Mt,n=e.type===Rt.user||t&&e.isCustom,a=t&&e.templatePart.has_theme_file;return n&&!a},RenderModal:({item:e,closeModal:t})=>{const[n,a]=(0,f.useState)((()=>e.title)),{editEntityRecord:r,saveEditedEntityRecord:s}=(0,d.useDispatch)(Se.store),{createSuccessNotice:i,createErrorNotice:o}=(0,d.useDispatch)(xe.store);return(0,l.createElement)("form",{onSubmit:async function(l){l.preventDefault();try{await r("postType",e.type,e.id,{title:n}),a(""),t(),await s("postType",e.type,e.id,{throwOnError:!0}),i(e.type===Mt?(0,b.__)("Template part renamed."):(0,b.__)("Pattern renamed."),{type:"snackbar"})}catch(t){const n=e.type===Mt?(0,b.__)("An error occurred while renaming the template part."):(0,b.__)("An error occurred while renaming the pattern."),a=t.message&&"unknown_error"!==t.code?t.message:n;o(a,{type:"snackbar"})}}},(0,l.createElement)(_.__experimentalVStack,{spacing:"5"},(0,l.createElement)(_.TextControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,b.__)("Name"),value:n,onChange:a,required:!0}),(0,l.createElement)(_.__experimentalHStack,{justify:"right"},(0,l.createElement)(_.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:()=>{t()}},(0,b.__)("Cancel")),(0,l.createElement)(_.Button,{__next40pxDefaultSize:!0,variant:"primary",type:"submit"},(0,b.__)("Save")))))}},Q_=e=>{const t=e.type===Mt;return e.type===Rt.user||t&&e.isCustom},$_={id:"delete-pattern",label:(0,b.__)("Delete"),isEligible:e=>{const t=e.type===Mt&&e.templatePart.has_theme_file;return Q_(e)&&!t},hideModalHeader:!0,RenderModal:({item:e,closeModal:t})=>{const{__experimentalDeleteReusableBlock:n}=(0,d.useDispatch)(Vv.store),{createErrorNotice:a,createSuccessNotice:r}=(0,d.useDispatch)(xe.store),{removeTemplate:s}=(0,d.useDispatch)(ia);return(0,l.createElement)(_.__experimentalVStack,{spacing:"5"},(0,l.createElement)(_.__experimentalText,null,(0,b.sprintf)(
// translators: %s: The pattern or template part's title e.g. 'Call to action'.
(0,b.__)('Are you sure you want to delete "%s"?'),(0,an.decodeEntities)(e.title||e.name))),(0,l.createElement)(_.__experimentalHStack,{justify:"right"},(0,l.createElement)(_.Button,{variant:"tertiary",onClick:t},(0,b.__)("Cancel")),(0,l.createElement)(_.Button,{variant:"primary",onClick:()=>e.type===Mt?s(e):(async()=>{try{await n(e.id),r((0,b.sprintf)(
// translators: %s: The pattern's title e.g. 'Call to action'.
(0,b.__)('"%s" deleted.'),e.title),{type:"snackbar",id:"edit-site-patterns-success"})}catch(e){const t=e.message&&"unknown_error"!==e.code?e.message:(0,b.__)("An error occurred while deleting the pattern.");a(t,{type:"snackbar",id:"edit-site-patterns-error"})}})()},(0,b.__)("Delete"))))}},eb={id:"reset-action",label:(0,b.__)("Clear customizations"),isEligible:e=>{const t=e.type===Mt&&e.templatePart.has_theme_file;return Q_(e)&&t},hideModalHeader:!0,RenderModal:({item:e,closeModal:t})=>{const{removeTemplate:n}=(0,d.useDispatch)(ia);return(0,l.createElement)(_.__experimentalVStack,{spacing:"5"},(0,l.createElement)(_.__experimentalText,null,(0,b.__)("Are you sure you want to clear these customizations?")),(0,l.createElement)(_.__experimentalHStack,{justify:"right"},(0,l.createElement)(_.Button,{variant:"tertiary",onClick:t},(0,b.__)("Cancel")),(0,l.createElement)(_.Button,{variant:"primary",onClick:()=>n(e)},(0,b.__)("Clear"))))}},tb={id:"duplicate-pattern",label:(0,b._x)("Duplicate","action label"),isEligible:e=>e.type!==Mt,modalHeader:(0,b._x)("Duplicate pattern","action label"),RenderModal:({item:e,closeModal:t})=>{const{categoryId:n=Dt}=(0,Et.getQueryArgs)(window.location.href),a=e.type===Rt.theme,r=q_(),s=K_({pattern:a?e:e.patternPost,onSuccess:function({pattern:e}){r.push({categoryType:Rt.theme,categoryId:n,postType:Rt.user,postId:e.id}),t()}});return(0,l.createElement)(Y_,{onClose:t,confirmLabel:(0,b._x)("Duplicate","action label"),...s})}},nb={id:"duplicate-template-part",label:(0,b._x)("Duplicate","action label"),isEligible:e=>e.type===Mt,modalHeader:(0,b._x)("Duplicate template part","action label"),RenderModal:({item:e,closeModal:t})=>{const{createSuccessNotice:n}=(0,d.useDispatch)(xe.store),{categoryId:a=Dt}=(0,Et.getQueryArgs)(window.location.href),r=q_();return(0,l.createElement)(Qs,{blocks:e.blocks,defaultArea:e.templatePart.area,defaultTitle:(0,b.sprintf)(/* translators: %s: Existing template part title */
(0,b.__)("%s (Copy)"),e.title),onCreate:async function(s){n((0,b.sprintf)(
// translators: %s: The new template part's title e.g. 'Call to action (copy)'.
(0,b.__)('"%s" duplicated.'),e.title),{type:"snackbar",id:"edit-site-patterns-success"}),r.push({postType:Mt,postId:s?.id,categoryType:Mt,categoryId:a}),t()},onError:t,confirmLabel:(0,b._x)("Duplicate","action label")})}},{ExperimentalBlockEditorProvider:ab,useGlobalStyle:rb}=nt(we.privateApis),sb={header:Fv,footer:Bv,uncategorized:Zs},ib=[],ob={[Gt]:{mediaField:"preview",primaryField:"title"}},lb={type:Gt,search:"",page:1,perPage:20,hiddenFields:["sync-status"],layout:{...ob[Gt]},filters:[]},cb=[{value:Lt.full,label:(0,b._x)("Synced","Option that shows all synchronized patterns"),description:(0,b.__)("Patterns that are kept in sync across the site.")},{value:Lt.unsynced,label:(0,b._x)("Not synced","Option that shows all patterns that are not synchronized"),description:(0,b.__)("Patterns that can be changed freely without affecting the site.")}];function ub({item:e,viewType:t}){const n=(0,f.useId)(),a=e.type===Rt.user,r=e.type===Rt.theme,s=e.type===Mt,i=!e.blocks?.length,o=[];a||s&&e.isCustom?o.push((0,b.__)("Press Enter to edit, or Delete to delete the pattern.")):e.description&&o.push(e.description),r&&o.push((0,b.__)("Theme & plugin patterns cannot be edited."));const[c]=rb("color.background");return(0,l.createElement)(l.Fragment,null,(0,l.createElement)("div",{className:`page-patterns-preview-field is-viewtype-${t}`,style:{backgroundColor:c}},i&&s&&(0,b.__)("Empty template part"),i&&!s&&(0,b.__)("Empty pattern"),!i&&(0,l.createElement)(we.BlockPreview,{blocks:e.blocks})),o.map(((e,t)=>(0,l.createElement)("div",{key:t,hidden:!0,id:`${n}-${t}`},e))))}function db({item:e,categoryId:t}){const n=e.type===Rt.user,a=e.type===Rt.theme,r=e.type===Mt;let s;const{onClick:i}=kt({postType:e.type,postId:n?e.id:e.name,categoryId:t,categoryType:r?e.type:Rt.theme});return s=!n&&sb[t]?sb[t]:e.syncStatus===Lt.full?ha:void 0,(0,l.createElement)(_.__experimentalHStack,{alignment:"center",justify:"flex-start",spacing:2},s&&!a&&(0,l.createElement)(_.Tooltip,{placement:"top",text:(0,b.__)("Editing this pattern will also update anywhere it is used")},(0,l.createElement)(me,{className:"edit-site-patterns__pattern-icon",icon:s})),e.type===Rt.theme&&(0,l.createElement)(_.Tooltip,{placement:"top",text:(0,b.__)("This pattern cannot be edited.")},(0,l.createElement)(me,{className:"edit-site-patterns__pattern-lock-icon",icon:Lv,size:24})),(0,l.createElement)(_.Flex,{as:"span",gap:0,justify:"left"},e.type===Rt.theme?(0,l.createElement)("span",{className:"dataviews-view-grid__title-field"},e.title):(0,l.createElement)(_.__experimentalHeading,{level:5},(0,l.createElement)(_.Button,{variant:"link",onClick:i,tabIndex:"-1",className:"dataviews-view-grid__title-field"},e.title||e.name))))}function mb(){const{categoryType:e,categoryId:t=Dt}=(0,Et.getQueryArgs)(window.location.href),n=e||Rt.theme,[a,r]=(0,f.useState)(lb),s=n===Rt.theme&&"uncategorized"===t,i=(0,se.usePrevious)(t),o=a.filters?.find((({field:e})=>"sync-status"===e))?.value,{patterns:c,isResolving:u}=wi(n,s?"":t,{search:a.search,syncStatus:o}),d=(0,f.useMemo)((()=>{const e=[{header:(0,b.__)("Preview"),id:"preview",render:({item:e})=>(0,l.createElement)(ub,{item:e,viewType:a.type}),enableSorting:!1,enableHiding:!1},{header:(0,b.__)("Title"),id:"title",getValue:({item:e})=>e.title,render:({item:e})=>(0,l.createElement)(db,{item:e,categoryId:t}),enableHiding:!1}];return n===Rt.theme&&e.push({header:(0,b.__)("Sync Status"),id:"sync-status",render:({item:e})=>cb.find((({value:t})=>t===e.syncStatus))?.label||cb.find((({value:e})=>e===Lt.unsynced)).label,type:Wt,elements:cb,filterBy:{operators:[jt]},enableSorting:!1}),e}),[a.type,t,n]);(0,f.useEffect)((()=>{i!==t&&r(lb)}),[t,i]);const{data:m,paginationInfo:p}=(0,f.useMemo)((()=>{if(!c)return{data:ib,paginationInfo:{totalItems:0,totalPages:0}};let e=[...c];return a.sort&&(e=r_({data:e,view:a,fields:d,textFields:["title","author"]})),s_({data:e,view:a})}),[c,a,d]),h=(0,f.useMemo)((()=>[J_,tb,nb,X_,eb,$_]),[]),g=(0,f.useCallback)((e=>{e.type!==a.type&&(e={...e,layout:{...ob[e.type]}}),r(e)}),[a.type,r]),y=(0,f.useId)(),v=t_();return(0,l.createElement)(ab,{settings:v},(0,l.createElement)(Nv,{title:(0,b.__)("Patterns content"),className:"edit-site-page-patterns-dataviews",hideTitleFromUI:!0},(0,l.createElement)(Dv,{categoryId:t,type:n,titleId:`${y}-title`,descriptionId:`${y}-description`}),(0,l.createElement)(Z_,{paginationInfo:p,fields:d,actions:h,data:m||ib,getItemId:e=>e.name,isLoading:u,view:a,onChangeView:g,deferredRendering:!0,supportedLayouts:[Gt]})))}function pb({data:e,columns:t}){return(0,l.createElement)("div",{className:"edit-site-table-wrapper"},(0,l.createElement)("table",{className:"edit-site-table"},(0,l.createElement)("thead",null,(0,l.createElement)("tr",null,t.map((e=>(0,l.createElement)("th",{key:e.header},e.header))))),(0,l.createElement)("tbody",null,e.map(((e,n)=>(0,l.createElement)("tr",{key:n},t.map(((t,n)=>(0,l.createElement)("td",{style:{maxWidth:t.maxWidth?t.maxWidth:void 0},key:n},t.cell(e))))))))))}const{useHistory:hb}=nt(bt.privateApis);function fb(){const{canCreate:e,postType:t}=(0,d.useSelect)((e=>{const{supportsTemplatePartsMode:t}=e(ia).getSettings();return{canCreate:!t,postType:e(Se.store).getPostType(Mt)}}),[]),[n,a]=(0,f.useState)(!1),r=hb();return e&&t?(0,l.createElement)(l.Fragment,null,(0,l.createElement)(_.Button,{variant:"primary",onClick:()=>a(!0)},t.labels.add_new_item),n&&(0,l.createElement)(Js,{closeModal:()=>a(!1),blocks:[],onCreate:e=>{a(!1),r.push({postId:e.id,postType:Mt,canvas:"edit"})},onError:()=>a(!1)})):null}const{useLocation:gb}=nt(bt.privateApis);function yb(){const{params:{didAccessPatternsPage:e}}=gb(),{records:t}=(0,Se.useEntityRecords)("postType",Mt,{per_page:-1}),n=[{header:(0,b.__)("Template Part"),cell:t=>(0,l.createElement)(_.__experimentalVStack,null,(0,l.createElement)(_.__experimentalHeading,{as:"h3",level:5},(0,l.createElement)(Tt,{params:{postId:t.id,postType:t.type,didAccessPatternsPage:e?1:void 0},state:{backPath:"/wp_template_part/all"}},(0,an.decodeEntities)(t.title?.rendered||t.slug)))),maxWidth:400},{header:(0,b.__)("Added by"),cell:e=>(0,l.createElement)(Bs,{postType:e.type,postId:e.id})},{header:(0,l.createElement)(_.VisuallyHidden,null,(0,b.__)("Actions")),cell:e=>(0,l.createElement)(zs,{postType:e.type,postId:e.id})}];return(0,l.createElement)(Nv,{title:(0,b.__)("Template Parts"),actions:(0,l.createElement)(fb,null)},t&&(0,l.createElement)(pb,{data:t,columns:n}))}const vb={id:"delete-template",label:(0,b.__)("Delete template"),isPrimary:!0,icon:Fo,isEligible:Ls,hideModalHeader:!0,RenderModal:({item:e,closeModal:t})=>{const{removeTemplate:n}=(0,d.useDispatch)(ia);return(0,l.createElement)(_.__experimentalVStack,{spacing:"5"},(0,l.createElement)(_.__experimentalText,null,(0,b.sprintf)(
// translators: %s: The template or template part's title.
(0,b.__)('Are you sure you want to delete "%s"?'),(0,an.decodeEntities)(e.title.rendered))),(0,l.createElement)(_.__experimentalHStack,{justify:"right"},(0,l.createElement)(_.Button,{variant:"tertiary",onClick:t},(0,b.__)("Cancel")),(0,l.createElement)(_.Button,{variant:"primary",onClick:()=>n(e,{allowUndo:!1})},(0,b.__)("Delete"))))}},_b={id:"rename-template",label:(0,b.__)("Rename"),isEligible:e=>Ls(e)&&e.is_custom,RenderModal:({item:e,closeModal:t})=>{const n=(0,an.decodeEntities)(e.title.rendered),[a,r]=(0,f.useState)(n),{editEntityRecord:s,__experimentalSaveSpecifiedEntityEdits:i}=(0,d.useDispatch)(Se.store),{createSuccessNotice:o,createErrorNotice:c}=(0,d.useDispatch)(xe.store);return(0,l.createElement)("form",{onSubmit:async function(n){n.preventDefault();try{await s("postType",e.type,e.id,{title:a}),r(""),t(),await i("postType",e.type,e.id,["title"],{throwOnError:!0}),o(e.type===It?(0,b.__)("Template renamed."):(0,b.__)("Template part renamed."),{type:"snackbar"})}catch(t){const n=e.type===It?(0,b.__)("An error occurred while renaming the template."):(0,b.__)("An error occurred while renaming the template part."),a=t.message&&"unknown_error"!==t.code?t.message:n;c(a,{type:"snackbar"})}}},(0,l.createElement)(_.__experimentalVStack,{spacing:"5"},(0,l.createElement)(_.TextControl,{__nextHasNoMarginBottom:!0,label:(0,b.__)("Name"),value:a,onChange:r,required:!0}),(0,l.createElement)(_.__experimentalHStack,{justify:"right"},(0,l.createElement)(_.Button,{variant:"tertiary",onClick:t},(0,b.__)("Cancel")),(0,l.createElement)(_.Button,{variant:"primary",type:"submit"},(0,b.__)("Save")))))}},{useHistory:bb}=nt(bt.privateApis),Eb={id:"move-to-trash",label:(0,b.__)("Move to Trash"),isPrimary:!0,icon:Fo,isEligible({status:e}){return"trash"!==e},hideModalHeader:!0,RenderModal:({item:e,closeModal:t})=>{const{createSuccessNotice:n,createErrorNotice:a}=(0,d.useDispatch)(xe.store),{deleteEntityRecord:r}=(0,d.useDispatch)(Se.store);return(0,l.createElement)(_.__experimentalVStack,{spacing:"5"},(0,l.createElement)(_.__experimentalText,null,(0,b.sprintf)(
// translators: %s: The page's title.
(0,b.__)('Are you sure you want to delete "%s"?'),(0,an.decodeEntities)(e.title.rendered))),(0,l.createElement)(_.__experimentalHStack,{justify:"right"},(0,l.createElement)(_.Button,{variant:"tertiary",onClick:t},(0,b.__)("Cancel")),(0,l.createElement)(_.Button,{variant:"primary",onClick:async()=>{try{await r("postType",e.type,e.id,{},{throwOnError:!0}),n((0,b.sprintf)(/* translators: The page's title. */
(0,b.__)('"%s" moved to the Trash.'),(0,an.decodeEntities)(e.title.rendered)),{type:"snackbar",id:"edit-site-page-trashed"})}catch(e){const t=e.message&&"unknown_error"!==e.code?e.message:(0,b.__)("An error occurred while moving the page to the trash.");a(t,{type:"snackbar"})}}},(0,b.__)("Delete"))))}},wb={id:"view-post",label:(0,b.__)("View"),isPrimary:!0,icon:uy,isEligible(e){return"trash"!==e.status},callback(e){document.location.href=e.link}},xb={id:"view-post-revisions",label:(0,b.__)("View revisions"),isPrimary:!1,isEligible:e=>{var t,n;if("trash"===e.status)return!1;const a=null!==(t=e?._links?.["predecessor-version"]?.[0]?.id)&&void 0!==t?t:null,r=null!==(n=e?._links?.["version-history"]?.[0]?.count)&&void 0!==n?n:0;return a&&r>1},callback(e){const t=(0,Et.addQueryArgs)("revision.php",{revision:e?._links?.["predecessor-version"]?.[0]?.id});document.location.href=t}},Sb=1e4;function Cb(){const{isLoaded:e}=As(),[t,n]=(0,f.useState)(!1),a=(0,d.useSelect)((e=>{const n=e(Se.store).hasResolvingSelectors();return!t&&!n}),[t]);return(0,f.useEffect)((()=>{let e;return t||(e=setTimeout((()=>{n(!0)}),Sb)),()=>{clearTimeout(e)}}),[t]),(0,f.useEffect)((()=>{if(a){const e=setTimeout((()=>{n(!0)}),1e3);return()=>{clearTimeout(e)}}}),[a]),!t||!e}function kb({postType:e,postId:t}){Di({postId:t,postType:e});const n=Cb();return(0,l.createElement)(ay,{isLoading:n})}const{ExperimentalBlockEditorProvider:Tb,useGlobalStyle:Pb}=nt(we.privateApis),{useHistory:Nb}=nt(bt.privateApis),Ib=[],Mb={[Ht]:{},[Gt]:{mediaField:"preview",primaryField:"title"},[Ut]:{primaryField:"title",mediaField:"preview"}},Ab={type:Ht,search:"",page:1,perPage:20,hiddenFields:["preview"],layout:{},filters:[]};function Ob(e=""){return si()(e.trim().toLowerCase())}function Rb({item:e,viewType:t}){return t===Ut?(0,l.createElement)(l.Fragment,null,(0,an.decodeEntities)(e.title?.rendered)||(0,b.__)("(no title)")):(0,l.createElement)(_.__experimentalVStack,{spacing:1},(0,l.createElement)(_.__experimentalView,{as:"span",className:"dataviews-view-grid__title-field"},(0,l.createElement)(Tt,{params:{postId:e.id,postType:e.type,canvas:"edit"}},(0,an.decodeEntities)(e.title?.rendered)||(0,b.__)("(no title)"))))}function Db({item:e,viewType:t}){const{text:n,icon:a,imageUrl:r}=Ds(e.type,e.id),s=t!==Ut;return(0,l.createElement)(_.__experimentalHStack,{alignment:"left",spacing:1},s&&r&&(0,l.createElement)(Fs,{imageUrl:r}),s&&!r&&(0,l.createElement)("div",{className:"edit-site-list-added-by__icon"},(0,l.createElement)(_.Icon,{icon:a})),(0,l.createElement)("span",null,n))}function Fb({content:e,viewType:t}){const n=t_(),[a="white"]=Pb("color.background"),r=(0,f.useMemo)((()=>(0,c.parse)(e)),[e]);return r?.length?(0,l.createElement)(Tb,{settings:n},(0,l.createElement)("div",{className:`page-templates-preview-field is-viewtype-${t}`,style:{backgroundColor:a}},(0,l.createElement)(we.BlockPreview,{blocks:r}))):null}function Bb(){const[e,t]=(0,f.useState)(null),[n,a]=(0,f.useState)(Ab),{records:r,isResolving:s}=(0,Se.useEntityRecords)("postType",It,{per_page:-1}),i=Nb(),o=(0,f.useCallback)((e=>t(1===e?.length?e[0].id:null)),[t]),c=(0,f.useMemo)((()=>{if(!r)return Ib;const e=new Set;return r.forEach((t=>{e.add(t.author_text)})),Array.from(e).map((e=>({value:e,label:e})))}),[r]),u=(0,f.useMemo)((()=>[{header:(0,b.__)("Preview"),id:"preview",render:({item:e})=>(0,l.createElement)(Fb,{content:e.content.raw,viewType:n.type}),minWidth:120,maxWidth:120,enableSorting:!1},{header:(0,b.__)("Template"),id:"title",getValue:({item:e})=>e.title?.rendered,render:({item:e})=>(0,l.createElement)(Rb,{item:e,viewType:n.type}),maxWidth:400,enableHiding:!1},{header:(0,b.__)("Description"),id:"description",getValue:({item:e})=>e.description,render:({item:e})=>e.description?(0,an.decodeEntities)(e.description):(0,l.createElement)(l.Fragment,null,(0,l.createElement)(_.__experimentalText,{variant:"muted","aria-hidden":"true"},"—"),(0,l.createElement)(_.VisuallyHidden,null,(0,b.__)("No description."))),maxWidth:200,enableSorting:!1},{header:(0,b.__)("Author"),id:"author",getValue:({item:e})=>e.author_text,render:({item:e})=>(0,l.createElement)(Db,{viewType:n.type,item:e}),enableHiding:!1,type:Wt,elements:c}]),[c,n.type]),{data:m,paginationInfo:p}=(0,f.useMemo)((()=>{if(!r)return{data:Ib,paginationInfo:{totalItems:0,totalPages:0}};let e=[...r];if(n.search){const t=Ob(n.search);e=e.filter((e=>Ob(e.title?.rendered||e.slug).includes(t)||Ob(e.description).includes(t)))}return n.filters.length>0&&n.filters.forEach((t=>{"author"===t.field&&t.operator===jt&&t.value?e=e.filter((e=>e.author_text===t.value)):"author"===t.field&&t.operator===Zt&&t.value&&(e=e.filter((e=>e.author_text!==t.value)))})),n.sort&&(e=r_({data:e,view:n,fields:u,textFields:["title"]})),s_({data:e,view:n})}),[r,n,u]),h=function(){const{revertTemplate:e}=(0,d.useDispatch)(ia),{saveEditedEntityRecord:t}=(0,d.useDispatch)(Se.store),{createSuccessNotice:n,createErrorNotice:a}=(0,d.useDispatch)(xe.store);return(0,f.useMemo)((()=>({id:"reset-template",label:(0,b.__)("Reset template"),isPrimary:!0,icon:br,isEligible:sn,async callback(r){try{await e(r,{allowUndo:!1}),await t("postType",r.type,r.id),n((0,b.sprintf)(/* translators: The template/part's name. */
(0,b.__)('"%s" reverted.'),(0,an.decodeEntities)(r.title.rendered)),{type:"snackbar",id:"edit-site-template-reverted"})}catch(e){const t=r.type===It?(0,b.__)("An error occurred while reverting the template."):(0,b.__)("An error occurred while reverting the template part."),n=e.message&&"unknown_error"!==e.code?e.message:t;a(n,{type:"snackbar"})}}})),[a,n,e,t])}(),g=(0,f.useMemo)((()=>[h,vb,_b,xb]),[h]),y=(0,f.useCallback)((e=>{e.type!==n.type&&(e={...e,layout:{...Mb[e.type]}}),a(e)}),[n.type,a]);return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(Nv,{className:n.type===Ut?"edit-site-template-pages-list-view":null,title:(0,b.__)("Templates"),actions:(0,l.createElement)(Ts,{templateType:It,showIcon:!1,toggleProps:{variant:"primary"}})},(0,l.createElement)(Z_,{paginationInfo:p,fields:u,actions:g,data:m,isLoading:s,view:n,onChangeView:y,onSelectionChange:o,deferredRendering:!n.hiddenFields?.includes("preview")})),n.type===Ut&&(0,l.createElement)(Nv,null,(0,l.createElement)("div",{className:"edit-site-template-pages-preview",tabIndex:0,role:"button",onKeyDown:t=>{const{keyCode:n}=t;n!==Sa.ENTER&&n!==Sa.SPACE||i.push({postId:e,postType:It,canvas:"edit"})},onClick:()=>i.push({postId:e,postType:It,canvas:"edit"})},null!==e?(0,l.createElement)(kb,{postId:e,postType:It}):(0,l.createElement)("div",{style:{display:"flex",flexDirection:"column",justifyContent:"center",textAlign:"center",height:"100%"}},(0,l.createElement)("p",null,(0,b.__)("Select a template to preview"))))))}var Lb=function({id:e,size:t=["large","medium","thumbnail"],...n}){const{record:a}=(0,Se.useEntityRecord)("root","media",e),r=t.find((e=>!!a?.media_details?.sizes[e])),s=a?.media_details?.sizes[r];return s?(0,l.createElement)("img",{...n,src:s.source_url,alt:a.alt_text}):null};const{useLocation:Vb,useHistory:zb}=nt(bt.privateApis),Gb=[],Hb=[{value:"draft",label:(0,b.__)("Draft")},{value:"future",label:(0,b.__)("Scheduled")},{value:"pending",label:(0,b.__)("Pending Review")},{value:"private",label:(0,b.__)("Private")},{value:"publish",label:(0,b.__)("Published")},{value:"trash",label:(0,b.__)("Trash")}],Ub="draft,future,pending,private,publish";function Wb(){const e="page",[t,n]=function(e){const{params:{activeView:t="all",isCustom:n="false"}}=Vb(),a="false"===n&&Vo[e].find((({slug:e})=>e===t))?.view,[r,s]=(0,f.useState)(a);(0,f.useEffect)((()=>{a&&s(a)}),[a]);const i=(0,d.useSelect)((e=>{if("true"!==n)return;const{getEditedEntityRecord:a}=e(Se.store);return a("postType","wp_dataviews",Number(t))}),[t,n]),{editEntityRecord:o}=(0,d.useDispatch)(Se.store),l=(0,f.useMemo)((()=>i?.content&&JSON.parse(i?.content)),[i?.content]),c=(0,f.useCallback)((e=>{o("postType","wp_dataviews",i?.id,{content:JSON.stringify(e)})}),[o,i?.id]);return"false"===n?[r,s]:"true"===n&&l?[l,c]:[Vo[e][0].view,s]}(e),[a,r]=(0,f.useState)(null),s=zb(),i=(0,f.useCallback)((e=>r(1===e?.length?e[0].id:null)),[r]),o=(0,f.useCallback)((t=>{1===t?.length&&s.push({postId:t[0].id,postType:e})}),[s,e]),c=(0,f.useMemo)((()=>{const e={};return t.filters.forEach((t=>{"status"===t.field&&t.operator===jt&&(e.status=t.value),"author"===t.field&&t.operator===jt?e.author=t.value:"author"===t.field&&t.operator===Zt&&(e.author_exclude=t.value)})),e.status&&""!==e.status||(e.status=Ub),{per_page:t.perPage,page:t.page,_embed:"author",order:t.sort?.direction,orderby:t.sort?.field,search:t.search,...e}}),[t]),{records:u,isResolving:m,totalItems:p,totalPages:h}=(0,Se.useEntityRecords)("postType",e,c),{records:g,isResolving:y}=(0,Se.useEntityRecords)("root","user"),v=(0,f.useMemo)((()=>({totalItems:p,totalPages:h})),[p,h]),E=(0,f.useMemo)((()=>[{id:"featured-image",header:(0,b.__)("Featured Image"),getValue:({item:e})=>e.featured_media,render:({item:e})=>e.featured_media?(0,l.createElement)(Lb,{className:"edit-site-page-pages__featured-image",id:e.featured_media,size:t.type===Gt?["large","full","medium","thumbnail"]:["thumbnail","medium","large","full"]}):null,enableSorting:!1},{header:(0,b.__)("Title"),id:"title",getValue:({item:e})=>e.title?.rendered,render:({item:e})=>(0,l.createElement)(_.__experimentalVStack,{spacing:1},(0,l.createElement)(_.__experimentalView,{as:"span",className:"dataviews-view-grid__title-field"},[Ht,Gt].includes(t.type)?(0,l.createElement)(Tt,{params:{postId:e.id,postType:e.type,canvas:"edit"}},(0,an.decodeEntities)(e.title?.rendered)||(0,b.__)("(no title)")):(0,an.decodeEntities)(e.title?.rendered)||(0,b.__)("(no title)"))),maxWidth:400,enableHiding:!1},{header:(0,b.__)("Author"),id:"author",getValue:({item:e})=>e._embedded?.author[0]?.name,type:Wt,elements:g?.map((({id:e,name:t})=>({value:e,label:t})))||[]},{header:(0,b.__)("Status"),id:"status",getValue:({item:e})=>{var t;return null!==(t=Hb.find((({value:t})=>t===e.status))?.label)&&void 0!==t?t:e.status},type:Wt,elements:Hb,enableSorting:!1,filterBy:{operators:[jt]}},{header:(0,b.__)("Date"),id:"date",getValue:({item:e})=>e.date,render:({item:e})=>{const t=(0,_r.dateI18n)((0,_r.getSettings)().formats.datetimeAbbreviated,(0,_r.getDate)(e.date));return(0,l.createElement)("time",null,t)}}]),[g,t.type]),w=function(){const{createSuccessNotice:e,createErrorNotice:t}=(0,d.useDispatch)(xe.store),{deleteEntityRecord:n}=(0,d.useDispatch)(Se.store);return(0,f.useMemo)((()=>({id:"permanently-delete",label:(0,b.__)("Permanently delete"),isPrimary:!0,icon:Fo,isEligible({status:e}){return"trash"===e},async callback(a){try{await n("postType",a.type,a.id,{force:!0},{throwOnError:!0}),e((0,b.sprintf)(/* translators: The posts's title. */
(0,b.__)('"%s" permanently deleted.'),(0,an.decodeEntities)(a.title.rendered)),{type:"snackbar",id:"edit-site-post-permanently-deleted"})}catch(e){const n=e.message&&"unknown_error"!==e.code?e.message:(0,b.__)("An error occurred while permanently deleting the post.");t(n,{type:"snackbar"})}}})),[e,t,n])}(),x=function(){const{createSuccessNotice:e,createErrorNotice:t}=(0,d.useDispatch)(xe.store),{editEntityRecord:n,saveEditedEntityRecord:a}=(0,d.useDispatch)(Se.store);return(0,f.useMemo)((()=>({id:"restore",label:(0,b.__)("Restore"),isPrimary:!0,icon:br,isEligible({status:e}){return"trash"===e},async callback(r){await n("postType",r.type,r.id,{status:"draft"});try{await a("postType",r.type,r.id,{throwOnError:!0}),e((0,b.sprintf)(/* translators: The posts's title. */
(0,b.__)('"%s" has been restored.'),(0,an.decodeEntities)(r.title.rendered)),{type:"snackbar",id:"edit-site-post-restored"})}catch(e){const n=e.message&&"unknown_error"!==e.code?e.message:(0,b.__)("An error occurred while restoring the post.");t(n,{type:"snackbar"})}}})),[e,t,n,a])}(),S=function(){const e=bb();return(0,f.useMemo)((()=>({id:"edit-post",label:(0,b.__)("Edit"),isEligible({status:e}){return"trash"!==e},callback(t){e.push({postId:t.id,postType:t.type,canvas:"edit"})}})),[e])}(),C=(0,f.useMemo)((()=>[wb,Eb,x,w,S,xb]),[w,x,S]),k=(0,f.useCallback)((e=>{e.type!==t.type&&(e={...e,layout:{...Bo[e.type]}}),n(e)}),[t.type,n]),[T,P]=(0,f.useState)(!1),N=(0,f.useCallback)((()=>{T||P(!0)}),[T]),I=(0,f.useCallback)((()=>{T&&P(!1)}),[T]),M=(0,f.useCallback)((({type:e,id:t})=>{s.push({postId:t,postType:e,canvas:"edit"}),I()}),[s]);return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(Nv,{className:t.type===Ut?"edit-site-page-pages-list-view":null,title:(0,b.__)("Pages"),actions:(0,l.createElement)(l.Fragment,null,(0,l.createElement)(_.Button,{variant:"primary",onClick:N},(0,b.__)("Add new page")),T&&(0,l.createElement)(Ao,{onSave:M,onClose:I}))},(0,l.createElement)(Z_,{paginationInfo:v,fields:E,actions:C,data:u||Gb,isLoading:m||y,view:t,onChangeView:k,onSelectionChange:i,onDetailsChange:o})),t.type===Ut&&(0,l.createElement)(Nv,null,(0,l.createElement)("div",{className:"edit-site-page-pages-preview",tabIndex:0,role:"button",onKeyDown:t=>{const{keyCode:n}=t;n!==Sa.ENTER&&n!==Sa.SPACE||s.push({postId:a,postType:e,canvas:"edit"})},onClick:()=>s.push({postId:a,postType:e,canvas:"edit"})},null!==a?(0,l.createElement)(kb,{postId:a,postType:e}):(0,l.createElement)("div",{style:{display:"flex",flexDirection:"column",justifyContent:"center",textAlign:"center",height:"100%"}},(0,l.createElement)("p",null,(0,b.__)("Select a page to preview"))))))}const{useLocation:jb}=nt(bt.privateApis);function Zb(){const{params:{path:e}}=jb();return"/wp_template/all"===e?(0,l.createElement)(Bb,null):"/wp_template_part/all"===e?(0,l.createElement)(yb,null):"/patterns"===e?window?.__experimentalAdminViews?(0,l.createElement)(mb,null):(0,l.createElement)(a_,null):window?.__experimentalAdminViews&&"/page"===e?(0,l.createElement)(Wb,null):null}const{useCommands:qb}=nt(ca.privateApis),{useCommandContext:Yb}=nt(la.privateApis),{useLocation:Kb}=nt(bt.privateApis),{useGlobalStyle:Xb}=nt(we.privateApis),Jb=.5;function Qb(){Fi(),function(){const e=Jy(),{params:t}=Xy(),n=(0,d.useSelect)((e=>nt(e(ia)).getCanvasMode()),[]),{setCanvasMode:a}=nt((0,d.useDispatch)(ia)),r=(0,f.useRef)(n),{canvas:s}=t,i=(0,f.useRef)(s),o=(0,f.useRef)(t);(0,f.useEffect)((()=>{o.current=t}),[t]),(0,f.useEffect)((()=>{r.current=n,"init"!==n&&("edit"===n&&i.current!==n&&e.push({...o.current,canvas:"edit"}),"view"===n&&void 0!==i.current&&e.push({...o.current,canvas:void 0}))}),[n,e]),(0,f.useEffect)((()=>{i.current=s,"edit"!==s&&"view"!==r.current?a("view"):"edit"===s&&"edit"!==r.current&&a("edit")}),[s,a])}(),qb(),(0,la.useCommandLoader)({name:"core/exit-code-editor",hook:Sv,context:"site-editor-edit"}),(0,la.useCommandLoader)({name:"core/edit-site/page-content-focus",hook:xv,context:"site-editor-edit"}),(0,la.useCommandLoader)({name:"core/edit-site/manipulate-document",hook:Cv}),(0,la.useCommandLoader)({name:"core/edit-site/patterns",hook:Tv,context:"site-editor-edit"}),(0,la.useCommandLoader)({name:"core/edit-site/edit-ui",hook:kv}),function(){const e=(0,d.useSelect)((e=>{const{getUnstableBase:t}=e(Se.store);return t()?.home}),[]);(0,la.useCommand)({name:"core/edit-site/view-site",label:(0,b.__)("View site"),callback:({close:t})=>{t(),window.open(e,"_blank")},icon:uy}),(0,la.useCommandLoader)({name:"core/edit-site/open-styles",hook:pv}),(0,la.useCommandLoader)({name:"core/edit-site/toggle-styles-welcome-guide",hook:hv}),(0,la.useCommandLoader)({name:"core/edit-site/reset-global-styles",hook:fv}),(0,la.useCommandLoader)({name:"core/edit-site/open-styles-css",hook:gv}),(0,la.useCommandLoader)({name:"core/edit-site/open-styles-revisions",hook:yv})}(),(0,we.useBlockCommands)();const{params:e}=Kb(),t=(0,se.useViewportMatch)("medium","<"),n=oy(e,t),a=!n,{isDistractionFree:r,hasFixedToolbar:s,hasBlockSelected:i,canvasMode:o,previousShortcut:c,nextShortcut:u}=(0,d.useSelect)((e=>{const{getAllShortcutKeyCombinations:t}=e(oa.store),{getCanvasMode:n}=nt(e(ia));return{canvasMode:n(),previousShortcut:t("core/edit-site/previous-region"),nextShortcut:t("core/edit-site/next-region"),hasFixedToolbar:e(k.store).get("core","fixedToolbar"),isDistractionFree:e(k.store).get("core","distractionFree"),hasBlockSelected:e(we.store).getBlockSelectionStart()}}),[]),m="edit"===o,p=(0,_.__unstableUseNavigateRegions)({previous:c,next:u}),h=(0,se.useReducedMotion)(),g=t&&"view"===o&&!n||!t&&("view"===o||!a),y=t&&a&&m||!t||!a,E=t&&n||a&&m,[w,x]=(0,se.useResizeObserver)(),[S]=(0,se.useResizeObserver)(),C=Cb(),[T,P]=(0,f.useState)(!1);let N;N="view"===o?"view":r?"isDistractionFree":o;let I="site-editor";"edit"===o&&a&&(I="site-editor-edit"),i&&(I="block-selection-edit"),Yb(I);const[M]=Xb("color.background"),[A]=Xb("color.gradient");return"init"===o?null:(0,l.createElement)(l.Fragment,null,(0,l.createElement)(la.CommandMenu,null),(0,l.createElement)(rv,null),(0,l.createElement)(sv,null),S,(0,l.createElement)("div",{...p,ref:p.ref,className:v()("edit-site-layout",p.className,{"is-distraction-free":r&&m,"is-full-canvas":E,"is-edit-mode":m,"has-fixed-toolbar":s,"is-block-toolbar-visible":i})},(0,l.createElement)(_.__unstableMotion.div,{className:"edit-site-layout__header-container",variants:{isDistractionFree:{opacity:0,transition:{type:"tween",delay:.8,delayChildren:.8}},isDistractionFreeHovering:{opacity:1,transition:{type:"tween",delay:.2,delayChildren:.2}},view:{opacity:1},edit:{opacity:1}},whileHover:r?"isDistractionFreeHovering":void 0,animate:N},(0,l.createElement)(Wy,{isTransparent:T,className:"edit-site-layout__hub"}),(0,l.createElement)(_.__unstableAnimatePresence,{initial:!1},a&&m&&(0,l.createElement)(ie,{key:"header",className:"edit-site-layout__header",ariaLabel:(0,b.__)("Editor top bar"),as:_.__unstableMotion.div,variants:{isDistractionFree:{opacity:0,y:0},isDistractionFreeHovering:{opacity:1,y:0},view:{opacity:1,y:"-100%"},edit:{opacity:1,y:0}},exit:{y:"-100%"},initial:{opacity:r?1:0,y:r?0:"-100%"},transition:{type:"tween",duration:h?0:.2,ease:"easeOut"}},(0,l.createElement)(zy,null)))),(0,l.createElement)("div",{className:"edit-site-layout__content"},(0,l.createElement)(ie,{ariaLabel:(0,b.__)("Navigation"),className:"edit-site-layout__sidebar-region"},(0,l.createElement)(_.__unstableAnimatePresence,null,g&&(0,l.createElement)(_.__unstableMotion.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{type:"tween",duration:h||t?0:Jb,ease:"easeOut"},className:"edit-site-layout__sidebar"},(0,l.createElement)(nc,null)))),(0,l.createElement)(av,null),y&&(0,l.createElement)(l.Fragment,null,n&&(0,l.createElement)(Zb,null),a&&(0,l.createElement)("div",{className:"edit-site-layout__canvas-container"},w,!!x.width&&(0,l.createElement)(_.__unstableMotion.div,{whileHover:a&&"view"===o?{scale:1.005,transition:{duration:h?0:.5,ease:"easeOut"}}:{},initial:!1,layout:"position",className:v()("edit-site-layout__canvas",{"is-right-aligned":T}),transition:{type:"tween",duration:h?0:Jb,ease:"easeOut"}},(0,l.createElement)(iy,null,(0,l.createElement)(Ky,{isReady:!C,isFullWidth:m,defaultSize:{width:x.width-24,height:x.height},isOversized:T,setIsOversized:P,innerContentStyle:{background:null!=A?A:M}},(0,l.createElement)(ay,{isLoading:C})))))))))}const{RouterProvider:$b}=nt(bt.privateApis);function eE(){const{createErrorNotice:e}=(0,d.useDispatch)(xe.store);return(0,l.createElement)(_.SlotFillProvider,null,(0,l.createElement)(Aa,null,(0,l.createElement)(g.UnsavedChangesWarning,null),(0,l.createElement)($b,null,(0,l.createElement)(Qb,null),(0,l.createElement)(j.PluginArea,{onError:function(t){e((0,b.sprintf)(/* translators: %s: plugin name */
(0,b.__)('The "%s" plugin has encountered an error and cannot be rendered.'),t))}}))))}function tE({className:e,...t}){return(0,l.createElement)(re,{panelClassName:e,className:"edit-site-sidebar-edit-mode",scope:"core/edit-site",...t})}function nE(e){return(0,l.createElement)($,{__unstableExplicitMenuItem:!0,scope:"core/edit-site",...e})}var aE=(0,se.compose)((0,j.withPluginContext)(((e,t)=>{var n;return{as:null!==(n=t.as)&&void 0!==n?n:_.MenuItem,icon:t.icon||e.icon,name:"core/edit-site/plugin-more-menu"}})))(J);function rE(e,t){const n=document.getElementById(e),a=(0,f.createRoot)(n);(0,d.dispatch)(c.store).reapplyBlockTypeFilters();const r=(0,u.__experimentalGetCoreBlocks)().filter((({name:e})=>"core/freeform"!==e));return(0,u.registerCoreBlocks)(r),(0,d.dispatch)(c.store).setFreeformFallbackBlockName("core/html"),(0,_e.registerLegacyWidgetBlock)({inserter:!1}),(0,_e.registerWidgetGroupBlock)({inserter:!1}),(0,u.__experimentalRegisterExperimentalCoreBlocks)({enableFSEBlocks:!0}),(0,d.dispatch)(k.store).setDefaults("core/edit-site",{editorMode:"visual",welcomeGuide:!0,welcomeGuideStyles:!0,welcomeGuidePage:!0,welcomeGuideTemplate:!0}),(0,d.dispatch)(k.store).setDefaults("core",{allowRightClickOverrides:!0,distractionFree:!1,fixedToolbar:!1,focusMode:!1,inactivePanels:[],keepCaretInsideBlock:!1,openPanels:["post-status"],showBlockBreadcrumbs:!0,showListViewByDefault:!1}),(0,d.dispatch)(W).setDefaultComplementaryArea("core/edit-site","edit-site/template"),(0,d.dispatch)(ia).updateSettings(t),(0,d.dispatch)(g.store).updateEditorSettings({defaultTemplateTypes:t.defaultTemplateTypes,defaultTemplatePartAreas:t.defaultTemplatePartAreas}),window.addEventListener("dragover",(e=>e.preventDefault()),!1),window.addEventListener("drop",(e=>e.preventDefault()),!1),a.render((0,l.createElement)(eE,null)),a}function sE(){h()("wp.editSite.reinitializeEditor",{since:"6.2",version:"6.3"})}}(),(window.wp=window.wp||{}).editSite=a}();
//# sourceMappingURL=index.min.js.map