PluginProbe
Gutenberg / 23.5.3
Gutenberg v23.5.3
23.9.1 23.9.0 23.8.0 23.7.2 23.7.1 23.7.0 23.6.1 23.6.2 23.6.0 23.5.3 23.5.2 23.5.1 23.5.0 23.4.0 23.3.2 23.3.1 23.3.0 23.2.0 23.2.1 23.2.2 23.1.1 23.1.0 23.0.1 12.6.0 7.4.0 All 402 releases
gutenberg / build / scripts / editor / index.min.js

index.min.js in Gutenberg 23.5.3, at build/scripts/editor/index.min.js

540 lines 1.4 MB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 "use strict";var wp;(wp||={}).editor=(()=>{var aRe=Object.create;var fP=Object.defineProperty;var lRe=Object.getOwnPropertyDescriptor;var cRe=Object.getOwnPropertyNames;var uRe=Object.getPrototypeOf,dRe=Object.prototype.hasOwnProperty;var Ws=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,r)=>(typeof require<"u"?require:t)[r]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var Ze=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Rn=(e,t)=>{for(var r in t)fP(e,r,{get:t[r],enumerable:!0})},dY=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of cRe(t))!dRe.call(e,n)&&n!==r&&fP(e,n,{get:()=>t[n],enumerable:!(o=lRe(t,n))||o.enumerable});return e};var a=(e,t,r)=>(r=e!=null?aRe(uRe(e)):{},dY(t||!e||!e.__esModule?fP(r,"default",{value:e,enumerable:!0}):r,e)),fRe=e=>dY(fP({},"__esModule",{value:!0}),e);var G=Ze((Dot,fY)=>{fY.exports=window.wp.data});var oe=Ze((Lot,mY)=>{mY.exports=window.wp.coreData});var H=Ze((Bot,pY)=>{pY.exports=window.wp.element});var ke=Ze((Vot,hY)=>{hY.exports=window.wp.compose});var An=Ze((jot,gY)=>{gY.exports=window.wp.hooks});var pe=Ze((zot,vY)=>{vY.exports=window.wp.blockEditor});var kt=Ze((qot,CY)=>{CY.exports=window.wp.blocks});var en=Ze((Kot,TY)=>{TY.exports=window.wp.date});var uo=Ze((Zot,EY)=>{EY.exports=window.wp.url});var Va=Ze((Xot,PY)=>{PY.exports=window.wp.deprecated});var Nt=Ze((Qot,kY)=>{kY.exports=window.wp.preferences});var V=Ze((Jot,RY)=>{RY.exports=window.wp.i18n});var be=Ze((ent,AY)=>{AY.exports=window.wp.primitives});var T=Ze((tnt,IY)=>{IY.exports=window.ReactJSXRuntime});var zm=Ze((Mat,DY)=>{DY.exports=window.wp.privateApis});var Um=Ze((qat,XY)=>{XY.exports=window.wp.a11y});var Zd=Ze((Kat,QY)=>{QY.exports=window.wp.apiFetch});var Rt=Ze((Zat,JY)=>{JY.exports=window.wp.notices});var Lt=Ze(($at,nq)=>{nq.exports=window.wp.htmlEntities});var sq=Ze((rlt,iq)=>{"use strict";iq.exports=function e(t,r){if(t===r)return!0;if(t&&r&&typeof t=="object"&&typeof r=="object"){if(t.constructor!==r.constructor)return!1;var o,n,i;if(Array.isArray(t)){if(o=t.length,o!=r.length)return!1;for(n=o;n--!==0;)if(!e(t[n],r[n]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if(i=Object.keys(t),o=i.length,o!==Object.keys(r).length)return!1;for(n=o;n--!==0;)if(!Object.prototype.hasOwnProperty.call(r,i[n]))return!1;for(n=o;n--!==0;){var s=i[n];if(!e(t[s],r[s]))return!1}return!0}return t!==t&&r!==r}});var Wm=Ze((dlt,fq)=>{fq.exports=window.wp.mediaUtils});var Rx=Ze((flt,mq)=>{mq.exports=window.wp.uploadMedia});var W=Ze((klt,Aq)=>{Aq.exports=window.wp.components});var mc=Ze((nct,Xq)=>{Xq.exports=window.wp.patterns});var xe=Ze((ict,Qq)=>{Qq.exports=window.React});var _u=Ze((Qut,HK)=>{HK.exports=window.ReactDOM});var BZ=Ze(LZ=>{"use strict";var jy=xe();function mNe(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var pNe=typeof Object.is=="function"?Object.is:mNe,hNe=jy.useState,gNe=jy.useEffect,vNe=jy.useLayoutEffect,bNe=jy.useDebugValue;function yNe(e,t){var r=t(),o=hNe({inst:{value:r,getSnapshot:t}}),n=o[0].inst,i=o[1];return vNe(function(){n.value=r,n.getSnapshot=t,hV(n)&&i({inst:n})},[e,r,t]),gNe(function(){return hV(n)&&i({inst:n}),e(function(){hV(n)&&i({inst:n})})},[e]),bNe(r),r}function hV(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!pNe(e,r)}catch{return!0}}function wNe(e,t){return t()}var SNe=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?wNe:yNe;LZ.useSyncExternalStore=jy.useSyncExternalStore!==void 0?jy.useSyncExternalStore:SNe});var U2=Ze((Mft,VZ)=>{"use strict";VZ.exports=BZ()});var zZ=Ze(jZ=>{"use strict";var W2=xe(),_Ne=U2();function xNe(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var CNe=typeof Object.is=="function"?Object.is:xNe,TNe=_Ne.useSyncExternalStore,ENe=W2.useRef,PNe=W2.useEffect,kNe=W2.useMemo,RNe=W2.useDebugValue;jZ.useSyncExternalStoreWithSelector=function(e,t,r,o,n){var i=ENe(null);if(i.current===null){var s={hasValue:!1,value:null};i.current=s}else s=i.current;i=kNe(function(){function c(h){if(!u){if(u=!0,d=h,h=o(h),n!==void 0&&s.hasValue){var g=s.value;if(n(g,h))return f=g}return f=h}if(g=f,CNe(d,h))return g;var v=o(h);return n!==void 0&&n(g,v)?(d=h,g):(d=h,f=v)}var u=!1,d,f,m=r===void 0?null:r;return[function(){return c(t())},m===null?void 0:function(){return c(m())}]},[t,r,o,n]);var l=TNe(e,i[0],i[1]);return PNe(function(){s.hasValue=!0,s.value=l},[l]),RNe(l),l}});var UZ=Ze((Dft,HZ)=>{"use strict";HZ.exports=zZ()});var aJ=Ze((Iyt,sJ)=>{sJ.exports=window.wp.theme});var l1=Ze((M0t,BJ)=>{BJ.exports=window.wp.blob});var l0=Ze((Rwt,WR)=>{var $$={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u1EA4:"A",\u1EAE:"A",\u1EB2:"A",\u1EB4:"A",\u1EB6:"A",\u00C6:"AE",\u1EA6:"A",\u1EB0:"A",\u0202:"A",\u1EA2:"A",\u1EA0:"A",\u1EA8:"A",\u1EAA:"A",\u1EAC:"A",\u00C7:"C",\u1E08:"C",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u1EBE:"E",\u1E16:"E",\u1EC0:"E",\u1E14:"E",\u1E1C:"E",\u0206:"E",\u1EBA:"E",\u1EBC:"E",\u1EB8:"E",\u1EC2:"E",\u1EC4:"E",\u1EC6:"E",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u1E2E:"I",\u020A:"I",\u1EC8:"I",\u1ECA:"I",\u00D0:"D",\u00D1:"N",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u1ED0:"O",\u1E4C:"O",\u1E52:"O",\u020E:"O",\u1ECE:"O",\u1ECC:"O",\u1ED4:"O",\u1ED6:"O",\u1ED8:"O",\u1EDC:"O",\u1EDE:"O",\u1EE0:"O",\u1EDA:"O",\u1EE2:"O",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u1EE6:"U",\u1EE4:"U",\u1EEC:"U",\u1EEE:"U",\u1EF0:"U",\u00DD:"Y",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u1EA5:"a",\u1EAF:"a",\u1EB3:"a",\u1EB5:"a",\u1EB7:"a",\u00E6:"ae",\u1EA7:"a",\u1EB1:"a",\u0203:"a",\u1EA3:"a",\u1EA1:"a",\u1EA9:"a",\u1EAB:"a",\u1EAD:"a",\u00E7:"c",\u1E09:"c",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u1EBF:"e",\u1E17:"e",\u1EC1:"e",\u1E15:"e",\u1E1D:"e",\u0207:"e",\u1EBB:"e",\u1EBD:"e",\u1EB9:"e",\u1EC3:"e",\u1EC5:"e",\u1EC7:"e",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u1E2F:"i",\u020B:"i",\u1EC9:"i",\u1ECB:"i",\u00F0:"d",\u00F1:"n",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u1ED1:"o",\u1E4D:"o",\u1E53:"o",\u020F:"o",\u1ECF:"o",\u1ECD:"o",\u1ED5:"o",\u1ED7:"o",\u1ED9:"o",\u1EDD:"o",\u1EDF:"o",\u1EE1:"o",\u1EDB:"o",\u1EE3:"o",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u1EE7:"u",\u1EE5:"u",\u1EED:"u",\u1EEF:"u",\u1EF1:"u",\u00FD:"y",\u00FF:"y",\u0100:"A",\u0101:"a",\u0102:"A",\u0103:"a",\u0104:"A",\u0105:"a",\u0106:"C",\u0107:"c",\u0108:"C",\u0109:"c",\u010A:"C",\u010B:"c",\u010C:"C",\u010D:"c",C\u0306:"C",c\u0306:"c",\u010E:"D",\u010F:"d",\u0110:"D",\u0111:"d",\u0112:"E",\u0113:"e",\u0114:"E",\u0115:"e",\u0116:"E",\u0117:"e",\u0118:"E",\u0119:"e",\u011A:"E",\u011B:"e",\u011C:"G",\u01F4:"G",\u011D:"g",\u01F5:"g",\u011E:"G",\u011F:"g",\u0120:"G",\u0121:"g",\u0122:"G",\u0123:"g",\u0124:"H",\u0125:"h",\u0126:"H",\u0127:"h",\u1E2A:"H",\u1E2B:"h",\u0128:"I",\u0129:"i",\u012A:"I",\u012B:"i",\u012C:"I",\u012D:"i",\u012E:"I",\u012F:"i",\u0130:"I",\u0131:"i",\u0132:"IJ",\u0133:"ij",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u1E30:"K",\u1E31:"k",K\u0306:"K",k\u0306:"k",\u0139:"L",\u013A:"l",\u013B:"L",\u013C:"l",\u013D:"L",\u013E:"l",\u013F:"L",\u0140:"l",\u0141:"l",\u0142:"l",\u1E3E:"M",\u1E3F:"m",M\u0306:"M",m\u0306:"m",\u0143:"N",\u0144:"n",\u0145:"N",\u0146:"n",\u0147:"N",\u0148:"n",\u0149:"n",N\u0306:"N",n\u0306:"n",\u014C:"O",\u014D:"o",\u014E:"O",\u014F:"o",\u0150:"O",\u0151:"o",\u0152:"OE",\u0153:"oe",P\u0306:"P",p\u0306:"p",\u0154:"R",\u0155:"r",\u0156:"R",\u0157:"r",\u0158:"R",\u0159:"r",R\u0306:"R",r\u0306:"r",\u0212:"R",\u0213:"r",\u015A:"S",\u015B:"s",\u015C:"S",\u015D:"s",\u015E:"S",\u0218:"S",\u0219:"s",\u015F:"s",\u0160:"S",\u0161:"s",\u0162:"T",\u0163:"t",\u021B:"t",\u021A:"T",\u0164:"T",\u0165:"t",\u0166:"T",\u0167:"t",T\u0306:"T",t\u0306:"t",\u0168:"U",\u0169:"u",\u016A:"U",\u016B:"u",\u016C:"U",\u016D:"u",\u016E:"U",\u016F:"u",\u0170:"U",\u0171:"u",\u0172:"U",\u0173:"u",\u0216:"U",\u0217:"u",V\u0306:"V",v\u0306:"v",\u0174:"W",\u0175:"w",\u1E82:"W",\u1E83:"w",X\u0306:"X",x\u0306:"x",\u0176:"Y",\u0177:"y",\u0178:"Y",Y\u0306:"Y",y\u0306:"y",\u0179:"Z",\u017A:"z",\u017B:"Z",\u017C:"z",\u017D:"Z",\u017E:"z",\u017F:"s",\u0192:"f",\u01A0:"O",\u01A1:"o",\u01AF:"U",\u01B0:"u",\u01CD:"A",\u01CE:"a",\u01CF:"I",\u01D0:"i",\u01D1:"O",\u01D2:"o",\u01D3:"U",\u01D4:"u",\u01D5:"U",\u01D6:"u",\u01D7:"U",\u01D8:"u",\u01D9:"U",\u01DA:"u",\u01DB:"U",\u01DC:"u",\u1EE8:"U",\u1EE9:"u",\u1E78:"U",\u1E79:"u",\u01FA:"A",\u01FB:"a",\u01FC:"AE",\u01FD:"ae",\u01FE:"O",\u01FF:"o",\u00DE:"TH",\u00FE:"th",\u1E54:"P",\u1E55:"p",\u1E64:"S",\u1E65:"s",X\u0301:"X",x\u0301:"x",\u0403:"\u0413",\u0453:"\u0433",\u040C:"\u041A",\u045C:"\u043A",A\u030B:"A",a\u030B:"a",E\u030B:"E",e\u030B:"e",I\u030B:"I",i\u030B:"i",\u01F8:"N",\u01F9:"n",\u1ED2:"O",\u1ED3:"o",\u1E50:"O",\u1E51:"o",\u1EEA:"U",\u1EEB:"u",\u1E80:"W",\u1E81:"w",\u1EF2:"Y",\u1EF3:"y",\u0200:"A",\u0201:"a",\u0204:"E",\u0205:"e",\u0208:"I",\u0209:"i",\u020C:"O",\u020D:"o",\u0210:"R",\u0211:"r",\u0214:"U",\u0215:"u",B\u030C:"B",b\u030C:"b",\u010C\u0323:"C",\u010D\u0323:"c",\u00CA\u030C:"E",\u00EA\u030C:"e",F\u030C:"F",f\u030C:"f",\u01E6:"G",\u01E7:"g",\u021E:"H",\u021F:"h",J\u030C:"J",\u01F0:"j",\u01E8:"K",\u01E9:"k",M\u030C:"M",m\u030C:"m",P\u030C:"P",p\u030C:"p",Q\u030C:"Q",q\u030C:"q",\u0158\u0329:"R",\u0159\u0329:"r",\u1E66:"S",\u1E67:"s",V\u030C:"V",v\u030C:"v",W\u030C:"W",w\u030C:"w",X\u030C:"X",x\u030C:"x",Y\u030C:"Y",y\u030C:"y",A\u0327:"A",a\u0327:"a",B\u0327:"B",b\u0327:"b",\u1E10:"D",\u1E11:"d",\u0228:"E",\u0229:"e",\u0190\u0327:"E",\u025B\u0327:"e",\u1E28:"H",\u1E29:"h",I\u0327:"I",i\u0327:"i",\u0197\u0327:"I",\u0268\u0327:"i",M\u0327:"M",m\u0327:"m",O\u0327:"O",o\u0327:"o",Q\u0327:"Q",q\u0327:"q",U\u0327:"U",u\u0327:"u",X\u0327:"X",x\u0327:"x",Z\u0327:"Z",z\u0327:"z",\u0439:"\u0438",\u0419:"\u0418",\u0451:"\u0435",\u0401:"\u0415"},eee=Object.keys($$).join("|"),M6e=new RegExp(eee,"g"),F6e=new RegExp(eee,"");function D6e(e){return $$[e]}var tee=function(e){return e.replace(M6e,D6e)},L6e=function(e){return!!e.match(F6e)};WR.exports=tee;WR.exports.has=L6e;WR.exports.remove=tee});var g0=Ze((SSt,Yee)=>{Yee.exports=window.wp.wordcount});var go=Ze((v1t,eoe)=>{eoe.exports=window.wp.keycodes});var hI=Ze((U2t,Hie)=>{"use strict";Hie.exports=function e(t,r){if(t===r)return!0;if(t&&r&&typeof t=="object"&&typeof r=="object"){if(t.constructor!==r.constructor)return!1;var o,n,i;if(Array.isArray(t)){if(o=t.length,o!=r.length)return!1;for(n=o;n--!==0;)if(!e(t[n],r[n]))return!1;return!0}if(t instanceof Map&&r instanceof Map){if(t.size!==r.size)return!1;for(n of t.entries())if(!r.has(n[0]))return!1;for(n of t.entries())if(!e(n[1],r.get(n[0])))return!1;return!0}if(t instanceof Set&&r instanceof Set){if(t.size!==r.size)return!1;for(n of t.entries())if(!r.has(n[0]))return!1;return!0}if(ArrayBuffer.isView(t)&&ArrayBuffer.isView(r)){if(o=t.length,o!=r.length)return!1;for(n=o;n--!==0;)if(t[n]!==r[n])return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if(i=Object.keys(t),o=i.length,o!==Object.keys(r).length)return!1;for(n=o;n--!==0;)if(!Object.prototype.hasOwnProperty.call(r,i[n]))return!1;for(n=o;n--!==0;){var s=i[n];if(!e(t[s],r[s]))return!1}return!0}return t!==t&&r!==r}});var Uj=Ze((rOt,qse)=>{qse.exports=window.wp.warning});var fO=Ze((E6t,Yle)=>{"use strict";var m8e=function(t){return p8e(t)&&!h8e(t)};function p8e(e){return!!e&&typeof e=="object"}function h8e(e){var t=Object.prototype.toString.call(e);return t==="[object RegExp]"||t==="[object Date]"||b8e(e)}var g8e=typeof Symbol=="function"&&Symbol.for,v8e=g8e?Symbol.for("react.element"):60103;function b8e(e){return e.$$typeof===v8e}function y8e(e){return Array.isArray(e)?[]:{}}function xC(e,t){return t.clone!==!1&&t.isMergeableObject(e)?rw(y8e(e),e,t):e}function w8e(e,t,r){return e.concat(t).map(function(o){return xC(o,r)})}function S8e(e,t){if(!t.customMerge)return rw;var r=t.customMerge(e);return typeof r=="function"?r:rw}function _8e(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[]}function Wle(e){return Object.keys(e).concat(_8e(e))}function Gle(e,t){try{return t in e}catch{return!1}}function x8e(e,t){return Gle(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))}function C8e(e,t,r){var o={};return r.isMergeableObject(e)&&Wle(e).forEach(function(n){o[n]=xC(e[n],r)}),Wle(t).forEach(function(n){x8e(e,n)||(Gle(e,n)&&r.isMergeableObject(t[n])?o[n]=S8e(n,r)(e[n],t[n],r):o[n]=xC(t[n],r))}),o}function rw(e,t,r){r=r||{},r.arrayMerge=r.arrayMerge||w8e,r.isMergeableObject=r.isMergeableObject||m8e,r.cloneUnlessOtherwiseSpecified=xC;var o=Array.isArray(t),n=Array.isArray(e),i=o===n;return i?o?r.arrayMerge(e,t,r):C8e(e,t,r):xC(t,r)}rw.all=function(t,r){if(!Array.isArray(t))throw new Error("first argument should be an array");return t.reduce(function(o,n){return rw(o,n,r)},{})};var T8e=rw;Yle.exports=T8e});var fa=Ze((gDt,Ace)=>{Ace.exports=window.wp.keyboardShortcuts});var Oce=Ze((vDt,Ice)=>{Ice.exports=window.wp.viewport});var Qp=Ze((bDt,Nce)=>{Nce.exports=window.wp.plugins});var Vz=Ze((MVt,Zde)=>{Zde.exports=window.wp.styleEngine});var Fge=Ze((IKt,Mge)=>{Mge.exports=window.wp.blockSerializationDefaultParser});var CT=Ze((OKt,Dge)=>{Dge.exports=window.wp.richText});var UH=Ze((UKt,Gge)=>{Gge.exports=window.wp.commands});var Pb=Ze((eQt,ybe)=>{ybe.exports=window.wp.dom});var exe=Ze((Zor,$_e)=>{"use strict";var v$e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";$_e.exports=v$e});var nxe=Ze((Xor,oxe)=>{"use strict";var b$e=exe();function txe(){}function rxe(){}rxe.resetWarningCache=txe;oxe.exports=function(){function e(o,n,i,s,l,c){if(c!==b$e){var u=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 u.name="Invariant Violation",u}}e.isRequired=e;function t(){return e}var r={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:rxe,resetWarningCache:txe};return r.PropTypes=r,r}});var sxe=Ze(($or,ixe)=>{ixe.exports=nxe()();var Qor,Jor});var lxe=Ze((a6,axe)=>{(function(e,t){if(typeof define=="function"&&define.amd)define(["module","exports"],t);else if(typeof a6<"u")t(axe,a6);else{var r={exports:{}};t(r,r.exports),e.autosize=r.exports}})(a6,function(e,t){"use strict";var r=typeof Map=="function"?new Map:(function(){var c=[],u=[];return{has:function(f){return c.indexOf(f)>-1},get:function(f){return u[c.indexOf(f)]},set:function(f,m){c.indexOf(f)===-1&&(c.push(f),u.push(m))},delete:function(f){var m=c.indexOf(f);m>-1&&(c.splice(m,1),u.splice(m,1))}}})(),o=function(u){return new Event(u,{bubbles:!0})};try{new Event("test")}catch{o=function(d){var f=document.createEvent("Event");return f.initEvent(d,!0,!1),f}}function n(c){if(!c||!c.nodeName||c.nodeName!=="TEXTAREA"||r.has(c))return;var u=null,d=null,f=null;function m(){var w=window.getComputedStyle(c,null);w.resize==="vertical"?c.style.resize="none":w.resize==="both"&&(c.style.resize="horizontal"),w.boxSizing==="content-box"?u=-(parseFloat(w.paddingTop)+parseFloat(w.paddingBottom)):u=parseFloat(w.borderTopWidth)+parseFloat(w.borderBottomWidth),isNaN(u)&&(u=0),b()}function h(w){{var _=c.style.width;c.style.width="0px",c.offsetWidth,c.style.width=_}c.style.overflowY=w}function g(w){for(var _=[];w&&w.parentNode&&w.parentNode instanceof Element;)w.parentNode.scrollTop&&_.push({node:w.parentNode,scrollTop:w.parentNode.scrollTop}),w=w.parentNode;return _}function v(){if(c.scrollHeight!==0){var w=g(c),_=document.documentElement&&document.documentElement.scrollTop;c.style.height="",c.style.height=c.scrollHeight+u+"px",d=c.clientWidth,w.forEach(function(x){x.node.scrollTop=x.scrollTop}),_&&(document.documentElement.scrollTop=_)}}function b(){v();var w=Math.round(parseFloat(c.style.height)),_=window.getComputedStyle(c,null),x=_.boxSizing==="content-box"?Math.round(parseFloat(_.height)):c.offsetHeight;if(x<w?_.overflowY==="hidden"&&(h("scroll"),v(),x=_.boxSizing==="content-box"?Math.round(parseFloat(window.getComputedStyle(c,null).height)):c.offsetHeight):_.overflowY!=="hidden"&&(h("hidden"),v(),x=_.boxSizing==="content-box"?Math.round(parseFloat(window.getComputedStyle(c,null).height)):c.offsetHeight),f!==x){f=x;var E=o("autosize:resized");try{c.dispatchEvent(E)}catch{}}}var S=function(){c.clientWidth!==d&&b()},y=function(w){window.removeEventListener("resize",S,!1),c.removeEventListener("input",b,!1),c.removeEventListener("keyup",b,!1),c.removeEventListener("autosize:destroy",y,!1),c.removeEventListener("autosize:update",b,!1),Object.keys(w).forEach(function(_){c.style[_]=w[_]}),r.delete(c)}.bind(c,{height:c.style.height,resize:c.style.resize,overflowY:c.style.overflowY,overflowX:c.style.overflowX,wordWrap:c.style.wordWrap});c.addEventListener("autosize:destroy",y,!1),"onpropertychange"in c&&"oninput"in c&&c.addEventListener("keyup",b,!1),window.addEventListener("resize",S,!1),c.addEventListener("input",b,!1),c.addEventListener("autosize:update",b,!1),c.style.overflowX="hidden",c.style.wordWrap="break-word",r.set(c,{destroy:y,update:b}),m()}function i(c){var u=r.get(c);u&&u.destroy()}function s(c){var u=r.get(c);u&&u.update()}var l=null;typeof window>"u"||typeof window.getComputedStyle!="function"?(l=function(u){return u},l.destroy=function(c){return c},l.update=function(c){return c}):(l=function(u,d){return u&&Array.prototype.forEach.call(u.length?u:[u],function(f){return n(f,d)}),u},l.destroy=function(c){return c&&Array.prototype.forEach.call(c.length?c:[c],i),c},l.update=function(c){return c&&Array.prototype.forEach.call(c.length?c:[c],s),c}),t.default=l,e.exports=t.default})});var uxe=Ze((enr,cxe)=>{var y$e=function(e,t,r){return r=window.getComputedStyle,(r?r(e):e.currentStyle)[t.replace(/-(\w)/gi,function(o,n){return n.toUpperCase()})]};cxe.exports=y$e});var fxe=Ze((tnr,dxe)=>{var kW=uxe();function w$e(e){var t=kW(e,"line-height"),r=parseFloat(t,10);if(t===r+""){var o=e.style.lineHeight;e.style.lineHeight=t+"em",t=kW(e,"line-height"),r=parseFloat(t,10),o?e.style.lineHeight=o:delete e.style.lineHeight}if(t.indexOf("pt")!==-1?(r*=4,r/=3):t.indexOf("mm")!==-1?(r*=96,r/=25.4):t.indexOf("cm")!==-1?(r*=96,r/=2.54):t.indexOf("in")!==-1?r*=96:t.indexOf("pc")!==-1&&(r*=16),r=Math.round(r),t==="normal"){var n=e.nodeName,i=document.createElement(n);i.innerHTML="&nbsp;",n.toUpperCase()==="TEXTAREA"&&i.setAttribute("rows","1");var s=kW(e,"font-size");i.style.fontSize=s,i.style.padding="0px",i.style.border="0px";var l=document.body;l.appendChild(i);var c=i.offsetHeight;r=c,l.removeChild(i)}return r}dxe.exports=w$e});var pxe=Ze(hm=>{"use strict";var S$e=hm&&hm.__extends||(function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,r){t.__proto__=r}||function(t,r){for(var o in r)r.hasOwnProperty(o)&&(t[o]=r[o])};return function(t,r){e(t,r);function o(){this.constructor=t}t.prototype=r===null?Object.create(r):(o.prototype=r.prototype,new o)}})(),RW=hm&&hm.__assign||Object.assign||function(e){for(var t,r=1,o=arguments.length;r<o;r++){t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},_$e=hm&&hm.__rest||function(e,t){var r={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(r[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var n=0,o=Object.getOwnPropertySymbols(e);n<o.length;n++)t.indexOf(o[n])<0&&(r[o[n]]=e[o[n]]);return r};hm.__esModule=!0;var c6=xe(),hE=sxe(),l6=lxe(),x$e=fxe(),C$e=x$e,mxe="autosize:resized",T$e=(function(e){S$e(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.state={lineHeight:null},r.textarea=null,r.onResize=function(o){r.props.onResize&&r.props.onResize(o)},r.updateLineHeight=function(){r.textarea&&r.setState({lineHeight:C$e(r.textarea)})},r.onChange=function(o){var n=r.props.onChange;r.currentValue=o.currentTarget.value,n&&n(o)},r}return t.prototype.componentDidMount=function(){var r=this,o=this.props,n=o.maxRows,i=o.async;typeof n=="number"&&this.updateLineHeight(),typeof n=="number"||i?setTimeout(function(){return r.textarea&&l6(r.textarea)}):this.textarea&&l6(this.textarea),this.textarea&&this.textarea.addEventListener(mxe,this.onResize)},t.prototype.componentWillUnmount=function(){this.textarea&&(this.textarea.removeEventListener(mxe,this.onResize),l6.destroy(this.textarea))},t.prototype.render=function(){var r=this,o=this,n=o.props,i=n.onResize,s=n.maxRows,l=n.onChange,c=n.style,u=n.innerRef,d=n.children,f=_$e(n,["onResize","maxRows","onChange","style","innerRef","children"]),m=o.state.lineHeight,h=s&&m?m*s:null;return c6.createElement("textarea",RW({},f,{onChange:this.onChange,style:h?RW({},c,{maxHeight:h}):c,ref:function(g){r.textarea=g,typeof r.props.innerRef=="function"?r.props.innerRef(g):r.props.innerRef&&(r.props.innerRef.current=g)}}),d)},t.prototype.componentDidUpdate=function(){this.textarea&&l6.update(this.textarea)},t.defaultProps={rows:1,async:!1},t.propTypes={rows:hE.number,maxRows:hE.number,onResize:hE.func,innerRef:hE.any,async:hE.bool},t})(c6.Component);hm.TextareaAutosize=c6.forwardRef(function(e,t){return c6.createElement(T$e,RW({},e,{innerRef:t}))})});var AW=Ze((onr,hxe)=>{"use strict";var E$e=pxe();hxe.exports=E$e.TextareaAutosize});var h1e=Ze((cir,p1e)=>{p1e.exports=window.wp.serverSideRender});var Mot={};Rn(Mot,{AlignmentToolbar:()=>B$e,Autocomplete:()=>L$e,AutosaveMonitor:()=>DN,BlockAlignmentToolbar:()=>V$e,BlockControls:()=>j$e,BlockEdit:()=>z$e,BlockEditorKeyboardShortcuts:()=>H$e,BlockFormatControls:()=>U$e,BlockIcon:()=>W$e,BlockInspector:()=>G$e,BlockList:()=>Y$e,BlockMover:()=>q$e,BlockNavigationDropdown:()=>K$e,BlockSelectionClearer:()=>Z$e,BlockSettingsMenu:()=>X$e,BlockTitle:()=>Q$e,BlockToolbar:()=>J$e,CharacterCount:()=>i_,ColorPalette:()=>$$e,ContrastChecker:()=>eet,CopyHandler:()=>tet,DefaultBlockAppender:()=>ret,DocumentBar:()=>$N,DocumentOutline:()=>fS,DocumentOutlineCheck:()=>uye,EditorHistoryRedo:()=>iM,EditorHistoryUndo:()=>lM,EditorKeyboardShortcuts:()=>tS,EditorKeyboardShortcutsRegister:()=>vye,EditorNotices:()=>Aye,EditorProvider:()=>Zve,EditorSnackbars:()=>Mye,EntitiesSavedStates:()=>gM,ErrorBoundary:()=>qye,FontSizePicker:()=>oet,InnerBlocks:()=>iet,Inserter:()=>net,InspectorAdvancedControls:()=>set,InspectorControls:()=>aet,LocalAutosaveMonitor:()=>Qye,MediaPlaceholder:()=>pet,MediaUpload:()=>het,MediaUploadCheck:()=>get,MultiSelectScrollIntoView:()=>vet,NavigableToolbar:()=>bet,ObserveTyping:()=>yet,PageAttributesCheck:()=>hS,PageAttributesOrder:()=>o0e,PageAttributesPanel:()=>_M,PageAttributesParent:()=>p0e,PageTemplate:()=>TM,PanelColorSettings:()=>cet,PlainText:()=>uet,PluginBlockSettingsMenuItem:()=>I0e,PluginDocumentSettingPanel:()=>AM,PluginMoreMenuItem:()=>F0e,PluginPostPublishPanel:()=>OM,PluginPostStatusInfo:()=>MM,PluginPrePublishPanel:()=>DM,PluginPreviewMenuItem:()=>W0e,PluginSidebar:()=>jb,PluginSidebarMoreMenuItem:()=>q0e,PostAuthor:()=>zM,PostAuthorCheck:()=>HM,PostAuthorPanel:()=>GM,PostComments:()=>ZM,PostDiscussionPanel:()=>t3,PostExcerpt:()=>XT,PostExcerptCheck:()=>Wb,PostExcerptPanel:()=>Qwe,PostFeaturedImage:()=>$T,PostFeaturedImageCheck:()=>mm,PostFeaturedImagePanel:()=>d3,PostFormat:()=>tE,PostFormatCheck:()=>IS,PostLastRevision:()=>p3,PostLastRevisionCheck:()=>qb,PostLastRevisionPanel:()=>vSe,PostLockedModal:()=>CSe,PostPendingStatus:()=>kSe,PostPendingStatusCheck:()=>g3,PostPingbacks:()=>$M,PostPreviewButton:()=>Gh,PostPublishButton:()=>FS,PostPublishButtonLabel:()=>y3,PostPublishPanel:()=>V3,PostSavedState:()=>X3,PostSchedule:()=>BS,PostScheduleCheck:()=>Q3,PostScheduleLabel:()=>VS,PostSchedulePanel:()=>e6,PostSticky:()=>H3,PostStickyCheck:()=>j3,PostSwitchToDraftButton:()=>G_e,PostSyncStatus:()=>o6,PostTaxonomies:()=>qS,PostTaxonomiesCheck:()=>n6,PostTaxonomiesFlatTermSelector:()=>gW,PostTaxonomiesHierarchicalTermSelector:()=>yW,PostTaxonomiesPanel:()=>s6,PostTemplatePanel:()=>BM,PostTextEditor:()=>gE,PostTitle:()=>b6,PostTitleRaw:()=>w6,PostTrash:()=>e_,PostTrashCheck:()=>S6,PostTypeSupportCheck:()=>oo,PostURL:()=>wE,PostURLCheck:()=>T6,PostURLLabel:()=>Hxe,PostURLPanel:()=>R6,PostVisibility:()=>iE,PostVisibilityCheck:()=>Yxe,PostVisibilityLabel:()=>x3,RichText:()=>y1e,RichTextShortcut:()=>det,RichTextToolbarButton:()=>fet,ServerSideRender:()=>v1e.default,SkipToSelectedBlock:()=>wet,TableOfContents:()=>l1e,TextEditorGlobalKeyboardShortcuts:()=>Let,ThemeSupportCheck:()=>l3,TimeToRead:()=>n_,URLInput:()=>_et,URLInputButton:()=>xet,URLPopover:()=>Cet,UnsavedChangesWarning:()=>m1e,VisualEditorGlobalKeyboardShortcuts:()=>Det,Warning:()=>Tet,WordCount:()=>o_,WritingFlow:()=>Eet,__unstableRichTextInputEvent:()=>met,cleanForSlug:()=>Cq,createCustomColorsHOC:()=>Pet,getColorClassName:()=>ket,getColorObjectByAttributeValues:()=>Ret,getColorObjectByColorValue:()=>Aet,getFontSize:()=>Iet,getFontSizeClass:()=>Oet,getTemplatePartIcon:()=>jm,linkAutocompleter:()=>MN,mediaUpload:()=>l2,privateApis:()=>oRe,registerEntityAction:()=>Aot,registerEntityField:()=>Oot,store:()=>R,storeConfig:()=>D1,transformStyles:()=>nRe.transformStyles,unregisterEntityAction:()=>Iot,unregisterEntityField:()=>Not,useEntitiesSavedStatesIsDirty:()=>hM,usePostScheduleLabel:()=>jS,usePostURLLabel:()=>FW,usePostVisibilityLabel:()=>dW,userAutocompleter:()=>FN,withColorContext:()=>Net,withColors:()=>Met,withFontSizes:()=>Fet});var sbe=a(G(),1),abe=a(oe(),1),lbe=a(H(),1),cbe=a(ke(),1),ube=a(An(),1);var NN=a(G(),1);var _Y=a(G(),1);var bY=a(pe(),1),yY={...bY.SETTINGS_DEFAULTS,richEditingEnabled:!0,codeEditingEnabled:!0,fontLibraryEnabled:!0,enableCustomFields:void 0,defaultRenderingMode:"post-only"};var wY=a(G(),1);function mRe(e={},t){return t.type==="SET_IS_READY"?{...e,[t.kind]:{...e[t.kind],[t.name]:!0}}:e}function pRe(e={},t){switch(t.type){case"REGISTER_ENTITY_ACTION":return{...e,[t.kind]:{...e[t.kind],[t.name]:[...(e[t.kind]?.[t.name]??[]).filter(r=>r.id!==t.config.id),t.config]}};case"UNREGISTER_ENTITY_ACTION":return{...e,[t.kind]:{...e[t.kind],[t.name]:(e[t.kind]?.[t.name]??[]).filter(r=>r.id!==t.actionId)}}}return e}function hRe(e={},t){switch(t.type){case"REGISTER_ENTITY_FIELD":return{...e,[t.kind]:{...e[t.kind],[t.name]:[...(e[t.kind]?.[t.name]??[]).filter(r=>r.id!==t.config.id),t.config]}};case"UNREGISTER_ENTITY_FIELD":return{...e,[t.kind]:{...e[t.kind],[t.name]:(e[t.kind]?.[t.name]??[]).filter(r=>r.id!==t.fieldId)}}}return e}var SY=(0,wY.combineReducers)({actions:pRe,fields:hRe,isReady:mRe});function mP(e){return e&&typeof e=="object"&&"raw"in e?e.raw:e}function gRe(e=null,t){return t.type==="SET_EDITED_POST"?t.postId:e}function vRe(e=null,t){return t.type==="SET_CURRENT_TEMPLATE_ID"?t.id:e}function bRe(e=null,t){return t.type==="SET_EDITED_POST"?t.postType:e}function yRe(e={isValid:!0},t){return t.type==="SET_TEMPLATE_VALIDITY"?{...e,isValid:t.isValid}:e}function wRe(e={},t){switch(t.type){case"REQUEST_POST_UPDATE_START":case"REQUEST_POST_UPDATE_FINISH":return{pending:t.type==="REQUEST_POST_UPDATE_START",options:t.options||{}}}return e}function SRe(e={},t){switch(t.type){case"REQUEST_POST_DELETE_START":case"REQUEST_POST_DELETE_FINISH":return{pending:t.type==="REQUEST_POST_DELETE_START"}}return e}function _Re(e={isLocked:!1},t){return t.type==="UPDATE_POST_LOCK"?t.lock:e}function xRe(e={},t){switch(t.type){case"LOCK_POST_SAVING":return{...e,[t.lockName]:!0};case"UNLOCK_POST_SAVING":{let{[t.lockName]:r,...o}=e;return o}}return e}function CRe(e={},t){switch(t.type){case"LOCK_POST_AUTOSAVING":return{...e,[t.lockName]:!0};case"UNLOCK_POST_AUTOSAVING":{let{[t.lockName]:r,...o}=e;return o}}return e}function TRe(e=yY,t){return t.type==="UPDATE_EDITOR_SETTINGS"?{...e,...t.settings}:e}function ERe(e="post-only",t){return t.type==="SET_RENDERING_MODE"?t.mode:e}function PRe(e=void 0,t){return t.type==="SET_CANVAS_WIDTH"?t.width:e}function kRe(e=[],t){switch(t.type){case"REMOVE_PANEL":if(!e.includes(t.panelName))return[...e,t.panelName]}return e}function RRe(e=!1,t){switch(t.type){case"SET_IS_LIST_VIEW_OPENED":return t.isOpen?!1:e;case"SET_IS_INSERTER_OPENED":return t.value}return e}function ARe(e=!1,t){switch(t.type){case"SET_IS_INSERTER_OPENED":return t.value?!1:e;case"SET_IS_LIST_VIEW_OPENED":return t.isOpen}return e}function IRe(e={current:null}){return e}function ORe(e={current:null}){return e}function NRe(e=!1,t){switch(t.type){case"OPEN_PUBLISH_SIDEBAR":return!0;case"CLOSE_PUBLISH_SIDEBAR":return!1;case"TOGGLE_PUBLISH_SIDEBAR":return!e}return e}function MRe(e="/",t){switch(t.type){case"SET_STYLES_PATH":return t.path;case"RESET_STYLES_NAVIGATION":return"/"}return e}function FRe(e=!1,t){switch(t.type){case"SET_SHOW_STYLEBOOK":return t.show;case"RESET_STYLES_NAVIGATION":return!1}return e}function DRe(e=null,t){return t.type==="SET_CURRENT_REVISION_ID"?t.revisionId:e}function LRe(e=1,t){switch(t.type){case"SET_REVISION_PAGE":return t.page;case"SET_CURRENT_REVISION_ID":return t.revisionId?e:1}return e}function BRe(e=!0,t){switch(t.type){case"SET_SHOW_REVISION_DIFF":return t.showDiff;case"SET_CURRENT_REVISION_ID":return t.revisionId?e:!0}return e}function VRe(e={},t){return t.type==="SELECT_NOTE"?{noteId:t.noteId,options:t.options}:e}var xY=(0,_Y.combineReducers)({postId:gRe,postType:bRe,templateId:vRe,saving:wRe,deleting:SRe,postLock:_Re,template:yRe,postSavingLock:xRe,editorSettings:TRe,postAutosavingLock:CRe,renderingMode:ERe,canvasWidth:PRe,removedPanels:kRe,blockInserterPanel:RRe,inserterSidebarToggleRef:ORe,listViewPanel:ARe,listViewToggleRef:IRe,publishSidebarActive:NRe,stylesPath:MRe,showStylebook:FRe,revisionId:DRe,revisionPage:LRe,showRevisionDiff:BRe,selectedNote:VRe,dataviews:SY});var _B={};Rn(_B,{__experimentalGetDefaultTemplatePartAreas:()=>RIe,__experimentalGetDefaultTemplateType:()=>AIe,__experimentalGetDefaultTemplateTypes:()=>kIe,__experimentalGetTemplateInfo:()=>IIe,__unstableIsEditorReady:()=>CAe,canInsertBlockType:()=>CIe,canUserUseUnfilteredHTML:()=>gAe,didPostSaveRequestFail:()=>oAe,didPostSaveRequestSucceed:()=>rAe,getActivePostLock:()=>hAe,getAdjacentBlockClientId:()=>ZAe,getAutosaveAttribute:()=>UY,getBlock:()=>MAe,getBlockAttributes:()=>NAe,getBlockCount:()=>jAe,getBlockHierarchyRootClientId:()=>KAe,getBlockIndex:()=>cIe,getBlockInsertionPoint:()=>yIe,getBlockListSettings:()=>PIe,getBlockMode:()=>gIe,getBlockName:()=>IAe,getBlockOrder:()=>lIe,getBlockRootClientId:()=>qAe,getBlockSelectionEnd:()=>HAe,getBlockSelectionStart:()=>zAe,getBlocks:()=>FAe,getBlocksByClientId:()=>VAe,getClientIdsOfDescendants:()=>DAe,getClientIdsWithDescendants:()=>LAe,getCurrentPost:()=>gn,getCurrentPostAttribute:()=>xx,getCurrentPostId:()=>qs,getCurrentPostLastRevisionId:()=>GRe,getCurrentPostRevisionsCount:()=>yB,getCurrentPostType:()=>Ys,getCurrentTemplateId:()=>WRe,getDeviceType:()=>TAe,getEditedPostAttribute:()=>Zr,getEditedPostContent:()=>Px,getEditedPostPreviewLink:()=>sAe,getEditedPostSlug:()=>uAe,getEditedPostVisibility:()=>qRe,getEditorBlocks:()=>bAe,getEditorMode:()=>kAe,getEditorSelection:()=>xAe,getEditorSelectionEnd:()=>_Ae,getEditorSelectionStart:()=>SAe,getEditorSettings:()=>SB,getFirstMultiSelectedBlockClientId:()=>tIe,getGlobalBlockCount:()=>BAe,getInserterItems:()=>TIe,getLastMultiSelectedBlockClientId:()=>rIe,getMultiSelectedBlockClientIds:()=>$Ae,getMultiSelectedBlocks:()=>eIe,getMultiSelectedBlocksEndClientId:()=>aIe,getMultiSelectedBlocksStartClientId:()=>sIe,getNextBlockClientId:()=>QAe,getPermalink:()=>cAe,getPermalinkParts:()=>qY,getPostEdits:()=>Ex,getPostLockUser:()=>pAe,getPostTypeLabel:()=>OIe,getPreviousBlockClientId:()=>XAe,getRenderingMode:()=>i2,getSelectedBlock:()=>YAe,getSelectedBlockClientId:()=>GAe,getSelectedBlockCount:()=>UAe,getSelectedBlocksInitialCaretPosition:()=>JAe,getStateBeforeOptimisticTransaction:()=>RAe,getSuggestedPostFormat:()=>aAe,getTemplate:()=>_Ie,getTemplateLock:()=>xIe,hasChangedContent:()=>HY,hasEditorRedo:()=>zRe,hasEditorUndo:()=>jRe,hasInserterItems:()=>EIe,hasMultiSelection:()=>mIe,hasNonPostEntityChanges:()=>HRe,hasSelectedBlock:()=>WAe,hasSelectedInnerBlock:()=>dIe,inSomeHistory:()=>AAe,isAncestorMultiSelected:()=>iIe,isAutosavingPost:()=>nAe,isBlockInsertionPointVisible:()=>wIe,isBlockMultiSelected:()=>nIe,isBlockSelected:()=>uIe,isBlockValid:()=>OAe,isBlockWithinSelection:()=>fIe,isCaretWithinFormattedText:()=>bIe,isCleanNewPost:()=>URe,isCurrentPostPending:()=>KRe,isCurrentPostPublished:()=>wB,isCurrentPostScheduled:()=>ZRe,isDeletingPost:()=>eAe,isEditedPostAutosaveable:()=>QRe,isEditedPostBeingScheduled:()=>JRe,isEditedPostDateFloating:()=>$Re,isEditedPostDirty:()=>o2,isEditedPostEmpty:()=>GY,isEditedPostNew:()=>zY,isEditedPostPublishable:()=>XRe,isEditedPostSaveable:()=>WY,isEditorPanelEnabled:()=>yAe,isEditorPanelOpened:()=>wAe,isEditorPanelRemoved:()=>ZY,isFirstMultiSelectedBlock:()=>oIe,isInserterOpened:()=>PAe,isListViewOpened:()=>EAe,isMultiSelecting:()=>pIe,isPermalinkEditable:()=>YY,isPostAutosavingLocked:()=>KY,isPostLockTakeover:()=>mAe,isPostLocked:()=>dAe,isPostSavingLocked:()=>fAe,isPreviewingPost:()=>iAe,isPublishSidebarEnabled:()=>vAe,isPublishSidebarOpened:()=>NIe,isPublishingPost:()=>lAe,isSavingNonPostEntityChanges:()=>tAe,isSavingPost:()=>xy,isSelectionEnabled:()=>hIe,isTyping:()=>vIe,isValidTemplate:()=>SIe});var Hm=a(kt(),1),_y=a(en(),1),Cx=a(uo(),1),Kt=a(G(),1),wu=a(Va(),1),n2=a(pe(),1),mo=a(oe(),1),kx=a(Nt(),1);var $k=a(V(),1);var pP=a(H(),1),hn=(0,pP.forwardRef)(({icon:e,size:t=24,...r},o)=>(0,pP.cloneElement)(e,{width:t,height:t,...r,ref:o}));var hP=a(be(),1),UD=a(T(),1),WD=(0,UD.jsx)(hP.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,UD.jsx)(hP.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M18.5 5.5V8H20V5.5H22.5V4H20V1.5H18.5V4H16V5.5H18.5ZM13.9624 4H6C4.89543 4 4 4.89543 4 6V18C4 19.1046 4.89543 20 6 20H18C19.1046 20 20 19.1046 20 18V10.0391H18.5V18C18.5 18.2761 18.2761 18.5 18 18.5H10L10 10.4917L16.4589 10.5139L16.4641 9.01389L5.5 8.97618V6C5.5 5.72386 5.72386 5.5 6 5.5H13.9624V4ZM5.5 10.4762V18C5.5 18.2761 5.72386 18.5 6 18.5H8.5L8.5 10.4865L5.5 10.4762Z"})});var gP=a(be(),1),GD=a(T(),1),YD=(0,GD.jsx)(gP.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,GD.jsx)(gP.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"})});var vP=a(be(),1),qD=a(T(),1),KD=(0,qD.jsx)(vP.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,qD.jsx)(vP.Path,{d:"m16.5 13.5-3.7 3.7V4h-1.5v13.2l-3.8-3.7-1 1 5.5 5.6 5.5-5.6z"})});var bP=a(be(),1),ZD=a(T(),1),XD=(0,ZD.jsx)(bP.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,ZD.jsx)(bP.Path,{d:"M20 11.2H6.8l3.7-3.7-1-1L3.9 12l5.6 5.5 1-1-3.7-3.7H20z"})});var yP=a(be(),1),QD=a(T(),1),JD=(0,QD.jsx)(yP.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,QD.jsx)(yP.Path,{d:"m14.5 6.5-1 1 3.7 3.7H4v1.6h13.2l-3.7 3.7 1 1 5.6-5.5z"})});var wP=a(be(),1),$D=a(T(),1),e4=(0,$D.jsx)(wP.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,$D.jsx)(wP.Path,{d:"M12 3.9 6.5 9.5l1 1 3.8-3.7V20h1.5V6.8l3.7 3.7 1-1z"})});var SP=a(be(),1),t4=a(T(),1),r4=(0,t4.jsx)(SP.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,t4.jsx)(SP.Path,{d:"M18.5 5.5h-13c-1.1 0-2 .9-2 2v9c0 1.1.9 2 2 2h13c1.1 0 2-.9 2-2v-9c0-1.1-.9-2-2-2zm.5 11c0 .3-.2.5-.5.5h-13c-.3 0-.5-.2-.5-.5v-9c0-.3.2-.5.5-.5h13c.3 0 .5.2.5.5v9zM6.5 12H8v-2h2V8.5H6.5V12zm9.5 2h-2v1.5h3.5V12H16v2z"})});var _P=a(be(),1),o4=a(T(),1),n4=(0,o4.jsx)(_P.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,o4.jsx)(_P.Path,{d:"M17.7 4.3c-1.2 0-2.8 0-3.8 1-.6.6-.9 1.5-.9 2.6V14c-.6-.6-1.5-1-2.5-1C8.6 13 7 14.6 7 16.5S8.6 20 10.5 20c1.5 0 2.8-1 3.3-2.3.5-.8.7-1.8.7-2.5V7.9c0-.7.2-1.2.5-1.6.6-.6 1.8-.6 2.8-.6h.3V4.3h-.4z"})});var xP=a(be(),1),i4=a(T(),1),s4=(0,i4.jsx)(xP.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,i4.jsx)(xP.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M11.53 4.47a.75.75 0 1 0-1.06 1.06l8 8a.75.75 0 1 0 1.06-1.06l-8-8Zm5 1a.75.75 0 1 0-1.06 1.06l2 2a.75.75 0 1 0 1.06-1.06l-2-2Zm-11.06 10a.75.75 0 0 1 1.06 0l2 2a.75.75 0 1 1-1.06 1.06l-2-2a.75.75 0 0 1 0-1.06Zm.06-5a.75.75 0 0 0-1.06 1.06l8 8a.75.75 0 1 0 1.06-1.06l-8-8Zm-.06-3a.75.75 0 0 1 1.06 0l10 10a.75.75 0 1 1-1.06 1.06l-10-10a.75.75 0 0 1 0-1.06Zm3.06-2a.75.75 0 0 0-1.06 1.06l10 10a.75.75 0 1 0 1.06-1.06l-10-10Z"})});var CP=a(be(),1),a4=a(T(),1),Gd=(0,a4.jsx)(CP.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,a4.jsx)(CP.Path,{d:"M13.75 4.194a8 8 0 0 0-4.812.415l-.301.132a8 8 0 0 0-3.203 2.692L4 6.001v4h4L6.517 8.516q.333-.526.758-.977l.011-.012q.341-.359.733-.662l.025-.02a6.5 6.5 0 0 1 2.469-1.172l.034-.008q.117-.027.236-.05l.015-.002q.32-.06.65-.088.08-.008.16-.013a7 7 0 0 1 .323-.01L12 5.5h.05l.203.005.101.003q.146.008.293.023l.12.014.158.02q.103.015.205.033l.058.011q.107.02.212.043l.068.016a6.5 6.5 0 0 1 1.447.521l.02.01a7 7 0 0 1 .452.25l.02.014a7 7 0 0 1 .468.317l.07.054a7 7 0 0 1 .403.334l.034.03q.091.084.18.172l.047.045q.293.294.548.627l.03.038.07.097.096.135q.037.053.072.107a6 6 0 0 1 .167.265l.042.073q.236.411.413.857l.027.07a6.5 6.5 0 0 1 .418 2.014 6.6 6.6 0 0 1-.034 1.04 6 6 0 0 1-.063.424q-.109.597-.32 1.152-.016.034-.028.07a6.5 6.5 0 0 1-.413.856l-.042.073a6 6 0 0 1-.327.497l-.087.118-.02.028a7 7 0 0 1-.526.604l-.035.035-.035.032q-.089.088-.18.172l-.034.03a7 7 0 0 1-.38.317l-.093.071q-.09.067-.183.13l-.076.053q-.112.076-.227.146-.218.133-.446.247l-.028.015-.192.093-.081.036a6.5 6.5 0 0 1-1.184.396l-.058.012a7 7 0 0 1-.475.087q-.08.012-.157.02l-.122.014q-.145.015-.292.023l-.136.005-.139.003L12 18.5q-.053-.002-.104-.003l-.127-.004-.162-.007q-.08-.005-.159-.013a7 7 0 0 1-.65-.088q-.008 0-.015-.002a7 7 0 0 1-.236-.05l-.034-.008a6.5 6.5 0 0 1-4.14-3.077l-1.3.75a8 8 0 0 0 3.564 3.26l.301.131a8 8 0 0 0 11.055-7.061l.007-.33c0-1.76-.581-3.473-1.653-4.87l-.206-.256a8 8 0 0 0-4.07-2.6zM12 7.75a.75.75 0 0 0-.75.75V12a.75.75 0 0 0 .218.529l1.282-.839-1.28.84 2.5 2.5a.75.75 0 1 0 1.06-1.06l-2.28-2.28V8.5a.75.75 0 0 0-.75-.75"})});var TP=a(be(),1),l4=a(T(),1),c4=(0,l4.jsx)(TP.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,l4.jsx)(TP.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"})});var EP=a(be(),1),u4=a(T(),1),PP=(0,u4.jsx)(EP.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,u4.jsx)(EP.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"})});var kP=a(be(),1),d4=a(T(),1),RP=(0,d4.jsx)(kP.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,d4.jsx)(kP.Path,{fillRule:"evenodd",clipRule:"evenodd",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"})});var AP=a(be(),1),f4=a(T(),1),To=(0,f4.jsx)(AP.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,f4.jsx)(AP.Path,{d:"M16.5 7.5 10 13.9l-2.5-2.4-1 1 3.5 3.6 7.5-7.6z"})});var IP=a(be(),1),m4=a(T(),1),J_=(0,m4.jsx)(IP.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,m4.jsx)(IP.Path,{d:"M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z"})});var OP=a(be(),1),p4=a(T(),1),h4=(0,p4.jsx)(OP.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,p4.jsx)(OP.Path,{d:"m13.1 16-3.4-4 3.4-4 1.1 1-2.6 3 2.6 3-1.1 1z"})});var NP=a(be(),1),g4=a(T(),1),xr=(0,g4.jsx)(NP.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,g4.jsx)(NP.Path,{d:"M14.6 7l-1.2-1L8 12l5.4 6 1.2-1-4.6-5z"})});var MP=a(be(),1),v4=a(T(),1),b4=(0,v4.jsx)(MP.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,v4.jsx)(MP.Path,{d:"M10.8622 8.04053L14.2805 12.0286L10.8622 16.0167L9.72327 15.0405L12.3049 12.0286L9.72327 9.01672L10.8622 8.04053Z"})});var FP=a(be(),1),y4=a(T(),1),Cr=(0,y4.jsx)(FP.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,y4.jsx)(FP.Path,{d:"M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z"})});var DP=a(be(),1),w4=a(T(),1),S4=(0,w4.jsx)(DP.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,w4.jsx)(DP.Path,{d:"M6.5 12.4L12 8l5.5 4.4-.9 1.2L12 10l-4.5 3.6-1-1.2z"})});var LP=a(be(),1),_4=a(T(),1),_i=(0,_4.jsx)(LP.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,_4.jsx)(LP.Path,{d:"M12 13.06l3.712 3.713 1.061-1.06L13.061 12l3.712-3.712-1.06-1.06L12 10.938 8.288 7.227l-1.061 1.06L10.939 12l-3.712 3.712 1.06 1.061L12 13.061z"})});var BP=a(be(),1),x4=a(T(),1),$_=(0,x4.jsx)(BP.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,x4.jsx)(BP.Path,{d:"m13.06 12 6.47-6.47-1.06-1.06L12 10.94 5.53 4.47 4.47 5.53 10.94 12l-6.47 6.47 1.06 1.06L12 13.06l6.47 6.47 1.06-1.06L13.06 12Z"})});var VP=a(be(),1),C4=a(T(),1),T4=(0,C4.jsx)(VP.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,C4.jsx)(VP.Path,{d:"M17.3 10.1C17.3 7.60001 15.2 5.70001 12.5 5.70001C10.3 5.70001 8.4 7.10001 7.9 9.00001H7.7C5.7 9.00001 4 10.7 4 12.8C4 14.9 5.7 16.6 7.7 16.6H9.5V15.2H7.7C6.5 15.2 5.5 14.1 5.5 12.9C5.5 11.7 6.5 10.5 7.7 10.5H9L9.3 9.40001C9.7 8.10001 11 7.20001 12.5 7.20001C14.3 7.20001 15.8 8.50001 15.8 10.1V11.4L17.1 11.6C17.9 11.7 18.5 12.5 18.5 13.4C18.5 14.4 17.7 15.2 16.8 15.2H14.5V16.6H16.7C18.5 16.6 19.9 15.1 19.9 13.3C20 11.7 18.8 10.4 17.3 10.1Z M14.1245 14.2426L15.1852 13.182L12.0032 10L8.82007 13.1831L9.88072 14.2438L11.25 12.8745V18H12.75V12.8681L14.1245 14.2426Z"})});var jP=a(be(),1),E4=a(T(),1),P4=(0,E4.jsx)(jP.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,E4.jsx)(jP.Path,{d:"M17.3 10.1c0-2.5-2.1-4.4-4.8-4.4-2.2 0-4.1 1.4-4.6 3.3h-.2C5.7 9 4 10.7 4 12.8c0 2.1 1.7 3.8 3.7 3.8h9c1.8 0 3.2-1.5 3.2-3.3.1-1.6-1.1-2.9-2.6-3.2zm-.5 5.1h-9c-1.2 0-2.2-1.1-2.2-2.3s1-2.4 2.2-2.4h1.3l.3-1.1c.4-1.3 1.7-2.2 3.2-2.2 1.8 0 3.3 1.3 3.3 2.9v1.3l1.3.2c.8.1 1.4.9 1.4 1.8-.1 1-.9 1.8-1.8 1.8z"})});var zP=a(be(),1),k4=a(T(),1),R4=(0,k4.jsx)(zP.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,k4.jsx)(zP.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"})});var HP=a(be(),1),A4=a(T(),1),I4=(0,A4.jsx)(HP.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,A4.jsx)(HP.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M10.289 4.836A1 1 0 0111.275 4h1.306a1 1 0 01.987.836l.244 1.466c.787.26 1.503.679 2.108 1.218l1.393-.522a1 1 0 011.216.437l.653 1.13a1 1 0 01-.23 1.273l-1.148.944a6.025 6.025 0 010 2.435l1.149.946a1 1 0 01.23 1.272l-.653 1.13a1 1 0 01-1.216.437l-1.394-.522c-.605.54-1.32.958-2.108 1.218l-.244 1.466a1 1 0 01-.987.836h-1.306a1 1 0 01-.986-.836l-.244-1.466a5.995 5.995 0 01-2.108-1.218l-1.394.522a1 1 0 01-1.217-.436l-.653-1.131a1 1 0 01.23-1.272l1.149-.946a6.026 6.026 0 010-2.435l-1.148-.944a1 1 0 01-.23-1.272l.653-1.131a1 1 0 011.217-.437l1.393.522a5.994 5.994 0 012.108-1.218l.244-1.466zM14.929 12a3 3 0 11-6 0 3 3 0 016 0z"})});var UP=a(be(),1),O4=a(T(),1),N4=(0,O4.jsx)(UP.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,O4.jsx)(UP.Path,{d:"M17.2 10.9c-.5-1-1.2-2.1-2.1-3.2-.6-.9-1.3-1.7-2.1-2.6L12 4l-1 1.1c-.6.9-1.3 1.7-2 2.6-.8 1.2-1.5 2.3-2 3.2-.6 1.2-1 2.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"})});var WP=a(be(),1),M4=a(T(),1),Sg=(0,M4.jsx)(WP.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,M4.jsx)(WP.Path,{fillRule:"evenodd",clipRule:"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"})});var GP=a(be(),1),F4=a(T(),1),D4=(0,F4.jsx)(GP.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,F4.jsx)(GP.Path,{d:"M18 4H6c-1.1 0-2 .9-2 2v12.9c0 .6.5 1.1 1.1 1.1.3 0 .5-.1.8-.3L8.5 17H18c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm.5 11c0 .3-.2.5-.5.5H7.9l-2.4 2.4V6c0-.3.2-.5.5-.5h12c.3 0 .5.2.5.5v9z"})});var YP=a(be(),1),L4=a(T(),1),ex=(0,L4.jsx)(YP.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,L4.jsx)(YP.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M5.625 5.5h9.75c.069 0 .125.056.125.125v9.75a.125.125 0 0 1-.125.125h-9.75a.125.125 0 0 1-.125-.125v-9.75c0-.069.056-.125.125-.125ZM4 5.625C4 4.728 4.728 4 5.625 4h9.75C16.273 4 17 4.728 17 5.625v9.75c0 .898-.727 1.625-1.625 1.625h-9.75A1.625 1.625 0 0 1 4 15.375v-9.75Zm14.5 11.656v-9H20v9C20 18.8 18.77 20 17.251 20H6.25v-1.5h11.001c.69 0 1.249-.528 1.249-1.219Z"})});var qP=a(be(),1),B4=a(T(),1),by=(0,B4.jsx)(qP.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,B4.jsx)(qP.Path,{d:"M20.5 16h-.7V8c0-1.1-.9-2-2-2H6.2c-1.1 0-2 .9-2 2v8h-.7c-.8 0-1.5.7-1.5 1.5h20c0-.8-.7-1.5-1.5-1.5zM5.7 8c0-.3.2-.5.5-.5h11.6c.3 0 .5.2.5.5v7.6H5.7V8z"})});var KP=a(be(),1),V4=a(T(),1),j4=(0,V4.jsx)(KP.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,V4.jsx)(KP.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"})});var ZP=a(be(),1),z4=a(T(),1),yy=(0,z4.jsx)(ZP.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,z4.jsx)(ZP.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M12 18.5a6.5 6.5 0 1 1 0-13 6.5 6.5 0 0 1 0 13ZM4 12a8 8 0 1 1 16 0 8 8 0 0 1-16 0Zm8 4a4 4 0 0 0 4-4H8a4 4 0 0 0 4 4Z"})});var XP=a(be(),1),H4=a(T(),1),_g=(0,H4.jsx)(XP.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,H4.jsx)(XP.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"})});var QP=a(be(),1),U4=a(T(),1),Yd=(0,U4.jsx)(QP.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,U4.jsx)(QP.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"})});var JP=a(be(),1),W4=a(T(),1),G4=(0,W4.jsx)(JP.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,W4.jsx)(JP.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M3 7c0-1.1.9-2 2-2h14a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V7Zm2-.5h14c.3 0 .5.2.5.5v1L12 13.5 4.5 7.9V7c0-.3.2-.5.5-.5Zm-.5 3.3V17c0 .3.2.5.5.5h14c.3 0 .5-.2.5-.5V9.8L12 15.4 4.5 9.8Z"})});var $P=a(be(),1),Y4=a(T(),1),qd=(0,Y4.jsx)($P.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,Y4.jsx)($P.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M12.218 5.377a.25.25 0 0 0-.436 0l-7.29 12.96a.25.25 0 0 0 .218.373h14.58a.25.25 0 0 0 .218-.372l-7.29-12.96Zm-1.743-.735c.669-1.19 2.381-1.19 3.05 0l7.29 12.96a1.75 1.75 0 0 1-1.525 2.608H4.71a1.75 1.75 0 0 1-1.525-2.608l7.29-12.96ZM12.75 17.46h-1.5v-1.5h1.5v1.5Zm-1.5-3h1.5v-5h-1.5v5Z"})});var ek=a(be(),1),q4=a(T(),1),Gs=(0,q4.jsx)(ek.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,q4.jsx)(ek.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"})});var tk=a(be(),1),K4=a(T(),1),Z4=(0,K4.jsx)(tk.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,K4.jsx)(tk.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"})});var rk=a(be(),1),X4=a(T(),1),Q4=(0,X4.jsx)(rk.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,X4.jsx)(rk.Path,{d:"M4 6v12c0 1.1.9 2 2 2h3v-1.5H6c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h3V4H6c-1.1 0-2 .9-2 2zm7.2 16h1.5V2h-1.5v20zM15 5.5h1.5V4H15v1.5zm3.5.5H20c0-1.1-.9-2-2-2v1.5c.3 0 .5.2.5.5zm0 10.5H20v-2h-1.5v2zm0-3.5H20v-2h-1.5v2zm-.5 5.5V20c1.1 0 2-.9 2-2h-1.5c0 .3-.2.5-.5.5zM15 20h1.5v-1.5H15V20zm3.5-10.5H20v-2h-1.5v2z"})});var ok=a(be(),1),J4=a(T(),1),$4=(0,J4.jsx)(ok.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,J4.jsx)(ok.Path,{d:"M2 11.2v1.5h20v-1.5H2zM5.5 6c0-.3.2-.5.5-.5h12c.3 0 .5.2.5.5v3H20V6c0-1.1-.9-2-2-2H6c-1.1 0-2 .9-2 2v3h1.5V6zm2 14h2v-1.5h-2V20zm3.5 0h2v-1.5h-2V20zm7-1.5V20c1.1 0 2-.9 2-2h-1.5c0 .3-.2.5-.5.5zm.5-2H20V15h-1.5v1.5zM5.5 18H4c0 1.1.9 2 2 2v-1.5c-.3 0-.5-.2-.5-.5zm0-3H4v1.5h1.5V15zm9 5h2v-1.5h-2V20z"})});var nk=a(be(),1),eL=a(T(),1),tx=(0,eL.jsx)(nk.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,eL.jsx)(nk.Path,{fillRule:"evenodd",d:"M18 5.5h-8v8h8.5V6a.5.5 0 00-.5-.5zm-9.5 8h-3V6a.5.5 0 01.5-.5h2.5v8zM6 4h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2V6a2 2 0 012-2z"})});var ik=a(be(),1),tL=a(T(),1),rL=(0,tL.jsx)(ik.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,tL.jsx)(ik.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"})});var sk=a(be(),1),oL=a(T(),1),rx=(0,oL.jsx)(sk.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,oL.jsx)(sk.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"})});var ak=a(be(),1),nL=a(T(),1),ox=(0,nL.jsx)(ak.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,nL.jsx)(ak.Path,{d:"M10 17.5H14V16H10V17.5ZM6 6V7.5H18V6H6ZM8 12.5H16V11H8V12.5Z"})});var lk=a(be(),1),iL=a(T(),1),sL=(0,iL.jsx)(lk.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,iL.jsx)(lk.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-8Zm6.5 8c0 .6 0 1.2-.2 1.8h-2.7c0-.6.2-1.1.2-1.8s0-1.2-.2-1.8h2.7c.2.6.2 1.1.2 1.8Zm-.9-3.2h-2.4c-.3-.9-.7-1.8-1.1-2.4-.1-.2-.2-.4-.3-.5 1.6.5 3 1.6 3.8 3ZM12.8 17c-.3.5-.6 1-.8 1.3-.2-.3-.5-.8-.8-1.3-.3-.5-.6-1.1-.8-1.7h3.3c-.2.6-.5 1.2-.8 1.7Zm-2.9-3.2c-.1-.6-.2-1.1-.2-1.8s0-1.2.2-1.8H14c.1.6.2 1.1.2 1.8s0 1.2-.2 1.8H9.9ZM11.2 7c.3-.5.6-1 .8-1.3.2.3.5.8.8 1.3.3.5.6 1.1.8 1.7h-3.3c.2-.6.5-1.2.8-1.7Zm-1-1.2c-.1.2-.2.3-.3.5-.4.7-.8 1.5-1.1 2.4H6.4c.8-1.4 2.2-2.5 3.8-3Zm-1.8 8H5.7c-.2-.6-.2-1.1-.2-1.8s0-1.2.2-1.8h2.7c0 .6-.2 1.1-.2 1.8s0 1.2.2 1.8Zm-2 1.4h2.4c.3.9.7 1.8 1.1 2.4.1.2.2.4.3.5-1.6-.5-3-1.6-3.8-3Zm7.4 3c.1-.2.2-.3.3-.5.4-.7.8-1.5 1.1-2.4h2.4c-.8 1.4-2.2 2.5-3.8 3Z"})});var ck=a(be(),1),aL=a(T(),1),nx=(0,aL.jsx)(ck.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,aL.jsx)(ck.Path,{d:"M18.5 10.5H10v8h8a.5.5 0 00.5-.5v-7.5zm-10 0h-3V18a.5.5 0 00.5.5h2.5v-8zM6 4h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2V6a2 2 0 012-2z"})});var uk=a(be(),1),lL=a(T(),1),cL=(0,lL.jsx)(uk.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,lL.jsx)(uk.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M5.5 12a6.5 6.5 0 1 0 13 0 6.5 6.5 0 0 0-13 0ZM12 4a8 8 0 1 0 0 16 8 8 0 0 0 0-16Zm.75 4v1.5h-1.5V8h1.5Zm0 8v-5h-1.5v5h1.5Z"})});var ix=a(be(),1),sx=a(T(),1),ax=(0,sx.jsxs)(ix.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:[(0,sx.jsx)(ix.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,sx.jsx)(ix.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"})]});var dk=a(be(),1),uL=a(T(),1),ja=(0,uL.jsx)(dk.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,uL.jsx)(dk.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"})});var fk=a(be(),1),dL=a(T(),1),fL=(0,dL.jsx)(fk.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,dL.jsx)(fk.Path,{d:"M5 11.25h14v1.5H5z"})});var mk=a(be(),1),mL=a(T(),1),pL=(0,mL.jsx)(mk.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,mL.jsx)(mk.Path,{d:"M10 17.389H8.444A5.194 5.194 0 1 1 8.444 7H10v1.5H8.444a3.694 3.694 0 0 0 0 7.389H10v1.5ZM14 7h1.556a5.194 5.194 0 0 1 0 10.39H14v-1.5h1.556a3.694 3.694 0 0 0 0-7.39H14V7Zm-4.5 6h5v-1.5h-5V13Z"})});var pk=a(be(),1),hL=a(T(),1),lx=(0,hL.jsx)(pk.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,hL.jsx)(pk.Path,{d:"M3 6h11v1.5H3V6Zm3.5 5.5h11V13h-11v-1.5ZM21 17H10v1.5h11V17Z"})});var hk=a(be(),1),gL=a(T(),1),vL=(0,gL.jsx)(hk.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,gL.jsx)(hk.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"})});var gk=a(be(),1),bL=a(T(),1),Lm=(0,bL.jsx)(gk.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,bL.jsx)(gk.Path,{d:"M15 4H9c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h6c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm.5 14c0 .3-.2.5-.5.5H9c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h6c.3 0 .5.2.5.5v12zm-4.5-.5h2V16h-2v1.5z"})});var vk=a(be(),1),yL=a(T(),1),fo=(0,yL.jsx)(vk.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,yL.jsx)(vk.Path,{d:"M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z"})});var bk=a(be(),1),wL=a(T(),1),cx=(0,wL.jsx)(bk.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,wL.jsx)(bk.Path,{d:"M18.5 10a1.5 1.5 0 0 1 1.5 1.5v7a1.5 1.5 0 0 1-1.5 1.5h-7a1.5 1.5 0 0 1-1.5-1.5v-7a1.5 1.5 0 0 1 1.5-1.5zM16 4a2 2 0 0 1 2 2v2h-1.5V6a.5.5 0 0 0-.5-.5H6a.5.5 0 0 0-.5.5v3H8v1.5H5.5V16a.5.5 0 0 0 .5.5h2V18H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2z"})});var yk=a(be(),1),SL=a(T(),1),_L=(0,SL.jsx)(yk.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,SL.jsx)(yk.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"})});var wk=a(be(),1),xL=a(T(),1),hl=(0,xL.jsx)(wk.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,xL.jsx)(wk.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"})});var Sk=a(be(),1),CL=a(T(),1),ux=(0,CL.jsx)(Sk.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,CL.jsx)(Sk.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M12 18.5A6.5 6.5 0 0 1 6.93 7.931l9.139 9.138A6.473 6.473 0 0 1 12 18.5Zm5.123-2.498a6.5 6.5 0 0 0-9.124-9.124l9.124 9.124ZM4 12a8 8 0 1 1 16 0 8 8 0 0 1-16 0Z"})});var dx=a(be(),1),fx=a(T(),1),Bm=(0,fx.jsxs)(dx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:[(0,fx.jsx)(dx.Path,{d:"M15.5 7.5h-7V9h7V7.5Zm-7 3.5h7v1.5h-7V11Zm7 3.5h-7V16h7v-1.5Z"}),(0,fx.jsx)(dx.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"})]});var _k=a(be(),1),TL=a(T(),1),mx=(0,TL.jsx)(_k.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,TL.jsx)(_k.Path,{d:"m19 7-3-3-8.5 8.5-1 4 4-1L19 7Zm-7 11.5H5V20h7v-1.5Z"})});var xk=a(be(),1),EL=a(T(),1),px=(0,EL.jsx)(xk.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,EL.jsx)(xk.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M12 18.5a6.5 6.5 0 1 1 0-13 6.5 6.5 0 0 1 0 13ZM4 12a8 8 0 1 1 16 0 8 8 0 0 1-16 0Zm8 4a4 4 0 0 1-4-4h4V8a4 4 0 0 1 0 8Z"})});var Ck=a(be(),1),PL=a(T(),1),kL=(0,PL.jsx)(Ck.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,PL.jsx)(Ck.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"})});var Tk=a(be(),1),RL=a(T(),1),fc=(0,RL.jsx)(Tk.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,RL.jsx)(Tk.Path,{d:"M11 12.5V17.5H12.5V12.5H17.5V11H12.5V6H11V11H6V12.5H11Z"})});var Ek=a(be(),1),AL=a(T(),1),IL=(0,AL.jsx)(Ek.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,AL.jsx)(Ek.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"})});var Pk=a(be(),1),OL=a(T(),1),gl=(0,OL.jsx)(Pk.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,OL.jsx)(Pk.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"})});var kk=a(be(),1),NL=a(T(),1),xg=(0,NL.jsx)(kk.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,NL.jsx)(kk.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M12 18.5a6.5 6.5 0 1 1 0-13 6.5 6.5 0 0 1 0 13ZM4 12a8 8 0 1 1 16 0 8 8 0 0 1-16 0Zm11.53-1.47-1.06-1.06L11 12.94l-1.47-1.47-1.06 1.06L11 15.06l4.53-4.53Z"})});var Rk=a(be(),1),ML=a(T(),1),Cg=(0,ML.jsx)(Rk.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,ML.jsx)(Rk.Path,{d:"M15.6 6.5l-1.1 1 2.9 3.3H8c-.9 0-1.7.3-2.3.9-1.4 1.5-1.4 4.2-1.4 5.6v.2h1.5v-.3c0-1.1 0-3.5 1-4.5.3-.3.7-.5 1.3-.5h9.2L14.5 15l1.1 1.1 4.6-4.6-4.6-5z"})});var Ak=a(be(),1),FL=a(T(),1),DL=(0,FL.jsx)(Ak.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,FL.jsx)(Ak.Path,{d:"M7 11.5h10V13H7z"})});var Ik=a(be(),1),LL=a(T(),1),hx=(0,LL.jsx)(Ik.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,LL.jsx)(Ik.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"})});var Ok=a(be(),1),BL=a(T(),1),gx=(0,BL.jsx)(Ok.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,BL.jsx)(Ok.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"})});var Nk=a(be(),1),VL=a(T(),1),Vm=(0,VL.jsx)(Nk.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,VL.jsx)(Nk.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M12 18.5a6.5 6.5 0 1 1 0-13 6.5 6.5 0 0 1 0 13ZM4 12a8 8 0 1 1 16 0 8 8 0 0 1-16 0Zm9 1V8h-1.5v3.5h-2V13H13Z"})});var Mk=a(be(),1),jL=a(T(),1),zL=(0,jL.jsx)(Mk.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,jL.jsx)(Mk.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"})});var Fk=a(be(),1),HL=a(T(),1),Tg=(0,HL.jsx)(Fk.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,HL.jsx)(Fk.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"})});var vx=a(be(),1),bx=a(T(),1),UL=(0,bx.jsxs)(vx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:[(0,bx.jsx)(vx.Path,{d:"m19 7.5h-7.628c-.3089-.87389-1.1423-1.5-2.122-1.5-.97966 0-1.81309.62611-2.12197 1.5h-2.12803v1.5h2.12803c.30888.87389 1.14231 1.5 2.12197 1.5.9797 0 1.8131-.62611 2.122-1.5h7.628z"}),(0,bx.jsx)(vx.Path,{d:"m19 15h-2.128c-.3089-.8739-1.1423-1.5-2.122-1.5s-1.8131.6261-2.122 1.5h-7.628v1.5h7.628c.3089.8739 1.1423 1.5 2.122 1.5s1.8131-.6261 2.122-1.5h2.128z"})]});var Dk=a(be(),1),WL=a(T(),1),yx=(0,WL.jsx)(Dk.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,WL.jsx)(Dk.Path,{d:"M12 8c-2.2 0-4 1.8-4 4s1.8 4 4 4 4-1.8 4-4-1.8-4-4-4zm0 6.5c-1.4 0-2.5-1.1-2.5-2.5s1.1-2.5 2.5-2.5 2.5 1.1 2.5 2.5-1.1 2.5-2.5 2.5zM12.8 3h-1.5v3h1.5V3zm-1.6 18h1.5v-3h-1.5v3zm6.8-9.8v1.5h3v-1.5h-3zm-12 0H3v1.5h3v-1.5zm9.7 5.6 2.1 2.1 1.1-1.1-2.1-2.1-1.1 1.1zM8.3 7.2 6.2 5.1 5.1 6.2l2.1 2.1 1.1-1.1zM5.1 17.8l1.1 1.1 2.1-2.1-1.1-1.1-2.1 2.1zM18.9 6.2l-1.1-1.1-2.1 2.1 1.1 1.1 2.1-2.1z"})});var Lk=a(be(),1),GL=a(T(),1),YL=(0,GL.jsx)(Lk.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,GL.jsx)(Lk.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"})});var Bk=a(be(),1),qL=a(T(),1),wx=(0,qL.jsx)(Bk.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,qL.jsx)(Bk.Path,{d:"M18 5.5H6a.5.5 0 00-.5.5v3h13V6a.5.5 0 00-.5-.5zm.5 5H10v8h8a.5.5 0 00.5-.5v-7.5zM6 4h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2V6a2 2 0 012-2z"})});var Vk=a(be(),1),KL=a(T(),1),ZL=(0,KL.jsx)(Vk.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,KL.jsx)(Vk.Path,{fill:"none",d:"M5.75 12.75V18.25H11.25M12.75 5.75H18.25V11.25",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"square"})});var jk=a(be(),1),XL=a(T(),1),QL=(0,XL.jsx)(jk.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,XL.jsx)(jk.Path,{fillRule:"evenodd",clipRule:"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"})});var zk=a(be(),1),JL=a(T(),1),$L=(0,JL.jsx)(zk.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,JL.jsx)(zk.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"})});var Hk=a(be(),1),eB=a(T(),1),tB=(0,eB.jsx)(Hk.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,eB.jsx)(Hk.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M20 12a8 8 0 1 1-16 0 8 8 0 0 1 16 0Zm-1.5 0a6.5 6.5 0 0 1-6.5 6.5v-13a6.5 6.5 0 0 1 6.5 6.5Z"})});var Uk=a(be(),1),rB=a(T(),1),Eg=(0,rB.jsx)(Uk.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,rB.jsx)(Uk.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"})});var Wk=a(be(),1),oB=a(T(),1),Sx=(0,oB.jsx)(Wk.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,oB.jsx)(Wk.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"})});var Gk=a(be(),1),nB=a(T(),1),wy=(0,nB.jsx)(Gk.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,nB.jsx)(Gk.Path,{d:"M17 4H7c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h10c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm.5 14c0 .3-.2.5-.5.5H7c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h10c.3 0 .5.2.5.5v12zm-7.5-.5h4V16h-4v1.5z"})});var Yk=a(be(),1),iB=a(T(),1),Kd=(0,iB.jsx)(Yk.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,iB.jsx)(Yk.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"})});var qk=a(be(),1),sB=a(T(),1),aB=(0,sB.jsx)(qk.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,sB.jsx)(qk.Path,{d:"m8.6 7 3.9 10.8h-1.7l-1-2.8H5.7l-1 2.8H3L6.9 7h1.7Zm-2.4 6.6h3L7.7 9.3l-1.5 4.3ZM17.691 8.879c.473 0 .88.055 1.221.165.352.1.643.264.875.495.274.253.456.572.544.957.088.374.132.83.132 1.37v4.554c0 .274.033.472.099.593.077.11.198.166.363.166.11 0 .215-.028.313-.083.11-.055.237-.137.38-.247l.165.28a3.304 3.304 0 0 1-.71.446c-.23.11-.527.165-.89.165-.352 0-.639-.055-.858-.165-.22-.11-.386-.27-.495-.479-.1-.209-.149-.468-.149-.775-.286.462-.627.814-1.023 1.056-.396.242-.858.363-1.386.363-.462 0-.858-.088-1.188-.264a1.752 1.752 0 0 1-.742-.726 2.201 2.201 0 0 1-.248-1.056c0-.484.11-.875.33-1.172.22-.308.5-.556.841-.742.352-.187.721-.341 1.106-.462.396-.132.765-.253 1.106-.363.351-.121.637-.259.857-.413.232-.154.347-.357.347-.61V10.81c0-.396-.066-.71-.198-.941a1.05 1.05 0 0 0-.511-.511 1.763 1.763 0 0 0-.76-.149c-.253 0-.522.039-.808.116a1.165 1.165 0 0 0-.677.412 1.1 1.1 0 0 1 .595.396c.165.187.247.424.247.71 0 .307-.104.55-.313.726-.198.176-.451.263-.76.263-.34 0-.594-.104-.758-.313a1.231 1.231 0 0 1-.248-.759c0-.297.072-.539.214-.726.154-.187.352-.363.595-.528.264-.176.6-.324 1.006-.445.418-.121.88-.182 1.386-.182Zm.99 3.729a1.57 1.57 0 0 1-.528.462c-.231.121-.479.248-.742.38a5.377 5.377 0 0 0-.76.462c-.23.165-.423.38-.577.643-.154.264-.231.6-.231 1.007 0 .429.11.77.33 1.023.22.242.517.363.891.363.308 0 .594-.088.858-.264.275-.176.528-.44.759-.792v-3.284Z"})});var Kk=a(be(),1),lB=a(T(),1),Pg=(0,lB.jsx)(Kk.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,lB.jsx)(Kk.Path,{d:"M18.3 11.7c-.6-.6-1.4-.9-2.3-.9H6.7l2.9-3.3-1.1-1-4.5 5L8.5 16l1-1-2.7-2.7H16c.5 0 .9.2 1.3.5 1 1 1 3.4 1 4.5v.3h1.5v-.2c0-1.5 0-4.3-1.5-5.7z"})});var Zk=a(be(),1),cB=a(T(),1),_x=(0,cB.jsx)(Zk.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,cB.jsx)(Zk.Path,{d:"M20.7 12.7s0-.1-.1-.2c0-.2-.2-.4-.4-.6-.3-.5-.9-1.2-1.6-1.8-.7-.6-1.5-1.3-2.6-1.8l-.6 1.4c.9.4 1.6 1 2.1 1.5.6.6 1.1 1.2 1.4 1.6.1.2.3.4.3.5v.1l.7-.3.7-.3Zm-5.2-9.3-1.8 4c-.5-.1-1.1-.2-1.7-.2-3 0-5.2 1.4-6.6 2.7-.7.7-1.2 1.3-1.6 1.8-.2.3-.3.5-.4.6 0 0 0 .1-.1.2s0 0 .7.3l.7.3V13c0-.1.2-.3.3-.5.3-.4.7-1 1.4-1.6 1.2-1.2 3-2.3 5.5-2.3H13v.3c-.4 0-.8-.1-1.1-.1-1.9 0-3.5 1.6-3.5 3.5s.6 2.3 1.6 2.9l-2 4.4.9.4 7.6-16.2-.9-.4Zm-3 12.6c1.7-.2 3-1.7 3-3.5s-.2-1.4-.6-1.9L12.4 16Z"})});var Xk=a(be(),1),uB=a(T(),1),dB=(0,uB.jsx)(Xk.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,uB.jsx)(Xk.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"})});var Qk=a(be(),1),fB=a(T(),1),mB=(0,fB.jsx)(Qk.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,fB.jsx)(Qk.Path,{d:"M18.7 3H5.3C4 3 3 4 3 5.3v13.4C3 20 4 21 5.3 21h13.4c1.3 0 2.3-1 2.3-2.3V5.3C21 4 20 3 18.7 3zm.8 15.7c0 .4-.4.8-.8.8H5.3c-.4 0-.8-.4-.8-.8V5.3c0-.4.4-.8.8-.8h13.4c.4 0 .8.4.8.8v13.4zM10 15l5-3-5-3v6z"})});var Jk=a(be(),1),pB=a(T(),1),hB=(0,pB.jsx)(Jk.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24",fill:"currentColor",children:(0,pB.jsx)(Jk.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"})});var OY=new Set(["meta"]),NY="core/editor",gB=/%(?:postname|pagename)%/,vB=60*1e3,MY=["title","excerpt","content"];var lr="wp_template",In="wp_template_part",yu="wp_block",Sy="wp_navigation",vl="attachment",e2={custom:"custom",theme:"theme",plugin:"plugin"},bB=["wp_template","wp_template_part"],FY=[...bB,"wp_block","wp_navigation"],xi=[lr,In,yu,Sy],kg={Desktop:{value:"Desktop",label:(0,$k.__)("Desktop"),icon:by,canvasWidth:void 0},Tablet:{value:"Tablet",label:(0,$k.__)("Tablet"),icon:wy,canvasWidth:781},Mobile:{value:"Mobile",label:(0,$k.__)("Mobile"),icon:Lm,canvasWidth:479}};function jm(e){return e==="header"?nx:e==="footer"?tx:e==="sidebar"?wx:e==="navigation-overlay"?cx:Eg}var LY=a(zm(),1),{lock:BY,unlock:Y}=(0,LY.__dangerousOptInToUnstableAPIsOnlyForCoreModules)("I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.","@wordpress/editor");var VY={},bl=e=>{if(!e)return VY;let{templateTypes:t,templateAreas:r,template:o}=e,{description:n,slug:i,title:s,area:l}=o,{title:c,description:u}=Object.values(t).find(g=>g.slug===i)??VY,d=typeof s=="string"?s:s?.rendered,f=typeof n=="string"?n:n?.raw,h=r?.map(g=>({...g,icon:jm(g.icon)}))?.find(g=>l===g.area)?.icon||ja;return{title:d&&d!==i?d:c||i,description:f||u,icon:h}};var t2={Desktop:"default",Tablet:"@tablet",Mobile:"@mobile"};function r2(e){return e&&e<=kg.Mobile.canvasWidth?kg.Mobile.value:e&&e<=kg.Tablet.canvasWidth?kg.Tablet.value:kg.Desktop.value}function jY(e){return kg[e]?.canvasWidth}var Tx={},jRe=(0,Kt.createRegistrySelector)(e=>()=>e(mo.store).hasUndo()),zRe=(0,Kt.createRegistrySelector)(e=>()=>e(mo.store).hasRedo());function zY(e){return gn(e).status==="auto-draft"}function HY(e){return"content"in Ex(e)}var o2=(0,Kt.createRegistrySelector)(e=>t=>{let r=Ys(t),o=qs(t);return e(mo.store).hasEditsForEntityRecord("postType",r,o)}),HRe=(0,Kt.createRegistrySelector)(e=>t=>{let r=e(mo.store).__experimentalGetDirtyEntityRecords(),{type:o,id:n}=gn(t);return r.some(i=>i.kind!=="postType"||i.name!==o||i.key!==n)});function URe(e){return!o2(e)&&zY(e)}var gn=(0,Kt.createRegistrySelector)(e=>t=>{let r=qs(t),o=Ys(t),n=e(mo.store).getRawEntityRecord("postType",o,r);return n||Tx});function Ys(e){return e.postType}function qs(e){return e.postId}function WRe(e){return e.templateId}function yB(e){return gn(e)._links?.["version-history"]?.[0]?.count??0}function GRe(e){return gn(e)._links?.["predecessor-version"]?.[0]?.id??null}var Ex=(0,Kt.createRegistrySelector)(e=>t=>{let r=Ys(t),o=qs(t);return e(mo.store).getEntityRecordEdits("postType",r,o)||Tx});function xx(e,t){switch(t){case"type":return Ys(e);case"id":return qs(e);default:let r=gn(e);if(!r.hasOwnProperty(t))break;return mP(r[t])}}var YRe=(0,Kt.createSelector)((e,t)=>{let r=Ex(e);return r.hasOwnProperty(t)?{...xx(e,t),...r[t]}:xx(e,t)},(e,t)=>[xx(e,t),Ex(e)[t]]);function Zr(e,t){if(t==="content")return Px(e);let r=Ex(e);return r.hasOwnProperty(t)?OY.has(t)?YRe(e,t):r[t]:xx(e,t)}var UY=(0,Kt.createRegistrySelector)(e=>(t,r)=>{if(!MY.includes(r)&&r!=="preview_link")return;let o=Ys(t),n=qs(t),i=e(mo.store).getCurrentUser()?.id,s=e(mo.store).getAutosave(o,n,i);if(s)return mP(s[r])});function qRe(e){return Zr(e,"status")==="private"?"private":Zr(e,"password")?"password":"public"}function KRe(e){return gn(e).status==="pending"}function wB(e,t){let r=t||gn(e);return["publish","private"].indexOf(r.status)!==-1||r.status==="future"&&!(0,_y.isInTheFuture)(new Date(Number((0,_y.getDate)(r.date))-vB))}function ZRe(e){return gn(e).status==="future"&&!wB(e)}function XRe(e){let t=gn(e);return t.type===vl?o2(e):o2(e)||["publish","private","future"].indexOf(t.status)===-1}function WY(e){return xy(e)?!1:!!Zr(e,"title")||!!Zr(e,"excerpt")||!GY(e)}var GY=(0,Kt.createRegistrySelector)(e=>t=>{let r=qs(t),o=Ys(t),n=e(mo.store).getEditedEntityRecord("postType",o,r);if(typeof n.content!="function")return!n.content;let i=Zr(t,"blocks");if(i.length===0)return!0;if(i.length>1)return!1;let s=i[0].name;return s!==(0,Hm.getDefaultBlockName)()&&s!==(0,Hm.getFreeformContentHandlerName)()?!1:!Px(t)}),QRe=(0,Kt.createRegistrySelector)(e=>t=>{if(!WY(t)||KY(t))return!1;let r=Ys(t);if(!e(mo.store).getPostType(r)?.supports?.autosave)return!1;let n=qs(t),i=e(mo.store).hasFetchedAutosaves(r,n),s=e(mo.store).getCurrentUser()?.id,l=e(mo.store).getAutosave(r,n,s);return i?!l||HY(t)?!0:["title","excerpt","meta"].some(c=>mP(l[c])!==Zr(t,c)):!1});function JRe(e){let t=Zr(e,"date"),r=new Date(Number((0,_y.getDate)(t))-vB);return(0,_y.isInTheFuture)(r)}function $Re(e){let t=Zr(e,"date"),r=Zr(e,"modified"),o=gn(e).status;return o==="draft"||o==="auto-draft"||o==="pending"?t===r||t===null:!1}function eAe(e){return!!e.deleting.pending}function xy(e){return!!e.saving.pending}var tAe=(0,Kt.createRegistrySelector)(e=>t=>{let r=e(mo.store).__experimentalGetEntitiesBeingSaved(),{type:o,id:n}=gn(t);return r.some(i=>i.kind!=="postType"||i.name!==o||i.key!==n)}),rAe=(0,Kt.createRegistrySelector)(e=>t=>{let r=Ys(t),o=qs(t);return!e(mo.store).getLastEntitySaveError("postType",r,o)}),oAe=(0,Kt.createRegistrySelector)(e=>t=>{let r=Ys(t),o=qs(t);return!!e(mo.store).getLastEntitySaveError("postType",r,o)});function nAe(e){return xy(e)&&!!e.saving.options?.isAutosave}function iAe(e){return xy(e)&&!!e.saving.options?.isPreview}function sAe(e){if(e.saving.pending||xy(e))return;let t=UY(e,"preview_link");(!t||gn(e).status==="draft")&&(t=Zr(e,"link"),t&&(t=(0,Cx.addQueryArgs)(t,{preview:!0})));let r=Zr(e,"featured_media");return t&&r?(0,Cx.addQueryArgs)(t,{_thumbnail_id:r}):t}var aAe=(0,Kt.createRegistrySelector)(e=>()=>{let t=e(n2.store).getBlocks();if(t.length>2)return null;let r;if(t.length===1&&(r=t[0].name,r==="core/embed")){let o=t[0].attributes?.providerNameSlug;["youtube","vimeo"].includes(o)?r="core/video":["spotify","soundcloud"].includes(o)&&(r="core/audio")}switch(t.length===2&&t[1].name==="core/paragraph"&&(r=t[0].name),r){case"core/image":return"image";case"core/quote":case"core/pullquote":return"quote";case"core/gallery":return"gallery";case"core/video":return"video";case"core/audio":return"audio";default:return null}}),Px=(0,Kt.createRegistrySelector)(e=>t=>{let r=qs(t),o=Ys(t),n=e(mo.store).getEditedEntityRecord("postType",o,r);if(n){if(typeof n.content=="function")return n.content(n);if(n.blocks)return(0,Hm.__unstableSerializeAndClean)(n.blocks);if(n.content)return n.content}return""});function lAe(e){return xy(e)&&!wB(e)&&Zr(e,"status")==="publish"}function YY(e){let t=Zr(e,"permalink_template");return gB.test(t)}function cAe(e){let t=qY(e);if(!t)return null;let{prefix:r,postName:o,suffix:n}=t;return YY(e)?r+o+n:r}function uAe(e){return Zr(e,"slug")||(0,Cx.cleanForSlug)(Zr(e,"title"))||qs(e)}function qY(e){let t=Zr(e,"permalink_template");if(!t)return null;let r=Zr(e,"slug")||Zr(e,"generated_slug"),[o,n]=t.split(gB);return{prefix:o,postName:r,suffix:n}}function dAe(e){return e.postLock.isLocked}function fAe(e){return Object.keys(e.postSavingLock).length>0}function KY(e){return Object.keys(e.postAutosavingLock).length>0}function mAe(e){return e.postLock.isTakeover}function pAe(e){return e.postLock.user}function hAe(e){return e.postLock.activePostLock}function gAe(e){return!!gn(e)._links?.hasOwnProperty("wp:action-unfiltered-html")}var vAe=(0,Kt.createRegistrySelector)(e=>()=>!!e(kx.store).get("core","isPublishSidebarEnabled")),bAe=(0,Kt.createSelector)(e=>Zr(e,"blocks")||(0,Hm.parse)(Px(e)),e=>[Zr(e,"blocks"),Px(e)]);function ZY(e,t){return e.removedPanels.includes(t)}var yAe=(0,Kt.createRegistrySelector)(e=>(t,r)=>{let o=e(kx.store).get("core","inactivePanels");return!ZY(t,r)&&!o?.includes(r)}),wAe=(0,Kt.createRegistrySelector)(e=>(t,r)=>!!e(kx.store).get("core","openPanels")?.includes(r));function SAe(e){return(0,wu.default)("select('core/editor').getEditorSelectionStart",{since:"5.8",alternative:"select('core/editor').getEditorSelection"}),Zr(e,"selection")?.selectionStart}function _Ae(e){return(0,wu.default)("select('core/editor').getEditorSelectionStart",{since:"5.8",alternative:"select('core/editor').getEditorSelection"}),Zr(e,"selection")?.selectionEnd}function xAe(e){return Zr(e,"selection")}function CAe(e){return!!e.postId}function SB(e){return e.editorSettings}function i2(e){return e.renderingMode}var TAe=(0,Kt.createRegistrySelector)(e=>t=>{if(Y(e(n2.store)).isZoomOut())return"Desktop";let o=t.canvasWidth;return r2(o)});function EAe(e){return e.listViewPanel}function PAe(e){return!!e.blockInserterPanel}var kAe=(0,Kt.createRegistrySelector)(e=>()=>e(kx.store).get("core","editorMode")??"visual");function RAe(){return(0,wu.default)("select('core/editor').getStateBeforeOptimisticTransaction",{since:"5.7",hint:"No state history is kept on this store anymore"}),null}function AAe(){return(0,wu.default)("select('core/editor').inSomeHistory",{since:"5.7",hint:"No state history is kept on this store anymore"}),!1}function at(e){return(0,Kt.createRegistrySelector)(t=>(r,...o)=>((0,wu.default)("`wp.data.select( 'core/editor' )."+e+"`",{since:"5.3",alternative:"`wp.data.select( 'core/block-editor' )."+e+"`",version:"6.2"}),t(n2.store)[e](...o)))}var IAe=at("getBlockName"),OAe=at("isBlockValid"),NAe=at("getBlockAttributes"),MAe=at("getBlock"),FAe=at("getBlocks"),DAe=at("getClientIdsOfDescendants"),LAe=at("getClientIdsWithDescendants"),BAe=at("getGlobalBlockCount"),VAe=at("getBlocksByClientId"),jAe=at("getBlockCount"),zAe=at("getBlockSelectionStart"),HAe=at("getBlockSelectionEnd"),UAe=at("getSelectedBlockCount"),WAe=at("hasSelectedBlock"),GAe=at("getSelectedBlockClientId"),YAe=at("getSelectedBlock"),qAe=at("getBlockRootClientId"),KAe=at("getBlockHierarchyRootClientId"),ZAe=at("getAdjacentBlockClientId"),XAe=at("getPreviousBlockClientId"),QAe=at("getNextBlockClientId"),JAe=at("getSelectedBlocksInitialCaretPosition"),$Ae=at("getMultiSelectedBlockClientIds"),eIe=at("getMultiSelectedBlocks"),tIe=at("getFirstMultiSelectedBlockClientId"),rIe=at("getLastMultiSelectedBlockClientId"),oIe=at("isFirstMultiSelectedBlock"),nIe=at("isBlockMultiSelected"),iIe=at("isAncestorMultiSelected"),sIe=at("getMultiSelectedBlocksStartClientId"),aIe=at("getMultiSelectedBlocksEndClientId"),lIe=at("getBlockOrder"),cIe=at("getBlockIndex"),uIe=at("isBlockSelected"),dIe=at("hasSelectedInnerBlock"),fIe=at("isBlockWithinSelection"),mIe=at("hasMultiSelection"),pIe=at("isMultiSelecting"),hIe=at("isSelectionEnabled"),gIe=at("getBlockMode"),vIe=at("isTyping"),bIe=at("isCaretWithinFormattedText"),yIe=at("getBlockInsertionPoint"),wIe=at("isBlockInsertionPointVisible"),SIe=at("isValidTemplate"),_Ie=at("getTemplate"),xIe=at("getTemplateLock"),CIe=at("canInsertBlockType"),TIe=at("getInserterItems"),EIe=at("hasInserterItems"),PIe=at("getBlockListSettings"),kIe=(0,Kt.createRegistrySelector)(e=>()=>((0,wu.default)("select('core/editor').__experimentalGetDefaultTemplateTypes",{since:"6.8",alternative:"select('core/core-data').getCurrentTheme()?.default_template_types"}),e(mo.store).getCurrentTheme()?.default_template_types)),RIe=(0,Kt.createRegistrySelector)(e=>(0,Kt.createSelector)(()=>((0,wu.default)("select('core/editor').__experimentalGetDefaultTemplatePartAreas",{since:"6.8",alternative:"select('core/core-data').getCurrentTheme()?.default_template_part_areas"}),(e(mo.store).getCurrentTheme()?.default_template_part_areas||[]).map(r=>({...r,icon:jm(r.icon)}))))),AIe=(0,Kt.createRegistrySelector)(e=>(0,Kt.createSelector)((t,r)=>{(0,wu.default)("select('core/editor').__experimentalGetDefaultTemplateType",{since:"6.8"});let o=e(mo.store).getCurrentTheme()?.default_template_types;return o?Object.values(o).find(n=>n.slug===r)??Tx:Tx})),IIe=(0,Kt.createRegistrySelector)(e=>(0,Kt.createSelector)((t,r)=>{if((0,wu.default)("select('core/editor').__experimentalGetTemplateInfo",{since:"6.8"}),!r)return Tx;let o=e(mo.store).getCurrentTheme(),n=o?.default_template_types||[],i=o?.default_template_part_areas||[];return bl({template:r,templateAreas:i,templateTypes:n})})),OIe=(0,Kt.createRegistrySelector)(e=>t=>{let r=Ys(t);return e(mo.store).getPostType(r)?.labels?.singular_name});function NIe(e){return e.publishSidebarActive}var uU={};Rn(uU,{__experimentalTearDownEditor:()=>IZe,__unstableSaveForPreview:()=>zZe,autosave:()=>jZe,clearSelectedBlock:()=>_Xe,closePublishSidebar:()=>fXe,createUndoLevel:()=>WZe,disablePublishSidebar:()=>qZe,editPost:()=>FZe,enablePublishSidebar:()=>YZe,enterFormattedText:()=>zXe,exitFormattedText:()=>HXe,hideInsertionPoint:()=>OXe,insertBlock:()=>RXe,insertBlocks:()=>AXe,insertDefaultBlock:()=>UXe,lockPostAutosaving:()=>XZe,lockPostSaving:()=>KZe,mergeBlocks:()=>FXe,moveBlockToPosition:()=>kXe,moveBlocksDown:()=>EXe,moveBlocksUp:()=>PXe,multiSelect:()=>SXe,openPublishSidebar:()=>dXe,receiveBlocks:()=>hXe,redo:()=>HZe,refreshPost:()=>BZe,removeBlock:()=>LXe,removeBlocks:()=>DXe,removeEditorPanel:()=>nXe,replaceBlock:()=>TXe,replaceBlocks:()=>CXe,resetBlocks:()=>pXe,resetEditorBlocks:()=>JZe,resetPost:()=>OZe,savePost:()=>DZe,selectBlock:()=>bXe,setDeviceType:()=>tXe,setEditedPost:()=>ibe,setIsInserterOpened:()=>iXe,setIsListViewOpened:()=>sXe,setRenderingMode:()=>eXe,setTemplateValidity:()=>NXe,setupEditor:()=>AZe,setupEditorState:()=>MZe,showInsertionPoint:()=>IXe,startMultiSelect:()=>yXe,startTyping:()=>VXe,stopMultiSelect:()=>wXe,stopTyping:()=>jXe,switchEditorMode:()=>uXe,synchronizeTemplate:()=>MXe,toggleBlockMode:()=>BXe,toggleDistractionFree:()=>aXe,toggleEditorPanelEnabled:()=>rXe,toggleEditorPanelOpened:()=>oXe,togglePublishSidebar:()=>mXe,toggleSelection:()=>xXe,toggleSpotlightMode:()=>lXe,toggleTopToolbar:()=>cXe,trashPost:()=>VZe,undo:()=>UZe,unlockPostAutosaving:()=>QZe,unlockPostSaving:()=>ZZe,updateBlock:()=>gXe,updateBlockAttributes:()=>vXe,updateBlockListSettings:()=>WXe,updateEditorSettings:()=>$Ze,updatePost:()=>NZe,updatePostLock:()=>GZe});var cU=a(Um(),1),nbe=a(Zd(),1),Rh=a(Va(),1),nS=a(kt(),1),Wc=a(Rt(),1),Ms=a(oe(),1),kh=a(pe(),1),iS=a(An(),1),$o=a(Nt(),1),dn=a(V(),1);function xB(e,t){return`wp-autosave-block-editor-post-${t?"auto-draft":e}`}function $Y(e,t){return window.sessionStorage.getItem(xB(e,t))}function eq(e,t,r,o,n){window.sessionStorage.setItem(xB(e,t),JSON.stringify({post_title:r,content:o,excerpt:n}))}function s2(e,t){window.sessionStorage.removeItem(xB(e,t))}var za=a(V(),1);function tq(e){let{previousPost:t,post:r,postType:o}=e;if(e.options?.isAutosave)return[];let n=["publish","private","future"],i=n.includes(t.status),s=n.includes(r.status),l=r.status==="trash"&&t.status!=="trash",c,u=o?.viewable??!1,d;l?(c=o.labels.item_trashed,u=!1):r.type===vl?(c=(0,za.__)("Media updated."),u=!1):!i&&!s?(c=(0,za.__)("Draft saved."),d=!0):i&&!s?(c=o.labels.item_reverted_to_draft,u=!1):!i&&s?c={publish:o.labels.item_published,private:o.labels.item_published_privately,future:o.labels.item_scheduled}[r.status]:c=o.labels.item_updated;let f=[];return u&&f.push({label:d?(0,za.__)("View Preview"):o.labels.view_item,url:r.link,openInNewTab:!0}),[c,{id:"editor-save",type:"snackbar",actions:f}]}function rq(e){let{post:t,edits:r,error:o}=e;if(o&&o.code==="rest_autosave_no_changes")return[];let i=["publish","private","future"].indexOf(t.status)!==-1;if(o.code==="offline_error"){let c={publish:(0,za.__)("Publishing failed because you were offline. Please verify your connection and try again."),private:(0,za.__)("Publishing failed because you were offline. Please verify your connection and try again."),future:(0,za.__)("Scheduling failed because you were offline. Please verify your connection and try again."),default:(0,za.__)("Updating failed because you were offline. Please verify your connection and try again.")};return[!i&&r.status in c?c[r.status]:c.default,{id:"editor-save"}]}let s={publish:(0,za.__)("Publishing failed."),private:(0,za.__)("Publishing failed."),future:(0,za.__)("Scheduling failed."),default:(0,za.__)("Updating failed.")},l=!i&&r.status in s?s[r.status]:s.default;return o.message&&!/<\/?[^>]*>/.test(o.message)&&(l=[l,o.message].join(" ")),[l,{id:"editor-save"}]}function oq(e){return[e.error.message&&e.error.code!=="unknown_error"?e.error.message:(0,za.__)("Trashing failed"),{id:"editor-trash-fail"}]}var lU={};Rn(lU,{createTemplate:()=>hZe,hideBlockTypes:()=>vZe,registerEntityAction:()=>aZe,registerEntityField:()=>cZe,registerPostTypeSchema:()=>mZe,removeTemplates:()=>wZe,resetStylesNavigation:()=>CZe,restoreRevision:()=>kZe,revertTemplate:()=>yZe,saveDirtyEntities:()=>bZe,selectNote:()=>RZe,setCanvasWidth:()=>aU,setCurrentRevisionId:()=>TZe,setCurrentTemplateId:()=>pZe,setDefaultRenderingMode:()=>SZe,setIsReady:()=>dZe,setRevisionPage:()=>EZe,setShowRevisionDiff:()=>PZe,setShowStylebook:()=>xZe,setStylesPath:()=>_Ze,showBlockTypes:()=>gZe,unregisterEntityAction:()=>lZe,unregisterEntityField:()=>uZe});var Qn=a(oe(),1),Gt=a(V(),1),Ns=a(Rt(),1),AN=a(pe(),1),Tb=a(Nt(),1),rbe=a(uo(),1),obe=a(Zd(),1),IN=a(kt(),1),sU=a(Lt(),1),ON=a(en(),1);function a2(e){return e?e.source===e2.custom&&(!!e?.plugin||e?.has_theme_file):!1}var AB={};Rn(AB,{buildRevisionsPageQuery:()=>Rg,getCanvasWidth:()=>QIe,getCurrentRevision:()=>rOe,getCurrentRevisionId:()=>RB,getDefaultRenderingMode:()=>KIe,getEntityActions:()=>WIe,getEntityFields:()=>YIe,getInserter:()=>VIe,getInserterSidebarToggleRef:()=>zIe,getListViewToggleRef:()=>jIe,getPageRevisions:()=>$Ie,getPostBlocksByName:()=>qIe,getPostIcon:()=>HIe,getPreviousRevision:()=>iOe,getRevisionPage:()=>kB,getRevisionsPerPage:()=>JIe,getSelectedNote:()=>oOe,getShowStylebook:()=>XIe,getStylesPath:()=>ZIe,hasPostMetaChanges:()=>UIe,isCollaborationEnabledForCurrentPost:()=>sOe,isEntityReady:()=>GIe,isNoteFocused:()=>nOe,isRevisionsMode:()=>eOe,isShowingRevisionDiff:()=>tOe});var Pq=a(sq(),1),Ix=a(pe(),1),Ha=a(G(),1);var is=a(oe(),1),kq=a(Nt(),1);var aq=[];function lq(e,t,r){return e.actions[t]?.[r]??aq}function cq(e,t,r){return e.fields[t]?.[r]??aq}function uq(e,t,r){return e.isReady[t]?.[r]}var ii=[];for(let e=0;e<256;++e)ii.push((e+256).toString(16).slice(1));function dq(e,t=0){return(ii[e[t+0]]+ii[e[t+1]]+ii[e[t+2]]+ii[e[t+3]]+"-"+ii[e[t+4]]+ii[e[t+5]]+"-"+ii[e[t+6]]+ii[e[t+7]]+"-"+ii[e[t+8]]+ii[e[t+9]]+"-"+ii[e[t+10]]+ii[e[t+11]]+ii[e[t+12]]+ii[e[t+13]]+ii[e[t+14]]+ii[e[t+15]]).toLowerCase()}var MIe=new Uint8Array(16);function CB(){return crypto.getRandomValues(MIe)}function FIe(e,t,r){return!t&&!e&&crypto.randomUUID?crypto.randomUUID():DIe(e,t,r)}function DIe(e,t,r){e=e||{};let o=e.random??e.rng?.()??CB();if(o.length<16)throw new Error("Random bytes length must be >= 16");if(o[6]=o[6]&15|64,o[8]=o[8]&63|128,t){if(r=r||0,r<0||r+16>t.length)throw new RangeError(`UUID byte range ${r}:${r+15} is out of buffer bounds`);for(let n=0;n<16;++n)t[r+n]=o[n];return t}return dq(o)}var Cy=FIe;var Ax=a(G(),1),yq=a(oe(),1),wq=a(Wm(),1),Sq=a(Rx(),1);var hq=a(H(),1),ns=null,TB=new Set;function gq(){TB.forEach(e=>e())}function vq(e){e.length&&(ns||(ns={total:0,completed:0,pending:[]}),ns={total:ns.total+e.length,completed:ns.completed,pending:[...ns.pending,...e]},gq())}function EB(e){if(!ns||e<=0)return;let t=Math.min(ns.total,ns.completed+e),r=ns.pending.slice(e);t>=ns.total?ns=null:ns={total:ns.total,completed:t,pending:r},gq()}function pq(){return ns}function LIe(e){return TB.add(e),()=>{TB.delete(e)}}function bq(){return(0,hq.useSyncExternalStore)(LIe,pq,pq)}var BIe=()=>{};function l2({additionalData:e={},allowedTypes:t,filesList:r,maxUploadFileSize:o,onError:n=BIe,onFileChange:i,onSuccess:s,multiple:l=!0}){let{receiveEntityRecords:c}=(0,Ax.dispatch)(yq.store),{getCurrentPost:u,getEditorSettings:d}=(0,Ax.select)(R),{lockPostAutosaving:f,unlockPostAutosaving:m,lockPostSaving:h,unlockPostSaving:g}=(0,Ax.dispatch)(R),v=d().allowedMimeTypes,b=window.__clientSideMediaProcessing&&(0,Sq.isClientSideMediaSupported)(),S=`image-upload-${Cy()}`;o=o||d().maxUploadFileSize;let y=u(),w=typeof y?.id=="number"?y.id:y?.wp_id,_=()=>{g(S),m(S)};b||(h(S),f(S));let x=w?{post:w}:{};if(!b){let O=Array.from(r).map(A=>A?.name||"");vq(O)}let E=0;(0,wq.uploadMedia)({allowedTypes:t,filesList:r,onFileChange:O=>{i?.(O);let A=O.filter(C=>C?.id);if(A?.length&&c("postType","attachment",A,void 0,!0),!b&&A.length===O.length&&_(),!b){let C=A.length;C>E&&(EB(C-E),E=C)}},onSuccess:s,additionalData:{...x,...e},maxUploadFileSize:o,onError:({message:O})=>{b||(_(),EB(1)),n(O)},wpAllowedMimeTypes:v,multiple:l})}var _q=a(uo(),1),xq=a(Va(),1);function Cq(e){return(0,xq.default)("wp.editor.cleanForSlug",{since:"12.7",plugin:"Gutenberg",alternative:"wp.url.cleanForSlug"}),(0,_q.cleanForSlug)(e)}var Tq={rootClientId:void 0,insertionIndex:void 0,filterValue:void 0},PB=["post-only","template-locked"],VIe=(0,Ha.createRegistrySelector)(e=>(0,Ha.createSelector)(t=>{if(typeof t.blockInserterPanel=="object")return t.blockInserterPanel;if(i2(t)==="template-locked"){let{getBlocksByName:r,getSelectedBlockClientId:o,getBlockParents:n,getBlockOrder:i}=e(Ix.store),[s]=r("core/post-content");if(s){let l=o();return l&&l!==s&&n(l).includes(s)?Tq:{rootClientId:s,insertionIndex:i(s).length,filterValue:void 0}}}return Tq},t=>{let{getBlocksByName:r,getSelectedBlockClientId:o,getBlockParents:n,getBlockOrder:i}=e(Ix.store),[s]=r("core/post-content"),l=o();return[t.blockInserterPanel,i2(t),s,l,l?n(l):void 0,s?i(s).length:void 0]}));function jIe(e){return e.listViewToggleRef}function zIe(e){return e.inserterSidebarToggleRef}var Eq={wp_block:Sx,wp_navigation:_L,page:Bm,post:dB},HIe=(0,Ha.createRegistrySelector)(e=>(t,r,o)=>{{if(r==="wp_template_part"||r==="wp_template"){let s=(e(is.store).getCurrentTheme()?.default_template_part_areas||[]).find(l=>o.area===l.area);return s?.icon?jm(s.icon):ja}if(Eq[r])return Eq[r];let n=e(is.store).getPostType(r);return typeof n?.icon=="string"&&n.icon.startsWith("dashicons-")?n.icon.slice(10):Bm}}),UIe=(0,Ha.createRegistrySelector)(e=>(t,r,o)=>{let{type:n,id:i}=gn(t),s=e(is.store).getEntityRecordNonTransientEdits("postType",r||n,o||i);if(!s?.meta)return!1;let l=e(is.store).getEntityRecord("postType",r||n,o||i)?.meta;return!(0,Pq.default)({...l,footnotes:void 0},{...s.meta,footnotes:void 0})});function WIe(e,...t){return lq(e.dataviews,...t)}function GIe(e,...t){return uq(e.dataviews,...t)}function YIe(e,...t){return cq(e.dataviews,...t)}var qIe=(0,Ha.createRegistrySelector)(e=>(0,Ha.createSelector)((t,r)=>{r=Array.isArray(r)?r:[r];let{getBlocksByName:o,getBlockParents:n,getBlockName:i}=e(Ix.store);return o(r).filter(s=>n(s).every(l=>{let c=i(l);return c!=="core/query"&&!r.includes(c)}))},(t,r)=>{r=Array.isArray(r)?r:[r];let{getBlocksByName:o,getBlockParents:n}=e(Ix.store),i=o(r),s=i.map(l=>n(l));return[i,...s]})),KIe=(0,Ha.createRegistrySelector)(e=>(t,r)=>{let{getPostType:o,getCurrentTheme:n,hasFinishedResolution:i}=e(is.store),s=n(),l=o(r);if(!i("getPostType",[r])||!i("getCurrentTheme"))return;let c=s?.stylesheet,u=e(kq.store).get("core","renderingModes")?.[c]?.[r];if(PB.includes(u))return u;let d=Array.isArray(l?.supports?.editor)?l.supports.editor.find(m=>"default-mode"in m)?.["default-mode"]:void 0;if(PB.includes(d))return d;let f=SB(t).defaultRenderingMode;return PB.includes(f)?f:"post-only"});function ZIe(e){return e.stylesPath??"/"}function XIe(e){return e.showStylebook??!1}function QIe(e){return e.canvasWidth}function kB(e){return e.revisionPage}function Rg(e,t){return{per_page:Rq,page:t,context:"edit",orderby:"date",order:"desc",_fields:[...new Set(["id","date","modified","author","meta","title.raw","excerpt.raw","content.raw",e])].join()}}var Rq=100;function JIe(){return Rq}var $Ie=(0,Ha.createRegistrySelector)(e=>(t,r)=>{if(!r)return null;let{type:o,id:n}=gn(t);if(!o||!n)return null;let s=e(is.store).getEntityConfig("postType",o)?.revisionKey||"id";return e(is.store).getRevisions("postType",o,n,Rg(s,r))});function eOe(e){return e.revisionId!==null}function tOe(e){return e.showRevisionDiff}function RB(e){return e.revisionId}var rOe=(0,Ha.createRegistrySelector)(e=>t=>{let r=RB(t);if(!r)return;let o=kB(t);if(!o)return null;let{type:n,id:i}=gn(t),l=e(is.store).getEntityConfig("postType",n)?.revisionKey||"id",c=e(is.store).getRevisions("postType",n,i,Rg(l,o));return c?c.find(u=>u[l]===r)??null:null});function oOe(e){return e.selectedNote?.noteId}function nOe(e){return!!e.selectedNote?.options?.focus}var iOe=(0,Ha.createRegistrySelector)(e=>t=>{let r=RB(t);if(!r)return;let o=kB(t);if(!o)return null;let{type:n,id:i}=gn(t),l=e(is.store).getEntityConfig("postType",n)?.revisionKey||"id",c=Rg(l,o),u=e(is.store).getRevisions("postType",n,i,c);if(!u)return null;let d=u.findIndex(h=>h[l]===r);if(d>=0&&d<u.length-1)return u[d+1];let f=yB(t),m=Math.ceil(f/c.per_page)||1;return d===u.length-1&&o<m?e(is.store).getRevisions("postType",n,i,Rg(l,o+1))?.[0]??null:null}),sOe=(0,Ha.createRegistrySelector)(e=>t=>{if(!Y(e(is.store)).isCollaborationSupported())return!1;let r=Ys(t),o=qs(t),i=e(is.store).getEntityConfig("postType",r)?.syncConfig;return!!(i&&i.supportsPersistence&&window._wpCollaborationEnabled&&i.shouldSync?.(`postType/${r}`,o)!==!1)});var RN=a(oe(),1),tbe=a(An(),1);var zq=a(V(),1);var ss=a(W(),1);var f2=a(ke(),1),Fq=a(G(),1),Ty=a(H(),1),Dq=a(Rt(),1),Lq=a(uo(),1),Ag=a(V(),1);var Mq=a(uo(),1);var c2=a(Lt(),1),Iq=a(V(),1);function Oq(e){return e.type==="wp_template"}function Nq(e){return e.type==="wp_template_part"}function Xd(e){return e.type==="wp_template"||e.type==="wp_template_part"}function ft(e,t=(0,Iq.__)("(no title)")){let r="";return typeof e.title=="string"?r=(0,c2.decodeEntities)(e.title):e.title&&"rendered"in e.title?r=(0,c2.decodeEntities)(e.title.rendered):e.title&&"raw"in e.title&&(r=(0,c2.decodeEntities)(e.title.raw)),r||t}function u2(e){return e?[e.source,e.source].includes("custom")&&!(e.type==="wp_template"&&e?.plugin)&&!e.has_theme_file:!1}var d2=e=>typeof e!="object"?"":e.slug||(0,Mq.cleanForSlug)(ft(e))||e.id.toString();var On=a(T(),1),Bq=({field:e,onChange:t,data:r})=>{let{id:o}=e,n=e.getValue({item:r})||d2(r),i=r.permalink_template||"",s=/%(?:postname|pagename)%/,[l,c]=i.split(s),u=l,d=c,f=s.test(i),m=(0,Ty.useRef)(n),h=n||m.current,g=f?`${u}${h}${d}`:(0,Lq.safeDecodeURIComponent)(r.link||"");(0,Ty.useEffect)(()=>{n&&m.current===void 0&&(m.current=n)},[n]);let v=(0,Ty.useCallback)(w=>t({[o]:w}),[o,t]),{createNotice:b}=(0,Fq.useDispatch)(Dq.store),S=(0,f2.useCopyToClipboard)(g,()=>{b("info",(0,Ag.__)("Copied Permalink to clipboard."),{isDismissible:!0,type:"snackbar"})}),y="editor-post-url__slug-description-"+(0,f2.useInstanceId)(Bq);return(0,On.jsxs)("fieldset",{className:"fields-controls__slug",children:[f&&(0,On.jsxs)(ss.__experimentalVStack,{children:[(0,On.jsxs)(ss.__experimentalVStack,{spacing:"0px",children:[(0,On.jsx)("span",{children:(0,Ag.__)("Customize the last part of the Permalink.")}),(0,On.jsx)(ss.ExternalLink,{href:"https://wordpress.org/documentation/article/page-post-settings-sidebar/#permalink",children:(0,Ag.__)("Learn more")})]}),(0,On.jsx)(ss.__experimentalInputControl,{__next40pxDefaultSize:!0,prefix:(0,On.jsx)(ss.__experimentalInputControlPrefixWrapper,{children:"/"}),suffix:(0,On.jsx)(ss.__experimentalInputControlSuffixWrapper,{variant:"control",children:(0,On.jsx)(ss.Button,{size:"small",icon:ex,ref:S,label:(0,Ag.__)("Copy")})}),label:(0,Ag.__)("Link"),hideLabelFromVision:!0,value:n,autoComplete:"off",spellCheck:"false",type:"text",className:"fields-controls__slug-input",onChange:w=>{v(w)},onBlur:()=>{n===""&&v(m.current)},"aria-describedby":y}),(0,On.jsxs)("div",{className:"fields-controls__slug-help",children:[(0,On.jsx)("span",{className:"fields-controls__slug-help-visual-label",children:(0,Ag.__)("Permalink:")}),(0,On.jsxs)(ss.ExternalLink,{className:"fields-controls__slug-help-link",href:g,children:[(0,On.jsx)("span",{className:"fields-controls__slug-help-prefix",children:u}),(0,On.jsx)("span",{className:"fields-controls__slug-help-slug",children:h}),(0,On.jsx)("span",{className:"fields-controls__slug-help-suffix",children:d})]})]})]}),!f&&(0,On.jsx)(ss.ExternalLink,{className:"fields-controls__slug-help",href:g,children:g})]})},Vq=Bq;var m2=a(H(),1);var aOe=({item:e})=>{let t=d2(e),r=(0,m2.useRef)(t);return(0,m2.useEffect)(()=>{t&&r.current===void 0&&(r.current=t)},[t]),`${t||r.current}`},jq=aOe;var lOe={id:"slug",type:"text",label:(0,zq.__)("Slug"),Edit:Vq,render:jq,filterBy:!1},IB=lOe;var OB=a(V(),1);function Hq(e){var t,r,o="";if(typeof e=="string"||typeof e=="number")o+=e;else if(typeof e=="object")if(Array.isArray(e)){var n=e.length;for(t=0;t<n;t++)e[t]&&(r=Hq(e[t]))&&(o&&(o+=" "),o+=r)}else for(r in e)e[r]&&(o&&(o+=" "),o+=r);return o}function cOe(){for(var e,t,r=0,o="",n=arguments.length;r<n;r++)(e=arguments[r])&&(t=Hq(e))&&(o&&(o+=" "),o+=t);return o}var Q=cOe;var Uq=a(W(),1),Wq=a(V(),1);var Ox=a(T(),1);function Nx({item:e,className:t,children:r}){let o=ft(e);return(0,Ox.jsxs)(Uq.__experimentalHStack,{className:Q("fields-field__title",t),alignment:"center",justify:"flex-start",children:[(0,Ox.jsx)("span",{children:o||(0,Wq.__)("(no title)")}),r]})}function p2({item:e}){return(0,Ox.jsx)(Nx,{item:e})}var uOe={type:"text",id:"title",label:(0,OB.__)("Title"),placeholder:(0,OB.__)("No title"),getValue:({item:e})=>ft(e),render:p2,enableHiding:!0,enableGlobalSearch:!0,filterBy:!1},h2=uOe;var FB=a(V(),1);var NB=a(V(),1),Yq=a(G(),1),qq=a(oe(),1),Kq=a(W(),1);var Gq=a(zm(),1),{lock:qlt,unlock:Nn}=(0,Gq.__dangerousOptInToUnstableAPIsOnlyForCoreModules)("I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.","@wordpress/fields");var MB=a(T(),1),{Badge:dOe}=Nn(Kq.privateApis);function Zq({item:e}){let{frontPageId:t,postsPageId:r}=(0,Yq.useSelect)(o=>{let{getEntityRecord:n}=o(qq.store),i=n("root","site");return{frontPageId:i?.page_on_front,postsPageId:i?.page_for_posts}},[]);return(0,MB.jsx)(Nx,{item:e,className:"fields-field__page-title",children:[t,r].includes(e.id)&&(0,MB.jsx)(dOe,{children:e.id===t?(0,NB.__)("Homepage"):(0,NB.__)("Posts Page")})})}var fOe={type:"text",id:"title",label:(0,FB.__)("Title"),placeholder:(0,FB.__)("No title"),getValue:({item:e})=>ft(e),render:Zq,enableHiding:!1,enableGlobalSearch:!0,filterBy:!1},DB=fOe;var LB=a(V(),1);var mOe={id:"title",type:"text",label:(0,LB.__)("Template"),placeholder:(0,LB.__)("No title"),getValue:({item:e})=>ft(e),render:p2,enableHiding:!1,enableGlobalSearch:!0,filterBy:!1},Mx=mOe;var k8=a(V(),1);var FJ=a(V(),1);var DJ=a(mc(),1);var hQ=a(H(),1);var Ig=a(xe(),1);function Jq({controlled:e,default:t,name:r,state:o="value"}){let{current:n}=Ig.useRef(e!==void 0),[i,s]=Ig.useState(t),l=n?e:i,c=Ig.useCallback(u=>{n||s(u)},[]);return[l,c]}var pOe=a(xe(),1),Fx={...pOe};var eK=a(xe(),1),$q={};function si(e,t){let r=eK.useRef($q);return r.current===$q&&(r.current=e(t)),r}var BB=Fx.useInsertionEffect,hOe=BB&&BB!==Fx.useLayoutEffect?BB:e=>e();function Xe(e){let t=si(gOe).current;return t.next=e,hOe(t.effect),t.trampoline}function gOe(){let e={next:void 0,callback:vOe,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function vOe(){}var tK=a(xe(),1),bOe=()=>{},Qe=typeof document<"u"?tK.useLayoutEffect:bOe;var g2=a(xe(),1),yOe=g2.createContext(void 0);function Ey(){return g2.useContext(yOe)?.direction??"ltr"}function wOe(e,t){return function(o,...n){let i=new URL(e);return i.searchParams.set("code",o.toString()),n.forEach(s=>i.searchParams.append("args[]",s)),`${t} error #${o}; visit ${i} for the full message.`}}var SOe=wOe("https://base-ui.com/production-error","Base UI"),Mn=SOe;var Og=a(xe(),1);function Dx(e,t,r,o){let n=si(oK).current;return _Oe(n,e,t,r,o)&&nK(n,[e,t,r,o]),n.callback}function rK(e){let t=si(oK).current;return xOe(t,e)&&nK(t,e),t.callback}function oK(){return{callback:null,cleanup:null,refs:[]}}function _Oe(e,t,r,o,n){return e.refs[0]!==t||e.refs[1]!==r||e.refs[2]!==o||e.refs[3]!==n}function xOe(e,t){return e.refs.length!==t.length||e.refs.some((r,o)=>r!==t[o])}function nK(e,t){if(e.refs=t,t.every(r=>r==null)){e.callback=null;return}e.callback=r=>{if(e.cleanup&&(e.cleanup(),e.cleanup=null),r!=null){let o=Array(t.length).fill(null);for(let n=0;n<t.length;n+=1){let i=t[n];if(i!=null)switch(typeof i){case"function":{let s=i(r);typeof s=="function"&&(o[n]=s);break}case"object":{i.current=r;break}default:}}e.cleanup=()=>{for(let n=0;n<t.length;n+=1){let i=t[n];if(i!=null)switch(typeof i){case"function":{let s=o[n];typeof s=="function"?s():i(null);break}case"object":{i.current=null;break}default:}}}}}}var sK=a(xe(),1);var iK=a(xe(),1),COe=parseInt(iK.version,10);function Py(e){return COe>=e}function VB(e){if(!sK.isValidElement(e))return null;let t=e,r=t.props;return(Py(19)?r?.ref:t.ref)??null}function Lx(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}function Qd(){}var Sct=Object.freeze([]),Eo=Object.freeze({});function aK(e,t){let r={};for(let o in e){let n=e[o];if(t?.hasOwnProperty(o)){let i=t[o](n);i!=null&&Object.assign(r,i);continue}n===!0?r[`data-${o.toLowerCase()}`]="":n&&(r[`data-${o.toLowerCase()}`]=n.toString())}return r}function lK(e,t){return typeof e=="function"?e(t):e}function v2(e,t){return typeof e=="function"?e(t):e}var jB={};function jr(e,t,r,o,n){if(!r&&!o&&!n&&!e)return b2(t);let i=b2(e);return t&&(i=Bx(i,t)),r&&(i=Bx(i,r)),o&&(i=Bx(i,o)),n&&(i=Bx(i,n)),i}function cK(e){if(e.length===0)return jB;if(e.length===1)return b2(e[0]);let t=b2(e[0]);for(let r=1;r<e.length;r+=1)t=Bx(t,e[r]);return t}function b2(e){return zB(e)?{...dK(e,jB)}:TOe(e)}function Bx(e,t){return zB(t)?dK(t,e):EOe(e,t)}function TOe(e){let t={...e};for(let r in t){let o=t[r];uK(r,o)&&(t[r]=fK(o))}return t}function EOe(e,t){if(!t)return e;for(let r in t){let o=t[r];switch(r){case"style":{e[r]=Lx(e.style,o);break}case"className":{e[r]=HB(e.className,o);break}default:uK(r,o)?e[r]=POe(e[r],o):e[r]=o}}return e}function uK(e,t){let r=e.charCodeAt(0),o=e.charCodeAt(1),n=e.charCodeAt(2);return r===111&&o===110&&n>=65&&n<=90&&(typeof t=="function"||typeof t>"u")}function zB(e){return typeof e=="function"}function dK(e,t){return zB(e)?e(t):e??jB}function POe(e,t){return t?e?(...r)=>{let o=r[0];if(mK(o)){let i=o;Vx(i);let s=t(...r);return i.baseUIHandlerPrevented||e?.(...r),s}let n=t(...r);return e?.(...r),n}:fK(t):e}function fK(e){return e&&((...t)=>{let r=t[0];return mK(r)&&Vx(r),e(...t)})}function Vx(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function HB(e,t){return t?e?t+" "+e:t:e}function mK(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}var UB=a(xe(),1);function Po(e,t,r={}){let o=t.render,n=kOe(t,r);if(r.enabled===!1)return null;let i=r.state??Eo;return IOe(e,o,n,i)}function kOe(e,t={}){let{className:r,style:o,render:n}=e,{state:i=Eo,ref:s,props:l,stateAttributesMapping:c,enabled:u=!0}=t,d=u?lK(r,i):void 0,f=u?v2(o,i):void 0,m=u?aK(i,c):Eo,h=u&&l?ROe(l):void 0,g=u?Lx(m,h)??{}:Eo;return typeof document<"u"&&(u?Array.isArray(s)?g.ref=rK([g.ref,VB(n),...s]):g.ref=Dx(g.ref,VB(n),s):Dx(null,null)),u?(d!==void 0&&(g.className=HB(g.className,d)),f!==void 0&&(g.style=Lx(g.style,f)),g):Eo}function ROe(e){return Array.isArray(e)?cK(e):jr(void 0,e)}var AOe=Symbol.for("react.lazy");function IOe(e,t,r,o){if(t){if(typeof t=="function")return t(r,o);let n=jr(r,t.props);n.ref=r.ref;let i=t;return i?.$$typeof===AOe&&(i=Og.Children.toArray(t)[0]),Og.cloneElement(i,n)}if(e&&typeof e=="string")return OOe(e,r);throw new Error(Mn(8))}function OOe(e,t){return e==="button"?(0,UB.createElement)("button",{type:"button",...t,key:t.key}):e==="img"?(0,UB.createElement)("img",{alt:"",...t,key:t.key}):Og.createElement(e,t)}var mt={};Rn(mt,{cancelOpen:()=>s5e,chipRemovePress:()=>HOe,clearPress:()=>zOe,closePress:()=>VOe,closeWatcher:()=>$Oe,decrementPress:()=>GOe,disabled:()=>l5e,drag:()=>o5e,escapeKey:()=>JOe,focusOut:()=>QOe,imperativeAction:()=>d5e,incrementPress:()=>WOe,initial:()=>u5e,inputBlur:()=>KOe,inputChange:()=>YOe,inputClear:()=>qOe,inputPaste:()=>ZOe,inputPress:()=>XOe,itemPress:()=>BOe,keyboard:()=>t5e,linkPress:()=>jOe,listNavigation:()=>e5e,missing:()=>c5e,none:()=>NOe,outsidePress:()=>LOe,pointer:()=>r5e,scrub:()=>i5e,siblingOpen:()=>a5e,swipe:()=>f5e,trackPress:()=>UOe,triggerFocus:()=>DOe,triggerHover:()=>FOe,triggerPress:()=>MOe,wheel:()=>n5e,windowResize:()=>m5e});var NOe="none",MOe="trigger-press",FOe="trigger-hover",DOe="trigger-focus",LOe="outside-press",BOe="item-press",VOe="close-press",jOe="link-press",zOe="clear-press",HOe="chip-remove-press",UOe="track-press",WOe="increment-press",GOe="decrement-press",YOe="input-change",qOe="input-clear",KOe="input-blur",ZOe="input-paste",XOe="input-press",QOe="focus-out",JOe="escape-key",$Oe="close-watcher",e5e="list-navigation",t5e="keyboard",r5e="pointer",o5e="drag",n5e="wheel",i5e="scrub",s5e="cancel-open",a5e="sibling-open",l5e="disabled",c5e="missing",u5e="initial",d5e="imperative-action",f5e="swipe",m5e="window-resize";function Vt(e,t,r,o){let n=!1,i=!1,s=o??Eo;return{reason:e,event:t??new Event("base-ui"),cancel(){n=!0},allowPropagation(){i=!0},get isCanceled(){return n},get isPropagationAllowed(){return i},trigger:r,...s}}var y2=a(xe(),1);var pK=0;function p5e(e,t="mui"){let[r,o]=y2.useState(e),n=e||r;return y2.useEffect(()=>{r==null&&(pK+=1,o(`${t}-${pK}`))},[r,t]),n}var hK=Fx.useId;function Gm(e,t){if(hK!==void 0){let r=hK();return e??(t?`${t}-${r}`:r)}return p5e(e,t)}function w2(e){return Gm(e,"base-ui")}var C2=a(xe(),1);var GB=a(xe(),1);var gK=a(xe(),1),h5e=[];function ky(e){gK.useEffect(e,h5e)}var S2=null,Kct=globalThis.requestAnimationFrame,WB=class{callbacks=[];callbacksCount=0;nextId=1;startId=1;isScheduled=!1;tick=t=>{this.isScheduled=!1;let r=this.callbacks,o=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,o>0)for(let n=0;n<r.length;n+=1)r[n]?.(t)};request(t){let r=this.nextId;return this.nextId+=1,this.callbacks.push(t),this.callbacksCount+=1,!this.isScheduled&&(requestAnimationFrame(this.tick),this.isScheduled=!0),r}cancel(t){let r=t-this.startId;r<0||r>=this.callbacks.length||(this.callbacks[r]=null,this.callbacksCount-=1)}},_2=new WB,as=class e{static create(){return new e}static request(t){return _2.request(t)}static cancel(t){return _2.cancel(t)}currentId=S2;request(t){this.cancel(),this.currentId=_2.request(()=>{this.currentId=S2,t()})}cancel=()=>{this.currentId!==S2&&(_2.cancel(this.currentId),this.currentId=S2)};disposeEffect=()=>this.cancel};function Ry(){let e=si(as.create).current;return ky(e.disposeEffect),e}function x2(e,t=!1,r=!1){let[o,n]=GB.useState(e&&t?"idle":void 0),[i,s]=GB.useState(e);return e&&!i&&(s(!0),n("starting")),!e&&i&&o!=="ending"&&!r&&n("ending"),!e&&!i&&o==="ending"&&n(void 0),Qe(()=>{if(!e&&i&&o!=="ending"&&r){let l=as.request(()=>{n("ending")});return()=>{as.cancel(l)}}},[e,i,o,r]),Qe(()=>{if(!e||t)return;let l=as.request(()=>{n(void 0)});return()=>{as.cancel(l)}},[t,e]),Qe(()=>{if(!e||!t)return;e&&i&&o!=="idle"&&n("starting");let l=as.request(()=>{n("idle")});return()=>{as.cancel(l)}},[t,e,i,o]),{mounted:i,setMounted:s,transitionStatus:o}}function vK(e){let{open:t,defaultOpen:r,onOpenChange:o,disabled:n}=e,[i,s]=Jq({controlled:t,default:r,name:"Collapsible",state:"open"}),{mounted:l,setMounted:c,transitionStatus:u}=x2(i,!0,!0),d=w2(),[f,m]=C2.useState(),h=f??d,g=Xe(v=>{let b=!i,S=Vt(mt.triggerPress,v.nativeEvent);o(b,S),!S.isCanceled&&s(b)});return C2.useMemo(()=>({disabled:n,handleTrigger:g,mounted:l,open:i,panelId:h,setMounted:c,setOpen:s,setPanelIdState:m,transitionStatus:u}),[n,g,l,i,h,c,s,m,u])}var T2=a(xe(),1),YB=T2.createContext(void 0);function E2(){let e=T2.useContext(YB);if(e===void 0)throw new Error(Mn(15));return e}var Su=(function(e){return e.startingStyle="data-starting-style",e.endingStyle="data-ending-style",e})({}),g5e={[Su.startingStyle]:""},v5e={[Su.endingStyle]:""},Ay={transitionStatus(e){return e==="starting"?g5e:e==="ending"?v5e:null}};var jx=(function(e){return e.open="data-open",e.closed="data-closed",e[e.startingStyle=Su.startingStyle]="startingStyle",e[e.endingStyle=Su.endingStyle]="endingStyle",e})({});var bK=(function(e){return e.panelOpen="data-panel-open",e})({});var b5e={[jx.open]:""},y5e={[jx.closed]:""},yK={open(e){return e?{[bK.panelOpen]:""}:null}},wK={open(e){return e?b5e:y5e}};var My=a(xe(),1);function P2(){return typeof window<"u"}function Mg(e){return k2(e)?(e.nodeName||"").toLowerCase():"#document"}function zr(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function hc(e){var t;return(t=(k2(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function k2(e){return P2()?e instanceof Node||e instanceof zr(e).Node:!1}function lt(e){return P2()?e instanceof Element||e instanceof zr(e).Element:!1}function tn(e){return P2()?e instanceof HTMLElement||e instanceof zr(e).HTMLElement:!1}function Iy(e){return!P2()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof zr(e).ShadowRoot}function Oy(e){let{overflow:t,overflowX:r,overflowY:o,display:n}=Ci(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+r)&&n!=="inline"&&n!=="contents"}function SK(e){return/^(table|td|th)$/.test(Mg(e))}function zx(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}var w5e=/transform|translate|scale|rotate|perspective|filter/,S5e=/paint|layout|strict|content/,Ng=e=>!!e&&e!=="none",qB;function R2(e){let t=lt(e)?Ci(e):e;return Ng(t.transform)||Ng(t.translate)||Ng(t.scale)||Ng(t.rotate)||Ng(t.perspective)||!Ny()&&(Ng(t.backdropFilter)||Ng(t.filter))||w5e.test(t.willChange||"")||S5e.test(t.contain||"")}function _K(e){let t=pc(e);for(;tn(t)&&!gc(t);){if(R2(t))return t;if(zx(t))return null;t=pc(t)}return null}function Ny(){return qB==null&&(qB=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),qB}function gc(e){return/^(html|body|#document)$/.test(Mg(e))}function Ci(e){return zr(e).getComputedStyle(e)}function Hx(e){return lt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function pc(e){if(Mg(e)==="html")return e;let t=e.assignedSlot||e.parentNode||Iy(e)&&e.host||hc(e);return Iy(t)?t.host:t}function xK(e){let t=pc(e);return gc(t)?e.ownerDocument?e.ownerDocument.body:e.body:tn(t)&&Oy(t)?t:xK(t)}function Ym(e,t,r){var o;t===void 0&&(t=[]),r===void 0&&(r=!0);let n=xK(e),i=n===((o=e.ownerDocument)==null?void 0:o.body),s=zr(n);if(i){let l=A2(s);return t.concat(s,s.visualViewport||[],Oy(n)?n:[],l&&r?Ym(l):[])}else return t.concat(n,Ym(n,[],r))}function A2(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}var I2=a(xe(),1),_5e=I2.createContext(void 0);function CK(e=!1){let t=I2.useContext(_5e);if(t===void 0&&!e)throw new Error(Mn(16));return t}var TK=a(xe(),1);function EK(e){let{focusableWhenDisabled:t,disabled:r,composite:o=!1,tabIndex:n=0,isNativeButton:i}=e,s=o&&t!==!1,l=o&&t===!1;return{props:TK.useMemo(()=>{let u={onKeyDown(d){r&&t&&d.key!=="Tab"&&d.preventDefault()}};return o||(u.tabIndex=n,!i&&r&&(u.tabIndex=t?n:-1)),(i&&(t||s)||!i&&r)&&(u["aria-disabled"]=r),i&&(!t||l)&&(u.disabled=r),u},[o,r,t,s,l,i,n])}}function Ux(e={}){let{disabled:t=!1,focusableWhenDisabled:r,tabIndex:o=0,native:n=!0,composite:i}=e,s=My.useRef(null),l=CK(!0),c=i??l!==void 0,{props:u}=EK({focusableWhenDisabled:r,disabled:t,composite:c,tabIndex:o,isNativeButton:n}),d=My.useCallback(()=>{let h=s.current;KB(h)&&c&&t&&u.disabled===void 0&&h.disabled&&(h.disabled=!1)},[t,u.disabled,c]);Qe(d,[d]);let f=My.useCallback((h={})=>{let{onClick:g,onMouseDown:v,onKeyUp:b,onKeyDown:S,onPointerDown:y,...w}=h;return jr({onClick(_){if(t){_.preventDefault();return}g?.(_)},onMouseDown(_){t||v?.(_)},onKeyDown(_){if(t||(Vx(_),S?.(_),_.baseUIHandlerPrevented))return;let x=_.target===_.currentTarget,E=_.currentTarget,O=KB(E),A=!n&&x5e(E),C=x&&(n?O:!A),I=_.key==="Enter",k=_.key===" ",P=E.getAttribute("role"),N=P?.startsWith("menuitem")||P==="option"||P==="gridcell";if(x&&c&&k){if(_.defaultPrevented&&N)return;_.preventDefault(),A||n&&O?(E.click(),_.preventBaseUIHandler()):C&&(g?.(_),_.preventBaseUIHandler());return}C&&(!n&&(k||I)&&_.preventDefault(),!n&&I&&g?.(_))},onKeyUp(_){if(!t){if(Vx(_),b?.(_),_.target===_.currentTarget&&n&&c&&KB(_.currentTarget)&&_.key===" "){_.preventDefault();return}_.baseUIHandlerPrevented||_.target===_.currentTarget&&!n&&!c&&_.key===" "&&g?.(_)}},onPointerDown(_){if(t){_.preventDefault();return}y?.(_)}},n?{type:"button"}:{role:"button"},u,w)},[t,u,c,n]),m=Xe(h=>{s.current=h,d()});return{getButtonProps:f,buttonRef:m}}function KB(e){return tn(e)&&e.tagName==="BUTTON"}function x5e(e){return!!(e?.tagName==="A"&&e?.href)}var qm=typeof navigator<"u",ZB=C5e(),PK=E5e(),O2=T5e(),kut=typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter:none"),Rut=ZB.platform==="MacIntel"&&ZB.maxTouchPoints>1?!0:/iP(hone|ad|od)|iOS/.test(ZB.platform),Aut=qm&&/firefox/i.test(O2),kK=qm&&/apple/i.test(navigator.vendor),Iut=qm&&/Edg/i.test(O2),Out=qm&&/android/i.test(PK)||/android/i.test(O2),RK=qm&&PK.toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints,AK=O2.includes("jsdom/");function C5e(){if(!qm)return{platform:"",maxTouchPoints:-1};let e=navigator.userAgentData;return e?.platform?{platform:e.platform,maxTouchPoints:navigator.maxTouchPoints}:{platform:navigator.platform??"",maxTouchPoints:navigator.maxTouchPoints??-1}}function T5e(){if(!qm)return"";let e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(({brand:t,version:r})=>`${t}/${r}`).join(" "):navigator.userAgent}function E5e(){if(!qm)return"";let e=navigator.userAgentData;return e?.platform?e.platform:navigator.platform??""}var XB="data-base-ui-focusable";var QB="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function N2(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}function mr(e,t){if(!e||!t)return!1;let r=t.getRootNode?.();if(e.contains(t))return!0;if(r&&Iy(r)){let o=t;for(;o;){if(e===o)return!0;o=o.parentNode||o.host}}return!1}function ls(e){return"composedPath"in e?e.composedPath()[0]:e.target}function Km(e,t){if(!lt(e))return!1;let r=e;if(t.hasElement(r))return!r.hasAttribute("data-trigger-disabled");for(let[,o]of t.entries())if(mr(o,r))return!o.hasAttribute("data-trigger-disabled");return!1}function M2(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);let r=e;return r.target!=null&&t.contains(r.target)}function IK(e){return e.matches("html,body")}function OK(e){return tn(e)&&e.matches(QB)}function JB(e){return e?.closest(`button,a[href],[role="button"],select,[tabindex]:not([tabindex="-1"]),${QB}`)!=null}function NK(e){if(!e||AK)return!0;try{return e.matches(":focus-visible")}catch{return!0}}function Jd(e,t,r=!0){return e.filter(n=>n.parentId===t).flatMap(n=>[...!r||n.context?.open?[n]:[],...Jd(e,n.id,r)])}function MK(e){return"nativeEvent"in e}function $d(e,t){let r=["mouse","pen"];return t||r.push("",void 0),r.includes(e)}function FK(e){let t=e.type;return t==="click"||t==="mousedown"||t==="keydown"||t==="keyup"}var BK=["top","right","bottom","left"];var Zm=Math.min,cs=Math.max,Xm=Math.round,Gx=Math.floor,vc=e=>({x:e,y:e}),P5e={left:"right",right:"left",bottom:"top",top:"bottom"};function Yx(e,t,r){return cs(e,Zm(t,r))}function bc(e,t){return typeof e=="function"?e(t):e}function ai(e){return e.split("-")[0]}function yc(e){return e.split("-")[1]}function D2(e){return e==="x"?"y":"x"}function qx(e){return e==="y"?"height":"width"}function Ks(e){let t=e[0];return t==="t"||t==="b"?"y":"x"}function Kx(e){return D2(Ks(e))}function VK(e,t,r){r===void 0&&(r=!1);let o=yc(e),n=Kx(e),i=qx(n),s=n==="x"?o===(r?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=Wx(s)),[s,Wx(s)]}function jK(e){let t=Wx(e);return[F2(e),t,F2(t)]}function F2(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}var DK=["left","right"],LK=["right","left"],k5e=["top","bottom"],R5e=["bottom","top"];function A5e(e,t,r){switch(e){case"top":case"bottom":return r?t?LK:DK:t?DK:LK;case"left":case"right":return t?k5e:R5e;default:return[]}}function zK(e,t,r,o){let n=yc(e),i=A5e(ai(e),r==="start",o);return n&&(i=i.map(s=>s+"-"+n),t&&(i=i.concat(i.map(F2)))),i}function Wx(e){let t=ai(e);return P5e[t]+e.slice(t.length)}function I5e(e){return{top:0,right:0,bottom:0,left:0,...e}}function L2(e){return typeof e!="number"?I5e(e):{top:e,right:e,bottom:e,left:e}}function Fg(e){let{x:t,y:r,width:o,height:n}=e;return{width:o,height:n,top:r,left:t,right:t+o,bottom:r+n,x:t,y:r}}function Fn(e){return e?.ownerDocument||document}var us=a(xe(),1);function Zt(e,t,r,o){return e.addEventListener(t,r,o),()=>{e.removeEventListener(t,r,o)}}function Ti(e){let t=si(O5e,e).current;return t.next=e,Qe(t.effect),t}function O5e(e){let t={current:e,next:e,effect:()=>{t.current=t.next}};return t}var GK=a(xe(),1);var WK=a(_u(),1);function UK(e){return e==null?e:"current"in e?e.current:e}function Qm(e,t=!1,r=!0){let o=Ry();return Xe((n,i=null)=>{o.cancel();let s=UK(e);if(s==null)return;let l=s,c=()=>{WK.flushSync(n)};if(typeof l.getAnimations!="function"||globalThis.BASE_UI_ANIMATIONS_DISABLED){n();return}function u(){Promise.all(l.getAnimations().map(d=>d.finished)).then(()=>{i?.aborted||c()}).catch(()=>{if(r){i?.aborted||c();return}let d=l.getAnimations();!i?.aborted&&d.length>0&&d.some(f=>f.pending||f.playState!=="finished")&&u()})}if(t){let d=Su.startingStyle;if(!l.hasAttribute(d)){o.request(u);return}let f=new MutationObserver(()=>{l.hasAttribute(d)||(f.disconnect(),u())});f.observe(l,{attributes:!0,attributeFilter:[d]}),i?.addEventListener("abort",()=>f.disconnect(),{once:!0});return}o.request(u)})}function Fy(e){let{enabled:t=!0,open:r,ref:o,onComplete:n}=e,i=Xe(n),s=Qm(o,r,!1);GK.useEffect(()=>{if(!t)return;let l=new AbortController;return s(i,l.signal),()=>{l.abort()}},[t,r,i,s])}var Zx={height:void 0,width:void 0};function qK(e){let{externalRef:t,hiddenUntilFound:r,id:o,keepMounted:n,mounted:i,onOpenChange:s,open:l,setMounted:c,setOpen:u,transitionStatus:d}=e,f=us.useRef(null),m=us.useRef(null),[h,g]=us.useState(Zx),v=us.useRef(Zx),b=us.useRef(!1),S=us.useRef(l),y=us.useRef(!1),[w,_]=us.useState(!1),x=us.useRef(null),E=Dx(t,f),O=Ti({mounted:i,open:l}),A=Qm(f,!1,!1),C=!l&&!i,I=w?"idle":d,k=l&&(S.current||y.current),P=!l&&i&&m.current==="css-animation"&&h.height===void 0&&h.width===void 0?v.current:h,N=r&&C&&m.current!=="css-animation",U=Xe((M,z=!0)=>{z&&(v.current=M),g(M)}),F=Xe(()=>{x.current?.(),x.current=null}),D=Xe(M=>{F(),x.current=()=>{x.current=null,M()}}),B=Xe(()=>{l&&i&&m.current==="css-animation"&&(y.current=!0)});Qe(()=>{!w||d==="starting"||_(!1)},[w,d]),us.useEffect(()=>()=>{B(),F()},[B,F]),Qe(()=>{let M=f.current;if(!M)return;!l&&x.current&&F();let z=N5e(M,k);if(m.current=z,l&&d==="idle"&&S.current&&z==="css-animation"){v.current=Dy(M);return}if(l&&d==="starting"){let q=b.current;if(b.current=!1,z==="none"){U(Dy(M)),_(!0);return}if(z==="css-transition"){let X=M5e(M);if(U(Dy(M)),!q)return X;let ie=Xx(M,"transition-duration","0s");return D(ie),_(!0),X}if(z==="css-animation"){if(U(Dy(M)),!q){Xx(M,"animation-name","none")();return}let X=Xx(M,"animation-name","none"),ie=Xx(M,"animation-duration","0s");X(),D(ie),_(!0);return}}if(!l&&i&&(d==="idle"||d==="starting")){if(z==="none"){U(Zx,!1),c(!1);return}z==="css-animation"&&(S.current=!1,y.current=!1),U(Dy(M));return}if(d!=="ending")return;if(z==="none"){c(!1);return}let K=Dy(M);if(!((K.height??0)>0||(K.width??0)>0)){c(!1);return}U(K),z==="css-animation"&&Xx(M,"animation-name","none")()},[i,l,F,U,c,D,k,d]),Fy({enabled:l&&i&&I==="idle",open:!0,ref:f,onComplete(){l&&U(Zx,!1)}}),us.useEffect(()=>{if(l||!i||I!=="ending"||!f.current)return;let z=new AbortController,K=-1;function Z(){O.current.open||(c(!1),U(Zx,!1))}return K=as.request(()=>{z.signal.aborted||A(Z,z.signal)}),()=>{as.cancel(K),z.abort()}},[O,i,l,I,A,U,c]),Qe(()=>{let M=f.current;!M||!r||!C||M.setAttribute("hidden","until-found")},[C,r]),us.useEffect(function(){let z=f.current;if(!z)return;function K(Z){b.current=!0,u(!0),s(!0,Vt(mt.none,Z))}return Zt(z,"beforematch",K)},[s,u]);let L=n||r||i||l;return{height:P.height,props:{...N?{[jx.startingStyle]:""}:void 0,hidden:C,id:o},ref:E,shouldPreventOpenAnimation:k,shouldRender:L,transitionStatus:I,width:P.width}}function Dy(e){return{height:e.scrollHeight,width:e.scrollWidth}}function N5e(e,t=!1){let r=zr(e).getComputedStyle(e),o=(r.animationName.split(",").map(i=>i.trim()).some(i=>i!==""&&i!=="none")||t)&&YK(r.animationDuration),n=YK(r.transitionDuration);return o&&n||n?"css-transition":o?"css-animation":"none"}function YK(e){return e.split(",").map(t=>t.trim()).some(t=>t!==""&&Number.parseFloat(t)>0)}function Xx(e,t,r){let o=e.style.getPropertyValue(t),n=e.style.getPropertyPriority(t);return e.style.setProperty(t,r),()=>{if(o===""){e.style.removeProperty(t);return}e.style.setProperty(t,o,n)}}function M5e(e){let t={"justify-content":e.style.justifyContent,"align-items":e.style.alignItems,"align-content":e.style.alignContent,"justify-items":e.style.justifyItems};Object.keys(t).forEach(n=>{e.style.setProperty(n,"initial","important")});function r(){Object.entries(t).forEach(([n,i])=>{if(i===""){e.style.removeProperty(n);return}e.style.setProperty(n,i)})}let o=as.request(r);return()=>{as.cancel(o),r()}}var KK=a(xe(),1);function ZK(e){let t=KK.useRef(!0);t.current&&(t.current=!1,e())}var Qx=0,Ua=class e{static create(){return new e}currentId=Qx;start(t,r){this.clear(),this.currentId=setTimeout(()=>{this.currentId=Qx,r()},t)}isStarted(){return this.currentId!==Qx}clear=()=>{this.currentId!==Qx&&(clearTimeout(this.currentId),this.currentId=Qx)};disposeEffect=()=>this.clear};function wc(){let e=si(Ua.create).current;return ky(e.disposeEffect),e}var Zs=a(xe(),1);function F5e(e,t){return t!=null&&!$d(t)?0:typeof e=="function"?e():e}function Dg(e,t,r){let o=F5e(e,r);return typeof o=="number"?o:o?.[t]}function $B(e){return typeof e=="function"?e():e}function B2(e,t){return t||e==="click"||e==="mousedown"}function XK(e){return e?.includes("mouse")&&e!=="mousedown"}var QK=a(T(),1),JK=Zs.createContext({hasProvider:!1,timeoutMs:0,delayRef:{current:0},initialDelayRef:{current:0},timeout:new Ua,currentIdRef:{current:null},currentContextRef:{current:null}});function eV(e){let{children:t,delay:r,timeoutMs:o=0}=e,n=Zs.useRef(r),i=Zs.useRef(r),s=Zs.useRef(null),l=Zs.useRef(null),c=wc();return(0,QK.jsx)(JK.Provider,{value:Zs.useMemo(()=>({hasProvider:!0,delayRef:n,initialDelayRef:i,currentIdRef:s,timeoutMs:o,currentContextRef:l,timeout:c}),[o,c]),children:t})}function tV(e,t={open:!1}){let{open:r}=t,o="rootStore"in e?e.rootStore:e,n=o.useState("floatingId"),i=Zs.useContext(JK),{currentIdRef:s,delayRef:l,timeoutMs:c,initialDelayRef:u,currentContextRef:d,hasProvider:f,timeout:m}=i,[h,g]=Zs.useState(!1);return Qe(()=>{function v(){g(!1),d.current?.setIsInstantPhase(!1),s.current=null,d.current=null,l.current=u.current}if(s.current&&!r&&s.current===n){if(g(!1),c){let b=n;return m.start(c,()=>{o.select("open")||s.current&&s.current!==b||v()}),()=>{m.clear()}}v()}},[r,n,s,l,c,u,d,m,o]),Qe(()=>{if(!r)return;let v=d.current,b=s.current;m.clear(),d.current={onOpenChange:o.setOpen,setIsInstantPhase:g},s.current=n,l.current={open:0,close:Dg(u.current,"close")},b!==null&&b!==n?(g(!0),v?.setIsInstantPhase(!0),v?.onOpenChange(!1,Vt(mt.none))):(g(!1),v?.setIsInstantPhase(!1))},[r,n,o,s,l,u,d,m]),Qe(()=>()=>{d.current=null},[d]),Zs.useMemo(()=>({hasProvider:f,delayRef:l,isInstantPhase:h}),[f,l,h])}function Sc(...e){return()=>{for(let t=0;t<e.length;t+=1){let r=e[t];r&&r()}}}function Ly(e){return`data-base-ui-${e}`}var Wa=a(xe(),1),tZ=a(_u(),1);var $K={style:{transition:"none"}};var D5e="data-base-ui-swipe-ignore",L5e="data-swipe-ignore",Fdt=`[${D5e}]`,Ddt=`[${L5e}]`;var eZ={fallbackAxisSide:"end"};var rZ=a(T(),1),B5e=Wa.createContext(null),V5e=()=>Wa.useContext(B5e),j5e=Ly("portal");function rV(e={}){let{ref:t,container:r,componentProps:o=Eo,elementProps:n}=e,i=Gm(),l=V5e()?.portalNode,[c,u]=Wa.useState(null),[d,f]=Wa.useState(null),m=Xe(b=>{b!==null&&f(b)}),h=Wa.useRef(null);Qe(()=>{if(r===null){h.current&&(h.current=null,f(null),u(null));return}if(i==null)return;let b=(r&&(k2(r)?r:r.current))??l??document.body;if(b==null){h.current&&(h.current=null,f(null),u(null));return}h.current!==b&&(h.current=b,f(null),u(b))},[r,l,i]);let g=Po("div",o,{ref:[t,m],props:[{id:i,[j5e]:""},n]});return{portalNode:d,portalSubtree:c&&g?tZ.createPortal(g,c):null}}var Lg=a(xe(),1);function oZ(){let e=new Map;return{emit(t,r){e.get(t)?.forEach(o=>o(r))},on(t,r){e.has(t)||e.set(t,new Set),e.get(t).add(r)},off(t,r){e.get(t)?.delete(r)}}}var z5e=a(T(),1),H5e=Lg.createContext(null),U5e=Lg.createContext(null),By=()=>Lg.useContext(H5e)?.id||null,Jm=e=>{let t=Lg.useContext(U5e);return e??t};var Xs=a(xe(),1);function W5e(e,t){let r=null,o=null,n=!1;return{contextElement:e||void 0,getBoundingClientRect(){let i=e?.getBoundingClientRect()||{width:0,height:0,x:0,y:0},s=t.axis==="x"||t.axis==="both",l=t.axis==="y"||t.axis==="both",c=["mouseenter","mousemove"].includes(t.dataRef.current.openEvent?.type||"")&&t.pointerType!=="touch",u=i.width,d=i.height,f=i.x,m=i.y;return r==null&&t.x&&s&&(r=i.x-t.x),o==null&&t.y&&l&&(o=i.y-t.y),f-=r||0,m-=o||0,u=0,d=0,!n||c?(u=t.axis==="y"?i.width:0,d=t.axis==="x"?i.height:0,f=s&&t.x!=null?t.x:f,m=l&&t.y!=null?t.y:m):n&&!c&&(d=t.axis==="x"?i.height:d,u=t.axis==="y"?i.width:u),n=!0,{width:u,height:d,x:f,y:m,top:m,right:f+u,bottom:m+d,left:f}}}}function nZ(e){return e!=null&&e.clientX!=null}function oV(e,t={}){let{enabled:r=!0,axis:o="both"}=t,n="rootStore"in e?e.rootStore:e,i=n.useState("open"),s=n.useState("floatingElement"),l=n.useState("domReferenceElement"),c=n.context.dataRef,u=Xs.useRef(!1),d=Xs.useRef(null),[f,m]=Xs.useState(),[h,g]=Xs.useState([]),v=Xe(_=>{n.set("positionReference",_)}),b=Xe((_,x,E)=>{u.current||c.current.openEvent&&!nZ(c.current.openEvent)||n.set("positionReference",W5e(E??l,{x:_,y:x,axis:o,dataRef:c,pointerType:f}))}),S=Xe(_=>{i?d.current||(b(_.clientX,_.clientY,_.currentTarget),g([])):b(_.clientX,_.clientY,_.currentTarget)}),y=$d(f)?s:i;Xs.useEffect(()=>{if(!r){v(l);return}if(!y)return;function _(){d.current?.(),d.current=null}let x=zr(s);function E(O){let A=ls(O);mr(s,A)?_():b(O.clientX,O.clientY)}return!c.current.openEvent||nZ(c.current.openEvent)?d.current=Zt(x,"mousemove",E):v(l),_},[y,r,s,c,l,n,b,v,h]),Xs.useEffect(()=>()=>{n.set("positionReference",null)},[n]),Xs.useEffect(()=>{r&&!s&&(u.current=!1)},[r,s]),Xs.useEffect(()=>{!r&&i&&(u.current=!0)},[r,i]);let w=Xs.useMemo(()=>{function _(x){m(x.pointerType)}return{onPointerDown:_,onPointerEnter:_,onMouseMove:S,onMouseEnter:S}},[S]);return Xs.useMemo(()=>r?{reference:w,trigger:w}:{},[r,w])}var Qs=a(xe(),1);var G5e={intentional:"onClick",sloppy:"onPointerDown"};function Y5e(){return!1}function q5e(e){return{escapeKey:typeof e=="boolean"?e:e?.escapeKey??!1,outsidePress:typeof e=="boolean"?e:e?.outsidePress??!0}}function nV(e,t={}){let{enabled:r=!0,escapeKey:o=!0,outsidePress:n=!0,outsidePressEvent:i="sloppy",referencePress:s=Y5e,referencePressEvent:l="sloppy",bubbles:c,externalTree:u}=t,d="rootStore"in e?e.rootStore:e,f=d.useState("open"),m=d.useState("floatingElement"),{dataRef:h}=d.context,g=Jm(u),v=Xe(typeof n=="function"?n:()=>!1),b=typeof n=="function"?v:n,S=b!==!1,y=Xe(()=>i),{escapeKey:w,outsidePress:_}=q5e(c),x=Qs.useRef(!1),E=Qs.useRef(!1),O=Qs.useRef(!1),A=Qs.useRef(!1),C=Qs.useRef(""),I=Qs.useRef(null),k=wc(),P=wc(),N=Xe(()=>{P.clear(),h.current.insideReactTree=!1}),U=Xe(q=>{let X=h.current.floatingContext?.nodeId;return(g?Jd(g.nodesRef.current,X):[]).some($=>$.context?.open&&!$.context.dataRef.current[q])}),F=Xe(q=>M2(q,d.select("floatingElement"))||M2(q,d.select("domReferenceElement"))),D=Xe(q=>{s()&&d.setOpen(!1,Vt(mt.triggerPress,q.nativeEvent))}),B=Xe(q=>{if(!f||!r||!o||q.key!=="Escape"||A.current||!w&&U("__escapeKeyBubbles"))return;let X=MK(q)?q.nativeEvent:q,ie=Vt(mt.escapeKey,X);d.setOpen(!1,ie),ie.isCanceled||q.preventDefault(),!w&&!ie.isPropagationAllowed&&q.stopPropagation()}),L=Xe(()=>{h.current.insideReactTree=!0,P.start(0,N)}),M=Xe(q=>{if(!f||!r||q.button!==0)return;let X=ls(q.nativeEvent);mr(d.select("floatingElement"),X)&&(x.current||(x.current=!0,E.current=!1))}),z=Xe(q=>{!f||!r||(q.defaultPrevented||q.nativeEvent.defaultPrevented)&&x.current&&(E.current=!0)});Qs.useEffect(()=>{if(!f||!r)return;h.current.__escapeKeyBubbles=w,h.current.__outsidePressBubbles=_;let q=new Ua,X=new Ua;function ie(){q.clear(),A.current=!0}function $(){q.start(Ny()?5:0,()=>{A.current=!1})}function le(){O.current=!0,X.start(0,()=>{O.current=!1})}function ae(){x.current=!1,E.current=!1}function re(){let J=C.current,he=J==="pen"||!J?"mouse":J,ct=y(),Ke=typeof ct=="function"?ct():ct;return typeof Ke=="string"?Ke:Ke[he]}function ve(J){let he=re();return he==="intentional"&&J.type!=="click"||he==="sloppy"&&J.type==="click"}function Ce(J){let he=h.current.floatingContext?.nodeId,ct=g&&Jd(g.nodesRef.current,he).some(Ke=>M2(J,Ke.context?.elements.floating));return F(J)||ct}function _e(J){if(ve(J)){J.type!=="click"&&!F(J)&&(X.clear(),O.current=!1),N();return}if(h.current.insideReactTree){N();return}let he=ls(J),ct=`[${Ly("inert")}]`,Ke=lt(he)?he.getRootNode():null,dt=Array.from((Iy(Ke)?Ke:Fn(d.select("floatingElement"))).querySelectorAll(ct)),yt=d.context.triggerElements;if(he&&(yt.hasElement(he)||yt.hasMatchingElement(_t=>mr(_t,he))))return;let Pt=lt(he)?he:null;for(;Pt&&!gc(Pt);){let _t=pc(Pt);if(gc(_t)||!lt(_t))break;Pt=_t}if(!(dt.length&&lt(he)&&!IK(he)&&!mr(he,d.select("floatingElement"))&&dt.every(_t=>!mr(Pt,_t)))){if(tn(he)&&!("touches"in J)){let _t=gc(he),Ye=Ci(he),La=/auto|scroll/,js=_t||La.test(Ye.overflowX),_r=_t||La.test(Ye.overflowY),uc=js&&he.clientWidth>0&&he.scrollWidth>he.clientWidth,Kr=_r&&he.clientHeight>0&&he.scrollHeight>he.clientHeight,wt=Ye.direction==="rtl",Ht=Kr&&(wt?J.offsetX<=he.offsetWidth-he.clientWidth:J.offsetX>he.clientWidth),ee=uc&&J.offsetY>he.clientHeight;if(Ht||ee)return}if(!Ce(J)){if(re()==="intentional"&&O.current){X.clear(),O.current=!1;return}typeof b=="function"&&!b(J)||U("__outsidePressBubbles")||(d.setOpen(!1,Vt(mt.outsidePress,J)),N())}}}function Me(J){re()!=="sloppy"||J.pointerType==="touch"||!d.select("open")||!r||F(J)||_e(J)}function ue(J){if(re()!=="sloppy"||!d.select("open")||!r||F(J))return;let he=J.touches[0];he&&(I.current={startTime:Date.now(),startX:he.clientX,startY:he.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},k.start(1e3,()=>{I.current&&(I.current.dismissOnTouchEnd=!1,I.current.dismissOnMouseDown=!1)}))}function te(J,he){let ct=ls(J);if(!ct)return;let Ke=Zt(ct,J.type,()=>{he(J),Ke()})}function de(J){C.current="touch",te(J,ue)}function se(J){k.clear(),J.type==="pointerdown"&&(C.current=J.pointerType),!(J.type==="mousedown"&&I.current&&!I.current.dismissOnMouseDown)&&te(J,he=>{he.type==="pointerdown"?Me(he):_e(he)})}function fe(J){if(!x.current)return;let he=E.current;if(ae(),re()==="intentional"){if(J.type==="pointercancel"){he&&le();return}if(!Ce(J)){if(he){le();return}typeof b=="function"&&!b(J)||(X.clear(),O.current=!0,N())}}}function Ne(J){if(re()!=="sloppy"||!I.current||F(J))return;let he=J.touches[0];if(!he)return;let ct=Math.abs(he.clientX-I.current.startX),Ke=Math.abs(he.clientY-I.current.startY),dt=Math.sqrt(ct*ct+Ke*Ke);dt>5&&(I.current.dismissOnTouchEnd=!0),dt>10&&(_e(J),k.clear(),I.current=null)}function Ie(J){te(J,Ne)}function je(J){re()!=="sloppy"||!I.current||F(J)||(I.current.dismissOnTouchEnd&&_e(J),k.clear(),I.current=null)}function Ge(J){te(J,je)}let Se=Fn(m),Te=Sc(o&&Sc(Zt(Se,"keydown",B),Zt(Se,"compositionstart",ie),Zt(Se,"compositionend",$)),S&&Sc(Zt(Se,"click",se,!0),Zt(Se,"pointerdown",se,!0),Zt(Se,"pointerup",fe,!0),Zt(Se,"pointercancel",fe,!0),Zt(Se,"mousedown",se,!0),Zt(Se,"mouseup",fe,!0),Zt(Se,"touchstart",de,!0),Zt(Se,"touchmove",Ie,!0),Zt(Se,"touchend",Ge,!0)));return()=>{Te(),q.clear(),X.clear(),ae(),O.current=!1}},[h,m,o,S,b,f,r,w,_,B,N,y,U,F,g,d,k]),Qs.useEffect(N,[b,N]);let K=Qs.useMemo(()=>({onKeyDown:B,[G5e[l]]:D,...l!=="intentional"&&{onClick:D}}),[B,D,l]),Z=Qs.useMemo(()=>({onKeyDown:B,onPointerDown:z,onMouseDown:z,onClickCapture:L,onMouseDownCapture(q){L(),M(q)},onPointerDownCapture(q){L(),M(q)},onMouseUpCapture:L,onTouchEndCapture:L,onTouchMoveCapture:L}),[B,L,M,z]);return Qs.useMemo(()=>r?{reference:K,floating:Z,trigger:K}:{},[r,K,Z])}var Ei=a(xe(),1);function iZ(e,t,r){let{reference:o,floating:n}=e,i=Ks(t),s=Kx(t),l=qx(s),c=ai(t),u=i==="y",d=o.x+o.width/2-n.width/2,f=o.y+o.height/2-n.height/2,m=o[l]/2-n[l]/2,h;switch(c){case"top":h={x:d,y:o.y-n.height};break;case"bottom":h={x:d,y:o.y+o.height};break;case"right":h={x:o.x+o.width,y:f};break;case"left":h={x:o.x-n.width,y:f};break;default:h={x:o.x,y:o.y}}switch(yc(t)){case"start":h[s]-=m*(r&&u?-1:1);break;case"end":h[s]+=m*(r&&u?-1:1);break}return h}async function lZ(e,t){var r;t===void 0&&(t={});let{x:o,y:n,platform:i,rects:s,elements:l,strategy:c}=e,{boundary:u="clippingAncestors",rootBoundary:d="viewport",elementContext:f="floating",altBoundary:m=!1,padding:h=0}=bc(t,e),g=L2(h),b=l[m?f==="floating"?"reference":"floating":f],S=Fg(await i.getClippingRect({element:(r=await(i.isElement==null?void 0:i.isElement(b)))==null||r?b:b.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(l.floating)),boundary:u,rootBoundary:d,strategy:c})),y=f==="floating"?{x:o,y:n,width:s.floating.width,height:s.floating.height}:s.reference,w=await(i.getOffsetParent==null?void 0:i.getOffsetParent(l.floating)),_=await(i.isElement==null?void 0:i.isElement(w))?await(i.getScale==null?void 0:i.getScale(w))||{x:1,y:1}:{x:1,y:1},x=Fg(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:y,offsetParent:w,strategy:c}):y);return{top:(S.top-x.top+g.top)/_.y,bottom:(x.bottom-S.bottom+g.bottom)/_.y,left:(S.left-x.left+g.left)/_.x,right:(x.right-S.right+g.right)/_.x}}var K5e=50,cZ=async(e,t,r)=>{let{placement:o="bottom",strategy:n="absolute",middleware:i=[],platform:s}=r,l=s.detectOverflow?s:{...s,detectOverflow:lZ},c=await(s.isRTL==null?void 0:s.isRTL(t)),u=await s.getElementRects({reference:e,floating:t,strategy:n}),{x:d,y:f}=iZ(u,o,c),m=o,h=0,g={};for(let v=0;v<i.length;v++){let b=i[v];if(!b)continue;let{name:S,fn:y}=b,{x:w,y:_,data:x,reset:E}=await y({x:d,y:f,initialPlacement:o,placement:m,strategy:n,middlewareData:g,rects:u,platform:l,elements:{reference:e,floating:t}});d=w??d,f=_??f,g[S]={...g[S],...x},E&&h<K5e&&(h++,typeof E=="object"&&(E.placement&&(m=E.placement),E.rects&&(u=E.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:n}):E.rects),{x:d,y:f}=iZ(u,m,c)),v=-1)}return{x:d,y:f,placement:m,strategy:n,middlewareData:g}};var uZ=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,o;let{placement:n,middlewareData:i,rects:s,initialPlacement:l,platform:c,elements:u}=t,{mainAxis:d=!0,crossAxis:f=!0,fallbackPlacements:m,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:v=!0,...b}=bc(e,t);if((r=i.arrow)!=null&&r.alignmentOffset)return{};let S=ai(n),y=Ks(l),w=ai(l)===l,_=await(c.isRTL==null?void 0:c.isRTL(u.floating)),x=m||(w||!v?[Wx(l)]:jK(l)),E=g!=="none";!m&&E&&x.push(...zK(l,v,g,_));let O=[l,...x],A=await c.detectOverflow(t,b),C=[],I=((o=i.flip)==null?void 0:o.overflows)||[];if(d&&C.push(A[S]),f){let U=VK(n,s,_);C.push(A[U[0]],A[U[1]])}if(I=[...I,{placement:n,overflows:C}],!C.every(U=>U<=0)){var k,P;let U=(((k=i.flip)==null?void 0:k.index)||0)+1,F=O[U];if(F&&(!(f==="alignment"?y!==Ks(F):!1)||I.every(L=>Ks(L.placement)===y?L.overflows[0]>0:!0)))return{data:{index:U,overflows:I},reset:{placement:F}};let D=(P=I.filter(B=>B.overflows[0]<=0).sort((B,L)=>B.overflows[1]-L.overflows[1])[0])==null?void 0:P.placement;if(!D)switch(h){case"bestFit":{var N;let B=(N=I.filter(L=>{if(E){let M=Ks(L.placement);return M===y||M==="y"}return!0}).map(L=>[L.placement,L.overflows.filter(M=>M>0).reduce((M,z)=>M+z,0)]).sort((L,M)=>L[1]-M[1])[0])==null?void 0:N[0];B&&(D=B);break}case"initialPlacement":D=l;break}if(n!==D)return{reset:{placement:D}}}return{}}}};function sZ(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function aZ(e){return BK.some(t=>e[t]>=0)}var dZ=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){let{rects:r,platform:o}=t,{strategy:n="referenceHidden",...i}=bc(e,t);switch(n){case"referenceHidden":{let s=await o.detectOverflow(t,{...i,elementContext:"reference"}),l=sZ(s,r.reference);return{data:{referenceHiddenOffsets:l,referenceHidden:aZ(l)}}}case"escaped":{let s=await o.detectOverflow(t,{...i,altBoundary:!0}),l=sZ(s,r.floating);return{data:{escapedOffsets:l,escaped:aZ(l)}}}default:return{}}}}};var fZ=new Set(["left","top"]);async function Z5e(e,t){let{placement:r,platform:o,elements:n}=e,i=await(o.isRTL==null?void 0:o.isRTL(n.floating)),s=ai(r),l=yc(r),c=Ks(r)==="y",u=fZ.has(s)?-1:1,d=i&&c?-1:1,f=bc(t,e),{mainAxis:m,crossAxis:h,alignmentAxis:g}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return l&&typeof g=="number"&&(h=l==="end"?g*-1:g),c?{x:h*d,y:m*u}:{x:m*u,y:h*d}}var mZ=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,o;let{x:n,y:i,placement:s,middlewareData:l}=t,c=await Z5e(t,e);return s===((r=l.offset)==null?void 0:r.placement)&&(o=l.arrow)!=null&&o.alignmentOffset?{}:{x:n+c.x,y:i+c.y,data:{...c,placement:s}}}}},pZ=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){let{x:r,y:o,placement:n,platform:i}=t,{mainAxis:s=!0,crossAxis:l=!1,limiter:c={fn:S=>{let{x:y,y:w}=S;return{x:y,y:w}}},...u}=bc(e,t),d={x:r,y:o},f=await i.detectOverflow(t,u),m=Ks(ai(n)),h=D2(m),g=d[h],v=d[m];if(s){let S=h==="y"?"top":"left",y=h==="y"?"bottom":"right",w=g+f[S],_=g-f[y];g=Yx(w,g,_)}if(l){let S=m==="y"?"top":"left",y=m==="y"?"bottom":"right",w=v+f[S],_=v-f[y];v=Yx(w,v,_)}let b=c.fn({...t,[h]:g,[m]:v});return{...b,data:{x:b.x-r,y:b.y-o,enabled:{[h]:s,[m]:l}}}}}},hZ=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:r,y:o,placement:n,rects:i,middlewareData:s}=t,{offset:l=0,mainAxis:c=!0,crossAxis:u=!0}=bc(e,t),d={x:r,y:o},f=Ks(n),m=D2(f),h=d[m],g=d[f],v=bc(l,t),b=typeof v=="number"?{mainAxis:v,crossAxis:0}:{mainAxis:0,crossAxis:0,...v};if(c){let w=m==="y"?"height":"width",_=i.reference[m]-i.floating[w]+b.mainAxis,x=i.reference[m]+i.reference[w]-b.mainAxis;h<_?h=_:h>x&&(h=x)}if(u){var S,y;let w=m==="y"?"width":"height",_=fZ.has(ai(n)),x=i.reference[f]-i.floating[w]+(_&&((S=s.offset)==null?void 0:S[f])||0)+(_?0:b.crossAxis),E=i.reference[f]+i.reference[w]+(_?0:((y=s.offset)==null?void 0:y[f])||0)-(_?b.crossAxis:0);g<x?g=x:g>E&&(g=E)}return{[m]:h,[f]:g}}}},gZ=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,o;let{placement:n,rects:i,platform:s,elements:l}=t,{apply:c=()=>{},...u}=bc(e,t),d=await s.detectOverflow(t,u),f=ai(n),m=yc(n),h=Ks(n)==="y",{width:g,height:v}=i.floating,b,S;f==="top"||f==="bottom"?(b=f,S=m===(await(s.isRTL==null?void 0:s.isRTL(l.floating))?"start":"end")?"left":"right"):(S=f,b=m==="end"?"top":"bottom");let y=v-d.top-d.bottom,w=g-d.left-d.right,_=Zm(v-d[b],y),x=Zm(g-d[S],w),E=!t.middlewareData.shift,O=_,A=x;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(A=w),(o=t.middlewareData.shift)!=null&&o.enabled.y&&(O=y),E&&!m){let I=cs(d.left,0),k=cs(d.right,0),P=cs(d.top,0),N=cs(d.bottom,0);h?A=g-2*(I!==0||k!==0?I+k:cs(d.left,d.right)):O=v-2*(P!==0||N!==0?P+N:cs(d.top,d.bottom))}await c({...t,availableWidth:A,availableHeight:O});let C=await s.getDimensions(l.floating);return g!==C.width||v!==C.height?{reset:{rects:!0}}:{}}}};function wZ(e){let t=Ci(e),r=parseFloat(t.width)||0,o=parseFloat(t.height)||0,n=tn(e),i=n?e.offsetWidth:r,s=n?e.offsetHeight:o,l=Xm(r)!==i||Xm(o)!==s;return l&&(r=i,o=s),{width:r,height:o,$:l}}function sV(e){return lt(e)?e:e.contextElement}function Vy(e){let t=sV(e);if(!tn(t))return vc(1);let r=t.getBoundingClientRect(),{width:o,height:n,$:i}=wZ(t),s=(i?Xm(r.width):r.width)/o,l=(i?Xm(r.height):r.height)/n;return(!s||!Number.isFinite(s))&&(s=1),(!l||!Number.isFinite(l))&&(l=1),{x:s,y:l}}var X5e=vc(0);function SZ(e){let t=zr(e);return!Ny()||!t.visualViewport?X5e:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Q5e(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==zr(e)?!1:t}function Bg(e,t,r,o){t===void 0&&(t=!1),r===void 0&&(r=!1);let n=e.getBoundingClientRect(),i=sV(e),s=vc(1);t&&(o?lt(o)&&(s=Vy(o)):s=Vy(e));let l=Q5e(i,r,o)?SZ(i):vc(0),c=(n.left+l.x)/s.x,u=(n.top+l.y)/s.y,d=n.width/s.x,f=n.height/s.y;if(i){let m=zr(i),h=o&&lt(o)?zr(o):o,g=m,v=A2(g);for(;v&&o&&h!==g;){let b=Vy(v),S=v.getBoundingClientRect(),y=Ci(v),w=S.left+(v.clientLeft+parseFloat(y.paddingLeft))*b.x,_=S.top+(v.clientTop+parseFloat(y.paddingTop))*b.y;c*=b.x,u*=b.y,d*=b.x,f*=b.y,c+=w,u+=_,g=zr(v),v=A2(g)}}return Fg({width:d,height:f,x:c,y:u})}function V2(e,t){let r=Hx(e).scrollLeft;return t?t.left+r:Bg(hc(e)).left+r}function _Z(e,t){let r=e.getBoundingClientRect(),o=r.left+t.scrollLeft-V2(e,r),n=r.top+t.scrollTop;return{x:o,y:n}}function J5e(e){let{elements:t,rect:r,offsetParent:o,strategy:n}=e,i=n==="fixed",s=hc(o),l=t?zx(t.floating):!1;if(o===s||l&&i)return r;let c={scrollLeft:0,scrollTop:0},u=vc(1),d=vc(0),f=tn(o);if((f||!f&&!i)&&((Mg(o)!=="body"||Oy(s))&&(c=Hx(o)),f)){let h=Bg(o);u=Vy(o),d.x=h.x+o.clientLeft,d.y=h.y+o.clientTop}let m=s&&!f&&!i?_Z(s,c):vc(0);return{width:r.width*u.x,height:r.height*u.y,x:r.x*u.x-c.scrollLeft*u.x+d.x+m.x,y:r.y*u.y-c.scrollTop*u.y+d.y+m.y}}function $5e(e){return Array.from(e.getClientRects())}function eNe(e){let t=hc(e),r=Hx(e),o=e.ownerDocument.body,n=cs(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),i=cs(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight),s=-r.scrollLeft+V2(e),l=-r.scrollTop;return Ci(o).direction==="rtl"&&(s+=cs(t.clientWidth,o.clientWidth)-n),{width:n,height:i,x:s,y:l}}var vZ=25;function tNe(e,t){let r=zr(e),o=hc(e),n=r.visualViewport,i=o.clientWidth,s=o.clientHeight,l=0,c=0;if(n){i=n.width,s=n.height;let d=Ny();(!d||d&&t==="fixed")&&(l=n.offsetLeft,c=n.offsetTop)}let u=V2(o);if(u<=0){let d=o.ownerDocument,f=d.body,m=getComputedStyle(f),h=d.compatMode==="CSS1Compat"&&parseFloat(m.marginLeft)+parseFloat(m.marginRight)||0,g=Math.abs(o.clientWidth-f.clientWidth-h);g<=vZ&&(i-=g)}else u<=vZ&&(i+=u);return{width:i,height:s,x:l,y:c}}function rNe(e,t){let r=Bg(e,!0,t==="fixed"),o=r.top+e.clientTop,n=r.left+e.clientLeft,i=tn(e)?Vy(e):vc(1),s=e.clientWidth*i.x,l=e.clientHeight*i.y,c=n*i.x,u=o*i.y;return{width:s,height:l,x:c,y:u}}function bZ(e,t,r){let o;if(t==="viewport")o=tNe(e,r);else if(t==="document")o=eNe(hc(e));else if(lt(t))o=rNe(t,r);else{let n=SZ(e);o={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return Fg(o)}function xZ(e,t){let r=pc(e);return r===t||!lt(r)||gc(r)?!1:Ci(r).position==="fixed"||xZ(r,t)}function oNe(e,t){let r=t.get(e);if(r)return r;let o=Ym(e,[],!1).filter(l=>lt(l)&&Mg(l)!=="body"),n=null,i=Ci(e).position==="fixed",s=i?pc(e):e;for(;lt(s)&&!gc(s);){let l=Ci(s),c=R2(s);!c&&l.position==="fixed"&&(n=null),(i?!c&&!n:!c&&l.position==="static"&&!!n&&(n.position==="absolute"||n.position==="fixed")||Oy(s)&&!c&&xZ(e,s))?o=o.filter(d=>d!==s):n=l,s=pc(s)}return t.set(e,o),o}function nNe(e){let{element:t,boundary:r,rootBoundary:o,strategy:n}=e,s=[...r==="clippingAncestors"?zx(t)?[]:oNe(t,this._c):[].concat(r),o],l=bZ(t,s[0],n),c=l.top,u=l.right,d=l.bottom,f=l.left;for(let m=1;m<s.length;m++){let h=bZ(t,s[m],n);c=cs(h.top,c),u=Zm(h.right,u),d=Zm(h.bottom,d),f=cs(h.left,f)}return{width:u-f,height:d-c,x:f,y:c}}function iNe(e){let{width:t,height:r}=wZ(e);return{width:t,height:r}}function sNe(e,t,r){let o=tn(t),n=hc(t),i=r==="fixed",s=Bg(e,!0,i,t),l={scrollLeft:0,scrollTop:0},c=vc(0);function u(){c.x=V2(n)}if(o||!o&&!i)if((Mg(t)!=="body"||Oy(n))&&(l=Hx(t)),o){let h=Bg(t,!0,i,t);c.x=h.x+t.clientLeft,c.y=h.y+t.clientTop}else n&&u();i&&!o&&n&&u();let d=n&&!o&&!i?_Z(n,l):vc(0),f=s.left+l.scrollLeft-c.x-d.x,m=s.top+l.scrollTop-c.y-d.y;return{x:f,y:m,width:s.width,height:s.height}}function iV(e){return Ci(e).position==="static"}function yZ(e,t){if(!tn(e)||Ci(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return hc(e)===r&&(r=r.ownerDocument.body),r}function CZ(e,t){let r=zr(e);if(zx(e))return r;if(!tn(e)){let n=pc(e);for(;n&&!gc(n);){if(lt(n)&&!iV(n))return n;n=pc(n)}return r}let o=yZ(e,t);for(;o&&SK(o)&&iV(o);)o=yZ(o,t);return o&&gc(o)&&iV(o)&&!R2(o)?r:o||_K(e)||r}var aNe=async function(e){let t=this.getOffsetParent||CZ,r=this.getDimensions,o=await r(e.floating);return{reference:sNe(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function lNe(e){return Ci(e).direction==="rtl"}var aV={convertOffsetParentRelativeRectToViewportRelativeRect:J5e,getDocumentElement:hc,getClippingRect:nNe,getOffsetParent:CZ,getElementRects:aNe,getClientRects:$5e,getDimensions:iNe,getScale:Vy,isElement:lt,isRTL:lNe};function TZ(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function cNe(e,t){let r=null,o,n=hc(e);function i(){var l;clearTimeout(o),(l=r)==null||l.disconnect(),r=null}function s(l,c){l===void 0&&(l=!1),c===void 0&&(c=1),i();let u=e.getBoundingClientRect(),{left:d,top:f,width:m,height:h}=u;if(l||t(),!m||!h)return;let g=Gx(f),v=Gx(n.clientWidth-(d+m)),b=Gx(n.clientHeight-(f+h)),S=Gx(d),w={rootMargin:-g+"px "+-v+"px "+-b+"px "+-S+"px",threshold:cs(0,Zm(1,c))||1},_=!0;function x(E){let O=E[0].intersectionRatio;if(O!==c){if(!_)return s();O?s(!1,O):o=setTimeout(()=>{s(!1,1e-7)},1e3)}O===1&&!TZ(u,e.getBoundingClientRect())&&s(),_=!1}try{r=new IntersectionObserver(x,{...w,root:n.ownerDocument})}catch{r=new IntersectionObserver(x,w)}r.observe(e)}return s(!0),i}function Jx(e,t,r,o){o===void 0&&(o={});let{ancestorScroll:n=!0,ancestorResize:i=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:c=!1}=o,u=sV(e),d=n||i?[...u?Ym(u):[],...t?Ym(t):[]]:[];d.forEach(S=>{n&&S.addEventListener("scroll",r,{passive:!0}),i&&S.addEventListener("resize",r)});let f=u&&l?cNe(u,r):null,m=-1,h=null;s&&(h=new ResizeObserver(S=>{let[y]=S;y&&y.target===u&&h&&t&&(h.unobserve(t),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var w;(w=h)==null||w.observe(t)})),r()}),u&&!c&&h.observe(u),t&&h.observe(t));let g,v=c?Bg(e):null;c&&b();function b(){let S=Bg(e);v&&!TZ(v,S)&&r(),v=S,g=requestAnimationFrame(b)}return r(),()=>{var S;d.forEach(y=>{n&&y.removeEventListener("scroll",r),i&&y.removeEventListener("resize",r)}),f?.(),(S=h)==null||S.disconnect(),h=null,c&&cancelAnimationFrame(g)}}var EZ=mZ;var PZ=pZ,kZ=uZ,RZ=gZ,AZ=dZ;var IZ=hZ,j2=(e,t,r)=>{let o=new Map,n={platform:aV,...r},i={...n.platform,_c:o};return cZ(e,t,{...n,platform:i})};var rn=a(xe(),1),NZ=a(xe(),1),MZ=a(_u(),1),dNe=typeof document<"u",fNe=function(){},z2=dNe?NZ.useLayoutEffect:fNe;function H2(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let r,o,n;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(o=r;o--!==0;)if(!H2(e[o],t[o]))return!1;return!0}if(n=Object.keys(e),r=n.length,r!==Object.keys(t).length)return!1;for(o=r;o--!==0;)if(!{}.hasOwnProperty.call(t,n[o]))return!1;for(o=r;o--!==0;){let i=n[o];if(!(i==="_owner"&&e.$$typeof)&&!H2(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function FZ(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function OZ(e,t){let r=FZ(e);return Math.round(t*r)/r}function lV(e){let t=rn.useRef(e);return z2(()=>{t.current=e}),t}function DZ(e){e===void 0&&(e={});let{placement:t="bottom",strategy:r="absolute",middleware:o=[],platform:n,elements:{reference:i,floating:s}={},transform:l=!0,whileElementsMounted:c,open:u}=e,[d,f]=rn.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[m,h]=rn.useState(o);H2(m,o)||h(o);let[g,v]=rn.useState(null),[b,S]=rn.useState(null),y=rn.useCallback(L=>{L!==E.current&&(E.current=L,v(L))},[]),w=rn.useCallback(L=>{L!==O.current&&(O.current=L,S(L))},[]),_=i||g,x=s||b,E=rn.useRef(null),O=rn.useRef(null),A=rn.useRef(d),C=c!=null,I=lV(c),k=lV(n),P=lV(u),N=rn.useCallback(()=>{if(!E.current||!O.current)return;let L={placement:t,strategy:r,middleware:m};k.current&&(L.platform=k.current),j2(E.current,O.current,L).then(M=>{let z={...M,isPositioned:P.current!==!1};U.current&&!H2(A.current,z)&&(A.current=z,MZ.flushSync(()=>{f(z)}))})},[m,t,r,k,P]);z2(()=>{u===!1&&A.current.isPositioned&&(A.current.isPositioned=!1,f(L=>({...L,isPositioned:!1})))},[u]);let U=rn.useRef(!1);z2(()=>(U.current=!0,()=>{U.current=!1}),[]),z2(()=>{if(_&&(E.current=_),x&&(O.current=x),_&&x){if(I.current)return I.current(_,x,N);N()}},[_,x,N,I,C]);let F=rn.useMemo(()=>({reference:E,floating:O,setReference:y,setFloating:w}),[y,w]),D=rn.useMemo(()=>({reference:_,floating:x}),[_,x]),B=rn.useMemo(()=>{let L={position:r,left:0,top:0};if(!D.floating)return L;let M=OZ(D.floating,d.x),z=OZ(D.floating,d.y);return l?{...L,transform:"translate("+M+"px, "+z+"px)",...FZ(D.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:M,top:z}},[r,l,D.floating,d.x,d.y]);return rn.useMemo(()=>({...d,update:N,refs:F,elements:D,floatingStyles:B}),[d,N,F,D,B])}var cV=(e,t)=>{let r=EZ(e);return{name:r.name,fn:r.fn,options:[e,t]}},uV=(e,t)=>{let r=PZ(e);return{name:r.name,fn:r.fn,options:[e,t]}},dV=(e,t)=>({fn:IZ(e).fn,options:[e,t]}),fV=(e,t)=>{let r=kZ(e);return{name:r.name,fn:r.fn,options:[e,t]}},mV=(e,t)=>{let r=RZ(e);return{name:r.name,fn:r.fn,options:[e,t]}};var pV=(e,t)=>{let r=AZ(e);return{name:r.name,fn:r.fn,options:[e,t]}};var Hy=a(xe(),1);var XZ=a(xe(),1);var Bt=(e,t,r,o,n,i,...s)=>{if(s.length>0)throw new Error(Mn(1));let l;if(e&&t&&r&&o&&n&&i)l=(c,u,d,f)=>{let m=e(c,u,d,f),h=t(c,u,d,f),g=r(c,u,d,f),v=o(c,u,d,f),b=n(c,u,d,f);return i(m,h,g,v,b,u,d,f)};else if(e&&t&&r&&o&&n)l=(c,u,d,f)=>{let m=e(c,u,d,f),h=t(c,u,d,f),g=r(c,u,d,f),v=o(c,u,d,f);return n(m,h,g,v,u,d,f)};else if(e&&t&&r&&o)l=(c,u,d,f)=>{let m=e(c,u,d,f),h=t(c,u,d,f),g=r(c,u,d,f);return o(m,h,g,u,d,f)};else if(e&&t&&r)l=(c,u,d,f)=>{let m=e(c,u,d,f),h=t(c,u,d,f);return r(m,h,u,d,f)};else if(e&&t)l=(c,u,d,f)=>{let m=e(c,u,d,f);return t(m,u,d,f)};else if(e)l=e;else throw new Error("Missing arguments");return l};var KZ=a(xe(),1),yV=a(U2(),1),ZZ=a(UZ(),1);var WZ=a(xe(),1);var gV=[],vV;function GZ(){return vV}function YZ(e){gV.push(e)}function bV(e){let t=(r,o)=>{let n=si(ANe).current,i;try{vV=n;for(let s of gV)s.before(n);i=e(r,o);for(let s of gV)s.after(n);n.didInitialize=!0}finally{vV=void 0}return i};return t.displayName=e.displayName||e.name,t}function qZ(e){return WZ.forwardRef(bV(e))}function ANe(){return{didInitialize:!1}}var INe=Py(19),ONe=INe?MNe:FNe;function G2(e,t,r,o,n){return ONe(e,t,r,o,n)}function NNe(e,t,r,o,n){let i=KZ.useCallback(()=>t(e.getSnapshot(),r,o,n),[e,t,r,o,n]);return(0,yV.useSyncExternalStore)(e.subscribe,i,i)}YZ({before(e){e.syncIndex=0,e.didInitialize||(e.syncTick=1,e.syncHooks=[],e.didChangeStore=!0,e.getSnapshot=()=>{let t=!1;for(let r=0;r<e.syncHooks.length;r+=1){let o=e.syncHooks[r],n=o.selector(o.store.state,o.a1,o.a2,o.a3);(o.didChange||!Object.is(o.value,n))&&(t=!0,o.value=n,o.didChange=!1)}return t&&(e.syncTick+=1),e.syncTick})},after(e){e.syncHooks.length>0&&(e.didChangeStore&&(e.didChangeStore=!1,e.subscribe=t=>{let r=new Set;for(let n of e.syncHooks)r.add(n.store);let o=[];for(let n of r)o.push(n.subscribe(t));return()=>{for(let n of o)n()}}),(0,yV.useSyncExternalStore)(e.subscribe,e.getSnapshot,e.getSnapshot))}});function MNe(e,t,r,o,n){let i=GZ();if(!i)return NNe(e,t,r,o,n);let s=i.syncIndex;i.syncIndex+=1;let l;return i.didInitialize?(l=i.syncHooks[s],(l.store!==e||l.selector!==t||!Object.is(l.a1,r)||!Object.is(l.a2,o)||!Object.is(l.a3,n))&&(l.store!==e&&(i.didChangeStore=!0),l.store=e,l.selector=t,l.a1=r,l.a2=o,l.a3=n,l.didChange=!0)):(l={store:e,selector:t,a1:r,a2:o,a3:n,value:t(e.getSnapshot(),r,o,n),didChange:!1},i.syncHooks.push(l)),l.value}function FNe(e,t,r,o,n){return(0,ZZ.useSyncExternalStoreWithSelector)(e.subscribe,e.getSnapshot,e.getSnapshot,i=>t(i,r,o,n))}var Y2=class{constructor(t){this.state=t,this.listeners=new Set,this.updateTick=0}subscribe=t=>(this.listeners.add(t),()=>{this.listeners.delete(t)});getSnapshot=()=>this.state;setState(t){if(this.state===t)return;this.state=t,this.updateTick+=1;let r=this.updateTick;for(let o of this.listeners){if(r!==this.updateTick)return;o(t)}}update(t){for(let r in t)if(!Object.is(this.state[r],t[r])){this.setState({...this.state,...t});return}}set(t,r){Object.is(this.state[t],r)||this.setState({...this.state,[t]:r})}notifyAll(){let t={...this.state};this.setState(t)}use(t,r,o,n){return G2(this,t,r,o,n)}};var Vg=a(xe(),1);var zy=class extends Y2{constructor(t,r={},o){super(t),this.context=r,this.selectors=o}useSyncedValue(t,r){Vg.useDebugValue(t);let o=this;Qe(()=>{o.state[t]!==r&&o.set(t,r)},[o,t,r])}useSyncedValueWithCleanup(t,r){let o=this;Qe(()=>(o.state[t]!==r&&o.set(t,r),()=>{o.set(t,void 0)}),[o,t,r])}useSyncedValues(t){let r=this,o=Object.values(t);Qe(()=>{r.update(t)},[r,...o])}useControlledProp(t,r){Vg.useDebugValue(t);let o=this,n=r!==void 0;Qe(()=>{n&&!Object.is(o.state[t],r)&&o.setState({...o.state,[t]:r})},[o,t,r,n])}select(t,r,o,n){let i=this.selectors[t];return i(this.state,r,o,n)}useState(t,r,o,n){return Vg.useDebugValue(t),G2(this,this.selectors[t],r,o,n)}useContextCallback(t,r){Vg.useDebugValue(t);let o=Xe(r??Qd);this.context[t]=o}useStateSetter(t){let r=Vg.useRef(void 0);return r.current===void 0&&(r.current=o=>{this.set(t,o)}),r.current}observe(t,r){let o;typeof t=="function"?o=t:o=this.selectors[t];let n=o(this.state);return r(n,n,this),this.subscribe(i=>{let s=o(i);if(!Object.is(n,s)){let l=n;n=s,r(s,l,this)}})}};var DNe={open:Bt(e=>e.open),transitionStatus:Bt(e=>e.transitionStatus),domReferenceElement:Bt(e=>e.domReferenceElement),referenceElement:Bt(e=>e.positionReference??e.referenceElement),floatingElement:Bt(e=>e.floatingElement),floatingId:Bt(e=>e.floatingId)},xu=class extends zy{constructor(t){let{syncOnly:r,nested:o,onOpenChange:n,triggerElements:i,...s}=t;super({...s,positionReference:s.referenceElement,domReferenceElement:s.referenceElement},{onOpenChange:n,dataRef:{current:{}},events:oZ(),nested:o,triggerElements:i},DNe),this.syncOnly=r}syncOpenEvent=(t,r)=>{(!t||!this.state.open||r!=null&&FK(r))&&(this.context.dataRef.current.openEvent=t?r:void 0)};dispatchOpenChange=(t,r)=>{this.syncOpenEvent(t,r.event);let o={open:t,reason:r.reason,nativeEvent:r.event,nested:this.context.nested,triggerElement:r.trigger};this.context.events.emit("openchange",o)};setOpen=(t,r)=>{if(this.syncOnly){this.context.onOpenChange?.(t,r);return}this.dispatchOpenChange(t,r),this.context.onOpenChange?.(t,r)}};function QZ(e){let{popupStore:t,treatPopupAsFloatingElement:r=!1,floatingRootContext:o,floatingId:n,nested:i,onOpenChange:s}=e,l=t.useState("open"),c=t.useState("activeTriggerElement"),u=t.useState(r?"popupElement":"positionerElement"),d=t.context.triggerElements,f=s,m=XZ.useRef(null);o===void 0&&m.current===null&&(m.current=new xu({open:l,transitionStatus:void 0,referenceElement:c,floatingElement:u,triggerElements:d,onOpenChange:f,floatingId:n,syncOnly:!0,nested:i}));let h=o??m.current;return t.useSyncedValue("floatingId",n),Qe(()=>{let g={open:l,floatingId:n,referenceElement:c,floatingElement:u};lt(c)&&(g.domReferenceElement=c),h.state.positionReference===h.state.referenceElement&&(g.positionReference=c),h.update(g)},[l,n,c,u,h]),h.context.onOpenChange=f,h.context.nested=i,h}var JZ={tabIndex:-1,[XB]:""};function $Z(e,t,r=!1){let o=Gm(),n=By()!=null,i=Hy.useRef(null);e===void 0&&i.current===null&&(i.current=t(o,n));let s=e??i.current;return QZ({popupStore:s,treatPopupAsFloatingElement:r,floatingRootContext:s.state.floatingRootContext,floatingId:o,nested:n,onOpenChange:s.setOpen}),{store:s,internalStore:i.current}}function LNe(e,t){let r=Hy.useRef(null),o=Hy.useRef(null);return Hy.useCallback(n=>{if(e===void 0)return;let i=!1;if(r.current!==null){let s=r.current,l=o.current,c=t.context.triggerElements.getById(s);l&&c===l&&(t.context.triggerElements.delete(s),i=!0),r.current=null,o.current=null}if(n!==null&&(r.current=e,o.current=n,t.context.triggerElements.add(e,n),i=!0),i){let s=t.context.triggerElements.size;t.select("open")&&t.state.triggerCount!==s&&t.set("triggerCount",s)}},[t,e])}function eX(e,t,r){let o=r?.id??null;(o||t)&&(e.activeTriggerId=o,e.activeTriggerElement=r??null)}function tX(e,t,r,o){let n=r.useState("isMountedByTrigger",e),i=LNe(e,r),s=Xe(l=>{if(i(l),!l)return;let c=r.select("open"),u=r.select("activeTriggerId");if(u===e){r.update({activeTriggerElement:l,...c?o:null});return}u==null&&c&&r.update({activeTriggerId:e,activeTriggerElement:l,...o})});return Qe(()=>{n&&r.update({activeTriggerElement:t.current,...o})},[n,r,t,...Object.values(o)]),{registerTrigger:s,isMountedByThisTrigger:n}}function rX(e){let t=e.useState("open"),r=e.useState("triggerCount");Qe(()=>{if(!t){e.state.triggerCount!==0&&e.set("triggerCount",0);return}let o=e.context.triggerElements.size,n={};if(e.state.triggerCount!==o&&(n.triggerCount=o),!e.select("activeTriggerId")&&o===1){let i=e.context.triggerElements.entries().next();if(!i.done){let[s,l]=i.value;n.activeTriggerId=s,n.activeTriggerElement=l}}(n.triggerCount!==void 0||n.activeTriggerId!==void 0)&&e.update(n)},[t,e,r])}function oX(e,t,r){let{mounted:o,setMounted:n,transitionStatus:i}=x2(e);t.useSyncedValues({mounted:o,transitionStatus:i});let s=Xe(()=>{n(!1),t.update({activeTriggerId:null,activeTriggerElement:null,mounted:!1,preventUnmountingOnClose:!1}),r?.(),t.context.onOpenChangeComplete?.(!1)}),l=t.useState("preventUnmountingOnClose");return Fy({enabled:o&&!e&&!l,open:e,ref:t.context.popupRef,onComplete(){e||s()}}),{forceUnmount:s,transitionStatus:i}}function nX(e,t){e.useSyncedValues(t),Qe(()=>()=>{e.update({activeTriggerProps:Eo,inactiveTriggerProps:Eo,popupProps:Eo})},[e])}var $m=class{constructor(){this.elementsSet=new Set,this.idMap=new Map}add(t,r){let o=this.idMap.get(t);o!==r&&(o!==void 0&&this.elementsSet.delete(o),this.elementsSet.add(r),this.idMap.set(t,r))}delete(t){let r=this.idMap.get(t);r&&(this.elementsSet.delete(r),this.idMap.delete(t))}hasElement(t){return this.elementsSet.has(t)}hasMatchingElement(t){for(let r of this.elementsSet)if(t(r))return!0;return!1}getById(t){return this.idMap.get(t)}entries(){return this.idMap.entries()}elements(){return this.elementsSet.values()}get size(){return this.idMap.size}};function iX(){return new xu({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:new $m,floatingId:void 0,syncOnly:!1,nested:!1,onOpenChange:void 0})}function aX(){return{open:!1,openProp:void 0,mounted:!1,transitionStatus:void 0,floatingRootContext:iX(),floatingId:void 0,triggerCount:0,preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,triggerIdProp:void 0,popupElement:null,positionerElement:null,activeTriggerProps:Eo,inactiveTriggerProps:Eo,popupProps:Eo}}function lX(e,t,r=!1){return new xu({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:e,floatingId:t,syncOnly:!0,nested:r,onOpenChange:void 0})}var $x=Bt(e=>e.triggerIdProp??e.activeTriggerId),wV=Bt(e=>e.openProp??e.open),sX=Bt(e=>(e.popupElement?.id??e.floatingId)||void 0);function cX(e,t){return t!==void 0&&wV(e)&&$x(e)===t}function BNe(e,t){return cX(e,t)?!0:t!==void 0&&wV(e)&&$x(e)==null&&e.triggerCount===1}var uX={open:wV,mounted:Bt(e=>e.mounted),transitionStatus:Bt(e=>e.transitionStatus),floatingRootContext:Bt(e=>e.floatingRootContext),triggerCount:Bt(e=>e.triggerCount),preventUnmountingOnClose:Bt(e=>e.preventUnmountingOnClose),payload:Bt(e=>e.payload),activeTriggerId:$x,activeTriggerElement:Bt(e=>e.mounted?e.activeTriggerElement:null),popupId:sX,isTriggerActive:Bt((e,t)=>t!==void 0&&$x(e)===t),isOpenedByTrigger:Bt((e,t)=>cX(e,t)),isMountedByTrigger:Bt((e,t)=>t!==void 0&&$x(e)===t&&e.mounted),triggerProps:Bt((e,t)=>t?e.activeTriggerProps:e.inactiveTriggerProps),triggerPopupId:Bt((e,t)=>BNe(e,t)?sX(e):void 0),popupProps:Bt(e=>e.popupProps),popupElement:Bt(e=>e.popupElement),positionerElement:Bt(e=>e.positionerElement)};function dX(e){let{open:t=!1,onOpenChange:r,elements:o={}}=e,n=Gm(),i=By()!=null,s=si(()=>new xu({open:t,transitionStatus:void 0,onOpenChange:r,referenceElement:o.reference??null,floatingElement:o.floating??null,triggerElements:new $m,floatingId:n,syncOnly:!1,nested:i})).current;return Qe(()=>{let l={open:t,floatingId:n};o.reference!==void 0&&(l.referenceElement=o.reference,l.domReferenceElement=lt(o.reference)?o.reference:null),o.floating!==void 0&&(l.floatingElement=o.floating),s.update(l)},[t,n,o.reference,o.floating,s]),s.context.onOpenChange=r,s.context.nested=i,s}function SV(e={}){let{nodeId:t,externalTree:r}=e,o=dX(e),n=e.rootContext||o,i=n.useState("referenceElement"),s=n.useState("floatingElement"),l=n.useState("domReferenceElement"),c=n.useState("open"),u=n.useState("floatingId"),[d,f]=Ei.useState(null),[m,h]=Ei.useState(void 0),[g,v]=Ei.useState(void 0),b=Ei.useRef(null),S=Jm(r),y=Ei.useMemo(()=>({reference:i,floating:s,domReference:l}),[i,s,l]),w=DZ({...e,elements:{...y,...d&&{reference:d}}}),_=lt(m)?m:null,x=g===void 0?n.state.floatingElement:g;n.useSyncedValue("referenceElement",m??null),n.useSyncedValue("domReferenceElement",m===void 0?l:_),n.useSyncedValue("floatingElement",x);let E=Ei.useCallback(P=>{let N=lt(P)?{getBoundingClientRect:()=>P.getBoundingClientRect(),getClientRects:()=>P.getClientRects(),contextElement:P}:P;f(N),w.refs.setReference(N)},[w.refs]),O=Ei.useCallback(P=>{(lt(P)||P===null)&&(b.current=P,h(P)),(lt(w.refs.reference.current)||w.refs.reference.current===null||P!==null&&!lt(P))&&w.refs.setReference(P)},[w.refs,h]),A=Ei.useCallback(P=>{v(P),w.refs.setFloating(P)},[w.refs]),C=Ei.useMemo(()=>({...w.refs,setReference:O,setFloating:A,setPositionReference:E,domReference:b}),[w.refs,O,A,E]),I=Ei.useMemo(()=>({...w.elements,domReference:l}),[w.elements,l]),k=Ei.useMemo(()=>({...w,dataRef:n.context.dataRef,open:c,onOpenChange:n.setOpen,events:n.context.events,floatingId:u,refs:C,elements:I,nodeId:t,rootStore:n}),[w,C,I,t,n,c,u]);return Qe(()=>{l&&(b.current=l)},[l]),Qe(()=>{n.context.dataRef.current.floatingContext=k;let P=S?.nodesRef.current.find(N=>N.id===t);P&&(P.context=k)}),Ei.useMemo(()=>({...w,context:k,refs:C,elements:I,rootStore:n}),[w,C,I,k,n])}var Cu=a(xe(),1);var _V=RK&&kK;function xV(e,t={}){let{enabled:r=!0,delay:o}=t,n="rootStore"in e?e.rootStore:e,{events:i,dataRef:s}=n.context,l=Cu.useRef(!1),c=Cu.useRef(null),u=Cu.useRef(!0),d=wc();Cu.useEffect(()=>{let m=n.select("domReferenceElement");if(!r)return;let h=zr(m);function g(){let S=n.select("domReferenceElement");!n.select("open")&&tn(S)&&S===N2(Fn(S))&&(l.current=!0)}function v(){u.current=!0}function b(){u.current=!1}return Sc(Zt(h,"blur",g),_V&&Zt(h,"keydown",v,!0),_V&&Zt(h,"pointerdown",b,!0))},[n,r]),Cu.useEffect(()=>{if(!r)return;function m(h){if(h.reason===mt.triggerPress||h.reason===mt.escapeKey){let g=n.select("domReferenceElement");lt(g)&&(c.current=g,l.current=!0)}}return i.on("openchange",m),()=>{i.off("openchange",m)}},[i,r,n]);let f=Cu.useMemo(()=>{function m(){l.current=!1,c.current=null}return{onMouseLeave(){m()},onFocus(h){let g=h.currentTarget;if(l.current){if(c.current===g)return;m()}let v=ls(h.nativeEvent);if(lt(v)){if(_V&&!h.relatedTarget){if(!u.current&&!OK(v))return}else if(!NK(v))return}let b=Km(h.relatedTarget,n.context.triggerElements),{nativeEvent:S,currentTarget:y}=h,w=typeof o=="function"?o():o;if(n.select("open")&&b||w===0||w===void 0){n.setOpen(!0,Vt(mt.triggerFocus,S,y));return}d.start(w,()=>{l.current||n.setOpen(!0,Vt(mt.triggerFocus,S,y))})},onBlur(h){m();let g=h.relatedTarget,v=h.nativeEvent,b=lt(g)&&g.hasAttribute(Ly("focus-guard"))&&g.getAttribute("data-type")==="outside";d.start(0,()=>{let S=n.select("domReferenceElement"),y=N2(Fn(S));!g&&y===S||mr(s.current.floatingContext?.refs.floating.current,y)||mr(S,y)||b||Km(g??y,n.context.triggerElements)||n.setOpen(!1,Vt(mt.triggerFocus,v))})}}},[s,o,n,d]);return Cu.useMemo(()=>r?{reference:f,trigger:f}:{},[r,f])}var TV=a(xe(),1);var CV=class e{constructor(){this.pointerType=void 0,this.interactedInside=!1,this.handler=void 0,this.blockMouseMove=!0,this.performedPointerEventsMutation=!1,this.pointerEventsScopeElement=null,this.pointerEventsReferenceElement=null,this.pointerEventsFloatingElement=null,this.restTimeoutPending=!1,this.openChangeTimeout=new Ua,this.restTimeout=new Ua,this.handleCloseOptions=void 0}static create(){return new e}dispose=()=>{this.openChangeTimeout.clear(),this.restTimeout.clear()};disposeEffect=()=>this.dispose},q2=new WeakMap;function Uy(e){if(!e.performedPointerEventsMutation)return;let t=e.pointerEventsScopeElement;t&&q2.get(t)===e&&(e.pointerEventsScopeElement?.style.removeProperty("pointer-events"),e.pointerEventsReferenceElement?.style.removeProperty("pointer-events"),e.pointerEventsFloatingElement?.style.removeProperty("pointer-events"),q2.delete(t)),e.performedPointerEventsMutation=!1,e.pointerEventsScopeElement=null,e.pointerEventsReferenceElement=null,e.pointerEventsFloatingElement=null}function K2(e,t){let{scopeElement:r,referenceElement:o,floatingElement:n}=t,i=q2.get(r);i&&i!==e&&Uy(i),Uy(e),e.performedPointerEventsMutation=!0,e.pointerEventsScopeElement=r,e.pointerEventsReferenceElement=o,e.pointerEventsFloatingElement=n,q2.set(r,e),r.style.pointerEvents="none",o.style.pointerEvents="auto",n.style.pointerEvents="auto"}function Wy(e){let t=e.context.dataRef.current,r=si(()=>t.hoverInteractionState??CV.create()).current;return t.hoverInteractionState||(t.hoverInteractionState=r),ky(t.hoverInteractionState.disposeEffect),t.hoverInteractionState}function EV(e,t={}){let{enabled:r=!0,closeDelay:o=0,nodeId:n}=t,i="rootStore"in e?e.rootStore:e,s=i.useState("open"),l=i.useState("floatingElement"),c=i.useState("domReferenceElement"),{dataRef:u}=i.context,d=Jm(),f=By(),m=Wy(i),h=wc(),g=Xe(()=>B2(u.current.openEvent?.type,m.interactedInside)),v=Xe(()=>XK(u.current.openEvent?.type)),b=Xe(()=>{Uy(m)});Qe(()=>{s||(m.pointerType=void 0,m.restTimeoutPending=!1,m.interactedInside=!1,b())},[s,m,b]),TV.useEffect(()=>b,[b]),Qe(()=>{if(r&&s&&m.handleCloseOptions?.blockPointerEvents&&v()&&lt(c)&&l){let S=c,y=l,w=Fn(l),_=d?.nodesRef.current.find(A=>A.id===f)?.context?.elements.floating;_&&(_.style.pointerEvents="");let x=m.pointerEventsScopeElement!==y?m.pointerEventsScopeElement:null,E=_!==y?_:null,O=m.handleCloseOptions?.getScope?.()??x??E??S.closest("[data-rootownerid]")??w.body;return K2(m,{scopeElement:O,referenceElement:S,floatingElement:y}),()=>{b()}}},[r,s,c,l,m,v,d,f,b]),TV.useEffect(()=>{if(!r)return;function S(){return!!(d&&f&&Jd(d.nodesRef.current,f).length>0)}function y(A){let C=Dg(o,"close",m.pointerType),I=()=>{i.setOpen(!1,Vt(mt.triggerHover,A)),d?.events.emit("floating.closed",A)};C?m.openChangeTimeout.start(C,I):(m.openChangeTimeout.clear(),I())}function w(A){let C=ls(A);if(!JB(C)){m.interactedInside=!1;return}m.interactedInside=C?.closest("[aria-haspopup]")!=null}function _(){m.openChangeTimeout.clear(),h.clear(),d?.events.off("floating.closed",E),b()}function x(A){if(S()&&d){d.events.on("floating.closed",E);return}if(Km(A.relatedTarget,i.context.triggerElements))return;let C=u.current.floatingContext?.nodeId??n,I=A.relatedTarget;if(!(d&&C&&lt(I)&&Jd(d.nodesRef.current,C,!1).some(P=>mr(P.context?.elements.floating,I)))){if(m.handler){m.handler(A);return}b(),g()||y(A)}}function E(A){!d||!f||S()||h.start(0,()=>{d.events.off("floating.closed",E),i.setOpen(!1,Vt(mt.triggerHover,A)),d.events.emit("floating.closed",A)})}let O=l;return Sc(O&&Zt(O,"mouseenter",_),O&&Zt(O,"mouseleave",x),O&&Zt(O,"pointerdown",w,!0),()=>{d?.events.off("floating.closed",E)})},[r,l,i,u,o,n,g,b,m,d,f,h])}var ep=a(xe(),1),fX=a(_u(),1);var VNe={current:null};function PV(e,t={}){let{enabled:r=!0,delay:o=0,handleClose:n=null,mouseOnly:i=!1,restMs:s=0,move:l=!0,triggerElementRef:c=VNe,externalTree:u,isActiveTrigger:d=!0,getHandleCloseContext:f,isClosing:m,shouldOpen:h}=t,g="rootStore"in e?e.rootStore:e,{dataRef:v,events:b}=g.context,S=Jm(u),y=Wy(g),w=ep.useRef(!1),_=Ti(n),x=Ti(o),E=Ti(s),O=Ti(r),A=Ti(h),C=Ti(m),I=Xe(()=>B2(v.current.openEvent?.type,y.interactedInside)),k=Xe(()=>A.current?.()!==!1),P=Xe((F,D,B)=>{let L=g.context.triggerElements;if(L.hasElement(D))return!F||!mr(F,D);if(!lt(B))return!1;let M=B;return L.hasMatchingElement(z=>mr(z,M))&&(!F||!mr(F,M))}),N=Xe(()=>{if(!y.handler)return;Fn(g.select("domReferenceElement")).removeEventListener("mousemove",y.handler),y.handler=void 0}),U=Xe(()=>{Uy(y)});return d&&(y.handleCloseOptions=_.current?.__options),ep.useEffect(()=>N,[N]),ep.useEffect(()=>{if(!r)return;function F(D){D.open?w.current=!1:(w.current=D.reason===mt.triggerHover,N(),y.openChangeTimeout.clear(),y.restTimeout.clear(),y.blockMouseMove=!0,y.restTimeoutPending=!1)}return b.on("openchange",F),()=>{b.off("openchange",F)}},[r,b,y,N]),ep.useEffect(()=>{if(!r)return;function F(M,z=!0){let K=Dg(x.current,"close",y.pointerType);K?y.openChangeTimeout.start(K,()=>{g.setOpen(!1,Vt(mt.triggerHover,M)),S?.events.emit("floating.closed",M)}):z&&(y.openChangeTimeout.clear(),g.setOpen(!1,Vt(mt.triggerHover,M)),S?.events.emit("floating.closed",M))}let D=c.current??(d?g.select("domReferenceElement"):null);if(!lt(D))return;function B(M){if(y.openChangeTimeout.clear(),y.blockMouseMove=!1,i&&!$d(y.pointerType))return;let z=$B(E.current),K=Dg(x.current,"open",y.pointerType),Z=ls(M),q=M.currentTarget??null,X=g.select("domReferenceElement"),ie=q;if(lt(Z)&&!g.context.triggerElements.hasElement(Z)){for(let ue of g.context.triggerElements.elements())if(mr(ue,Z)){ie=ue;break}}lt(q)&&lt(X)&&!g.context.triggerElements.hasElement(q)&&mr(q,X)&&(ie=X);let $=ie==null?!1:P(X,ie,Z),le=g.select("open"),ae=C.current?.()??g.select("transitionStatus")==="ending",re=!le&&ae&&w.current,ve=!$&&lt(ie)&&lt(X)&&mr(X,ie)&&re,Ce=z>0&&!K,_e=$&&(le||re)||ve,Me=!le||$;if(_e){k()&&g.setOpen(!0,Vt(mt.triggerHover,M,ie));return}Ce||(K?y.openChangeTimeout.start(K,()=>{Me&&k()&&g.setOpen(!0,Vt(mt.triggerHover,M,ie))}):Me&&k()&&g.setOpen(!0,Vt(mt.triggerHover,M,ie)))}function L(M){if(I()){U();return}N();let z=g.select("domReferenceElement"),K=Fn(z);y.restTimeout.clear(),y.restTimeoutPending=!1;let Z=v.current.floatingContext??f?.();if(Km(M.relatedTarget,g.context.triggerElements))return;if(_.current&&Z){g.select("open")||y.openChangeTimeout.clear();let X=c.current;y.handler=_.current({...Z,tree:S,x:M.clientX,y:M.clientY,onClose(){U(),N(),O.current&&!I()&&X===g.select("domReferenceElement")&&F(M,!0)}}),K.addEventListener("mousemove",y.handler),y.handler(M);return}(y.pointerType!=="touch"||!mr(g.select("floatingElement"),M.relatedTarget))&&F(M)}return l?Sc(Zt(D,"mousemove",B,{once:!0}),Zt(D,"mouseenter",B),Zt(D,"mouseleave",L)):Sc(Zt(D,"mouseenter",B),Zt(D,"mouseleave",L))},[N,U,v,x,g,r,_,y,d,P,I,i,l,E,c,S,O,f,C,k]),ep.useMemo(()=>{if(!r)return;function F(D){y.pointerType=D.pointerType}return{onPointerDown:F,onPointerEnter:F,onMouseMove(D){let{nativeEvent:B}=D,L=D.currentTarget,M=g.select("domReferenceElement"),z=g.select("open"),K=P(M,L,D.target);if(i&&!$d(y.pointerType))return;if(z&&K&&y.handleCloseOptions?.blockPointerEvents){let X=g.select("floatingElement");if(X){let ie=y.handleCloseOptions?.getScope?.()??L.ownerDocument.body;K2(y,{scopeElement:ie,referenceElement:L,floatingElement:X})}}let Z=$B(E.current);if(z&&!K||Z===0||!K&&y.restTimeoutPending&&D.movementX**2+D.movementY**2<2)return;y.restTimeout.clear();function q(){if(y.restTimeoutPending=!1,I())return;let X=g.select("open");!y.blockMouseMove&&(!X||K)&&k()&&g.setOpen(!0,Vt(mt.triggerHover,B,L))}y.pointerType==="touch"?fX.flushSync(()=>{q()}):K&&z?q():(y.restTimeoutPending=!0,y.restTimeout.start(Z,q))}}},[r,y,I,P,i,g,E,k])}var mX=.1,jNe=mX*mX,wr=.5;function Z2(e,t,r,o,n,i){return o>=t!=i>=t&&e<=(n-r)*(t-o)/(i-o)+r}function X2(e,t,r,o,n,i,s,l,c,u){let d=!1;return Z2(e,t,r,o,n,i)&&(d=!d),Z2(e,t,n,i,s,l)&&(d=!d),Z2(e,t,s,l,c,u)&&(d=!d),Z2(e,t,c,u,r,o)&&(d=!d),d}function zNe(e,t,r){return e>=r.x&&e<=r.x+r.width&&t>=r.y&&t<=r.y+r.height}function Q2(e,t,r,o,n,i){let s=Math.min(r,n),l=Math.max(r,n),c=Math.min(o,i),u=Math.max(o,i);return e>=s&&e<=l&&t>=c&&t<=u}function kV(e={}){let{blockPointerEvents:t=!1}=e,r=new Ua,o=({x:n,y:i,placement:s,elements:l,onClose:c,nodeId:u,tree:d})=>{let f=s?.split("-")[0],m=!1,h=null,g=null,v=typeof performance<"u"?performance.now():0;function b(y,w){let _=performance.now(),x=_-v;if(h===null||g===null||x===0)return h=y,g=w,v=_,!1;let E=y-h,O=w-g,A=E*E+O*O,C=x*x*jNe;return h=y,g=w,v=_,A<C}function S(){r.clear(),c()}return function(w){r.clear();let _=l.domReference,x=l.floating;if(!_||!x||f==null||n==null||i==null)return;let{clientX:E,clientY:O}=w,A=ls(w),C=w.type==="mouseleave",I=mr(x,A),k=mr(_,A);if(I&&(m=!0,!C))return;if(k&&(m=!1,!C)){m=!0;return}if(C&&lt(w.relatedTarget)&&mr(x,w.relatedTarget))return;function P(){return!!(d&&Jd(d.nodesRef.current,u).length>0)}function N(){P()||S()}if(P())return;let U=_.getBoundingClientRect(),F=x.getBoundingClientRect(),D=n>F.right-F.width/2,B=i>F.bottom-F.height/2,L=F.width>U.width,M=F.height>U.height,z=(L?U:F).left,K=(L?U:F).right,Z=(M?U:F).top,q=(M?U:F).bottom;if(f==="top"&&i>=U.bottom-1||f==="bottom"&&i<=U.top+1||f==="left"&&n>=U.right-1||f==="right"&&n<=U.left+1){N();return}let X=!1;switch(f){case"top":X=Q2(E,O,z,U.top+1,K,F.bottom-1);break;case"bottom":X=Q2(E,O,z,F.top+1,K,U.bottom-1);break;case"left":X=Q2(E,O,F.right-1,q,U.left+1,Z);break;case"right":X=Q2(E,O,U.right-1,q,F.left+1,Z);break;default:}if(X)return;if(m&&!zNe(E,O,U)){N();return}if(!C&&b(E,O)){N();return}let ie=!1;switch(f){case"top":{let $=L?wr/2:wr*4,le=L||D?n+$:n-$,ae=L?n-$:D?n+$:n-$,re=i+wr+1,ve=D||L?F.bottom-wr:F.top,Ce=D?L?F.bottom-wr:F.top:F.bottom-wr;ie=X2(E,O,le,re,ae,re,F.left,ve,F.right,Ce);break}case"bottom":{let $=L?wr/2:wr*4,le=L||D?n+$:n-$,ae=L?n-$:D?n+$:n-$,re=i-wr,ve=D||L?F.top+wr:F.bottom,Ce=D?L?F.top+wr:F.bottom:F.top+wr;ie=X2(E,O,le,re,ae,re,F.left,ve,F.right,Ce);break}case"left":{let $=M?wr/2:wr*4,le=M||B?i+$:i-$,ae=M?i-$:B?i+$:i-$,re=n+wr+1,ve=B||M?F.right-wr:F.left,Ce=B?M?F.right-wr:F.left:F.right-wr;ie=X2(E,O,ve,F.top,Ce,F.bottom,re,le,re,ae);break}case"right":{let $=M?wr/2:wr*4,le=M||B?i+$:i-$,ae=M?i-$:B?i+$:i-$,re=n-wr,ve=B||M?F.left+wr:F.right,Ce=B?M?F.left+wr:F.right:F.left+wr;ie=X2(E,O,re,le,re,ae,ve,F.top,Ce,F.bottom);break}default:}ie?m||r.start(40,N):N()}};return o.__options={...e,blockPointerEvents:t},o}var RV=(function(e){return e.open="data-open",e.closed="data-closed",e[e.startingStyle=Su.startingStyle]="startingStyle",e[e.endingStyle=Su.endingStyle]="endingStyle",e.anchorHidden="data-anchor-hidden",e.side="data-side",e.align="data-align",e})({}),e1=(function(e){return e.popupOpen="data-popup-open",e.pressed="data-pressed",e})({}),HNe={[e1.popupOpen]:""},Zpt={[e1.popupOpen]:"",[e1.pressed]:""},UNe={[RV.open]:""},WNe={[RV.closed]:""},GNe={[RV.anchorHidden]:""},pX={open(e){return e?HNe:null}};var Gy={open(e){return e?UNe:WNe},anchorHidden(e){return e?GNe:null}};function hX(e){return Py(19)?e:e?"true":void 0}var Ga=a(xe(),1);var YNe=e=>({name:"arrow",options:e,async fn(t){let{x:r,y:o,placement:n,rects:i,platform:s,elements:l,middlewareData:c}=t,{element:u,padding:d=0,offsetParent:f="real"}=bc(e,t)||{};if(u==null)return{};let m=L2(d),h={x:r,y:o},g=Kx(n),v=qx(g),b=await s.getDimensions(u),S=g==="y",y=S?"top":"left",w=S?"bottom":"right",_=S?"clientHeight":"clientWidth",x=i.reference[v]+i.reference[g]-h[g]-i.floating[v],E=h[g]-i.reference[g],O=f==="real"?await s.getOffsetParent?.(u):l.floating,A=l.floating[_]||i.floating[v];(!A||!await s.isElement?.(O))&&(A=l.floating[_]||i.floating[v]);let C=x/2-E/2,I=A/2-b[v]/2-1,k=Math.min(m[y],I),P=Math.min(m[w],I),N=k,U=A-b[v]-P,F=A/2-b[v]/2+C,D=Yx(N,F,U),B=!c.arrow&&yc(n)!=null&&F!==D&&i.reference[v]/2-(F<N?k:P)-b[v]/2<0,L=B?F<N?F-N:F-U:0;return{[g]:h[g]+L,data:{[g]:D,centerOffset:F-D-L,...B&&{alignmentOffset:L}},reset:B}}}),gX=(e,t)=>({...YNe(e),options:[e,t]});var vX={name:"hide",async fn(e){let{width:t,height:r,x:o,y:n}=e.rects.reference,i=t===0&&r===0&&o===0&&n===0;return{data:{referenceHidden:(await pV().fn(e)).data?.referenceHidden||i}}}};var t1={sideX:"left",sideY:"top"},bX={name:"adaptiveOrigin",async fn(e){let{x:t,y:r,rects:{floating:o},elements:{floating:n},platform:i,strategy:s,placement:l}=e,c=zr(n),u=c.getComputedStyle(n);if(!(u.transitionDuration!=="0s"&&u.transitionDuration!==""))return{x:t,y:r,data:t1};let f=await i.getOffsetParent?.(n),m={width:0,height:0};if(s==="fixed"&&c?.visualViewport)m={width:c.visualViewport.width,height:c.visualViewport.height};else if(f===c){let y=Fn(n);m={width:y.documentElement.clientWidth,height:y.documentElement.clientHeight}}else await i.isElement?.(f)&&(m=await i.getDimensions(f));let h=ai(l),g=t,v=r;h==="left"&&(g=m.width-(t+o.width)),h==="top"&&(v=m.height-(r+o.height));let b=h==="left"?"right":t1.sideX,S=h==="top"?"bottom":t1.sideY;return{x:g,y:v,data:{sideX:b,sideY:S}}}};function SX(e,t,r){let o=e==="inline-start"||e==="inline-end";return{top:"top",right:o?r?"inline-start":"inline-end":"right",bottom:"bottom",left:o?r?"inline-end":"inline-start":"left"}[t]}function yX(e,t,r){let{rects:o,placement:n}=e;return{side:SX(t,ai(n),r),align:yc(n)||"center",anchor:{width:o.reference.width,height:o.reference.height},positioner:{width:o.floating.width,height:o.floating.height}}}function _X(e){let{anchor:t,positionMethod:r="absolute",side:o="bottom",sideOffset:n=0,align:i="center",alignOffset:s=0,collisionBoundary:l,collisionPadding:c=5,sticky:u=!1,arrowPadding:d=5,disableAnchorTracking:f=!1,inline:m,keepMounted:h=!1,floatingRootContext:g,mounted:v,collisionAvoidance:b,shiftCrossAxis:S=!1,nodeId:y,adaptiveOrigin:w,lazyFlip:_=!1,externalTree:x}=e,[E,O]=Ga.useState(null);!v&&E!==null&&O(null);let A=b.side||"flip",C=b.align||"flip",I=b.fallbackAxisSide||"end",k=typeof t=="function"?t:void 0,P=Xe(k),N=k?P:t,U=Ti(t),F=Ti(v),B=Ey()==="rtl",L=E||{top:"top",right:"right",bottom:"bottom",left:"left","inline-end":B?"left":"right","inline-start":B?"right":"left"}[o],M=i==="center"?L:`${L}-${i}`,z=c,K=1,Z=o==="bottom"?K:0,q=o==="top"?K:0,X=o==="right"?K:0,ie=o==="left"?K:0;typeof z=="number"?z={top:z+Z,right:z+ie,bottom:z+q,left:z+X}:z&&(z={top:(z.top||0)+Z,right:(z.right||0)+ie,bottom:(z.bottom||0)+q,left:(z.left||0)+X});let $={boundary:l==="clipping-ancestors"?"clippingAncestors":l,padding:z},le=Ga.useRef(null),ae=Ti(n),re=Ti(s),ve=typeof n!="function"?n:0,Ce=typeof s!="function"?s:0,_e=[];m&&_e.push(m),_e.push(cV(wt=>{let Ht=yX(wt,o,B),ee=typeof ae.current=="function"?ae.current(Ht):ae.current,we=typeof re.current=="function"?re.current(Ht):re.current;return{mainAxis:ee,crossAxis:we,alignmentAxis:we}},[ve,Ce,B,o]));let Me=C==="none"&&A!=="shift",ue=!Me&&(u||S||A==="shift"),te=A==="none"?null:fV({...$,padding:{top:z.top+K,right:z.right+K,bottom:z.bottom+K,left:z.left+K},mainAxis:!S&&A==="flip",crossAxis:C==="flip"?"alignment":!1,fallbackAxisSideDirection:I}),de=Me?null:uV(wt=>{let Ht=Fn(wt.elements.floating).documentElement;return{...$,rootBoundary:S?{x:0,y:0,width:Ht.clientWidth,height:Ht.clientHeight}:void 0,mainAxis:C!=="none",crossAxis:ue,limiter:u||S?void 0:dV(ee=>{if(!le.current)return{};let{width:we,height:j}=le.current.getBoundingClientRect(),Pe=Ks(ai(ee.placement)),Dt=Pe==="y"?we:j,Ee=Pe==="y"?z.left+z.right:z.top+z.bottom;return{offset:Dt/2+Ee/2}})}},[$,u,S,z,C]);A==="shift"||C==="shift"||i==="center"?_e.push(de,te):_e.push(te,de),_e.push(mV({...$,apply({elements:{floating:wt},availableWidth:Ht,availableHeight:ee,rects:we}){if(!F.current)return;let j=wt.style;j.setProperty("--available-width",`${Ht}px`),j.setProperty("--available-height",`${ee}px`);let Pe=zr(wt).devicePixelRatio||1,{x:Dt,y:Ee,width:xo,height:Ae}=we.reference,tr=(Math.round((Dt+xo)*Pe)-Math.round(Dt*Pe))/Pe,ce=(Math.round((Ee+Ae)*Pe)-Math.round(Ee*Pe))/Pe;j.setProperty("--anchor-width",`${tr}px`),j.setProperty("--anchor-height",`${ce}px`)}}),gX(wt=>({element:le.current||Fn(wt.elements.floating).createElement("div"),padding:d,offsetParent:"floating"}),[d]),{name:"transformOrigin",fn(wt){let{elements:Ht,middlewareData:ee,placement:we,rects:j,y:Pe}=wt,Dt=ai(we),Ee=Ks(Dt),xo=le.current,Ae=ee.arrow?.x||0,tr=ee.arrow?.y||0,ce=xo?.clientWidth||0,me=xo?.clientHeight||0,zs=Ae+ce/2,Yt=tr+me/2,De=Math.abs(ee.shift?.y||0),dc=j.reference.height/2,ye=typeof n=="function"?n(yX(wt,o,B)):n,Be=De>ye,qe={top:`${zs}px calc(100% + ${ye}px)`,bottom:`${zs}px ${-ye}px`,left:`calc(100% + ${ye}px) ${Yt}px`,right:`${-ye}px ${Yt}px`}[Dt],rr=`${zs}px ${j.reference.y+dc-Pe}px`;return Ht.floating.style.setProperty("--transform-origin",ue&&Ee==="y"&&Be?rr:qe),{}}},vX,w),Qe(()=>{!v&&g&&g.update({referenceElement:null,floatingElement:null,domReferenceElement:null,positionReference:null})},[v,g]);let se=Ga.useMemo(()=>({elementResize:!f&&typeof ResizeObserver<"u",layoutShift:!f&&typeof IntersectionObserver<"u"}),[f]),{refs:fe,elements:Ne,x:Ie,y:je,middlewareData:Ge,update:Se,placement:Te,context:J,isPositioned:he,floatingStyles:ct}=SV({rootContext:g,open:h?v:void 0,placement:M,middleware:_e,strategy:r,whileElementsMounted:h?void 0:(...wt)=>Jx(...wt,se),nodeId:y,externalTree:x}),{sideX:Ke,sideY:dt}=Ge.adaptiveOrigin||t1,yt=he?r:"fixed",Pt=Ga.useMemo(()=>{let wt=w?{position:yt,[Ke]:Ie,[dt]:je}:{position:yt,...ct};return he||(wt.opacity=0),wt},[w,yt,Ke,Ie,dt,je,ct,he]),_t=Ga.useRef(null);Qe(()=>{if(!v)return;let wt=U.current,Ht=typeof wt=="function"?wt():wt,we=(wX(Ht)?Ht.current:Ht)||null||null;we!==_t.current&&(fe.setPositionReference(we),_t.current=we)},[v,fe,N,U]),Ga.useEffect(()=>{if(!v)return;let wt=U.current;typeof wt!="function"&&wX(wt)&&wt.current!==_t.current&&(fe.setPositionReference(wt.current),_t.current=wt.current)},[v,fe,N,U]),Ga.useEffect(()=>{if(h&&v&&Ne.domReference&&Ne.floating)return Jx(Ne.domReference,Ne.floating,Se,se)},[h,v,Ne,Se,se]);let Ye=ai(Te),La=SX(o,Ye,B),js=yc(Te)||"center",_r=!!Ge.hide?.referenceHidden;Qe(()=>{_&&v&&he&&O(Ye)},[_,v,he,Ye]);let uc=Ga.useMemo(()=>({position:"absolute",top:Ge.arrow?.y,left:Ge.arrow?.x}),[Ge.arrow]),Kr=Ge.arrow?.centerOffset!==0;return Ga.useMemo(()=>({positionerStyles:Pt,arrowStyles:uc,arrowRef:le,arrowUncentered:Kr,side:La,align:js,physicalSide:Ye,anchorHidden:_r,refs:fe,context:J,isPositioned:he,update:Se}),[Pt,uc,le,Kr,La,js,Ye,_r,fe,J,he,Se])}function wX(e){return e!=null&&"current"in e}function J2(e){return e==="starting"?$K:Eo}function xX(e,t,{styles:r,transitionStatus:o,props:n,refs:i,hidden:s,inert:l=!1}){let c={...r};return l&&(c.pointerEvents="none"),Po("div",e,{state:t,ref:i,props:[{role:"presentation",hidden:s,style:c},J2(o),n],stateAttributesMapping:Gy})}var CX=a(xe(),1);var AV=CX.forwardRef(function(t,r){let{render:o,className:n,disabled:i=!1,focusableWhenDisabled:s=!1,nativeButton:l=!0,style:c,...u}=t,{getButtonProps:d,buttonRef:f}=Ux({disabled:i,focusableWhenDisabled:s,native:l});return Po("button",t,{state:{disabled:i},ref:[r,f],props:[u,d]})});var tp={};Rn(tp,{Panel:()=>AX,Root:()=>EX,Trigger:()=>kX});var r1=a(xe(),1);var $2={...wK,...Ay};var TX=a(T(),1),EX=r1.forwardRef(function(t,r){let{render:o,className:n,defaultOpen:i=!1,disabled:s=!1,onOpenChange:l,open:c,style:u,...d}=t,f=Xe(l),m=vK({open:c,defaultOpen:i,onOpenChange:f,disabled:s}),h=r1.useMemo(()=>({open:m.open,disabled:m.disabled,transitionStatus:m.transitionStatus}),[m.open,m.disabled,m.transitionStatus]),g=r1.useMemo(()=>({...m,onOpenChange:f,state:h}),[m,f,h]),v=Po("div",t,{state:h,ref:r,props:d,stateAttributesMapping:$2});return(0,TX.jsx)(YB.Provider,{value:g,children:v})});var PX=a(xe(),1);var qNe={...yK,...Ay},kX=PX.forwardRef(function(t,r){let{panelId:o,open:n,handleTrigger:i,state:s,disabled:l}=E2(),{className:c,disabled:u=l,id:d,render:f,nativeButton:m=!0,style:h,...g}=t,{getButtonProps:v,buttonRef:b}=Ux({disabled:u,focusableWhenDisabled:!0,native:m});return Po("button",t,{state:s,ref:[r,b],props:[{"aria-controls":n?o:void 0,"aria-expanded":n,onClick:i},g,v],stateAttributesMapping:qNe})});var RX=a(xe(),1);var IV=(function(e){return e.collapsiblePanelHeight="--collapsible-panel-height",e.collapsiblePanelWidth="--collapsible-panel-width",e})({});var AX=RX.forwardRef(function(t,r){let{className:o,hiddenUntilFound:n,keepMounted:i,render:s,id:l,style:c,...u}=t,{mounted:d,onOpenChange:f,open:m,panelId:h,setMounted:g,setPanelIdState:v,setOpen:b,state:S,transitionStatus:y}=E2(),w=n??!1,_=i??!1;Qe(()=>{if(l)return v(l),()=>{v(void 0)}},[l,v]);let{height:x,props:E,ref:O,shouldPreventOpenAnimation:A,shouldRender:C,transitionStatus:I,width:k}=qK({externalRef:r,hiddenUntilFound:w,id:h,keepMounted:_,mounted:d,onOpenChange:f,open:m,setMounted:g,setOpen:b,transitionStatus:y}),P={...S,transitionStatus:I},N=v2(c,P),U=Po("div",{...t,style:void 0},{state:P,ref:O,props:[E,{style:{[IV.collapsiblePanelHeight]:x===void 0?"auto":`${x}px`,[IV.collapsiblePanelWidth]:k===void 0?"auto":`${k}px`}},u,N?{style:N}:void 0,A?{style:{animationName:"none"}}:void 0],stateAttributesMapping:$2});return C?U:null});var Pi=a(xe(),1),DX=a(_u(),1);var IX=a(xe(),1);function OX(e){let[t,r]=IX.useState({current:e,previous:null});return e!==t.current&&r({current:e,previous:t.current}),t.previous}var jg=a(xe(),1);function OV(e){let t=Ci(e),r=parseFloat(t.width)||0,o=parseFloat(t.height)||0,n=tn(e),i=n?e.offsetWidth:r,s=n?e.offsetHeight:o;return(Xm(r)!==i||Xm(o)!==s)&&(r=i,o=s),{width:r,height:o}}var KNe=()=>!0;function MX(e){let{popupElement:t,positionerElement:r,content:o,mounted:n,enabled:i=KNe,onMeasureLayout:s,onMeasureLayoutComplete:l,side:c,direction:u}=e,d=Qm(t,!0,!1),f=Ry(),m=jg.useRef(null),h=jg.useRef(null),g=jg.useRef(!0),v=jg.useRef(Qd),b=Xe(s),S=Xe(l),y=jg.useMemo(()=>{let w=c==="top",_=c==="left";return u==="rtl"?(w=w||c==="inline-end",_=_||c==="inline-end"):(w=w||c==="inline-start",_=_||c==="inline-start"),w?{position:"absolute",[c==="top"?"bottom":"top"]:"0",[_?"right":"left"]:"0"}:Eo},[c,u]);Qe(()=>{if(!n||!i()||typeof ResizeObserver!="function"){v.current=Qd,g.current=!0,m.current=null,h.current=null;return}if(!t||!r)return;v.current=NX(t,y);let w=new ResizeObserver(N=>{let U=N[0];U&&(h.current={width:Math.ceil(U.borderBoxSize[0].inlineSize),height:Math.ceil(U.borderBoxSize[0].blockSize)})});w.observe(t),eR(t,"auto");let _=tR(t,"position","static"),x=tR(t,"transform","none"),E=tR(t,"scale","1"),O=NX(r,{"--available-width":"max-content","--available-height":"max-content"});function A(){_(),x(),O()}function C(){A(),E()}if(b?.(),g.current||m.current===null){o1(r,"max-content");let N=OV(t);return m.current=N,o1(r,N),C(),S?.(null,N),g.current=!1,()=>{w.disconnect(),v.current(),v.current=Qd}}eR(t,"auto"),o1(r,"max-content");let I=m.current??h.current,k=OV(t);if(m.current=k,!I)return o1(r,k),C(),S?.(null,k),()=>{w.disconnect(),f.cancel(),v.current(),v.current=Qd};eR(t,I),C(),S?.(I,k),o1(r,k);let P=new AbortController;return f.request(()=>{eR(t,k),d(()=>{t.style.setProperty("--popup-width","auto"),t.style.setProperty("--popup-height","auto")},P.signal)}),()=>{w.disconnect(),P.abort(),f.cancel(),v.current(),v.current=Qd}},[o,t,r,d,f,i,n,b,S,y])}function tR(e,t,r){let o=e.style.getPropertyValue(t);return e.style.setProperty(t,r),()=>{e.style.setProperty(t,o)}}function NX(e,t){let r=[];for(let[o,n]of Object.entries(t))r.push(tR(e,o,n));return r.length?()=>{r.forEach(o=>o())}:Qd}function eR(e,t){let r=t==="auto"?"auto":`${t.width}px`,o=t==="auto"?"auto":`${t.height}px`;e.style.setProperty("--popup-width",r),e.style.setProperty("--popup-height",o)}function o1(e,t){let r=t==="max-content"?"max-content":`${t.width}px`,o=t==="max-content"?"max-content":`${t.height}px`;e.style.setProperty("--positioner-width",r),e.style.setProperty("--positioner-height",o)}var Yy=a(T(),1);function LX(e){let{store:t,side:r,cssVars:o,children:n}=e,i=Ey(),s=t.useState("activeTriggerElement"),l=t.useState("activeTriggerId"),c=t.useState("open"),u=t.useState("payload"),d=t.useState("mounted"),f=t.useState("popupElement"),m=t.useState("positionerElement"),h=OX(c?s:null),g=QNe(l,u),v=Pi.useRef(null),[b,S]=Pi.useState(null),[y,w]=Pi.useState(null),_=Pi.useRef(null),x=Pi.useRef(null),E=Qm(_,!0,!1),O=Ry(),[A,C]=Pi.useState(null),[I,k]=Pi.useState(!1);Qe(()=>(t.set("hasViewport",!0),()=>{t.set("hasViewport",!1)}),[t]);let P=Xe(()=>{_.current?.style.setProperty("animation","none"),_.current?.style.setProperty("transition","none"),x.current?.style.setProperty("display","none")}),N=Xe(L=>{_.current?.style.removeProperty("animation"),_.current?.style.removeProperty("transition"),x.current?.style.removeProperty("display"),L&&C(L)}),U=Pi.useRef(null);Qe(()=>{if(s&&h&&s!==h&&U.current!==s&&v.current){S(v.current),k(!0);let L=XNe(h,s);w(L),O.request(()=>{DX.flushSync(()=>{k(!1)}),E(()=>{S(null),C(null),v.current=null})}),U.current=s}},[s,h,b,E,O]),Qe(()=>{let L=_.current;if(!L)return;let M=Fn(L).createElement("div");for(let z of Array.from(L.childNodes))M.appendChild(z.cloneNode(!0));v.current=M});let F=b!=null,D;F?D=(0,Yy.jsxs)(Pi.Fragment,{children:[(0,Yy.jsx)("div",{"data-previous":!0,inert:hX(!0),ref:x,style:{...A?{[o.popupWidth]:`${A.width}px`,[o.popupHeight]:`${A.height}px`}:null,position:"absolute"},"data-ending-style":I?void 0:""},"previous"),(0,Yy.jsx)("div",{"data-current":!0,ref:_,"data-starting-style":I?"":void 0,children:n},g)]}):D=(0,Yy.jsx)("div",{"data-current":!0,ref:_,children:n},g),Qe(()=>{let L=x.current;!L||!b||L.replaceChildren(...Array.from(b.childNodes))},[b]),MX({popupElement:f,positionerElement:m,mounted:d,content:u,onMeasureLayout:P,onMeasureLayoutComplete:N,side:r,direction:i});let B={activationDirection:ZNe(y),transitioning:F};return{children:D,state:B}}function ZNe(e){if(e)return`${FX(e.horizontal,5,"right","left")} ${FX(e.vertical,5,"down","up")}`}function FX(e,t,r,o){return e>t?r:e<-t?o:""}function XNe(e,t){let r=e.getBoundingClientRect(),o=t.getBoundingClientRect(),n={x:r.left+r.width/2,y:r.top+r.height/2},i={x:o.left+o.width/2,y:o.top+o.height/2};return{horizontal:i.x-n.x,vertical:i.y-n.y}}function QNe(e,t){let[r,o]=Pi.useState(0),n=Pi.useRef(e),i=Pi.useRef(t),s=Pi.useRef(!1);return Qe(()=>{let l=n.current,c=i.current,u=e!==l,d=t!==c;u?(o(f=>f+1),s.current=!d):s.current&&d&&(o(f=>f+1),s.current=!1),n.current=e,i.current=t},[e,t]),`${e??"current"}-${r}`}var rR=a(xe(),1),BX=a(_u(),1);var VX=a(T(),1),jX=rR.forwardRef(function(t,r){let{children:o,container:n,className:i,render:s,style:l,...c}=t,{portalNode:u,portalSubtree:d}=rV({container:n,ref:r,componentProps:t,elementProps:c});return!d&&!u?null:(0,VX.jsxs)(rR.Fragment,{children:[d,u&&BX.createPortal(o,u)]})});var Js={};Rn(Js,{Arrow:()=>oQ,Handle:()=>n1,Popup:()=>tQ,Portal:()=>QX,Positioner:()=>$X,Provider:()=>nQ,Root:()=>UX,Trigger:()=>KX,Viewport:()=>aQ,createHandle:()=>lQ});var Tu=a(xe(),1);var oR=a(xe(),1),NV=oR.createContext(void 0);function yl(e){let t=oR.useContext(NV);if(t===void 0&&!e)throw new Error(Mn(72));return t}var zX=a(xe(),1),HX=a(_u(),1);var JNe={...uX,disabled:Bt(e=>e.disabled),instantType:Bt(e=>e.instantType),isInstantPhase:Bt(e=>e.isInstantPhase),trackCursorAxis:Bt(e=>e.trackCursorAxis),disableHoverablePopup:Bt(e=>e.disableHoverablePopup),lastOpenChangeReason:Bt(e=>e.openChangeReason),closeOnClick:Bt(e=>e.closeOnClick),closeDelay:Bt(e=>e.closeDelay),hasViewport:Bt(e=>e.hasViewport)},qy=class e extends zy{constructor(t,r,o=!1){let n=new $m,i={...$Ne(),...t};i.floatingRootContext=lX(n,r,o),super(i,{popupRef:zX.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerElements:n},JNe)}setOpen=(t,r)=>{let o=r.reason,n=o===mt.triggerHover,i=t&&o===mt.triggerFocus,s=!t&&(o===mt.triggerPress||o===mt.escapeKey);if(r.preventUnmountOnClose=()=>{this.set("preventUnmountingOnClose",!0)},this.context.onOpenChange?.(t,r),r.isCanceled)return;this.state.floatingRootContext.dispatchOpenChange(t,r);let l=()=>{let c={open:t,openChangeReason:o};i?c.instantType="focus":s?c.instantType="dismiss":o===mt.triggerHover&&(c.instantType=void 0),eX(c,t,r.trigger),this.update(c)};n?HX.flushSync(l):l()};cancelPendingOpen(t){this.state.floatingRootContext.dispatchOpenChange(!1,Vt(mt.triggerPress,t))}static useStore(t,r){return $Z(t,(n,i)=>new e(r,n,i)).store}};function $Ne(){return{...aX(),disabled:!1,instantType:void 0,isInstantPhase:!1,trackCursorAxis:"none",disableHoverablePopup:!1,openChangeReason:null,closeOnClick:!0,closeDelay:0,hasViewport:!1}}var nR=a(T(),1),UX=bV(function(t){let{disabled:r=!1,defaultOpen:o=!1,open:n,disableHoverablePopup:i=!1,trackCursorAxis:s="none",actionsRef:l,onOpenChange:c,onOpenChangeComplete:u,handle:d,triggerId:f,defaultTriggerId:m=null,children:h}=t,g=qy.useStore(d?.store,{open:o,openProp:n,activeTriggerId:m,triggerIdProp:f});ZK(()=>{n===void 0&&g.state.open===!1&&o===!0&&g.update({open:!0,activeTriggerId:m})}),g.useControlledProp("openProp",n),g.useControlledProp("triggerIdProp",f),g.useContextCallback("onOpenChange",c),g.useContextCallback("onOpenChangeComplete",u);let v=g.useState("open"),b=!r&&v,S=g.useState("activeTriggerId"),y=g.useState("mounted"),w=g.useState("payload");g.useSyncedValues({trackCursorAxis:s,disableHoverablePopup:i}),g.useSyncedValue("disabled",r),rX(g);let{forceUnmount:_,transitionStatus:x}=oX(b,g),E=g.useState("isInstantPhase"),O=g.useState("instantType"),A=g.useState("lastOpenChangeReason"),C=Tu.useRef(null);Qe(()=>{v&&r&&g.setOpen(!1,Vt(mt.disabled))},[v,r,g]),Qe(()=>{x==="ending"&&A===mt.none||x!=="ending"&&E?(O!=="delay"&&(C.current=O),g.set("instantType","delay")):C.current!==null&&(g.set("instantType",C.current),C.current=null)},[x,E,A,O,g]),Qe(()=>{b&&S==null&&g.set("payload",void 0)},[g,S,b]);let I=Tu.useCallback(()=>{g.setOpen(!1,Vt(mt.imperativeAction))},[g]);Tu.useImperativeHandle(l,()=>({unmount:_,close:I}),[_,I]);let k=b||y||!r&&s!=="none";return(0,nR.jsxs)(NV.Provider,{value:g,children:[k&&(0,nR.jsx)(eMe,{store:g,disabled:r,trackCursorAxis:s}),typeof h=="function"?h({payload:w}):h]})});function eMe({store:e,disabled:t,trackCursorAxis:r}){let o=e.useState("floatingRootContext"),n=nV(o,{enabled:!t,referencePress:()=>e.select("closeOnClick")}),i=oV(o,{enabled:!t&&r!=="none",axis:r==="none"?void 0:r}),s=Tu.useMemo(()=>jr(i.reference,n.reference),[i.reference,n.reference]),l=Tu.useMemo(()=>jr(i.trigger,n.trigger),[i.trigger,n.trigger]),c=Tu.useMemo(()=>jr(JZ,i.floating,n.floating),[i.floating,n.floating]);return nX(e,{activeTriggerProps:s,inactiveTriggerProps:l,popupProps:c}),null}var sR=a(xe(),1);var iR=a(xe(),1),MV=iR.createContext(void 0);function WX(){return iR.useContext(MV)}var GX=(function(e){return e[e.popupOpen=e1.popupOpen]="popupOpen",e.triggerDisabled="data-trigger-disabled",e})({});var qX="data-base-ui-tooltip-trigger";function YX(e){if("composedPath"in e){let r=e.composedPath();for(let o=0;o<r.length;o+=1){let n=r[o];if(lt(n))return n}}let t=e.target;return lt(t)?t:null}function tMe(e){let t=e;for(;t;){if(t.hasAttribute(qX))return t;let r=t.parentElement;if(r){t=r;continue}let o=t.getRootNode();t="host"in o&&lt(o.host)?o.host:null}return null}var KX=qZ(function(t,r){let{render:o,className:n,style:i,handle:s,payload:l,disabled:c,delay:u,closeOnClick:d=!0,closeDelay:f,id:m,...h}=t,g=yl(!0),v=s?.store??g;if(!v)throw new Error(Mn(82));let b=w2(m),S=v.useState("isTriggerActive",b),y=v.useState("isOpenedByTrigger",b),w=v.useState("floatingRootContext"),_=sR.useRef(null),x=u??600,E=f??0,{registerTrigger:O,isMountedByThisTrigger:A}=tX(b,_,v,{payload:l,closeOnClick:d,closeDelay:E}),C=WX(),{delayRef:I,isInstantPhase:k,hasProvider:P}=tV(w,{open:y}),N=Wy(w);v.useSyncedValue("isInstantPhase",k);let U=v.useState("disabled"),F=c??U,D=Ti(F),B=v.useState("trackCursorAxis"),L=v.useState("disableHoverablePopup"),M=sR.useRef(!1),z=wc(),K=sR.useRef(void 0);function Z(){let _e=C?.delay,Me=typeof I.current=="object"?I.current.open:void 0,ue=x;return P&&(Me!==0?ue=u??_e??x:ue=0),ue}function q(_e){let Me=_.current;if(!Me||!_e)return!1;let ue=tMe(_e);return ue!==null&&ue!==Me&&mr(Me,ue)}function X(_e){let Me=q(_e);return M.current=Me,Me&&(N.openChangeTimeout.clear(),N.restTimeout.clear(),N.restTimeoutPending=!1,z.clear()),Me}let ie=PV(w,{enabled:!F,mouseOnly:!0,move:!1,handleClose:!L&&B!=="both"?kV():null,restMs:Z,delay(){let _e=typeof I.current=="object"?I.current.close:void 0,Me=E;return f==null&&P&&(Me=_e),{close:Me}},triggerElementRef:_,isActiveTrigger:S,isClosing:()=>v.select("transitionStatus")==="ending",shouldOpen(){return!M.current}}),$=xV(w,{enabled:!F}).reference,le=_e=>{let Me=M.current,ue=YX(_e),te=X(ue),de=_.current,se=de&&ue&&mr(de,ue);if(te&&v.select("open")&&v.select("lastOpenChangeReason")===mt.triggerHover){v.setOpen(!1,Vt(mt.triggerHover,_e));return}if(Me&&!te&&se&&!D.current&&!v.select("open")&&de&&$d(K.current)){let fe=()=>{!M.current&&!D.current&&!v.select("open")&&v.setOpen(!0,Vt(mt.triggerHover,_e,de))},Ne=Z();Ne===0?(z.clear(),fe()):z.start(Ne,fe)}},ae=v.useState("triggerProps",A);return Po("button",t,{state:{open:y},ref:[r,O,_],props:[ie,$,A||B!=="none"?ae:void 0,{onMouseOver(_e){le(_e.nativeEvent)},onFocus(_e){q(YX(_e.nativeEvent))&&_e.preventBaseUIHandler()},onMouseLeave(){M.current=!1,z.clear(),K.current=void 0},onPointerEnter(_e){K.current=_e.pointerType},onPointerDown(_e){K.current=_e.pointerType,v.set("closeOnClick",d),d&&!v.select("open")&&v.cancelPendingOpen(_e.nativeEvent)},onClick(_e){d&&!v.select("open")&&v.cancelPendingOpen(_e.nativeEvent)},id:b,[GX.triggerDisabled]:F?"":void 0,[qX]:F?void 0:""},h],stateAttributesMapping:pX})});var XX=a(xe(),1);var aR=a(xe(),1),FV=aR.createContext(void 0);function ZX(){let e=aR.useContext(FV);if(e===void 0)throw new Error(Mn(70));return e}var DV=a(T(),1),QX=XX.forwardRef(function(t,r){let{keepMounted:o=!1,...n}=t;return yl().useState("mounted")||o?(0,DV.jsx)(FV.Provider,{value:o,children:(0,DV.jsx)(jX,{ref:r,...n})}):null});var cR=a(xe(),1);var lR=a(xe(),1),LV=lR.createContext(void 0);function Ky(){let e=lR.useContext(LV);if(e===void 0)throw new Error(Mn(71));return e}var JX=a(T(),1),$X=cR.forwardRef(function(t,r){let{render:o,className:n,anchor:i,positionMethod:s="absolute",side:l="top",align:c="center",sideOffset:u=0,alignOffset:d=0,collisionBoundary:f="clipping-ancestors",collisionPadding:m=5,arrowPadding:h=5,sticky:g=!1,disableAnchorTracking:v=!1,collisionAvoidance:b=eZ,style:S,...y}=t,w=yl(),_=ZX(),x=w.useState("open"),E=w.useState("mounted"),O=w.useState("trackCursorAxis"),A=w.useState("disableHoverablePopup"),C=w.useState("floatingRootContext"),I=w.useState("instantType"),k=w.useState("transitionStatus"),P=w.useState("hasViewport"),N=_X({anchor:i,positionMethod:s,floatingRootContext:C,mounted:E,side:l,sideOffset:u,align:c,alignOffset:d,collisionBoundary:f,collisionPadding:m,sticky:g,arrowPadding:h,disableAnchorTracking:v,keepMounted:_,collisionAvoidance:b,adaptiveOrigin:P?bX:void 0}),U=cR.useMemo(()=>({open:x,side:N.side,align:N.align,anchorHidden:N.anchorHidden,instant:O!=="none"?"tracking-cursor":I}),[x,N.side,N.align,N.anchorHidden,O,I]),F=xX(t,U,{styles:N.positionerStyles,transitionStatus:k,props:y,refs:[r,w.useStateSetter("positionerElement")],hidden:!E,inert:!x||O==="both"||A});return(0,JX.jsx)(LV.Provider,{value:N,children:F})});var eQ=a(xe(),1);var rMe={...Gy,...Ay},tQ=eQ.forwardRef(function(t,r){let{render:o,className:n,style:i,...s}=t,l=yl(),{side:c,align:u}=Ky(),d=l.useState("open"),f=l.useState("instantType"),m=l.useState("transitionStatus"),h=l.useState("popupProps"),g=l.useState("floatingRootContext"),v=l.useState("disabled"),b=l.useState("closeDelay");Fy({open:d,ref:l.context.popupRef,onComplete(){d&&l.context.onOpenChangeComplete?.(!0)}}),EV(g,{enabled:!v,closeDelay:b});let S=l.useStateSetter("popupElement");return Po("div",t,{state:{open:d,side:c,align:u,instant:f,transitionStatus:m},ref:[r,l.context.popupRef,S],props:[h,J2(m),s],stateAttributesMapping:rMe})});var rQ=a(xe(),1);var oQ=rQ.forwardRef(function(t,r){let{render:o,className:n,style:i,...s}=t,l=yl(),{arrowRef:c,side:u,align:d,arrowUncentered:f,arrowStyles:m}=Ky(),h=l.useState("open"),g=l.useState("instantType");return Po("div",t,{state:{open:h,side:u,align:d,uncentered:f,instant:g},ref:[r,c],props:[{style:m,"aria-hidden":!0},s],stateAttributesMapping:Gy})});var BV=a(xe(),1);var VV=a(T(),1),nQ=function(t){let{delay:r,closeDelay:o,timeout:n=400}=t,i=BV.useMemo(()=>({delay:r,closeDelay:o}),[r,o]),s=BV.useMemo(()=>({open:r,close:o}),[r,o]);return(0,VV.jsx)(MV.Provider,{value:i,children:(0,VV.jsx)(eV,{delay:s,timeoutMs:n,children:t.children})})};var sQ=a(xe(),1);var iQ=(function(e){return e.popupWidth="--popup-width",e.popupHeight="--popup-height",e})({});var oMe={activationDirection:e=>e?{"data-activation-direction":e}:null},aQ=sQ.forwardRef(function(t,r){let{render:o,className:n,style:i,children:s,...l}=t,c=yl(),u=Ky(),d=c.useState("instantType"),{children:f,state:m}=LX({store:c,side:u.side,cssVars:iQ,children:s}),h={activationDirection:m.activationDirection,transitioning:m.transitioning,instant:d};return Po("div",t,{state:h,ref:r,props:[l,{children:f}],stateAttributesMapping:oMe})});var n1=class{constructor(){this.store=new qy}open(t){let r=t?this.store.context.triggerElements.getById(t):void 0;if(t&&!r)throw new Error(Mn(81,t));this.store.setOpen(!0,Vt(mt.imperativeAction,void 0,r))}close(){this.store.setOpen(!1,Vt(mt.imperativeAction,void 0,void 0))}get isOpen(){return this.store.select("open")}};function lQ(){return new n1}function ki(e){return Po(e.defaultTagName??"div",e,e)}var dQ=a(H(),1),jV="data-wp-hash";function zV(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&iMe(document)),e.__wpStyleRuntime}function nMe(e,t){if(!e.head)return!1;for(let r of e.head.querySelectorAll(`style[${jV}]`))if(r.getAttribute(jV)===t)return!0;return!1}function fQ(e,t,r){if(!e.head)return;let o=zV(),n=o.injectedStyles.get(e);if(n||(n=new Set,o.injectedStyles.set(e,n)),n.has(t))return;if(nMe(e,t)){n.add(t);return}let i=e.createElement("style");i.setAttribute(jV,t),i.appendChild(e.createTextNode(r)),e.head.appendChild(i),n.add(t)}function iMe(e){let t=zV();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[r,o]of t.styles)fQ(e,r,o);return()=>{let r=t.documents.get(e);if(r!==void 0){if(r<=1){t.documents.delete(e);return}t.documents.set(e,r-1)}}}function mQ(e,t){let r=zV();r.styles.set(e,t);for(let o of r.documents.keys())fQ(o,e,t)}typeof process>"u",mQ("0c5702ddca",'@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._83ed8a8da5dd50ea__text{margin:0}._14437cfb77831647__heading-2xl{--_gcd-heading-font-size:var(--wpds-typography-font-size-2xl,32px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-medium,499);--_gcd-p-font-size:var(--wpds-typography-font-size-2xl,32px);--_gcd-p-line-height:var(--wpds-typography-line-height-2xl,40px);font-size:var(--wpds-typography-font-size-2xl,32px);line-height:var(--wpds-typography-line-height-2xl,40px)}._14437cfb77831647__heading-2xl,._3c78b7fa9b4072dd__heading-xl{font-family:var(--wpds-typography-font-family-heading,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-weight:var(--wpds-typography-font-weight-medium,499)}._3c78b7fa9b4072dd__heading-xl{--_gcd-heading-font-size:var(--wpds-typography-font-size-xl,20px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-medium,499);--_gcd-p-font-size:var(--wpds-typography-font-size-xl,20px);--_gcd-p-line-height:var(--wpds-typography-line-height-md,24px);font-size:var(--wpds-typography-font-size-xl,20px);line-height:var(--wpds-typography-line-height-md,24px)}.aa58f227716bcde2__heading-lg{--_gcd-heading-font-size:var(--wpds-typography-font-size-lg,15px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-medium,499);--_gcd-p-font-size:var(--wpds-typography-font-size-lg,15px);--_gcd-p-line-height:var(--wpds-typography-line-height-sm,20px);font-size:var(--wpds-typography-font-size-lg,15px)}.aa58f227716bcde2__heading-lg,.fc4da56d8dfe52c4__heading-md{font-family:var(--wpds-typography-font-family-heading,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-weight:var(--wpds-typography-font-weight-medium,499);line-height:var(--wpds-typography-line-height-sm,20px)}.fc4da56d8dfe52c4__heading-md{--_gcd-heading-font-size:var(--wpds-typography-font-size-md,13px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-medium,499);--_gcd-p-font-size:var(--wpds-typography-font-size-md,13px);--_gcd-p-line-height:var(--wpds-typography-line-height-sm,20px);font-size:var(--wpds-typography-font-size-md,13px)}.a9b78c7c82e8dff7__heading-sm{--_gcd-heading-font-size:var(--wpds-typography-font-size-xs,11px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-medium,499);--_gcd-p-font-size:var(--wpds-typography-font-size-xs,11px);--_gcd-p-line-height:var(--wpds-typography-line-height-xs,16px);font-family:var(--wpds-typography-font-family-heading,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-typography-font-size-xs,11px);font-weight:var(--wpds-typography-font-weight-medium,499);line-height:var(--wpds-typography-line-height-xs,16px);text-transform:uppercase}._305ff559e52180d5__body-xl{--_gcd-heading-font-size:var(--wpds-typography-font-size-xl,20px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-regular,400);--_gcd-p-font-size:var(--wpds-typography-font-size-xl,20px);--_gcd-p-line-height:var(--wpds-typography-line-height-xl,32px);font-size:var(--wpds-typography-font-size-xl,20px);line-height:var(--wpds-typography-line-height-xl,32px)}._305ff559e52180d5__body-xl,.ca1aa3fc2029e958__body-lg{font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-weight:var(--wpds-typography-font-weight-regular,400)}.ca1aa3fc2029e958__body-lg{--_gcd-heading-font-size:var(--wpds-typography-font-size-lg,15px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-regular,400);--_gcd-p-font-size:var(--wpds-typography-font-size-lg,15px);--_gcd-p-line-height:var(--wpds-typography-line-height-md,24px);font-size:var(--wpds-typography-font-size-lg,15px);line-height:var(--wpds-typography-line-height-md,24px)}._131101940be12424__body-md{--_gcd-heading-font-size:var(--wpds-typography-font-size-md,13px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-regular,400);--_gcd-p-font-size:var(--wpds-typography-font-size-md,13px);--_gcd-p-line-height:var(--wpds-typography-line-height-sm,20px);font-size:var(--wpds-typography-font-size-md,13px);line-height:var(--wpds-typography-line-height-sm,20px)}._0e8d87a42c1f75fa__body-sm,._131101940be12424__body-md{font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-weight:var(--wpds-typography-font-weight-regular,400)}._0e8d87a42c1f75fa__body-sm{--_gcd-heading-font-size:var(--wpds-typography-font-size-sm,12px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-regular,400);--_gcd-p-font-size:var(--wpds-typography-font-size-sm,12px);--_gcd-p-line-height:var(--wpds-typography-line-height-xs,16px);font-size:var(--wpds-typography-font-size-sm,12px);line-height:var(--wpds-typography-line-height-xs,16px)}}}');var cQ={text:"_83ed8a8da5dd50ea__text","heading-2xl":"_14437cfb77831647__heading-2xl","heading-xl":"_3c78b7fa9b4072dd__heading-xl","heading-lg":"aa58f227716bcde2__heading-lg","heading-md":"fc4da56d8dfe52c4__heading-md","heading-sm":"a9b78c7c82e8dff7__heading-sm","body-xl":"_305ff559e52180d5__body-xl","body-lg":"ca1aa3fc2029e958__body-lg","body-md":"_131101940be12424__body-md","body-sm":"_0e8d87a42c1f75fa__body-sm"};typeof process>"u",mQ("d390e935a7","._6defc79820e382c6__button{box-sizing:var(--_gcd-button-box-sizing,border-box);font-family:var(--_gcd-button-font-family,inherit);font-size:var(--_gcd-button-font-size,inherit);font-weight:var(--_gcd-button-font-weight,inherit)}.d2cff2e5dea83bd1__input{box-sizing:var(--_gcd-input-box-sizing,border-box);font-family:var(--_gcd-input-font-family,inherit);font-size:var(--_gcd-input-font-size,inherit);font-weight:var(--_gcd-input-font-weight,inherit);margin:var(--_gcd-input-margin,0);&:is(textarea,[type=text],[type=password],[type=color],[type=date],[type=datetime],[type=datetime-local],[type=email],[type=month],[type=number],[type=search],[type=tel],[type=time],[type=url],[type=week]){background-color:var(--_gcd-input-background-color,transparent);border:var(--_gcd-input-border,none);border-radius:var(--_gcd-input-border-radius,0);box-shadow:var(--_gcd-input-box-shadow,0 0 0 transparent);color:var(--_gcd-input-color,var(--wpds-color-foreground-interactive-neutral,#1e1e1e));&:focus{border-color:var(--_gcd-input-border-color-focus,var(--wp-admin-theme-color));box-shadow:var(--_gcd-input-box-shadow-focus,none);outline:var(--_gcd-input-outline-focus,none)}&:disabled{background:var(--_gcd-input-background-disabled,transparent);border-color:var(--_gcd-input-border-color-disabled,transparent);box-shadow:var(--_gcd-input-box-shadow-disabled,none);color:var(--_gcd-input-color-disabled,var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d))}&::placeholder{color:var(--_gcd-input-placeholder-color,var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d))}}&:is(textarea,[type=text],[type=password],[type=date],[type=datetime],[type=datetime-local],[type=email],[type=month],[type=number],[type=search],[type=tel],[type=time],[type=url],[type=week]){line-height:var(--_gcd-input-line-height,inherit);min-height:var(--_gcd-input-min-height,auto);padding:var(--_gcd-input-padding,0)}}._547d86373d02e108__textarea{box-sizing:var(--_gcd-textarea-box-sizing,border-box);overflow:var(--_gcd-textarea-overflow,auto);resize:var(--_gcd-textarea-resize,block)}._8c15fd0ed9f28ba4__div{outline:var(--_gcd-div-outline,0 solid transparent)}p._43cec3e1eec1066d__p{font-size:var(--_gcd-p-font-size,13px);line-height:var(--_gcd-p-line-height,1.5);margin:var(--_gcd-p-margin,0)}:is(h1,h2,h3,h4,h5,h6).e97669c6d9a38497__heading{color:var(--_gcd-heading-color,var(--wpds-color-foreground-content-neutral,#1e1e1e));font-size:var(--_gcd-heading-font-size,inherit);font-weight:var(--_gcd-heading-font-weight,var(--wpds-typography-font-weight-medium,499));margin:var(--_gcd-heading-margin,0)}._2c0831b0499dbd6e__a,._2c0831b0499dbd6e__a:is(:hover,:focus,:active){border-radius:var(--_gcd-a-border-radius,0);box-shadow:var(--_gcd-a-box-shadow,none);color:var(--_gcd-a-color,inherit);outline:var(--_gcd-a-outline,0 solid transparent);transition:var(--_gcd-a-transition,none)}");var uQ={button:"_6defc79820e382c6__button",input:"d2cff2e5dea83bd1__input",textarea:"_547d86373d02e108__textarea",div:"_8c15fd0ed9f28ba4__div",p:"_43cec3e1eec1066d__p",heading:"e97669c6d9a38497__heading",a:"_2c0831b0499dbd6e__a"},_c=(0,dQ.forwardRef)(function({variant:t="body-md",render:r,className:o,...n},i){return ki({render:r,defaultTagName:"span",ref:i,props:jr(n,{className:Q(cQ.text,uQ.heading,uQ.p,cQ[t],o)})})});var vQ=a(T(),1),HV="data-wp-hash";function UV(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&aMe(document)),e.__wpStyleRuntime}function sMe(e,t){if(!e.head)return!1;for(let r of e.head.querySelectorAll(`style[${HV}]`))if(r.getAttribute(HV)===t)return!0;return!1}function gQ(e,t,r){if(!e.head)return;let o=UV(),n=o.injectedStyles.get(e);if(n||(n=new Set,o.injectedStyles.set(e,n)),n.has(t))return;if(sMe(e,t)){n.add(t);return}let i=e.createElement("style");i.setAttribute(HV,t),i.appendChild(e.createTextNode(r)),e.head.appendChild(i),n.add(t)}function aMe(e){let t=UV();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[r,o]of t.styles)gQ(e,r,o);return()=>{let r=t.documents.get(e);if(r!==void 0){if(r<=1){t.documents.delete(e);return}t.documents.set(e,r-1)}}}function lMe(e,t){let r=UV();r.styles.set(e,t);for(let o of r.documents.keys())gQ(o,e,t)}typeof process>"u",lMe("9db2873e7f","@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._96e6251aad1a6136__badge{border-radius:var(--wpds-border-radius-lg,8px);padding-block:var(--wpds-dimension-padding-xs,4px);padding-inline:var(--wpds-dimension-padding-sm,8px)}._99f7158cb520f750__is-high-intent{background-color:var(--wpds-color-background-surface-error,#f6e6e3);color:var(--wpds-color-foreground-content-error,#470000)}.c20ebef2365bc8b7__is-medium-intent{background-color:var(--wpds-color-background-surface-warning,#fde6be);color:var(--wpds-color-foreground-content-warning,#2e1900)}._365e1626c6202e52__is-low-intent{background-color:var(--wpds-color-background-surface-caution,#fee995);color:var(--wpds-color-foreground-content-caution,#281d00)}._33f8198127ddf4ef__is-stable-intent{background-color:var(--wpds-color-background-surface-success,#c6f7cd);color:var(--wpds-color-foreground-content-success,#002900)}._04c1aca8fc449412__is-informational-intent{background-color:var(--wpds-color-background-surface-info,#deebfa);color:var(--wpds-color-foreground-content-info,#001b4f)}._90726e69d495ec19__is-draft-intent{background-color:var(--wpds-color-background-surface-neutral-weak,#f4f4f4);color:var(--wpds-color-foreground-content-neutral,#1e1e1e)}._898f4a544993bd39__is-none-intent{background-color:var(--wpds-color-background-surface-neutral-strong,#fff);border:var(--wpds-border-width-xs,1px) solid var(--wpds-color-stroke-surface-neutral,#dbdbdb);color:var(--wpds-color-foreground-content-neutral,#1e1e1e);padding-block:calc(var(--wpds-dimension-padding-xs, 4px) - var(--wpds-border-width-xs, 1px));padding-inline:calc(var(--wpds-dimension-padding-sm, 8px) - var(--wpds-border-width-xs, 1px))}}}");var pQ={badge:"_96e6251aad1a6136__badge","is-high-intent":"_99f7158cb520f750__is-high-intent","is-medium-intent":"c20ebef2365bc8b7__is-medium-intent","is-low-intent":"_365e1626c6202e52__is-low-intent","is-stable-intent":"_33f8198127ddf4ef__is-stable-intent","is-informational-intent":"_04c1aca8fc449412__is-informational-intent","is-draft-intent":"_90726e69d495ec19__is-draft-intent","is-none-intent":"_898f4a544993bd39__is-none-intent"},WV=(0,hQ.forwardRef)(function({intent:t="none",className:r,...o},n){return(0,vQ.jsx)(_c,{ref:n,className:Q(pQ.badge,pQ[`is-${t}-intent`],r),...o,variant:"body-sm"})});var bQ=a(Um(),1),uR=a(H(),1),yQ=a(V(),1),SQ=a(T(),1),GV="data-wp-hash";function YV(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&uMe(document)),e.__wpStyleRuntime}function cMe(e,t){if(!e.head)return!1;for(let r of e.head.querySelectorAll(`style[${GV}]`))if(r.getAttribute(GV)===t)return!0;return!1}function wQ(e,t,r){if(!e.head)return;let o=YV(),n=o.injectedStyles.get(e);if(n||(n=new Set,o.injectedStyles.set(e,n)),n.has(t))return;if(cMe(e,t)){n.add(t);return}let i=e.createElement("style");i.setAttribute(GV,t),i.appendChild(e.createTextNode(r)),e.head.appendChild(i),n.add(t)}function uMe(e){let t=YV();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[r,o]of t.styles)wQ(e,r,o);return()=>{let r=t.documents.get(e);if(r!==void 0){if(r<=1){t.documents.delete(e);return}t.documents.set(e,r-1)}}}function dR(e,t){let r=YV();r.styles.set(e,t);for(let o of r.documents.keys())wQ(o,e,t)}typeof process>"u",dR("4c317b0736",'@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._97b0fc33c028be1a__button,.abbb272e2ce49bd6__is-unstyled{appearance:none;padding:0}._97b0fc33c028be1a__button{--wp-ui-button-font-weight:var(--wpds-typography-font-weight-medium,499);--wp-ui-button-background-color:var(--wpds-color-background-interactive-brand-strong,var(--wp-admin-theme-color,#3858e9));--wp-ui-button-background-color-active:var(--wpds-color-background-interactive-brand-strong-active,color-mix(in oklch,var(--wp-admin-theme-color,#3858e9) 93%,#000));--wp-ui-button-background-color-disabled:var(--wpds-color-background-interactive-brand-strong-disabled,#e6e6e6);--wp-ui-button-foreground-color:var(--wpds-color-foreground-interactive-brand-strong,#fff);--wp-ui-button-foreground-color-active:var(--wpds-color-foreground-interactive-brand-strong-active,#fff);--wp-ui-button-foreground-color-disabled:var(--wpds-color-foreground-interactive-brand-strong-disabled,#8d8d8d);--wp-ui-button-padding-block:var(--wpds-dimension-padding-xs,4px);--wp-ui-button-padding-inline:var(--wpds-dimension-padding-md,12px);--wp-ui-button-height:var(--wpds-dimension-size-lg,40px);--wp-ui-button-aspect-ratio:auto;--wp-ui-button-font-size:var(--wpds-typography-font-size-md,13px);--wp-ui-button-min-width:calc(4ch + var(--wp-ui-button-padding-inline)*2);--wp-ui-button-icon-margin:calc((var(--wpds-dimension-size-2xs, 16px) - var(--wpds-dimension-size-sm, 24px))/2);--wp-ui-button-border-color:var(--wp-ui-button-background-color);--wp-ui-button-border-color-active:var(--wp-ui-button-background-color-active);--wp-ui-button-border-color-disabled:var(--wp-ui-button-background-color-disabled);--_gcd-button-font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);--_gcd-button-font-size:var(--wp-ui-button-font-size);--_gcd-button-font-weight:var(--wp-ui-button-font-weight);align-items:center;aspect-ratio:var(--wp-ui-button-aspect-ratio);background-clip:padding-box;background-color:var(--wp-ui-button-background-color);border-color:var(--wp-ui-button-border-color);border-radius:var(--wpds-border-radius-sm,2px);border-style:solid;border-width:1px;color:var(--wp-ui-button-foreground-color);display:inline-flex;font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wp-ui-button-font-size);font-weight:var(--wp-ui-button-font-weight);gap:var(--wpds-dimension-gap-sm,8px);justify-content:center;line-height:var(--wpds-typography-line-height-sm,20px);max-width:100%;min-height:var(--wp-ui-button-height);min-width:var(--wp-ui-button-min-width);overflow-wrap:anywhere;padding-block:var(--wp-ui-button-padding-block);padding-inline:var(--wp-ui-button-padding-inline);position:relative;text-align:center;text-decoration:none;&:not([data-disabled]){cursor:var(--wpds-cursor-control,pointer)}@media not (prefers-reduced-motion){transition:color .1s ease-out;*{transition:opacity .1s ease-out}}&[href]{cursor:pointer}[href]{color:inherit;text-decoration:inherit}&:not([data-disabled]):is(:hover,:active,:focus){background-color:var(--wp-ui-button-background-color-active);border-color:var(--wp-ui-button-border-color-active);color:var(--wp-ui-button-foreground-color-active)}&[data-disabled]:not(._914b42f315c0e580__is-loading){background-color:var(--wp-ui-button-background-color-disabled);border-color:var(--wp-ui-button-border-color-disabled);color:var(--wp-ui-button-foreground-color-disabled);@media (forced-colors:active){border-bottom-color:GrayText;border-left-color:GrayText;border-right-color:GrayText;border-top-color:GrayText;color:GrayText}}&:before{aspect-ratio:1;border:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid;border-block-end-color:transparent;border-block-start-color:var(--wp-ui-button-foreground-color);border-inline-end-color:var(--wp-ui-button-foreground-color);border-inline-start-color:transparent;border-radius:50%;box-sizing:border-box;content:"";display:block;height:var(--wp-ui-button-font-size);inset-inline-start:50%;opacity:0;pointer-events:none;position:absolute;top:50%;transform:translate(-50%,-50%);@media not (prefers-reduced-motion){transition:opacity .1s ease-out}@media (forced-colors:active){border-block-end-style:none;border-bottom-color:ButtonText;border-inline-start-style:none;border-left-color:ButtonText;border-right-color:ButtonText;border-top-color:ButtonText}}}._908205475f9f2a92__is-small{--wp-ui-button-padding-block:0;--wp-ui-button-padding-inline:var(--wpds-dimension-padding-sm,8px);--wp-ui-button-height:var(--wpds-dimension-size-sm,24px)}._9f6fc6553aeb36fe__icon{margin:var(--wp-ui-button-icon-margin)}.dd460c965226cc77__is-brand{&._62d5a778b7b258ee__is-outline,&.ad0619a3217c6a5b__is-minimal{--wp-ui-button-foreground-color:var(--wpds-color-foreground-interactive-brand,var(--wp-admin-theme-color,#3858e9));--wp-ui-button-foreground-color-active:var(--wpds-color-foreground-interactive-brand-active,color-mix(in oklch,var(--wp-admin-theme-color,#3858e9) 52%,#000));--wp-ui-button-foreground-color-disabled:var(--wpds-color-foreground-interactive-brand-disabled,#8d8d8d)}&._62d5a778b7b258ee__is-outline{--wp-ui-button-background-color:var(--wpds-color-background-interactive-brand-weak,#0000);--wp-ui-button-background-color-active:var(--wpds-color-background-interactive-brand-weak-active,color-mix(in oklch,var(--wp-admin-theme-color,#3858e9) 12%,#fff));--wp-ui-button-background-color-disabled:var(--wpds-color-background-interactive-brand-weak-disabled,#0000);--wp-ui-button-border-color:var(--wpds-color-stroke-interactive-brand,var(--wp-admin-theme-color,#3858e9));--wp-ui-button-border-color-active:var(--wpds-color-stroke-interactive-brand-active,color-mix(in oklch,var(--wp-admin-theme-color,#3858e9) 85%,#000));--wp-ui-button-border-color-disabled:var(--wpds-color-stroke-interactive-brand-disabled,#dbdbdb)}&.ad0619a3217c6a5b__is-minimal{--wp-ui-button-background-color:var(--wpds-color-background-interactive-brand-weak,#0000);--wp-ui-button-background-color-active:var(--wpds-color-background-interactive-brand-weak-active,color-mix(in oklch,var(--wp-admin-theme-color,#3858e9) 12%,#fff));--wp-ui-button-background-color-disabled:var(--wpds-color-background-interactive-brand-weak-disabled,#0000)}}.e722a8f96726aa99__is-neutral{&.ad0619a3217c6a5b__is-minimal[aria-pressed=true],&.b50b3358c5fb4d0b__is-solid{--wp-ui-button-background-color:var(--wpds-color-background-interactive-neutral-strong,#2d2d2d);--wp-ui-button-background-color-active:var(--wpds-color-background-interactive-neutral-strong-active,#1e1e1e);--wp-ui-button-background-color-disabled:var(--wpds-color-background-interactive-neutral-strong-disabled,#e6e6e6);--wp-ui-button-foreground-color:var(--wpds-color-foreground-interactive-neutral-strong,#f0f0f0);--wp-ui-button-foreground-color-active:var(--wpds-color-foreground-interactive-neutral-strong-active,#f0f0f0);--wp-ui-button-foreground-color-disabled:var(--wpds-color-foreground-interactive-neutral-strong-disabled,#8d8d8d)}&._62d5a778b7b258ee__is-outline,&.ad0619a3217c6a5b__is-minimal:not([aria-pressed=true]){--wp-ui-button-foreground-color:var(--wpds-color-foreground-interactive-neutral,#1e1e1e);--wp-ui-button-foreground-color-active:var(--wpds-color-foreground-interactive-neutral-active,#1e1e1e);--wp-ui-button-foreground-color-disabled:var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d)}&._62d5a778b7b258ee__is-outline{--wp-ui-button-background-color:var(--wpds-color-background-interactive-neutral-weak,#0000);--wp-ui-button-background-color-active:var(--wpds-color-background-interactive-neutral-weak-active,#ededed);--wp-ui-button-background-color-disabled:var(--wpds-color-background-interactive-neutral-weak-disabled,#0000);--wp-ui-button-border-color:var(--wpds-color-stroke-interactive-neutral,#8d8d8d);--wp-ui-button-border-color-active:var(--wpds-color-stroke-interactive-neutral-active,#6e6e6e);--wp-ui-button-border-color-disabled:var(--wpds-color-stroke-interactive-neutral-disabled,#dbdbdb)}&.ad0619a3217c6a5b__is-minimal:not([aria-pressed=true]){--wp-ui-button-background-color:var(--wpds-color-background-interactive-neutral-weak,#0000);--wp-ui-button-background-color-active:var(--wpds-color-background-interactive-neutral-weak-active,#ededed);--wp-ui-button-background-color-disabled:var(--wpds-color-background-interactive-neutral-weak-disabled,#0000)}}.abbb272e2ce49bd6__is-unstyled{background:none;border:none;min-width:unset}.cf59cf1b69629838__is-compact{--wp-ui-button-height:var(--wpds-dimension-size-md,32px)}._914b42f315c0e580__is-loading:not(.abbb272e2ce49bd6__is-unstyled){color:transparent;&:not([data-disabled]):is(:hover,:active,:focus){color:transparent}@media (forced-colors:active){color:ButtonFace}*{opacity:0}&:before{opacity:1;transition-delay:.05s;@media not (prefers-reduced-motion){animation:_5a1d53da6f830c8d__loading-animation 1s linear infinite}}}}@keyframes _5a1d53da6f830c8d__loading-animation{0%{transform:translate(-50%,-50%) rotate(0deg)}to{transform:translate(-50%,-50%) rotate(1turn)}}}');var i1={button:"_97b0fc33c028be1a__button","is-unstyled":"abbb272e2ce49bd6__is-unstyled","is-loading":"_914b42f315c0e580__is-loading","is-small":"_908205475f9f2a92__is-small",icon:"_9f6fc6553aeb36fe__icon","is-brand":"dd460c965226cc77__is-brand","is-outline":"_62d5a778b7b258ee__is-outline","is-minimal":"ad0619a3217c6a5b__is-minimal","is-neutral":"e722a8f96726aa99__is-neutral","is-solid":"b50b3358c5fb4d0b__is-solid","is-compact":"cf59cf1b69629838__is-compact","loading-animation":"_5a1d53da6f830c8d__loading-animation"};typeof process>"u",dR("10f3806643","@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._336cd3e4e743482f__box-sizing{box-sizing:border-box;*,:after,:before{box-sizing:inherit}}}}");var dMe={"box-sizing":"_336cd3e4e743482f__box-sizing"};typeof process>"u",dR("5f8e7aa0bc","@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._08e8a2e44959f892__outset-ring--focus:focus,._970d04df7376df67__outset-ring--focus-within-except-active:focus-within:not(:has(:active)),.c5cb3ee4bddaa8e4__outset-ring--focus-within-visible:focus-within:has(:focus-visible),.cd83dfc2126a0846__outset-ring--focus-within:focus-within,.d0541bc9dd9dc7b6__outset-ring--focus-visible:focus-visible,.e25b2bdd7aa21721__outset-ring--focus-except-active:focus:not(:active),:focus-visible .ecadb9e080e2dfa5__outset-ring--focus-parent-visible{--_gcd-a-outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9));--_gcd-div-outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9));outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9));outline-offset:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px))}}}");var fMe={"outset-ring--focus":"_08e8a2e44959f892__outset-ring--focus","outset-ring--focus-except-active":"e25b2bdd7aa21721__outset-ring--focus-except-active","outset-ring--focus-visible":"d0541bc9dd9dc7b6__outset-ring--focus-visible","outset-ring--focus-within":"cd83dfc2126a0846__outset-ring--focus-within","outset-ring--focus-within-except-active":"_970d04df7376df67__outset-ring--focus-within-except-active","outset-ring--focus-within-visible":"c5cb3ee4bddaa8e4__outset-ring--focus-within-visible","outset-ring--focus-parent-visible":"ecadb9e080e2dfa5__outset-ring--focus-parent-visible"};typeof process>"u",dR("d390e935a7","._6defc79820e382c6__button{box-sizing:var(--_gcd-button-box-sizing,border-box);font-family:var(--_gcd-button-font-family,inherit);font-size:var(--_gcd-button-font-size,inherit);font-weight:var(--_gcd-button-font-weight,inherit)}.d2cff2e5dea83bd1__input{box-sizing:var(--_gcd-input-box-sizing,border-box);font-family:var(--_gcd-input-font-family,inherit);font-size:var(--_gcd-input-font-size,inherit);font-weight:var(--_gcd-input-font-weight,inherit);margin:var(--_gcd-input-margin,0);&:is(textarea,[type=text],[type=password],[type=color],[type=date],[type=datetime],[type=datetime-local],[type=email],[type=month],[type=number],[type=search],[type=tel],[type=time],[type=url],[type=week]){background-color:var(--_gcd-input-background-color,transparent);border:var(--_gcd-input-border,none);border-radius:var(--_gcd-input-border-radius,0);box-shadow:var(--_gcd-input-box-shadow,0 0 0 transparent);color:var(--_gcd-input-color,var(--wpds-color-foreground-interactive-neutral,#1e1e1e));&:focus{border-color:var(--_gcd-input-border-color-focus,var(--wp-admin-theme-color));box-shadow:var(--_gcd-input-box-shadow-focus,none);outline:var(--_gcd-input-outline-focus,none)}&:disabled{background:var(--_gcd-input-background-disabled,transparent);border-color:var(--_gcd-input-border-color-disabled,transparent);box-shadow:var(--_gcd-input-box-shadow-disabled,none);color:var(--_gcd-input-color-disabled,var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d))}&::placeholder{color:var(--_gcd-input-placeholder-color,var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d))}}&:is(textarea,[type=text],[type=password],[type=date],[type=datetime],[type=datetime-local],[type=email],[type=month],[type=number],[type=search],[type=tel],[type=time],[type=url],[type=week]){line-height:var(--_gcd-input-line-height,inherit);min-height:var(--_gcd-input-min-height,auto);padding:var(--_gcd-input-padding,0)}}._547d86373d02e108__textarea{box-sizing:var(--_gcd-textarea-box-sizing,border-box);overflow:var(--_gcd-textarea-overflow,auto);resize:var(--_gcd-textarea-resize,block)}._8c15fd0ed9f28ba4__div{outline:var(--_gcd-div-outline,0 solid transparent)}p._43cec3e1eec1066d__p{font-size:var(--_gcd-p-font-size,13px);line-height:var(--_gcd-p-line-height,1.5);margin:var(--_gcd-p-margin,0)}:is(h1,h2,h3,h4,h5,h6).e97669c6d9a38497__heading{color:var(--_gcd-heading-color,var(--wpds-color-foreground-content-neutral,#1e1e1e));font-size:var(--_gcd-heading-font-size,inherit);font-weight:var(--_gcd-heading-font-weight,var(--wpds-typography-font-weight-medium,499));margin:var(--_gcd-heading-margin,0)}._2c0831b0499dbd6e__a,._2c0831b0499dbd6e__a:is(:hover,:focus,:active){border-radius:var(--_gcd-a-border-radius,0);box-shadow:var(--_gcd-a-box-shadow,none);color:var(--_gcd-a-color,inherit);outline:var(--_gcd-a-outline,0 solid transparent);transition:var(--_gcd-a-transition,none)}");var mMe={button:"_6defc79820e382c6__button",input:"d2cff2e5dea83bd1__input",textarea:"_547d86373d02e108__textarea",div:"_8c15fd0ed9f28ba4__div",p:"_43cec3e1eec1066d__p",heading:"e97669c6d9a38497__heading",a:"_2c0831b0499dbd6e__a"},_Q=(0,uR.forwardRef)(function({tone:t="brand",variant:r="solid",size:o="default",className:n,focusableWhenDisabled:i=!0,disabled:s,loading:l,loadingAnnouncement:c=(0,yQ.__)("Loading"),children:u,...d},f){let m=Q(mMe.button,dMe["box-sizing"],fMe["outset-ring--focus-except-active"],r!=="unstyled"&&i1.button,i1[`is-${t}`],i1[`is-${r}`],i1[`is-${o}`],l&&i1["is-loading"],n);return(0,uR.useEffect)(()=>{l&&c&&(0,bQ.speak)(c)},[l,c]),(0,SQ.jsx)(AV,{ref:f,className:m,focusableWhenDisabled:i,disabled:s??l,...d,children:u})});var EQ=a(H(),1);var xQ=a(H(),1),CQ=a(be(),1),TQ=a(T(),1),zg=(0,xQ.forwardRef)(function({icon:t,size:r=24,...o},n){return(0,TQ.jsx)(CQ.SVG,{ref:n,...t.props,...o,width:r,height:r})});var kQ=a(T(),1),qV="data-wp-hash";function KV(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&hMe(document)),e.__wpStyleRuntime}function pMe(e,t){if(!e.head)return!1;for(let r of e.head.querySelectorAll(`style[${qV}]`))if(r.getAttribute(qV)===t)return!0;return!1}function PQ(e,t,r){if(!e.head)return;let o=KV(),n=o.injectedStyles.get(e);if(n||(n=new Set,o.injectedStyles.set(e,n)),n.has(t))return;if(pMe(e,t)){n.add(t);return}let i=e.createElement("style");i.setAttribute(qV,t),i.appendChild(e.createTextNode(r)),e.head.appendChild(i),n.add(t)}function hMe(e){let t=KV();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[r,o]of t.styles)PQ(e,r,o);return()=>{let r=t.documents.get(e);if(r!==void 0){if(r<=1){t.documents.delete(e);return}t.documents.set(e,r-1)}}}function gMe(e,t){let r=KV();r.styles.set(e,t);for(let o of r.documents.keys())PQ(o,e,t)}typeof process>"u",gMe("4c317b0736",'@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._97b0fc33c028be1a__button,.abbb272e2ce49bd6__is-unstyled{appearance:none;padding:0}._97b0fc33c028be1a__button{--wp-ui-button-font-weight:var(--wpds-typography-font-weight-medium,499);--wp-ui-button-background-color:var(--wpds-color-background-interactive-brand-strong,var(--wp-admin-theme-color,#3858e9));--wp-ui-button-background-color-active:var(--wpds-color-background-interactive-brand-strong-active,color-mix(in oklch,var(--wp-admin-theme-color,#3858e9) 93%,#000));--wp-ui-button-background-color-disabled:var(--wpds-color-background-interactive-brand-strong-disabled,#e6e6e6);--wp-ui-button-foreground-color:var(--wpds-color-foreground-interactive-brand-strong,#fff);--wp-ui-button-foreground-color-active:var(--wpds-color-foreground-interactive-brand-strong-active,#fff);--wp-ui-button-foreground-color-disabled:var(--wpds-color-foreground-interactive-brand-strong-disabled,#8d8d8d);--wp-ui-button-padding-block:var(--wpds-dimension-padding-xs,4px);--wp-ui-button-padding-inline:var(--wpds-dimension-padding-md,12px);--wp-ui-button-height:var(--wpds-dimension-size-lg,40px);--wp-ui-button-aspect-ratio:auto;--wp-ui-button-font-size:var(--wpds-typography-font-size-md,13px);--wp-ui-button-min-width:calc(4ch + var(--wp-ui-button-padding-inline)*2);--wp-ui-button-icon-margin:calc((var(--wpds-dimension-size-2xs, 16px) - var(--wpds-dimension-size-sm, 24px))/2);--wp-ui-button-border-color:var(--wp-ui-button-background-color);--wp-ui-button-border-color-active:var(--wp-ui-button-background-color-active);--wp-ui-button-border-color-disabled:var(--wp-ui-button-background-color-disabled);--_gcd-button-font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);--_gcd-button-font-size:var(--wp-ui-button-font-size);--_gcd-button-font-weight:var(--wp-ui-button-font-weight);align-items:center;aspect-ratio:var(--wp-ui-button-aspect-ratio);background-clip:padding-box;background-color:var(--wp-ui-button-background-color);border-color:var(--wp-ui-button-border-color);border-radius:var(--wpds-border-radius-sm,2px);border-style:solid;border-width:1px;color:var(--wp-ui-button-foreground-color);display:inline-flex;font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wp-ui-button-font-size);font-weight:var(--wp-ui-button-font-weight);gap:var(--wpds-dimension-gap-sm,8px);justify-content:center;line-height:var(--wpds-typography-line-height-sm,20px);max-width:100%;min-height:var(--wp-ui-button-height);min-width:var(--wp-ui-button-min-width);overflow-wrap:anywhere;padding-block:var(--wp-ui-button-padding-block);padding-inline:var(--wp-ui-button-padding-inline);position:relative;text-align:center;text-decoration:none;&:not([data-disabled]){cursor:var(--wpds-cursor-control,pointer)}@media not (prefers-reduced-motion){transition:color .1s ease-out;*{transition:opacity .1s ease-out}}&[href]{cursor:pointer}[href]{color:inherit;text-decoration:inherit}&:not([data-disabled]):is(:hover,:active,:focus){background-color:var(--wp-ui-button-background-color-active);border-color:var(--wp-ui-button-border-color-active);color:var(--wp-ui-button-foreground-color-active)}&[data-disabled]:not(._914b42f315c0e580__is-loading){background-color:var(--wp-ui-button-background-color-disabled);border-color:var(--wp-ui-button-border-color-disabled);color:var(--wp-ui-button-foreground-color-disabled);@media (forced-colors:active){border-bottom-color:GrayText;border-left-color:GrayText;border-right-color:GrayText;border-top-color:GrayText;color:GrayText}}&:before{aspect-ratio:1;border:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid;border-block-end-color:transparent;border-block-start-color:var(--wp-ui-button-foreground-color);border-inline-end-color:var(--wp-ui-button-foreground-color);border-inline-start-color:transparent;border-radius:50%;box-sizing:border-box;content:"";display:block;height:var(--wp-ui-button-font-size);inset-inline-start:50%;opacity:0;pointer-events:none;position:absolute;top:50%;transform:translate(-50%,-50%);@media not (prefers-reduced-motion){transition:opacity .1s ease-out}@media (forced-colors:active){border-block-end-style:none;border-bottom-color:ButtonText;border-inline-start-style:none;border-left-color:ButtonText;border-right-color:ButtonText;border-top-color:ButtonText}}}._908205475f9f2a92__is-small{--wp-ui-button-padding-block:0;--wp-ui-button-padding-inline:var(--wpds-dimension-padding-sm,8px);--wp-ui-button-height:var(--wpds-dimension-size-sm,24px)}._9f6fc6553aeb36fe__icon{margin:var(--wp-ui-button-icon-margin)}.dd460c965226cc77__is-brand{&._62d5a778b7b258ee__is-outline,&.ad0619a3217c6a5b__is-minimal{--wp-ui-button-foreground-color:var(--wpds-color-foreground-interactive-brand,var(--wp-admin-theme-color,#3858e9));--wp-ui-button-foreground-color-active:var(--wpds-color-foreground-interactive-brand-active,color-mix(in oklch,var(--wp-admin-theme-color,#3858e9) 52%,#000));--wp-ui-button-foreground-color-disabled:var(--wpds-color-foreground-interactive-brand-disabled,#8d8d8d)}&._62d5a778b7b258ee__is-outline{--wp-ui-button-background-color:var(--wpds-color-background-interactive-brand-weak,#0000);--wp-ui-button-background-color-active:var(--wpds-color-background-interactive-brand-weak-active,color-mix(in oklch,var(--wp-admin-theme-color,#3858e9) 12%,#fff));--wp-ui-button-background-color-disabled:var(--wpds-color-background-interactive-brand-weak-disabled,#0000);--wp-ui-button-border-color:var(--wpds-color-stroke-interactive-brand,var(--wp-admin-theme-color,#3858e9));--wp-ui-button-border-color-active:var(--wpds-color-stroke-interactive-brand-active,color-mix(in oklch,var(--wp-admin-theme-color,#3858e9) 85%,#000));--wp-ui-button-border-color-disabled:var(--wpds-color-stroke-interactive-brand-disabled,#dbdbdb)}&.ad0619a3217c6a5b__is-minimal{--wp-ui-button-background-color:var(--wpds-color-background-interactive-brand-weak,#0000);--wp-ui-button-background-color-active:var(--wpds-color-background-interactive-brand-weak-active,color-mix(in oklch,var(--wp-admin-theme-color,#3858e9) 12%,#fff));--wp-ui-button-background-color-disabled:var(--wpds-color-background-interactive-brand-weak-disabled,#0000)}}.e722a8f96726aa99__is-neutral{&.ad0619a3217c6a5b__is-minimal[aria-pressed=true],&.b50b3358c5fb4d0b__is-solid{--wp-ui-button-background-color:var(--wpds-color-background-interactive-neutral-strong,#2d2d2d);--wp-ui-button-background-color-active:var(--wpds-color-background-interactive-neutral-strong-active,#1e1e1e);--wp-ui-button-background-color-disabled:var(--wpds-color-background-interactive-neutral-strong-disabled,#e6e6e6);--wp-ui-button-foreground-color:var(--wpds-color-foreground-interactive-neutral-strong,#f0f0f0);--wp-ui-button-foreground-color-active:var(--wpds-color-foreground-interactive-neutral-strong-active,#f0f0f0);--wp-ui-button-foreground-color-disabled:var(--wpds-color-foreground-interactive-neutral-strong-disabled,#8d8d8d)}&._62d5a778b7b258ee__is-outline,&.ad0619a3217c6a5b__is-minimal:not([aria-pressed=true]){--wp-ui-button-foreground-color:var(--wpds-color-foreground-interactive-neutral,#1e1e1e);--wp-ui-button-foreground-color-active:var(--wpds-color-foreground-interactive-neutral-active,#1e1e1e);--wp-ui-button-foreground-color-disabled:var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d)}&._62d5a778b7b258ee__is-outline{--wp-ui-button-background-color:var(--wpds-color-background-interactive-neutral-weak,#0000);--wp-ui-button-background-color-active:var(--wpds-color-background-interactive-neutral-weak-active,#ededed);--wp-ui-button-background-color-disabled:var(--wpds-color-background-interactive-neutral-weak-disabled,#0000);--wp-ui-button-border-color:var(--wpds-color-stroke-interactive-neutral,#8d8d8d);--wp-ui-button-border-color-active:var(--wpds-color-stroke-interactive-neutral-active,#6e6e6e);--wp-ui-button-border-color-disabled:var(--wpds-color-stroke-interactive-neutral-disabled,#dbdbdb)}&.ad0619a3217c6a5b__is-minimal:not([aria-pressed=true]){--wp-ui-button-background-color:var(--wpds-color-background-interactive-neutral-weak,#0000);--wp-ui-button-background-color-active:var(--wpds-color-background-interactive-neutral-weak-active,#ededed);--wp-ui-button-background-color-disabled:var(--wpds-color-background-interactive-neutral-weak-disabled,#0000)}}.abbb272e2ce49bd6__is-unstyled{background:none;border:none;min-width:unset}.cf59cf1b69629838__is-compact{--wp-ui-button-height:var(--wpds-dimension-size-md,32px)}._914b42f315c0e580__is-loading:not(.abbb272e2ce49bd6__is-unstyled){color:transparent;&:not([data-disabled]):is(:hover,:active,:focus){color:transparent}@media (forced-colors:active){color:ButtonFace}*{opacity:0}&:before{opacity:1;transition-delay:.05s;@media not (prefers-reduced-motion){animation:_5a1d53da6f830c8d__loading-animation 1s linear infinite}}}}@keyframes _5a1d53da6f830c8d__loading-animation{0%{transform:translate(-50%,-50%) rotate(0deg)}to{transform:translate(-50%,-50%) rotate(1turn)}}}');var vMe={button:"_97b0fc33c028be1a__button","is-unstyled":"abbb272e2ce49bd6__is-unstyled","is-loading":"_914b42f315c0e580__is-loading","is-small":"_908205475f9f2a92__is-small",icon:"_9f6fc6553aeb36fe__icon","is-brand":"dd460c965226cc77__is-brand","is-outline":"_62d5a778b7b258ee__is-outline","is-minimal":"ad0619a3217c6a5b__is-minimal","is-neutral":"e722a8f96726aa99__is-neutral","is-solid":"b50b3358c5fb4d0b__is-solid","is-compact":"cf59cf1b69629838__is-compact","loading-animation":"_5a1d53da6f830c8d__loading-animation"},ZV=(0,EQ.forwardRef)(function({className:t,icon:r,...o},n){return(0,kQ.jsx)(zg,{ref:n,icon:r,className:Q(vMe.icon,t),size:24,...o})});ZV.displayName="Button.Icon";var RQ=Object.assign(_Q,{Icon:ZV});var Eu={};Rn(Eu,{Content:()=>pR,FullBleed:()=>VQ,Header:()=>mR,Root:()=>fR,Title:()=>zQ});var AQ=a(H(),1),XV="data-wp-hash";function QV(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&yMe(document)),e.__wpStyleRuntime}function bMe(e,t){if(!e.head)return!1;for(let r of e.head.querySelectorAll(`style[${XV}]`))if(r.getAttribute(XV)===t)return!0;return!1}function IQ(e,t,r){if(!e.head)return;let o=QV(),n=o.injectedStyles.get(e);if(n||(n=new Set,o.injectedStyles.set(e,n)),n.has(t))return;if(bMe(e,t)){n.add(t);return}let i=e.createElement("style");i.setAttribute(XV,t),i.appendChild(e.createTextNode(r)),e.head.appendChild(i),n.add(t)}function yMe(e){let t=QV();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[r,o]of t.styles)IQ(e,r,o);return()=>{let r=t.documents.get(e);if(r!==void 0){if(r<=1){t.documents.delete(e);return}t.documents.set(e,r-1)}}}function OQ(e,t){let r=QV();r.styles.set(e,t);for(let o of r.documents.keys())IQ(o,e,t)}typeof process>"u",OQ("10f3806643","@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._336cd3e4e743482f__box-sizing{box-sizing:border-box;*,:after,:before{box-sizing:inherit}}}}");var wMe={"box-sizing":"_336cd3e4e743482f__box-sizing"};typeof process>"u",OQ("5d38cbdd27","@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._02872bf298eadc43__root{--wp-ui-card-padding:var(--wpds-dimension-padding-2xl,24px);--wp-ui-card-header-content-gap:var(--wpds-dimension-gap-xl,24px);--wp-ui-card-header-content-margin:calc(var(--wp-ui-card-header-content-gap) - var(--wp-ui-card-padding));background-color:var(--wpds-color-background-surface-neutral-strong,#fff);border:1px solid var(--wpds-color-stroke-surface-neutral-weak,#f0f0f0);border-radius:var(--wpds-border-radius-lg,8px);color:var(--wpds-color-foreground-content-neutral,#1e1e1e);display:flex;flex-direction:column;overflow:clip}._5dffdaf2a6e669ac__content,.bbccc92e6ba5662d__header{padding:var(--wp-ui-card-padding);&:not(:first-child):not(:last-child){padding-block-end:0}}.bbccc92e6ba5662d__header+._5dffdaf2a6e669ac__content{margin-block-start:var(--wp-ui-card-header-content-margin);padding-block-start:0}.c1fa192587e1b4a6__fullbleed{margin-inline:calc(var(--wp-ui-card-padding)*-1);width:calc(100% + var(--wp-ui-card-padding)*2)}._02872bf298eadc43__root>:is(.bbccc92e6ba5662d__header,._5dffdaf2a6e669ac__content):first-child>.c1fa192587e1b4a6__fullbleed:first-child{margin-block-start:calc(var(--wp-ui-card-padding)*-1)}:is(.bbccc92e6ba5662d__header,._5dffdaf2a6e669ac__content):last-child>.c1fa192587e1b4a6__fullbleed:last-child{margin-block-end:calc(var(--wp-ui-card-padding)*-1)}}}");var SMe={root:"_02872bf298eadc43__root",header:"bbccc92e6ba5662d__header",content:"_5dffdaf2a6e669ac__content",fullbleed:"c1fa192587e1b4a6__fullbleed"},fR=(0,AQ.forwardRef)(function({render:t,...r},o){let n=Q(SMe.root,wMe["box-sizing"]);return ki({defaultTagName:"div",render:t,ref:o,props:jr({className:n},r)})});var NQ=a(H(),1),JV="data-wp-hash";function $V(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&xMe(document)),e.__wpStyleRuntime}function _Me(e,t){if(!e.head)return!1;for(let r of e.head.querySelectorAll(`style[${JV}]`))if(r.getAttribute(JV)===t)return!0;return!1}function MQ(e,t,r){if(!e.head)return;let o=$V(),n=o.injectedStyles.get(e);if(n||(n=new Set,o.injectedStyles.set(e,n)),n.has(t))return;if(_Me(e,t)){n.add(t);return}let i=e.createElement("style");i.setAttribute(JV,t),i.appendChild(e.createTextNode(r)),e.head.appendChild(i),n.add(t)}function xMe(e){let t=$V();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[r,o]of t.styles)MQ(e,r,o);return()=>{let r=t.documents.get(e);if(r!==void 0){if(r<=1){t.documents.delete(e);return}t.documents.set(e,r-1)}}}function CMe(e,t){let r=$V();r.styles.set(e,t);for(let o of r.documents.keys())MQ(o,e,t)}typeof process>"u",CMe("5d38cbdd27","@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._02872bf298eadc43__root{--wp-ui-card-padding:var(--wpds-dimension-padding-2xl,24px);--wp-ui-card-header-content-gap:var(--wpds-dimension-gap-xl,24px);--wp-ui-card-header-content-margin:calc(var(--wp-ui-card-header-content-gap) - var(--wp-ui-card-padding));background-color:var(--wpds-color-background-surface-neutral-strong,#fff);border:1px solid var(--wpds-color-stroke-surface-neutral-weak,#f0f0f0);border-radius:var(--wpds-border-radius-lg,8px);color:var(--wpds-color-foreground-content-neutral,#1e1e1e);display:flex;flex-direction:column;overflow:clip}._5dffdaf2a6e669ac__content,.bbccc92e6ba5662d__header{padding:var(--wp-ui-card-padding);&:not(:first-child):not(:last-child){padding-block-end:0}}.bbccc92e6ba5662d__header+._5dffdaf2a6e669ac__content{margin-block-start:var(--wp-ui-card-header-content-margin);padding-block-start:0}.c1fa192587e1b4a6__fullbleed{margin-inline:calc(var(--wp-ui-card-padding)*-1);width:calc(100% + var(--wp-ui-card-padding)*2)}._02872bf298eadc43__root>:is(.bbccc92e6ba5662d__header,._5dffdaf2a6e669ac__content):first-child>.c1fa192587e1b4a6__fullbleed:first-child{margin-block-start:calc(var(--wp-ui-card-padding)*-1)}:is(.bbccc92e6ba5662d__header,._5dffdaf2a6e669ac__content):last-child>.c1fa192587e1b4a6__fullbleed:last-child{margin-block-end:calc(var(--wp-ui-card-padding)*-1)}}}");var TMe={root:"_02872bf298eadc43__root",header:"bbccc92e6ba5662d__header",content:"_5dffdaf2a6e669ac__content",fullbleed:"c1fa192587e1b4a6__fullbleed"},mR=(0,NQ.forwardRef)(function({render:t,...r},o){return ki({defaultTagName:"div",render:t,ref:o,props:jr({className:TMe.header},r)})});var FQ=a(H(),1),e8="data-wp-hash";function t8(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&PMe(document)),e.__wpStyleRuntime}function EMe(e,t){if(!e.head)return!1;for(let r of e.head.querySelectorAll(`style[${e8}]`))if(r.getAttribute(e8)===t)return!0;return!1}function DQ(e,t,r){if(!e.head)return;let o=t8(),n=o.injectedStyles.get(e);if(n||(n=new Set,o.injectedStyles.set(e,n)),n.has(t))return;if(EMe(e,t)){n.add(t);return}let i=e.createElement("style");i.setAttribute(e8,t),i.appendChild(e.createTextNode(r)),e.head.appendChild(i),n.add(t)}function PMe(e){let t=t8();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[r,o]of t.styles)DQ(e,r,o);return()=>{let r=t.documents.get(e);if(r!==void 0){if(r<=1){t.documents.delete(e);return}t.documents.set(e,r-1)}}}function kMe(e,t){let r=t8();r.styles.set(e,t);for(let o of r.documents.keys())DQ(o,e,t)}typeof process>"u",kMe("5d38cbdd27","@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._02872bf298eadc43__root{--wp-ui-card-padding:var(--wpds-dimension-padding-2xl,24px);--wp-ui-card-header-content-gap:var(--wpds-dimension-gap-xl,24px);--wp-ui-card-header-content-margin:calc(var(--wp-ui-card-header-content-gap) - var(--wp-ui-card-padding));background-color:var(--wpds-color-background-surface-neutral-strong,#fff);border:1px solid var(--wpds-color-stroke-surface-neutral-weak,#f0f0f0);border-radius:var(--wpds-border-radius-lg,8px);color:var(--wpds-color-foreground-content-neutral,#1e1e1e);display:flex;flex-direction:column;overflow:clip}._5dffdaf2a6e669ac__content,.bbccc92e6ba5662d__header{padding:var(--wp-ui-card-padding);&:not(:first-child):not(:last-child){padding-block-end:0}}.bbccc92e6ba5662d__header+._5dffdaf2a6e669ac__content{margin-block-start:var(--wp-ui-card-header-content-margin);padding-block-start:0}.c1fa192587e1b4a6__fullbleed{margin-inline:calc(var(--wp-ui-card-padding)*-1);width:calc(100% + var(--wp-ui-card-padding)*2)}._02872bf298eadc43__root>:is(.bbccc92e6ba5662d__header,._5dffdaf2a6e669ac__content):first-child>.c1fa192587e1b4a6__fullbleed:first-child{margin-block-start:calc(var(--wp-ui-card-padding)*-1)}:is(.bbccc92e6ba5662d__header,._5dffdaf2a6e669ac__content):last-child>.c1fa192587e1b4a6__fullbleed:last-child{margin-block-end:calc(var(--wp-ui-card-padding)*-1)}}}");var RMe={root:"_02872bf298eadc43__root",header:"bbccc92e6ba5662d__header",content:"_5dffdaf2a6e669ac__content",fullbleed:"c1fa192587e1b4a6__fullbleed"},pR=(0,FQ.forwardRef)(function({render:t,...r},o){return ki({defaultTagName:"div",render:t,ref:o,props:jr({className:RMe.content},r)})});var LQ=a(H(),1),r8="data-wp-hash";function o8(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&IMe(document)),e.__wpStyleRuntime}function AMe(e,t){if(!e.head)return!1;for(let r of e.head.querySelectorAll(`style[${r8}]`))if(r.getAttribute(r8)===t)return!0;return!1}function BQ(e,t,r){if(!e.head)return;let o=o8(),n=o.injectedStyles.get(e);if(n||(n=new Set,o.injectedStyles.set(e,n)),n.has(t))return;if(AMe(e,t)){n.add(t);return}let i=e.createElement("style");i.setAttribute(r8,t),i.appendChild(e.createTextNode(r)),e.head.appendChild(i),n.add(t)}function IMe(e){let t=o8();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[r,o]of t.styles)BQ(e,r,o);return()=>{let r=t.documents.get(e);if(r!==void 0){if(r<=1){t.documents.delete(e);return}t.documents.set(e,r-1)}}}function OMe(e,t){let r=o8();r.styles.set(e,t);for(let o of r.documents.keys())BQ(o,e,t)}typeof process>"u",OMe("5d38cbdd27","@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._02872bf298eadc43__root{--wp-ui-card-padding:var(--wpds-dimension-padding-2xl,24px);--wp-ui-card-header-content-gap:var(--wpds-dimension-gap-xl,24px);--wp-ui-card-header-content-margin:calc(var(--wp-ui-card-header-content-gap) - var(--wp-ui-card-padding));background-color:var(--wpds-color-background-surface-neutral-strong,#fff);border:1px solid var(--wpds-color-stroke-surface-neutral-weak,#f0f0f0);border-radius:var(--wpds-border-radius-lg,8px);color:var(--wpds-color-foreground-content-neutral,#1e1e1e);display:flex;flex-direction:column;overflow:clip}._5dffdaf2a6e669ac__content,.bbccc92e6ba5662d__header{padding:var(--wp-ui-card-padding);&:not(:first-child):not(:last-child){padding-block-end:0}}.bbccc92e6ba5662d__header+._5dffdaf2a6e669ac__content{margin-block-start:var(--wp-ui-card-header-content-margin);padding-block-start:0}.c1fa192587e1b4a6__fullbleed{margin-inline:calc(var(--wp-ui-card-padding)*-1);width:calc(100% + var(--wp-ui-card-padding)*2)}._02872bf298eadc43__root>:is(.bbccc92e6ba5662d__header,._5dffdaf2a6e669ac__content):first-child>.c1fa192587e1b4a6__fullbleed:first-child{margin-block-start:calc(var(--wp-ui-card-padding)*-1)}:is(.bbccc92e6ba5662d__header,._5dffdaf2a6e669ac__content):last-child>.c1fa192587e1b4a6__fullbleed:last-child{margin-block-end:calc(var(--wp-ui-card-padding)*-1)}}}");var NMe={root:"_02872bf298eadc43__root",header:"bbccc92e6ba5662d__header",content:"_5dffdaf2a6e669ac__content",fullbleed:"c1fa192587e1b4a6__fullbleed"},VQ=(0,LQ.forwardRef)(function({render:t,...r},o){return ki({defaultTagName:"div",render:t,ref:o,props:jr({className:NMe.fullbleed},r)})});var jQ=a(H(),1);var n8=a(T(),1),MMe=(0,n8.jsx)("div",{}),zQ=(0,jQ.forwardRef)(function({render:t=MMe,children:r,...o},n){return(0,n8.jsx)(_c,{ref:n,variant:"heading-lg",render:t,...o,children:r})});var HQ=a(H(),1),UQ=a(T(),1),i8=(0,HQ.forwardRef)(function(t,r){return(0,UQ.jsx)(tp.Panel,{ref:r,...t})});var WQ=a(H(),1),GQ=a(T(),1),s8=(0,WQ.forwardRef)(function(t,r){return(0,GQ.jsx)(tp.Root,{ref:r,...t})});var YQ=a(H(),1),qQ=a(T(),1),a8=(0,YQ.forwardRef)(function(t,r){return(0,qQ.jsx)(tp.Trigger,{ref:r,...t})});var Hg={};Rn(Hg,{Content:()=>nJ,Header:()=>$Q,HeaderDescription:()=>tJ,Root:()=>ZQ});var KQ=a(H(),1);var c8=a(T(),1),ZQ=(0,KQ.forwardRef)(function({render:t,...r},o){return(0,c8.jsx)(s8,{ref:o,render:(0,c8.jsx)(fR,{render:t}),...r})});var Xy=a(H(),1);var XQ=a(H(),1),hR=(0,XQ.createContext)({setDescriptionId:()=>{}});var ef=a(T(),1),u8="data-wp-hash";function d8(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&DMe(document)),e.__wpStyleRuntime}function FMe(e,t){if(!e.head)return!1;for(let r of e.head.querySelectorAll(`style[${u8}]`))if(r.getAttribute(u8)===t)return!0;return!1}function JQ(e,t,r){if(!e.head)return;let o=d8(),n=o.injectedStyles.get(e);if(n||(n=new Set,o.injectedStyles.set(e,n)),n.has(t))return;if(FMe(e,t)){n.add(t);return}let i=e.createElement("style");i.setAttribute(u8,t),i.appendChild(e.createTextNode(r)),e.head.appendChild(i),n.add(t)}function DMe(e){let t=d8();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[r,o]of t.styles)JQ(e,r,o);return()=>{let r=t.documents.get(e);if(r!==void 0){if(r<=1){t.documents.delete(e);return}t.documents.set(e,r-1)}}}function f8(e,t){let r=d8();r.styles.set(e,t);for(let o of r.documents.keys())JQ(o,e,t)}typeof process>"u",f8("ee46794e90","@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._626190151275d6d3__heading-wrapper{--_gcd-heading-color:inherit;--_gcd-heading-font-size:inherit;--_gcd-heading-font-weight:inherit;--_gcd-heading-margin:0;font-family:inherit;line-height:inherit}.cab17c7a373cb60d__header-content{flex:1;min-width:0}.dd89d27c4f15912d__header-trigger-positioner{align-self:center;flex-shrink:0;max-height:0;overflow:visible}.bcfab5f2448bafef__header-trigger-wrapper{border-radius:var(--wpds-border-radius-sm,2px);display:flex;translate:0 -50%}._3106f8d2b0330faa__header-trigger{@media not (prefers-reduced-motion){transition:rotate .15s ease-out}}._5d2dfcb4085c6d0f__header[data-panel-open] ._3106f8d2b0330faa__header-trigger{rotate:180deg}._5d2dfcb4085c6d0f__header[data-disabled] ._3106f8d2b0330faa__header-trigger{color:var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d)}.e34cf37ccd0d81e0__content{height:var(--collapsible-panel-height);margin-block-start:var(--wp-ui-card-header-content-margin);overflow:hidden;&._165c4572592944b2__overflowVisible{overflow:visible}&[hidden]:not([hidden=until-found]){display:none}&[data-ending-style],&[data-starting-style]{height:0}@media not (prefers-reduced-motion){transition:all .15s ease-out}}}@layer compositions{._41bfdbf7b6c087c2__content-inner{padding-block-start:0}._5d2dfcb4085c6d0f__header{align-items:stretch;display:flex;flex-direction:row;gap:var(--wpds-dimension-gap-sm,8px);outline:none;&:not([data-disabled]){cursor:var(--wpds-cursor-control,pointer)}}}}");var Zy={"heading-wrapper":"_626190151275d6d3__heading-wrapper","header-content":"cab17c7a373cb60d__header-content","header-trigger-positioner":"dd89d27c4f15912d__header-trigger-positioner","header-trigger-wrapper":"bcfab5f2448bafef__header-trigger-wrapper","header-trigger":"_3106f8d2b0330faa__header-trigger",header:"_5d2dfcb4085c6d0f__header",content:"e34cf37ccd0d81e0__content",overflowVisible:"_165c4572592944b2__overflowVisible","content-inner":"_41bfdbf7b6c087c2__content-inner"};typeof process>"u",f8("d390e935a7","._6defc79820e382c6__button{box-sizing:var(--_gcd-button-box-sizing,border-box);font-family:var(--_gcd-button-font-family,inherit);font-size:var(--_gcd-button-font-size,inherit);font-weight:var(--_gcd-button-font-weight,inherit)}.d2cff2e5dea83bd1__input{box-sizing:var(--_gcd-input-box-sizing,border-box);font-family:var(--_gcd-input-font-family,inherit);font-size:var(--_gcd-input-font-size,inherit);font-weight:var(--_gcd-input-font-weight,inherit);margin:var(--_gcd-input-margin,0);&:is(textarea,[type=text],[type=password],[type=color],[type=date],[type=datetime],[type=datetime-local],[type=email],[type=month],[type=number],[type=search],[type=tel],[type=time],[type=url],[type=week]){background-color:var(--_gcd-input-background-color,transparent);border:var(--_gcd-input-border,none);border-radius:var(--_gcd-input-border-radius,0);box-shadow:var(--_gcd-input-box-shadow,0 0 0 transparent);color:var(--_gcd-input-color,var(--wpds-color-foreground-interactive-neutral,#1e1e1e));&:focus{border-color:var(--_gcd-input-border-color-focus,var(--wp-admin-theme-color));box-shadow:var(--_gcd-input-box-shadow-focus,none);outline:var(--_gcd-input-outline-focus,none)}&:disabled{background:var(--_gcd-input-background-disabled,transparent);border-color:var(--_gcd-input-border-color-disabled,transparent);box-shadow:var(--_gcd-input-box-shadow-disabled,none);color:var(--_gcd-input-color-disabled,var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d))}&::placeholder{color:var(--_gcd-input-placeholder-color,var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d))}}&:is(textarea,[type=text],[type=password],[type=date],[type=datetime],[type=datetime-local],[type=email],[type=month],[type=number],[type=search],[type=tel],[type=time],[type=url],[type=week]){line-height:var(--_gcd-input-line-height,inherit);min-height:var(--_gcd-input-min-height,auto);padding:var(--_gcd-input-padding,0)}}._547d86373d02e108__textarea{box-sizing:var(--_gcd-textarea-box-sizing,border-box);overflow:var(--_gcd-textarea-overflow,auto);resize:var(--_gcd-textarea-resize,block)}._8c15fd0ed9f28ba4__div{outline:var(--_gcd-div-outline,0 solid transparent)}p._43cec3e1eec1066d__p{font-size:var(--_gcd-p-font-size,13px);line-height:var(--_gcd-p-line-height,1.5);margin:var(--_gcd-p-margin,0)}:is(h1,h2,h3,h4,h5,h6).e97669c6d9a38497__heading{color:var(--_gcd-heading-color,var(--wpds-color-foreground-content-neutral,#1e1e1e));font-size:var(--_gcd-heading-font-size,inherit);font-weight:var(--_gcd-heading-font-weight,var(--wpds-typography-font-weight-medium,499));margin:var(--_gcd-heading-margin,0)}._2c0831b0499dbd6e__a,._2c0831b0499dbd6e__a:is(:hover,:focus,:active){border-radius:var(--_gcd-a-border-radius,0);box-shadow:var(--_gcd-a-box-shadow,none);color:var(--_gcd-a-color,inherit);outline:var(--_gcd-a-outline,0 solid transparent);transition:var(--_gcd-a-transition,none)}");var QQ={button:"_6defc79820e382c6__button",input:"d2cff2e5dea83bd1__input",textarea:"_547d86373d02e108__textarea",div:"_8c15fd0ed9f28ba4__div",p:"_43cec3e1eec1066d__p",heading:"e97669c6d9a38497__heading",a:"_2c0831b0499dbd6e__a"};typeof process>"u",f8("5f8e7aa0bc","@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._08e8a2e44959f892__outset-ring--focus:focus,._970d04df7376df67__outset-ring--focus-within-except-active:focus-within:not(:has(:active)),.c5cb3ee4bddaa8e4__outset-ring--focus-within-visible:focus-within:has(:focus-visible),.cd83dfc2126a0846__outset-ring--focus-within:focus-within,.d0541bc9dd9dc7b6__outset-ring--focus-visible:focus-visible,.e25b2bdd7aa21721__outset-ring--focus-except-active:focus:not(:active),:focus-visible .ecadb9e080e2dfa5__outset-ring--focus-parent-visible{--_gcd-a-outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9));--_gcd-div-outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9));outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9));outline-offset:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px))}}}");var LMe={"outset-ring--focus":"_08e8a2e44959f892__outset-ring--focus","outset-ring--focus-except-active":"e25b2bdd7aa21721__outset-ring--focus-except-active","outset-ring--focus-visible":"d0541bc9dd9dc7b6__outset-ring--focus-visible","outset-ring--focus-within":"cd83dfc2126a0846__outset-ring--focus-within","outset-ring--focus-within-except-active":"_970d04df7376df67__outset-ring--focus-within-except-active","outset-ring--focus-within-visible":"c5cb3ee4bddaa8e4__outset-ring--focus-within-visible","outset-ring--focus-parent-visible":"ecadb9e080e2dfa5__outset-ring--focus-parent-visible"},$Q=(0,Xy.forwardRef)(function({children:t,className:r,render:o,...n},i){let[s,l]=(0,Xy.useState)(),c=(0,Xy.useMemo)(()=>({setDescriptionId:l}),[l]);return ki({defaultTagName:"div",render:o,ref:i,props:jr(n,{className:Q(QQ.heading,Zy["heading-wrapper"],r),children:(0,ef.jsx)(hR.Provider,{value:c,children:(0,ef.jsxs)(a8,{className:Zy.header,render:(0,ef.jsx)(mR,{}),nativeButton:!1,"aria-describedby":s,children:[(0,ef.jsx)("div",{className:Zy["header-content"],children:t}),(0,ef.jsx)("div",{className:Q(Zy["header-trigger-positioner"]),children:(0,ef.jsx)("div",{className:Q(Zy["header-trigger-wrapper"],QQ.div,LMe["outset-ring--focus-parent-visible"]),children:(0,ef.jsx)(zg,{icon:J_,className:Zy["header-trigger"]})})})]})})})})});var rp=a(H(),1);var eJ=a(T(),1),tJ=(0,rp.forwardRef)(function({children:t,className:r,...o},n){let i=(0,rp.useId)(),{setDescriptionId:s}=(0,rp.useContext)(hR);return(0,rp.useEffect)(()=>(s(i),()=>s(void 0)),[i,s]),(0,eJ.jsx)("div",{ref:n,id:i,"aria-hidden":"true",className:r,...o,children:t})});var rJ=a(H(),1);var h8=a(T(),1),p8="data-wp-hash";function g8(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&VMe(document)),e.__wpStyleRuntime}function BMe(e,t){if(!e.head)return!1;for(let r of e.head.querySelectorAll(`style[${p8}]`))if(r.getAttribute(p8)===t)return!0;return!1}function oJ(e,t,r){if(!e.head)return;let o=g8(),n=o.injectedStyles.get(e);if(n||(n=new Set,o.injectedStyles.set(e,n)),n.has(t))return;if(BMe(e,t)){n.add(t);return}let i=e.createElement("style");i.setAttribute(p8,t),i.appendChild(e.createTextNode(r)),e.head.appendChild(i),n.add(t)}function VMe(e){let t=g8();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[r,o]of t.styles)oJ(e,r,o);return()=>{let r=t.documents.get(e);if(r!==void 0){if(r<=1){t.documents.delete(e);return}t.documents.set(e,r-1)}}}function jMe(e,t){let r=g8();r.styles.set(e,t);for(let o of r.documents.keys())oJ(o,e,t)}typeof process>"u",jMe("ee46794e90","@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._626190151275d6d3__heading-wrapper{--_gcd-heading-color:inherit;--_gcd-heading-font-size:inherit;--_gcd-heading-font-weight:inherit;--_gcd-heading-margin:0;font-family:inherit;line-height:inherit}.cab17c7a373cb60d__header-content{flex:1;min-width:0}.dd89d27c4f15912d__header-trigger-positioner{align-self:center;flex-shrink:0;max-height:0;overflow:visible}.bcfab5f2448bafef__header-trigger-wrapper{border-radius:var(--wpds-border-radius-sm,2px);display:flex;translate:0 -50%}._3106f8d2b0330faa__header-trigger{@media not (prefers-reduced-motion){transition:rotate .15s ease-out}}._5d2dfcb4085c6d0f__header[data-panel-open] ._3106f8d2b0330faa__header-trigger{rotate:180deg}._5d2dfcb4085c6d0f__header[data-disabled] ._3106f8d2b0330faa__header-trigger{color:var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d)}.e34cf37ccd0d81e0__content{height:var(--collapsible-panel-height);margin-block-start:var(--wp-ui-card-header-content-margin);overflow:hidden;&._165c4572592944b2__overflowVisible{overflow:visible}&[hidden]:not([hidden=until-found]){display:none}&[data-ending-style],&[data-starting-style]{height:0}@media not (prefers-reduced-motion){transition:all .15s ease-out}}}@layer compositions{._41bfdbf7b6c087c2__content-inner{padding-block-start:0}._5d2dfcb4085c6d0f__header{align-items:stretch;display:flex;flex-direction:row;gap:var(--wpds-dimension-gap-sm,8px);outline:none;&:not([data-disabled]){cursor:var(--wpds-cursor-control,pointer)}}}}");var m8={"heading-wrapper":"_626190151275d6d3__heading-wrapper","header-content":"cab17c7a373cb60d__header-content","header-trigger-positioner":"dd89d27c4f15912d__header-trigger-positioner","header-trigger-wrapper":"bcfab5f2448bafef__header-trigger-wrapper","header-trigger":"_3106f8d2b0330faa__header-trigger",header:"_5d2dfcb4085c6d0f__header",content:"e34cf37ccd0d81e0__content",overflowVisible:"_165c4572592944b2__overflowVisible","content-inner":"_41bfdbf7b6c087c2__content-inner"},nJ=(0,rJ.forwardRef)(function({className:t,render:r,children:o,hiddenUntilFound:n=!0,...i},s){return(0,h8.jsx)(i8,{ref:s,className:l=>Q(m8.content,l.open&&l.transitionStatus==="idle"&&m8.overflowVisible,t),hiddenUntilFound:n,...i,children:(0,h8.jsx)(pR,{className:m8["content-inner"],render:r,children:o})})});var iJ=a(H(),1);function v8(e,t,r){return(0,iJ.cloneElement)(e??t,{children:r})}var zMe=a(aJ(),1);var lJ=a(zm(),1),{lock:Oyt,unlock:cJ}=(0,lJ.__dangerousOptInToUnstableAPIsOnlyForCoreModules)("I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.","@wordpress/ui");function HMe(){let e=zMe;if(e.ThemeProvider)return e.ThemeProvider;if(!e.privateApis)throw new Error("@wordpress/ui: @wordpress/theme must expose `ThemeProvider` or `privateApis.ThemeProvider`.");return cJ(e.privateApis).ThemeProvider}var uJ=HMe();var dJ=a(H(),1),b8="data-wp-hash";function y8(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&WMe(document)),e.__wpStyleRuntime}function UMe(e,t){if(!e.head)return!1;for(let r of e.head.querySelectorAll(`style[${b8}]`))if(r.getAttribute(b8)===t)return!0;return!1}function fJ(e,t,r){if(!e.head)return;let o=y8(),n=o.injectedStyles.get(e);if(n||(n=new Set,o.injectedStyles.set(e,n)),n.has(t))return;if(UMe(e,t)){n.add(t);return}let i=e.createElement("style");i.setAttribute(b8,t),i.appendChild(e.createTextNode(r)),e.head.appendChild(i),n.add(t)}function WMe(e){let t=y8();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[r,o]of t.styles)fJ(e,r,o);return()=>{let r=t.documents.get(e);if(r!==void 0){if(r<=1){t.documents.delete(e);return}t.documents.set(e,r-1)}}}function GMe(e,t){let r=y8();r.styles.set(e,t);for(let o of r.documents.keys())fJ(o,e,t)}typeof process>"u",GMe("32aba35fe1","@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._19ce0419607e1896__stack{display:flex}}}");var YMe={stack:"_19ce0419607e1896__stack"},qMe={xs:"var(--wpds-dimension-gap-xs, 4px)",sm:"var(--wpds-dimension-gap-sm, 8px)",md:"var(--wpds-dimension-gap-md, 12px)",lg:"var(--wpds-dimension-gap-lg, 16px)",xl:"var(--wpds-dimension-gap-xl, 24px)","2xl":"var(--wpds-dimension-gap-2xl, 32px)","3xl":"var(--wpds-dimension-gap-3xl, 40px)"},ne=(0,dJ.forwardRef)(function({direction:t,gap:r,align:o,justify:n,wrap:i,render:s,...l},c){let u={gap:r&&qMe[r],alignItems:o,justifyContent:n,flexDirection:t,flexWrap:i};return ki({render:s,ref:c,props:jr(l,{style:u,className:YMe.stack})})});var We={};Rn(We,{Popup:()=>TJ,Portal:()=>gR,Positioner:()=>vR,Provider:()=>OJ,Root:()=>AJ,Trigger:()=>kJ});var xJ=a(H(),1);var vJ=a(H(),1);var w8="data-wp-hash";function S8(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&ZMe(document)),e.__wpStyleRuntime}function KMe(e,t){if(!e.head)return!1;for(let r of e.head.querySelectorAll(`style[${w8}]`))if(r.getAttribute(w8)===t)return!0;return!1}function pJ(e,t,r){if(!e.head)return;let o=S8(),n=o.injectedStyles.get(e);if(n||(n=new Set,o.injectedStyles.set(e,n)),n.has(t))return;if(KMe(e,t)){n.add(t);return}let i=e.createElement("style");i.setAttribute(w8,t),i.appendChild(e.createTextNode(r)),e.head.appendChild(i),n.add(t)}function ZMe(e){let t=S8();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[r,o]of t.styles)pJ(e,r,o);return()=>{let r=t.documents.get(e);if(r!==void 0){if(r<=1){t.documents.delete(e);return}t.documents.set(e,r-1)}}}function XMe(e,t){let r=S8();r.styles.set(e,t);for(let o of r.documents.keys())pJ(o,e,t)}typeof process>"u",XMe("be37f31c1e","._11fc52b637ff8a7e__slot{inset:0;isolation:isolate;pointer-events:none;position:fixed;z-index:1000000003}@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._11fc52b637ff8a7e__slot>*{pointer-events:auto}}}");var mJ={slot:"_11fc52b637ff8a7e__slot"},hJ="data-wp-compat-overlay-slot";function QMe(){return typeof document>"u"?null:document}function JMe(){let e;try{e=window.top?.wp}catch{}let t=e??window.wp;return typeof t?.components=="object"&&t.components!==null}var tf=null;function $Me(e){let t=e.createElement("div");return t.setAttribute(hJ,""),mJ.slot&&t.classList.add(mJ.slot),e.body.appendChild(t),t}function gJ(){if(typeof window>"u"||!JMe()&&window.__wpUiCompatOverlaySlotEnabled!==!0)return;let e=QMe();if(!e||!e.body)return;if(tf&&tf.ownerDocument===e&&tf.isConnected)return tf;let t=e.querySelector(`[${hJ}]`);return t instanceof HTMLDivElement?(tf=t,t):(tf?.isConnected&&tf.remove(),tf=$Me(e),tf)}var bJ=a(T(),1),gR=(0,vJ.forwardRef)(function({container:t,...r},o){return(0,bJ.jsx)(Js.Portal,{container:t??gJ(),...r,ref:o})});var yJ=a(H(),1),_J=a(T(),1),_8="data-wp-hash";function x8(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&t3e(document)),e.__wpStyleRuntime}function e3e(e,t){if(!e.head)return!1;for(let r of e.head.querySelectorAll(`style[${_8}]`))if(r.getAttribute(_8)===t)return!0;return!1}function wJ(e,t,r){if(!e.head)return;let o=x8(),n=o.injectedStyles.get(e);if(n||(n=new Set,o.injectedStyles.set(e,n)),n.has(t))return;if(e3e(e,t)){n.add(t);return}let i=e.createElement("style");i.setAttribute(_8,t),i.appendChild(e.createTextNode(r)),e.head.appendChild(i),n.add(t)}function t3e(e){let t=x8();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[r,o]of t.styles)wJ(e,r,o);return()=>{let r=t.documents.get(e);if(r!==void 0){if(r<=1){t.documents.delete(e);return}t.documents.set(e,r-1)}}}function SJ(e,t){let r=x8();r.styles.set(e,t);for(let o of r.documents.keys())wJ(o,e,t)}typeof process>"u",SJ("10f3806643","@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._336cd3e4e743482f__box-sizing{box-sizing:border-box;*,:after,:before{box-sizing:inherit}}}}");var r3e={"box-sizing":"_336cd3e4e743482f__box-sizing"};typeof process>"u",SJ("789467362f",'@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._480b748dd3510e64__positioner{z-index:var(--wp-ui-tooltip-z-index,initial)}._50096b232db7709d__popup{background-color:var(--wpds-color-background-surface-neutral-strong,#fff);border-radius:var(--wpds-border-radius-md,4px);box-shadow:var(--wpds-elevation-sm,0 1px 2px 0 #0000000d,0 2px 3px 0 #0000000a,0 6px 6px 0 #00000008,0 8px 8px 0 #00000005);color:var(--wpds-color-foreground-content-neutral,#1e1e1e);font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-typography-font-size-sm,12px);line-height:1.4;padding:var(--wpds-dimension-padding-xs,4px) var(--wpds-dimension-padding-sm,8px);@media (forced-colors:active){border-bottom-color:CanvasText;border-bottom-style:solid;border-bottom-width:1px;border-left-color:CanvasText;border-left-style:solid;border-left-width:1px;border-right-color:CanvasText;border-right-style:solid;border-right-width:1px;border-top-color:CanvasText;border-top-style:solid;border-top-width:1px}}}}');var o3e={positioner:"_480b748dd3510e64__positioner",popup:"_50096b232db7709d__popup"},vR=(0,yJ.forwardRef)(function({align:t="center",className:r,side:o="top",sideOffset:n=4,...i},s){return(0,_J.jsx)(Js.Positioner,{ref:s,align:t,side:o,sideOffset:n,...i,className:Q(r3e["box-sizing"],o3e.positioner,r)})});var s1=a(T(),1),C8="data-wp-hash";function T8(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&i3e(document)),e.__wpStyleRuntime}function n3e(e,t){if(!e.head)return!1;for(let r of e.head.querySelectorAll(`style[${C8}]`))if(r.getAttribute(C8)===t)return!0;return!1}function CJ(e,t,r){if(!e.head)return;let o=T8(),n=o.injectedStyles.get(e);if(n||(n=new Set,o.injectedStyles.set(e,n)),n.has(t))return;if(n3e(e,t)){n.add(t);return}let i=e.createElement("style");i.setAttribute(C8,t),i.appendChild(e.createTextNode(r)),e.head.appendChild(i),n.add(t)}function i3e(e){let t=T8();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[r,o]of t.styles)CJ(e,r,o);return()=>{let r=t.documents.get(e);if(r!==void 0){if(r<=1){t.documents.delete(e);return}t.documents.set(e,r-1)}}}function s3e(e,t){let r=T8();r.styles.set(e,t);for(let o of r.documents.keys())CJ(o,e,t)}typeof process>"u",s3e("789467362f",'@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._480b748dd3510e64__positioner{z-index:var(--wp-ui-tooltip-z-index,initial)}._50096b232db7709d__popup{background-color:var(--wpds-color-background-surface-neutral-strong,#fff);border-radius:var(--wpds-border-radius-md,4px);box-shadow:var(--wpds-elevation-sm,0 1px 2px 0 #0000000d,0 2px 3px 0 #0000000a,0 6px 6px 0 #00000008,0 8px 8px 0 #00000005);color:var(--wpds-color-foreground-content-neutral,#1e1e1e);font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-typography-font-size-sm,12px);line-height:1.4;padding:var(--wpds-dimension-padding-xs,4px) var(--wpds-dimension-padding-sm,8px);@media (forced-colors:active){border-bottom-color:CanvasText;border-bottom-style:solid;border-bottom-width:1px;border-left-color:CanvasText;border-left-style:solid;border-left-width:1px;border-right-color:CanvasText;border-right-style:solid;border-right-width:1px;border-top-color:CanvasText;border-top-style:solid;border-top-width:1px}}}}');var a3e={positioner:"_480b748dd3510e64__positioner",popup:"_50096b232db7709d__popup"},l3e={background:"#1e1e1e"},TJ=(0,xJ.forwardRef)(function({portal:t,positioner:r,children:o,className:n,...i},s){let l=(0,s1.jsx)(uJ,{color:l3e,children:(0,s1.jsx)(Js.Popup,{ref:s,className:Q(a3e.popup,n),...i,children:o})}),c=v8(r,(0,s1.jsx)(vR,{}),l);return v8(t,(0,s1.jsx)(gR,{}),c)});var EJ=a(H(),1),PJ=a(T(),1),kJ=(0,EJ.forwardRef)(function(t,r){return(0,PJ.jsx)(Js.Trigger,{ref:r,...t})});var RJ=a(T(),1);function AJ(e){return(0,RJ.jsx)(Js.Root,{...e})}var IJ=a(T(),1);function OJ({...e}){return(0,IJ.jsx)(Js.Provider,{...e})}var NJ=a(H(),1),E8="data-wp-hash";function P8(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&u3e(document)),e.__wpStyleRuntime}function c3e(e,t){if(!e.head)return!1;for(let r of e.head.querySelectorAll(`style[${E8}]`))if(r.getAttribute(E8)===t)return!0;return!1}function MJ(e,t,r){if(!e.head)return;let o=P8(),n=o.injectedStyles.get(e);if(n||(n=new Set,o.injectedStyles.set(e,n)),n.has(t))return;if(c3e(e,t)){n.add(t);return}let i=e.createElement("style");i.setAttribute(E8,t),i.appendChild(e.createTextNode(r)),e.head.appendChild(i),n.add(t)}function u3e(e){let t=P8();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[r,o]of t.styles)MJ(e,r,o);return()=>{let r=t.documents.get(e);if(r!==void 0){if(r<=1){t.documents.delete(e);return}t.documents.set(e,r-1)}}}function d3e(e,t){let r=P8();r.styles.set(e,t);for(let o of r.documents.keys())MJ(o,e,t)}typeof process>"u",d3e("fa606a57ae","@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{.f37b9e2e191ebd66__visually-hidden{word-wrap:normal;border:0;clip-path:inset(50%);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;word-break:normal}}}");var f3e={"visually-hidden":"f37b9e2e191ebd66__visually-hidden"},Ut=(0,NJ.forwardRef)(function({render:t,...r},o){return ki({render:t,ref:o,props:jr({className:f3e["visually-hidden"]},r,{"data-visually-hidden":""})})});var xc=a(T(),1),{PATTERN_TYPES:m3e}=Nn(DJ.privateApis);function LJ({item:e}){let t=(0,FJ.__)("This pattern cannot be edited.");return(0,xc.jsx)(Nx,{item:e,className:"fields-field__pattern-title",children:e.type===m3e.theme&&(0,xc.jsxs)(xc.Fragment,{children:[(0,xc.jsx)(Ut,{children:t}),(0,xc.jsxs)(We.Root,{children:[(0,xc.jsx)(We.Trigger,{render:(0,xc.jsx)(hn,{icon:vL,size:24})}),(0,xc.jsx)(We.Popup,{children:t})]})]})})}var p3e={type:"text",id:"title",label:(0,k8.__)("Title"),placeholder:(0,k8.__)("No title"),getValue:({item:e})=>ft(e),render:LJ,enableHiding:!1,enableGlobalSearch:!0,filterBy:!1},a1=p3e;var h7=a(V(),1);var Sr=a(W(),1),Xg=a(l1(),1),f7=a(oe(),1),E1=a(G(),1),Xr=a(H(),1),ms=a(V(),1);var a0=a(Wm(),1),V$=a(Rt(),1);var A8=u1(),pt=e=>c1(e,A8),I8=u1();pt.write=e=>c1(e,I8);var bR=u1();pt.onStart=e=>c1(e,bR);var O8=u1();pt.onFrame=e=>c1(e,O8);var N8=u1();pt.onFinish=e=>c1(e,N8);var Qy=[];pt.setTimeout=(e,t)=>{let r=pt.now()+t,o=()=>{let i=Qy.findIndex(s=>s.cancel==o);~i&&Qy.splice(i,1),np-=~i?1:0},n={time:r,handler:e,cancel:o};return Qy.splice(VJ(r),0,n),np+=1,jJ(),n};var VJ=e=>~(~Qy.findIndex(t=>t.time>e)||~Qy.length);pt.cancel=e=>{bR.delete(e),O8.delete(e),N8.delete(e),A8.delete(e),I8.delete(e)};pt.sync=e=>{R8=!0,pt.batchedUpdates(e),R8=!1};pt.throttle=e=>{let t;function r(){try{e(...t)}finally{t=null}}function o(...n){t=n,pt.onStart(r)}return o.handler=e,o.cancel=()=>{bR.delete(r),t=null},o};var M8=typeof window<"u"?window.requestAnimationFrame:()=>{};pt.use=e=>M8=e;pt.now=typeof performance<"u"?()=>performance.now():Date.now;pt.batchedUpdates=e=>e();pt.catch=console.error;pt.frameLoop="always";pt.advance=()=>{pt.frameLoop!=="demand"?console.warn("Cannot call the manual advancement of rafz whilst frameLoop is not set as demand"):HJ()};var op=-1,np=0,R8=!1;function c1(e,t){R8?(t.delete(e),e(0)):(t.add(e),jJ())}function jJ(){op<0&&(op=0,pt.frameLoop!=="demand"&&M8(zJ))}function h3e(){op=-1}function zJ(){~op&&(M8(zJ),pt.batchedUpdates(HJ))}function HJ(){let e=op;op=pt.now();let t=VJ(op);if(t&&(UJ(Qy.splice(0,t),r=>r.handler()),np-=t),!np){h3e();return}bR.flush(),A8.flush(e?Math.min(64,op-e):16.667),O8.flush(),I8.flush(),N8.flush()}function u1(){let e=new Set,t=e;return{add(r){np+=t==e&&!e.has(r)?1:0,e.add(r)},delete(r){return np-=t==e&&e.has(r)?1:0,e.delete(r)},flush(r){t.size&&(e=new Set,np-=t.size,UJ(t,o=>o(r)&&e.add(o)),np+=e.size,t=e)}}}function UJ(e,t){e.forEach(r=>{try{t(r)}catch(o){pt.catch(o)}})}var Sl=a(xe());function xR(){}var ZJ=(e,t,r)=>Object.defineProperty(e,t,{value:r,writable:!0,configurable:!0}),Re={arr:Array.isArray,obj:e=>!!e&&e.constructor.name==="Object",fun:e=>typeof e=="function",str:e=>typeof e=="string",num:e=>typeof e=="number",und:e=>e===void 0};function Pu(e,t){if(Re.arr(e)){if(!Re.arr(t)||e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}return e===t}var Ir=(e,t)=>e.forEach(t);function _l(e,t,r){if(Re.arr(e)){for(let o=0;o<e.length;o++)t.call(r,e[o],`${o}`);return}for(let o in e)e.hasOwnProperty(o)&&t.call(r,e[o],o)}var $s=e=>Re.und(e)?[]:Re.arr(e)?e:[e];function t0(e,t){if(e.size){let r=Array.from(e);e.clear(),Ir(r,t)}}var r0=(e,...t)=>t0(e,r=>r(...t)),j8=()=>typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),z8,XJ,ip=null,QJ=!1,H8=xR,g3e=e=>{e.to&&(XJ=e.to),e.now&&(pt.now=e.now),e.colors!==void 0&&(ip=e.colors),e.skipAnimation!=null&&(QJ=e.skipAnimation),e.createStringInterpolator&&(z8=e.createStringInterpolator),e.requestAnimationFrame&&pt.use(e.requestAnimationFrame),e.batchedUpdates&&(pt.batchedUpdates=e.batchedUpdates),e.willAdvance&&(H8=e.willAdvance),e.frameLoop&&(pt.frameLoop=e.frameLoop)},Ya=Object.freeze({__proto__:null,get createStringInterpolator(){return z8},get to(){return XJ},get colors(){return ip},get skipAnimation(){return QJ},get willAdvance(){return H8},assign:g3e}),d1=new Set,wl=[],F8=[],SR=0,o0={get idle(){return!d1.size&&!wl.length},start(e){SR>e.priority?(d1.add(e),pt.onStart(v3e)):(JJ(e),pt(B8))},advance:B8,sort(e){if(SR)pt.onFrame(()=>o0.sort(e));else{let t=wl.indexOf(e);~t&&(wl.splice(t,1),$J(e))}},clear(){wl=[],d1.clear()}};function v3e(){d1.forEach(JJ),d1.clear(),pt(B8)}function JJ(e){wl.includes(e)||$J(e)}function $J(e){wl.splice(b3e(wl,t=>t.priority>e.priority),0,e)}function B8(e){let t=F8;for(let r=0;r<wl.length;r++){let o=wl[r];SR=o.priority,o.idle||(H8(o),o.advance(e),o.idle||t.push(o))}return SR=0,F8=wl,F8.length=0,wl=t,wl.length>0}function b3e(e,t){let r=e.findIndex(t);return r<0?e.length:r}var e$={transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199},Cc="[-+]?\\d*\\.?\\d+",_R=Cc+"%";function CR(...e){return"\\(\\s*("+e.join(")\\s*,\\s*(")+")\\s*\\)"}var y3e=new RegExp("rgb"+CR(Cc,Cc,Cc)),w3e=new RegExp("rgba"+CR(Cc,Cc,Cc,Cc)),S3e=new RegExp("hsl"+CR(Cc,_R,_R)),_3e=new RegExp("hsla"+CR(Cc,_R,_R,Cc)),x3e=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,C3e=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,T3e=/^#([0-9a-fA-F]{6})$/,E3e=/^#([0-9a-fA-F]{8})$/;function P3e(e){let t;return typeof e=="number"?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=T3e.exec(e))?parseInt(t[1]+"ff",16)>>>0:ip&&ip[e]!==void 0?ip[e]:(t=y3e.exec(e))?(Jy(t[1])<<24|Jy(t[2])<<16|Jy(t[3])<<8|255)>>>0:(t=w3e.exec(e))?(Jy(t[1])<<24|Jy(t[2])<<16|Jy(t[3])<<8|YJ(t[4]))>>>0:(t=x3e.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+"ff",16)>>>0:(t=E3e.exec(e))?parseInt(t[1],16)>>>0:(t=C3e.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=S3e.exec(e))?(WJ(GJ(t[1]),yR(t[2]),yR(t[3]))|255)>>>0:(t=_3e.exec(e))?(WJ(GJ(t[1]),yR(t[2]),yR(t[3]))|YJ(t[4]))>>>0:null}function D8(e,t,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+(t-e)*6*r:r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e}function WJ(e,t,r){let o=r<.5?r*(1+t):r+t-r*t,n=2*r-o,i=D8(n,o,e+1/3),s=D8(n,o,e),l=D8(n,o,e-1/3);return Math.round(i*255)<<24|Math.round(s*255)<<16|Math.round(l*255)<<8}function Jy(e){let t=parseInt(e,10);return t<0?0:t>255?255:t}function GJ(e){return(parseFloat(e)%360+360)%360/360}function YJ(e){let t=parseFloat(e);return t<0?0:t>1?255:Math.round(t*255)}function yR(e){let t=parseFloat(e);return t<0?0:t>100?1:t/100}function qJ(e){let t=P3e(e);if(t===null)return e;t=t||0;let r=(t&4278190080)>>>24,o=(t&16711680)>>>16,n=(t&65280)>>>8,i=(t&255)/255;return`rgba(${r}, ${o}, ${n}, ${i})`}var sp=(e,t,r)=>{if(Re.fun(e))return e;if(Re.arr(e))return sp({range:e,output:t,extrapolate:r});if(Re.str(e.output[0]))return z8(e);let o=e,n=o.output,i=o.range||[0,1],s=o.extrapolateLeft||o.extrapolate||"extend",l=o.extrapolateRight||o.extrapolate||"extend",c=o.easing||(u=>u);return u=>{let d=R3e(u,i);return k3e(u,i[d],i[d+1],n[d],n[d+1],c,s,l,o.map)}};function k3e(e,t,r,o,n,i,s,l,c){let u=c?c(e):e;if(u<t){if(s==="identity")return u;s==="clamp"&&(u=t)}if(u>r){if(l==="identity")return u;l==="clamp"&&(u=r)}return o===n?o:t===r?e<=t?o:n:(t===-1/0?u=-u:r===1/0?u=u-t:u=(u-t)/(r-t),u=i(u),o===-1/0?u=-u:n===1/0?u=u+o:u=u*(n-o)+o,u)}function R3e(e,t){for(var r=1;r<t.length-1&&!(t[r]>=e);++r);return r-1}function V8(){return V8=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e},V8.apply(this,arguments)}var $y=Symbol.for("FluidValue.get"),Ug=Symbol.for("FluidValue.observers"),ds=e=>!!(e&&e[$y]),li=e=>e&&e[$y]?e[$y]():e,U8=e=>e[Ug]||null;function A3e(e,t){e.eventObserved?e.eventObserved(t):e(t)}function Wg(e,t){let r=e[Ug];r&&r.forEach(o=>{A3e(o,t)})}var e0=class{constructor(t){if(this[$y]=void 0,this[Ug]=void 0,!t&&!(t=this.get))throw Error("Unknown getter");I3e(this,t)}},I3e=(e,t)=>t$(e,$y,t);function ap(e,t){if(e[$y]){let r=e[Ug];r||t$(e,Ug,r=new Set),r.has(t)||(r.add(t),e.observerAdded&&e.observerAdded(r.size,t))}return t}function lp(e,t){let r=e[Ug];if(r&&r.has(t)){let o=r.size-1;o?r.delete(t):e[Ug]=null,e.observerRemoved&&e.observerRemoved(o,t)}}var t$=(e,t,r)=>Object.defineProperty(e,t,{value:r,writable:!0,configurable:!0}),wR=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,O3e=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,KJ=new RegExp(`(${wR.source})(%|[a-z]+)`,"i"),N3e=/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,TR=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/,r$=e=>{let[t,r]=M3e(e);if(!t||j8())return e;let o=window.getComputedStyle(document.documentElement).getPropertyValue(t);if(o)return o.trim();if(r&&r.startsWith("--")){let n=window.getComputedStyle(document.documentElement).getPropertyValue(r);return n||e}else{if(r&&TR.test(r))return r$(r);if(r)return r}return e},M3e=e=>{let t=TR.exec(e);if(!t)return[,];let[,r,o]=t;return[r,o]},L8,F3e=(e,t,r,o,n)=>`rgba(${Math.round(t)}, ${Math.round(r)}, ${Math.round(o)}, ${n})`,ER=e=>{L8||(L8=ip?new RegExp(`(${Object.keys(ip).join("|")})(?!\\w)`,"g"):/^\b$/);let t=e.output.map(i=>li(i).replace(TR,r$).replace(O3e,qJ).replace(L8,qJ)),r=t.map(i=>i.match(wR).map(Number)),n=r[0].map((i,s)=>r.map(l=>{if(!(s in l))throw Error('The arity of each "output" value must be equal');return l[s]})).map(i=>sp(V8({},e,{output:i})));return i=>{var s;let l=!KJ.test(t[0])&&((s=t.find(u=>KJ.test(u)))==null?void 0:s.replace(wR,"")),c=0;return t[0].replace(wR,()=>`${n[c++](i)}${l||""}`).replace(N3e,F3e)}},o$="react-spring: ",n$=e=>{let t=e,r=!1;if(typeof t!="function")throw new TypeError(`${o$}once requires a function parameter`);return(...o)=>{r||(t(...o),r=!0)}},D3e=n$(console.warn);function i$(){D3e(`${o$}The "interpolate" function is deprecated in v9 (use "to" instead)`)}var L0t=n$(console.warn);function n0(e){return Re.str(e)&&(e[0]=="#"||/\d/.test(e)||!j8()&&TR.test(e)||e in(ip||{}))}var f1=j8()?Sl.useEffect:Sl.useLayoutEffect,L3e=()=>{let e=(0,Sl.useRef)(!1);return f1(()=>(e.current=!0,()=>{e.current=!1}),[]),e};function W8(){let e=(0,Sl.useState)()[1],t=L3e();return()=>{t.current&&e(Math.random())}}function s$(e,t){let[r]=(0,Sl.useState)(()=>({inputs:t,result:e()})),o=(0,Sl.useRef)(),n=o.current,i=n;return i?t&&i.inputs&&B3e(t,i.inputs)||(i={inputs:t,result:e()}):i=r,(0,Sl.useEffect)(()=>{o.current=i,n==r&&(r.inputs=r.result=void 0)},[i]),i.result}function B3e(e,t){if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}var G8=e=>(0,Sl.useEffect)(e,V3e),V3e=[];var _1=a(xe()),x1=a(xe());var u$=a(xe()),rf=a(xe()),m1=Symbol.for("Animated:node"),j3e=e=>!!e&&e[m1]===e,Tc=e=>e&&e[m1],AR=(e,t)=>ZJ(e,m1,t),p1=e=>e&&e[m1]&&e[m1].getPayload(),PR=class{constructor(){this.payload=void 0,AR(this,this)}getPayload(){return this.payload||[]}},Gg=class e extends PR{constructor(t){super(),this.done=!0,this.elapsedTime=void 0,this.lastPosition=void 0,this.lastVelocity=void 0,this.v0=void 0,this.durationProgress=0,this._value=t,Re.num(this._value)&&(this.lastPosition=this._value)}static create(t){return new e(t)}getPayload(){return[this]}getValue(){return this._value}setValue(t,r){return Re.num(t)&&(this.lastPosition=t,r&&(t=Math.round(t/r)*r,this.done&&(this.lastPosition=t))),this._value===t?!1:(this._value=t,!0)}reset(){let{done:t}=this;this.done=!1,Re.num(this._value)&&(this.elapsedTime=0,this.durationProgress=0,this.lastPosition=this._value,t&&(this.lastVelocity=null),this.v0=null)}},Yg=class e extends Gg{constructor(t){super(0),this._string=null,this._toString=void 0,this._toString=sp({output:[t,t]})}static create(t){return new e(t)}getValue(){let t=this._string;return t??(this._string=this._toString(this._value))}setValue(t){if(Re.str(t)){if(t==this._string)return!1;this._string=t,this._value=1}else if(super.setValue(t))this._string=null;else return!1;return!0}reset(t){t&&(this._toString=sp({output:[this.getValue(),t]})),this._value=0,super.reset()}},kR={dependencies:null},qg=class extends PR{constructor(t){super(),this.source=t,this.setValue(t)}getValue(t){let r={};return _l(this.source,(o,n)=>{j3e(o)?r[n]=o.getValue(t):ds(o)?r[n]=li(o):t||(r[n]=o)}),r}setValue(t){this.source=t,this.payload=this._makePayload(t)}reset(){this.payload&&Ir(this.payload,t=>t.reset())}_makePayload(t){if(t){let r=new Set;return _l(t,this._addToPayload,r),Array.from(r)}}_addToPayload(t){kR.dependencies&&ds(t)&&kR.dependencies.add(t);let r=p1(t);r&&Ir(r,o=>this.add(o))}},Y8=class e extends qg{constructor(t){super(t)}static create(t){return new e(t)}getValue(){return this.source.map(t=>t.getValue())}setValue(t){let r=this.getPayload();return t.length==r.length?r.map((o,n)=>o.setValue(t[n])).some(Boolean):(super.setValue(t.map(z3e)),!0)}};function z3e(e){return(n0(e)?Yg:Gg).create(e)}function IR(e){let t=Tc(e);return t?t.constructor:Re.arr(e)?Y8:n0(e)?Yg:Gg}function RR(){return RR=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e},RR.apply(this,arguments)}var a$=(e,t)=>{let r=!Re.fun(e)||e.prototype&&e.prototype.isReactComponent;return(0,rf.forwardRef)((o,n)=>{let i=(0,rf.useRef)(null),s=r&&(0,rf.useCallback)(g=>{i.current=U3e(n,g)},[n]),[l,c]=H3e(o,t),u=W8(),d=()=>{let g=i.current;if(r&&!g)return;(g?t.applyAnimatedValues(g,l.getValue(!0)):!1)===!1&&u()},f=new q8(d,c),m=(0,rf.useRef)();f1(()=>(m.current=f,Ir(c,g=>ap(g,f)),()=>{m.current&&(Ir(m.current.deps,g=>lp(g,m.current)),pt.cancel(m.current.update))})),(0,rf.useEffect)(d,[]),G8(()=>()=>{let g=m.current;Ir(g.deps,v=>lp(v,g))});let h=t.getComponentProps(l.getValue());return u$.createElement(e,RR({},h,{ref:s}))})},q8=class{constructor(t,r){this.update=t,this.deps=r}eventObserved(t){t.type=="change"&&pt.write(this.update)}};function H3e(e,t){let r=new Set;return kR.dependencies=r,e.style&&(e=RR({},e,{style:t.createAnimatedStyle(e.style)})),e=new qg(e),kR.dependencies=null,[e,r]}function U3e(e,t){return e&&(Re.fun(e)?e(t):e.current=t),t}var l$=Symbol.for("AnimatedComponent"),d$=(e,{applyAnimatedValues:t=()=>!1,createAnimatedStyle:r=n=>new qg(n),getComponentProps:o=n=>n}={})=>{let n={applyAnimatedValues:t,createAnimatedStyle:r,getComponentProps:o},i=s=>{let l=c$(s)||"Anonymous";return Re.str(s)?s=i[s]||(i[s]=a$(s,n)):s=s[l$]||(s[l$]=a$(s,n)),s.displayName=`Animated(${l})`,s};return _l(e,(s,l)=>{Re.arr(e)&&(l=c$(s)),i[l]=i(s)}),{animated:i}},c$=e=>Re.str(e)?e:e&&Re.str(e.displayName)?e.displayName:Re.fun(e)&&e.name||null;function fs(){return fs=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e},fs.apply(this,arguments)}function Kg(e,...t){return Re.fun(e)?e(...t):e}var b1=(e,t)=>e===!0||!!(t&&e&&(Re.fun(e)?e(t):$s(e).includes(t))),x$=(e,t)=>Re.obj(e)?t&&e[t]:e,C$=(e,t)=>e.default===!0?e[t]:e.default?e.default[t]:void 0,W3e=e=>e,T$=(e,t=W3e)=>{let r=G3e;e.default&&e.default!==!0&&(e=e.default,r=Object.keys(e));let o={};for(let n of r){let i=t(e[n],n);Re.und(i)||(o[n]=i)}return o},G3e=["config","onProps","onStart","onChange","onPause","onResume","onRest"],Y3e={config:1,from:1,to:1,ref:1,loop:1,reset:1,pause:1,cancel:1,reverse:1,immediate:1,default:1,delay:1,onProps:1,onStart:1,onChange:1,onPause:1,onResume:1,onRest:1,onResolve:1,items:1,trail:1,sort:1,expires:1,initial:1,enter:1,update:1,leave:1,children:1,onDestroyed:1,keys:1,callId:1,parentId:1};function q3e(e){let t={},r=0;if(_l(e,(o,n)=>{Y3e[n]||(t[n]=o,r++)}),r)return t}function E$(e){let t=q3e(e);if(t){let r={to:t};return _l(e,(o,n)=>n in t||(r[n]=o)),r}return fs({},e)}function y1(e){return e=li(e),Re.arr(e)?e.map(y1):n0(e)?Ya.createStringInterpolator({range:[0,1],output:[e,e]})(1):e}function X8(e){return Re.fun(e)||Re.arr(e)&&Re.obj(e[0])}var K3e={default:{tension:170,friction:26},gentle:{tension:120,friction:14},wobbly:{tension:180,friction:12},stiff:{tension:210,friction:20},slow:{tension:280,friction:60},molasses:{tension:280,friction:120}},MR=1.70158,OR=MR*1.525,f$=MR+1,m$=2*Math.PI/3,p$=2*Math.PI/4.5,NR=e=>e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375,Z3e={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>1-(1-e)*(1-e),easeInOutQuad:e=>e<.5?2*e*e:1-Math.pow(-2*e+2,2)/2,easeInCubic:e=>e*e*e,easeOutCubic:e=>1-Math.pow(1-e,3),easeInOutCubic:e=>e<.5?4*e*e*e:1-Math.pow(-2*e+2,3)/2,easeInQuart:e=>e*e*e*e,easeOutQuart:e=>1-Math.pow(1-e,4),easeInOutQuart:e=>e<.5?8*e*e*e*e:1-Math.pow(-2*e+2,4)/2,easeInQuint:e=>e*e*e*e*e,easeOutQuint:e=>1-Math.pow(1-e,5),easeInOutQuint:e=>e<.5?16*e*e*e*e*e:1-Math.pow(-2*e+2,5)/2,easeInSine:e=>1-Math.cos(e*Math.PI/2),easeOutSine:e=>Math.sin(e*Math.PI/2),easeInOutSine:e=>-(Math.cos(Math.PI*e)-1)/2,easeInExpo:e=>e===0?0:Math.pow(2,10*e-10),easeOutExpo:e=>e===1?1:1-Math.pow(2,-10*e),easeInOutExpo:e=>e===0?0:e===1?1:e<.5?Math.pow(2,20*e-10)/2:(2-Math.pow(2,-20*e+10))/2,easeInCirc:e=>1-Math.sqrt(1-Math.pow(e,2)),easeOutCirc:e=>Math.sqrt(1-Math.pow(e-1,2)),easeInOutCirc:e=>e<.5?(1-Math.sqrt(1-Math.pow(2*e,2)))/2:(Math.sqrt(1-Math.pow(-2*e+2,2))+1)/2,easeInBack:e=>f$*e*e*e-MR*e*e,easeOutBack:e=>1+f$*Math.pow(e-1,3)+MR*Math.pow(e-1,2),easeInOutBack:e=>e<.5?Math.pow(2*e,2)*((OR+1)*2*e-OR)/2:(Math.pow(2*e-2,2)*((OR+1)*(e*2-2)+OR)+2)/2,easeInElastic:e=>e===0?0:e===1?1:-Math.pow(2,10*e-10)*Math.sin((e*10-10.75)*m$),easeOutElastic:e=>e===0?0:e===1?1:Math.pow(2,-10*e)*Math.sin((e*10-.75)*m$)+1,easeInOutElastic:e=>e===0?0:e===1?1:e<.5?-(Math.pow(2,20*e-10)*Math.sin((20*e-11.125)*p$))/2:Math.pow(2,-20*e+10)*Math.sin((20*e-11.125)*p$)/2+1,easeInBounce:e=>1-NR(1-e),easeOutBounce:NR,easeInOutBounce:e=>e<.5?(1-NR(1-2*e))/2:(1+NR(2*e-1))/2},Q8=fs({},K3e.default,{mass:1,damping:1,easing:Z3e.linear,clamp:!1}),J8=class{constructor(){this.tension=void 0,this.friction=void 0,this.frequency=void 0,this.damping=void 0,this.mass=void 0,this.velocity=0,this.restVelocity=void 0,this.precision=void 0,this.progress=void 0,this.duration=void 0,this.easing=void 0,this.clamp=void 0,this.bounce=void 0,this.decay=void 0,this.round=void 0,Object.assign(this,Q8)}};function X3e(e,t,r){r&&(r=fs({},r),h$(r,t),t=fs({},r,t)),h$(e,t),Object.assign(e,t);for(let s in Q8)e[s]==null&&(e[s]=Q8[s]);let{mass:o,frequency:n,damping:i}=e;return Re.und(n)||(n<.01&&(n=.01),i<0&&(i=0),e.tension=Math.pow(2*Math.PI/n,2)*o,e.friction=4*Math.PI*i*o/n),e}function h$(e,t){if(!Re.und(t.decay))e.duration=void 0;else{let r=!Re.und(t.tension)||!Re.und(t.friction);(r||!Re.und(t.frequency)||!Re.und(t.damping)||!Re.und(t.mass))&&(e.duration=void 0,e.decay=void 0),r&&(e.frequency=void 0)}}var g$=[],$8=class{constructor(){this.changed=!1,this.values=g$,this.toValues=null,this.fromValues=g$,this.to=void 0,this.from=void 0,this.config=new J8,this.immediate=!1}};function P$(e,{key:t,props:r,defaultProps:o,state:n,actions:i}){return new Promise((s,l)=>{var c;let u,d,f=b1((c=r.cancel)!=null?c:o?.cancel,t);if(f)g();else{Re.und(r.pause)||(n.paused=b1(r.pause,t));let v=o?.pause;v!==!0&&(v=n.paused||b1(v,t)),u=Kg(r.delay||0,t),v?(n.resumeQueue.add(h),i.pause()):(i.resume(),h())}function m(){n.resumeQueue.add(h),n.timeouts.delete(d),d.cancel(),u=d.time-pt.now()}function h(){u>0&&!Ya.skipAnimation?(n.delayed=!0,d=pt.setTimeout(g,u),n.pauseQueue.add(m),n.timeouts.add(d)):g()}function g(){n.delayed&&(n.delayed=!1),n.pauseQueue.delete(m),n.timeouts.delete(d),e<=(n.cancelId||0)&&(f=!0);try{i.start(fs({},r,{callId:e,cancel:f}),s)}catch(v){l(v)}}})}var s7=(e,t)=>t.length==1?t[0]:t.some(r=>r.cancelled)?i0(e.get()):t.every(r=>r.noop)?k$(e.get()):Ec(e.get(),t.every(r=>r.finished)),k$=e=>({value:e,noop:!0,finished:!0,cancelled:!1}),Ec=(e,t,r=!1)=>({value:e,finished:t,cancelled:r}),i0=e=>({value:e,cancelled:!0,finished:!1});function R$(e,t,r,o){let{callId:n,parentId:i,onRest:s}=t,{asyncTo:l,promise:c}=r;return!i&&e===l&&!t.reset?c:r.promise=(async()=>{r.asyncId=n,r.asyncTo=e;let u=T$(t,(b,S)=>S==="onRest"?void 0:b),d,f,m=new Promise((b,S)=>(d=b,f=S)),h=b=>{let S=n<=(r.cancelId||0)&&i0(o)||n!==r.asyncId&&Ec(o,!1);if(S)throw b.result=S,f(b),b},g=(b,S)=>{let y=new FR,w=new DR;return(async()=>{if(Ya.skipAnimation)throw w1(r),w.result=Ec(o,!1),f(w),w;h(y);let _=Re.obj(b)?fs({},b):fs({},S,{to:b});_.parentId=n,_l(u,(E,O)=>{Re.und(_[O])&&(_[O]=E)});let x=await o.start(_);return h(y),r.paused&&await new Promise(E=>{r.resumeQueue.add(E)}),x})()},v;if(Ya.skipAnimation)return w1(r),Ec(o,!1);try{let b;Re.arr(e)?b=(async S=>{for(let y of S)await g(y)})(e):b=Promise.resolve(e(g,o.stop.bind(o))),await Promise.all([b.then(d),m]),v=Ec(o.get(),!0,!1)}catch(b){if(b instanceof FR)v=b.result;else if(b instanceof DR)v=b.result;else throw b}finally{n==r.asyncId&&(r.asyncId=i,r.asyncTo=i?l:void 0,r.promise=i?c:void 0)}return Re.fun(s)&&pt.batchedUpdates(()=>{s(v,o,o.item)}),v})()}function w1(e,t){t0(e.timeouts,r=>r.cancel()),e.pauseQueue.clear(),e.resumeQueue.clear(),e.asyncId=e.asyncTo=e.promise=void 0,t&&(e.cancelId=t)}var FR=class extends Error{constructor(){super("An async animation has been interrupted. You see this error because you forgot to use `await` or `.catch(...)` on its returned promise."),this.result=void 0}},DR=class extends Error{constructor(){super("SkipAnimationSignal"),this.result=void 0}},e7=e=>e instanceof S1,Q3e=1,S1=class extends e0{constructor(...t){super(...t),this.id=Q3e++,this.key=void 0,this._priority=0}get priority(){return this._priority}set priority(t){this._priority!=t&&(this._priority=t,this._onPriorityChange(t))}get(){let t=Tc(this);return t&&t.getValue()}to(...t){return Ya.to(this,t)}interpolate(...t){return i$(),Ya.to(this,t)}toJSON(){return this.get()}observerAdded(t){t==1&&this._attach()}observerRemoved(t){t==0&&this._detach()}_attach(){}_detach(){}_onChange(t,r=!1){Wg(this,{type:"change",parent:this,value:t,idle:r})}_onPriorityChange(t){this.idle||o0.sort(this),Wg(this,{type:"priority",parent:this,priority:t})}},Zg=Symbol.for("SpringPhase"),A$=1,t7=2,r7=4,K8=e=>(e[Zg]&A$)>0,cp=e=>(e[Zg]&t7)>0,h1=e=>(e[Zg]&r7)>0,v$=(e,t)=>t?e[Zg]|=t7|A$:e[Zg]&=~t7,b$=(e,t)=>t?e[Zg]|=r7:e[Zg]&=~r7,o7=class extends S1{constructor(t,r){if(super(),this.key=void 0,this.animation=new $8,this.queue=void 0,this.defaultProps={},this._state={paused:!1,delayed:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._pendingCalls=new Set,this._lastCallId=0,this._lastToId=0,this._memoizedDuration=0,!Re.und(t)||!Re.und(r)){let o=Re.obj(t)?fs({},t):fs({},r,{from:t});Re.und(o.default)&&(o.default=!0),this.start(o)}}get idle(){return!(cp(this)||this._state.asyncTo)||h1(this)}get goal(){return li(this.animation.to)}get velocity(){let t=Tc(this);return t instanceof Gg?t.lastVelocity||0:t.getPayload().map(r=>r.lastVelocity||0)}get hasAnimated(){return K8(this)}get isAnimating(){return cp(this)}get isPaused(){return h1(this)}get isDelayed(){return this._state.delayed}advance(t){let r=!0,o=!1,n=this.animation,{config:i,toValues:s}=n,l=p1(n.to);!l&&ds(n.to)&&(s=$s(li(n.to))),n.values.forEach((d,f)=>{if(d.done)return;let m=d.constructor==Yg?1:l?l[f].lastPosition:s[f],h=n.immediate,g=m;if(!h){if(g=d.lastPosition,i.tension<=0){d.done=!0;return}let v=d.elapsedTime+=t,b=n.fromValues[f],S=d.v0!=null?d.v0:d.v0=Re.arr(i.velocity)?i.velocity[f]:i.velocity,y,w=i.precision||(b==m?.005:Math.min(1,Math.abs(m-b)*.001));if(Re.und(i.duration))if(i.decay){let _=i.decay===!0?.998:i.decay,x=Math.exp(-(1-_)*v);g=b+S/(1-_)*(1-x),h=Math.abs(d.lastPosition-g)<=w,y=S*x}else{y=d.lastVelocity==null?S:d.lastVelocity;let _=i.restVelocity||w/10,x=i.clamp?0:i.bounce,E=!Re.und(x),O=b==m?d.v0>0:b<m,A,C=!1,I=1,k=Math.ceil(t/I);for(let P=0;P<k&&(A=Math.abs(y)>_,!(!A&&(h=Math.abs(m-g)<=w,h)));++P){E&&(C=g==m||g>m==O,C&&(y=-y*x,g=m));let N=-i.tension*1e-6*(g-m),U=-i.friction*.001*y,F=(N+U)/i.mass;y=y+F*I,g=g+y*I}}else{let _=1;i.duration>0&&(this._memoizedDuration!==i.duration&&(this._memoizedDuration=i.duration,d.durationProgress>0&&(d.elapsedTime=i.duration*d.durationProgress,v=d.elapsedTime+=t)),_=(i.progress||0)+v/this._memoizedDuration,_=_>1?1:_<0?0:_,d.durationProgress=_),g=b+i.easing(_)*(m-b),y=(g-d.lastPosition)/t,h=_==1}d.lastVelocity=y,Number.isNaN(g)&&(console.warn("Got NaN while animating:",this),h=!0)}l&&!l[f].done&&(h=!1),h?d.done=!0:r=!1,d.setValue(g,i.round)&&(o=!0)});let c=Tc(this),u=c.getValue();if(r){let d=li(n.to);(u!==d||o)&&!i.decay?(c.setValue(d),this._onChange(d)):o&&i.decay&&this._onChange(u),this._stop()}else o&&this._onChange(u)}set(t){return pt.batchedUpdates(()=>{this._stop(),this._focus(t),this._set(t)}),this}pause(){this._update({pause:!0})}resume(){this._update({pause:!1})}finish(){if(cp(this)){let{to:t,config:r}=this.animation;pt.batchedUpdates(()=>{this._onStart(),r.decay||this._set(t,!1),this._stop()})}return this}update(t){return(this.queue||(this.queue=[])).push(t),this}start(t,r){let o;return Re.und(t)?(o=this.queue||[],this.queue=[]):o=[Re.obj(t)?t:fs({},r,{to:t})],Promise.all(o.map(n=>this._update(n))).then(n=>s7(this,n))}stop(t){let{to:r}=this.animation;return this._focus(this.get()),w1(this._state,t&&this._lastCallId),pt.batchedUpdates(()=>this._stop(r,t)),this}reset(){this._update({reset:!0})}eventObserved(t){t.type=="change"?this._start():t.type=="priority"&&(this.priority=t.priority+1)}_prepareNode(t){let r=this.key||"",{to:o,from:n}=t;o=Re.obj(o)?o[r]:o,(o==null||X8(o))&&(o=void 0),n=Re.obj(n)?n[r]:n,n==null&&(n=void 0);let i={to:o,from:n};return K8(this)||(t.reverse&&([o,n]=[n,o]),n=li(n),Re.und(n)?Tc(this)||this._set(o):this._set(n)),i}_update(t,r){let o=fs({},t),{key:n,defaultProps:i}=this;o.default&&Object.assign(i,T$(o,(c,u)=>/^on/.test(u)?x$(c,n):c)),w$(this,o,"onProps"),v1(this,"onProps",o,this);let s=this._prepareNode(o);if(Object.isFrozen(this))throw Error("Cannot animate a `SpringValue` object that is frozen. Did you forget to pass your component to `animated(...)` before animating its props?");let l=this._state;return P$(++this._lastCallId,{key:n,props:o,defaultProps:i,state:l,actions:{pause:()=>{h1(this)||(b$(this,!0),r0(l.pauseQueue),v1(this,"onPause",Ec(this,g1(this,this.animation.to)),this))},resume:()=>{h1(this)&&(b$(this,!1),cp(this)&&this._resume(),r0(l.resumeQueue),v1(this,"onResume",Ec(this,g1(this,this.animation.to)),this))},start:this._merge.bind(this,s)}}).then(c=>{if(o.loop&&c.finished&&!(r&&c.noop)){let u=I$(o);if(u)return this._update(u,!0)}return c})}_merge(t,r,o){if(r.cancel)return this.stop(!0),o(i0(this));let n=!Re.und(t.to),i=!Re.und(t.from);if(n||i)if(r.callId>this._lastToId)this._lastToId=r.callId;else return o(i0(this));let{key:s,defaultProps:l,animation:c}=this,{to:u,from:d}=c,{to:f=u,from:m=d}=t;i&&!n&&(!r.default||Re.und(f))&&(f=m),r.reverse&&([f,m]=[m,f]);let h=!Pu(m,d);h&&(c.from=m),m=li(m);let g=!Pu(f,u);g&&this._focus(f);let v=X8(r.to),{config:b}=c,{decay:S,velocity:y}=b;(n||i)&&(b.velocity=0),r.config&&!v&&X3e(b,Kg(r.config,s),r.config!==l.config?Kg(l.config,s):void 0);let w=Tc(this);if(!w||Re.und(f))return o(Ec(this,!0));let _=Re.und(r.reset)?i&&!r.default:!Re.und(m)&&b1(r.reset,s),x=_?m:this.get(),E=y1(f),O=Re.num(E)||Re.arr(E)||n0(E),A=!v&&(!O||b1(l.immediate||r.immediate,s));if(g){let P=IR(f);if(P!==w.constructor)if(A)w=this._set(E);else throw Error(`Cannot animate between ${w.constructor.name} and ${P.name}, as the "to" prop suggests`)}let C=w.constructor,I=ds(f),k=!1;if(!I){let P=_||!K8(this)&&h;(g||P)&&(k=Pu(y1(x),E),I=!k),(!Pu(c.immediate,A)&&!A||!Pu(b.decay,S)||!Pu(b.velocity,y))&&(I=!0)}if(k&&cp(this)&&(c.changed&&!_?I=!0:I||this._stop(u)),!v&&((I||ds(u))&&(c.values=w.getPayload(),c.toValues=ds(f)?null:C==Yg?[1]:$s(E)),c.immediate!=A&&(c.immediate=A,!A&&!_&&this._set(u)),I)){let{onRest:P}=c;Ir(J3e,U=>w$(this,r,U));let N=Ec(this,g1(this,u));r0(this._pendingCalls,N),this._pendingCalls.add(o),c.changed&&pt.batchedUpdates(()=>{c.changed=!_,P?.(N,this),_?Kg(l.onRest,N):c.onStart==null||c.onStart(N,this)})}_&&this._set(x),v?o(R$(r.to,r,this._state,this)):I?this._start():cp(this)&&!g?this._pendingCalls.add(o):o(k$(x))}_focus(t){let r=this.animation;t!==r.to&&(U8(this)&&this._detach(),r.to=t,U8(this)&&this._attach())}_attach(){let t=0,{to:r}=this.animation;ds(r)&&(ap(r,this),e7(r)&&(t=r.priority+1)),this.priority=t}_detach(){let{to:t}=this.animation;ds(t)&&lp(t,this)}_set(t,r=!0){let o=li(t);if(!Re.und(o)){let n=Tc(this);if(!n||!Pu(o,n.getValue())){let i=IR(o);!n||n.constructor!=i?AR(this,i.create(o)):n.setValue(o),n&&pt.batchedUpdates(()=>{this._onChange(o,r)})}}return Tc(this)}_onStart(){let t=this.animation;t.changed||(t.changed=!0,v1(this,"onStart",Ec(this,g1(this,t.to)),this))}_onChange(t,r){r||(this._onStart(),Kg(this.animation.onChange,t,this)),Kg(this.defaultProps.onChange,t,this),super._onChange(t,r)}_start(){let t=this.animation;Tc(this).reset(li(t.to)),t.immediate||(t.fromValues=t.values.map(r=>r.lastPosition)),cp(this)||(v$(this,!0),h1(this)||this._resume())}_resume(){Ya.skipAnimation?this.finish():o0.start(this)}_stop(t,r){if(cp(this)){v$(this,!1);let o=this.animation;Ir(o.values,i=>{i.done=!0}),o.toValues&&(o.onChange=o.onPause=o.onResume=void 0),Wg(this,{type:"idle",parent:this});let n=r?i0(this.get()):Ec(this.get(),g1(this,t??o.to));r0(this._pendingCalls,n),o.changed&&(o.changed=!1,v1(this,"onRest",n,this))}}};function g1(e,t){let r=y1(t),o=y1(e.get());return Pu(o,r)}function I$(e,t=e.loop,r=e.to){let o=Kg(t);if(o){let n=o!==!0&&E$(o),i=(n||e).reverse,s=!n||n.reset;return n7(fs({},e,{loop:t,default:!1,pause:void 0,to:!i||X8(r)?r:void 0,from:s?e.from:void 0,reset:s},n))}}function n7(e){let{to:t,from:r}=e=E$(e),o=new Set;return Re.obj(t)&&y$(t,o),Re.obj(r)&&y$(r,o),e.keys=o.size?Array.from(o):null,e}function y$(e,t){_l(e,(r,o)=>r!=null&&t.add(o))}var J3e=["onStart","onRest","onChange","onPause","onResume"];function w$(e,t,r){e.animation[r]=t[r]!==C$(t,r)?x$(t[r],e.key):void 0}function v1(e,t,...r){var o,n,i,s;(o=(n=e.animation)[t])==null||o.call(n,...r),(i=(s=e.defaultProps)[t])==null||i.call(s,...r)}var $3e=["onStart","onChange","onRest"],e6e=1,LR=class{constructor(t,r){this.id=e6e++,this.springs={},this.queue=[],this.ref=void 0,this._flush=void 0,this._initialProps=void 0,this._lastAsyncId=0,this._active=new Set,this._changed=new Set,this._started=!1,this._item=void 0,this._state={paused:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._events={onStart:new Map,onChange:new Map,onRest:new Map},this._onFrame=this._onFrame.bind(this),r&&(this._flush=r),t&&this.start(fs({default:!0},t))}get idle(){return!this._state.asyncTo&&Object.values(this.springs).every(t=>t.idle&&!t.isDelayed&&!t.isPaused)}get item(){return this._item}set item(t){this._item=t}get(){let t={};return this.each((r,o)=>t[o]=r.get()),t}set(t){for(let r in t){let o=t[r];Re.und(o)||this.springs[r].set(o)}}update(t){return t&&this.queue.push(n7(t)),this}start(t){let{queue:r}=this;return t?r=$s(t).map(n7):this.queue=[],this._flush?this._flush(this,r):(N$(this,r),t6e(this,r))}stop(t,r){if(t!==!!t&&(r=t),r){let o=this.springs;Ir($s(r),n=>o[n].stop(!!t))}else w1(this._state,this._lastAsyncId),this.each(o=>o.stop(!!t));return this}pause(t){if(Re.und(t))this.start({pause:!0});else{let r=this.springs;Ir($s(t),o=>r[o].pause())}return this}resume(t){if(Re.und(t))this.start({pause:!1});else{let r=this.springs;Ir($s(t),o=>r[o].resume())}return this}each(t){_l(this.springs,t)}_onFrame(){let{onStart:t,onChange:r,onRest:o}=this._events,n=this._active.size>0,i=this._changed.size>0;(n&&!this._started||i&&!this._started)&&(this._started=!0,t0(t,([c,u])=>{u.value=this.get(),c(u,this,this._item)}));let s=!n&&this._started,l=i||s&&o.size?this.get():null;i&&r.size&&t0(r,([c,u])=>{u.value=l,c(u,this,this._item)}),s&&(this._started=!1,t0(o,([c,u])=>{u.value=l,c(u,this,this._item)}))}eventObserved(t){if(t.type=="change")this._changed.add(t.parent),t.idle||this._active.add(t.parent);else if(t.type=="idle")this._active.delete(t.parent);else return;pt.onFrame(this._onFrame)}};function t6e(e,t){return Promise.all(t.map(r=>O$(e,r))).then(r=>s7(e,r))}async function O$(e,t,r){let{keys:o,to:n,from:i,loop:s,onRest:l,onResolve:c}=t,u=Re.obj(t.default)&&t.default;s&&(t.loop=!1),n===!1&&(t.to=null),i===!1&&(t.from=null);let d=Re.arr(n)||Re.fun(n)?n:void 0;d?(t.to=void 0,t.onRest=void 0,u&&(u.onRest=void 0)):Ir($3e,v=>{let b=t[v];if(Re.fun(b)){let S=e._events[v];t[v]=({finished:y,cancelled:w})=>{let _=S.get(b);_?(y||(_.finished=!1),w&&(_.cancelled=!0)):S.set(b,{value:null,finished:y||!1,cancelled:w||!1})},u&&(u[v]=t[v])}});let f=e._state;t.pause===!f.paused?(f.paused=t.pause,r0(t.pause?f.pauseQueue:f.resumeQueue)):f.paused&&(t.pause=!0);let m=(o||Object.keys(e.springs)).map(v=>e.springs[v].start(t)),h=t.cancel===!0||C$(t,"cancel")===!0;(d||h&&f.asyncId)&&m.push(P$(++e._lastAsyncId,{props:t,state:f,actions:{pause:xR,resume:xR,start(v,b){h?(w1(f,e._lastAsyncId),b(i0(e))):(v.onRest=l,b(R$(d,v,f,e)))}}})),f.paused&&await new Promise(v=>{f.resumeQueue.add(v)});let g=s7(e,await Promise.all(m));if(s&&g.finished&&!(r&&g.noop)){let v=I$(t,s,n);if(v)return N$(e,[v]),O$(e,v,!0)}return c&&pt.batchedUpdates(()=>c(g,e,e.item)),g}function r6e(e,t){let r=new o7;return r.key=e,t&&ap(r,t),r}function o6e(e,t,r){t.keys&&Ir(t.keys,o=>{(e[o]||(e[o]=r(o)))._prepareNode(t)})}function N$(e,t){Ir(t,r=>{o6e(e.springs,r,o=>r6e(o,e))})}function n6e(e,t){if(e==null)return{};var r={},o=Object.keys(e),n,i;for(i=0;i<o.length;i++)n=o[i],!(t.indexOf(n)>=0)&&(r[n]=e[n]);return r}var i6e=["children"],a7=e=>{let{children:t}=e,r=n6e(e,i6e),o=(0,x1.useContext)(BR),n=r.pause||!!o.pause,i=r.immediate||!!o.immediate;r=s$(()=>({pause:n,immediate:i}),[n,i]);let{Provider:s}=BR;return _1.createElement(s,{value:r},t)},BR=s6e(a7,{});a7.Provider=BR.Provider;a7.Consumer=BR.Consumer;function s6e(e,t){return Object.assign(e,_1.createContext(t)),e.Provider._context=e,e.Consumer._context=e,e}var S$;(function(e){e.MOUNT="mount",e.ENTER="enter",e.UPDATE="update",e.LEAVE="leave"})(S$||(S$={}));var i7=class extends S1{constructor(t,r){super(),this.key=void 0,this.idle=!0,this.calc=void 0,this._active=new Set,this.source=t,this.calc=sp(...r);let o=this._get(),n=IR(o);AR(this,n.create(o))}advance(t){let r=this._get(),o=this.get();Pu(r,o)||(Tc(this).setValue(r),this._onChange(r,this.idle)),!this.idle&&_$(this._active)&&Z8(this)}_get(){let t=Re.arr(this.source)?this.source.map(li):$s(li(this.source));return this.calc(...t)}_start(){this.idle&&!_$(this._active)&&(this.idle=!1,Ir(p1(this),t=>{t.done=!1}),Ya.skipAnimation?(pt.batchedUpdates(()=>this.advance()),Z8(this)):o0.start(this))}_attach(){let t=1;Ir($s(this.source),r=>{ds(r)&&ap(r,this),e7(r)&&(r.idle||this._active.add(r),t=Math.max(t,r.priority+1))}),this.priority=t,this._start()}_detach(){Ir($s(this.source),t=>{ds(t)&&lp(t,this)}),this._active.clear(),Z8(this)}eventObserved(t){t.type=="change"?t.idle?this.advance():(this._active.add(t.parent),this._start()):t.type=="idle"?this._active.delete(t.parent):t.type=="priority"&&(this.priority=$s(this.source).reduce((r,o)=>Math.max(r,(e7(o)?o.priority:0)+1),0))}};function a6e(e){return e.idle!==!1}function _$(e){return!e.size||Array.from(e).every(a6e)}function Z8(e){e.idle||(e.idle=!0,Ir(p1(e),t=>{t.done=!0}),Wg(e,{type:"idle",parent:e}))}Ya.assign({createStringInterpolator:ER,to:(e,t)=>new i7(e,t)});var q0t=o0.advance;var F$=a(_u());function d7(e,t){if(e==null)return{};var r={},o=Object.keys(e),n,i;for(i=0;i<o.length;i++)n=o[i],!(t.indexOf(n)>=0)&&(r[n]=e[n]);return r}var l6e=["style","children","scrollTop","scrollLeft"],D$=/^--/;function c6e(e,t){return t==null||typeof t=="boolean"||t===""?"":typeof t=="number"&&t!==0&&!D$.test(e)&&!(C1.hasOwnProperty(e)&&C1[e])?t+"px":(""+t).trim()}var M$={};function u6e(e,t){if(!e.nodeType||!e.setAttribute)return!1;let r=e.nodeName==="filter"||e.parentNode&&e.parentNode.nodeName==="filter",o=t,{style:n,children:i,scrollTop:s,scrollLeft:l}=o,c=d7(o,l6e),u=Object.values(c),d=Object.keys(c).map(f=>r||e.hasAttribute(f)?f:M$[f]||(M$[f]=f.replace(/([A-Z])/g,m=>"-"+m.toLowerCase())));i!==void 0&&(e.textContent=i);for(let f in n)if(n.hasOwnProperty(f)){let m=c6e(f,n[f]);D$.test(f)?e.style.setProperty(f,m):e.style[f]=m}d.forEach((f,m)=>{e.setAttribute(f,u[m])}),s!==void 0&&(e.scrollTop=s),l!==void 0&&(e.scrollLeft=l)}var C1={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},d6e=(e,t)=>e+t.charAt(0).toUpperCase()+t.substring(1),f6e=["Webkit","Ms","Moz","O"];C1=Object.keys(C1).reduce((e,t)=>(f6e.forEach(r=>e[d6e(r,t)]=e[t]),e),C1);var m6e=["x","y","z"],p6e=/^(matrix|translate|scale|rotate|skew)/,h6e=/^(translate)/,g6e=/^(rotate|skew)/,l7=(e,t)=>Re.num(e)&&e!==0?e+t:e,VR=(e,t)=>Re.arr(e)?e.every(r=>VR(r,t)):Re.num(e)?e===t:parseFloat(e)===t,c7=class extends qg{constructor(t){let{x:r,y:o,z:n}=t,i=d7(t,m6e),s=[],l=[];(r||o||n)&&(s.push([r||0,o||0,n||0]),l.push(c=>[`translate3d(${c.map(u=>l7(u,"px")).join(",")})`,VR(c,0)])),_l(i,(c,u)=>{if(u==="transform")s.push([c||""]),l.push(d=>[d,d===""]);else if(p6e.test(u)){if(delete i[u],Re.und(c))return;let d=h6e.test(u)?"px":g6e.test(u)?"deg":"";s.push($s(c)),l.push(u==="rotate3d"?([f,m,h,g])=>[`rotate3d(${f},${m},${h},${l7(g,d)})`,VR(g,0)]:f=>[`${u}(${f.map(m=>l7(m,d)).join(",")})`,VR(f,u.startsWith("scale")?1:0)])}}),s.length&&(i.transform=new u7(s,l)),super(i)}},u7=class extends e0{constructor(t,r){super(),this._value=null,this.inputs=t,this.transforms=r}get(){return this._value||(this._value=this._get())}_get(){let t="",r=!0;return Ir(this.inputs,(o,n)=>{let i=li(o[0]),[s,l]=this.transforms[n](Re.arr(i)?i:o.map(li));t+=" "+s,r=r&&l}),r?"none":t}observerAdded(t){t==1&&Ir(this.inputs,r=>Ir(r,o=>ds(o)&&ap(o,this)))}observerRemoved(t){t==0&&Ir(this.inputs,r=>Ir(r,o=>ds(o)&&lp(o,this)))}eventObserved(t){t.type=="change"&&(this._value=null),Wg(this,t)}},v6e=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"],b6e=["scrollTop","scrollLeft"];Ya.assign({batchedUpdates:F$.unstable_batchedUpdates,createStringInterpolator:ER,colors:e$});var y6e=d$(v6e,{applyAnimatedValues:u6e,createAnimatedStyle:e=>new c7(e),getComponentProps:e=>d7(e,b6e)}),twt=y6e.animated;var T1=a(H(),1);function L$(e){return{top:e.offsetTop,left:e.offsetLeft}}function B$(e){let t=(0,T1.useRef)(null),r=(0,T1.useRef)(void 0);return t.current&&(r.current=L$(t.current)),(0,T1.useLayoutEffect)(()=>{let o=r.current;if(!o||!t.current||window.matchMedia("(prefers-reduced-motion: reduce)").matches)return;let n=new LR({x:0,y:0,config:{mass:5,tension:2e3,friction:200},onChange({value:c}){if(!t.current)return;let{x:u,y:d}=c;u=Math.round(u),d=Math.round(d);let f=u===0&&d===0;t.current.style.transform=f?"":`translate3d(${u}px,${d}px,0)`}});t.current.style.transform="";let i=L$(t.current),s=Math.round(o.left-i.left),l=Math.round(o.top-i.top);return n.start({x:0,y:0,from:{x:s,y:l}}),()=>{n.stop(),n.set({x:0,y:0})}},[e]),t}var Fe=a(T(),1),{MediaUploadModal:w6e}=Nn(a0.privateApis);function j$({children:e,index:t,className:r}){let o=B$(t);return(0,Fe.jsx)("div",{ref:o,className:r,children:e})}function s0(e){return Array.isArray(e)?e:e?[e]:[]}function S6e({render:e,multiple:t,...r}){let[o,n]=(0,Xr.useState)(!1);return window.__experimentalDataViewsMediaModal?(0,Fe.jsxs)(Fe.Fragment,{children:[e&&e({open:()=>n(!0)}),o&&(0,Fe.jsx)(w6e,{...r,multiple:t,isOpen:o,onClose:()=>{n(!1),r.onClose?.()},onSelect:i=>{n(!1),r.onSelect?.(i)}})]}):(0,Fe.jsx)(a0.MediaUpload,{...r,render:e,multiple:t?"add":void 0})}function m7({open:e,children:t,label:r,showTooltip:o=!1,onFilesDrop:n,attachment:i,isUploading:s=!1}){let l=i&&(0,Xg.isBlobURL)(i.source_url),c=(0,Fe.jsxs)("div",{className:Q("fields__media-edit-picker-button",{"has-attachment":i}),role:"button",tabIndex:0,onClick:()=>{s||e()},onKeyDown:u=>{s||(u.key==="Enter"||u.key===" ")&&(u.preventDefault(),e())},"aria-label":r,"aria-disabled":s,children:[t,l&&(0,Fe.jsx)("span",{className:"fields__media-edit-picker-button-spinner",children:(0,Fe.jsx)(Sr.Spinner,{})}),!s&&(0,Fe.jsx)(Sr.DropZone,{onFilesDrop:u=>n(u,i?.id)})]});return o?(0,Fe.jsxs)(We.Root,{children:[(0,Fe.jsx)(We.Trigger,{render:c}),(0,Fe.jsx)(We.Popup,{children:r})]}):c}var _6e=["application/zip","application/x-zip-compressed","application/x-rar-compressed","application/x-7z-compressed","application/x-tar","application/x-gzip"];function x6e({attachment:e}){return(0,Fe.jsx)(Sr.__experimentalTruncate,{className:"fields__media-edit-filename",children:e.title.rendered})}function z$(e){return(0,Fe.jsx)(m7,{...e,children:(0,Fe.jsx)("span",{className:"fields__media-edit-placeholder",children:e.label})})}function H$({itemId:e,index:t,totalItems:r,isUploading:o,moveItem:n,orientation:i="vertical"}){let s=i==="horizontal";return(0,Fe.jsxs)(Fe.Fragment,{children:[(0,Fe.jsx)(Sr.Button,{__next40pxDefaultSize:!0,icon:s?xr:S4,label:s?(0,ms.__)("Move left"):(0,ms.__)("Move up"),size:"small",disabled:o||t===0,accessibleWhenDisabled:!0,tooltipPosition:"top",onClick:l=>{l.stopPropagation(),n(e,"up")}}),(0,Fe.jsx)(Sr.Button,{__next40pxDefaultSize:!0,icon:s?Cr:J_,label:s?(0,ms.__)("Move right"):(0,ms.__)("Move down"),size:"small",disabled:o||t===r-1,accessibleWhenDisabled:!0,tooltipPosition:"top",onClick:l=>{l.stopPropagation(),n(e,"down")}})]})}function U$({attachment:e}){let t=e.source_url,r=e.mime_type||"";return r.startsWith("image")?(0,Fe.jsx)("img",{className:"fields__media-edit-thumbnail",alt:e.alt_text||"",src:t}):r.startsWith("audio")?(0,Fe.jsx)(Sr.Icon,{icon:n4}):r.startsWith("video")?(0,Fe.jsx)(Sr.Icon,{icon:mB}):_6e.includes(r)?(0,Fe.jsx)(Sr.Icon,{icon:YD}):(0,Fe.jsx)(Sr.Icon,{icon:Z4})}function C6e({allItems:e,addButtonLabel:t,multiple:r,removeItem:o,moveItem:n,open:i,onFilesDrop:s,isUploading:l,setTargetItemId:c}){return(0,Fe.jsxs)("div",{className:Q("fields__media-edit-expanded",{"is-multiple":r,"is-single":!r,"is-empty":!e?.length}),children:[e?.map((u,d)=>{let f=u.mime_type?.startsWith("image"),m=(0,Xg.isBlobURL)(u.source_url),h=u.id;return(0,Fe.jsxs)(j$,{index:d,className:Q("fields__media-edit-expanded-item",{"has-preview-image":f}),children:[(0,Fe.jsx)(m7,{open:()=>{c(h),i()},label:m?(0,ms.__)("Replace"):(0,ms.sprintf)((0,ms.__)("Replace %s"),u.title.rendered),showTooltip:!0,onFilesDrop:s,attachment:u,isUploading:l,children:(0,Fe.jsx)("div",{className:"fields__media-edit-expanded-preview",children:(0,Fe.jsx)(Sr.__experimentalVStack,{spacing:0,alignment:"center",justify:"center",className:"fields__media-edit-expanded-preview-stack",children:(!m||f)&&(0,Fe.jsx)(U$,{attachment:u})})})}),!m&&(0,Fe.jsx)("div",{className:"fields__media-edit-expanded-overlay",children:(0,Fe.jsxs)(Sr.__experimentalHStack,{className:"fields__media-edit-expanded-actions",spacing:0,alignment:"flex-end",expanded:!1,children:[r&&e.length>1&&(0,Fe.jsx)(H$,{itemId:h,index:d,totalItems:e.length,isUploading:l,moveItem:n,orientation:"horizontal"}),(0,Fe.jsx)(Sr.Button,{__next40pxDefaultSize:!0,icon:_i,label:(0,ms.__)("Remove"),size:"small",disabled:l,accessibleWhenDisabled:!0,tooltipPosition:"top",onClick:g=>{g.stopPropagation(),o(h)}})]})})]},u.id)}),(r||!e?.length)&&(0,Fe.jsx)(z$,{open:()=>{c(void 0),i()},label:t,onFilesDrop:s,isUploading:l})]})}function T6e({allItems:e,addButtonLabel:t,multiple:r,removeItem:o,moveItem:n,open:i,onFilesDrop:s,isUploading:l,setTargetItemId:c}){return(0,Fe.jsxs)(Fe.Fragment,{children:[!!e?.length&&(0,Fe.jsx)("div",{className:Q("fields__media-edit-compact-group",{"is-single":e.length===1}),children:(0,Fe.jsx)(Sr.__experimentalVStack,{spacing:0,children:e.map((u,d)=>{let f=(0,Xg.isBlobURL)(u.source_url),m=r&&e.length>1,h=u.id;return(0,Fe.jsxs)(j$,{index:d,className:"fields__media-edit-compact",children:[(0,Fe.jsx)(m7,{open:()=>{c(h),i()},label:(0,ms.__)("Replace"),showTooltip:!0,onFilesDrop:s,attachment:u,isUploading:l,children:(0,Fe.jsxs)(Fe.Fragment,{children:[(0,Fe.jsx)(U$,{attachment:u}),!f&&(0,Fe.jsx)(x6e,{attachment:u})]})}),!f&&(0,Fe.jsxs)(Sr.__experimentalHStack,{className:"fields__media-edit-compact-movers",spacing:0,alignment:"flex-end",expanded:!1,children:[m&&(0,Fe.jsx)(H$,{itemId:h,index:d,totalItems:e.length,isUploading:l,moveItem:n,orientation:"vertical"}),(0,Fe.jsx)(Sr.Button,{__next40pxDefaultSize:!0,icon:_i,label:(0,ms.__)("Remove"),size:"small",disabled:l,accessibleWhenDisabled:!0,tooltipPosition:"top",onClick:g=>{g.stopPropagation(),o(h)}})]})]},u.id)})})}),(r||!e?.length)&&(0,Fe.jsx)(z$,{open:()=>{c(void 0),i()},label:t,onFilesDrop:s,isUploading:l})]})}function W$({data:e,field:t,onChange:r,hideLabelFromVision:o,allowedTypes:n=["image"],multiple:i,isExpanded:s,validity:l}){let c=t.getValue({item:e}),[u,d]=(0,Xr.useState)(!1),f=(0,Xr.useRef)(null),[m,h]=(0,Xr.useState)(void 0);(0,Xr.useEffect)(()=>{let L=f.current,M=()=>{d(!0)};return L?.addEventListener("invalid",M),()=>L?.removeEventListener("invalid",M)},[]);let g=(0,E1.useSelect)(L=>{if(!c)return null;let z=s0(c).toSorted((Z,q)=>Z-q),{getEntityRecords:K}=L(f7.store);return K("postType","attachment",{include:z})},[c]),v=(0,Xr.useRef)(null);g!==null&&(v.current=g);let b=g;if(g===null&&v.current&&c){let L=new Set(v.current.map(M=>M.id));s0(c).every(M=>L.has(M))&&(b=v.current)}let S=(0,Xr.useMemo)(()=>{if(!b)return null;let L=s0(c),M=new Map(b.map(z=>[z.id,z]));return L.map(z=>M.get(z)).filter(z=>z!==void 0)},[b,c]),{createErrorNotice:y}=(0,E1.useDispatch)(V$.store),{receiveEntityRecords:w}=(0,E1.useDispatch)(f7.store),[_,x]=(0,Xr.useState)(),E=(0,Xr.useRef)(void 0),[O,A]=(0,Xr.useState)(!1),[C,I]=(0,Xr.useState)([]);(0,Xr.useEffect)(()=>{O&&(A(!1),E.current?.())},[O]);let k=(0,Xr.useCallback)(L=>r(t.setValue({item:e,value:L})),[e,t,r]),P=(0,Xr.useCallback)(L=>{let z=s0(c).filter(K=>K!==L);d(!0),k(z.length?z:void 0)},[c,k]),N=(0,Xr.useCallback)((L,M)=>{if(!S)return;let z=S.map(q=>q.id),K=z.indexOf(L),Z=M==="up"?K-1:K+1;[z[K],z[Z]]=[z[Z],z[K]],k(z)},[S,k]),U=(0,Xr.useCallback)((L,M)=>{x(M),(0,a0.uploadMedia)({allowedTypes:n?.length?n:void 0,filesList:L,onFileChange(z){let K=z.filter(X=>(0,Xg.isBlobURL)(X.url)).map(X=>X.url);if(I(K),K.length)return;w("postType","attachment",[],void 0,!0);let Z=z.map(X=>X.id);if(!i){k(Z[0]),x(void 0);return}let q=s0(c);if(M===void 0)k([...q,...Z]);else{let X=[...q];X.splice(q.indexOf(M),1,...Z),k(X)}x(void 0)},onError(z){x(void 0),I([]),y(z.message,{type:"snackbar"})},multiple:!!i})},[n,c,i,y,k,w]),F=t.placeholder||(i?(0,ms.__)("Choose files"):(0,ms.__)("Choose file")),D=(0,Xr.useMemo)(()=>{if(!C.length)return S;let L=[...S||[]],M=C.map(z=>({id:z,source_url:z,mime_type:(0,Xg.getBlobTypeByURL)(z)}));if(_!==void 0){let z=L.findIndex(K=>K.id===_);L.splice(z,1,...M)}else L.push(...M);return L},[S,_,C]);(0,Xr.useEffect)(()=>{if(!u)return;let L=f.current;if(L)if(l){let M=l?.custom;h(M),M?.type==="invalid"?L.setCustomValidity(M.message||(0,ms.__)("Invalid")):L.setCustomValidity("")}else L.setCustomValidity(""),h(void 0)},[u,t.isValid,l]);let B=(0,Xr.useCallback)(L=>{u||(!L.relatedTarget||!L.currentTarget.contains(L.relatedTarget))&&d(!0)},[u]);return(0,Fe.jsxs)("div",{onBlur:B,children:[(0,Fe.jsx)("fieldset",{className:"fields__media-edit","data-field-id":t.id,children:(0,Fe.jsx)(S6e,{onSelect:L=>{if(!i){k(L.id),x(void 0);return}let M=Array.isArray(L)?L.map(K=>K.id):[L.id],z=s0(c);if(!z.length)k(M);else if(_===void 0){let K=z.filter(q=>M.includes(q)),Z=M.filter(q=>!z.includes(q));k([...K,...Z])}else if(L.id!==_){let K=z.filter(Z=>Z!==L.id);k(K.map(Z=>Z===_?L.id:Z))}x(void 0)},onClose:()=>x(void 0),allowedTypes:n,value:_!==void 0?_:c,multiple:i&&_===void 0,title:t.label,render:({open:L})=>{E.current=L;let M=s?C6e:T6e;return(0,Fe.jsxs)(Sr.__experimentalVStack,{spacing:2,children:[t.label&&(o?(0,Fe.jsx)(Ut,{render:(0,Fe.jsx)("legend",{}),children:t.label}):(0,Fe.jsx)(Sr.BaseControl.VisualLabel,{as:"legend",style:{marginBottom:0},children:t.label})),(0,Fe.jsx)(M,{allItems:D,addButtonLabel:F,multiple:i,removeItem:P,moveItem:N,open:()=>A(!0),onFilesDrop:U,isUploading:!!C.length,setTargetItemId:x}),t.description&&(0,Fe.jsx)(Sr.__experimentalText,{variant:"muted",className:"fields__media-edit-description",children:t.description})]})}})}),(0,Fe.jsx)(Ut,{children:(0,Fe.jsx)("input",{type:"text",ref:f,value:c??"",tabIndex:-1,"aria-hidden":"true",onChange:()=>{}})}),m&&(0,Fe.jsx)("div",{"aria-live":"polite",children:(0,Fe.jsxs)("p",{className:Q("components-validated-control__indicator",{"is-invalid":m.type==="invalid","is-valid":m.type==="valid"}),children:[(0,Fe.jsx)(Sr.Icon,{className:"components-validated-control__indicator-icon",icon:qd,size:16,fill:"currentColor"}),m.message]})})]})}var p7=a(T(),1),G$=({item:e,config:t})=>{let r=e?._embedded?.["wp:featuredmedia"]?.[0],o=r?.source_url;return o?(0,p7.jsx)("img",{className:"fields-controls__featured-image-image",src:o,alt:"",srcSet:r?.media_details?.sizes?Object.values(r.media_details.sizes).map(n=>`${n.source_url} ${n.width}w`).join(", "):void 0,sizes:t?.sizes||"100vw"}):(0,p7.jsx)("span",{className:"fields-controls__featured-image-placeholder"})};var Y$=a(T(),1),E6e={id:"featured_media",type:"media",label:(0,h7.__)("Featured Image"),placeholder:(0,h7.__)("Set featured image"),Edit:e=>(0,Y$.jsx)(W$,{...e,isExpanded:!0}),render:G$,setValue:({value:e})=>({featured_media:e??0}),enableSorting:!1,filterBy:!1},g7=E6e;var J$=a(V(),1);var k1=a(H(),1),HR=a(oe(),1),b7=a(W(),1),y7=a(G(),1),w7=a(V(),1);var v7=a(G(),1),xl=a(oe(),1);function jR(e){let t=e.type,r=e?.available_templates??{},o=Object.keys(r).length>0;return(0,v7.useSelect)(n=>{let i=!!n(xl.store).getCurrentTheme()?.is_block_theme;if(!n(xl.store).getPostType(t)?.viewable)return null;let l=i&&(n(xl.store).canUser("create",{kind:"postType",name:"wp_template"})??!1),c=o||l,u=c?!!n(xl.store).canUser("read",{kind:"postType",name:"wp_template"}):!1;return(!i||!u)&&c?"classic":i&&u?"block-theme":null},[t,o])}function P6e(e,t){return t?e==="page"?`${e}-${t}`:`single-${e}-${t}`:e==="page"?"page":`single-${e}`}var P1="";function zR(e,t,r){return(0,v7.useSelect)(o=>{if(!e||!t)return P1;let n=String(t),i=Nn(o(xl.store)).getHomePage();if(e==="page"&&i?.postType==="page"&&i?.postId===n){let f=o(xl.store).getEntityRecords("postType","wp_template",{per_page:-1})?.find(m=>m.slug==="front-page");if(f)return ft(f)}let s=Nn(o(xl.store)).getPostsPageId();if(e==="page"&&s===n){let d=o(xl.store).getDefaultTemplateId({slug:"home"});if(!d)return P1;let f=o(xl.store).getEntityRecord("postType","wp_template",d);return f?ft(f):P1}let l=P6e(e,r),c=o(xl.store).getDefaultTemplateId({slug:l});if(!c)return P1;let u=o(xl.store).getEntityRecord("postType","wp_template",c);return u?ft(u):P1},[e,t,r])}var UR=a(T(),1),k6e=[];function R6e({data:e,field:t,onChange:r}){let o=typeof e.id=="number"?e.id:parseInt(e.id,10),n=t.getValue({item:e}),i=(0,k1.useMemo)(()=>Object.entries(e?.available_templates??{}).map(([l,c])=>({label:c,value:l})),[e]),s=(0,y7.useSelect)(l=>{let{getHomePage:c,getPostsPageId:u}=Nn(l(HR.store)),d=String(o),f=u()===d,m=e.type==="page"&&c()?.postId===d;return!f&&!m},[o,e.type]);return(0,UR.jsx)(b7.SelectControl,{__next40pxDefaultSize:!0,label:(0,w7.__)("Template"),hideLabelFromVision:!0,value:n,options:i,onChange:r,disabled:!s})}function A6e({data:e,field:t,onChange:r}){let o=e.type,n=typeof e.id=="number"?e.id:parseInt(e.id,10),i=e.slug,{templates:s,canSwitchTemplate:l}=(0,y7.useSelect)(f=>{let m=f(HR.store).getEntityRecords("postType","wp_template",{per_page:-1,post_type:o})??k6e,{getHomePage:h,getPostsPageId:g}=Nn(f(HR.store)),v=String(n),b=g()===v,S=o==="page"&&h()?.postId===v;return{templates:m,canSwitchTemplate:!b&&!S}},[n,o]),c=zR(o,n,i),u=t.getValue({item:e}),d=(0,k1.useMemo)(()=>{let f=s.map(m=>({label:ft(m),value:m.slug}));return[{label:c,value:""},...f]},[s,c]);return(0,UR.jsx)(b7.SelectControl,{__next40pxDefaultSize:!0,label:(0,w7.__)("Template"),hideLabelFromVision:!0,value:u,options:d,onChange:r,disabled:!l})}var q$=({data:e,field:t,onChange:r})=>{let o=(0,k1.useCallback)(s=>r({[t.id]:s}),[t.id,r]),n=jR(e);return!n||!["block-theme","classic"].includes(n)?null:(0,UR.jsx)(n==="classic"?R6e:A6e,{data:e,field:t,onChange:o})};var K$=a(G(),1),Z$=a(oe(),1),X$=a(V(),1);var Qg=a(T(),1);function I6e({item:e,field:t}){let r=t.getValue({item:e}),o=e?.available_templates??{},n=r&&o[r]?o[r]:(0,X$.__)("Default template");return(0,Qg.jsx)(Qg.Fragment,{children:n})}function O6e({item:e,field:t}){let r=e.type,o=e.slug,n=e.id,i=t.getValue({item:e}),s=zR(r,n,o),l=(0,K$.useSelect)(c=>{if(!i)return;let d=c(Z$.store).getEntityRecords("postType","wp_template",{per_page:-1,post_type:r})?.find(f=>f.slug===i);return d?ft(d):void 0},[r,i]);return(0,Qg.jsx)(Qg.Fragment,{children:l??s})}var Q$=({item:e,field:t})=>{let r=jR(e);return!r||!["block-theme","classic"].includes(r)?null:(0,Qg.jsx)(r==="classic"?I6e:O6e,{item:e,field:t})};var N6e={id:"template",type:"text",label:(0,J$.__)("Template"),Edit:q$,render:Q$,enableSorting:!1,filterBy:!1},S7=N6e;var mee=a(V(),1);var _7=a(l0(),1),GR=a(W(),1),x7=a(G(),1),nf=a(H(),1),C7=a(oe(),1),iee=a(ke(),1),see=a(Lt(),1),up=a(V(),1),aee=a(uo(),1);var ree=a(Lt(),1),oee=a(V(),1);function R1(e){return typeof e.title=="object"&&"rendered"in e.title&&e.title.rendered?(0,ree.decodeEntities)(e.title.rendered):`#${e?.id} (${(0,oee.__)("no title")})`}var of=a(T(),1);function B6e(e){let t=e.map(n=>({children:[],...n}));if(t.some(({parent:n})=>n==null))return t;let r=t.reduce((n,i)=>{let{parent:s}=i;return n[s]||(n[s]=[]),n[s].push(i),n},{}),o=n=>n.map(i=>{let s=r[i.id];return{...i,children:s&&s.length?o(s):[]}});return o(r[0]||[])}var nee=(e,t)=>{let r=(0,_7.default)(e||"").toLowerCase(),o=(0,_7.default)(t||"").toLowerCase();return r===o?0:r.startsWith(o)?r.length:1/0};function V6e({data:e,onChangeControl:t}){let[r,o]=(0,nf.useState)(""),n=e.parent,i=e.id,s=e.type,{parentPostTitle:l,pageItems:c,isHierarchical:u}=(0,x7.useSelect)(h=>{let{getEntityRecord:g,getEntityRecords:v,getPostType:b}=h(C7.store),S=b(s),y=S?.hierarchical&&S.viewable,w=n?g("postType",s,n):null,_={per_page:100,exclude:i,parent_exclude:i,orderby:"menu_order",order:"asc",_fields:"id,title,parent",...!!r&&{search:r,orderby:"relevance",search_columns:["post_title"]}};return{isHierarchical:y,parentPostTitle:w?R1(w):"",pageItems:y?v("postType",s,_):null}},[r,n,i,s]),d=(0,nf.useMemo)(()=>{let h=(S,y=0)=>S.map(x=>[{value:x.id,label:"\u2014 ".repeat(y)+(0,see.decodeEntities)(x.name),rawName:x.name},...h(x.children||[],y+1)]).sort(([x],[E])=>{let O=nee(x.rawName,r),A=nee(E.rawName,r);return O>=A?1:-1}).flat();if(!c)return[];let g=c.map(S=>({id:S.id,parent:S.parent??null,name:R1(S)}));r||(g=B6e(g));let v=h(g),b=v.find(S=>S.value===n);return n&&l&&!b&&v.unshift({value:n,label:l,rawName:""}),v.map(S=>({...S,value:S.value.toString()}))},[c,r,l,n]);if(!u)return null;let f=h=>{o(h)},m=h=>{if(h)return t(parseInt(h,10)??0);t(0)};return(0,of.jsx)(GR.ComboboxControl,{__next40pxDefaultSize:!0,label:(0,up.__)("Parent"),help:(0,up.__)("Choose a parent page."),value:n?.toString(),options:d,onFilterValueChange:(0,iee.debounce)(h=>f(h),300),onChange:m,hideLabelFromVision:!0})}var lee=({data:e,field:t,onChange:r})=>{let{id:o}=t,n=(0,x7.useSelect)(s=>s(C7.store).getEntityRecord("root","__unstableBase")?.home,[]),i=(0,nf.useCallback)(s=>r({[o]:s}),[o,r]);return(0,of.jsx)("fieldset",{className:"fields-controls__parent",children:(0,of.jsxs)("div",{children:[(0,nf.createInterpolateElement)((0,up.sprintf)((0,up.__)('Child pages inherit characteristics from their parent, such as URL structure. For instance, if "Pricing" is a child of "Services", its URL would be %1$s<wbr />/services<wbr />/pricing.'),(0,aee.filterURLForDisplay)(n).replace(/([/.])/g,"<wbr />$1")),{wbr:(0,of.jsx)("wbr",{})}),(0,of.jsx)("p",{children:(0,nf.createInterpolateElement)((0,up.__)("They also show up as sub-items in the default navigation menu. <a>Learn more.</a>"),{a:(0,of.jsx)(GR.ExternalLink,{href:(0,up.__)("https://wordpress.org/documentation/article/page-post-settings-sidebar/#page-attributes"),children:void 0})})}),(0,of.jsx)(V6e,{data:e,onChangeControl:i})]})})};var cee=a(G(),1),uee=a(oe(),1),dee=a(V(),1);var c0=a(T(),1),fee=({item:e})=>{let t=(0,cee.useSelect)(r=>{let{getEntityRecord:o}=r(uee.store);return e?.parent?o("postType",e.type,e.parent):null},[e.parent,e.type]);return t?(0,c0.jsx)(c0.Fragment,{children:R1(t)}):(0,c0.jsx)(c0.Fragment,{children:(0,dee.__)("None")})};var j6e={id:"parent",type:"text",label:(0,mee.__)("Parent"),Edit:lee,render:fee,enableSorting:!0,filterBy:!1},T7=j6e;var gee=a(V(),1);var d0=a(W(),1),pee=a(H(),1),A1=a(V(),1),u0=a(T(),1);function z6e({data:e,onChange:t,field:r}){let[o,n]=(0,pee.useState)(!!r.getValue({item:e})),i=s=>{n(s),s||t({password:""})};return(0,u0.jsxs)(d0.__experimentalVStack,{as:"fieldset",spacing:4,className:"fields-controls__password",children:[(0,u0.jsx)(d0.CheckboxControl,{label:(0,A1.__)("Password protected"),help:(0,A1.__)("Only visible to those who know the password"),checked:o,onChange:i}),o&&(0,u0.jsx)("div",{className:"fields-controls__password-input",children:(0,u0.jsx)(d0.TextControl,{label:(0,A1.__)("Password"),onChange:s=>t({password:s}),value:r.getValue({item:e})||"",placeholder:(0,A1.__)("Use a secure password"),type:"text",maxLength:255})})]})}var hee=z6e;var H6e={id:"password",type:"text",label:(0,gee.__)("Password"),Edit:hee,enableSorting:!1,enableHiding:!1,isVisible:e=>e.status!=="private",filterBy:!1},E7=H6e;var bee=a(V(),1);var qR=a(W(),1);var Cl=a(V(),1),U6e=[{value:"draft",label:(0,Cl.__)("Draft"),icon:yy,description:(0,Cl.__)("Not ready to publish.")},{value:"future",label:(0,Cl.__)("Scheduled"),icon:Vm,description:(0,Cl.__)("Publish automatically on a chosen date.")},{value:"pending",label:(0,Cl.__)("Pending Review"),icon:px,description:(0,Cl.__)("Waiting for review before publishing.")},{value:"private",label:(0,Cl.__)("Private"),icon:ux,description:(0,Cl.__)("Only visible to site admins and editors.")},{value:"publish",label:(0,Cl.__)("Published"),icon:xg,description:(0,Cl.__)("Visible to everyone.")},{value:"trash",label:(0,Cl.__)("Trash"),icon:Kd}],YR=U6e;var f0=a(T(),1);function W6e({item:e}){let t=YR.find(({value:n})=>n===e.status),r=t?.label||e.status,o=t?.icon;return(0,f0.jsxs)(qR.__experimentalHStack,{alignment:"left",spacing:0,children:[o&&(0,f0.jsx)("div",{className:"fields-controls__status-icon",children:(0,f0.jsx)(qR.Icon,{icon:o})}),(0,f0.jsx)("span",{children:r})]})}var vee=W6e;var G6e="isAny",Y6e={label:(0,bee.__)("Status"),id:"status",type:"text",elements:YR,render:vee,Edit:"radio",enableSorting:!1,filterBy:{operators:[G6e]}},P7=Y6e;var m0=a(V(),1),q6e={id:"comment_status",label:(0,m0.__)("Comments"),type:"text",Edit:"radio",enableSorting:!1,enableHiding:!1,filterBy:!1,elements:[{value:"open",label:(0,m0.__)("Open"),description:(0,m0.__)("Visitors can add new comments and replies.")},{value:"closed",label:(0,m0.__)("Closed"),description:(0,m0.__)("Visitors cannot add new comments or replies. Existing comments remain visible.")}]},k7=q6e;var sf=a(V(),1),KR=a(W(),1),R7=a(T(),1);function K6e({data:e,onChange:t}){let r=e?.ping_status??"open",o=n=>{t({...e,ping_status:n?"open":"closed"})};return(0,R7.jsx)(KR.CheckboxControl,{label:(0,sf.__)("Enable pingbacks & trackbacks"),checked:r==="open",onChange:o,help:(0,R7.jsx)(KR.ExternalLink,{href:(0,sf.__)("https://wordpress.org/documentation/article/trackbacks-and-pingbacks/"),children:(0,sf.__)("Learn more about pingbacks & trackbacks")})})}var Z6e={id:"ping_status",label:(0,sf.__)("Trackbacks & Pingbacks"),type:"text",Edit:K6e,enableSorting:!1,enableHiding:!1,filterBy:!1,elements:[{value:"open",label:(0,sf.__)("Allow"),description:(0,sf.__)("Allow link notifications from other blogs (pingbacks and trackbacks) on new articles.")},{value:"closed",label:(0,sf.__)("Don't allow"),description:(0,sf.__)("Don't allow link notifications from other blogs (pingbacks and trackbacks) on new articles.")}]},A7=Z6e;var p0=a(V(),1),X6e={id:"discussion",label:(0,p0.__)("Discussion"),type:"text",render:({item:e})=>{let t=e.comment_status==="open",r=e.ping_status==="open";return t&&r?(0,p0.__)("Open"):t&&!r?(0,p0.__)("Comments only"):!t&&r?(0,p0.__)("Pings only"):(0,p0.__)("Closed")},filterBy:!1},I7=X6e;var wee=a(V(),1);var Ru=a(V(),1),O1=a(H(),1),dp=a(en(),1),ku=a(T(),1),I1=e=>(0,dp.dateI18n)((0,dp.getSettings)().formats.datetimeAbbreviated,(0,dp.getDate)(e)),Q6e=({item:e})=>{if(["draft","private"].includes(e.status??""))return(0,O1.createInterpolateElement)((0,Ru.sprintf)((0,Ru.__)("<span>Modified: <time>%s</time></span>"),I1(e.date??null)),{span:(0,ku.jsx)("span",{}),time:(0,ku.jsx)("time",{})});if(e.status==="future")return(0,O1.createInterpolateElement)((0,Ru.sprintf)((0,Ru.__)("<span>Scheduled: <time>%s</time></span>"),I1(e.date??null)),{span:(0,ku.jsx)("span",{}),time:(0,ku.jsx)("time",{})});if(e.status==="publish")return(0,O1.createInterpolateElement)((0,Ru.sprintf)((0,Ru.__)("<span>Published: <time>%s</time></span>"),I1(e.date??null)),{span:(0,ku.jsx)("span",{}),time:(0,ku.jsx)("time",{})});let n=(0,dp.getDate)(e.modified??null)>(0,dp.getDate)(e.date??null)?e.modified:e.date;return e.status==="pending"?(0,O1.createInterpolateElement)((0,Ru.sprintf)((0,Ru.__)("<span>Modified: <time>%s</time></span>"),I1(n??null)),{span:(0,ku.jsx)("span",{}),time:(0,ku.jsx)("time",{})}):(0,ku.jsx)("time",{children:I1(e.date??null)})},yee=Q6e;var J6e={id:"date",type:"datetime",label:(0,wee.__)("Date"),render:yee,filterBy:{operators:["before","after"]}},O7=J6e;var See=a(V(),1),$6e={id:"scheduled_date",type:"datetime",label:(0,See.__)("Scheduled Date"),getValue:({item:e})=>e.date,setValue:({value:e})=>({date:e}),isVisible:e=>e.status==="future",Edit:{control:"datetime",compact:!0},enableHiding:!1,enableSorting:!1,filterBy:!1},N7=$6e;var Tee=a(V(),1);var ZR=a(V(),1),_ee=a(en(),1),xee=a(T(),1);function Cee({item:e}){return e.modified?(0,xee.jsx)(_c,{children:(0,ZR.sprintf)((0,ZR.__)("Last edited %s."),(0,_ee.humanTimeDiff)(e.modified))}):null}var eFe={id:"last_edited_date",type:"datetime",label:(0,Tee.__)("Last edited"),render:Cee,getValue:({item:e})=>e.modified,isVisible:e=>!!e.modified,readOnly:!0,enableHiding:!1,enableSorting:!1,filterBy:!1},M7=eFe;var Iee=a(V(),1),Oee=a(G(),1),Nee=a(oe(),1);var Eee=a(V(),1),Pee=a(H(),1);var XR=a(W(),1),kee=a(G(),1),Ree=a(oe(),1),fp=a(T(),1);function tFe({item:e}){let t=e?.author,r=e?._embedded?.author?.[0]?.id,o=!!(t&&(!r||t!==r)),n=(0,kee.useSelect)(u=>{if(!o)return null;let{getEntityRecord:d}=u(Ree.store);return t?d("root","user",t):null},[t,o]),i=n?.name||e?._embedded?.author?.[0]?.name,s=n?.avatar_urls?.[48]||e?._embedded?.author?.[0]?.avatar_urls?.[48],[l,c]=(0,Pee.useState)(!1);return(0,fp.jsxs)(XR.__experimentalHStack,{alignment:"left",spacing:0,children:[!!s&&(0,fp.jsx)("div",{className:Q("fields-controls__author-avatar",{"is-loaded":l}),children:(0,fp.jsx)("img",{onLoad:()=>c(!0),alt:(0,Eee.__)("Author avatar"),src:s})}),!s&&(0,fp.jsx)("div",{className:"fields-controls__author-icon",children:(0,fp.jsx)(XR.Icon,{icon:Sg})}),(0,fp.jsx)("span",{className:"fields-controls__author-name",children:i})]})}var Aee=tFe;var rFe={label:(0,Iee.__)("Author"),id:"author",type:"integer",getElements:async()=>(await(0,Oee.resolveSelect)(Nee.store).getEntityRecords("root","user",{per_page:-1,who:"authors",_fields:"id,name",context:"view"})??[]).map(({id:t,name:r})=>({value:t,label:r})),setValue:({value:e})=>({author:Number(e)}),render:Aee,sort:(e,t,r)=>{let o=e._embedded?.author?.[0]?.name||"",n=t._embedded?.author?.[0]?.name||"";return r==="asc"?o.localeCompare(n):n.localeCompare(o)},filterBy:{operators:["isAny","isNone"]}},N1=rFe;var D7=a(V(),1),Dee=a(G(),1),Lee=a(oe(),1);var Mee=a(H(),1),Fee=a(G(),1),QR=a(oe(),1);var mp=a(T(),1);function oFe(e){switch(e){case"theme":return ja;case"plugin":return kL;case"site":return sL;default:return Sg}}function F7({item:e}){let[t,r]=(0,Mee.useState)(!1),o=e.original_source,n=oFe(o),i=e.author_text,s=e.author,l=(0,Fee.useSelect)(c=>{if(o==="site"){let d=c(QR.store).getEntityRecord("root","__unstableBase")?.site_logo;return d?c(QR.store).getEntityRecord("postType","attachment",d)?.source_url:void 0}if(!(o!=="user"||!s))return c(QR.store).getUser(s)?.avatar_urls?.[48]},[o,s]);return(0,mp.jsxs)(ne,{direction:"row",align:"center",children:[l&&(0,mp.jsx)("div",{className:Q("fields-controls__author-avatar",{"is-loaded":t}),children:(0,mp.jsx)("img",{onLoad:()=>r(!0),alt:"",src:l})}),!l&&(0,mp.jsx)("div",{className:"fields-controls__author-icon",children:(0,mp.jsx)(zg,{icon:n})}),(0,mp.jsx)("span",{className:"fields-controls__author-name",children:i})]})}async function Bee(e){let t=await(0,Dee.resolveSelect)(Lee.store).getEntityRecords("postType",e,{per_page:-1,_fields:"id,author_text"}),r=new Set,o=[];for(let n of t??[]){let i=n.author_text;i&&!r.has(i)&&(r.add(i),o.push({value:i,label:i}))}return o}var L7={label:(0,D7.__)("Author"),id:"author",getValue:({item:e})=>e.author_text,render:F7,getElements:()=>Bee("wp_template")},B7={label:(0,D7.__)("Author"),id:"author",getValue:({item:e})=>e.author_text,render:F7,enableSorting:!1,filterBy:{isPrimary:!0},getElements:()=>Bee("wp_template_part")};var Vee=a(V(),1),nFe={id:"notesCount",label:(0,Vee.__)("Notes"),type:"integer",enableSorting:!1,filterBy:!1},V7=nFe;var j7=a(Lt(),1),h0=a(V(),1),JR=a(W(),1),z7=a(T(),1),iFe={id:"excerpt",type:"text",label:(0,h0.__)("Excerpt"),placeholder:(0,h0.__)("Add an excerpt"),description:(0,z7.jsx)(JR.ExternalLink,{href:(0,h0.__)("https://wordpress.org/documentation/article/page-post-settings-sidebar/#excerpt"),children:(0,h0.__)("Learn more about manual excerpts")}),render:({item:e})=>{let t;return typeof e.excerpt=="string"?t=e.excerpt?(0,j7.decodeEntities)(e.excerpt):(0,h0.__)("Add an excerpt"):t=(0,j7.decodeEntities)(e.excerpt?.raw||""),(0,z7.jsx)(JR.__experimentalText,{align:"left",numberOfLines:3,truncate:!0,children:t})},Edit:{control:"textarea",rows:4},enableSorting:!1,filterBy:!1},H7=iFe;var U7=a(Lt(),1),$R=a(V(),1);var jee=a(T(),1),zee=e=>e.source==="custom"&&!e.has_theme_file&&e.is_custom,Hee=({item:e})=>(0,U7.decodeEntities)(e.description||""),Uee=({item:e})=>{let{description:t}=e;return t&&(0,jee.jsx)(_c,{children:(0,U7.decodeEntities)(t)})},sFe={id:"description",type:"text",label:(0,$R.__)("Description"),placeholder:(0,$R.__)("Add a description"),getValue:Hee,render:Uee,Edit:{control:"textarea",rows:4},isVisible:zee,enableSorting:!1,filterBy:!1,enableGlobalSearch:!0},W7={id:"description_readonly",type:"text",label:(0,$R.__)("Description"),getValue:Hee,render:Uee,readOnly:!0,isVisible:e=>!zee(e)&&!!e.description,enableSorting:!1,enableHiding:!1,filterBy:!1},G7=sFe;var Tl=a(V(),1),Wee=a(G(),1),Gee=a(oe(),1),aFe=[{id:"aside",caption:(0,Tl.__)("Aside")},{id:"audio",caption:(0,Tl.__)("Audio")},{id:"chat",caption:(0,Tl.__)("Chat")},{id:"gallery",caption:(0,Tl.__)("Gallery")},{id:"image",caption:(0,Tl.__)("Image")},{id:"link",caption:(0,Tl.__)("Link")},{id:"quote",caption:(0,Tl.__)("Quote")},{id:"standard",caption:(0,Tl.__)("Standard")},{id:"status",caption:(0,Tl.__)("Status")},{id:"video",caption:(0,Tl.__)("Video")}].sort((e,t)=>{let r=e.caption.toUpperCase(),o=t.caption.toUpperCase();return r<o?-1:r>o?1:0}),lFe={id:"format",label:(0,Tl.__)("Format"),type:"text",Edit:"radio",enableSorting:!1,enableHiding:!1,filterBy:!1,getElements:async()=>{let e=await(0,Wee.resolveSelect)(Gee.store).getThemeSupports();return aFe.filter(t=>e?.formats?.includes(t.id)).map(t=>({value:t.id,label:t.caption}))}},Y7=lFe;var Qee=a(V(),1);var M1=a(W(),1),ea=a(V(),1),qee=a(g0(),1),Kee=a(en(),1),Zee=a(H(),1),F1=a(T(),1),cFe=189;function Xee({item:e}){let t="";typeof e.content=="string"?t=e.content:typeof e.content=="function"&&(t=e.content(e));let r=(0,ea._x)("words","Word count type. Do not translate!"),o=(0,Zee.useMemo)(()=>t?(0,qee.count)(t,r):0,[t,r]),n=e.modified;if(!o&&!n)return null;let i;if(o){let s=Math.round(o/cFe),l=(0,ea.sprintf)((0,ea._n)("%s word","%s words",o),o.toLocaleString()),c=s<=1?(0,ea.__)("1 minute"):(0,ea.sprintf)((0,ea._n)("%s minute","%s minutes",s),s.toLocaleString());i=(0,ea.sprintf)((0,ea.__)("%1$s, %2$s read time."),l,c)}return(0,F1.jsxs)(M1.__experimentalVStack,{spacing:1,children:[i&&(0,F1.jsx)(M1.__experimentalText,{variant:"muted",children:i}),n&&(0,F1.jsx)(M1.__experimentalText,{variant:"muted",children:(0,ea.sprintf)((0,ea.__)("Last edited %s."),(0,Kee.humanTimeDiff)(n))})]})}var uFe={label:(0,Qee.__)("Post content information"),id:"post-content-info",type:"text",readOnly:!0,render:Xee,enableSorting:!1,enableHiding:!1,filterBy:!1},q7=uFe;var K7=a(V(),1),dFe={id:"sticky",type:"boolean",label:(0,K7.__)("Sticky"),description:(0,K7.__)("Pin this post to the top of the blog."),enableSorting:!1,enableHiding:!1,isVisible:e=>!!e._links?.["wp:action-sticky"],filterBy:!1},Z7=dFe;var X7=a(V(),1),fFe={id:"posts_per_page",type:"integer",label:(0,X7.__)("Posts per page"),description:(0,X7.__)("Set the default number of posts to display on blog pages, including categories and tags. Some templates may override this setting."),getValue:({item:e})=>e.posts_per_page??1,setValue:({value:e})=>({posts_per_page:e}),isValid:{min:1},enableSorting:!1,enableHiding:!1,filterBy:!1},Q7=fFe;var pp=a(V(),1),mFe={id:"default_comment_status",type:"text",label:(0,pp.__)("Discussion"),Edit:"radio",getValue:({item:e})=>e.default_comment_status||"",setValue:({value:e})=>({default_comment_status:e||null}),render:({item:e})=>e.default_comment_status==="open"?(0,pp.__)("Comments open"):(0,pp.__)("Comments closed"),elements:[{value:"open",label:(0,pp.__)("Open"),description:(0,pp.__)("Visitors can add new comments and replies.")},{value:"",label:(0,pp.__)("Closed"),description:(0,pp.__)("Visitors cannot add new comments or replies. Existing comments remain visible.")}],enableSorting:!1,enableHiding:!1,filterBy:!1},J7=mFe;var $7=a(V(),1),pFe={id:"posts_page_title",type:"text",label:(0,$7.__)("Blog title"),description:(0,$7.__)("Set the Posts Page title. Appears in search results, and when the page is shared on social media."),getValue:({item:e})=>{let t=e.title;return typeof t=="string"?t:t?.raw??""},setValue:({value:e})=>({title:e}),enableSorting:!1,enableHiding:!1,filterBy:!1},e9=pFe;var Jee=a(V(),1),hFe={id:"view-post",label:(0,Jee._x)("View","verb"),isPrimary:!0,icon:Gs,isEligible(e){return e.status!=="trash"},callback(e,{onActionPerformed:t}){let r=e[0];window.open(r?.link,"_blank"),t&&t(e)}},t9=hFe;var r9=a(G(),1),$ee=a(oe(),1),hp=a(V(),1),ete=a(Rt(),1),tte=a(H(),1),lf=a(W(),1),af=a(T(),1);function gFe(e){return typeof e.menu_order=="number"&&Number.isInteger(e.menu_order)}function vFe({items:e,closeModal:t,onActionPerformed:r}){let[o,n]=(0,tte.useState)(e[0]),{editEntityRecord:i,saveEditedEntityRecord:s}=(0,r9.useDispatch)($ee.store),{createSuccessNotice:l,createErrorNotice:c}=(0,r9.useDispatch)(ete.store),u=gFe(o);async function d(f){if(f.preventDefault(),!!u)try{await i("postType",o.type,o.id,{menu_order:o.menu_order}),t?.(),await s("postType",o.type,o.id,{throwOnError:!0}),l((0,hp.__)("Order updated."),{type:"snackbar"}),r?.(e)}catch(m){let h=m,g=h.message&&h.code!=="unknown_error"?h.message:(0,hp.__)("An error occurred while updating the order");c(g,{type:"snackbar"})}}return(0,af.jsx)("form",{onSubmit:d,children:(0,af.jsxs)(lf.__experimentalVStack,{spacing:"5",children:[(0,af.jsx)("div",{children:(0,hp.__)("Determines the order of pages. Pages with the same order value are sorted alphabetically. Negative order values are supported.")}),(0,af.jsx)(lf.__experimentalInputControl,{__next40pxDefaultSize:!0,label:(0,hp.__)("Order"),type:"number",value:typeof o.menu_order=="number"&&Number.isInteger(o.menu_order)?String(o.menu_order):"",onChange:f=>{let m=parseInt(f,10);n({...o,menu_order:isNaN(m)?void 0:m})}}),(0,af.jsxs)(lf.__experimentalHStack,{justify:"right",children:[(0,af.jsx)(lf.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:()=>{t?.()},children:(0,hp.__)("Cancel")}),(0,af.jsx)(lf.Button,{__next40pxDefaultSize:!0,variant:"primary",type:"submit",accessibleWhenDisabled:!0,disabled:!u,children:(0,hp.__)("Save")})]})]})})}var bFe={id:"order-pages",label:(0,hp.__)("Order"),isEligible({status:e}){return e!=="trash"},modalFocusOnMount:"firstContentElement",RenderModal:vFe},o9=bFe;var n9=a(G(),1),rte=a(oe(),1),Ri=a(V(),1),ote=a(Rt(),1),i9=a(H(),1),uf=a(W(),1);var cf=a(T(),1),yFe={id:"duplicate-post",label:(0,Ri._x)("Duplicate","action label"),isEligible({status:e}){return e!=="trash"},modalFocusOnMount:"firstContentElement",RenderModal:({items:e,closeModal:t,onActionPerformed:r})=>{let[o,n]=(0,i9.useState)({...e[0],title:(0,Ri.sprintf)((0,Ri._x)("%s (Copy)","post"),ft(e[0]))}),[i,s]=(0,i9.useState)(!1),{saveEntityRecord:l}=(0,n9.useDispatch)(rte.store),{createSuccessNotice:c,createErrorNotice:u}=(0,n9.useDispatch)(ote.store);async function d(f){if(f.preventDefault(),i)return;let m=o.type==="wp_template",h={status:m?"publish":"draft",title:o.title,slug:m?o.slug:o.title||(0,Ri.__)("No title"),comment_status:o.comment_status,content:typeof o.content=="string"?o.content:o.content.raw,excerpt:typeof o.excerpt=="string"?o.excerpt:o.excerpt?.raw,meta:o.meta,parent:o.parent,password:o.password,template:o.template,format:o.format,featured_media:o.featured_media,menu_order:o.menu_order,ping_status:o.ping_status},g="wp:action-assign-";Object.keys(o?._links||{}).filter(b=>b.startsWith(g)).map(b=>b.slice(g.length)).forEach(b=>{o.hasOwnProperty(b)&&(h[b]=o[b])}),s(!0);try{let b=await l("postType",o.type,h,{throwOnError:!0});c((0,Ri.sprintf)((0,Ri.__)('"%s" successfully created.'),ft(b)),{id:"duplicate-post-action",type:"snackbar"}),r&&r([b])}catch(b){let S=b,y=S.message&&S.code!=="unknown_error"?S.message:(0,Ri.__)("An error occurred while duplicating the page.");u(y,{type:"snackbar"})}finally{s(!1),t?.()}}return(0,cf.jsx)("form",{onSubmit:d,children:(0,cf.jsxs)(uf.__experimentalVStack,{spacing:3,children:[typeof o.id=="string"&&(0,cf.jsx)("div",{children:(0,Ri.__)("You are about to duplicate a bundled template. Changes will not be live until you activate the new template.")}),(0,cf.jsx)(uf.__experimentalInputControl,{__next40pxDefaultSize:!0,label:(0,Ri.__)("Title"),placeholder:(0,Ri.__)("No title"),value:ft(o),onChange:f=>n(m=>({...m,title:f||(0,Ri.__)("No title")}))}),(0,cf.jsxs)(uf.__experimentalHStack,{spacing:2,justify:"end",children:[(0,cf.jsx)(uf.Button,{variant:"tertiary",onClick:t,__next40pxDefaultSize:!0,children:(0,Ri.__)("Cancel")}),(0,cf.jsx)(uf.Button,{variant:"primary",type:"submit",isBusy:i,"aria-disabled":i,__next40pxDefaultSize:!0,children:(0,Ri._x)("Duplicate","action label")})]})]})})}},s9=yFe;var a9=a(G(),1),nte=a(oe(),1),Jg=a(V(),1),ite=a(H(),1),ste=a(mc(),1),df=a(W(),1),ate=a(Rt(),1);var gp=a(T(),1),{PATTERN_TYPES:wFe}=Nn(ste.privateApis),SFe={id:"rename-post",label:(0,Jg.__)("Rename"),modalFocusOnMount:"firstContentElement",isEligible(e){if(e.status==="trash"||e.type==="wp_template"&&typeof e.id=="string"&&window?.__experimentalTemplateActivate)return!1;let t=["wp_template","wp_template_part"];return window?.__experimentalTemplateActivate||t.push("wp_template"),t.includes(e.type)?Oq(e)&&!window?.__experimentalTemplateActivate?u2(e)&&e.is_custom&&e.permissions?.update:Nq(e)?e.source==="custom"&&!e?.has_theme_file&&e.permissions?.update:e.type===wFe.user&&e.permissions?.update:e.permissions?.update},RenderModal:({items:e,closeModal:t,onActionPerformed:r})=>{let[o]=e,[n,i]=(0,ite.useState)(()=>ft(o,"")),{editEntityRecord:s,saveEditedEntityRecord:l}=(0,a9.useDispatch)(nte.store),{createSuccessNotice:c,createErrorNotice:u}=(0,a9.useDispatch)(ate.store);async function d(f){f.preventDefault();try{await s("postType",o.type,o.id,{title:n}),i(""),t?.(),await l("postType",o.type,o.id,{throwOnError:!0}),c((0,Jg.__)("Name updated"),{type:"snackbar"}),r?.(e)}catch(m){let h=m,g=h.message&&h.code!=="unknown_error"?h.message:(0,Jg.__)("An error occurred while updating the name");u(g,{type:"snackbar"})}}return(0,gp.jsx)("form",{onSubmit:d,children:(0,gp.jsxs)(df.__experimentalVStack,{spacing:"5",children:[(0,gp.jsx)(df.TextControl,{label:(0,Jg.__)("Name"),value:n,onChange:i,required:!0}),(0,gp.jsxs)(df.__experimentalHStack,{justify:"right",children:[(0,gp.jsx)(df.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:()=>{t?.()},children:(0,Jg.__)("Cancel")}),(0,gp.jsx)(df.Button,{__next40pxDefaultSize:!0,variant:"primary",type:"submit",children:(0,Jg.__)("Save")})]})]})})}},l9=SFe;var Ai=a(G(),1),$g=a(oe(),1),on=a(V(),1),vp=a(Rt(),1),lte=a(H(),1),eA=a(kt(),1),ff=a(W(),1),cte=a(uo(),1),ute=a(Zd(),1);var ev=a(T(),1),_Fe=e=>e?e.source==="custom"&&(!!e?.plugin||e?.has_theme_file):!1,xFe=async(e,{allowUndo:t=!0}={})=>{let r="edit-site-template-reverted";if((0,Ai.dispatch)(vp.store).removeNotice(r),!_Fe(e)){(0,Ai.dispatch)(vp.store).createErrorNotice((0,on.__)("This template is not revertable."),{type:"snackbar"});return}try{let o=(0,Ai.select)($g.store).getEntityConfig("postType",e.type);if(!o){(0,Ai.dispatch)(vp.store).createErrorNotice((0,on.__)("The editor has encountered an unexpected error. Please reload."),{type:"snackbar"});return}let n=(0,cte.addQueryArgs)(`${o.baseURL}/${e.id}`,{context:"edit",source:e.origin}),i=await(0,ute.default)({path:n});if(!i){(0,Ai.dispatch)(vp.store).createErrorNotice((0,on.__)("The editor has encountered an unexpected error. Please reload."),{type:"snackbar"});return}let s=({blocks:u=[]})=>(0,eA.__unstableSerializeAndClean)(u),l=(0,Ai.select)($g.store).getEditedEntityRecord("postType",e.type,e.id);(0,Ai.dispatch)($g.store).editEntityRecord("postType",e.type,e.id,{content:s,blocks:l.blocks,source:"custom"},{undoIgnore:!0});let c=(0,eA.parse)(i?.content?.raw);if((0,Ai.dispatch)($g.store).editEntityRecord("postType",e.type,i.id,{content:s,blocks:c,source:"theme"}),t){let u=()=>{(0,Ai.dispatch)($g.store).editEntityRecord("postType",e.type,l.id,{content:s,blocks:l.blocks,source:"custom"})};(0,Ai.dispatch)(vp.store).createSuccessNotice((0,on.__)("Template reset."),{type:"snackbar",id:r,actions:[{label:(0,on.__)("Undo"),onClick:u}]})}}catch(o){let n=o.message&&o.code!=="unknown_error"?o.message:(0,on.__)("Template revert failed. Please reload.");(0,Ai.dispatch)(vp.store).createErrorNotice(n,{type:"snackbar"})}},CFe={id:"reset-post",label:(0,on.__)("Reset"),isEligible:e=>window?.__experimentalTemplateActivate?e.type==="wp_template_part"&&e?.source==="custom"&&e?.has_theme_file:Xd(e)&&e?.source==="custom"&&(!!(e.type==="wp_template"&&e?.plugin)||e?.has_theme_file),icon:Gd,supportsBulk:!0,hideModalHeader:!0,modalFocusOnMount:"firstContentElement",RenderModal:({items:e,closeModal:t,onActionPerformed:r})=>{let[o,n]=(0,lte.useState)(!1),{saveEditedEntityRecord:i}=(0,Ai.useDispatch)($g.store),{createSuccessNotice:s,createErrorNotice:l}=(0,Ai.useDispatch)(vp.store),c=async()=>{try{for(let u of e)await xFe(u,{allowUndo:!1}),await i("postType",u.type,u.id);s(e.length>1?(0,on.sprintf)((0,on.__)("%d items reset."),e.length):(0,on.sprintf)((0,on.__)('"%s" reset.'),ft(e[0])),{type:"snackbar",id:"revert-template-action"})}catch(u){let d;e[0].type==="wp_template"?d=e.length===1?(0,on.__)("An error occurred while reverting the template."):(0,on.__)("An error occurred while reverting the templates."):d=e.length===1?(0,on.__)("An error occurred while reverting the template part."):(0,on.__)("An error occurred while reverting the template parts.");let f=u,m=f.message&&f.code!=="unknown_error"?f.message:d;l(m,{type:"snackbar"})}};return(0,ev.jsxs)(ff.__experimentalVStack,{spacing:"5",children:[(0,ev.jsx)(ff.__experimentalText,{children:(0,on.__)("Reset to default and clear all customizations?")}),(0,ev.jsxs)(ff.__experimentalHStack,{justify:"right",children:[(0,ev.jsx)(ff.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:t,disabled:o,accessibleWhenDisabled:!0,children:(0,on.__)("Cancel")}),(0,ev.jsx)(ff.Button,{__next40pxDefaultSize:!0,variant:"primary",onClick:async()=>{n(!0),await c(),r?.(e),n(!1),t?.()},isBusy:o,disabled:o,accessibleWhenDisabled:!0,children:(0,on.__)("Reset")})]})]})}},c9=CFe;var tA=a(V(),1),dte=a(mc(),1);var fte=a(T(),1),{CreatePatternModalContents:TFe,useDuplicatePatternProps:EFe}=Nn(dte.privateApis),PFe={id:"duplicate-pattern",label:(0,tA._x)("Duplicate","action label"),isEligible:e=>e.type!=="wp_template_part",modalHeader:(0,tA._x)("Duplicate pattern","action label"),modalFocusOnMount:"firstContentElement",RenderModal:({items:e,closeModal:t})=>{let[r]=e,o=EFe({pattern:r,onSuccess:()=>t?.()});return(0,fte.jsx)(TFe,{onClose:t,confirmLabel:(0,tA._x)("Duplicate","action label"),...o})}},u9=PFe;var v0=function(){return v0=Object.assign||function(t){for(var r,o=1,n=arguments.length;o<n;o++){r=arguments[o];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])}return t},v0.apply(this,arguments)};function mte(e){return e.toLowerCase()}var kFe=[/([a-z0-9])([A-Z])/g,/([A-Z])([A-Z][a-z])/g],RFe=/[^A-Z0-9]+/gi;function hte(e,t){t===void 0&&(t={});for(var r=t.splitRegexp,o=r===void 0?kFe:r,n=t.stripRegexp,i=n===void 0?RFe:n,s=t.transform,l=s===void 0?mte:s,c=t.delimiter,u=c===void 0?" ":c,d=pte(pte(e,o,"$1\0$2"),i,"\0"),f=0,m=d.length;d.charAt(f)==="\0";)f++;for(;d.charAt(m-1)==="\0";)m--;return d.slice(f,m).split("\0").map(l).join(u)}function pte(e,t,r){return t instanceof RegExp?e.replace(t,r):t.reduce(function(o,n){return o.replace(n,r)},e)}function gte(e,t){return t===void 0&&(t={}),hte(e,v0({delimiter:"."},t))}function tv(e,t){return t===void 0&&(t={}),gte(e,v0({delimiter:"-"},t))}"stream"in Blob.prototype||Object.defineProperty(Blob.prototype,"stream",{value(){return new Response(this).body}}),"setBigUint64"in DataView.prototype||Object.defineProperty(DataView.prototype,"setBigUint64",{value(e,t,r){let o=Number(0xffffffffn&t),n=Number(t>>32n);this.setUint32(e+(r?0:4),o,r),this.setUint32(e+(r?4:0),n,r)}});var y0=e=>new DataView(new ArrayBuffer(e)),mf=e=>new Uint8Array(e.buffer||e),b0=e=>new TextEncoder().encode(String(e)),rv=e=>Math.min(4294967295,Number(e)),vte=e=>Math.min(65535,Number(e));function AFe(e,t){if(t===void 0||t instanceof Date||(t=new Date(t)),e instanceof File)return{isFile:1,t:t||new Date(e.lastModified),i:e.stream()};if(e instanceof Response)return{isFile:1,t:t||new Date(e.headers.get("Last-Modified")||Date.now()),i:e.body};if(t===void 0)t=new Date;else if(isNaN(t))throw new Error("Invalid modification date.");if(e===void 0)return{isFile:0,t};if(typeof e=="string")return{isFile:1,t,i:b0(e)};if(e instanceof Blob)return{isFile:1,t,i:e.stream()};if(e instanceof Uint8Array||e instanceof ReadableStream)return{isFile:1,t,i:e};if(e instanceof ArrayBuffer||ArrayBuffer.isView(e))return{isFile:1,t,i:mf(e)};if(Symbol.asyncIterator in e)return{isFile:1,t,i:yte(e[Symbol.asyncIterator]())};throw new TypeError("Unsupported input format.")}function yte(e,t=e){return new ReadableStream({async pull(r){let o=0;for(;r.desiredSize>o;){let n=await e.next();if(!n.value){r.close();break}{let i=IFe(n.value);r.enqueue(i),o+=i.byteLength}}},cancel(r){t.throw?.(r)}})}function IFe(e){return typeof e=="string"?b0(e):e instanceof Uint8Array?e:mf(e)}function wte(e,t,r){let[o,n]=(function(i){return i?i instanceof Uint8Array?[i,1]:ArrayBuffer.isView(i)||i instanceof ArrayBuffer?[mf(i),1]:[b0(i),0]:[void 0,0]})(t);if(e instanceof File)return{o:d9(o||b0(e.name)),u:BigInt(e.size),l:n};if(e instanceof Response){let i=e.headers.get("content-disposition"),s=i&&i.match(/;\s*filename\*?=["']?(.*?)["']?$/i),l=s&&s[1]||e.url&&new URL(e.url).pathname.split("/").findLast(Boolean),c=l&&decodeURIComponent(l),u=r||+e.headers.get("content-length");return{o:d9(o||b0(c)),u:BigInt(u),l:n}}return o=d9(o,e!==void 0||r!==void 0),typeof e=="string"?{o,u:BigInt(b0(e).length),l:n}:e instanceof Blob?{o,u:BigInt(e.size),l:n}:e instanceof ArrayBuffer||ArrayBuffer.isView(e)?{o,u:BigInt(e.byteLength),l:n}:{o,u:OFe(e,r),l:n}}function OFe(e,t){return t>-1?BigInt(t):e?void 0:0n}function d9(e,t=1){if(!e||e.every((r=>r===47)))throw new Error("The file must have a name.");if(t)for(;e[e.length-1]===47;)e=e.subarray(0,-1);else e[e.length-1]!==47&&(e=new Uint8Array([...e,47]));return e}var Ste=new Uint32Array(256);for(let e=0;e<256;++e){let t=e;for(let r=0;r<8;++r)t=t>>>1^(1&t&&3988292384);Ste[e]=t}function bte(e,t=0){t^=-1;for(var r=0,o=e.length;r<o;r++)t=t>>>8^Ste[255&t^e[r]];return(-1^t)>>>0}function _te(e,t,r=0){let o=e.getSeconds()>>1|e.getMinutes()<<5|e.getHours()<<11,n=e.getDate()|e.getMonth()+1<<5|e.getFullYear()-1980<<9;t.setUint16(r,o,1),t.setUint16(r+2,n,1)}function NFe({o:e,l:t},r){return 8*(!t||(r??(function(o){try{MFe.decode(o)}catch{return 0}return 1})(e)))}var MFe=new TextDecoder("utf8",{fatal:1});function FFe(e,t=0){let r=y0(30);return r.setUint32(0,1347093252),r.setUint32(4,754976768|t),_te(e.t,r,10),r.setUint16(26,e.o.length,1),mf(r)}async function*DFe(e){let{i:t}=e;if("then"in t&&(t=await t),t instanceof Uint8Array)yield t,e.m=bte(t,0),e.u=BigInt(t.length);else{e.u=0n;let r=t.getReader();for(;;){let{value:o,done:n}=await r.read();if(n)break;e.m=bte(o,e.m),e.u+=BigInt(o.length),yield o}}}function LFe(e,t){let r=y0(16+(t?8:0));return r.setUint32(0,1347094280),r.setUint32(4,e.isFile?e.m:0,1),t?(r.setBigUint64(8,e.u,1),r.setBigUint64(16,e.u,1)):(r.setUint32(8,rv(e.u),1),r.setUint32(12,rv(e.u),1)),mf(r)}function BFe(e,t,r=0,o=0){let n=y0(46);return n.setUint32(0,1347092738),n.setUint32(4,755182848),n.setUint16(8,2048|r),_te(e.t,n,12),n.setUint32(16,e.isFile?e.m:0,1),n.setUint32(20,rv(e.u),1),n.setUint32(24,rv(e.u),1),n.setUint16(28,e.o.length,1),n.setUint16(30,o,1),n.setUint16(40,e.isFile?33204:16893,1),n.setUint32(42,rv(t),1),mf(n)}function VFe(e,t,r){let o=y0(r);return o.setUint16(0,1,1),o.setUint16(2,r-4,1),16&r&&(o.setBigUint64(4,e.u,1),o.setBigUint64(12,e.u,1)),o.setBigUint64(r-8,t,1),mf(o)}function xte(e){return e instanceof File||e instanceof Response?[[e],[e]]:[[e.input,e.name,e.size],[e.input,e.lastModified]]}var jFe=e=>(function(t){let r=BigInt(22),o=0n,n=0;for(let i of t){if(!i.o)throw new Error("Every file must have a non-empty name.");if(i.u===void 0)throw new Error(`Missing size for file "${new TextDecoder().decode(i.o)}".`);let s=i.u>=0xffffffffn,l=o>=0xffffffffn;o+=BigInt(46+i.o.length+(s&&8))+i.u,r+=BigInt(i.o.length+46+(12*l|28*s)),n||(n=s)}return(n||o>=0xffffffffn)&&(r+=BigInt(76)),r+o})((function*(t){for(let r of t)yield wte(...xte(r)[0])})(e));function Cte(e,t={}){let r={"Content-Type":"application/zip","Content-Disposition":"attachment"};return(typeof t.length=="bigint"||Number.isInteger(t.length))&&t.length>0&&(r["Content-Length"]=String(t.length)),t.metadata&&(r["Content-Length"]=String(jFe(t.metadata))),new Response(zFe(e,t),{headers:r})}function zFe(e,t={}){let r=(function(o){let n=o[Symbol.iterator in o?Symbol.iterator:Symbol.asyncIterator]();return{async next(){let i=await n.next();if(i.done)return i;let[s,l]=xte(i.value);return{done:0,value:Object.assign(AFe(...l),wte(...s))}},throw:n.throw?.bind(n),[Symbol.asyncIterator](){return this}}})(e);return yte((async function*(o,n){let i=[],s=0n,l=0n,c=0;for await(let f of o){let m=NFe(f,n.buffersAreUTF8);yield FFe(f,m),yield new Uint8Array(f.o),f.isFile&&(yield*DFe(f));let h=f.u>=0xffffffffn,g=12*(s>=0xffffffffn)|28*h;yield LFe(f,h),i.push(BFe(f,s,m,g)),i.push(f.o),g&&i.push(VFe(f,s,g)),h&&(s+=8n),l++,s+=BigInt(46+f.o.length)+f.u,c||(c=h)}let u=0n;for(let f of i)yield f,u+=BigInt(f.length);if(c||s>=0xffffffffn){let f=y0(76);f.setUint32(0,1347094022),f.setBigUint64(4,BigInt(44),1),f.setUint32(12,755182848),f.setBigUint64(24,l,1),f.setBigUint64(32,l,1),f.setBigUint64(40,u,1),f.setBigUint64(48,s,1),f.setUint32(56,1347094023),f.setBigUint64(64,s+u,1),f.setUint32(72,1,1),yield mf(f)}let d=y0(22);d.setUint32(0,1347093766),d.setUint16(8,vte(l),1),d.setUint16(10,vte(l),1),d.setUint32(12,rv(u),1),d.setUint32(16,rv(s),1),yield mf(d)})(r,t),r)}var f9=a(l1(),1),m9=a(V(),1);function Tte(e){return JSON.stringify({__file:e.type,title:ft(e),content:typeof e.content=="string"?e.content:e.content?.raw,syncStatus:e.wp_pattern_sync_status},null,2)}var HFe={id:"export-pattern",label:(0,m9.__)("Export as JSON"),icon:j4,supportsBulk:!0,isEligible:e=>e.type==="wp_block",callback:async e=>{if(e.length===1)return(0,f9.downloadBlob)(`${tv(ft(e[0])||e[0].slug)}.json`,Tte(e[0]),"application/json");let t={},r=e.map(o=>{let n=tv(ft(o)||o.slug);return t[n]=(t[n]||0)+1,{name:`${n+(t[n]>1?"-"+(t[n]-1):"")}.json`,lastModified:new Date,input:Tte(o)}});return(0,f9.downloadBlob)((0,m9.__)("patterns-export")+".zip",await Cte(r).blob(),"application/zip")}},p9=HFe;var Ete=a(uo(),1),rA=a(V(),1),UFe={id:"view-post-revisions",context:"list",label(e){let t=e[0]._links?.["version-history"]?.[0]?.count??0;return(0,rA.sprintf)((0,rA.__)("View revisions (%d)"),t)},isEligible(e){if(e.status==="trash")return!1;let t=e?._links?.["predecessor-version"]?.[0]?.id??null,r=e?._links?.["version-history"]?.[0]?.count??0;return!!t&&r>1},callback(e,{onActionPerformed:t}){let r=e[0],o=(0,Ete.addQueryArgs)("revision.php",{revision:r?._links?.["predecessor-version"]?.[0]?.id});document.location.href=o,t&&t(e)}},h9=UFe;var Pte=a(oe(),1),vn=a(V(),1),kte=a(Rt(),1);var Rte=a(H(),1),g9=a(G(),1),pf=a(W(),1),Ate=a(Lt(),1);var ov=a(T(),1),WFe={id:"permanently-delete",label:(0,vn.__)("Permanently delete"),supportsBulk:!0,icon:Kd,isEligible(e){if(Xd(e)||e.type==="wp_block")return!1;let{status:t,permissions:r}=e;return t==="trash"&&r?.delete},hideModalHeader:!0,modalFocusOnMount:"firstContentElement",RenderModal:({items:e,closeModal:t,onActionPerformed:r})=>{let[o,n]=(0,Rte.useState)(!1),{createSuccessNotice:i,createErrorNotice:s}=(0,g9.useDispatch)(kte.store),{deleteEntityRecord:l}=(0,g9.useDispatch)(Pte.store);return(0,ov.jsxs)(pf.__experimentalVStack,{spacing:"5",children:[(0,ov.jsx)(pf.__experimentalText,{children:e.length>1?(0,vn.sprintf)((0,vn._n)("Are you sure you want to permanently delete %d item?","Are you sure you want to permanently delete %d items?",e.length),e.length):(0,vn.sprintf)((0,vn.__)('Are you sure you want to permanently delete "%s"?'),(0,Ate.decodeEntities)(ft(e[0])))}),(0,ov.jsxs)(pf.__experimentalHStack,{justify:"right",children:[(0,ov.jsx)(pf.Button,{variant:"tertiary",onClick:t,disabled:o,accessibleWhenDisabled:!0,__next40pxDefaultSize:!0,children:(0,vn.__)("Cancel")}),(0,ov.jsx)(pf.Button,{variant:"primary",onClick:async()=>{n(!0);let c=await Promise.allSettled(e.map(u=>l("postType",u.type,u.id,{force:!0},{throwOnError:!0})));if(c.every(({status:u})=>u==="fulfilled")){let u;c.length===1?u=(0,vn.sprintf)((0,vn.__)('"%s" permanently deleted.'),ft(e[0])):u=(0,vn.__)("The items were permanently deleted."),i(u,{type:"snackbar",id:"permanently-delete-post-action"}),r?.(e)}else{let u;if(c.length===1){let d=c[0];d.reason?.message?u=d.reason.message:u=(0,vn.__)("An error occurred while permanently deleting the item.")}else{let d=new Set,f=c.filter(({status:m})=>m==="rejected");for(let m of f){let h=m;h.reason?.message&&d.add(h.reason.message)}d.size===0?u=(0,vn.__)("An error occurred while permanently deleting the items."):d.size===1?u=(0,vn.sprintf)((0,vn.__)("An error occurred while permanently deleting the items: %s"),[...d][0]):u=(0,vn.sprintf)((0,vn.__)("Some errors occurred while permanently deleting the items: %s"),[...d].join(","))}s(u,{type:"snackbar"})}n(!1),t?.()},isBusy:o,disabled:o,accessibleWhenDisabled:!0,__next40pxDefaultSize:!0,children:(0,vn.__)("Delete permanently")})]})]})}},v9=WFe;var Ite=a(oe(),1),ps=a(V(),1),Ote=a(Rt(),1);var GFe={id:"restore",label:(0,ps.__)("Restore"),isPrimary:!0,icon:Gd,supportsBulk:!0,isEligible(e){return!Xd(e)&&e.type!=="wp_block"&&e.status==="trash"&&e.permissions?.update},async callback(e,{registry:t,onActionPerformed:r}){let{createSuccessNotice:o,createErrorNotice:n}=t.dispatch(Ote.store),{editEntityRecord:i,saveEditedEntityRecord:s}=t.dispatch(Ite.store);await Promise.allSettled(e.map(c=>i("postType",c.type,c.id,{status:"draft"})));let l=await Promise.allSettled(e.map(c=>s("postType",c.type,c.id,{throwOnError:!0})));if(l.every(({status:c})=>c==="fulfilled")){let c;e.length===1?c=(0,ps.sprintf)((0,ps.__)('"%s" has been restored.'),ft(e[0])):e[0].type==="page"?c=(0,ps.sprintf)((0,ps.__)("%d pages have been restored."),e.length):c=(0,ps.sprintf)((0,ps.__)("%d posts have been restored."),e.length),o(c,{type:"snackbar",id:"restore-post-action"}),r&&r(e)}else{let c;if(l.length===1){let u=l[0];u.reason?.message?c=u.reason.message:c=(0,ps.__)("An error occurred while restoring the post.")}else{let u=new Set,d=l.filter(({status:f})=>f==="rejected");for(let f of d){let m=f;m.reason?.message&&u.add(m.reason.message)}u.size===0?c=(0,ps.__)("An error occurred while restoring the posts."):u.size===1?c=(0,ps.sprintf)((0,ps.__)("An error occurred while restoring the posts: %s"),[...u][0]):c=(0,ps.sprintf)((0,ps.__)("Some errors occurred while restoring the posts: %s"),[...u].join(","))}n(c,{type:"snackbar"})}}},b9=GFe;var y9=a(G(),1),Nte=a(oe(),1),Ho=a(V(),1),Mte=a(Rt(),1),Fte=a(H(),1),hf=a(W(),1);var nv=a(T(),1),YFe={id:"move-to-trash",label:(0,Ho._x)("Trash","verb"),isPrimary:!0,icon:Kd,isEligible(e){return e.type==="wp_template_part"||e.type==="wp_block"||e.type==="wp_template"&&typeof e.id=="string"?!1:!!e.status&&!["auto-draft","trash"].includes(e.status)&&e.permissions?.delete},supportsBulk:!0,hideModalHeader:!0,modalFocusOnMount:"firstContentElement",RenderModal:({items:e,closeModal:t,onActionPerformed:r})=>{let[o,n]=(0,Fte.useState)(!1),{createSuccessNotice:i,createErrorNotice:s}=(0,y9.useDispatch)(Mte.store),{deleteEntityRecord:l}=(0,y9.useDispatch)(Nte.store);return(0,nv.jsxs)(hf.__experimentalVStack,{spacing:"5",children:[(0,nv.jsx)(hf.__experimentalText,{children:e.length===1?(0,Ho.sprintf)((0,Ho.__)('Are you sure you want to move "%s" to the trash?'),ft(e[0])):(0,Ho.sprintf)((0,Ho._n)("Are you sure you want to move %d item to the trash ?","Are you sure you want to move %d items to the trash ?",e.length),e.length)}),(0,nv.jsxs)(hf.__experimentalHStack,{justify:"right",children:[(0,nv.jsx)(hf.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:t,disabled:o,accessibleWhenDisabled:!0,children:(0,Ho.__)("Cancel")}),(0,nv.jsx)(hf.Button,{__next40pxDefaultSize:!0,variant:"primary",onClick:async()=>{n(!0);let c=await Promise.allSettled(e.map(u=>l("postType",u.type,u.id.toString(),{},{throwOnError:!0})));if(c.every(({status:u})=>u==="fulfilled")){let u;c.length===1?u=(0,Ho.sprintf)((0,Ho.__)('"%s" moved to the trash.'),ft(e[0])):u=(0,Ho.sprintf)((0,Ho._n)("%d item moved to the trash.","%d items moved to the trash.",e.length),e.length),i(u,{type:"snackbar",id:"move-to-trash-action"})}else{let u;if(c.length===1){let d=c[0];d.reason?.message?u=d.reason.message:u=(0,Ho.__)("An error occurred while moving the item to the trash.")}else{let d=new Set,f=c.filter(({status:m})=>m==="rejected");for(let m of f){let h=m;h.reason?.message&&d.add(h.reason.message)}d.size===0?u=(0,Ho.__)("An error occurred while moving the items to the trash."):d.size===1?u=(0,Ho.sprintf)((0,Ho.__)("An error occurred while moving the item to the trash: %s"),[...d][0]):u=(0,Ho.sprintf)((0,Ho.__)("Some errors occurred while moving the items to the trash: %s"),[...d].join(","))}s(u,{type:"snackbar"})}r&&r(e),n(!1),t?.()},isBusy:o,disabled:o,accessibleWhenDisabled:!0,children:(0,Ho._x)("Trash","verb")})]})]})}},w9=YFe;var pr=a(V(),1),Vte=a(H(),1),gf=a(W(),1),jte=a(mc(),1),_9=a(Lt(),1);var Dte=a(Rt(),1),Lte=a(oe(),1),S9=a(G(),1);function qFe(e){let t=new Set;if(e.length===1){let r=e[0];r.reason?.message&&t.add(r.reason.message)}else{let r=e.filter(({status:o})=>o==="rejected");for(let o of r){let n=o;n.reason?.message&&t.add(n.reason.message)}}return t}var Bte=async(e,t,r)=>{let{createSuccessNotice:o,createErrorNotice:n}=(0,S9.dispatch)(Dte.store),{deleteEntityRecord:i}=(0,S9.dispatch)(Lte.store),s=await Promise.allSettled(e.map(l=>i("postType",l.type,l.id,{force:!0},{throwOnError:!0})));if(s.every(({status:l})=>l==="fulfilled")){let l;s.length===1?l=t.success.messages.getMessage(e[0]):l=t.success.messages.getBatchMessage(e),o(l,{type:t.success.type??"snackbar",id:t.success.id}),r.onActionPerformed?.(e)}else{let l=qFe(s),c="";s.length===1?c=t.error.messages.getMessage(l):c=t.error.messages.getBatchMessage(l),n(c,{type:t.error.type??"snackbar",id:t.error.id}),r.onActionError?.()}};var iv=a(T(),1),{PATTERN_TYPES:KFe}=Nn(jte.privateApis),ZFe={id:"delete-post",label:(0,pr.__)("Delete"),isPrimary:!0,icon:Kd,isEligible(e){return Xd(e)?u2(e):e.type===KFe.user},supportsBulk:!0,hideModalHeader:!0,modalFocusOnMount:"firstContentElement",RenderModal:({items:e,closeModal:t,onActionPerformed:r})=>{let[o,n]=(0,Vte.useState)(!1),i=e.every(s=>Xd(s)&&s?.has_theme_file);return(0,iv.jsxs)(gf.__experimentalVStack,{spacing:"5",children:[(0,iv.jsx)(gf.__experimentalText,{children:e.length>1?(0,pr.sprintf)((0,pr._n)("Delete %d item?","Delete %d items?",e.length),e.length):(0,pr.sprintf)((0,pr._x)('Delete "%s"?',"template part"),ft(e[0]))}),(0,iv.jsxs)(gf.__experimentalHStack,{justify:"right",children:[(0,iv.jsx)(gf.Button,{variant:"tertiary",onClick:t,disabled:o,accessibleWhenDisabled:!0,__next40pxDefaultSize:!0,children:(0,pr.__)("Cancel")}),(0,iv.jsx)(gf.Button,{variant:"primary",onClick:async()=>{n(!0),await Bte(e,{success:{messages:{getMessage:l=>i?(0,pr.sprintf)((0,pr.__)('"%s" reset.'),(0,_9.decodeEntities)(ft(l))):(0,pr.sprintf)((0,pr._x)('"%s" deleted.',"template part"),(0,_9.decodeEntities)(ft(l))),getBatchMessage:()=>i?(0,pr.__)("Items reset."):(0,pr.__)("Items deleted.")}},error:{messages:{getMessage:l=>l.size===1?[...l][0]:i?(0,pr.__)("An error occurred while reverting the item."):(0,pr.__)("An error occurred while deleting the item."),getBatchMessage:l=>l.size===0?i?(0,pr.__)("An error occurred while reverting the items."):(0,pr.__)("An error occurred while deleting the items."):l.size===1?i?(0,pr.sprintf)((0,pr.__)("An error occurred while reverting the items: %s"),[...l][0]):(0,pr.sprintf)((0,pr.__)("An error occurred while deleting the items: %s"),[...l][0]):i?(0,pr.sprintf)((0,pr.__)("Some errors occurred while reverting the items: %s"),[...l].join(",")):(0,pr.sprintf)((0,pr.__)("Some errors occurred while deleting the items: %s"),[...l].join(","))}}},{onActionPerformed:r}),n(!1),t?.()},isBusy:o,disabled:o,accessibleWhenDisabled:!0,__next40pxDefaultSize:!0,children:(0,pr.__)("Delete")})]})]})}},x9=ZFe;var Qte=a(G(),1),vf=a(V(),1),Jte=a(Rt(),1),$te=a(H(),1),ere=a(kt(),1);var Ii=a(W(),1),Kte=a(ke(),1),nA=a(oe(),1),S0=a(G(),1),oA=a(H(),1),w0=a(V(),1);var Zte=a(Rt(),1),Xte=a(kt(),1);var zte=a(G(),1),Hte=a(oe(),1),Ute=()=>(0,zte.useSelect)(e=>e(Hte.store).getEntityRecords("postType","wp_template_part",{per_page:-1}),[])??[],Wte=(e,t)=>{let r=e.toLowerCase(),o=t.map(i=>i.title.rendered.toLowerCase());if(!o.includes(r))return e;let n=2;for(;o.includes(`${r} ${n}`);)n++;return`${e} ${n}`},Gte=e=>tv(e).replace(/[^\w-]+/g,"")||"wp-custom-part";var bn=a(T(),1);function Yte(e,t){return`fields-create-template-part-modal__area-option-${e}-${t}`}function qte(e,t){return`fields-create-template-part-modal__area-option-description-${e}-${t}`}function _0({modalTitle:e,...t}){let r=(0,S0.useSelect)(o=>o(nA.store).getPostType("wp_template_part")?.labels?.add_new_item,[]);return(0,bn.jsx)(Ii.Modal,{title:e||r,onRequestClose:t.closeModal,overlayClassName:"fields-create-template-part-modal",focusOnMount:"firstContentElement",size:"medium",children:(0,bn.jsx)(C9,{...t})})}var XFe=e=>e==="header"?nx:e==="footer"?tx:e==="sidebar"?wx:e==="navigation-overlay"?cx:Eg;function C9({defaultArea:e="uncategorized",blocks:t=[],confirmLabel:r=(0,w0.__)("Add"),closeModal:o,onCreate:n,onError:i,defaultTitle:s=""}){let{createErrorNotice:l}=(0,S0.useDispatch)(Zte.store),{saveEntityRecord:c}=(0,S0.useDispatch)(nA.store),u=Ute(),[d,f]=(0,oA.useState)(s),[m,h]=(0,oA.useState)(e),[g,v]=(0,oA.useState)(!1),b=(0,Kte.useInstanceId)(_0),S=(0,S0.useSelect)(w=>w(nA.store).getCurrentTheme()?.default_template_part_areas,[]);async function y(){if(!(!d||g))try{v(!0);let w=Wte(d,u),_=Gte(w),x=await c("postType","wp_template_part",{slug:_,title:w,content:(0,Xte.serialize)(t),area:m},{throwOnError:!0});await n(x)}catch(w){let _=w instanceof Error&&"code"in w&&w.message&&w.code!=="unknown_error"?w.message:(0,w0.__)("An error occurred while creating the template part.");l(_,{type:"snackbar"}),i?.()}finally{v(!1)}}return(0,bn.jsx)("form",{onSubmit:async w=>{w.preventDefault(),await y()},children:(0,bn.jsxs)(Ii.__experimentalVStack,{spacing:"4",children:[(0,bn.jsx)(Ii.TextControl,{label:(0,w0.__)("Name"),value:d,onChange:f,required:!0}),(0,bn.jsxs)("fieldset",{className:"fields-create-template-part-modal__area-fieldset",children:[(0,bn.jsx)(Ii.BaseControl.VisualLabel,{as:"legend",children:(0,w0.__)("Area")}),(0,bn.jsx)("div",{className:"fields-create-template-part-modal__area-radio-group",children:(S??[]).map(w=>{let _=XFe(w.icon);return(0,bn.jsxs)("div",{className:"fields-create-template-part-modal__area-radio-wrapper",children:[(0,bn.jsx)("input",{type:"radio",id:Yte(w.area,b),name:`fields-create-template-part-modal__area-${b}`,value:w.area,checked:m===w.area,onChange:()=>{h(w.area)},"aria-describedby":qte(w.area,b)}),(0,bn.jsx)(Ii.Icon,{icon:_,className:"fields-create-template-part-modal__area-radio-icon"}),(0,bn.jsx)("label",{htmlFor:Yte(w.area,b),className:"fields-create-template-part-modal__area-radio-label",children:w.label}),(0,bn.jsx)(Ii.Icon,{icon:To,className:"fields-create-template-part-modal__area-radio-checkmark"}),(0,bn.jsx)("p",{className:"fields-create-template-part-modal__area-radio-description",id:qte(w.area,b),children:w.description})]},w.area)})})]}),(0,bn.jsxs)(Ii.__experimentalHStack,{justify:"right",children:[(0,bn.jsx)(Ii.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:()=>{o()},children:(0,w0.__)("Cancel")}),(0,bn.jsx)(Ii.Button,{__next40pxDefaultSize:!0,variant:"primary",type:"submit","aria-disabled":!d||g,isBusy:g,children:r})]})]})})}var tre=a(T(),1),QFe={id:"duplicate-template-part",label:(0,vf._x)("Duplicate","action label"),isEligible:e=>e.type==="wp_template_part",modalHeader:(0,vf._x)("Duplicate template part","action label"),modalFocusOnMount:"firstContentElement",RenderModal:({items:e,closeModal:t})=>{let[r]=e,o=(0,$te.useMemo)(()=>r.blocks??(0,ere.parse)(typeof r.content=="string"?r.content:r.content.raw,{__unstableSkipMigrationLogs:!0}),[r.content,r.blocks]),{createSuccessNotice:n}=(0,Qte.useDispatch)(Jte.store);function i(s){n((0,vf.sprintf)((0,vf._x)('"%s" duplicated.',"template part"),ft(s)),{type:"snackbar",id:"edit-site-patterns-success"}),t?.()}return(0,tre.jsx)(C9,{blocks:o,defaultArea:r.area,defaultTitle:(0,vf.sprintf)((0,vf._x)("%s (Copy)","template part"),ft(r)),onCreate:i,onError:t,confirmLabel:(0,vf._x)("Duplicate","action label"),closeModal:t??(()=>{})})}},T9=QFe;var rre=a(V(),1),ore=a(W(),1),nre=a(T(),1),JFe={id:"alt_text",type:"text",label:(0,rre.__)("Alt text"),isVisible:e=>e?.media_type==="image",render:({item:e})=>e?.alt_text||"-",Edit:({field:e,onChange:t,data:r})=>(0,nre.jsx)(ore.TextareaControl,{label:e.label,value:r.alt_text||"",onChange:o=>t({alt_text:o}),rows:2}),enableSorting:!1,filterBy:!1},E9=JFe;var cre=a(V(),1);var sA=a(H(),1),P9=a(V(),1);function iA(e){return e?typeof e=="string"?e:typeof e=="object"&&(e.rendered||e.raw)||"":""}var aA=a(T(),1);function ire({item:e}){let[t,r]=(0,sA.useState)(null),o=e.post,n=e._embedded?.["wp:attached-to"]?.[0]?.id,i=e._embedded?.["wp:attached-to"]?.[0]?.title;return(0,sA.useEffect)(()=>{o&&o===n&&r(iA(i)||(0,P9.__)("(no title)")),o||r((0,P9.__)("(Unattached)"))},[o,n,i]),(0,aA.jsx)(aA.Fragment,{children:t})}var lA=a(oe(),1),cA=a(W(),1),k9=a(V(),1),sv=a(H(),1),sre=a(ke(),1),are=a(G(),1);var R9=a(T(),1);function lre({data:e,onChange:t}){let r=e.post&&e?._embedded?.["wp:attached-to"]?.[0]?[{label:iA(e._embedded?.["wp:attached-to"]?.[0]?.title),value:e.post.toString()}]:[],[o,n]=(0,sv.useState)(r),[i,s]=(0,sv.useState)([]),[l,c]=(0,sv.useState)(!1),[u,d]=(0,sv.useState)(e?.post?.toString()??null),f=(0,are.useSelect)(b=>b(lA.store).getPostTypes(),[]),m=()=>{t({post:0,_embedded:{...e?._embedded,"wp:attached-to":void 0}}),d(null),n([])},h=async b=>{c(!0);let S=await(0,lA.__experimentalFetchLinkSuggestions)(b,{type:"post",isInitialSuggestions:!0},{});s(S);let y=S.map(_=>({label:_.title,value:_.id.toString()})),w=!b&&y.findIndex(_=>_.value===u)===-1;n(y.concat(w?r:[])),c(!1)},g=b=>{if(!b){m();return}if(d(b),b){let S=i.find(y=>y.id===Number(b));if(S&&f){let y=f.find(_=>_.slug===S?.type),w={...y&&{type:y.slug},id:Number(b),title:{raw:S.title,rendered:S.title}};t({post:Number(b),_embedded:{...e?._embedded,"wp:attached-to":[w]}})}}},v=(0,sv.createInterpolateElement)((0,k9.__)("Search for a post or page to attach this media to or <button>detach current</button>."),{button:(0,R9.jsx)(cA.Button,{__next40pxDefaultSize:!0,onClick:m,variant:"link",accessibleWhenDisabled:!0,disabled:!u})});return(0,R9.jsx)(cA.ComboboxControl,{className:"dataviews-media-field__attached-to",__next40pxDefaultSize:!0,isLoading:l,label:(0,k9.__)("Attached to"),help:v,value:u,options:o,onFilterValueChange:(0,sre.debounce)(b=>h(b),300),onChange:g,hideLabelFromVision:!0})}var $Fe={id:"attached_to",type:"text",label:(0,cre.__)("Attached to"),Edit:lre,render:ire,enableSorting:!1,filterBy:!1},A9=$Fe;var fre=a(V(),1),mre=a(G(),1),pre=a(oe(),1);var ure=a(V(),1),x0=a(H(),1);var uA=a(W(),1),bp=a(T(),1);function dre({item:e}){let t=e?._embedded?.author?.[0],r=t?.name,o=t?.avatar_urls?.[48],[n,i]=(0,x0.useState)("loading");(0,x0.useEffect)(()=>{i("loading")},[o]);let s=(0,x0.useCallback)(c=>{c?.complete&&i("instant")},[]),l=()=>{n==="loading"&&i("loaded")};return(0,bp.jsxs)(uA.__experimentalHStack,{alignment:"left",spacing:0,children:[!!o&&(0,bp.jsx)("div",{className:Q("media-author-field__avatar",{"is-loading":n==="loading","is-loaded":n==="loaded"}),children:(0,bp.jsx)("img",{ref:s,onLoad:l,alt:(0,ure.__)("Author avatar"),src:o})}),!o&&(0,bp.jsx)("div",{className:"media-author-field__icon",children:(0,bp.jsx)(uA.Icon,{icon:Sg})}),(0,bp.jsx)("span",{className:"media-author-field__name",children:r})]})}var eDe={label:(0,fre.__)("Author"),id:"author",type:"integer",getElements:async()=>(await(0,mre.resolveSelect)(pre.store).getEntityRecords("root","user",{per_page:-1,who:"authors",_fields:"id,name",context:"view"})??[]).map(({id:t,name:r})=>({value:t,label:r})),render:dre,sort:(e,t,r)=>{let o=e._embedded?.author?.[0]?.name||"",n=t._embedded?.author?.[0]?.name||"";return r==="asc"?o.localeCompare(n):n.localeCompare(o)},filterBy:{operators:["isAny","isNone"]},readOnly:!0},I9=eDe;var hre=a(V(),1),gre=a(W(),1);function yp(e){return e?typeof e=="string"?e:typeof e=="object"&&"raw"in e&&e.raw||"":""}var vre=a(T(),1),tDe={id:"caption",type:"text",label:(0,hre.__)("Caption"),getValue:({item:e})=>yp(e?.caption),render:({item:e})=>yp(e?.caption)||"-",Edit:({field:e,onChange:t,data:r})=>(0,vre.jsx)(gre.TextareaControl,{label:e.label,value:yp(r.caption)||"",onChange:o=>t({caption:o}),rows:2}),enableSorting:!1,filterBy:!1},O9=tDe;var bre=a(V(),1),rDe={id:"date",type:"datetime",label:(0,bre.__)("Date added"),filterBy:{operators:["before","after"]},readOnly:!0},N9=rDe;var yre=a(V(),1),wre=a(W(),1);var M9=a(T(),1),oDe={id:"description",type:"text",label:(0,yre.__)("Description"),getValue:({item:e})=>yp(e?.description),render:({item:e})=>(0,M9.jsx)("div",{children:yp(e?.description)||"-"}),Edit:({field:e,onChange:t,data:r})=>(0,M9.jsx)(wre.TextareaControl,{label:e.label,value:yp(r.description)||"",onChange:o=>t({description:o}),rows:5}),enableSorting:!1,filterBy:!1},F9=oDe;var Cre=a(V(),1),Tre=a(uo(),1);var Sre=a(H(),1),_re=a(uo(),1);var av=a(T(),1),nDe=15;function xre({item:e}){let t=(0,Sre.useMemo)(()=>e?.source_url?(0,_re.getFilename)(e.source_url):null,[e?.source_url]);return t?t.length<=nDe?(0,av.jsx)("span",{className:"dataviews-media-field__filename",children:t}):(0,av.jsxs)(We.Root,{children:[(0,av.jsx)(We.Trigger,{render:(0,av.jsx)("span",{className:"dataviews-media-field__filename",children:t})}),(0,av.jsx)(We.Popup,{children:t})]}):""}var iDe={id:"filename",type:"text",label:(0,Cre.__)("File name"),getValue:({item:e})=>(0,Tre.getFilename)(e?.source_url||""),render:xre,enableSorting:!1,filterBy:!1,readOnly:!0},D9=iDe;var Oi=a(V(),1),Pre=1024,kre=1024*Pre,Rre=1024*kre,Are=1024*Rre,Ire=1024*Are,Ore=1024*Ire,Nre=1024*Ore,sDe=1024*Nre;function Ere(e,t,r=2){return(0,Oi.sprintf)((0,Oi._x)("%1$s %2$s","file size"),e.toLocaleString(void 0,{minimumFractionDigits:0,maximumFractionDigits:r}),t)}function aDe(e,t=2){if(e===0)return Ere(0,(0,Oi._x)("B","unit symbol"),t);let r={[(0,Oi._x)("YB","unit symbol")]:sDe,[(0,Oi._x)("ZB","unit symbol")]:Nre,[(0,Oi._x)("EB","unit symbol")]:Ore,[(0,Oi._x)("PB","unit symbol")]:Ire,[(0,Oi._x)("TB","unit symbol")]:Are,[(0,Oi._x)("GB","unit symbol")]:Rre,[(0,Oi._x)("MB","unit symbol")]:kre,[(0,Oi._x)("KB","unit symbol")]:Pre,[(0,Oi._x)("B","unit symbol")]:1};for(let[o,n]of Object.entries(r))if(e>=n)return Ere(e/n,o,t);return""}var lDe={id:"filesize",type:"text",label:(0,Oi.__)("File size"),getValue:({item:e})=>e?.media_details?.filesize?aDe(e?.media_details?.filesize):"",isVisible:e=>!!e?.media_details?.filesize,enableSorting:!1,filterBy:!1,readOnly:!0},L9=lDe;var C0=a(V(),1),cDe={id:"media_dimensions",type:"text",label:(0,C0.__)("Dimensions"),getValue:({item:e})=>e?.media_details?.width&&e?.media_details?.height?(0,C0.sprintf)((0,C0._x)("%1$s \xD7 %2$s","image dimensions"),e?.media_details?.width?.toString(),e?.media_details?.height?.toString()):"",isVisible:e=>!!(e?.media_details?.width&&e?.media_details?.height),enableSorting:!1,filterBy:!1,readOnly:!0},B9=cDe;var Mre=a(V(),1),uDe={id:"mime_type",type:"text",label:(0,Mre.__)("File type"),getValue:({item:e})=>e?.mime_type||"",render:({item:e})=>e?.mime_type||"-",enableSorting:!1,filterBy:!1,readOnly:!0},V9=uDe;var $ve=a(V(),1);var Xve=a(V(),1),iU=a(pe(),1),Qve=a(G(),1),FT=a(oe(),1);var sl=a(H(),1),Eh=a(G(),1),rU=a(V(),1),em=a(oe(),1),oS=a(pe(),1),Yve=a(Rt(),1),qve=a(mc(),1),Kve=a(kt(),1);var Fre=a(H(),1),T0=a(G(),1),Dre=a(ke(),1),Lre=a(pe(),1);var dA=a(T(),1);function dDe(e,t,r){if(!r)return t;let o=e.get(t);return o||(o=(0,T0.createRegistry)({"core/block-editor":Lre.storeConfig},t),o.registerStore("core/editor",D1),e.set(t,o)),o}var fDe=(0,Dre.createHigherOrderComponent)(e=>({useSubRegistry:t=!0,...r})=>{let o=(0,T0.useRegistry)(),[n]=(0,Fre.useState)(()=>new WeakMap),i=dDe(n,o,t);return i===o?(0,dA.jsx)(e,{registry:o,...r}):(0,dA.jsx)(T0.RegistryProvider,{value:i,children:(0,dA.jsx)(e,{registry:i,...r})})},"withRegistryProvider"),Bre=fDe;var vb=a(H(),1),bb=a(G(),1),_a=a(oe(),1),vge=a(V(),1),bge=a(Nt(),1),yge=a(ke(),1),wge=a(kt(),1),aN=a(pe(),1);var fA=a(H(),1),Vre=a(T(),1),jre=(0,fA.createContext)(void 0);function zre({value:e,onChange:t,settings:r={},children:o}){let n={media:e,onChange:t,fields:r.fields||[]};return(0,Vre.jsx)(jre.Provider,{value:n,children:o})}function E0(){let e=(0,fA.useContext)(jre);if(!e)throw new Error("useMediaEditorContext must be used within MediaEditorProvider");return e}var Hre=a(W(),1),Ure=a(H(),1),mA=a(V(),1);function lv(e){return e?e.startsWith("image/")?{type:"image"}:e.startsWith("video/")?{type:"video"}:e.startsWith("audio/")?{type:"audio"}:{type:"application"}:{type:"application"}}var Dn=a(T(),1);function mDe({mediaType:e,mediaUrl:t,altText:r,displayTitle:o,mimeType:n,onLoad:i,onError:s,loadingState:l}){switch(e.type){case"image":return(0,Dn.jsx)("img",{className:l==="loaded"?"loaded":"",src:t,alt:r||"",onLoad:i,onError:s});case"video":return(0,Dn.jsx)("video",{src:t,controls:!0,onError:s,children:o});case"audio":return(0,Dn.jsx)("audio",{src:t,controls:!0,onError:s,children:o});default:return(0,Dn.jsxs)("div",{className:"media-editor-preview__file-info",children:[(0,Dn.jsx)("p",{className:"media-editor-preview__file-name",children:o}),(0,Dn.jsx)("p",{className:"media-editor-preview__mime-type",children:n}),(0,Dn.jsx)("a",{href:t,target:"_blank",rel:"noopener",className:"media-editor-preview__download-link",children:(0,mA.__)("View file")})]})}}function Wre(e){let[t,r]=(0,Ure.useState)("loading"),{media:o}=E0(),{source_url:n,mime_type:i,alt_text:s,title:l}=o||{},c=lv(i);if(!n)return(0,Dn.jsx)("div",{className:"media-editor-preview media-editor-preview--empty",children:(0,Dn.jsx)("p",{children:(0,mA.__)("No media file available.")})});if(t==="error")return(0,Dn.jsxs)("div",{className:"media-editor-preview media-editor-preview--error",children:[(0,Dn.jsx)("p",{children:(0,mA.__)("Failed to load media file.")}),(0,Dn.jsx)("p",{className:"media-editor-preview__url",children:n})]});let u=typeof l=="string"?l:l?.rendered||l?.raw;return(0,Dn.jsxs)("div",{...e,className:`media-editor-preview media-editor-preview--${c.type}`,children:[c.type==="image"&&t==="loading"&&(0,Dn.jsx)("div",{className:"media-editor-preview__spinner",children:(0,Dn.jsx)(Hre.Spinner,{})}),(0,Dn.jsx)(mDe,{mediaType:c,mediaUrl:n,altText:s,displayTitle:u,mimeType:i,onLoad:()=>r("loaded"),onError:()=>r("error"),loadingState:t})]})}var bA=a(H(),1);var j9=a(V(),1);var Qr="isAny",Jr="isNone",Ni="isAll",Ln="isNotAll",hs="between",gs="inThePast",ta="over",po="is",ho="isNot",wp="lessThan",Sp="greaterThan",_p="lessThanOrEqual",xp="greaterThanOrEqual",Cp="before",Tp="after",Ep="beforeInc",Pp="afterInc",Au="contains",Iu="notContains",Ou="startsWith",kp="on",Rp="notOn",pA=["asc","desc"],Gre={asc:"\u2191",desc:"\u2193"},hA={asc:"ascending",desc:"descending"},gA={asc:(0,j9.__)("Sort ascending"),desc:(0,j9.__)("Sort descending")},Yre={asc:e4,desc:KD},vA="table",qre="grid",Kre="list",Zre="activity",Xre="pickerGrid",Qre="pickerTable",Jre="pickerActivity";var $re=(0,bA.createContext)({view:{type:vA},onChangeView:()=>{},fields:[],data:[],paginationInfo:{totalItems:0,totalPages:0},selection:[],onChangeSelection:()=>{},setOpenedFilter:()=>{},openedFilter:null,getItemId:e=>e.id,isItemClickable:()=>!0,renderItemLink:void 0,containerWidth:0,containerRef:(0,bA.createRef)(),resizeObserverRef:()=>{},defaultLayouts:{list:{},grid:{},table:{}},filters:[],isShowingFilter:!1,setIsShowingFilter:()=>{},hasInitiallyLoaded:!1,config:{perPageSizes:[]},intersectionObserver:null});$re.displayName="DataViewsContext";var nt=$re;var Du=a(V(),1);var fv=a(V(),1),kA=a(W(),1),oa=a(H(),1),G9=a(go(),1);var toe=a(W(),1),roe=a(V(),1),ooe=a(T(),1);function Ap({selection:e,onChangeSelection:t,item:r,getItemId:o,titleField:n,disabled:i,...s}){let l=o(r),c=e.includes(l),u=!i&&c,d=n?.getValue?.({item:r})||(0,roe.__)("(no title)");return(0,ooe.jsx)(toe.CheckboxControl,{className:"dataviews-selection-checkbox","aria-label":d,"aria-disabled":i,checked:u,onChange:()=>{i||t(c?e.filter(f=>l!==f):[...e,l])},...s})}var cv=a(W(),1),soe=a(V(),1),k0=a(H(),1);var aoe=a(G(),1),z9=a(ke(),1);var noe=a(zm(),1),{lock:y1t,unlock:Ct}=(0,noe.__dangerousOptInToUnstableAPIsOnlyForCoreModules)("I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.","@wordpress/dataviews");var Or=a(T(),1),{Menu:P0,kebabCase:pDe}=Ct(cv.privateApis);function hDe({action:e,onClick:t,items:r,variant:o}){let n=typeof e.label=="string"?e.label:e.label(r);return(0,Or.jsx)(cv.Button,{disabled:!!e.disabled,accessibleWhenDisabled:!0,size:"compact",variant:o,onClick:t,children:n})}function gDe({action:e,onClick:t,items:r}){let o=typeof e.label=="string"?e.label:e.label(r);return(0,Or.jsx)(P0.Item,{disabled:e.disabled,onClick:t,children:(0,Or.jsx)(P0.ItemLabel,{children:o})})}function L1({action:e,items:t,closeModal:r}){let o=typeof e.label=="string"?e.label:e.label(t),n=typeof e.modalHeader=="function"?e.modalHeader(t):e.modalHeader;return(0,Or.jsx)(cv.Modal,{title:n||o,__experimentalHideHeader:!!e.hideModalHeader,onRequestClose:r,focusOnMount:e.modalFocusOnMount??!0,size:e.modalSize||"medium",overlayClassName:`dataviews-action-modal dataviews-action-modal__${pDe(e.id)}`,children:(0,Or.jsx)(e.RenderModal,{items:t,closeModal:r})})}function H9({actions:e,item:t,registry:r,setActiveModalAction:o}){let{primaryActions:n,regularActions:i}=(0,k0.useMemo)(()=>e.reduce((l,c)=>((c.isPrimary?l.primaryActions:l.regularActions).push(c),l),{primaryActions:[],regularActions:[]}),[e]),s=l=>l.map(c=>(0,Or.jsx)(gDe,{action:c,onClick:()=>{if("RenderModal"in c){o(c);return}c.callback([t],{registry:r})},items:[t]},c.id));return(0,Or.jsxs)(P0.Group,{children:[s(n),s(i)]})}function R0({item:e,actions:t,isCompact:r}){let o=(0,aoe.useRegistry)(),{primaryActions:n,eligibleActions:i}=(0,k0.useMemo)(()=>{let l=t.filter(u=>!u.isEligible||u.isEligible(e));return{primaryActions:l.filter(u=>u.isPrimary),eligibleActions:l}},[t,e]),s=(0,z9.useViewportMatch)("medium","<");return r?(0,Or.jsx)(ioe,{item:e,actions:i,isSmall:!0,registry:o}):(0,Or.jsxs)(ne,{direction:"row",justify:"flex-end",className:"dataviews-item-actions",style:{flexShrink:0,width:"auto"},children:[(0,Or.jsx)(U9,{item:e,actions:n,registry:o}),(n.length<i.length||s)&&(0,Or.jsx)(ioe,{item:e,actions:i,registry:o})]})}function ioe({item:e,actions:t,isSmall:r,registry:o}){let[n,i]=(0,k0.useState)(null);return(0,Or.jsxs)(Or.Fragment,{children:[(0,Or.jsxs)(P0,{placement:"bottom-end",children:[(0,Or.jsx)(P0.TriggerButton,{render:(0,Or.jsx)(cv.Button,{size:r?"small":"compact",icon:fo,label:(0,soe.__)("Actions"),accessibleWhenDisabled:!0,disabled:!t.length,className:"dataviews-all-actions-button"})}),(0,Or.jsx)(P0.Popover,{children:(0,Or.jsx)(H9,{actions:t,item:e,registry:o,setActiveModalAction:i})})]}),!!n&&(0,Or.jsx)(L1,{action:n,items:[e],closeModal:()=>i(null)})]})}function U9({item:e,actions:t,registry:r,buttonVariant:o}){let[n,i]=(0,k0.useState)(null);return(0,z9.useViewportMatch)("medium","<")||!Array.isArray(t)||t.length===0?null:(0,Or.jsxs)(Or.Fragment,{children:[t.map(l=>(0,Or.jsx)(hDe,{action:l,onClick:()=>{if("RenderModal"in l){i(l);return}l.callback([e],{registry:r})},items:[e],variant:o},l.id)),!!n&&(0,Or.jsx)(L1,{action:n,items:[e],closeModal:()=>i(null)})]})}var wA=a(W(),1),yA=a(V(),1),uv=a(H(),1),vDe=a(G(),1);var bDe=a(ke(),1);var Ip=a(V(),1);function loe(e,t,r,o=!1){return e>0?(0,Ip.sprintf)((0,Ip._n)("%d Item selected","%d Items selected",e),e):o||r<=t?(0,Ip.sprintf)((0,Ip._n)("%d Item","%d Items",r),r):(0,Ip.sprintf)((0,Ip._n)("%1$d of %2$d Item","%1$d of %2$d Items",r),t,r)}var B1=a(T(),1);function SA(e,t){return(0,uv.useMemo)(()=>e.some(r=>r.supportsBulk&&(!r.isEligible||r.isEligible(t))),[e,t])}function _A(e,t){return(0,uv.useMemo)(()=>t.some(r=>e.some(o=>o.supportsBulk&&(!o.isEligible||o.isEligible(r)))),[e,t])}function xA({selection:e,onChangeSelection:t,data:r,actions:o,getItemId:n,disableSelectAll:i=!1}){let s=(0,uv.useMemo)(()=>r.filter(d=>o.some(f=>f.supportsBulk&&(!f.isEligible||f.isEligible(d)))),[r,o]),l=r.filter(d=>e.includes(n(d))&&s.includes(d)),c=e.length>0,u=l.length===s.length;return i?(0,B1.jsx)(wA.CheckboxControl,{className:"dataviews-view-table-selection-checkbox",checked:c,disabled:!c,onChange:()=>{t([])},"aria-label":(0,yA.__)("Deselect all")}):(0,B1.jsx)(wA.CheckboxControl,{className:"dataviews-view-table-selection-checkbox",checked:u,indeterminate:!u&&!!l.length,onChange:()=>{t(u?[]:s.map(d=>n(d)))},"aria-label":u?(0,yA.__)("Deselect all"):(0,yA.__)("Select all")})}var bf=a(V(),1);var yf=a(W(),1),Op=a(H(),1);function CA(e,t){let r=[e?.titleField,e?.mediaField,e?.descriptionField].filter(Boolean);return t.filter(o=>!r.includes(o.id)&&o.type!=="media"&&o.enableHiding!==!1)}var At=a(T(),1),{Menu:hr}=Ct(yf.privateApis);function yDe({children:e}){return Op.Children.toArray(e).filter(Boolean).map((t,r)=>(0,At.jsxs)(Op.Fragment,{children:[r>0&&(0,At.jsx)(hr.Separator,{}),t]},r))}var wDe=(0,Op.forwardRef)(function({fieldId:t,view:r,fields:o,onChangeView:n,onHide:i,setOpenedFilter:s,canMove:l=!0,canInsertLeft:c=!0,canInsertRight:u=!0},d){let f=r.fields??[],m=f?.indexOf(t),h=r.sort?.field===t,g=!1,v=!1,b=!1,S=[],y=o.find(A=>A.id===t),{setIsShowingFilter:w}=(0,Op.useContext)(nt);if(!y)return null;g=y.enableHiding!==!1,v=y.enableSorting!==!1;let _=y.header;if(S=!!y.filterBy&&y.filterBy?.operators||[],b=!r.filters?.some(A=>t===A.field)&&!!(y.hasElements||y.Edit)&&y.filterBy!==!1&&!y.filterBy?.isPrimary,!v&&!l&&!g&&!b)return _;let x=CA(r,o).filter(A=>!f.includes(A.id)),E=(c||u)&&!!x.length,O=(0,bf.isRTL)();return(0,At.jsxs)(hr,{children:[(0,At.jsxs)(hr.TriggerButton,{render:(0,At.jsx)(yf.Button,{size:"compact",className:"dataviews-view-table-header-button",ref:d,variant:"tertiary"}),children:[_,r.sort&&h&&(0,At.jsx)("span",{"aria-hidden":"true",children:Gre[r.sort.direction]})]}),(0,At.jsx)(hr.Popover,{style:{minWidth:"240px"},children:(0,At.jsxs)(yDe,{children:[v&&(0,At.jsx)(hr.Group,{children:pA.map(A=>{let C=r.sort&&h&&r.sort.direction===A,I=`${t}-${A}`;return(0,At.jsx)(hr.RadioItem,{name:"view-table-sorting",value:I,checked:C,onChange:()=>{n({...r,sort:{field:t,direction:A},showLevels:!1})},children:(0,At.jsx)(hr.ItemLabel,{children:gA[A]})},I)})}),b&&(0,At.jsx)(hr.Group,{children:(0,At.jsx)(hr.Item,{prefix:(0,At.jsx)(yf.Icon,{icon:ox}),onClick:()=>{s(t),w(!0),n({...r,page:1,filters:[...r.filters||[],{field:t,value:void 0,operator:S[0]}]})},children:(0,At.jsx)(hr.ItemLabel,{children:(0,bf.__)("Add filter")})})}),(l||g||E)&&y&&(0,At.jsxs)(hr.Group,{children:[l&&(0,At.jsx)(hr.Item,{prefix:(0,At.jsx)(yf.Icon,{icon:XD}),disabled:O?m>=f.length-1:m<1,onClick:()=>{let A=O?m+1:m-1,C=[...f];C.splice(m,1),C.splice(A,0,t),n({...r,fields:C})},children:(0,At.jsx)(hr.ItemLabel,{children:(0,bf.__)("Move left")})}),l&&(0,At.jsx)(hr.Item,{prefix:(0,At.jsx)(yf.Icon,{icon:JD}),disabled:O?m<1:m>=f.length-1,onClick:()=>{let A=O?m-1:m+1,C=[...f];C.splice(m,1),C.splice(A,0,t),n({...r,fields:C})},children:(0,At.jsx)(hr.ItemLabel,{children:(0,bf.__)("Move right")})}),c&&!!x.length&&(0,At.jsxs)(hr,{children:[(0,At.jsx)(hr.SubmenuTriggerItem,{children:(0,At.jsx)(hr.ItemLabel,{children:(0,bf.__)("Insert left")})}),(0,At.jsx)(hr.Popover,{children:x.map(A=>{let C=O?m+1:m;return(0,At.jsx)(hr.Item,{onClick:()=>{n({...r,fields:[...f.slice(0,C),A.id,...f.slice(C)]})},children:(0,At.jsx)(hr.ItemLabel,{children:A.label})},A.id)})})]}),u&&!!x.length&&(0,At.jsxs)(hr,{children:[(0,At.jsx)(hr.SubmenuTriggerItem,{children:(0,At.jsx)(hr.ItemLabel,{children:(0,bf.__)("Insert right")})}),(0,At.jsx)(hr.Popover,{children:x.map(A=>{let C=O?m:m+1;return(0,At.jsx)(hr.Item,{onClick:()=>{n({...r,fields:[...f.slice(0,C),A.id,...f.slice(C)]})},children:(0,At.jsx)(hr.ItemLabel,{children:A.label})},A.id)})})]}),g&&y&&(0,At.jsx)(hr.Item,{prefix:(0,At.jsx)(yf.Icon,{icon:_x}),onClick:()=>{i(y),n({...r,fields:f.filter(A=>A!==t)})},children:(0,At.jsx)(hr.ItemLabel,{children:(0,bf.__)("Hide column")})})]})]})})]})}),SDe=wDe,A0=SDe;var coe=a(H(),1),W9=a(T(),1);function _De({item:e,isItemClickable:t,onClickItem:r,className:o}){return!t(e)||!r?{className:o}:{className:o?`${o} ${o}--clickable`:void 0,role:"button",tabIndex:0,onClick:n=>{n.stopPropagation(),r(e)},onKeyDown:n=>{(n.key==="Enter"||n.key===""||n.key===" ")&&(n.stopPropagation(),r(e))}}}function Np({item:e,isItemClickable:t,onClickItem:r,renderItemLink:o,className:n,children:i,...s}){if(!t(e))return(0,W9.jsx)("div",{className:n,...s,children:i});if(o){let c=o({item:e,className:`${n} ${n}--clickable`,...s,children:i});return(0,coe.cloneElement)(c,{onClick:u=>{u.stopPropagation(),c.props.onClick&&c.props.onClick(u)},onKeyDown:u=>{(u.key==="Enter"||u.key===""||u.key===" ")&&(u.stopPropagation(),c.props.onKeyDown&&c.props.onKeyDown(u))}})}let l=_De({item:e,isItemClickable:t,onClickItem:r,className:n});return(0,W9.jsx)("div",{...l,...s,children:i})}var Nu=a(T(),1);function xDe({item:e,level:t,titleField:r,mediaField:o,descriptionField:n,onClickItem:i,renderItemLink:s,isItemClickable:l}){return(0,Nu.jsxs)(ne,{direction:"row",gap:"md",align:"flex-start",justify:"flex-start",children:[o&&(0,Nu.jsx)(Np,{item:e,isItemClickable:l,onClickItem:i,renderItemLink:s,className:"dataviews-view-table__cell-content-wrapper dataviews-column-primary__media","aria-label":l(e)&&(i||s)&&r?r.getValue?.({item:e}):void 0,children:(0,Nu.jsx)(o.render,{item:e,field:o,config:{sizes:"32px"}})}),(0,Nu.jsxs)(ne,{direction:"column",align:"flex-start",className:"dataviews-view-table__primary-column-content",children:[r&&(0,Nu.jsxs)(Np,{item:e,isItemClickable:l,onClickItem:i,renderItemLink:s,className:"dataviews-view-table__cell-content-wrapper dataviews-title-field",children:[t!==void 0&&t>0&&(0,Nu.jsxs)("span",{className:"dataviews-view-table__level",children:[Array(t).fill("\u2014").join(" "),"\xA0"]}),(0,Nu.jsx)(r.render,{item:e,field:r})]}),n&&(0,Nu.jsx)(n.render,{item:e,field:n})]})]})}var TA=xDe;var dv=a(H(),1),uoe=a(V(),1),CDe=e=>(0,uoe.isRTL)()?Math.abs(e.scrollLeft)<=1:e.scrollLeft+e.clientWidth>=e.scrollWidth-1;function doe({scrollContainerRef:e,enabledHorizontal:t=!1}){let[r,o]=(0,dv.useState)(!1),[n,i]=(0,dv.useState)(!1),s=(0,dv.useCallback)(()=>{let l=e.current;l&&(t&&o(CDe(l)),i(l.scrollTop>0))},[e,t]);return(0,dv.useEffect)(()=>{if(typeof window>"u"||!e.current)return()=>{};let l=e.current;return s(),l.addEventListener("scroll",s),window.addEventListener("resize",s),()=>{l.removeEventListener("scroll",s),window.removeEventListener("resize",s)}},[e,t,s]),{isHorizontalScrollEnd:r,isVerticallyScrolled:n}}function ra(e,t){return e.reduce((r,o)=>{let n=t.getValue({item:o});return r.has(n)||r.set(n,[]),r.get(n)?.push(o),r},new Map)}var Mp=a(W(),1),moe=a(V(),1),poe=a(H(),1);var qa=a(T(),1);function foe({field:e,isVisible:t,onToggleVisibility:r}){return(0,qa.jsx)(Mp.__experimentalItem,{onClick:e.enableHiding?r:void 0,children:(0,qa.jsxs)(ne,{direction:"row",gap:"sm",justify:"flex-start",align:"center",children:[(0,qa.jsx)("div",{style:{height:24,width:24},children:t&&(0,qa.jsx)(Mp.Icon,{icon:To})}),(0,qa.jsx)("span",{className:"dataviews-view-config__label",children:e.label})]})})}function TDe(e){return!!e}function EA({showLabel:e=!0}){let{view:t,fields:r,onChangeView:o}=(0,poe.useContext)(nt),n=CA(t,r);if(!n?.length)return null;let i=r.find(g=>g.id===t.titleField),s=r.find(g=>g.id===t.mediaField),l=r.find(g=>g.id===t.descriptionField),c=[{field:i,isVisibleFlag:"showTitle"},{field:s,isVisibleFlag:"showMedia"},{field:l,isVisibleFlag:"showDescription"}].filter(({field:g})=>TDe(g)),u=t.fields??[],d=n.filter(g=>u.includes(g.id)).length,f=c.filter(({isVisibleFlag:g})=>t[g]??!0),m=f.length+d,h=m===1&&f.length===1;return(0,qa.jsxs)(ne,{direction:"column",className:"dataviews-field-control",children:[e&&(0,qa.jsx)(Mp.BaseControl.VisualLabel,{children:(0,moe.__)("Properties")}),(0,qa.jsx)(ne,{direction:"column",className:"dataviews-view-config__properties",children:(0,qa.jsxs)(Mp.__experimentalItemGroup,{isBordered:!0,isSeparated:!0,size:"medium",children:[c.map(({field:g,isVisibleFlag:v})=>{let b=t[v]??!0,S=h&&b?{...g,enableHiding:!1}:g;return(0,qa.jsx)(foe,{field:S,isVisible:b,onToggleVisibility:()=>{o({...t,[v]:!b})}},g.id)}),n.map(g=>{let v=u.includes(g.id),b=m===1&&v?{...g,enableHiding:!1}:g;return(0,qa.jsx)(foe,{field:b,isVisible:v,onToggleVisibility:()=>{o({...t,fields:v?u.filter(S=>S!==g.id):[...u,g.id]})}},g.id)})]})})]})}var PA=a(H(),1);function Mu(e,t={delay:400}){let[r,o]=(0,PA.useState)(!1);return(0,PA.useEffect)(()=>{if(!e)return;let n=setTimeout(()=>{o(!0)},t.delay);return()=>{clearTimeout(n),o(!1)}},[e,t.delay]),r}var gt=a(T(),1);function goe(e,t){if(e)return e;if(t==="integer"||t==="number")return"end"}function EDe({item:e,fields:t,column:r,align:o}){let n=t.find(s=>s.id===r);if(!n)return null;let i=Q("dataviews-view-table__cell-content-wrapper",{"dataviews-view-table__cell-align-end":o==="end","dataviews-view-table__cell-align-center":o==="center"});return(0,gt.jsx)("div",{className:i,children:(0,gt.jsx)(n.render,{item:e,field:n})})}function hoe({hasBulkActions:e,item:t,level:r,actions:o,fields:n,id:i,view:s,titleField:l,mediaField:c,descriptionField:u,selection:d,getItemId:f,isItemClickable:m,onClickItem:h,renderItemLink:g,onChangeSelection:v,isActionsColumnSticky:b,posinset:S}){let{paginationInfo:y}=(0,oa.useContext)(nt),w=SA(o,t),_=w&&d.includes(i),{showTitle:x=!0,showMedia:E=!0,showDescription:O=!0,infiniteScrollEnabled:A}=s,C=(0,oa.useRef)(!1),I=s.fields??[],k=l&&x||c&&E||u&&O;return(0,gt.jsxs)("tr",{className:Q("dataviews-view-table__row",{"is-selected":w&&_,"has-bulk-actions":w}),onTouchStart:()=>{C.current=!0},"aria-setsize":A?y.totalItems:void 0,"aria-posinset":S,role:A?"article":void 0,onMouseDown:P=>{let N=(0,G9.isAppleOS)()?P.metaKey:P.ctrlKey;P.button===0&&N&&window.navigator.userAgent.toLowerCase().includes("firefox")&&P?.preventDefault()},onClick:P=>{if(!w)return;((0,G9.isAppleOS)()?P.metaKey:P.ctrlKey)&&!C.current&&document.getSelection()?.type!=="Range"&&v(d.includes(i)?d.filter(U=>i!==U):[...d,i])},children:[e&&(0,gt.jsx)("td",{className:"dataviews-view-table__checkbox-column",children:(0,gt.jsx)("div",{className:"dataviews-view-table__cell-content-wrapper",children:(0,gt.jsx)(Ap,{item:t,selection:d,onChangeSelection:v,getItemId:f,titleField:l,disabled:!w})})}),k&&(0,gt.jsx)("td",{children:(0,gt.jsx)(TA,{item:t,level:r,titleField:x?l:void 0,mediaField:E?c:void 0,descriptionField:O?u:void 0,isItemClickable:m,onClickItem:h,renderItemLink:g})}),I.map(P=>{let{width:N,maxWidth:U,minWidth:F,align:D}=s.layout?.styles?.[P]??{},B=n.find(M=>M.id===P),L=goe(D,B?.type);return(0,gt.jsx)("td",{style:{width:N,maxWidth:U,minWidth:F},children:(0,gt.jsx)(EDe,{fields:n,item:t,column:P,align:L})},P)}),!!o?.length&&(0,gt.jsx)("td",{className:Q("dataviews-view-table__actions-column",{"dataviews-view-table__actions-column--sticky":!0,"dataviews-view-table__actions-column--stuck":b}),onClick:P=>P.stopPropagation(),children:(0,gt.jsx)(R0,{item:t,actions:o})})]})}function PDe({actions:e,data:t,fields:r,getItemId:o,getItemLevel:n,isLoading:i=!1,onChangeView:s,onChangeSelection:l,selection:c,setOpenedFilter:u,onClickItem:d,isItemClickable:f,renderItemLink:m,view:h,className:g,empty:v}){let{containerRef:b}=(0,oa.useContext)(nt),S=Mu(i),y=(0,oa.useRef)(new Map),w=(0,oa.useRef)(void 0),[_,x]=(0,oa.useState)(),[E,O]=(0,oa.useState)(null);(0,oa.useEffect)(()=>{w.current&&(w.current.focus(),w.current=void 0)});let A=(0,oa.useId)(),{isHorizontalScrollEnd:C,isVerticallyScrolled:I}=doe({scrollContainerRef:b,enabledHorizontal:!!e?.length}),k=_A(e,t);if(_){w.current=_,x(void 0);return}let P=ae=>{let re=y.current.get(ae.id),ve=re?y.current.get(re.fallback):void 0;x(ve?.node)},N=ae=>{ae.preventDefault(),ae.stopPropagation();let re={getBoundingClientRect:()=>({x:ae.clientX,y:ae.clientY,top:ae.clientY,left:ae.clientX,right:ae.clientX,bottom:ae.clientY,width:0,height:0,toJSON:()=>({})})};window.requestAnimationFrame(()=>{O(re)})},U=!!t?.length,F=r.find(ae=>ae.id===h.titleField),D=r.find(ae=>ae.id===h.mediaField),B=r.find(ae=>ae.id===h.descriptionField),L=h.groupBy?.field?r.find(ae=>ae.id===h.groupBy?.field):null,M=L?ra(t,L):null,{showTitle:z=!0,showMedia:K=!0,showDescription:Z=!0}=h,q=F&&z||D&&K||B&&Z,X=h.fields??[],ie=(ae,re)=>ve=>{ve?y.current.set(ae,{node:ve,fallback:X[re>0?re-1:1]}):y.current.delete(ae)},$=h.infiniteScrollEnabled&&!M,le=(0,fv.isRTL)();return U?(0,gt.jsxs)(gt.Fragment,{children:[(0,gt.jsxs)("table",{className:Q("dataviews-view-table",g,{[`has-${h.layout?.density}-density`]:h.layout?.density&&["compact","comfortable"].includes(h.layout.density),"has-bulk-actions":k,"is-refreshing":!$&&S}),"aria-busy":i,"aria-describedby":A,role:$?"feed":void 0,inert:!$&&i?"true":void 0,children:[(0,gt.jsxs)("colgroup",{children:[k&&(0,gt.jsx)("col",{className:"dataviews-view-table__col-checkbox"}),q&&(0,gt.jsx)("col",{className:"dataviews-view-table__col-first-data"}),X.map((ae,re)=>(0,gt.jsx)("col",{className:Q(`dataviews-view-table__col-${ae}`,{"dataviews-view-table__col-expand":!q&&re===X.length-1})},`col-${ae}`)),!!e?.length&&(0,gt.jsx)("col",{className:"dataviews-view-table__col-actions"})]}),E&&(0,gt.jsx)(kA.Popover,{anchor:E,onClose:()=>O(null),placement:"bottom-start",children:(0,gt.jsx)(EA,{showLabel:!1})}),(0,gt.jsx)("thead",{className:Q({"dataviews-view-table__thead--stuck":I}),onContextMenu:N,children:(0,gt.jsxs)("tr",{className:"dataviews-view-table__row",children:[k&&(0,gt.jsx)("th",{className:"dataviews-view-table__checkbox-column",scope:"col",onContextMenu:N,children:(0,gt.jsx)(xA,{selection:c,onChangeSelection:l,data:t,actions:e,getItemId:o})}),q&&(0,gt.jsx)("th",{scope:"col",children:F&&(0,gt.jsx)(A0,{ref:ie(F.id,0),fieldId:F.id,view:h,fields:r,onChangeView:s,onHide:P,setOpenedFilter:u,canMove:!1,canInsertLeft:le?h.layout?.enableMoving??!0:!1,canInsertRight:le?!1:h.layout?.enableMoving??!0})}),X.map((ae,re)=>{let{width:ve,maxWidth:Ce,minWidth:_e,align:Me}=h.layout?.styles?.[ae]??{},ue=r.find(se=>se.id===ae),te=goe(Me,ue?.type),de=h.layout?.enableMoving??!0;return(0,gt.jsx)("th",{style:{width:ve,maxWidth:Ce,minWidth:_e,textAlign:te},"aria-sort":h.sort?.direction&&h.sort?.field===ae?hA[h.sort.direction]:void 0,scope:"col",children:(0,gt.jsx)(A0,{ref:ie(ae,re),fieldId:ae,view:h,fields:r,onChangeView:s,onHide:P,setOpenedFilter:u,canMove:de,canInsertLeft:de,canInsertRight:de})},ae)}),!!e?.length&&(0,gt.jsx)("th",{className:Q("dataviews-view-table__actions-column",{"dataviews-view-table__actions-column--sticky":!0,"dataviews-view-table__actions-column--stuck":!C}),children:(0,gt.jsx)("span",{className:"dataviews-view-table-header",children:(0,fv.__)("Actions")})})]})}),U&&L&&M?Array.from(M.entries()).map(([ae,re])=>(0,gt.jsxs)("tbody",{children:[(0,gt.jsx)("tr",{className:"dataviews-view-table__group-header-row",children:(0,gt.jsx)("td",{colSpan:X.length+(q?1:0)+(k?1:0)+(e?.length?1:0),className:"dataviews-view-table__group-header-cell",children:h.groupBy?.showLabel===!1?ae:(0,fv.sprintf)((0,fv.__)("%1$s: %2$s"),L.label,ae)})}),re.map((ve,Ce)=>(0,gt.jsx)(hoe,{item:ve,level:h.showLevels&&typeof n=="function"?n(ve):void 0,hasBulkActions:k,actions:e,fields:r,id:o(ve)||Ce.toString(),view:h,titleField:F,mediaField:D,descriptionField:B,selection:c,getItemId:o,onChangeSelection:l,onClickItem:d,renderItemLink:m,isItemClickable:f,isActionsColumnSticky:!C},o(ve)))]},`group-${ae}`)):(0,gt.jsx)("tbody",{children:U&&t.map((ae,re)=>(0,gt.jsx)(hoe,{item:ae,level:h.showLevels&&typeof n=="function"?n(ae):void 0,hasBulkActions:k,actions:e,fields:r,id:o(ae)||re.toString(),view:h,titleField:F,mediaField:D,descriptionField:B,selection:c,getItemId:o,onChangeSelection:l,onClickItem:d,renderItemLink:m,isItemClickable:f,isActionsColumnSticky:!C,posinset:$?re+1:void 0},o(ae)))})]}),$&&i&&(0,gt.jsx)("div",{className:"dataviews-loading",id:A,children:(0,gt.jsx)("p",{className:"dataviews-loading-more",children:(0,gt.jsx)(kA.Spinner,{})})})]}):(0,gt.jsx)("div",{className:Q("dataviews-no-results",{"is-refreshing":S}),id:A,children:v})}var voe=PDe;var xoe=a(W(),1),NA=a(V(),1);var na=a(W(),1);var j1=a(V(),1),Soe=a(ke(),1),_oe=a(go(),1),Dp=a(H(),1);var kDe=a(W(),1),RDe=a(V(),1),RA=a(H(),1);var ADe=a(T(),1),IDe=[{value:120,breakpoint:1},{value:170,breakpoint:1},{value:230,breakpoint:1},{value:290,breakpoint:1112},{value:350,breakpoint:1636},{value:430,breakpoint:588}],ODe=IDe[2].value;function AA(){let e=(0,RA.useContext)(nt),t=e.view;return(0,RA.useMemo)(()=>{let r=e.containerWidth,o=32,n=t.layout?.previewSize??ODe,i=Math.floor((r+o)/(n+o));return Math.max(1,i)},[e.containerWidth,t.layout?.previewSize])}var boe=a(H(),1);var yoe=a(T(),1),V1=(0,boe.forwardRef)(({className:e,previewSize:t,...r},o)=>(0,yoe.jsx)("div",{ref:o,className:Q("dataviews-view-grid-items",e),style:{gridTemplateColumns:t&&`repeat(auto-fill, minmax(${t}px, 1fr))`},...r}));var IA=a(H(),1);function Fp(e,t){let{intersectionObserver:r}=(0,IA.useContext)(nt);(0,IA.useEffect)(()=>{let o=e.current;if(!(!o||t===void 0||!r))return r.observe(o),()=>{r.unobserve(o)}},[e,r,t])}function OA(e,t,r){let n=!!e?.length&&t?e[0].position:void 0;return n&&r?(n-1)%r:0}var xt=a(T(),1),{Badge:NDe}=Ct(na.privateApis);function MDe(e,t){let r=[];for(let o=0,n=e.length;o<n;o+=t)r.push(e.slice(o,o+t));return r}var woe=(0,Dp.forwardRef)(function e({view:t,selection:r,onChangeSelection:o,onClickItem:n,isItemClickable:i,renderItemLink:s,getItemId:l,item:c,actions:u,mediaField:d,titleField:f,descriptionField:m,regularFields:h,badgeFields:g,hasBulkActions:v,config:b,posinset:S,setsize:y,...w},_){let{showTitle:x=!0,showMedia:E=!0,showDescription:O=!0}=t,A=SA(u,c),C=l(c),I=(0,Dp.useRef)(null),k=(0,Dp.useCallback)(z=>{I.current=z,typeof _=="function"?_(z):_&&(_.current=z)},[_]);Fp(I,S);let P=(0,Soe.useInstanceId)(e),N=r.includes(C),U=(0,xt.jsx)("span",{className:"dataviews-view-grid__media-placeholder"}),F=E&&d?.render,D=F?(0,xt.jsx)(d.render,{item:c,field:d,config:b}):U,B=x&&f?.render?(0,xt.jsx)(f.render,{item:c,field:f}):null,L,M;return i(c)&&n&&(B?(L={"aria-labelledby":`dataviews-view-grid__title-field-${P}`},M={id:`dataviews-view-grid__title-field-${P}`}):L={"aria-label":(0,j1.__)("Navigate to item")}),(0,xt.jsxs)(ne,{direction:"column",...w,ref:k,"aria-setsize":y,"aria-posinset":S,className:Q(w.className,"dataviews-view-grid__row__gridcell","dataviews-view-grid__card",{"is-selected":A&&N}),onClickCapture:z=>{if(w.onClickCapture?.(z),(0,_oe.isAppleOS)()?z.metaKey:z.ctrlKey){if(z.stopPropagation(),z.preventDefault(),!A)return;o(N?r.filter(K=>C!==K):[...r,C])}},children:[(0,xt.jsx)(Np,{item:c,isItemClickable:i,onClickItem:n,renderItemLink:s,className:Q("dataviews-view-grid__media",{"dataviews-view-grid__media--placeholder":!F}),...L,children:D}),v&&(0,xt.jsx)(Ap,{item:c,selection:r,onChangeSelection:o,getItemId:l,titleField:f,disabled:!A}),!!u?.length&&(0,xt.jsx)("div",{className:"dataviews-view-grid__media-actions",children:(0,xt.jsx)(R0,{item:c,actions:u,isCompact:!0})}),x&&(0,xt.jsx)("div",{className:"dataviews-view-grid__title-actions",children:(0,xt.jsx)(Np,{item:c,isItemClickable:i,onClickItem:n,renderItemLink:s,className:"dataviews-view-grid__title-field dataviews-title-field",...M,title:f?.getValueFormatted({item:c,field:f})||void 0,children:B})}),(0,xt.jsxs)(ne,{direction:"column",gap:"xs",children:[O&&m?.render&&(0,xt.jsx)(m.render,{item:c,field:m}),!!g?.length&&(0,xt.jsx)(ne,{direction:"row",className:"dataviews-view-grid__badge-fields",gap:"sm",wrap:"wrap",align:"top",justify:"flex-start",children:g.map(z=>(0,xt.jsx)(NDe,{className:"dataviews-view-grid__field-value",children:(0,xt.jsx)(z.render,{item:c,field:z})},z.id))}),!!h?.length&&(0,xt.jsx)(ne,{direction:"column",className:"dataviews-view-grid__fields",gap:"xs",children:h.map(z=>(0,xt.jsx)(na.Flex,{className:"dataviews-view-grid__field",gap:1,justify:"flex-start",expanded:!0,style:{height:"auto"},direction:"row",children:(0,xt.jsxs)(xt.Fragment,{children:[(0,xt.jsxs)(We.Root,{children:[(0,xt.jsx)(We.Trigger,{render:(0,xt.jsx)(na.FlexItem,{className:"dataviews-view-grid__field-name",children:z.header})}),(0,xt.jsx)(We.Popup,{children:z.label})]}),(0,xt.jsx)(na.FlexItem,{className:"dataviews-view-grid__field-value",style:{maxHeight:"none"},children:(0,xt.jsx)(z.render,{item:c,field:z})})]})},z.id))})]})]})});function Y9({data:e,isInfiniteScroll:t,className:r,inert:o,isLoading:n,view:i,fields:s,selection:l,onChangeSelection:c,onClickItem:u,isItemClickable:d,renderItemLink:f,getItemId:m,actions:h}){let{paginationInfo:g,resizeObserverRef:v}=(0,Dp.useContext)(nt),b=AA(),S=_A(h,e),y=s.find(k=>k.id===i?.titleField),w=s.find(k=>k.id===i?.mediaField),_=s.find(k=>k.id===i?.descriptionField),x=i.fields??[],{regularFields:E,badgeFields:O}=x.reduce((k,P)=>{let N=s.find(F=>F.id===P);if(!N)return k;let U=i.layout?.badgeFields?.includes(P)?"badgeFields":"regularFields";return k[U].push(N),k},{regularFields:[],badgeFields:[]}),A="900px",C=Math.ceil(e.length/b),I=OA(e,t,b);return(0,xt.jsxs)(xt.Fragment,{children:[t&&(0,xt.jsxs)(na.Composite,{render:(0,xt.jsx)(V1,{className:Q("dataviews-view-grid-infinite-scroll",r,{[`has-${i.layout?.density}-density`]:i.layout?.density&&["compact","comfortable"].includes(i.layout.density)}),previewSize:i.layout?.previewSize,"aria-busy":n,ref:v}),role:"feed",focusWrap:!0,inert:o,children:[Array.from({length:I}).map((k,P)=>(0,xt.jsx)(na.Composite.Item,{render:N=>(0,xt.jsx)(ne,{...N,direction:"column",role:"article",className:"dataviews-view-grid__row__gridcell dataviews-view-grid__card dataviews-view-grid__placeholder"}),"aria-hidden":!0,tabIndex:-1},`placeholder-${P}`)),e.map(k=>{let P=m(k),N=k.position;return(0,xt.jsx)(na.Composite.Item,{render:U=>(0,xt.jsx)(woe,{...U,id:P,role:"article",view:i,selection:l,onChangeSelection:c,onClickItem:u,isItemClickable:d,renderItemLink:f,getItemId:m,item:k,actions:h,mediaField:w,titleField:y,descriptionField:_,regularFields:E,badgeFields:O,hasBulkActions:S,posinset:N,setsize:g.totalItems,config:{sizes:A}})},P)})]}),!t&&(0,xt.jsx)(na.Composite,{role:"grid",className:Q("dataviews-view-grid",r,{[`has-${i.layout?.density}-density`]:i.layout?.density&&["compact","comfortable"].includes(i.layout.density)}),focusWrap:!0,"aria-busy":n,"aria-rowcount":C,ref:v,inert:o,children:MDe(e,b).map((k,P)=>(0,xt.jsx)(na.Composite.Row,{render:(0,xt.jsx)("div",{role:"row","aria-rowindex":P+1,"aria-label":(0,j1.sprintf)((0,j1.__)("Row %d"),P+1),className:"dataviews-view-grid__row",style:{gridTemplateColumns:`repeat( ${b}, minmax(0, 1fr) )`}}),children:k.map(N=>{let U=m(N);return(0,xt.jsx)(na.Composite.Item,{render:F=>(0,xt.jsx)(woe,{...F,id:U,role:"gridcell",view:i,selection:l,onChangeSelection:c,onClickItem:u,isItemClickable:d,renderItemLink:f,getItemId:m,item:N,actions:h,mediaField:w,titleField:y,descriptionField:_,regularFields:E,badgeFields:O,hasBulkActions:S,config:{sizes:A}})},U)})},P))})]})}var Ka=a(T(),1);function FDe({actions:e,data:t,fields:r,getItemId:o,isLoading:n,onChangeSelection:i,onClickItem:s,isItemClickable:l,renderItemLink:c,selection:u,view:d,className:f,empty:m}){let h=Mu(!!n),g=!!t?.length,v=d.groupBy?.field?r.find(w=>w.id===d.groupBy?.field):null,b=v?ra(t,v):null,S=d.infiniteScrollEnabled&&!b;if(!g)return(0,Ka.jsx)("div",{className:Q("dataviews-no-results",{"is-refreshing":h}),children:m});let y={className:Q(f,{"is-refreshing":!S&&h}),inert:!S&&n?"true":void 0,isLoading:n,view:d,fields:r,selection:u,onChangeSelection:i,onClickItem:s,isItemClickable:l,renderItemLink:c,getItemId:o,actions:e};return(0,Ka.jsxs)(Ka.Fragment,{children:[g&&v&&b&&(0,Ka.jsx)(ne,{direction:"column",gap:"lg",children:Array.from(b.entries()).map(([w,_])=>(0,Ka.jsxs)(ne,{direction:"column",gap:"sm",children:[(0,Ka.jsx)("h3",{className:"dataviews-view-grid__group-header",children:d.groupBy?.showLabel===!1?w:(0,NA.sprintf)((0,NA.__)("%1$s: %2$s"),v.label,w)}),(0,Ka.jsx)(Y9,{...y,data:_,isInfiniteScroll:!1})]},w))}),!b&&(0,Ka.jsx)(Y9,{...y,data:t,isInfiniteScroll:!!S}),S&&n&&(0,Ka.jsx)("p",{className:"dataviews-loading-more",children:(0,Ka.jsx)(xoe.Spinner,{})})]})}var Coe=FDe;var MA=a(ke(),1),Mi=a(W(),1),Uo=a(H(),1),z1=a(V(),1);var X9=a(G(),1);var et=a(T(),1),{Menu:q9}=Ct(Mi.privateApis);function K9(e){return`${e}-item-wrapper`}function DDe(e,t){return`${e}-primary-action-${t}`}function Z9(e){return`${e}-dropdown`}function LDe({idPrefix:e,primaryAction:t,item:r}){let o=(0,X9.useRegistry)(),[n,i]=(0,Uo.useState)(!1),s=DDe(e,t.id),l=typeof t.label=="string"?t.label:t.label([r]);return"RenderModal"in t?(0,et.jsx)("div",{role:"gridcell",children:(0,et.jsx)(Mi.Composite.Item,{id:s,render:(0,et.jsx)(Mi.Button,{disabled:!!t.disabled,accessibleWhenDisabled:!0,text:l,size:"small",onClick:()=>i(!0)}),children:n&&(0,et.jsx)(L1,{action:t,items:[r],closeModal:()=>i(!1)})})},t.id):(0,et.jsx)("div",{role:"gridcell",children:(0,et.jsx)(Mi.Composite.Item,{id:s,render:(0,et.jsx)(Mi.Button,{disabled:!!t.disabled,accessibleWhenDisabled:!0,size:"small",onClick:()=>{t.callback([r],{registry:o})},children:l})})},t.id)}function Toe({view:e,actions:t,idPrefix:r,isSelected:o,item:n,titleField:i,mediaField:s,descriptionField:l,onSelect:c,otherFields:u,onDropdownTriggerKeyDown:d,posinset:f}){let{showTitle:m=!0,showMedia:h=!0,showDescription:g=!0,infiniteScrollEnabled:v}=e,b=(0,Uo.useRef)(null),S=`${r}-label`,y=`${r}-description`,w=(0,X9.useRegistry)(),[_,x]=(0,Uo.useState)(!1),[E,O]=(0,Uo.useState)(null),A=({type:L})=>{x(L==="mouseenter")},{paginationInfo:C}=(0,Uo.useContext)(nt);(0,Uo.useEffect)(()=>{o&&b.current?.scrollIntoView({behavior:"auto",block:"nearest",inline:"nearest"})},[o]);let{primaryAction:I,eligibleActions:k}=(0,Uo.useMemo)(()=>{let L=t.filter(z=>!z.isEligible||z.isEligible(n));return{primaryAction:L.filter(z=>z.isPrimary)[0],eligibleActions:L}},[t,n]),P=I&&t.length===1,N=h&&s?.render?(0,et.jsx)("div",{className:"dataviews-view-list__media-wrapper",children:(0,et.jsx)(s.render,{item:n,field:s,config:{sizes:"52px"}})}):null,U=m&&i?.render?(0,et.jsx)(i.render,{item:n,field:i}):null,F=g&&l?.render,D=!!N&&!F&&!u.length,B=k?.length>0&&(0,et.jsxs)(ne,{direction:"row",gap:"md",className:"dataviews-view-list__item-actions",children:[I&&(0,et.jsx)(LDe,{idPrefix:r,primaryAction:I,item:n}),!P&&(0,et.jsxs)("div",{role:"gridcell",children:[(0,et.jsxs)(q9,{placement:"bottom-end",children:[(0,et.jsx)(q9.TriggerButton,{render:(0,et.jsx)(Mi.Composite.Item,{id:Z9(r),render:(0,et.jsx)(Mi.Button,{size:"small",icon:fo,label:(0,z1.__)("Actions"),accessibleWhenDisabled:!0,disabled:!t.length,onKeyDown:d})})}),(0,et.jsx)(q9.Popover,{children:(0,et.jsx)(H9,{actions:k,item:n,registry:w,setActiveModalAction:O})})]}),!!E&&(0,et.jsx)(L1,{action:E,items:[n],closeModal:()=>O(null)})]})]});return(0,et.jsx)(Mi.Composite.Row,{ref:b,render:(0,et.jsx)("div",{"aria-posinset":f,"aria-setsize":v?C.totalItems:void 0}),role:v?"article":"row",className:Q({"is-selected":o,"is-hovered":_}),onMouseEnter:A,onMouseLeave:A,children:(0,et.jsxs)(ne,{direction:"row",className:"dataviews-view-list__item-wrapper",children:[(0,et.jsx)("div",{role:"gridcell",children:(0,et.jsx)(Mi.Composite.Item,{id:K9(r),"aria-pressed":o,"aria-labelledby":S,"aria-describedby":y,className:"dataviews-view-list__item",onClick:()=>c(n)})}),(0,et.jsxs)(ne,{direction:"row",gap:"md",justify:"start",align:D?"center":"flex-start",style:{flex:1,minWidth:0},children:[N,(0,et.jsxs)(ne,{direction:"column",gap:"xs",className:"dataviews-view-list__field-wrapper",children:[(0,et.jsxs)(ne,{direction:"row",align:"center",children:[(0,et.jsx)("div",{className:"dataviews-title-field dataviews-view-list__title-field",id:S,children:U}),B]}),F&&(0,et.jsx)("div",{className:"dataviews-view-list__field",children:(0,et.jsx)(l.render,{item:n,field:l})}),(0,et.jsx)("div",{className:"dataviews-view-list__fields",id:y,children:u.map(L=>(0,et.jsxs)("div",{className:"dataviews-view-list__field",children:[(0,et.jsx)(Ut,{className:"dataviews-view-list__field-label",render:(0,et.jsx)("span",{}),children:L.label}),(0,et.jsx)("span",{className:"dataviews-view-list__field-value",children:(0,et.jsx)(L.render,{item:n,field:L})})]},L.id))})]})]})]})})}function BDe(e){return!!e}function Q9(e){let{actions:t,data:r,fields:o,getItemId:n,isLoading:i,onChangeSelection:s,selection:l,view:c,className:u,empty:d}=e,f=(0,MA.useInstanceId)(Q9,"view-list"),m=Mu(!!i),h=r?.findLast(B=>l.includes(n(B))),g=o.find(B=>B.id===c.titleField),v=o.find(B=>B.id===c.mediaField),b=o.find(B=>B.id===c.descriptionField),S=(c?.fields??[]).map(B=>o.find(L=>B===L.id)).filter(BDe),y=B=>s([n(B)]),w=(0,Uo.useCallback)(B=>`${f}-${n(B)}`,[f,n]),_=(0,Uo.useCallback)((B,L)=>L.startsWith(w(B)),[w]),[x,E]=(0,Uo.useState)(void 0),O=(0,Uo.useRef)(null);(0,Uo.useEffect)(()=>{h&&E(K9(w(h)))},[h,w]);let A=r.findIndex(B=>_(B,x??"")),C=(0,MA.usePrevious)(A),I=A!==-1,k=(0,Uo.useCallback)((B,L)=>{let M=Math.min(r.length-1,Math.max(0,B));if(!r[M])return;let z=w(r[M]),K=L(z);E(K),O.current?.contains(O.current.ownerDocument.activeElement)&&document.getElementById(K)?.focus()},[r,w]);(0,Uo.useEffect)(()=>{!I&&(C!==void 0&&C!==-1)&&k(C,K9)},[I,k,C]);let P=(0,Uo.useCallback)(B=>{B.key==="ArrowDown"&&(B.preventDefault(),k(A+1,Z9)),B.key==="ArrowUp"&&(B.preventDefault(),k(A-1,Z9))},[k,A]),N=!!r?.length,U=c.groupBy?.field?o.find(B=>B.id===c.groupBy?.field):null,F=N&&U?ra(r,U):null,D=c.infiniteScrollEnabled&&!F;return N?N&&U&&F?(0,et.jsx)(Mi.Composite,{ref:O,id:`${f}`,render:(0,et.jsx)("div",{}),className:"dataviews-view-list__group",role:"grid",activeId:x,setActiveId:E,children:(0,et.jsx)(ne,{direction:"column",gap:"lg",className:Q("dataviews-view-list",u),children:Array.from(F.entries()).map(([B,L])=>(0,et.jsxs)(ne,{direction:"column",gap:"sm",children:[(0,et.jsx)("h3",{className:"dataviews-view-list__group-header",children:c.groupBy?.showLabel===!1?B:(0,z1.sprintf)((0,z1.__)("%1$s: %2$s"),U.label,B)}),L.map(M=>{let z=w(M);return(0,et.jsx)(Toe,{view:c,idPrefix:z,actions:t,item:M,isSelected:M===h,onSelect:y,mediaField:v,titleField:g,descriptionField:b,otherFields:S,onDropdownTriggerKeyDown:P},z)})]},B))})}):(0,et.jsxs)(et.Fragment,{children:[(0,et.jsx)(Mi.Composite,{ref:O,id:f,render:(0,et.jsx)("div",{}),className:Q("dataviews-view-list",u,{[`has-${c.layout?.density}-density`]:c.layout?.density&&["compact","comfortable"].includes(c.layout.density),"is-refreshing":!D&&m}),role:c.infiniteScrollEnabled?"feed":"grid",activeId:x,setActiveId:E,inert:!D&&i?"true":void 0,children:r.map((B,L)=>{let M=w(B);return(0,et.jsx)(Toe,{view:c,idPrefix:M,actions:t,item:B,isSelected:B===h,onSelect:y,mediaField:v,titleField:g,descriptionField:b,otherFields:S,onDropdownTriggerKeyDown:P,posinset:c.infiniteScrollEnabled?L+1:void 0},M)})}),D&&i&&(0,et.jsx)("p",{className:"dataviews-loading-more",children:(0,et.jsx)(Mi.Spinner,{})})]}):(0,et.jsx)("div",{className:Q("dataviews-no-results",{"is-refreshing":m}),children:d})}var Ooe=a(W(),1);var FA=a(V(),1),Eoe=a(H(),1);var I0=a(T(),1);function Poe({groupName:e,groupData:t,groupField:r,showLabel:o=!0,children:n}){let i=o?(0,Eoe.createInterpolateElement)((0,FA.sprintf)((0,FA.__)("%s: <groupName />"),r.label).trim(),{groupName:(0,I0.jsx)(r.render,{item:t[0],field:r})}):(0,I0.jsx)(r.render,{item:t[0],field:r});return(0,I0.jsxs)(ne,{direction:"column",className:"dataviews-view-activity__group",children:[(0,I0.jsx)("h3",{className:"dataviews-view-activity__group-header",children:i}),n]},e)}var mv=a(H(),1),koe=a(G(),1),Roe=a(ke(),1);var ko=a(T(),1);function VDe(e){let{view:t,actions:r,item:o,titleField:n,mediaField:i,descriptionField:s,otherFields:l,posinset:c,onClickItem:u,renderItemLink:d,isItemClickable:f}=e,{showTitle:m=!0,showMedia:h=!0,showDescription:g=!0,infiniteScrollEnabled:v}=t,b=(0,mv.useRef)(null),S=(0,koe.useRegistry)(),{paginationInfo:y}=(0,mv.useContext)(nt),{primaryActions:w,eligibleActions:_}=(0,mv.useMemo)(()=>{let k=r.filter(N=>!N.isEligible||N.isEligible(o));return{primaryActions:k.filter(N=>N.isPrimary),eligibleActions:k}},[r,o]),x=(0,Roe.useViewportMatch)("medium","<"),E=t.layout?.density??"balanced",O=h&&E!=="compact"&&i?.render?(0,ko.jsx)(i.render,{item:o,field:i,config:{sizes:E==="comfortable"?"32px":"24px"}}):null,A=(0,ko.jsx)("div",{className:"dataviews-view-activity__item-type-icon",children:O||(0,ko.jsx)("span",{className:"dataviews-view-activity__item-bullet","aria-hidden":"true"})}),C=m&&n?.render?(0,ko.jsx)(n.render,{item:o,field:n}):null,I=(0,mv.useMemo)(()=>E==="comfortable"?"md":"sm",[E]);return(0,ko.jsx)("div",{ref:b,role:v?"article":void 0,"aria-posinset":c,"aria-setsize":v?y.totalItems:void 0,className:Q("dataviews-view-activity__item",E==="compact"&&"is-compact",E==="balanced"&&"is-balanced",E==="comfortable"&&"is-comfortable"),children:(0,ko.jsxs)(ne,{direction:"row",gap:"lg",justify:"start",align:"flex-start",children:[(0,ko.jsx)(ne,{direction:"column",gap:"xs",align:"center",className:"dataviews-view-activity__item-type",children:A}),(0,ko.jsxs)(ne,{direction:"column",gap:I,align:"flex-start",className:"dataviews-view-activity__item-content",children:[C&&(0,ko.jsx)(Np,{item:o,isItemClickable:f,onClickItem:u,renderItemLink:d,className:"dataviews-view-activity__item-title",children:C}),g&&s&&(0,ko.jsx)("div",{className:"dataviews-view-activity__item-description",children:(0,ko.jsx)(s.render,{item:o,field:s})}),(0,ko.jsx)("div",{className:"dataviews-view-activity__item-fields",children:l.map(k=>(0,ko.jsxs)("div",{className:"dataviews-view-activity__item-field",children:[(0,ko.jsx)(Ut,{className:"dataviews-view-activity__item-field-label",render:(0,ko.jsx)("span",{}),children:k.label}),(0,ko.jsx)("span",{className:"dataviews-view-activity__item-field-value",children:(0,ko.jsx)(k.render,{item:o,field:k})})]},k.id))}),!!w?.length&&(0,ko.jsx)(U9,{item:o,actions:w,registry:S,buttonVariant:"secondary"})]}),(w.length<_.length||x&&_.length>0)&&(0,ko.jsx)("div",{className:"dataviews-view-activity__item-actions",children:(0,ko.jsx)(R0,{item:o,actions:_,isCompact:!0})})]})})}var Aoe=VDe;var Ioe=a(xe(),1);function jDe(e){return!!e}function J9(e){let{data:t,fields:r,getItemId:o,view:n}=e,i=r.find(u=>u.id===n.titleField),s=r.find(u=>u.id===n.mediaField),l=r.find(u=>u.id===n.descriptionField),c=(n?.fields??[]).map(u=>r.find(d=>u===d.id)).filter(jDe);return t.map((u,d)=>(0,Ioe.createElement)(Aoe,{...e,key:o(u),item:u,mediaField:s,titleField:i,descriptionField:l,otherFields:c,posinset:n.infiniteScrollEnabled?d+1:void 0}))}var Za=a(T(),1);function Noe(e){let{empty:t,data:r,fields:o,isLoading:n,view:i,className:s}=e,l=Mu(!!n),c=!!r?.length,u=i.groupBy?.field?o.find(v=>v.id===i.groupBy?.field):null,d=c&&u?ra(r,u):null,f=i.infiniteScrollEnabled&&!d;if(!c)return(0,Za.jsx)("div",{className:Q("dataviews-no-results",{"is-refreshing":l}),children:t});let m=!f&&!!n,h=Q("dataviews-view-activity",s,{"is-refreshing":!f&&l}),g=d?Array.from(d.entries()):[];return c&&u&&d?(0,Za.jsx)(ne,{direction:"column",gap:"sm",className:h,inert:m?"true":void 0,children:g.map(([v,b])=>(0,Za.jsx)(Poe,{groupName:v,groupData:b,groupField:u,showLabel:i.groupBy?.showLabel!==!1,children:(0,Za.jsx)(J9,{...e,data:b})},v))}):(0,Za.jsxs)(Za.Fragment,{children:[(0,Za.jsx)("div",{className:h,role:i.infiniteScrollEnabled?"feed":void 0,inert:m?"true":void 0,children:(0,Za.jsx)(J9,{...e})}),f&&n&&(0,Za.jsx)("p",{className:"dataviews-loading-more",children:(0,Za.jsx)(Ooe.Spinner,{})})]})}var vs=a(W(),1),W1=a(V(),1),joe=a(ke(),1),LA=a(H(),1);var U1=a(W(),1),Foe=a(G(),1),Fu=a(H(),1);var DA=a(V(),1);var H1=a(W(),1),O0=a(H(),1),Xa=a(V(),1);var wf=a(T(),1);function $9(){let{view:e,onChangeView:t,paginationInfo:{totalItems:r=0,totalPages:o}}=(0,O0.useContext)(nt);if(!r||!o||e.infiniteScrollEnabled)return null;let n=e.page??1,i=Array.from(Array(o)).map((s,l)=>{let c=l+1;return{value:c.toString(),label:c.toString(),"aria-label":n===c?(0,Xa.sprintf)((0,Xa.__)("Page %1$d of %2$d"),n,o):c.toString()}});return!!r&&o!==1&&(0,wf.jsxs)(ne,{direction:"row",className:"dataviews-pagination",justify:"end",align:"center",gap:"xl",children:[(0,wf.jsx)(ne,{direction:"row",justify:"flex-start",align:"center",gap:"xs",className:"dataviews-pagination__page-select",children:(0,O0.createInterpolateElement)((0,Xa.sprintf)((0,Xa._x)("<div>Page</div>%1$s<div>of %2$d</div>","paging"),"<CurrentPage />",o),{div:(0,wf.jsx)("div",{"aria-hidden":!0}),CurrentPage:(0,wf.jsx)(H1.SelectControl,{"aria-label":(0,Xa.__)("Current page"),value:n.toString(),options:i,onChange:s=>{t({...e,page:+s})},size:"small",variant:"minimal"})})}),(0,wf.jsxs)(ne,{direction:"row",gap:"xs",align:"center",children:[(0,wf.jsx)(H1.Button,{onClick:()=>t({...e,page:n-1}),disabled:n===1,accessibleWhenDisabled:!0,label:(0,Xa.__)("Previous page"),icon:(0,Xa.isRTL)()?hl:gl,showTooltip:!0,size:"compact",tooltipPosition:"top"}),(0,wf.jsx)(H1.Button,{onClick:()=>t({...e,page:n+1}),disabled:n>=o,accessibleWhenDisabled:!0,label:(0,Xa.__)("Next page"),icon:(0,Xa.isRTL)()?gl:hl,showTooltip:!0,size:"compact",tooltipPosition:"top"})]})]})}var Moe=(0,O0.memo)($9);var Bn=a(T(),1),ej=[];function pv(e){return(0,Fu.useMemo)(()=>!!e?.length&&e?.every(t=>t.supportsBulk),[e])}function zDe({selection:e,selectedItems:t,onChangeSelection:r,data:o,getItemId:n,disableSelectAll:i=!1}){let s=e.length>0,l=t.length===o.length;return i?(0,Bn.jsx)(U1.CheckboxControl,{className:"dataviews-view-table-selection-checkbox",checked:s,disabled:!s,onChange:()=>{r([])},"aria-label":(0,DA.__)("Deselect all")}):(0,Bn.jsx)(U1.CheckboxControl,{className:"dataviews-view-table-selection-checkbox",checked:l,indeterminate:!l&&!!t.length,onChange:()=>{if(l)r(e.filter(c=>!o.some(u=>c===n(u))));else{let c=new Set([...e,...o.map(u=>n(u))]);r(Array.from(c))}},"aria-label":l?(0,DA.__)("Deselect all"):(0,DA.__)("Select all")})}function HDe({actions:e,items:t,selection:r}){let o=(0,Foe.useRegistry)(),[n,i]=(0,Fu.useState)(null);return(0,Bn.jsx)(ne,{direction:"row",gap:"xs",children:e.map(s=>{if(!("callback"in s))return null;let{id:l,label:c,icon:u,isPrimary:d,callback:f}=s,m=typeof c=="string"?c:c(t),h=d?"primary":"tertiary",g=l===n;return(0,Bn.jsx)(U1.Button,{accessibleWhenDisabled:!0,icon:u,disabled:g||!r?.length,isBusy:g,onClick:async()=>{i(l),await f(t,{registry:o}),i(null)},size:"compact",variant:h,children:m},l)})})}function Doe(){let{data:e,selection:t,onChangeSelection:r,getItemId:o,actions:n=ej,paginationInfo:i,view:s}=(0,Fu.useContext)(nt),l=pv(n),c=(0,Fu.useMemo)(()=>e.filter(d=>t.includes(o(d))),[t,o,e]);if(!n.length)return null;let u=loe(t.length,e.length,i.totalItems,!!s.infiniteScrollEnabled);return(0,Bn.jsxs)(ne,{direction:"row",className:"dataviews-picker-footer__bulk-selection",gap:"md",align:"center",children:[l&&(0,Bn.jsx)(zDe,{selection:t,selectedItems:c,onChangeSelection:r,data:e,getItemId:o,disableSelectAll:!!s.infiniteScrollEnabled}),(0,Bn.jsx)("span",{className:"dataviews-bulk-actions-footer__item-count",children:u})]})}function Loe(){let{data:e,selection:t,getItemId:r,actions:o=ej}=(0,Fu.useContext)(nt),n=(0,Fu.useMemo)(()=>e.filter(i=>t.includes(r(i))),[t,r,e]);return o.length?(0,Bn.jsx)("div",{className:"dataviews-picker-footer__actions",children:(0,Bn.jsx)(HDe,{actions:o,items:n,selection:t})}):null}function Boe(){return(0,Bn.jsxs)(ne,{direction:"row",gap:"md",align:"center",children:[(0,Bn.jsx)(Doe,{}),(0,Bn.jsx)(Loe,{})]})}function tj(){let{actions:e=ej,paginationInfo:t,view:r}=(0,Fu.useContext)(nt),o=!r.infiniteScrollEnabled&&!!t.totalItems&&t.totalPages>1;return!e.length&&!o?null:(0,Bn.jsxs)(ne,{direction:"row",justify:"space-between",align:"center",className:"dataviews-footer",gap:"sm",children:[(0,Bn.jsx)(Doe,{}),(0,Bn.jsx)(Moe,{}),(0,Bn.jsx)(Loe,{})]})}var St=a(T(),1),{Badge:UDe}=Ct(vs.privateApis);function Voe({view:e,multiselect:t,selection:r,onChangeSelection:o,getItemId:n,item:i,mediaField:s,titleField:l,descriptionField:c,regularFields:u,badgeFields:d,config:f,posinset:m,setsize:h}){let{showTitle:g=!0,showMedia:v=!0,showDescription:b=!0}=e,S=n(i),y=(0,LA.useRef)(null),w=r.includes(S);Fp(y,m);let _=s?.render?(0,St.jsx)(s.render,{item:i,field:s,config:f}):null,x=g&&l?.render?(0,St.jsx)(l.render,{item:i,field:l}):null;return(0,St.jsxs)(vs.Composite.Item,{ref:y,"aria-label":l?l.getValue({item:i})||(0,W1.__)("(no title)"):void 0,render:({children:E,...O})=>(0,St.jsx)(ne,{direction:"column",children:E,...O}),role:"option","aria-posinset":m,"aria-setsize":h,className:Q("dataviews-view-picker-grid__card",{"is-selected":w}),"aria-selected":w,onClick:()=>{if(w)o(r.filter(E=>S!==E));else{let E=t?[...r,S]:[S];o(E)}},children:[v&&_&&(0,St.jsx)("div",{className:"dataviews-view-picker-grid__media",children:_}),v&&_&&(0,St.jsx)(Ap,{item:i,selection:r,onChangeSelection:o,getItemId:n,titleField:l,disabled:!1,"aria-hidden":!0,tabIndex:-1}),g&&(0,St.jsx)(ne,{direction:"row",justify:"space-between",className:"dataviews-view-picker-grid__title-actions",children:(0,St.jsx)("div",{className:"dataviews-view-picker-grid__title-field dataviews-title-field",children:x})}),(0,St.jsxs)(ne,{direction:"column",gap:"xs",children:[b&&c?.render&&(0,St.jsx)(c.render,{item:i,field:c}),!!d?.length&&(0,St.jsx)(ne,{direction:"row",className:"dataviews-view-picker-grid__badge-fields",gap:"sm",wrap:"wrap",align:"top",justify:"flex-start",children:d.map(E=>(0,St.jsx)(UDe,{className:"dataviews-view-picker-grid__field-value",children:(0,St.jsx)(E.render,{item:i,field:E})},E.id))}),!!u?.length&&(0,St.jsx)(ne,{direction:"column",className:"dataviews-view-picker-grid__fields",gap:"xs",children:u.map(E=>(0,St.jsx)(vs.Flex,{className:"dataviews-view-picker-grid__field",gap:1,justify:"flex-start",expanded:!0,style:{height:"auto"},direction:"row",children:(0,St.jsxs)(St.Fragment,{children:[(0,St.jsx)(vs.FlexItem,{className:"dataviews-view-picker-grid__field-name",children:E.header}),(0,St.jsx)(vs.FlexItem,{className:"dataviews-view-picker-grid__field-value",style:{maxHeight:"none"},children:(0,St.jsx)(E.render,{item:i,field:E})})]})},E.id))})]})]},S)}function zoe({groupName:e,groupField:t,showLabel:r=!0,children:o}){let n=(0,joe.useInstanceId)(zoe,"dataviews-view-picker-grid-group__header");return(0,St.jsxs)(ne,{direction:"column",gap:"sm",role:"group","aria-labelledby":n,children:[(0,St.jsx)("h3",{className:"dataviews-view-picker-grid-group__header",id:n,children:r?(0,W1.sprintf)((0,W1.__)("%1$s: %2$s"),t.label,e):e}),o]},e)}function WDe({actions:e,data:t,fields:r,getItemId:o,isLoading:n,onChangeSelection:i,selection:s,view:l,className:c,empty:u}){let{resizeObserverRef:d,paginationInfo:f,itemListLabel:m}=(0,LA.useContext)(nt),h=r.find(F=>F.id===l?.titleField),g=r.find(F=>F.id===l?.mediaField),v=r.find(F=>F.id===l?.descriptionField),b=l.fields??[],{regularFields:S,badgeFields:y}=b.reduce((F,D)=>{let B=r.find(M=>M.id===D);if(!B)return F;let L=l.layout?.badgeFields?.includes(D)?"badgeFields":"regularFields";return F[L].push(B),F},{regularFields:[],badgeFields:[]}),w=!!t?.length,_=l.layout?.previewSize,x=pv(e),E="900px",O=l.groupBy?.field?r.find(F=>F.id===l.groupBy?.field):null,A=O?ra(t,O):null,C=(l.infiniteScrollEnabled&&!A)??!1,I=l?.page??1,k=l?.perPage??0,P=C?f?.totalItems:void 0,N=AA(),U=OA(t,C,N);return(0,St.jsxs)(St.Fragment,{children:[w&&O&&A&&(0,St.jsx)(vs.Composite,{virtualFocus:!0,orientation:"horizontal",role:"listbox","aria-multiselectable":x,className:Q("dataviews-view-picker-grid",c,{[`has-${l.layout?.density}-density`]:l.layout?.density&&["compact","comfortable"].includes(l.layout.density)}),"aria-label":m,render:({children:F,...D})=>(0,St.jsx)(ne,{direction:"column",gap:"lg",children:F,...D}),children:Array.from(A.entries()).map(([F,D])=>(0,St.jsx)(zoe,{groupName:F,groupField:O,showLabel:l.groupBy?.showLabel!==!1,children:(0,St.jsx)(V1,{previewSize:_,style:{gridTemplateColumns:_&&`repeat(auto-fill, minmax(${_}px, 1fr))`},"aria-busy":n,ref:d,children:D.map(B=>{let L=B.position??(I-1)*k+t.indexOf(B)+1;return(0,St.jsx)(Voe,{view:l,multiselect:x,selection:s,onChangeSelection:i,getItemId:o,item:B,mediaField:g,titleField:h,descriptionField:v,regularFields:S,badgeFields:y,config:{sizes:E},posinset:L,setsize:P},o(B))})})},F))}),w&&!A&&(0,St.jsxs)(vs.Composite,{render:(0,St.jsx)(V1,{className:Q("dataviews-view-picker-grid",c,{[`has-${l.layout?.density}-density`]:l.layout?.density&&["compact","comfortable"].includes(l.layout.density)}),previewSize:_,"aria-busy":n,ref:d}),virtualFocus:!0,orientation:"horizontal",role:"listbox","aria-multiselectable":x,"aria-label":m,children:[Array.from({length:U}).map((F,D)=>(0,St.jsx)(vs.Composite.Item,{render:({children:B,...L})=>(0,St.jsx)(ne,{direction:"column",children:B,...L}),role:"option","aria-hidden":!0,tabIndex:-1,className:"dataviews-view-picker-grid__card dataviews-view-picker-grid__placeholder"},`placeholder-${D}`)),t.map(F=>{let D=F.position;return(0,St.jsx)(Voe,{view:l,multiselect:x,selection:s,onChangeSelection:i,getItemId:o,item:F,mediaField:g,titleField:h,descriptionField:v,regularFields:S,badgeFields:y,config:{sizes:E},posinset:D,setsize:P},o(F))})]}),!w&&(0,St.jsx)("div",{className:Q({"dataviews-loading":n,"dataviews-no-results":!n}),children:n?(0,St.jsx)("p",{children:(0,St.jsx)(vs.Spinner,{})}):u}),w&&n&&(0,St.jsx)("p",{className:"dataviews-loading-more",children:(0,St.jsx)(vs.Spinner,{})})]})}var Hoe=WDe;var BA=a(V(),1),hv=a(W(),1),Qa=a(H(),1);var It=a(T(),1);function GDe({item:e,fields:t,column:r,align:o}){let n=t.find(s=>s.id===r);if(!n)return null;let i=Q("dataviews-view-table__cell-content-wrapper",{"dataviews-view-table__cell-align-end":o==="end","dataviews-view-table__cell-align-center":o==="center"});return(0,It.jsx)("div",{className:i,children:(0,It.jsx)(n.render,{item:e,field:n})})}function Uoe({item:e,fields:t,id:r,view:o,titleField:n,mediaField:i,descriptionField:s,selection:l,getItemId:c,onChangeSelection:u,multiselect:d,posinset:f}){let{paginationInfo:m}=(0,Qa.useContext)(nt),h=l.includes(r),[g,v]=(0,Qa.useState)(!1),b=(0,Qa.useRef)(null);Fp(b,f);let{showTitle:S=!0,showMedia:y=!0,showDescription:w=!0,infiniteScrollEnabled:_}=o,x=()=>{v(!0)},E=()=>{v(!1)},O=o.fields??[],A=n&&S||i&&y||s&&w;return(0,It.jsxs)(hv.Composite.Item,{ref:b,render:({children:C,...I})=>(0,It.jsx)("tr",{className:Q("dataviews-view-table__row",{"is-selected":h,"is-hovered":g}),onMouseEnter:x,onMouseLeave:E,children:C,...I}),"aria-selected":h,"aria-setsize":m.totalItems||void 0,"aria-posinset":f,role:_?"article":"option",onMouseDown:C=>{C.button===0&&C.currentTarget.parentElement?.focus({preventScroll:!0})},onClick:()=>{if(h)u(l.filter(C=>r!==C));else{let C=d?[...l,r]:[r];u(C)}},children:[(0,It.jsx)("td",{className:"dataviews-view-table__checkbox-column",role:"presentation",children:(0,It.jsx)("div",{className:"dataviews-view-table__cell-content-wrapper",children:(0,It.jsx)(Ap,{item:e,selection:l,onChangeSelection:u,getItemId:c,titleField:n,disabled:!1,"aria-hidden":!0,tabIndex:-1})})}),A&&(0,It.jsx)("td",{role:"presentation",children:(0,It.jsx)(TA,{item:e,titleField:S?n:void 0,mediaField:y?i:void 0,descriptionField:w?s:void 0,isItemClickable:()=>!1})}),O.map(C=>{let{width:I,maxWidth:k,minWidth:P,align:N}=o.layout?.styles?.[C]??{};return(0,It.jsx)("td",{style:{width:I,maxWidth:k,minWidth:P},role:"presentation",children:(0,It.jsx)(GDe,{fields:t,item:e,column:C,align:N})},C)})]},r)}function YDe({actions:e,data:t,fields:r,getItemId:o,isLoading:n=!1,onChangeView:i,onChangeSelection:s,selection:l,setOpenedFilter:c,view:u,className:d,empty:f}){let m=(0,Qa.useRef)(new Map),h=(0,Qa.useRef)(void 0),[g,v]=(0,Qa.useState)(),b=pv(e)??!1;(0,Qa.useEffect)(()=>{h.current&&(h.current.focus(),h.current=void 0)});let S=u.groupBy?.field?r.find(D=>D.id===u.groupBy?.field):null,y=S?ra(t,S):null,w=u.infiniteScrollEnabled&&!y,_=(0,Qa.useId)();if(g){h.current=g,v(void 0);return}let x=D=>{let B=m.current.get(D.id),L=B?m.current.get(B.fallback):void 0;v(L?.node)},E=!!t?.length,O=r.find(D=>D.id===u.titleField),A=r.find(D=>D.id===u.mediaField),C=r.find(D=>D.id===u.descriptionField),{showTitle:I=!0,showMedia:k=!0,showDescription:P=!0}=u,N=O&&I||A&&k||C&&P,U=u.fields??[],F=(D,B)=>L=>{L?m.current.set(D,{node:L,fallback:U[B>0?B-1:1]}):m.current.delete(D)};return(0,It.jsxs)(It.Fragment,{children:[(0,It.jsxs)("table",{className:Q("dataviews-view-table","dataviews-view-picker-table",d,{[`has-${u.layout?.density}-density`]:u.layout?.density&&["compact","comfortable"].includes(u.layout.density)}),"aria-busy":n,"aria-describedby":_,role:w?"feed":"listbox",children:[(0,It.jsx)("thead",{role:"presentation",children:(0,It.jsxs)("tr",{className:"dataviews-view-table__row",role:"presentation",children:[(0,It.jsx)("th",{className:"dataviews-view-table__checkbox-column",children:b&&(0,It.jsx)(xA,{selection:l,onChangeSelection:s,data:t,actions:e,getItemId:o,disableSelectAll:w})}),N&&(0,It.jsx)("th",{children:O&&(0,It.jsx)(A0,{ref:F(O.id,0),fieldId:O.id,view:u,fields:r,onChangeView:i,onHide:x,setOpenedFilter:c,canMove:!1})}),U.map((D,B)=>{let{width:L,maxWidth:M,minWidth:z,align:K}=u.layout?.styles?.[D]??{};return(0,It.jsx)("th",{style:{width:L,maxWidth:M,minWidth:z,textAlign:K},"aria-sort":u.sort?.direction&&u.sort?.field===D?hA[u.sort.direction]:void 0,scope:"col",children:(0,It.jsx)(A0,{ref:F(D,B),fieldId:D,view:u,fields:r,onChangeView:i,onHide:x,setOpenedFilter:c,canMove:u.layout?.enableMoving??!0})},D)})]})}),E&&S&&y?Array.from(y.entries()).map(([D,B])=>(0,It.jsxs)(hv.Composite,{virtualFocus:!0,orientation:"vertical",render:(0,It.jsx)("tbody",{role:"group"}),children:[(0,It.jsx)("tr",{className:"dataviews-view-table__group-header-row",role:"presentation",children:(0,It.jsx)("td",{colSpan:U.length+(N?1:0)+1,className:"dataviews-view-table__group-header-cell",role:"presentation",children:u.groupBy?.showLabel===!1?D:(0,BA.sprintf)((0,BA.__)("%1$s: %2$s"),S.label,D)})}),B.map((L,M)=>(0,It.jsx)(Uoe,{item:L,fields:r,id:o(L)||M.toString(),view:u,titleField:O,mediaField:A,descriptionField:C,selection:l,getItemId:o,onChangeSelection:s,multiselect:b},o(L)))]},`group-${D}`)):(0,It.jsx)(hv.Composite,{render:(0,It.jsx)("tbody",{role:"presentation"}),virtualFocus:!0,orientation:"vertical",children:E&&t.map((D,B)=>{let L=o(D),M=D.position;return(0,It.jsx)(Uoe,{item:D,fields:r,id:L||B.toString(),view:u,titleField:O,mediaField:A,descriptionField:C,selection:l,getItemId:o,onChangeSelection:s,multiselect:b,posinset:M},L)})})]}),(0,It.jsxs)("div",{className:Q({"dataviews-loading":n,"dataviews-no-results":!E&&!n}),id:_,children:[!E&&(n?(0,It.jsx)("p",{children:(0,It.jsx)(hv.Spinner,{})}):f),E&&n&&(0,It.jsx)("p",{className:"dataviews-loading-more",children:(0,It.jsx)(hv.Spinner,{})})]})]})}var Woe=YDe;var N0=a(W(),1),M0=a(H(),1),Goe=a(ke(),1),VA=a(V(),1);var Wt=a(T(),1);function qDe(e){return!!e}function KDe({view:e,multiselect:t,selection:r,onChangeSelection:o,getItemId:n,item:i,titleField:s,mediaField:l,descriptionField:c,otherFields:u,posinset:d,setsize:f}){let m=(0,M0.useRef)(null);Fp(m,d);let{showTitle:h=!0,showMedia:g=!0,showDescription:v=!0}=e,b=n(i),S=r.includes(b),y=e.layout?.density??"balanced",w=g&&y!=="compact"&&l?.render?(0,Wt.jsx)(l.render,{item:i,field:l,config:{sizes:y==="comfortable"?"32px":"24px"}}):null,_=(0,Wt.jsx)("div",{className:"dataviews-view-picker-activity__item-type-icon",children:w||(0,Wt.jsx)("span",{className:"dataviews-view-picker-activity__item-bullet","aria-hidden":"true"})}),x=h&&s?.render?(0,Wt.jsx)(s.render,{item:i,field:s}):null,E=v&&c?.render?(0,Wt.jsx)(c.render,{item:i,field:c}):null,O=(0,M0.useMemo)(()=>y==="comfortable"?"md":"sm",[y]);return(0,Wt.jsx)(N0.Composite.Item,{ref:m,role:"option","aria-label":s&&s.getValue({item:i})||void 0,"aria-posinset":d,"aria-setsize":f,"aria-selected":S,className:Q("dataviews-view-picker-activity__item",y==="compact"&&"is-compact",y==="balanced"&&"is-balanced",y==="comfortable"&&"is-comfortable",S&&"is-selected"),onClick:()=>{if(S)o(r.filter(A=>b!==A));else{let A=t?[...r,b]:[b];o(A)}},render:(0,Wt.jsx)("div",{}),children:(0,Wt.jsxs)(ne,{direction:"row",gap:"lg",justify:"start",align:"flex-start",children:[(0,Wt.jsx)(ne,{direction:"column",gap:"xs",align:"center",className:"dataviews-view-picker-activity__item-type",children:_}),(0,Wt.jsxs)(ne,{direction:"column",gap:O,align:"flex-start",className:"dataviews-view-picker-activity__item-content",children:[x&&(0,Wt.jsx)("div",{className:"dataviews-view-picker-activity__item-title",children:x}),E&&(0,Wt.jsx)("div",{className:"dataviews-view-picker-activity__item-description",children:E}),(0,Wt.jsx)("div",{className:"dataviews-view-picker-activity__item-fields",children:u.map(A=>(0,Wt.jsxs)("div",{className:"dataviews-view-picker-activity__item-field",children:[(0,Wt.jsx)(Ut,{render:(0,Wt.jsx)("span",{}),className:"dataviews-view-picker-activity__item-field-label",children:A.label}),(0,Wt.jsx)("span",{className:"dataviews-view-picker-activity__item-field-value",children:(0,Wt.jsx)(A.render,{item:i,field:A})})]},A.id))})]})]})})}function Yoe({groupName:e,groupField:t,showLabel:r=!0,children:o}){let n=(0,Goe.useInstanceId)(Yoe,"dataviews-view-picker-activity-group__header");return(0,Wt.jsxs)(ne,{direction:"column",role:"group","aria-labelledby":n,className:"dataviews-view-picker-activity-group",children:[(0,Wt.jsx)("h3",{className:"dataviews-view-picker-activity-group__header",id:n,children:r?(0,VA.sprintf)((0,VA.__)("%1$s: %2$s"),t.label,e):e}),o]})}function qoe({data:e,fields:t,getItemId:r,isLoading:o,onChangeSelection:n,selection:i,view:s,actions:l,className:c,empty:u}){let{itemListLabel:d,paginationInfo:f}=(0,M0.useContext)(nt),m=pv(l),h=t.find(A=>A.id===s?.titleField),g=t.find(A=>A.id===s?.mediaField),v=t.find(A=>A.id===s?.descriptionField),b=(s?.fields??[]).map(A=>t.find(C=>A===C.id)).filter(qDe),S=s.groupBy?.field?t.find(A=>A.id===s.groupBy?.field):null,y=S?ra(e,S):null,_=(s.infiniteScrollEnabled&&!y)??!1?f?.totalItems:void 0,x=!!e?.length,E=!!(S&&y),O=A=>(0,Wt.jsx)(KDe,{view:s,multiselect:m,selection:i,onChangeSelection:n,getItemId:r,item:A,titleField:h,mediaField:g,descriptionField:v,otherFields:b,posinset:A.position,setsize:_},r(A));return x?(0,Wt.jsxs)(Wt.Fragment,{children:[(0,Wt.jsx)(N0.Composite,{virtualFocus:!0,orientation:"vertical",role:"listbox","aria-multiselectable":m,"aria-label":d,"aria-busy":o,render:E?(0,Wt.jsx)(ne,{direction:"column",gap:"sm"}):void 0,className:Q("dataviews-view-picker-activity",c),children:E&&y?Array.from(y.entries()).map(([A,C])=>(0,Wt.jsx)(Yoe,{groupName:A,groupField:S,showLabel:s.groupBy?.showLabel!==!1,children:C.map(O)},A)):e.map(O)}),o&&(0,Wt.jsx)("p",{className:"dataviews-loading-more",children:(0,Wt.jsx)(N0.Spinner,{})})]}):(0,Wt.jsx)("div",{className:Q({"dataviews-loading":o,"dataviews-no-results":!o}),children:o?(0,Wt.jsx)("p",{children:(0,Wt.jsx)(N0.Spinner,{})}):u})}var F0=a(W(),1),D0=a(V(),1),Koe=a(H(),1);var L0=a(T(),1);function Lp(){let e=(0,Koe.useContext)(nt),t=e.view;return(0,L0.jsxs)(F0.__experimentalToggleGroupControl,{size:"__unstable-large",label:(0,D0.__)("Density"),value:t.layout?.density||"balanced",onChange:r=>{e.onChangeView({...t,layout:{...t.layout,density:r}})},isBlock:!0,children:[(0,L0.jsx)(F0.__experimentalToggleGroupControlOption,{value:"comfortable",label:(0,D0._x)("Comfortable","Density option for DataView layout")},"comfortable"),(0,L0.jsx)(F0.__experimentalToggleGroupControlOption,{value:"balanced",label:(0,D0._x)("Balanced","Density option for DataView layout")},"balanced"),(0,L0.jsx)(F0.__experimentalToggleGroupControlOption,{value:"compact",label:(0,D0._x)("Compact","Density option for DataView layout")},"compact")]})}var Zoe=a(W(),1),Xoe=a(V(),1),Qoe=a(H(),1);var Joe=a(T(),1),ZDe=[{value:120,breakpoint:1},{value:170,breakpoint:1},{value:230,breakpoint:1},{value:290,breakpoint:1112},{value:350,breakpoint:1636},{value:430,breakpoint:588}];function $oe(){let e=(0,Qoe.useContext)(nt),t=e.view,r=ZDe.filter(s=>e.containerWidth>=s.breakpoint),o=t.layout?.previewSize??230,n=r.map((s,l)=>({...s,index:l})).filter(s=>s.value<=o).sort((s,l)=>l.value-s.value)[0]?.index??0,i=r.map((s,l)=>({value:l}));return(0,Joe.jsx)(Zoe.RangeControl,{__next40pxDefaultSize:!0,showTooltip:!1,label:(0,Xoe.__)("Preview size"),value:n,min:0,max:r.length-1,withInputField:!1,onChange:(s=0)=>{e.onChangeView({...t,layout:{...t.layout,previewSize:r[s].value}})},step:1,marks:i})}var gv=a(T(),1);function rj(){return(0,gv.jsxs)(gv.Fragment,{children:[(0,gv.jsx)(Lp,{}),(0,gv.jsx)($oe,{})]})}var Bp=[{type:vA,label:(0,Du.__)("Table"),component:voe,icon:PP,viewConfigOptions:Lp},{type:qre,label:(0,Du.__)("Grid"),component:Coe,icon:RP,viewConfigOptions:rj},{type:Kre,label:(0,Du.__)("List"),component:Q9,icon:(0,Du.isRTL)()?rL:rx,viewConfigOptions:Lp},{type:Zre,label:(0,Du.__)("Activity"),component:Noe,icon:Vm,viewConfigOptions:Lp},{type:Xre,label:(0,Du.__)("Grid"),component:Hoe,icon:RP,viewConfigOptions:rj,isPicker:!0},{type:Qre,label:(0,Du.__)("Table"),component:Woe,icon:PP,viewConfigOptions:Lp,isPicker:!0},{type:Jre,label:(0,Du.__)("Activity"),component:qoe,icon:Vm,viewConfigOptions:Lp,isPicker:!0}];var X0=a(H(),1);var Up=a(W(),1),Pf=a(V(),1),PI=a(H(),1);var ene=a(xe(),1),tne=(0,ene.createContext)(!0);function rne(e){return Array.isArray(e)?e:typeof e<"u"?[e]:[]}function jA(e){let t=[];for(let r of e)t.push(...r);return t}function G1(e){return e.slice().reverse()}var B0=XDe();function XDe(){return typeof window<"u"&&!!window.document?.createElement}function Sf(e){return e?"self"in e?e.document:e.ownerDocument||document:document}function Y1(e,t=!1){let{activeElement:r}=Sf(e);if(!r?.nodeName)return null;if(QDe(r)&&r.contentDocument?.body)return Y1(r.contentDocument.body,t);if(t){let o=r.getAttribute("aria-activedescendant");if(o){let n=Sf(r).getElementById(o);if(n)return n}}return r}function vv(e,t){return e===t||e.contains(t)}function q1(e){return e?.nodeType===1}function one(e){return typeof e?.nodeType=="number"}function QDe(e){return e.tagName==="IFRAME"}function V0(e){let t=e.tagName.toLowerCase();return t==="button"?!0:t==="input"&&e.type?JDe.indexOf(e.type)!==-1:!1}var JDe=["button","color","file","image","reset","submit"];function $De(e){if(typeof e.checkVisibility=="function")return e.checkVisibility();let t=e;return t.offsetWidth>0||t.offsetHeight>0||e.getClientRects().length>0}function bs(e){try{let t=e instanceof HTMLInputElement&&e.selectionStart!==null,r=e.tagName==="TEXTAREA";return t||r||!1}catch{return!1}}function zA(e){return e.isContentEditable||bs(e)}function nne(e){if(bs(e))return e.value;if(e.isContentEditable){let t=Sf(e).createRange();return t.selectNodeContents(e),t.toString()}return""}function K1(e){let t=0,r=0;if(bs(e))t=e.selectionStart||0,r=e.selectionEnd||0;else if(e.isContentEditable){let o=Sf(e).getSelection();if(o?.rangeCount&&o.anchorNode&&vv(e,o.anchorNode)&&o.focusNode&&vv(e,o.focusNode)){let n=o.getRangeAt(0),i=n.cloneRange();i.selectNodeContents(e),i.setEnd(n.startContainer,n.startOffset),t=i.toString().length,i.setEnd(n.endContainer,n.endOffset),r=i.toString().length}}return{start:t,end:r}}function ine(e,t){let r=["dialog","menu","listbox","tree","grid"],o=e?.getAttribute("role");return o&&r.indexOf(o)!==-1?o:t}function Z1(e){if(!e)return null;let t=r=>r==="auto"||r==="scroll";if(e.clientHeight&&e.scrollHeight>e.clientHeight){let{overflowY:r}=getComputedStyle(e);if(t(r))return e}else if(e.clientWidth&&e.scrollWidth>e.clientWidth){let{overflowX:r}=getComputedStyle(e);if(t(r))return e}return Z1(e.parentElement)||document.scrollingElement||document.body}function HA(e,...t){/text|search|password|tel|url/i.test(e.type)&&e.setSelectionRange(...t)}function sne(e,t){let r=e.map((n,i)=>[i,n]),o=!1;return r.sort(([n,i],[s,l])=>{let c=t(i),u=t(l);return c===u||!c||!u?0:e4e(c,u)?(n>s&&(o=!0),-1):(n<s&&(o=!0),1)}),o?r.map(([n,i])=>i):e}function e4e(e,t){return!!(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}function ane(){return B0&&!!navigator.maxTouchPoints}function lne(){return B0?/mac|iphone|ipad|ipod/i.test(navigator.platform):!1}function j0(){return B0&&lne()&&/apple/i.test(navigator.vendor)}function cne(){return B0&&/firefox\//i.test(navigator.userAgent)}function une(e){let{currentTarget:t,target:r}=e;return t?one(r)?!vv(t,r):!0:!1}function Fi(e){return e.target===e.currentTarget}function dne(e){let t=e.currentTarget;if(!t)return!1;let r=lne();if(r&&!e.metaKey||!r&&!e.ctrlKey)return!1;let o=t.tagName.toLowerCase();return o==="a"||o==="button"&&t.type==="submit"||o==="input"&&t.type==="submit"}function fne(e){let t=e.currentTarget;if(!t)return!1;let r=t.tagName.toLowerCase();return e.altKey?r==="a"||r==="button"&&t.type==="submit"||r==="input"&&t.type==="submit":!1}function bv(e,t){let r=new FocusEvent("blur",t),o=e.dispatchEvent(r),n={...t,bubbles:!0};return e.dispatchEvent(new FocusEvent("focusout",n)),o}function mne(e,t,r){let o=new KeyboardEvent(t,r);return e.dispatchEvent(o)}function oj(e,t){let r=new MouseEvent("click",t);return e.dispatchEvent(r)}function UA(e,t){let r=t||e.currentTarget,o=e.relatedTarget;return!one(o)||!vv(r,o)}function yv(e,t,r,o){let i=(l=>{if(o){let u=setTimeout(l,o);return()=>clearTimeout(u)}let c=requestAnimationFrame(l);return()=>cancelAnimationFrame(c)})(()=>{e.removeEventListener(t,s,!0),r()}),s=()=>{i(),r()};return e.addEventListener(t,s,{once:!0,capture:!0}),i}function Lu(e,t,r,o=window){let n=[];try{o.document.addEventListener(e,t,r);for(let s of Array.from(o.frames))n.push(Lu(e,t,r,s))}catch{}return()=>{try{o.document.removeEventListener(e,t,r)}catch{}for(let s of n)s()}}var t4e="input:not([type='hidden']):not([disabled]), select:not([disabled]), textarea:not([disabled]), a[href], button:not([disabled]), [tabindex], summary, iframe, object, embed, area[href], audio[controls], video[controls], [contenteditable]:not([contenteditable='false'])";function WA(e){return!(!e.matches(t4e)||!$De(e)||e.closest("[inert]"))}function El(e){let t=Y1(e);if(!t)return!1;if(t===e)return!0;let r=t.getAttribute("aria-activedescendant");return r?r===e.id:!1}function pne(e){let t=Y1(e);if(!t)return!1;if(vv(e,t))return!0;let r=t.getAttribute("aria-activedescendant");return!r||!("id"in e)?!1:r===e.id?!0:!!e.querySelector(`#${CSS.escape(r)}`)}function hne(e,t){"scrollIntoView"in e?(e.focus({preventScroll:!0}),e.scrollIntoView({block:"nearest",inline:"nearest",...t})):e.focus()}function GA(...e){}function Ja(e,t){return typeof Object.hasOwn=="function"?Object.hasOwn(e,t):Object.prototype.hasOwnProperty.call(e,t)}function z0(...e){return(...t)=>{for(let r of e)typeof r=="function"&&r(...t)}}function YA(e){return e.normalize("NFD").replace(/[\u0300-\u036f]/g,"")}function gne(e,t){let r={...e};for(let o of t)Ja(r,o)&&delete r[o];return r}function vne(e,t){let r={};for(let o of t)Ja(e,o)&&(r[o]=e[o]);return r}function qA(e){return e}function Di(e,t){if(!e)throw typeof t!="string"?new Error("Invariant failed"):new Error(t)}function bne(e){return Object.keys(e)}function yne(e,...t){let r=typeof e=="function"?e(...t):e;return r==null?!1:!r}function H0(e){return e.disabled||e["aria-disabled"]===!0||e["aria-disabled"]==="true"}function Li(e){let t={};for(let r in e)e[r]!==void 0&&(t[r]=e[r]);return t}function Mt(...e){for(let t of e)if(t!==void 0)return t}function wne(e){return async()=>{let t=await e?.();return wne(async()=>(await t?.(),e))}}var iEt=r4e();function r4e({limit:e=100}={}){let t=[],r=[],o=null,n=()=>t.length>0,i=()=>r.length>0;return{canUndo:n,canRedo:i,undo:async()=>{n()&&(o=null,r.push(await t.pop()?.()))},redo:async()=>{i()&&(o=null,t.push(await r.pop()?.()))},execute:async(u,d)=>{if(!u)return;for(;t.length>e;)t.shift();let f=d===o;o=d??null;let m=f?Math.max(0,t.length-1):t.length,h=await u();if(!h)return;r=[];let g=t[m];t[m]=wne(async()=>{await h?.();let v=await g?.();return async()=>{await v?.(),await u?.()}})}}}var Bi=a(xe(),1),gr=a(xe(),1),wv=a(T(),1);function o4e(e,t){typeof e=="function"?e(t):e&&(e.current=t)}function n4e(e){return!e||!(0,gr.isValidElement)(e)?!1:"ref"in e.props||"ref"in e}function i4e(e){return n4e(e)?{...e.props}.ref||e.ref:null}function s4e(e,t){let r={...e};for(let o in t){if(!Ja(t,o))continue;if(o==="className"){let i="className",s=e[i],l=t[i];s&&l?r[i]=`${s} ${l}`:r[i]=l||s;continue}if(o==="style"){let i="style";r[i]=e[i]?{...e[i],...t[i]}:t[i];continue}let n=t[o];if(o.startsWith("on")){if(typeof n!="function")continue;let i=e[o];if(typeof i=="function"){r[o]=(...s)=>{n(...s),i(...s)};continue}}r[o]=n}return r}var nj={...Bi},Sne=nj.useId,lEt=nj.useDeferredValue,_ne=nj.useInsertionEffect,$r=B0?gr.useLayoutEffect:gr.useEffect;function a4e(e){let[t]=(0,gr.useState)(e);return t}function Ene(e){let t=(0,gr.useRef)(e);return $r(()=>{t.current=e}),t}function Ft(e){let t=(0,gr.useRef)(()=>{throw new Error("Cannot call an event handler while rendering.")});return _ne?_ne(()=>{t.current=e}):t.current=e,(0,gr.useCallback)((...r)=>t.current?.(...r),[])}function Pne(e){let[t,r]=(0,gr.useState)(null);return $r(()=>{if(t==null||!e)return;let o=null;return e(n=>(o=n,t)),()=>{e(o)}},[t,e]),[t,r]}function Wo(...e){return(0,gr.useMemo)(()=>{if(e.some(Boolean))return t=>{for(let r of e)o4e(r,t)}},e)}function Pl(e){if(Sne){let o=Sne();return e||o}let[t,r]=(0,gr.useState)(e);return $r(()=>{e||t||r(`id-${Math.random().toString(36).slice(2,8)}`)},[e,t]),e||t}function kne(e,t){let r=i=>{if(typeof i=="string")return i},[o,n]=(0,gr.useState)(()=>r(t));return $r(()=>{n((e&&"current"in e?e.current:e)?.tagName.toLowerCase()||r(t))},[e,t]),o}function Rne(e,t,r){let o=a4e(r),[n,i]=(0,gr.useState)(o);return(0,gr.useEffect)(()=>{let s=e&&"current"in e?e.current:e;if(!s)return;let l=()=>{let u=s.getAttribute(t);i(u??o)},c=new MutationObserver(l);return c.observe(s,{attributeFilter:[t]}),l(),()=>c.disconnect()},[e,t,o]),n}function Bu(e,t){let r=(0,gr.useRef)(!1);(0,gr.useEffect)(()=>{if(r.current)return e();r.current=!0},t),(0,gr.useEffect)(()=>()=>{r.current=!1},[])}function Ane(e,t){let r=(0,gr.useRef)(!1);$r(()=>{if(r.current)return e();r.current=!0},t),$r(()=>()=>{r.current=!1},[])}function Ine(){return(0,gr.useReducer)(()=>[],[])}function Go(e){return Ft(typeof e=="function"?e:()=>e)}function Vu(e,t,r=[]){let o=(0,gr.useCallback)(n=>(e.wrapElement&&(n=e.wrapElement(n)),t(n)),[...r,e.wrapElement]);return{...e,wrapElement:o}}function ZA(e,t,r){let o=e.onLoadedMetadataCapture,n=(0,gr.useMemo)(()=>Object.assign(()=>{},o,...r!==void 0?[{[t]:r}]:[]),[o,t,r]);return[o?.[t],{onLoadedMetadataCapture:n}]}var xne=!1;function One(){return(0,gr.useEffect)(()=>{xne||(Lu("mousemove",c4e,!0),Lu("mousedown",KA,!0),Lu("mouseup",KA,!0),Lu("keydown",KA,!0),Lu("scroll",KA,!0),xne=!0)},[]),Ft(()=>ij)}var ij=!1,Cne=0,Tne=0;function l4e(e){let t=e.movementX||e.screenX-Cne,r=e.movementY||e.screenY-Tne;return Cne=e.screenX,Tne=e.screenY,t||r||!1}function c4e(e){l4e(e)&&(ij=!0)}function KA(){ij=!1}function Tr(e){let t=Bi.forwardRef((r,o)=>e({...r,ref:o}));return t.displayName=e.displayName||e.name,t}function Vp(e,t){return Bi.memo(e,t)}function Nr(e,t){let{wrapElement:r,render:o,...n}=t,i=Wo(t.ref,i4e(o)),s;if(Bi.isValidElement(o)){let l={...o.props,ref:i};s=Bi.cloneElement(o,s4e(n,l))}else o?s=o(n):s=(0,wv.jsx)(e,{...n});return r?r(s):s}function Mr(e){let t=(r={})=>e(r);return t.displayName=e.name,t}function ia(e=[],t=[]){let r=Bi.createContext(void 0),o=Bi.createContext(void 0),n=()=>Bi.useContext(r),i=(u=!1)=>{let d=Bi.useContext(o),f=n();return u?d:d||f},s=()=>{let u=Bi.useContext(o),d=n();if(!(u&&u===d))return d},l=u=>e.reduceRight((d,f)=>(0,wv.jsx)(f,{...u,children:d}),(0,wv.jsx)(r.Provider,{...u}));return{context:r,scopedContext:o,useContext:n,useScopedContext:i,useProviderContext:s,ContextProvider:l,ScopedContextProvider:u=>(0,wv.jsx)(l,{...u,children:t.reduceRight((d,f)=>(0,wv.jsx)(f,{...u,children:d}),(0,wv.jsx)(o.Provider,{...u}))})}}var ci=a(xe(),1),u4e="div",d4e=Symbol("accessibleWhenDisabled"),f4e=j0(),m4e=["text","search","url","tel","email","password","number","date","month","week","time","datetime","datetime-local"];function p4e(e){let{tagName:t,readOnly:r,type:o}=e;return t==="TEXTAREA"&&!r||t==="SELECT"&&!r?!0:t==="INPUT"&&!r?m4e.includes(o):!!(e.isContentEditable||e.getAttribute("role")==="combobox"&&e.dataset.name)}function h4e(e){return e?e==="button"||e==="summary"||e==="input"||e==="select"||e==="textarea"||e==="a":!0}function g4e(e){return e?e==="button"||e==="input"||e==="select"||e==="textarea":!0}var v4e=["button","color","file","image","reset","submit"];function b4e(e,t){return e==="button"?!0:e==="input"&&t?t==="checkbox"||t==="radio"?!0:v4e.includes(t):!1}function y4e(e){if(e.tagName==="BUTTON"){let{type:t}=e;return t==="submit"}if(e.tagName==="INPUT"){let{type:t}=e;return t==="submit"||t==="image"}return!1}function w4e({focusable:e,trulyDisabled:t,nativeTabbable:r,supportsDisabled:o,safariTabIndex:n,tabIndexProp:i}){return e?t?r&&!o?-1:void 0:r?n&&i==null?0:i:i??0:i}function sj(e,t){return Ft(r=>{e?.(r),!r.defaultPrevented&&t&&(r.stopPropagation(),r.preventDefault())})}var Nne=!1,aj=!0;function S4e(e){let t=e.target;q1(t)&&!t.hasAttribute("data-focus-visible")&&(aj=!1)}function _4e(e){e.metaKey||e.ctrlKey||e.altKey||(aj=!0)}var X1=Mr(function({focusable:t=!0,accessibleWhenDisabled:r,autoFocus:o,onFocusVisible:n,...i}){let s=(0,ci.useRef)(null),[l,c]=ZA(i,d4e,r);r??=l,(0,ci.useEffect)(()=>{t&&(Nne||(Lu("mousedown",S4e,!0),Lu("keydown",_4e,!0),Nne=!0))},[t]);let u=t&&H0(i),d=u&&!r,[f,m]=(0,ci.useState)(!1),h=(0,ci.useRef)(!1),g=(0,ci.useRef)(null),v=Ft(M=>{g.current?.(),g.current=null,h.current=!1,M?.removeAttribute("data-focus-visible")});(0,ci.useEffect)(()=>{t&&d&&(v(s.current),f&&m(!1))},[t,d,f,v]),(0,ci.useEffect)(()=>{if(!t||!f)return;let M=s.current;if(!M||typeof IntersectionObserver>"u")return;let z=new IntersectionObserver(()=>{WA(M)||(h.current=!1,m(!1))});return z.observe(M),()=>z.disconnect()},[t,f]),(0,ci.useEffect)(()=>()=>g.current?.(),[]);let b=sj(i.onKeyPressCapture,u),S=sj(i.onMouseDownCapture,u),y=sj(i.onClickCapture,u),w=(M,z)=>{if(z&&(M.currentTarget=z),!t)return;let K=M.currentTarget;if(K&&El(K)&&(n?.(M),!M.defaultPrevented)){if(K.dataset.focusVisible="true",h.current=!0,y4e(K)){if(g.current?.(),g.current=null,typeof IntersectionObserver<"u"){let Z=new IntersectionObserver(()=>{WA(K)||v(K)});Z.observe(K),g.current=()=>Z.disconnect()}return}m(!0)}},_=i.onKeyDownCapture,x=Ft(M=>{if(_?.(M),M.defaultPrevented||!t||f||h.current||M.metaKey||M.altKey||M.ctrlKey||!Fi(M))return;let z=M.currentTarget;yv(z,"focusout",()=>w(M,z))}),E=i.onFocusCapture,O=Ft(M=>{if(E?.(M),M.defaultPrevented||!t)return;if(!Fi(M)){m(!1);return}let z=M.currentTarget,K=()=>w(M,z);aj||p4e(M.target)?yv(M.target,"focusout",K):m(!1)}),A=i.onBlur,C=Ft(M=>{A?.(M),t&&UA(M)&&(v(M.currentTarget),m(!1))}),I=(0,ci.useContext)(tne),k=Ft(M=>{t&&o&&M&&I&&queueMicrotask(()=>{El(M)||WA(M)&&M.focus()})}),P=kne(s),N=t&&h4e(P),U=t&&g4e(P),[F,D]=(0,ci.useState)(!1);f4e&&(0,ci.useEffect)(()=>{if(!t)return;let M=s.current;if(!M)return;let z=M.tagName.toLowerCase(),K=M.type;D(b4e(z,K))},[t]);let B=i.style,L=(0,ci.useMemo)(()=>d?{pointerEvents:"none",...B}:B,[d,B]);return i={"data-focus-visible":t&&f||void 0,"data-autofocus":o||void 0,"aria-disabled":u||void 0,...i,...c,ref:Wo(s,k,i.ref),style:L,tabIndex:w4e({focusable:t,trulyDisabled:d,nativeTabbable:N,supportsDisabled:U,safariTabIndex:F,tabIndexProp:i.tabIndex}),disabled:U&&d?!0:void 0,contentEditable:u?void 0:i.contentEditable,onKeyPressCapture:b,onClickCapture:y,onMouseDownCapture:S,onKeyDownCapture:x,onFocusCapture:O,onBlur:C},Li(i)}),mEt=Tr(function(t){return Nr(u4e,X1(t))});var jp=a(xe(),1),x4e="button";function Mne(e){if(!e.isTrusted)return!1;let t=e.currentTarget;return e.key==="Enter"?V0(t)||t.tagName==="SUMMARY"||t.tagName==="A":e.key===" "?V0(t)||t.tagName==="SUMMARY"||t.tagName==="INPUT"||t.tagName==="SELECT":!1}var C4e=Symbol("command"),lj=Mr(function({clickOnEnter:t=!0,clickOnSpace:r=!0,...o}){let n=(0,jp.useRef)(null),[i,s]=(0,jp.useState)(!1);(0,jp.useEffect)(()=>{n.current&&s(V0(n.current))},[]);let[l,c]=(0,jp.useState)(!1),u=(0,jp.useRef)(!1),d=H0(o),[f,m]=ZA(o,C4e,!0),h=o.onKeyDown,g=Ft(S=>{h?.(S);let y=S.currentTarget;if(S.defaultPrevented||f||d||!Fi(S)||bs(y)||y.isContentEditable)return;let w=t&&S.key==="Enter",_=r&&S.key===" ",x=S.key==="Enter"&&!t,E=S.key===" "&&!r;if(x||E){S.preventDefault();return}if(w||_){let O=Mne(S);if(w){if(!O){S.preventDefault();let{view:A,...C}=S,I=()=>oj(y,C);cne()?yv(y,"keyup",I):queueMicrotask(I)}}else _&&(u.current=!0,O||(S.preventDefault(),c(!0)))}}),v=o.onKeyUp,b=Ft(S=>{if(v?.(S),S.defaultPrevented||f||d||S.metaKey)return;let y=r&&S.key===" ";if(u.current&&y&&(u.current=!1,!Mne(S))){S.preventDefault(),c(!1);let w=S.currentTarget,{view:_,...x}=S;queueMicrotask(()=>oj(w,x))}});return o={"data-active":l||void 0,type:i?"button":void 0,...m,...o,ref:Wo(n,o.ref),onKeyDown:g,onKeyUp:b},o=X1(o),o}),bEt=Tr(function(t){return Nr(x4e,lj(t))});var Q1=ia(),Fne=Q1.useContext,SEt=Q1.useScopedContext,_Et=Q1.useProviderContext,Dne=Q1.ContextProvider,Lne=Q1.ScopedContextProvider;var XA=a(xe(),1),T4e="div",cj=Mr(function({store:t,shouldRegisterItem:r=!0,getItem:o=qA,element:n,...i}){let s=Fne();t=t||s;let l=Pl(i.id),c=(0,XA.useRef)(n);return(0,XA.useEffect)(()=>{let u=c.current;if(!l||!u||!r)return;let d=o({id:l,element:u});return t?.renderItem(d)},[l,r,o,t]),i={...i,ref:Wo(c,i.ref)},Li(i)}),PEt=Tr(function(t){return Nr(T4e,cj(t))});var uj=a(xe(),1),J1=ia([Dne],[Lne]),IEt=J1.useContext,QA=J1.useScopedContext,Bne=J1.useProviderContext,JA=J1.ContextProvider,U0=J1.ScopedContextProvider,Vne=(0,uj.createContext)(void 0),jne=(0,uj.createContext)(void 0);function zne(e,t){return e.find(r=>t?!r.disabled&&r.id!==t:!r.disabled)}function ju(e,t){return t&&e.item(t)||null}function Hne(e){let t=[];for(let r of e){let o=t.find(n=>n[0]?.rowId===r.rowId);o?o.push(r):t.push([r])}return t}function Une(e,t=!1){if(bs(e))e.setSelectionRange(t?e.value.length:0,e.value.length);else if(e.isContentEditable){let r=Sf(e).getSelection();r?.selectAllChildren(e),t&&r?.collapseToEnd()}}var dj=Symbol("FOCUS_SILENTLY");function Wne(e){e[dj]=!0,e.focus({preventScroll:!0})}function Gne(e){let t=e[dj];return delete e[dj],t}function Sv(e,t,r){if(!t||t===r)return!1;let o=e.item(t.id);return!(!o||r&&o.element===r)}var _f=a(xe(),1),Zne=a(T(),1);function _v(e,t){let r=e.__unstableInternals;return Di(r,"Invalid store"),r[t]}function E4e(e,t){if(!e)return!0;for(let r of e)if(t instanceof Set){if(t.has(r))return!0}else if(r===t)return!0;return!1}function P4e(e,t,r){if(t)for(let o of t){let n=e.get(o);n||(n=new Set,e.set(o,n)),n.add(r)}}function k4e(e,t,r){if(e&&t)for(let o of t){let n=e.get(o);n&&(n.delete(r),n.size||e.delete(o))}}function sa(e,...t){let r=e,o=r,n=GA,i=!1,s=!1,l=new Set,c=new Set,u=new Set,d={listeners:new Set,disposables:new Map,listenerKeys:new WeakMap},f={listeners:new Set,disposables:new Map,listenerKeys:new WeakMap},m=I=>(u.add(I),()=>u.delete(I)),h=()=>{let I=c.size,k=Symbol();c.add(k);let P=()=>{c.delete(k),!c.size&&n()};if(I)return P;let N=bne(r),U=[];for(let B of t){let L=B?.getState?.();if(!L)continue;let M=N.filter(K=>Ja(L,K));if(!M.length)continue;if(t.length===1||M.length===N.length){for(let K of M)U.push(Vn(B,[K],Z=>{A(K,Z[K],!0)}));continue}let z=!1;U.push(Vn(B,M,(K,Z)=>{for(let q of M)z&&K[q]===Z[q]||A(q,K[q],!0);z=!0}))}let F=[];for(let B of u)F.push(B());let D=t.map($1);return n=z0(...U,...F,...D),P},g=(I,k,P)=>{P!==void 0&&(P?k4e(I.listenersByKey,P,k):I.allKeysListeners?.delete(k))},v=(I,k,P=d)=>{let N=I?[...I]:null;return P.listeners.has(k)&&g(P,k,P.listenerKeys.get(k)),P.listeners.add(k),N?(P.listenersByKey??=new Map,P4e(P.listenersByKey,N,k)):(P.allKeysListeners??=new Set,P.allKeysListeners.add(k)),P.listenerKeys.set(k,N),()=>{P.disposables.get(k)?.(),P.disposables.delete(k);let U=P.listenerKeys.get(k);g(P,k,N),U!==N&&g(P,k,U),P.listenerKeys.delete(k),P.listeners.delete(k)}},b=(I,k)=>v(I,k),S=(I,k,P)=>{P?I.disposables.set(k,P):I.disposables.delete(k)},y=(I,k)=>(S(d,k,k(r,r)),v(I,k)),w=(I,k)=>(!f.listeners.size&&!s&&(o=r),S(f,k,k(r,o)),v(I,k,f)),_=I=>sa(vne(r,I),C),x=I=>sa(gne(r,I),C),E=()=>r,O=(I,k,P)=>{let{disposables:N}=I;if(!(P instanceof Set)&&!I.allKeysListeners?.size){let F=I.listenersByKey?.get(P);if(!F)return;for(let D of F){let B=N.size?N.get(D):void 0;B&&B();let L=D(r,k);L?N.set(D,L):B&&N.delete(D)}return}let U=I.allKeysListeners;for(let F of I.listeners){if(!U?.has(F)&&!E4e(I.listenerKeys.get(F),P))continue;let D=N.size?N.get(F):void 0;D&&D();let B=F(r,k);B?N.set(F,B):D&&N.delete(F)}},A=(I,k,P=!1)=>{if(!Ja(r,I))return;let N=r[I],U=typeof k=="function"?k(N):k;if(U===N)return;if(!P&&t.length)for(let B of t)B?.setState?.(I,U);let F=r;r={...r,[I]:U};let D=s;s=!0;try{O(d,F,I)}finally{s=D}if(!f.listeners.size){s||(o=r);return}l.add(I),!i&&(i=!0,queueMicrotask(()=>{i=!1;let B=r,L=l;l=new Set;let M=o;O(f,M,L),o===M&&(o=B)}))},C={getState:E,setState:A,__unstableInternals:{setup:m,init:h,subscribe:b,sync:y,batch:w,pick:_,omit:x}};return C}function ui(e,...t){if(e)return _v(e,"setup")(...t)}function $1(e,...t){if(e)return _v(e,"init")(...t)}function eC(e,...t){if(e)return _v(e,"subscribe")(...t)}function Vn(e,...t){if(e)return _v(e,"sync")(...t)}function xv(e,...t){if(e)return _v(e,"batch")(...t)}function $A(e,...t){if(e)return _v(e,"omit")(...t)}function Yne(e,...t){if(e)return _v(e,"pick")(...t)}function W0(...e){let t={};for(let o of e){let n=o?.getState?.();n&&Object.assign(t,n)}let r=sa(t,...e);return Object.assign({},...e,r)}var zu=a(xe(),1),fj=a(U2(),1),qne=()=>()=>{};function Xt(e,t=qA){let r=zu.useCallback(n=>e?eC(e,null,n):qne(),[e]),o=()=>{let n=typeof t=="string"?t:null,i=typeof t=="function"?t:null,s=e?.getState();if(i)return i(s);if(s&&n&&Ja(s,n))return s[n]};return(0,fj.useSyncExternalStore)(r,o,o)}function eI(e,t){let r=zu.useRef({}),o=zu.useCallback(i=>e?eC(e,null,i):qne(),[e]),n=()=>{let i=e?.getState(),s=!1,l=r.current;for(let c in t){let u=t[c];if(typeof u=="function"){let d=u(i);d!==l[c]&&(l[c]=d,s=!0)}if(typeof u=="string"){if(!i||!Ja(i,u))continue;let d=i[u];d!==l[c]&&(l[c]=d,s=!0)}}return s&&(r.current={...l}),r.current};return(0,fj.useSyncExternalStore)(o,n,n)}function Ro(e,t,r,o){let n=Ja(t,r)?t[r]:void 0,i=Ene({value:n,setValue:o?t[o]:void 0});$r(()=>Vn(e,[r],(s,l)=>{let{value:c,setValue:u}=i.current;u&&s[r]!==l[r]&&s[r]!==c&&u(s[r])}),[e,r]),$r(()=>{if(n!==void 0)return e.setState(r,n),xv(e,[r],()=>{n!==void 0&&e.setState(r,n)})})}function G0(e,t){let[r,o]=zu.useState(()=>e(t));$r(()=>$1(r),[r]);let n=zu.useCallback(i=>Xt(r,i),[r]);return[zu.useMemo(()=>({...r,useState:n}),[r,n]),Ft(()=>{o(i=>e({...t,...i.getState()}))})]}var R4e="button";function A4e(e){return zA(e)?!0:e.tagName==="INPUT"&&!V0(e)}function I4e(e,t=!1){let r=e.clientHeight,{top:o}=e.getBoundingClientRect(),n=Math.max(r*.875,r-40)*1.5,i=t?r-n+o:n+o;return e.tagName==="HTML"?i+e.scrollTop:i}function O4e(e,t=!1){let{top:r}=e.getBoundingClientRect();return t?r+e.clientHeight:r}function Kne(e,t,r,o=!1){if(!t||!r)return;let{renderedItems:n}=t.getState(),i=Z1(e);if(!i)return;let s=I4e(i,o),l,c;for(let u=0;u<n.length;u+=1){let d=l;if(l=r(u),!l)break;if(l===d)continue;let f=ju(t,l)?.element;if(!f)continue;let m=O4e(f,o)-s,h=Math.abs(m);if(o&&m<=0||!o&&m>=0){c!==void 0&&c<h&&(l=d);break}c=h}return l}function N4e(e,t){return Fi(e)?!1:Sv(t,e.target)}var mj=Mr(function({store:t,rowId:r,preventScrollOnKeyDown:o=!1,moveOnKeyPress:n=!0,tabbable:i=!1,getItem:s,"aria-setsize":l,"aria-posinset":c,...u}){let d=QA();t=t||d;let f=Pl(u.id),m=(0,_f.useRef)(null),h=(0,_f.useContext)(jne),g=H0(u)&&!u.accessibleWhenDisabled,{rowId:v,baseElement:b,isActiveItem:S,ariaSetSize:y,ariaPosInSet:w,isTabbable:_}=eI(t,{rowId(D){if(r)return r;if(D&&h?.baseElement&&h.baseElement===D.baseElement)return h.id},baseElement(D){return D?.baseElement||void 0},isActiveItem(D){return!!D&&D.activeId===f},ariaSetSize(D){if(l!=null)return l;if(D&&h?.ariaSetSize&&h.baseElement===D.baseElement)return h.ariaSetSize},ariaPosInSet(D){if(c!=null)return c;if(!D||!h?.ariaPosInSet||h.baseElement!==D.baseElement)return;let B=D.renderedItems.filter(L=>L.rowId===v);return h.ariaPosInSet+B.findIndex(L=>L.id===f)},isTabbable(D){if(!D?.renderedItems.length)return!0;if(D.virtualFocus)return!1;if(i)return!0;if(D.activeId===null)return!1;let B=t?.item(D.activeId);return B?.disabled||!B?.element?!0:D.activeId===f}}),x=(0,_f.useCallback)(D=>{let B={...D,id:f||D.id,rowId:v,disabled:g,children:D.element?.textContent};return s?s(B):B},[f,v,g,s]),E=u.onFocus,O=(0,_f.useRef)(!1),A=Ft(D=>{if(E?.(D),D.defaultPrevented||une(D)||!f||!t||N4e(D,t))return;let{virtualFocus:B,baseElement:L}=t.getState();t.setActiveId(f),zA(D.currentTarget)&&Une(D.currentTarget),B&&Fi(D)&&(A4e(D.currentTarget)||L?.isConnected&&(j0()&&D.currentTarget.hasAttribute("data-autofocus")&&D.currentTarget.scrollIntoView({block:"nearest",inline:"nearest"}),O.current=!0,D.relatedTarget===L||Sv(t,D.relatedTarget)?Wne(L):L.focus()))}),C=u.onBlurCapture,I=Ft(D=>{C?.(D),!D.defaultPrevented&&t?.getState()?.virtualFocus&&O.current&&(O.current=!1,D.preventDefault(),D.stopPropagation())}),k=u.onKeyDown,P=Go(o),N=Go(n),U=Ft(D=>{if(k?.(D),D.defaultPrevented||!Fi(D)||!t)return;let{currentTarget:B}=D,L=t.getState(),M=!!t.item(f)?.rowId,z=L.orientation!=="horizontal",K=L.orientation!=="vertical",Z=()=>!!(M||K||!L.baseElement||!bs(L.baseElement)),q={ArrowUp:(M||z)&&t.up,ArrowRight:(M||K)&&t.next,ArrowDown:(M||z)&&t.down,ArrowLeft:(M||K)&&t.previous,Home:()=>{if(Z())return!M||D.ctrlKey?t?.first():t?.previous(-1)},End:()=>{if(Z())return!M||D.ctrlKey?t?.last():t?.next(-1)},PageUp:()=>Kne(B,t,t?.up,!0),PageDown:()=>Kne(B,t,t?.down)}[D.key];if(q){if(zA(B)){let ie=K1(B),$=K&&D.key==="ArrowLeft",le=K&&D.key==="ArrowRight",ae=z&&D.key==="ArrowUp",re=z&&D.key==="ArrowDown";if(le||re){let{length:ve}=nne(B);if(ie.end!==ve)return}else if(($||ae)&&ie.start!==0)return}let X=q();if(P(D)||X!==void 0){if(!N(D))return;D.preventDefault(),t.move(X)}}}),F=(0,_f.useMemo)(()=>({id:f,baseElement:b}),[f,b]);return u=Vu(u,D=>(0,Zne.jsx)(Vne.Provider,{value:F,children:D}),[F]),u={"data-active-item":S||void 0,...u,id:f,ref:Wo(m,u.ref),tabIndex:_?u.tabIndex:-1,onFocus:A,onBlurCapture:I,onKeyDown:U},u=lj(u),u=cj({store:t,...u,getItem:x,shouldRegisterItem:f?u.shouldRegisterItem:!1}),Li({...u,"aria-setsize":y,"aria-posinset":w})}),KEt=Vp(Tr(function(t){return Nr(R4e,mj(t))}));var Hu=a(xe(),1),Qne=a(T(),1);var M4e="div";function F4e(e){return e.some(t=>!!t.rowId)}function D4e(e){let t=e.target;return t&&!bs(t)?!1:e.key.length===1&&!e.ctrlKey&&!e.metaKey}function L4e(e){return e.key==="Shift"||e.key==="Control"||e.key==="Alt"||e.key==="Meta"}function Xne(e,t,r){return Ft(o=>{if(t?.(o),o.defaultPrevented||o.isPropagationStopped()||!Fi(o)||L4e(o)||D4e(o))return;let n=ju(e,e.getState().activeId)?.element;if(!n)return;let{view:i,...s}=o;n!==r?.current&&n.focus(),mne(n,o.type,s)||o.preventDefault(),o.currentTarget.contains(n)&&o.stopPropagation()})}function B4e(e){return zne(jA(G1(Hne(e))))}function Jne(e,t){let{virtualFocus:r,baseElement:o}=e.getState();if(!r||!o||!bs(o)){t();return}let n=o.scrollLeft,i=o.scrollTop;t(),o.scrollLeft=n,o.scrollTop=i}function V4e(e){let[t,r]=(0,Hu.useState)(!1),o=(0,Hu.useCallback)(()=>r(!0),[]),n=Xt(e,i=>ju(e,i.activeId));return(0,Hu.useEffect)(()=>{let i=n?.element;t&&i&&(r(!1),Jne(e,()=>{i.focus({preventScroll:!0})}))},[e,n,t]),o}var pj=Mr(function({store:t,composite:r=!0,focusOnMove:o=r,moveOnKeyPress:n=!0,...i}){let s=Bne();t=t||s,Di(t,!1);let l=(0,Hu.useRef)(null),c=(0,Hu.useRef)(null),u=V4e(t),d=Xt(t,"moves"),[,f]=Pne(r?t.setBaseElement:null);(0,Hu.useEffect)(()=>{if(!t||!d||!r||!o)return;let{activeId:C}=t.getState(),I=ju(t,C)?.element;I&&Jne(t,()=>hne(I))},[t,d,r,o]),$r(()=>{if(!t||!d||!r)return;let{baseElement:C,activeId:I}=t.getState();if(I!==null||!C)return;let k=c.current;c.current=null,k&&bv(k,{relatedTarget:C}),El(C)||C.focus()},[t,d,r]);let m=Xt(t,"activeId"),h=Xt(t,"virtualFocus");$r(()=>{if(!t||!r||!h)return;let C=c.current;if(c.current=null,!C)return;let I=ju(t,m)?.element||Y1(C);I!==C&&bv(C,{relatedTarget:I})},[t,m,h,r]);let g=Xne(t,i.onKeyDownCapture,c),v=Xne(t,i.onKeyUpCapture,c),b=i.onFocusCapture,S=Ft(C=>{if(b?.(C),C.defaultPrevented||!t)return;let{virtualFocus:I}=t.getState();if(!I)return;let k=C.relatedTarget,P=Gne(C.currentTarget);Fi(C)&&P&&(C.stopPropagation(),c.current=k)}),y=i.onFocus,w=Ft(C=>{if(y?.(C),C.defaultPrevented||!r||!t)return;let{relatedTarget:I}=C,{virtualFocus:k}=t.getState();k?Fi(C)&&!Sv(t,I)&&queueMicrotask(u):Fi(C)&&t.setActiveId(null)}),_=i.onBlurCapture,x=Ft(C=>{if(_?.(C),C.defaultPrevented||!t)return;let{virtualFocus:I,activeId:k}=t.getState();if(!I)return;let P=ju(t,k)?.element,N=C.relatedTarget,U=Sv(t,N),F=c.current;c.current=null,Fi(C)&&U?(N===P?F&&F!==N&&bv(F,C):P?bv(P,C):F&&bv(F,C),C.stopPropagation()):!Sv(t,C.target)&&P&&bv(P,C)}),E=i.onKeyDown,O=Go(n),A=Ft(C=>{if(E?.(C),C.nativeEvent.isComposing||C.defaultPrevented||!t||!Fi(C))return;let{orientation:I,renderedItems:k,activeId:P}=t.getState();if(ju(t,P)?.element?.isConnected)return;let N=I!=="horizontal",U=I!=="vertical",F=F4e(k);if((C.key==="ArrowLeft"||C.key==="ArrowRight"||C.key==="Home"||C.key==="End")&&bs(C.currentTarget))return;let B={ArrowUp:(F||N)&&(()=>F?B4e(k)?.id:t?.last()),ArrowRight:(F||U)&&t.first,ArrowDown:(F||N)&&t.first,ArrowLeft:(F||U)&&t.last,Home:t.first,End:t.last,PageUp:t.first,PageDown:t.last}[C.key];if(B){let L=B();if(L!==void 0){if(!O(C))return;C.preventDefault(),t.move(L)}}});return i=Vu(i,C=>(0,Qne.jsx)(U0,{value:t,children:C}),[t]),i={"aria-activedescendant":Xt(t,C=>{if(t&&r&&C.virtualFocus)return ju(t,C.activeId)?.id}),...i,ref:Wo(l,f,i.ref),onKeyDownCapture:g,onKeyUpCapture:v,onFocusCapture:S,onFocus:w,onBlurCapture:x,onKeyDown:A},i=X1({focusable:Xt(t,C=>r&&(C.virtualFocus||C.activeId===null)),...i}),i}),rPt=Tr(function(t){return Nr(M4e,pj(t))});var tC=ia(),iPt=tC.useContext,sPt=tC.useScopedContext,hj=tC.useProviderContext,$ne=tC.ContextProvider,eie=tC.ScopedContextProvider;var gj=a(xe(),1),rC=ia([$ne],[eie]),uPt=rC.useContext,dPt=rC.useScopedContext,fPt=rC.useProviderContext,tie=rC.ContextProvider,tI=rC.ScopedContextProvider,mPt=(0,gj.createContext)(void 0),pPt=(0,gj.createContext)(void 0);var Cv=a(xe(),1),vj=a(T(),1);var nie=a(_u(),1),j4e="div";function rie(e,t){let r=setTimeout(t,e);return()=>clearTimeout(r)}function z4e(e){let t=requestAnimationFrame(()=>{t=requestAnimationFrame(e)});return()=>cancelAnimationFrame(t)}function oie(...e){return e.join(", ").split(", ").reduce((t,r)=>{let o=r.endsWith("ms")?1:1e3,n=Number.parseFloat(r||"0s")*o;return n>t?n:t},0)}function bj(e,t,r){return!r&&t!==!1&&(!e||!!t)}var H4e=Mr(function({store:t,alwaysVisible:r,...o}){let n=hj();t=t||n,Di(t,!1);let i=(0,Cv.useRef)(null),s=Pl(o.id),[l,c]=(0,Cv.useState)(null),u=Xt(t,"open"),d=Xt(t,"mounted"),f=Xt(t,"animated"),m=Xt(t,"contentElement"),h=Xt(t.disclosure,"contentElement"),g=(0,Cv.useRef)(!1);$r(()=>{i.current&&t?.setContentElement(i.current)},[t]),$r(()=>{let y;return t?.setState("animated",w=>(y=w,!0)),()=>{y!==void 0&&t?.setState("animated",y)}},[t]),$r(()=>{if(!f){u?g.current&&(g.current=!1,c("enter")):(g.current=!0,c(null));return}if(!m?.isConnected){c(null);return}return z4e(()=>{c(u?"enter":d?"leave":null)})},[f,m,u,d]),$r(()=>{if(!t||!f||!l||!m)return;let y=()=>t?.setState("animating",!1),w=()=>(0,nie.flushSync)(y);if(l==="leave"&&u||l==="enter"&&!u)return;if(typeof f=="number")return rie(f,w);let{transitionDuration:_,animationDuration:x,transitionDelay:E,animationDelay:O}=getComputedStyle(m),{transitionDuration:A="0",animationDuration:C="0",transitionDelay:I="0",animationDelay:k="0"}=h?getComputedStyle(h):{},P=oie(E,O,I,k)+oie(_,x,A,C);if(!P){l==="enter"&&t.setState("animated",!1),y();return}return rie(Math.max(P-1e3/60,0),w)},[t,f,m,h,u,l]),o=Vu(o,y=>(0,vj.jsx)(tI,{value:t,children:y}),[t]);let v=bj(d,o.hidden,r),b=o.style,S=(0,Cv.useMemo)(()=>v?{...b,display:"none"}:b,[v,b]);return o={"data-open":u||void 0,"data-enter":l==="enter"||void 0,"data-leave":l==="leave"||void 0,hidden:v,...o,id:s,ref:Wo(s?t.setContentElement:null,i,o.ref),style:S},Li(o)}),U4e=Tr(function(t){return Nr(j4e,H4e(t))}),SPt=Tr(function({unmountOnHide:t,...r}){let o=hj();return Xt(r.store||o,n=>!t||n?.mounted)===!1?null:(0,vj.jsx)(U4e,{...r})});function iie(e={}){let t=W0(e.store,$A(e.disclosure,["contentElement","disclosureElement"]));let r=t?.getState(),o=Mt(e.open,r?.open,e.defaultOpen,!1),n=Mt(e.animated,r?.animated,!1),i=sa({open:o,animated:n,animating:!!n&&o,mounted:o,contentElement:Mt(r?.contentElement,null),disclosureElement:Mt(r?.disclosureElement,null)},t);return ui(i,()=>Vn(i,["animated","animating"],s=>{s.animated||i.setState("animating",!1)})),ui(i,()=>eC(i,["open"],()=>{i.getState().animated&&i.setState("animating",!0)})),ui(i,()=>Vn(i,["open","animating"],s=>{i.setState("mounted",s.open||s.animating)})),{...i,disclosure:e.disclosure,setOpen:s=>i.setState("open",s),show:()=>i.setState("open",!0),hide:()=>i.setState("open",!1),toggle:()=>i.setState("open",s=>!s),stopAnimation:()=>i.setState("animating",!1),setContentElement:s=>i.setState("contentElement",s),setDisclosureElement:s=>i.setState("disclosureElement",s)}}function sie(e,t,r){return Bu(t,[r.store,r.disclosure]),Ro(e,r,"open","setOpen"),Ro(e,r,"mounted","setMounted"),Ro(e,r,"animated"),Object.assign(e,{disclosure:r.disclosure})}var oC=ia([tie],[tI]),IPt=oC.useContext,OPt=oC.useScopedContext,aie=oC.useProviderContext,lie=oC.ContextProvider,cie=oC.ScopedContextProvider;var rI=a(xe(),1),oI=(0,rI.createContext)(void 0),nC=ia([lie,JA],[cie,U0]),wj=nC.useContext,Y0=nC.useScopedContext,nI=nC.useProviderContext,uie=nC.ContextProvider,die=nC.ScopedContextProvider,iI=(0,rI.createContext)(void 0),fie=(0,rI.createContext)(!1);function W4e(e){let t=e.find(n=>!!n.element),r=[...e].reverse().find(n=>!!n.element)?.element,o=t?.element?.parentElement;if(!r)return Sf(o).body;for(;o;){if(o.contains(r))return o;o=o.parentElement}return Sf(o).body}function G4e(e){return e?.__unstablePrivateStore}function mie(e={}){e.store;let t=e.store?.getState(),r=Mt(e.items,t?.items,e.defaultItems,[]),o=new Map(r.map(f=>[f.id,f])),n={items:r,renderedItems:Mt(t?.renderedItems,[])},i=G4e(e.store),s=sa({items:r,renderedItems:n.renderedItems},i),l=sa(n,e.store),c=f=>{let m=sne(f,h=>h.element);s.setState("renderedItems",m),l.setState("renderedItems",m)};ui(l,()=>$1(s)),ui(s,()=>xv(s,["items"],f=>{l.setState("items",f.items)})),ui(s,()=>xv(s,["renderedItems"],f=>{let m=!0,h=requestAnimationFrame(()=>{let{renderedItems:S}=l.getState();f.renderedItems!==S&&c(f.renderedItems)});if(typeof IntersectionObserver!="function")return()=>cancelAnimationFrame(h);let g=()=>{if(m){m=!1;return}cancelAnimationFrame(h),h=requestAnimationFrame(()=>c(f.renderedItems))},v=W4e(f.renderedItems),b=new IntersectionObserver(g,{root:v});for(let S of f.renderedItems)S.element&&b.observe(S.element);return()=>{cancelAnimationFrame(h),b.disconnect()}}));let u=(f,m,h=!1)=>{let g;return m(b=>{let S=b.findIndex(({id:w})=>w===f.id),y=b.slice();if(S!==-1){g=b[S];let w={...g,...f};y[S]=w,o.set(f.id,w)}else y.push(f),o.set(f.id,f);return y}),()=>{m(b=>{if(!g)return h&&o.delete(f.id),b.filter(({id:w})=>w!==f.id);let S=b.findIndex(({id:w})=>w===f.id);if(S===-1)return b;let y=b.slice();return y[S]=g,o.set(f.id,g),y})}},d=f=>u(f,m=>s.setState("items",m),!0);return{...l,registerItem:d,renderItem:f=>z0(d(f),u(f,m=>s.setState("renderedItems",m))),item:f=>{if(!f)return null;let m=o.get(f);if(!m){let{items:h}=s.getState();m=h.find(g=>g.id===f),m&&o.set(f,m)}return m||null},__unstablePrivateStore:s}}function pie(e,t,r){return Bu(t,[r.store]),Ro(e,r,"items","setItems"),e}var Y4e={id:null};function xf(e,t){return e.find(r=>t?!r.disabled&&r.id!==t:!r.disabled)}function q4e(e,t){return e.filter(r=>t?!r.disabled&&r.id!==t:!r.disabled)}function hie(e,t){return e.filter(r=>r.rowId===t)}function K4e(e,t,r=!1){let o=e.findIndex(n=>n.id===t);return[...e.slice(o+1),...r?[Y4e]:[],...e.slice(0,o)]}function gie(e){let t=[];for(let r of e){let o=t.find(n=>n[0]?.rowId===r.rowId);o?o.push(r):t.push([r])}return t}function vie(e){let t=0;for(let{length:r}of e)r>t&&(t=r);return t}function Z4e(e){return{id:"__EMPTY_ITEM__",disabled:!0,rowId:e}}function X4e(e,t,r){let o=vie(e);for(let n of e)for(let i=0;i<o;i+=1){let s=n[i];if(!s||r&&s.disabled){let l=i===0&&r?xf(n):n[i-1];n[i]=l&&t!==l.id&&r?l:Z4e(l?.rowId)}}return e}function Q4e(e){let t=gie(e),r=vie(t),o=[];for(let n=0;n<r;n+=1)for(let i of t){let s=i[n];s&&o.push({...s,rowId:s.rowId?`${n}`:void 0})}return o}function bie(e={}){let t=e.store?.getState(),r=mie(e),o=Mt(e.activeId,t?.activeId,e.defaultActiveId),n=sa({...r.getState(),id:Mt(e.id,t?.id)??`id-${Math.random().toString(36).slice(2,8)}`,activeId:o,baseElement:Mt(t?.baseElement,null),includesBaseElement:Mt(e.includesBaseElement,t?.includesBaseElement,o===null),moves:Mt(t?.moves,0),orientation:Mt(e.orientation,t?.orientation,"both"),rtl:Mt(e.rtl,t?.rtl,!1),virtualFocus:Mt(e.virtualFocus,t?.virtualFocus,!1),focusLoop:Mt(e.focusLoop,t?.focusLoop,!1),focusWrap:Mt(e.focusWrap,t?.focusWrap,!1),focusShift:Mt(e.focusShift,t?.focusShift,!1)},r,e.store);ui(n,()=>Vn(n,["renderedItems","activeId"],s=>{n.setState("activeId",l=>l!==void 0?l:xf(s.renderedItems)?.id)}));let i=(s="next",l={})=>{let c=n.getState(),{skip:u=0,activeId:d=c.activeId,focusShift:f=c.focusShift,focusLoop:m=c.focusLoop,focusWrap:h=c.focusWrap,includesBaseElement:g=c.includesBaseElement,renderedItems:v=c.renderedItems,rtl:b=c.rtl}=l,S=s==="up"||s==="down",y=s==="next"||s==="down",w=y?b&&!S:!b||S,_=f&&!u,x=S?jA(X4e(gie(v),d,_)):v;if(x=w?G1(x):x,x=S?Q4e(x):x,d==null)return xf(x)?.id;let E=x.find(F=>F.id===d);if(!E)return xf(x)?.id;let O=x.some(F=>F.rowId),A=x.indexOf(E),C=x.slice(A+1),I=hie(C,E.rowId);if(u){let F=q4e(I,d);return(F.slice(u)[0]||F[F.length-1])?.id}let k=m&&(S?m!=="horizontal":m!=="vertical"),P=O&&h&&(S?h!=="horizontal":h!=="vertical"),N=y?(!O||S)&&k&&g:S?g:!1;if(k)return xf(K4e(P&&!N?x:hie(x,E.rowId),d,N),d)?.id;if(P){let F=xf(N?I:C,d);return N?F?.id||null:F?.id}let U=xf(I,d);return!U&&N?null:U?.id};return{...r,...n,setBaseElement:s=>n.setState("baseElement",s),setActiveId:s=>n.setState("activeId",s),move:s=>{s!==void 0&&(n.setState("activeId",s),n.setState("moves",l=>l+1))},first:()=>xf(n.getState().renderedItems)?.id,last:()=>xf(G1(n.getState().renderedItems))?.id,next:s=>(s!==void 0&&typeof s=="number"&&(s={skip:s}),i("next",s)),previous:s=>(s!==void 0&&typeof s=="number"&&(s={skip:s}),i("previous",s)),down:s=>(s!==void 0&&typeof s=="number"&&(s={skip:s}),i("down",s)),up:s=>(s!==void 0&&typeof s=="number"&&(s={skip:s}),i("up",s))}}function yie(e){return{id:Pl(e.id),...e}}function wie(e,t,r){return e=pie(e,t,r),Ro(e,r,"activeId","setActiveId"),Ro(e,r,"includesBaseElement"),Ro(e,r,"virtualFocus"),Ro(e,r,"orientation"),Ro(e,r,"rtl"),Ro(e,r,"focusLoop"),Ro(e,r,"focusWrap"),Ro(e,r,"focusShift"),e}function Sie(e={}){return iie(e)}function _ie(e,t,r){return sie(e,t,r)}function xie({popover:e,...t}={}){let r=W0(t.store,$A(e,["arrowElement","anchorElement","contentElement","popoverElement","disclosureElement"]));let o=r?.getState(),n=Sie({...t,store:r}),i=Mt(t.placement,o?.placement,"bottom"),s=sa({...n.getState(),placement:i,currentPlacement:i,anchorElement:Mt(o?.anchorElement,null),popoverElement:Mt(o?.popoverElement,null),arrowElement:Mt(o?.arrowElement,null),rendered:Symbol("rendered")},n,r);return{...n,...s,setAnchorElement:l=>s.setState("anchorElement",l),setPopoverElement:l=>s.setState("popoverElement",l),setArrowElement:l=>s.setState("arrowElement",l),render:()=>s.setState("rendered",Symbol("rendered"))}}function Cie(e,t,r){return Bu(t,[r.popover]),Ro(e,r,"placement"),_ie(e,t,r)}var J4e="div",Sj=Mr(function({store:t,...r}){let o=aie();return t=t||o,r={...r,ref:Wo(t?.setAnchorElement,r.ref)},r}),fkt=Tr(function(t){return Nr(J4e,Sj(t))});var Tie=a(xe(),1),$4e="div";function eLe(e){let t=e.relatedTarget;return q1(t)?vv(e.currentTarget,t):!1}var _j=Symbol("composite-hover");function tLe(e){let{relatedTarget:t}=e;if(!q1(t))return!1;let r=t;do{if(Ja(r,_j)&&r[_j])return!0;r=r.parentElement}while(r);return!1}var xj=Mr(function({store:t,focusOnHover:r=!0,blurOnHoverEnd:o=!!r,...n}){let i=QA();t=t||i,Di(t,!1);let s=One(),l=n.onMouseMove,c=Go(r),u=Ft(g=>{if(l?.(g),!g.defaultPrevented&&s()&&c(g)){if(!pne(g.currentTarget)){let v=t?.getState().baseElement;v&&!El(v)&&v.focus()}t?.setActiveId(g.currentTarget.id)}}),d=n.onMouseLeave,f=Go(o),m=Ft(g=>{d?.(g),!g.defaultPrevented&&s()&&(eLe(g)||tLe(g)||c(g)&&f(g)&&(t?.setActiveId(null),t?.getState().baseElement?.focus()))}),h=(0,Tie.useCallback)(g=>{g&&(g[_j]=!0)},[]);return n={...n,ref:Wo(h,n.ref),onMouseMove:u,onMouseLeave:m},Li(n)}),vkt=Vp(Tr(function(t){return Nr($4e,xj(t))}));var nn=a(xe(),1);var rLe="input";function Eie(e,t,r){return r?e.find(o=>!o.disabled&&o.value)?.value===t:!1}function Pie(e,t){return!t||e==null?!1:(e=YA(e),t.length>e.length&&t.toLowerCase().indexOf(e.toLowerCase())===0)}function oLe(e){return e.type==="input"}function nLe(e){return e==="inline"||e==="list"||e==="both"||e==="none"}function iLe(e){return e.find(t=>t.disabled?!1:t.element?.getAttribute("role")!=="tab")?.id}var sLe=Mr(function({store:t,focusable:r=!0,autoSelect:o=!1,getAutoSelectId:n,setValueOnChange:i,showMinLength:s=0,showOnChange:l,showOnMouseDown:c,showOnClick:u=c,showOnKeyDown:d,showOnKeyPress:f=d,blurActiveItemOnClick:m,setValueOnClick:h=!0,moveOnKeyPress:g=!0,autoComplete:v="list",...b}){let S=nI();t=t||S,Di(t,!1);let y=(0,nn.useRef)(null),[w,_]=Ine(),x=(0,nn.useRef)(!1),E=(0,nn.useRef)(!1),O=Xt(t,J=>J.virtualFocus&&o),A=v==="inline"||v==="both",[C,I]=(0,nn.useState)(A);Ane(()=>{A&&I(!0)},[A]);let k=Xt(t,"value"),P=(0,nn.useRef)(void 0);(0,nn.useEffect)(()=>Vn(t,["selectedValue","activeId"],(J,he)=>{P.current=he.selectedValue}),[t]);let N=Xt(t,J=>{if(A&&C&&!(J.activeValue&&Array.isArray(J.selectedValue)&&(J.selectedValue.includes(J.activeValue)||P.current?.includes(J.activeValue))))return J.activeValue}),U=Xt(t,"renderedItems"),F=Xt(t,"open"),D=Xt(t,"contentElement"),B=(0,nn.useMemo)(()=>!A||!C?k:Eie(U,N,O)?Pie(k,N)?k+(N?.slice(k.length)||""):k:N||k,[A,C,U,N,O,k]);(0,nn.useEffect)(()=>{let J=y.current;if(!J)return;let he=()=>I(!0);return J.addEventListener("combobox-item-move",he),()=>{J.removeEventListener("combobox-item-move",he)}},[]),(0,nn.useEffect)(()=>{if(!A||!C||!N||!Eie(U,N,O)||!Pie(k,N))return;let J=GA;return queueMicrotask(()=>{let he=y.current;if(!he)return;let{start:ct,end:Ke}=K1(he),dt=k.length,yt=N.length;HA(he,dt,yt),J=()=>{if(!El(he))return;let{start:Pt,end:_t}=K1(he);Pt===dt&&_t===yt&&HA(he,ct,Ke)}}),()=>J()},[w,A,C,N,U,O,k]);let L=(0,nn.useRef)(null),M=Ft(n),z=(0,nn.useRef)(null),K=(0,nn.useRef)(void 0),Z=(0,nn.useRef)(!1),q=(0,nn.useRef)(!1);(0,nn.useEffect)(()=>{if(!F||!D)return;let J=Z1(D);if(!J)return;L.current=J;let he=()=>{x.current=!1,Z.current=!0},ct=()=>{if(q.current||(Z.current=!0),!t||!x.current)return;let{activeId:dt}=t.getState();dt!==null&&dt!==z.current&&(x.current=!1)},Ke={passive:!0,capture:!0};return J.addEventListener("wheel",he,Ke),J.addEventListener("touchmove",he,Ke),J.addEventListener("scroll",ct,Ke),()=>{J.removeEventListener("wheel",he,!0),J.removeEventListener("touchmove",he,!0),J.removeEventListener("scroll",ct,!0)}},[F,D,t]),$r(()=>{Z.current=!1,k&&(E.current||(x.current=!0))},[k]),$r(()=>{O!=="always"&&F||(x.current=F)},[O,F]),$r(()=>{F||(K.current=void 0)},[F]);let X=Xt(t,"resetValueOnSelect");Bu(()=>{let J=x.current;if(!t||!F||!J&&(!X||Z.current))return;let{baseElement:he,contentElement:ct,activeId:Ke}=t.getState();if(!(he&&!El(he))){if(ct?.hasAttribute("data-placing")){let dt=new MutationObserver(_);return dt.observe(ct,{attributeFilter:["data-placing"]}),()=>dt.disconnect()}if(O&&J){let dt=M(U),yt=dt!==void 0?dt:iLe(U)??t.first();z.current=yt;let Pt=yt??null,_t=t.item(Pt)?.value,Ye=K.current;Pt!==Ke||Ye?.id!==Pt||Ye?.value!==_t?(K.current={id:Pt,value:_t},t.move(Pt)):t.setState("activeValue",_t)}else{let dt=t.item(Ke||t.first())?.element;dt&&"scrollIntoView"in dt&&(q.current=!0,dt.scrollIntoView({block:"nearest",inline:"nearest"}),requestAnimationFrame(()=>{q.current=!1}))}}},[t,F,w,k,O,X,M,U]),(0,nn.useEffect)(()=>{if(!A)return;let J=y.current;if(!J)return;let he=[J,D].filter(Ke=>!!Ke),ct=Ke=>{he.every(dt=>UA(Ke,dt))&&t?.setValue(B)};for(let Ke of he)Ke.addEventListener("focusout",ct);return()=>{for(let Ke of he)Ke.removeEventListener("focusout",ct)}},[A,D,t,B]);let ie=J=>J.currentTarget.value.length>=s,$=b.onChange,le=Go(l??ie),ae=Go(i??!t.tag),re=Ft(J=>{if($?.(J),J.defaultPrevented||!t)return;let he=J.currentTarget,{value:ct,selectionStart:Ke,selectionEnd:dt}=he,yt=J.nativeEvent;if(x.current=!0,oLe(yt)&&(yt.isComposing&&(x.current=!1,E.current=!0),A)){let Pt=yt.inputType==="insertText"||yt.inputType==="insertCompositionText",_t=Ke===ct.length;I(Pt&&_t)}if(ae(J)){let Pt=ct===t.getState().value;t.setValue(ct),queueMicrotask(()=>{HA(he,Ke,dt)}),A&&O&&Pt&&_()}le(J)&&t.show(),(!O||!x.current)&&t.setActiveId(null)}),ve=b.onCompositionEnd,Ce=Ft(J=>{x.current=!0,E.current=!1,ve?.(J),!J.defaultPrevented&&O&&_()}),_e=b.onMouseDown,Me=Go(m??(()=>t.getState().includesBaseElement)),ue=Go(h),te=Go(u??ie),de=Ft(J=>{_e?.(J),!J.defaultPrevented&&(J.button||J.ctrlKey||t&&(Me(J)&&t.setActiveId(null),ue(J)&&t.setValue(B),te(J)&&yv(J.currentTarget,"mouseup",t.show)))}),se=b.onKeyDown,fe=Go(f??ie),Ne=Ft(J=>{if(se?.(J),J.repeat||(x.current=!1),J.defaultPrevented||!t)return;let{open:he}=t.getState();if(he&&J.key==="Enter"){J.preventDefault();return}J.ctrlKey||J.altKey||J.shiftKey||J.metaKey||he||(J.key==="ArrowUp"||J.key==="ArrowDown")&&fe(J)&&(J.preventDefault(),t.show())}),Ie=b.onBlur,je=Ft(J=>{x.current=!1,Ie?.(J),J.defaultPrevented}),Ge=Pl(b.id),Se=nLe(v)?v:void 0,Te=Xt(t,J=>J.activeId===null);return b={role:"combobox","aria-autocomplete":Se,"aria-haspopup":ine(D,"listbox"),"aria-expanded":F,"aria-controls":D?.id,"data-active-item":Te||void 0,value:B,...b,id:Ge,ref:Wo(y,b.ref),onChange:re,onCompositionEnd:Ce,onMouseDown:de,onKeyDown:Ne,onBlur:je},b=pj({store:t,focusable:r,...b,moveOnKeyPress:J=>yne(g,J)?!1:(A&&I(!0),!0)}),b=Sj({store:t,...b}),{autoComplete:"off",...b}}),sI=Tr(function(t){return Nr(rLe,sLe(t))});var aI=a(xe(),1),Cj=a(T(),1);var aLe="div";function lLe(e,t){if(t!=null)return e==null?!1:Array.isArray(e)?e.includes(t):e===t}function cLe(e){return{menu:"menuitem",listbox:"option",tree:"treeitem"}[e]??"option"}var uLe=Mr(function({store:t,value:r,hideOnClick:o,setValueOnClick:n,selectValueOnClick:i=!0,resetValueOnSelect:s,focusOnHover:l=!1,moveOnKeyPress:c=!0,getItem:u,...d}){let f=Y0();t=t||f,Di(t,!1);let{resetValueOnSelectState:m,multiSelectable:h,selected:g}=eI(t,{resetValueOnSelectState:"resetValueOnSelect",multiSelectable(C){return Array.isArray(C.selectedValue)},selected(C){return lLe(C.selectedValue,r)}}),v=(0,aI.useCallback)(C=>{let I={...C,value:r};return u?u(I):I},[r,u]);n=n??!h,o=o??(r!=null&&!h);let b=d.onClick,S=Go(n),y=Go(i),w=Go(s??m??h),_=Go(o),x=Ft(C=>{b?.(C),!C.defaultPrevented&&(fne(C)||dne(C)||(r!=null&&(y(C)&&(w(C)&&t?.resetValue(),t?.setSelectedValue(I=>Array.isArray(I)?I.includes(r)?I.filter(k=>k!==r):[...I,r]:r)),S(C)&&t?.setValue(r)),_(C)&&t?.hide()))}),E=d.onKeyDown,O=Ft(C=>{if(E?.(C),C.defaultPrevented)return;let I=t?.getState().baseElement;I&&(El(I)||(C.key.length===1||C.key==="Backspace"||C.key==="Delete")&&(queueMicrotask(()=>I.focus()),bs(I)&&t?.setValue(I.value)))});h&&g!=null&&(d={"aria-selected":g,...d}),d=Vu(d,C=>(0,Cj.jsx)(iI.Provider,{value:r,children:(0,Cj.jsx)(fie.Provider,{value:g??!1,children:C})}),[r,g]),d={role:cLe((0,aI.useContext)(oI)),children:r,...d,onClick:x,onKeyDown:O};let A=Go(c);return d=mj({store:t,...d,getItem:v,moveOnKeyPress:C=>{if(!A(C))return!1;let I=new Event("combobox-item-move");return t?.getState().baseElement?.dispatchEvent(I),!0}}),d=xj({store:t,focusOnHover:l,...d}),d}),lI=Vp(Tr(function(t){return Nr(aLe,uLe(t))}));var cI=a(xe(),1),Rie=a(T(),1);var dLe="span";function kie(e){return YA(e).toLowerCase()}function fLe(e,t){let r=[];for(let o of t){let n=0,i=o.length;for(;e.indexOf(o,n)!==-1;){let s=e.indexOf(o,n);s!==-1&&r.push([s,i]),n=s+1}}return r}function mLe(e){return e.filter(([t,r],o,n)=>!n.some(([i,s],l)=>l!==o&&i<=t&&i+s>=t+r))}function pLe(e){return e.sort(([t],[r])=>t-r)}function hLe(e,t){if(!e||!t)return e;let r=rne(t).filter(Boolean).map(kie),o=[],n=(c,u=!1)=>(0,Rie.jsx)("span",{"data-autocomplete-value":u?"":void 0,"data-user-value":u?void 0:"",children:c},o.length),i=pLe(mLe(fLe(kie(e),new Set(r)))),s=i[0];if(!s)return o.push(n(e,!0)),o;let[l]=s;return[e.slice(0,l),...i.flatMap(([c,u],d)=>{let f=e.slice(c,c+u),m=i[d+1]?.[0];return[f,e.slice(c+u,m)]})].forEach((c,u)=>{c&&o.push(n(c,u%2===0))}),o}var gLe=Mr(function({store:t,value:r,userValue:o,...n}){let i=Y0();t=t||i;let s=(0,cI.useContext)(iI),l=r??s,c=Xt(t,u=>o??u?.value);return n={children:(0,cI.useMemo)(()=>{if(l)return c?hLe(l,c):l},[l,c]),...n},Li(n)}),uI=Tr(function(t){return Nr(dLe,gLe(t))});var vLe="label",bLe=Mr(function({store:t,...r}){let o=nI();return t=t||o,Di(t,!1),r={htmlFor:Xt(t,n=>n.baseElement?.id),...r},Li(r)}),dI=Vp(Tr(function(t){return Nr(vLe,bLe(t))}));var fI=a(xe(),1),Tj=a(T(),1);var yLe="div",wLe=Mr(function({store:t,alwaysVisible:r,...o}){let n=Y0(!0),i=wj();t=t||i;let s=!!t&&t===n;Di(t,!1);let l=(0,fI.useRef)(null),c=Pl(o.id),u=Xt(t,"mounted"),d=bj(u,o.hidden,r),f=d?{...o.style,display:"none"}:o.style,m=Xt(t,w=>Array.isArray(w.selectedValue)),h=Rne(l,"role",o.role),g=(h==="listbox"||h==="tree"||h==="grid")&&m||void 0,[v,b]=(0,fI.useState)(!1),S=Xt(t,"contentElement");$r(()=>{if(!u)return;let w=l.current;if(!w||S!==w)return;let _=()=>{b(!!w.querySelector("[role='listbox']"))},x=new MutationObserver(_);return x.observe(w,{subtree:!0,childList:!0,attributeFilter:["role"]}),_(),()=>x.disconnect()},[u,S]),v||(o={role:"listbox","aria-multiselectable":g,...o}),o=Vu(o,w=>(0,Tj.jsx)(die,{value:t,children:(0,Tj.jsx)(oI.Provider,{value:h,children:w})}),[t,h]);let y=c&&(!n||!s)?t.setContentElement:null;return o={hidden:d,...o,id:c,ref:Wo(y,l,o.ref),style:f},Li(o)}),mI=Tr(function(t){return Nr(yLe,wLe(t))});var Ej=a(xe(),1),Jkt=(0,Ej.createContext)(null),$kt=(0,Ej.createContext)(null),iC=ia([JA],[U0]),Aie=iC.useContext,e2t=iC.useScopedContext,t2t=iC.useProviderContext,r2t=iC.ContextProvider,o2t=iC.ScopedContextProvider;var SLe=j0()&&ane();function Iie({tag:e,...t}={}){let r=W0(t.store,Yne(e,["value","rtl"]));let o=e?.getState(),n=r?.getState(),i=Mt(t.activeId,n?.activeId,t.defaultActiveId,null),s=bie({...t,activeId:i,includesBaseElement:Mt(t.includesBaseElement,n?.includesBaseElement,!0),orientation:Mt(t.orientation,n?.orientation,"vertical"),focusLoop:Mt(t.focusLoop,n?.focusLoop,!0),focusWrap:Mt(t.focusWrap,n?.focusWrap,!0),virtualFocus:Mt(t.virtualFocus,n?.virtualFocus,!0)}),l=xie({...t,placement:Mt(t.placement,n?.placement,"bottom-start")}),c=Mt(t.value,n?.value,t.defaultValue,""),u=Mt(t.selectedValue,n?.selectedValue,o?.values,t.defaultSelectedValue,""),d=Array.isArray(u),f={...s.getState(),...l.getState(),value:c,selectedValue:u,resetValueOnSelect:Mt(t.resetValueOnSelect,n?.resetValueOnSelect,d),resetValueOnHide:Mt(t.resetValueOnHide,n?.resetValueOnHide,d&&!e),activeValue:n?.activeValue},m=sa(f,s,l,r);return SLe&&ui(m,()=>Vn(m,["virtualFocus"],()=>{m.setState("virtualFocus",!1)})),ui(m,()=>{if(e)return z0(Vn(m,["selectedValue"],h=>{Array.isArray(h.selectedValue)&&e.setValues(h.selectedValue)}),Vn(e,["values"],h=>{m.setState("selectedValue",h.values)}))}),ui(m,()=>Vn(m,["resetValueOnHide","mounted"],h=>{h.resetValueOnHide&&(h.mounted||m.setState("value",c))})),ui(m,()=>Vn(m,["open"],h=>{h.open||(m.setState("activeId",i),m.setState("moves",0))})),ui(m,()=>Vn(m,["moves","activeId"],(h,g)=>{h.moves===g.moves&&m.setState("activeValue",void 0)})),ui(m,()=>xv(m,["moves","renderedItems"],(h,g)=>{if(h.moves===g.moves)return;let{activeId:v}=m.getState(),b=s.item(v);m.setState("activeValue",b?.value)})),{...l,...s,...m,tag:e,setValue:h=>m.setState("value",h),resetValue:()=>m.setState("value",f.value),setSelectedValue:h=>m.setState("selectedValue",h)}}function xLe(e){let t=Aie();return e={...e,tag:e.tag!==void 0?e.tag:t},yie(e)}function CLe(e,t,r){return Bu(t,[r.tag]),Ro(e,r,"value","setValue"),Ro(e,r,"selectedValue","setSelectedValue"),Ro(e,r,"resetValueOnHide"),Ro(e,r,"resetValueOnSelect"),Object.assign(wie(Cie(e,t,r),t,r),{tag:r.tag})}function Pj(e={}){e=xLe(e);let[t,r]=G0(Iie,e);return CLe(t,r,e)}var Oie=a(T(),1);function pI(e={}){return(0,Oie.jsx)(uie,{value:Pj(e),children:e.children})}var Die=a(l0(),1);var Lie=a(ke(),1),zp=a(V(),1),Tv=a(H(),1),Uu=a(W(),1);var ELe=[],sC=(e,t)=>e.singleSelection?t?.value:Array.isArray(t?.value)?t.value:!Array.isArray(t?.value)&&t?.value?[t.value]:ELe;var aC=a(H(),1),PLe=[];function jn({elements:e,getElements:t}){let r=Array.isArray(e)&&e.length>0?e:PLe,[o,n]=(0,aC.useState)(r),[i,s]=(0,aC.useState)(!1);return(0,aC.useEffect)(()=>{if(!t){n(r);return}let l=!1;return s(!0),t().then(c=>{if(!l){let u=Array.isArray(c)&&c.length>0?c:r;n(u)}}).catch(()=>{l||n(r)}).finally(()=>{l||s(!1)}),()=>{l=!0}},[t,r]),{elements:o,isLoading:i}}var Qt=a(T(),1);function Nie(e=""){return(0,Die.default)(e.trim().toLowerCase())}var Mie=(e,t,r)=>e.singleSelection?r:Array.isArray(t?.value)?t.value.includes(r)?t.value.filter(o=>o!==r):[...t.value,r]:[r];function Fie(e,t){return`${e}-${t}`}var Bie=({selected:e})=>(0,Qt.jsx)("span",{className:Q("dataviews-filters__search-widget-listitem-multi-selection",{"is-selected":e}),children:e&&(0,Qt.jsx)(Uu.Icon,{icon:To})}),Vie=({selected:e})=>(0,Qt.jsx)("span",{className:Q("dataviews-filters__search-widget-listitem-single-selection",{"is-selected":e})});function jie({view:e,filter:t,onChangeView:r}){let o=(0,Lie.useInstanceId)(jie,"dataviews-filter-list-box"),[n,i]=(0,Tv.useState)(t.operators?.length===1?void 0:null),s=e.filters?.find(c=>c.field===t.field),l=sC(t,s);return(0,Qt.jsx)(Uu.Composite,{virtualFocus:!0,focusLoop:!0,activeId:n,setActiveId:i,role:"listbox",className:"dataviews-filters__search-widget-listbox","aria-label":(0,zp.sprintf)((0,zp.__)("List of: %1$s"),t.name),onFocusVisible:()=>{!n&&t.elements.length&&i(Fie(o,t.elements[0].value))},render:(0,Qt.jsx)(Uu.Composite.Typeahead,{}),children:t.elements.map(c=>(0,Qt.jsxs)(Uu.Composite.Hover,{render:(0,Qt.jsx)(Uu.Composite.Item,{id:Fie(o,c.value),render:(0,Qt.jsx)("div",{"aria-label":c.label,role:"option",className:"dataviews-filters__search-widget-listitem"}),onClick:()=>{let u=s?[...(e.filters??[]).map(d=>d.field===t.field?{...d,operator:s.operator||t.operators[0],value:Mie(t,s,c.value)}:d)]:[...e.filters??[],{field:t.field,operator:t.operators[0],value:Mie(t,s,c.value)}];r({...e,page:1,filters:u})}}),children:[t.singleSelection&&(0,Qt.jsx)(Vie,{selected:l===c.value}),!t.singleSelection&&(0,Qt.jsx)(Bie,{selected:l.includes(c.value)}),(0,Qt.jsx)("span",{className:"dataviews-filters__search-widget-listitem-value",title:c.label,children:c.label})]},c.value))})}function kLe({view:e,filter:t,onChangeView:r}){let[o,n]=(0,Tv.useState)(""),i=(0,Tv.useDeferredValue)(o),s=e.filters?.find(u=>u.field===t.field),l=sC(t,s),c=(0,Tv.useMemo)(()=>{let u=Nie(i);return t.elements.filter(d=>Nie(d.label).includes(u))},[t.elements,i]);return(0,Qt.jsxs)(pI,{selectedValue:l,setSelectedValue:u=>{let d=s?[...(e.filters??[]).map(f=>f.field===t.field?{...f,operator:s.operator||t.operators[0],value:u}:f)]:[...e.filters??[],{field:t.field,operator:t.operators[0],value:u}];r({...e,page:1,filters:d})},setValue:n,children:[(0,Qt.jsxs)("div",{className:"dataviews-filters__search-widget-filter-combobox__wrapper",children:[(0,Qt.jsx)(Ut,{render:(0,Qt.jsx)(dI,{}),children:(0,zp.__)("Search items")}),(0,Qt.jsx)(sI,{autoSelect:"always",placeholder:(0,zp.__)("Search"),className:"dataviews-filters__search-widget-filter-combobox__input"}),(0,Qt.jsx)("div",{className:"dataviews-filters__search-widget-filter-combobox__icon",children:(0,Qt.jsx)(Uu.Icon,{icon:zL})})]}),(0,Qt.jsxs)(mI,{className:"dataviews-filters__search-widget-filter-combobox-list",alwaysVisible:!0,children:[c.map(u=>(0,Qt.jsxs)(lI,{resetValueOnSelect:!1,value:u.value,className:"dataviews-filters__search-widget-listitem",hideOnClick:!1,setValueOnClick:!1,focusOnHover:!0,children:[t.singleSelection&&(0,Qt.jsx)(Vie,{selected:l===u.value}),!t.singleSelection&&(0,Qt.jsx)(Bie,{selected:l.includes(u.value)}),(0,Qt.jsxs)("span",{className:"dataviews-filters__search-widget-listitem-value",title:u.label,children:[(0,Qt.jsx)(uI,{className:"dataviews-filters__search-widget-filter-combobox-item-value",value:u.label}),!!u.description&&(0,Qt.jsx)("span",{className:"dataviews-filters__search-widget-listitem-description",children:u.description})]})]},u.value)),!c.length&&(0,Qt.jsx)("p",{children:(0,zp.__)("No results found")})]})]})}function zie(e){let{elements:t,isLoading:r}=jn({elements:e.filter.elements,getElements:e.filter.getElements});if(r)return(0,Qt.jsx)("div",{className:"dataviews-filters__search-widget-no-elements",children:(0,Qt.jsx)(Uu.Spinner,{})});if(t.length===0)return(0,Qt.jsx)("div",{className:"dataviews-filters__search-widget-no-elements",children:(0,zp.__)("No elements found")});let o=t.length>10?kLe:jie;return(0,Qt.jsx)(o,{...e,filter:{...e.filter,elements:t}})}var Uie=a(hI(),1),Wie=a(ke(),1),kj=a(H(),1),Gie=a(W(),1);var Rj=a(T(),1);function Yie({filter:e,view:t,onChangeView:r,fields:o}){let n=t.filters?.find(u=>u.field===e.field),i=sC(e,n),s=(0,kj.useMemo)(()=>{let u=o.find(d=>d.id===e.field);return u&&{...u,isValid:{},isDisabled:()=>!1,isVisible:()=>!0,getValue:({item:d})=>d[u.id],setValue:({value:d})=>({[u.id]:d})}},[o,e.field]),l=(0,kj.useMemo)(()=>(t.filters??[]).reduce((u,d)=>(u[d.field]=d.value,u),{}),[t.filters]),c=(0,Wie.useEvent)(u=>{if(!s||!n)return;let d=s.getValue({item:u});(0,Uie.default)(d,i)||r({...t,filters:(t.filters??[]).map(f=>f.field===e.field?{...f,operator:n.operator||e.operators[0],value:d===""?void 0:d}:f)})});return!s||!s.Edit||!n?null:(0,Rj.jsx)(Gie.Flex,{className:"dataviews-filters__user-input-widget",gap:2.5,direction:"column",children:(0,Rj.jsx)(s.Edit,{hideLabelFromVision:!0,data:l,field:s,operator:n.operator,onChange:c})})}var RLe=Math.pow(10,8)*24*60*60*1e3,Y2t=-RLe,gI=6048e5,qie=864e5,Aj=6e4,Ij=36e5;var ALe=3600;var Kie=ALe*24,q2t=Kie*7,ILe=Kie*365.2425,OLe=ILe/12,K2t=OLe*3,Oj=Symbol.for("constructDateFrom");function Yo(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&Oj in e?e[Oj](t):e instanceof Date?new e.constructor(t):new Date(t)}function qt(e,t){return Yo(t||e,e)}function vI(e,t,r){let o=qt(e,r?.in);return isNaN(t)?Yo(r?.in||e,NaN):(t&&o.setDate(o.getDate()+t),o)}function bI(e,t,r){let o=qt(e,r?.in);if(isNaN(t))return Yo(r?.in||e,NaN);if(!t)return o;let n=o.getDate(),i=Yo(r?.in||e,o.getTime());i.setMonth(o.getMonth()+t+1,0);let s=i.getDate();return n>=s?i:(o.setFullYear(i.getFullYear(),i.getMonth(),n),o)}var NLe={};function Hp(){return NLe}function Cf(e,t){let r=Hp(),o=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,n=qt(e,t?.in),i=n.getDay(),s=(i<o?7:0)+i-o;return n.setDate(n.getDate()-s),n.setHours(0,0,0,0),n}function Ev(e,t){return Cf(e,{...t,weekStartsOn:1})}function yI(e,t){let r=qt(e,t?.in),o=r.getFullYear(),n=Yo(r,0);n.setFullYear(o+1,0,4),n.setHours(0,0,0,0);let i=Ev(n),s=Yo(r,0);s.setFullYear(o,0,4),s.setHours(0,0,0,0);let l=Ev(s);return r.getTime()>=i.getTime()?o+1:r.getTime()>=l.getTime()?o:o-1}function Nj(e){let t=qt(e),r=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return r.setUTCFullYear(t.getFullYear()),+e-+r}function Zie(e,...t){let r=Yo.bind(null,e||t.find(o=>typeof o=="object"));return t.map(r)}function Mj(e,t){let r=qt(e,t?.in);return r.setHours(0,0,0,0),r}function Xie(e,t,r){let[o,n]=Zie(r?.in,e,t),i=Mj(o),s=Mj(n),l=+i-Nj(i),c=+s-Nj(s);return Math.round((l-c)/qie)}function Qie(e,t){let r=yI(e,t),o=Yo(t?.in||e,0);return o.setFullYear(r,0,4),o.setHours(0,0,0,0),Ev(o)}function Jie(e,t,r){return vI(e,t*7,r)}function $ie(e,t,r){return bI(e,t*12,r)}function ese(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function Tf(e){return!(!ese(e)&&typeof e!="number"||isNaN(+qt(e)))}function tse(e,t){let r=qt(e,t?.in),o=r.getMonth();return r.setFullYear(r.getFullYear(),o+1,0),r.setHours(23,59,59,999),r}function lC(e,t){let r=qt(e,t?.in);return r.setDate(1),r.setHours(0,0,0,0),r}function wI(e,t){let r=qt(e,t?.in);return r.setFullYear(r.getFullYear(),0,1),r.setHours(0,0,0,0),r}var MLe={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},rse=(e,t,r)=>{let o,n=MLe[e];return typeof n=="string"?o=n:t===1?o=n.one:o=n.other.replace("{{count}}",t.toString()),r?.addSuffix?r.comparison&&r.comparison>0?"in "+o:o+" ago":o};function SI(e){return(t={})=>{let r=t.width?String(t.width):e.defaultWidth;return e.formats[r]||e.formats[e.defaultWidth]}}var FLe={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},DLe={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},LLe={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},ose={date:SI({formats:FLe,defaultWidth:"full"}),time:SI({formats:DLe,defaultWidth:"full"}),dateTime:SI({formats:LLe,defaultWidth:"full"})};var BLe={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},nse=(e,t,r,o)=>BLe[e];function q0(e){return(t,r)=>{let o=r?.context?String(r.context):"standalone",n;if(o==="formatting"&&e.formattingValues){let s=e.defaultFormattingWidth||e.defaultWidth,l=r?.width?String(r.width):s;n=e.formattingValues[l]||e.formattingValues[s]}else{let s=e.defaultWidth,l=r?.width?String(r.width):e.defaultWidth;n=e.values[l]||e.values[s]}let i=e.argumentCallback?e.argumentCallback(t):t;return n[i]}}var VLe={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},jLe={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},zLe={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},HLe={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},ULe={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},WLe={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},GLe=(e,t)=>{let r=Number(e),o=r%100;if(o>20||o<10)switch(o%10){case 1:return r+"st";case 2:return r+"nd";case 3:return r+"rd"}return r+"th"},ise={ordinalNumber:GLe,era:q0({values:VLe,defaultWidth:"wide"}),quarter:q0({values:jLe,defaultWidth:"wide",argumentCallback:e=>e-1}),month:q0({values:zLe,defaultWidth:"wide"}),day:q0({values:HLe,defaultWidth:"wide"}),dayPeriod:q0({values:ULe,defaultWidth:"wide",formattingValues:WLe,defaultFormattingWidth:"wide"})};function K0(e){return(t,r={})=>{let o=r.width,n=o&&e.matchPatterns[o]||e.matchPatterns[e.defaultMatchWidth],i=t.match(n);if(!i)return null;let s=i[0],l=o&&e.parsePatterns[o]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(l)?qLe(l,f=>f.test(s)):YLe(l,f=>f.test(s)),u;u=e.valueCallback?e.valueCallback(c):c,u=r.valueCallback?r.valueCallback(u):u;let d=t.slice(s.length);return{value:u,rest:d}}}function YLe(e,t){for(let r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&t(e[r]))return r}function qLe(e,t){for(let r=0;r<e.length;r++)if(t(e[r]))return r}function sse(e){return(t,r={})=>{let o=t.match(e.matchPattern);if(!o)return null;let n=o[0],i=t.match(e.parsePattern);if(!i)return null;let s=e.valueCallback?e.valueCallback(i[0]):i[0];s=r.valueCallback?r.valueCallback(s):s;let l=t.slice(n.length);return{value:s,rest:l}}}var KLe=/^(\d+)(th|st|nd|rd)?/i,ZLe=/\d+/i,XLe={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},QLe={any:[/^b/i,/^(a|c)/i]},JLe={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},$Le={any:[/1/i,/2/i,/3/i,/4/i]},eBe={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},tBe={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},rBe={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},oBe={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},nBe={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},iBe={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},ase={ordinalNumber:sse({matchPattern:KLe,parsePattern:ZLe,valueCallback:e=>parseInt(e,10)}),era:K0({matchPatterns:XLe,defaultMatchWidth:"wide",parsePatterns:QLe,defaultParseWidth:"any"}),quarter:K0({matchPatterns:JLe,defaultMatchWidth:"wide",parsePatterns:$Le,defaultParseWidth:"any",valueCallback:e=>e+1}),month:K0({matchPatterns:eBe,defaultMatchWidth:"wide",parsePatterns:tBe,defaultParseWidth:"any"}),day:K0({matchPatterns:rBe,defaultMatchWidth:"wide",parsePatterns:oBe,defaultParseWidth:"any"}),dayPeriod:K0({matchPatterns:nBe,defaultMatchWidth:"any",parsePatterns:iBe,defaultParseWidth:"any"})};var Fj={code:"en-US",formatDistance:rse,formatLong:ose,formatRelative:nse,localize:ise,match:ase,options:{weekStartsOn:0,firstWeekContainsDate:1}};function lse(e,t){let r=qt(e,t?.in);return Xie(r,wI(r))+1}function cse(e,t){let r=qt(e,t?.in),o=+Ev(r)-+Qie(r);return Math.round(o/gI)+1}function _I(e,t){let r=qt(e,t?.in),o=r.getFullYear(),n=Hp(),i=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,s=Yo(t?.in||e,0);s.setFullYear(o+1,0,i),s.setHours(0,0,0,0);let l=Cf(s,t),c=Yo(t?.in||e,0);c.setFullYear(o,0,i),c.setHours(0,0,0,0);let u=Cf(c,t);return+r>=+l?o+1:+r>=+u?o:o-1}function use(e,t){let r=Hp(),o=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,n=_I(e,t),i=Yo(t?.in||e,0);return i.setFullYear(n,0,o),i.setHours(0,0,0,0),Cf(i,t)}function dse(e,t){let r=qt(e,t?.in),o=+Cf(r,t)-+use(r,t);return Math.round(o/gI)+1}function or(e,t){let r=e<0?"-":"",o=Math.abs(e).toString().padStart(t,"0");return r+o}var Ef={y(e,t){let r=e.getFullYear(),o=r>0?r:1-r;return or(t==="yy"?o%100:o,t.length)},M(e,t){let r=e.getMonth();return t==="M"?String(r+1):or(r+1,2)},d(e,t){return or(e.getDate(),t.length)},a(e,t){let r=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.toUpperCase();case"aaa":return r;case"aaaaa":return r[0];default:return r==="am"?"a.m.":"p.m."}},h(e,t){return or(e.getHours()%12||12,t.length)},H(e,t){return or(e.getHours(),t.length)},m(e,t){return or(e.getMinutes(),t.length)},s(e,t){return or(e.getSeconds(),t.length)},S(e,t){let r=t.length,o=e.getMilliseconds(),n=Math.trunc(o*Math.pow(10,r-3));return or(n,t.length)}};var Z0={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Dj={G:function(e,t,r){let o=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return r.era(o,{width:"abbreviated"});case"GGGGG":return r.era(o,{width:"narrow"});default:return r.era(o,{width:"wide"})}},y:function(e,t,r){if(t==="yo"){let o=e.getFullYear(),n=o>0?o:1-o;return r.ordinalNumber(n,{unit:"year"})}return Ef.y(e,t)},Y:function(e,t,r,o){let n=_I(e,o),i=n>0?n:1-n;if(t==="YY"){let s=i%100;return or(s,2)}return t==="Yo"?r.ordinalNumber(i,{unit:"year"}):or(i,t.length)},R:function(e,t){let r=yI(e);return or(r,t.length)},u:function(e,t){let r=e.getFullYear();return or(r,t.length)},Q:function(e,t,r){let o=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(o);case"QQ":return or(o,2);case"Qo":return r.ordinalNumber(o,{unit:"quarter"});case"QQQ":return r.quarter(o,{width:"abbreviated",context:"formatting"});case"QQQQQ":return r.quarter(o,{width:"narrow",context:"formatting"});default:return r.quarter(o,{width:"wide",context:"formatting"})}},q:function(e,t,r){let o=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(o);case"qq":return or(o,2);case"qo":return r.ordinalNumber(o,{unit:"quarter"});case"qqq":return r.quarter(o,{width:"abbreviated",context:"standalone"});case"qqqqq":return r.quarter(o,{width:"narrow",context:"standalone"});default:return r.quarter(o,{width:"wide",context:"standalone"})}},M:function(e,t,r){let o=e.getMonth();switch(t){case"M":case"MM":return Ef.M(e,t);case"Mo":return r.ordinalNumber(o+1,{unit:"month"});case"MMM":return r.month(o,{width:"abbreviated",context:"formatting"});case"MMMMM":return r.month(o,{width:"narrow",context:"formatting"});default:return r.month(o,{width:"wide",context:"formatting"})}},L:function(e,t,r){let o=e.getMonth();switch(t){case"L":return String(o+1);case"LL":return or(o+1,2);case"Lo":return r.ordinalNumber(o+1,{unit:"month"});case"LLL":return r.month(o,{width:"abbreviated",context:"standalone"});case"LLLLL":return r.month(o,{width:"narrow",context:"standalone"});default:return r.month(o,{width:"wide",context:"standalone"})}},w:function(e,t,r,o){let n=dse(e,o);return t==="wo"?r.ordinalNumber(n,{unit:"week"}):or(n,t.length)},I:function(e,t,r){let o=cse(e);return t==="Io"?r.ordinalNumber(o,{unit:"week"}):or(o,t.length)},d:function(e,t,r){return t==="do"?r.ordinalNumber(e.getDate(),{unit:"date"}):Ef.d(e,t)},D:function(e,t,r){let o=lse(e);return t==="Do"?r.ordinalNumber(o,{unit:"dayOfYear"}):or(o,t.length)},E:function(e,t,r){let o=e.getDay();switch(t){case"E":case"EE":case"EEE":return r.day(o,{width:"abbreviated",context:"formatting"});case"EEEEE":return r.day(o,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(o,{width:"short",context:"formatting"});default:return r.day(o,{width:"wide",context:"formatting"})}},e:function(e,t,r,o){let n=e.getDay(),i=(n-o.weekStartsOn+8)%7||7;switch(t){case"e":return String(i);case"ee":return or(i,2);case"eo":return r.ordinalNumber(i,{unit:"day"});case"eee":return r.day(n,{width:"abbreviated",context:"formatting"});case"eeeee":return r.day(n,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(n,{width:"short",context:"formatting"});default:return r.day(n,{width:"wide",context:"formatting"})}},c:function(e,t,r,o){let n=e.getDay(),i=(n-o.weekStartsOn+8)%7||7;switch(t){case"c":return String(i);case"cc":return or(i,t.length);case"co":return r.ordinalNumber(i,{unit:"day"});case"ccc":return r.day(n,{width:"abbreviated",context:"standalone"});case"ccccc":return r.day(n,{width:"narrow",context:"standalone"});case"cccccc":return r.day(n,{width:"short",context:"standalone"});default:return r.day(n,{width:"wide",context:"standalone"})}},i:function(e,t,r){let o=e.getDay(),n=o===0?7:o;switch(t){case"i":return String(n);case"ii":return or(n,t.length);case"io":return r.ordinalNumber(n,{unit:"day"});case"iii":return r.day(o,{width:"abbreviated",context:"formatting"});case"iiiii":return r.day(o,{width:"narrow",context:"formatting"});case"iiiiii":return r.day(o,{width:"short",context:"formatting"});default:return r.day(o,{width:"wide",context:"formatting"})}},a:function(e,t,r){let n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"aaa":return r.dayPeriod(n,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return r.dayPeriod(n,{width:"narrow",context:"formatting"});default:return r.dayPeriod(n,{width:"wide",context:"formatting"})}},b:function(e,t,r){let o=e.getHours(),n;switch(o===12?n=Z0.noon:o===0?n=Z0.midnight:n=o/12>=1?"pm":"am",t){case"b":case"bb":return r.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"bbb":return r.dayPeriod(n,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return r.dayPeriod(n,{width:"narrow",context:"formatting"});default:return r.dayPeriod(n,{width:"wide",context:"formatting"})}},B:function(e,t,r){let o=e.getHours(),n;switch(o>=17?n=Z0.evening:o>=12?n=Z0.afternoon:o>=4?n=Z0.morning:n=Z0.night,t){case"B":case"BB":case"BBB":return r.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"BBBBB":return r.dayPeriod(n,{width:"narrow",context:"formatting"});default:return r.dayPeriod(n,{width:"wide",context:"formatting"})}},h:function(e,t,r){if(t==="ho"){let o=e.getHours()%12;return o===0&&(o=12),r.ordinalNumber(o,{unit:"hour"})}return Ef.h(e,t)},H:function(e,t,r){return t==="Ho"?r.ordinalNumber(e.getHours(),{unit:"hour"}):Ef.H(e,t)},K:function(e,t,r){let o=e.getHours()%12;return t==="Ko"?r.ordinalNumber(o,{unit:"hour"}):or(o,t.length)},k:function(e,t,r){let o=e.getHours();return o===0&&(o=24),t==="ko"?r.ordinalNumber(o,{unit:"hour"}):or(o,t.length)},m:function(e,t,r){return t==="mo"?r.ordinalNumber(e.getMinutes(),{unit:"minute"}):Ef.m(e,t)},s:function(e,t,r){return t==="so"?r.ordinalNumber(e.getSeconds(),{unit:"second"}):Ef.s(e,t)},S:function(e,t){return Ef.S(e,t)},X:function(e,t,r){let o=e.getTimezoneOffset();if(o===0)return"Z";switch(t){case"X":return mse(o);case"XXXX":case"XX":return Pv(o);default:return Pv(o,":")}},x:function(e,t,r){let o=e.getTimezoneOffset();switch(t){case"x":return mse(o);case"xxxx":case"xx":return Pv(o);default:return Pv(o,":")}},O:function(e,t,r){let o=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+fse(o,":");default:return"GMT"+Pv(o,":")}},z:function(e,t,r){let o=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+fse(o,":");default:return"GMT"+Pv(o,":")}},t:function(e,t,r){let o=Math.trunc(+e/1e3);return or(o,t.length)},T:function(e,t,r){return or(+e,t.length)}};function fse(e,t=""){let r=e>0?"-":"+",o=Math.abs(e),n=Math.trunc(o/60),i=o%60;return i===0?r+String(n):r+String(n)+t+or(i,2)}function mse(e,t){return e%60===0?(e>0?"-":"+")+or(Math.abs(e)/60,2):Pv(e,t)}function Pv(e,t=""){let r=e>0?"-":"+",o=Math.abs(e),n=or(Math.trunc(o/60),2),i=or(o%60,2);return r+n+t+i}var pse=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}},hse=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}},sBe=(e,t)=>{let r=e.match(/(P+)(p+)?/)||[],o=r[1],n=r[2];if(!n)return pse(e,t);let i;switch(o){case"P":i=t.dateTime({width:"short"});break;case"PP":i=t.dateTime({width:"medium"});break;case"PPP":i=t.dateTime({width:"long"});break;default:i=t.dateTime({width:"full"});break}return i.replace("{{date}}",pse(o,t)).replace("{{time}}",hse(n,t))},gse={p:hse,P:sBe};var aBe=/^D+$/,lBe=/^Y+$/,cBe=["D","DD","YY","YYYY"];function vse(e){return aBe.test(e)}function bse(e){return lBe.test(e)}function yse(e,t,r){let o=uBe(e,t,r);if(console.warn(o),cBe.includes(e))throw new RangeError(o)}function uBe(e,t,r){let o=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${o} to the input \`${r}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}var dBe=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,fBe=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,mBe=/^'([^]*?)'?$/,pBe=/''/g,hBe=/[a-zA-Z]/;function Lj(e,t,r){let o=Hp(),n=r?.locale??o.locale??Fj,i=r?.firstWeekContainsDate??r?.locale?.options?.firstWeekContainsDate??o.firstWeekContainsDate??o.locale?.options?.firstWeekContainsDate??1,s=r?.weekStartsOn??r?.locale?.options?.weekStartsOn??o.weekStartsOn??o.locale?.options?.weekStartsOn??0,l=qt(e,r?.in);if(!Tf(l))throw new RangeError("Invalid time value");let c=t.match(fBe).map(d=>{let f=d[0];if(f==="p"||f==="P"){let m=gse[f];return m(d,n.formatLong)}return d}).join("").match(dBe).map(d=>{if(d==="''")return{isToken:!1,value:"'"};let f=d[0];if(f==="'")return{isToken:!1,value:gBe(d)};if(Dj[f])return{isToken:!0,value:d};if(f.match(hBe))throw new RangeError("Format string contains an unescaped latin alphabet character `"+f+"`");return{isToken:!1,value:d}});n.localize.preprocessor&&(c=n.localize.preprocessor(l,c));let u={firstWeekContainsDate:i,weekStartsOn:s,locale:n};return c.map(d=>{if(!d.isToken)return d.value;let f=d.value;(!r?.useAdditionalWeekYearTokens&&bse(f)||!r?.useAdditionalDayOfYearTokens&&vse(f))&&yse(f,t,String(e));let m=Dj[f[0]];return m(l,f,n.localize,u)}).join("")}function gBe(e){let t=e.match(mBe);return t?t[1].replace(pBe,"'"):e}function kv(e,t,r){return vI(e,-t,r)}function wse(e,t){let r=()=>Yo(t?.in,NaN),o=t?.additionalDigits??2,n=wBe(e),i;if(n.date){let u=SBe(n.date,o);i=_Be(u.restDateString,u.year)}if(!i||isNaN(+i))return r();let s=+i,l=0,c;if(n.time&&(l=xBe(n.time),isNaN(l)))return r();if(n.timezone){if(c=CBe(n.timezone),isNaN(c))return r()}else{let u=new Date(s+l),d=qt(0,t?.in);return d.setFullYear(u.getUTCFullYear(),u.getUTCMonth(),u.getUTCDate()),d.setHours(u.getUTCHours(),u.getUTCMinutes(),u.getUTCSeconds(),u.getUTCMilliseconds()),d}return qt(s+l+c,t?.in)}var xI={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},vBe=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,bBe=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,yBe=/^([+-])(\d{2})(?::?(\d{2}))?$/;function wBe(e){let t={},r=e.split(xI.dateTimeDelimiter),o;if(r.length>2)return t;if(/:/.test(r[0])?o=r[0]:(t.date=r[0],o=r[1],xI.timeZoneDelimiter.test(t.date)&&(t.date=e.split(xI.timeZoneDelimiter)[0],o=e.substr(t.date.length,e.length))),o){let n=xI.timezone.exec(o);n?(t.time=o.replace(n[1],""),t.timezone=n[1]):t.time=o}return t}function SBe(e,t){let r=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+t)+"})|(\\d{2}|[+-]\\d{"+(2+t)+"})$)"),o=e.match(r);if(!o)return{year:NaN,restDateString:""};let n=o[1]?parseInt(o[1]):null,i=o[2]?parseInt(o[2]):null;return{year:i===null?n:i*100,restDateString:e.slice((o[1]||o[2]).length)}}function _Be(e,t){if(t===null)return new Date(NaN);let r=e.match(vBe);if(!r)return new Date(NaN);let o=!!r[4],n=cC(r[1]),i=cC(r[2])-1,s=cC(r[3]),l=cC(r[4]),c=cC(r[5])-1;if(o)return RBe(t,l,c)?TBe(t,l,c):new Date(NaN);{let u=new Date(0);return!PBe(t,i,s)||!kBe(t,n)?new Date(NaN):(u.setUTCFullYear(t,i,Math.max(n,s)),u)}}function cC(e){return e?parseInt(e):1}function xBe(e){let t=e.match(bBe);if(!t)return NaN;let r=Bj(t[1]),o=Bj(t[2]),n=Bj(t[3]);return ABe(r,o,n)?r*Ij+o*Aj+n*1e3:NaN}function Bj(e){return e&&parseFloat(e.replace(",","."))||0}function CBe(e){if(e==="Z")return 0;let t=e.match(yBe);if(!t)return 0;let r=t[1]==="+"?-1:1,o=parseInt(t[2]),n=t[3]&&parseInt(t[3])||0;return IBe(o,n)?r*(o*Ij+n*Aj):NaN}function TBe(e,t,r){let o=new Date(0);o.setUTCFullYear(e,0,4);let n=o.getUTCDay()||7,i=(t-1)*7+r+1-n;return o.setUTCDate(o.getUTCDate()+i),o}var EBe=[31,null,31,30,31,30,31,31,30,31,30,31];function Sse(e){return e%400===0||e%4===0&&e%100!==0}function PBe(e,t,r){return t>=0&&t<=11&&r>=1&&r<=(EBe[t]||(Sse(e)?29:28))}function kBe(e,t){return t>=1&&t<=(Sse(e)?366:365)}function RBe(e,t,r){return t>=1&&t<=53&&r>=0&&r<=6}function ABe(e,t,r){return e===24?t===0&&r===0:r>=0&&r<60&&t>=0&&t<60&&e>=0&&e<25}function IBe(e,t){return t>=0&&t<=59}function CI(e,t,r){return bI(e,-t,r)}function _se(e,t,r){return Jie(e,-t,r)}function TI(e,t,r){return $ie(e,-t,r)}var Le=a(V(),1),Ao=a(H(),1),ys=a(en(),1);var Vj=a(T(),1),qo={Name:(0,Vj.jsx)("span",{className:"dataviews-filters__summary-filter-text-name"}),Value:(0,Vj.jsx)("span",{className:"dataviews-filters__summary-filter-text-value"})};function xse(e,t){switch(t){case"days":return kv(new Date,e);case"weeks":return _se(new Date,e);case"months":return CI(new Date,e);case"years":return TI(new Date,e);default:return new Date}}var Cse={label:(0,Le.__)("Is none of"),filterText:(e,t)=>(0,Ao.createInterpolateElement)((0,Le.sprintf)((0,Le.__)("<Name>%1$s is none of: </Name><Value>%2$s</Value>"),e.name,t.map(r=>r.label).join(", ")),qo),filter:((e,t,r)=>{if(!r?.length)return!0;let o=t.getValue({item:e});return Array.isArray(o)?!r.some(n=>o.includes(n)):typeof o=="string"?!r.includes(o):!1}),selection:"multi"},EI=[{name:Qr,label:(0,Le.__)("Includes"),filterText:(e,t)=>(0,Ao.createInterpolateElement)((0,Le.sprintf)((0,Le.__)("<Name>%1$s includes: </Name><Value>%2$s</Value>"),e.name,t.map(r=>r.label).join(", ")),qo),filter(e,t,r){if(!r?.length)return!0;let o=t.getValue({item:e});return Array.isArray(o)?r.some(n=>o.includes(n)):typeof o=="string"?r.includes(o):!1},selection:"multi"},{name:Jr,...Cse},{name:Ni,label:(0,Le.__)("Includes all"),filterText:(e,t)=>(0,Ao.createInterpolateElement)((0,Le.sprintf)((0,Le.__)("<Name>%1$s includes all: </Name><Value>%2$s</Value>"),e.name,t.map(r=>r.label).join(", ")),qo),filter(e,t,r){return r?.length?r.every(o=>t.getValue({item:e})?.includes(o)):!0},selection:"multi"},{name:Ln,...Cse},{name:hs,label:(0,Le.__)("Between (inc)"),filterText:(e,t)=>(0,Ao.createInterpolateElement)((0,Le.sprintf)((0,Le.__)("<Name>%1$s between (inc): </Name><Value>%2$s and %3$s</Value>"),e.name,t[0].label[0],t[0].label[1]),qo),filter(e,t,r){if(!Array.isArray(r)||r.length!==2||r[0]===void 0||r[1]===void 0)return!0;let o=t.getValue({item:e});return typeof o=="number"||o instanceof Date||typeof o=="string"?o>=r[0]&&o<=r[1]:!1},selection:"custom"},{name:gs,label:(0,Le.__)("In the past"),filterText:(e,t)=>(0,Ao.createInterpolateElement)((0,Le.sprintf)((0,Le.__)("<Name>%1$s is in the past: </Name><Value>%2$s</Value>"),e.name,`${t[0].value.value} ${t[0].value.unit}`),qo),filter(e,t,r){if(r?.value===void 0||r?.unit===void 0)return!0;let o=xse(r.value,r.unit),n=(0,ys.getDate)(t.getValue({item:e}));return n>=o&&n<=new Date},selection:"custom"},{name:ta,label:(0,Le.__)("Over"),filterText:(e,t)=>(0,Ao.createInterpolateElement)((0,Le.sprintf)((0,Le.__)("<Name>%1$s is over: </Name><Value>%2$s</Value>"),e.name,`${t[0].value.value} ${t[0].value.unit}`),qo),filter(e,t,r){if(r?.value===void 0||r?.unit===void 0)return!0;let o=xse(r.value,r.unit);return(0,ys.getDate)(t.getValue({item:e}))<o},selection:"custom"},{name:po,label:(0,Le.__)("Is"),filterText:(e,t)=>(0,Ao.createInterpolateElement)((0,Le.sprintf)((0,Le.__)("<Name>%1$s is: </Name><Value>%2$s</Value>"),e.name,t[0].label),qo),filter(e,t,r){return r===t.getValue({item:e})||r===void 0},selection:"single"},{name:ho,label:(0,Le.__)("Is not"),filterText:(e,t)=>(0,Ao.createInterpolateElement)((0,Le.sprintf)((0,Le.__)("<Name>%1$s is not: </Name><Value>%2$s</Value>"),e.name,t[0].label),qo),filter(e,t,r){return r!==t.getValue({item:e})},selection:"single"},{name:wp,label:(0,Le.__)("Less than"),filterText:(e,t)=>(0,Ao.createInterpolateElement)((0,Le.sprintf)((0,Le.__)("<Name>%1$s is less than: </Name><Value>%2$s</Value>"),e.name,t[0].label),qo),filter(e,t,r){return r===void 0?!0:t.getValue({item:e})<r},selection:"single"},{name:Sp,label:(0,Le.__)("Greater than"),filterText:(e,t)=>(0,Ao.createInterpolateElement)((0,Le.sprintf)((0,Le.__)("<Name>%1$s is greater than: </Name><Value>%2$s</Value>"),e.name,t[0].label),qo),filter(e,t,r){return r===void 0?!0:t.getValue({item:e})>r},selection:"single"},{name:_p,label:(0,Le.__)("Less than or equal"),filterText:(e,t)=>(0,Ao.createInterpolateElement)((0,Le.sprintf)((0,Le.__)("<Name>%1$s is less than or equal to: </Name><Value>%2$s</Value>"),e.name,t[0].label),qo),filter(e,t,r){return r===void 0?!0:t.getValue({item:e})<=r},selection:"single"},{name:xp,label:(0,Le.__)("Greater than or equal"),filterText:(e,t)=>(0,Ao.createInterpolateElement)((0,Le.sprintf)((0,Le.__)("<Name>%1$s is greater than or equal to: </Name><Value>%2$s</Value>"),e.name,t[0].label),qo),filter(e,t,r){return r===void 0?!0:t.getValue({item:e})>=r},selection:"single"},{name:Cp,label:(0,Le.__)("Before"),filterText:(e,t)=>(0,Ao.createInterpolateElement)((0,Le.sprintf)((0,Le.__)("<Name>%1$s is before: </Name><Value>%2$s</Value>"),e.name,t[0].label),qo),filter(e,t,r){if(r===void 0)return!0;let o=(0,ys.getDate)(r);return(0,ys.getDate)(t.getValue({item:e}))<o},selection:"single"},{name:Tp,label:(0,Le.__)("After"),filterText:(e,t)=>(0,Ao.createInterpolateElement)((0,Le.sprintf)((0,Le.__)("<Name>%1$s is after: </Name><Value>%2$s</Value>"),e.name,t[0].label),qo),filter(e,t,r){if(r===void 0)return!0;let o=(0,ys.getDate)(r);return(0,ys.getDate)(t.getValue({item:e}))>o},selection:"single"},{name:Ep,label:(0,Le.__)("Before (inc)"),filterText:(e,t)=>(0,Ao.createInterpolateElement)((0,Le.sprintf)((0,Le.__)("<Name>%1$s is on or before: </Name><Value>%2$s</Value>"),e.name,t[0].label),qo),filter(e,t,r){if(r===void 0)return!0;let o=(0,ys.getDate)(r);return(0,ys.getDate)(t.getValue({item:e}))<=o},selection:"single"},{name:Pp,label:(0,Le.__)("After (inc)"),filterText:(e,t)=>(0,Ao.createInterpolateElement)((0,Le.sprintf)((0,Le.__)("<Name>%1$s is on or after: </Name><Value>%2$s</Value>"),e.name,t[0].label),qo),filter(e,t,r){if(r===void 0)return!0;let o=(0,ys.getDate)(r);return(0,ys.getDate)(t.getValue({item:e}))>=o},selection:"single"},{name:Au,label:(0,Le.__)("Contains"),filterText:(e,t)=>(0,Ao.createInterpolateElement)((0,Le.sprintf)((0,Le.__)("<Name>%1$s contains: </Name><Value>%2$s</Value>"),e.name,t[0].label),qo),filter(e,t,r){if(r===void 0)return!0;let o=t.getValue({item:e});return typeof o=="string"&&r&&o.toLowerCase().includes(String(r).toLowerCase())},selection:"single"},{name:Iu,label:(0,Le.__)("Doesn't contain"),filterText:(e,t)=>(0,Ao.createInterpolateElement)((0,Le.sprintf)((0,Le.__)("<Name>%1$s doesn't contain: </Name><Value>%2$s</Value>"),e.name,t[0].label),qo),filter(e,t,r){if(r===void 0)return!0;let o=t.getValue({item:e});return typeof o=="string"&&r&&!o.toLowerCase().includes(String(r).toLowerCase())},selection:"single"},{name:Ou,label:(0,Le.__)("Starts with"),filterText:(e,t)=>(0,Ao.createInterpolateElement)((0,Le.sprintf)((0,Le.__)("<Name>%1$s starts with: </Name><Value>%2$s</Value>"),e.name,t[0].label),qo),filter(e,t,r){if(r===void 0)return!0;let o=t.getValue({item:e});return typeof o=="string"&&r&&o.toLowerCase().startsWith(String(r).toLowerCase())},selection:"single"},{name:kp,label:(0,Le.__)("On"),filterText:(e,t)=>(0,Ao.createInterpolateElement)((0,Le.sprintf)((0,Le.__)("<Name>%1$s is: </Name><Value>%2$s</Value>"),e.name,t[0].label),qo),filter(e,t,r){if(r===void 0)return!0;let o=(0,ys.getDate)(r),n=(0,ys.getDate)(t.getValue({item:e}));return o.getTime()===n.getTime()},selection:"single"},{name:Rp,label:(0,Le.__)("Not on"),filterText:(e,t)=>(0,Ao.createInterpolateElement)((0,Le.sprintf)((0,Le.__)("<Name>%1$s is not: </Name><Value>%2$s</Value>"),e.name,t[0].label),qo),filter(e,t,r){if(r===void 0)return!0;let o=(0,ys.getDate)(r),n=(0,ys.getDate)(t.getValue({item:e}));return o.getTime()!==n.getTime()},selection:"single"}],Rv=e=>EI.find(t=>t.name===e),Tse=()=>EI.map(e=>e.name),Ese=e=>EI.filter(t=>t.selection==="single").some(t=>t.name===e),Pse=e=>EI.some(t=>t.name===e);var Ko=a(T(),1),OBe="Enter",NBe=" ",MBe=({activeElements:e,filterInView:t,filter:r})=>{if(e===void 0||e.length===0)return r.name;let o=Rv(t?.operator);return o!==void 0?o.filterText(r,e):(0,Pf.sprintf)((0,Pf.__)("Unknown status for %1$s"),r.name)};function FBe({filter:e,view:t,onChangeView:r}){let o=e.operators?.map(s=>({value:s,label:Rv(s)?.label||s})),n=t.filters?.find(s=>s.field===e.field),i=n?.operator||e.operators[0];return o.length>1&&(0,Ko.jsxs)(ne,{direction:"row",gap:"sm",justify:"flex-start",className:"dataviews-filters__summary-operators-container",align:"center",children:[(0,Ko.jsx)(Up.FlexItem,{className:"dataviews-filters__summary-operators-filter-name",children:e.name}),(0,Ko.jsx)(Up.SelectControl,{className:"dataviews-filters__summary-operators-filter-select",label:(0,Pf.__)("Conditions"),value:i,options:o,onChange:s=>{let l=s,c=n?.operator,u=n?[...(t.filters??[]).map(d=>{if(d.field===e.field){let f=Rv(c)?.selection,m=Rv(l)?.selection,h=f!==m||[f,m].includes("custom");return{...d,value:h?void 0:d.value,operator:l}}return d})]:[...t.filters??[],{field:e.field,operator:l,value:void 0}];r({...t,page:1,filters:u})},size:"small",variant:"minimal",hideLabelFromVision:!0})]})}function kse({addFilterRef:e,openedFilter:t,fields:r,...o}){let n=(0,PI.useRef)(null),{filter:i,view:s,onChangeView:l}=o,c=s.filters?.find(S=>S.field===i.field),u=[],d=(0,PI.useMemo)(()=>{let S=r.find(y=>y.id===i.field);return S&&{...S,getValue:({item:y})=>y[S.id]}},[r,i.field]),{elements:f}=jn({elements:i.elements,getElements:i.getElements});if(f.length>0)u=f.filter(S=>i.singleSelection?S.value===c?.value:c?.value?.includes(S.value));else if(Array.isArray(c?.value)){let S=c.value.map(y=>d?.getValueFormatted({item:{[d.id]:y},field:d})||String(y));u=[{value:c.value,label:S}]}else if(typeof c?.value=="object")u=[{value:c.value,label:c.value}];else if(c?.value!==void 0){let S=d!==void 0?d.getValueFormatted({item:{[d.id]:c.value},field:d}):String(c.value);u=[{value:c.value,label:S}]}let m=i.isPrimary,h=c?.isLocked,g=!h&&c?.value!==void 0,v=!h&&(!m||g),b=m?(0,Pf.__)("Reset"):(0,Pf.__)("Remove");return(0,Ko.jsx)(Up.Dropdown,{defaultOpen:t===i.field,contentClassName:"dataviews-filters__summary-popover",popoverProps:{placement:"bottom-start",role:"dialog"},onClose:()=>{n.current?.focus()},renderToggle:({isOpen:S,onToggle:y})=>(0,Ko.jsxs)("div",{className:"dataviews-filters__summary-chip-container",children:[(0,Ko.jsxs)(We.Root,{children:[(0,Ko.jsx)(We.Trigger,{render:(0,Ko.jsx)("div",{className:Q("dataviews-filters__summary-chip",{"has-reset":v,"has-values":g,"is-not-clickable":h}),role:"button",tabIndex:h?-1:0,onClick:()=>{h||y()},onKeyDown:w=>{!h&&[OBe,NBe].includes(w.key)&&(y(),w.preventDefault())},"aria-disabled":h,"aria-pressed":S,"aria-expanded":S,ref:n,children:(0,Ko.jsx)(MBe,{activeElements:u,filterInView:c,filter:i})})}),(0,Ko.jsx)(We.Popup,{children:(0,Pf.sprintf)((0,Pf.__)("Filter by: %1$s"),i.name.toLowerCase())})]}),v&&(0,Ko.jsxs)(We.Root,{children:[(0,Ko.jsx)(We.Trigger,{render:(0,Ko.jsx)("button",{className:Q("dataviews-filters__summary-chip-remove",{"has-values":g}),"aria-label":b,onClick:()=>{l({...s,page:1,filters:s.filters?.filter(w=>w.field!==i.field)}),m?n.current?.focus():e.current?.focus()},children:(0,Ko.jsx)(Up.Icon,{icon:_i})})}),(0,Ko.jsx)(We.Popup,{children:b})]})]}),renderContent:()=>(0,Ko.jsxs)(ne,{direction:"column",justify:"flex-start",children:[(0,Ko.jsx)(FBe,{...o}),o.filter.hasElements?(0,Ko.jsx)(zie,{...o,filter:{...o.filter,elements:f}}):(0,Ko.jsx)(Yie,{...o,fields:r})]})})}var kI=a(W(),1),Rse=a(V(),1),Ase=a(H(),1);var kf=a(T(),1),{Menu:uC}=Ct(kI.privateApis);function jj({filters:e,view:t,onChangeView:r,setOpenedFilter:o,triggerProps:n}){let i=e.filter(s=>!s.isVisible);return(0,kf.jsxs)(uC,{children:[(0,kf.jsx)(uC.TriggerButton,{...n}),(0,kf.jsx)(uC.Popover,{children:i.map(s=>(0,kf.jsx)(uC.Item,{onClick:()=>{o(s.field),r({...t,page:1,filters:[...t.filters||[],{field:s.field,value:void 0,operator:s.operators[0]}]})},children:(0,kf.jsx)(uC.ItemLabel,{children:s.name})},s.field))})]})}function DBe({filters:e,view:t,onChangeView:r,setOpenedFilter:o},n){if(!e.length||e.every(({isPrimary:s})=>s))return null;let i=e.filter(s=>!s.isVisible);return(0,kf.jsx)(jj,{triggerProps:{render:(0,kf.jsx)(kI.Button,{accessibleWhenDisabled:!0,size:"compact",className:"dataviews-filters-button",variant:"tertiary",disabled:!i.length,ref:n}),children:(0,Rse.__)("Add filter")},filters:e,view:t,onChangeView:r,setOpenedFilter:o})}var Ise=(0,Ase.forwardRef)(DBe);var Ose=a(W(),1),Nse=a(V(),1),Mse=a(T(),1);function Fse({filters:e,view:t,onChangeView:r}){let o=i=>e.some(s=>s.field===i&&s.isPrimary),n=!t.search&&!t.filters?.some(i=>!i.isLocked&&(i.value!==void 0||!o(i.field)));return(0,Mse.jsx)(Ose.Button,{disabled:n,accessibleWhenDisabled:!0,size:"compact",variant:"tertiary",className:"dataviews-filters__reset-button",onClick:()=>{r({...t,page:1,search:"",filters:t.filters?.filter(i=>!!i.isLocked)||[]})},children:(0,Nse.__)("Reset")})}var Dse=a(H(),1);function LBe(e,t){return(0,Dse.useMemo)(()=>{let r=[];return e.forEach(o=>{if(o.filterBy===!1||!o.hasElements&&!o.Edit)return;let n=o.filterBy.operators,i=!!o.filterBy?.isPrimary,s=t.filters?.some(l=>l.field===o.id&&!!l.isLocked)??!1;r.push({field:o.id,name:o.label,elements:o.elements,getElements:o.getElements,hasElements:o.hasElements,singleSelection:n.some(l=>Ese(l)),operators:n,isVisible:s||i||!!t.filters?.some(l=>l.field===o.id&&Pse(l.operator)),isPrimary:i,isLocked:s})}),r.sort((o,n)=>o.isLocked&&!n.isLocked?-1:!o.isLocked&&n.isLocked?1:o.isPrimary&&!n.isPrimary?-1:!o.isPrimary&&n.isPrimary?1:o.name.localeCompare(n.name)),r},[e,t])}var dC=LBe;var fC=a(T(),1);function BBe({className:e}){let{fields:t,view:r,onChangeView:o,openedFilter:n,setOpenedFilter:i}=(0,X0.useContext)(nt),s=(0,X0.useRef)(null),l=dC(t,r),c=(0,fC.jsx)(Ise,{filters:l,view:r,onChangeView:o,ref:s,setOpenedFilter:i},"add-filter"),u=l.filter(f=>f.isVisible);if(u.length===0)return null;let d=[...u.map(f=>(0,fC.jsx)(kse,{filter:f,view:r,fields:t,onChangeView:o,addFilterRef:s,openedFilter:n},f.field)),c];return d.push((0,fC.jsx)(Fse,{filters:l,view:r,onChangeView:o},"reset-filters")),(0,fC.jsx)(ne,{direction:"row",justify:"flex-start",gap:"sm",style:{width:"fit-content"},wrap:"wrap",className:e,children:d})}var mC=(0,X0.memo)(BBe);var Wp=a(H(),1),Lse=a(W(),1);var RI=a(V(),1);var Wu=a(T(),1);function VBe(){let{filters:e,view:t,onChangeView:r,setOpenedFilter:o,isShowingFilter:n,setIsShowingFilter:i}=(0,Wp.useContext)(nt),s=(0,Wp.useRef)(null),l=(0,Wp.useCallback)(h=>{r(h),i(!0)},[r,i]);if(e.length===0)return null;let c=e.some(h=>h.isVisible),u={label:(0,RI.__)("Add filter"),"aria-expanded":!1,isPressed:!1},d={label:(0,RI._x)("Filter","verb"),"aria-expanded":n,isPressed:n,onClick:()=>{n||o(null),i(!n)}},f=e.some(h=>h.isPrimary||h.isLocked),m=(0,Wu.jsx)(Lse.Button,{ref:s,className:"dataviews-filters__visibility-toggle",size:"compact",icon:ox,disabled:f,accessibleWhenDisabled:!0,...c?d:u});return(0,Wu.jsx)("div",{className:"dataviews-filters__container-visibility-toggle",children:c?(0,Wu.jsx)(jBe,{buttonRef:s,filtersCount:t.filters?.length,children:m}):(0,Wu.jsx)(jj,{filters:e,view:t,onChangeView:l,setOpenedFilter:o,triggerProps:{render:m}})})}function jBe({buttonRef:e,filtersCount:t,children:r}){return(0,Wp.useEffect)(()=>()=>{e.current?.focus()},[e]),(0,Wu.jsxs)(Wu.Fragment,{children:[r,!!t&&(0,Wu.jsx)("span",{className:"dataviews-filters-toggle__count",children:t})]})}var AI=VBe;var Bse=a(H(),1);var Vse=a(T(),1);function zBe(e){let{isShowingFilter:t}=(0,Bse.useContext)(nt);return t?(0,Vse.jsx)(mC,{...e}):null}var II=zBe;var jse=a(H(),1),zse=a(W(),1),Hse=a(V(),1);var Av=a(T(),1);function zj({className:e}){let{actions:t=[],data:r,fields:o,getItemId:n,getItemLevel:i,hasInitiallyLoaded:s,isLoading:l,view:c,onChangeView:u,selection:d,onChangeSelection:f,setOpenedFilter:m,onClickItem:h,isItemClickable:g,renderItemLink:v,defaultLayouts:b,containerRef:S,empty:y=(0,Av.jsx)("p",{children:(0,Hse.__)("No results")})}=(0,jse.useContext)(nt),w=Mu(!s,{delay:200});if(!s)return w?(0,Av.jsx)("div",{className:"dataviews-loading",children:(0,Av.jsx)("p",{children:(0,Av.jsx)(zse.Spinner,{})})}):null;let _=Bp.find(x=>x.type===c.type&&b[x.type])?.component;return(0,Av.jsx)("div",{className:"dataviews-layout__container",ref:S,children:(0,Av.jsx)(_,{className:e,actions:t,data:r,fields:o,getItemId:n,getItemLevel:i,isLoading:l,onChangeView:u,onChangeSelection:f,selection:d,setOpenedFilter:m,onClickItem:h,renderItemLink:v,isItemClickable:g,view:c,empty:y})})}var Use=a(V(),1),Pc=a(H(),1),Wse=a(W(),1),Gse=a(ke(),1);var Yse=a(T(),1),HBe=(0,Pc.memo)(function({label:t}){let{view:r,onChangeView:o}=(0,Pc.useContext)(nt),[n,i,s]=(0,Gse.useDebouncedInput)(r.search);(0,Pc.useEffect)(()=>{r.search!==s&&i(r.search??"")},[r.search,i]);let l=(0,Pc.useRef)(o),c=(0,Pc.useRef)(r);(0,Pc.useEffect)(()=>{l.current=o,c.current=r},[o,r]),(0,Pc.useEffect)(()=>{s!==c.current?.search&&l.current({...c.current,page:r.page?1:void 0,startPosition:r.startPosition?1:void 0,search:s})},[s]);let u=t||(0,Use.__)("Search");return(0,Yse.jsx)(Wse.SearchControl,{className:"dataviews-search",onChange:i,value:n,label:u,placeholder:u,size:"compact"})}),Hj=HBe;var Zo=a(W(),1),Rf=a(V(),1),kc=a(H(),1);var Wj=a(Uj(),1),Kse=a(ke(),1);var jt=a(T(),1),{Menu:pC}=Ct(Zo.privateApis),UBe={className:"dataviews-config__popover",placement:"bottom-end",offset:9};function Gj(){let{view:e,onChangeView:t,defaultLayouts:r}=(0,kc.useContext)(nt),o=Object.keys(r);if(o.length<=1)return null;let n=Bp.find(i=>e.type===i.type);return(0,jt.jsxs)(pC,{children:[(0,jt.jsx)(pC.TriggerButton,{render:(0,jt.jsx)(Zo.Button,{size:"compact",icon:n?.icon,label:(0,Rf.__)("Layout")})}),(0,jt.jsx)(pC.Popover,{children:o.map(i=>{let s=Bp.find(l=>l.type===i);return s?(0,jt.jsx)(pC.RadioItem,{value:i,name:"view-actions-available-view",checked:i===e.type,hideOnClick:!0,onChange:l=>{switch(l.target.value){case"list":case"grid":case"table":case"pickerGrid":case"pickerTable":case"pickerActivity":case"activity":let c={...e};return"layout"in c&&delete c.layout,t({...c,type:l.target.value,...r[l.target.value]})}(0,Wj.default)("Invalid dataview")},children:(0,jt.jsx)(pC.ItemLabel,{children:s.label})},i):null})})]})}function WBe(){let{view:e,fields:t,onChangeView:r}=(0,kc.useContext)(nt),o=(0,kc.useMemo)(()=>t.filter(i=>i.enableSorting!==!1).map(i=>({label:i.label,value:i.id})),[t]);return(0,jt.jsx)(Zo.SelectControl,{__next40pxDefaultSize:!0,label:(0,Rf.__)("Sort by"),value:e.sort?.field,options:o,onChange:n=>{r({...e,sort:{direction:e?.sort?.direction||"desc",field:n},showLevels:!1})}})}function GBe(){let{view:e,fields:t,onChangeView:r}=(0,kc.useContext)(nt);if(t.filter(i=>i.enableSorting!==!1).length===0)return null;let n=e.sort?.direction;return!n&&e.sort?.field&&(n="desc"),(0,jt.jsx)(Zo.__experimentalToggleGroupControl,{className:"dataviews-view-config__sort-direction",__next40pxDefaultSize:!0,isBlock:!0,label:(0,Rf.__)("Order"),value:n,onChange:i=>{if(i==="asc"||i==="desc"){r({...e,sort:{direction:i,field:e.sort?.field||t.find(s=>s.enableSorting!==!1)?.id||""},showLevels:!1});return}(0,Wj.default)("Invalid direction")},children:pA.map(i=>(0,jt.jsx)(Zo.__experimentalToggleGroupControlOptionIcon,{value:i,icon:Yre[i],label:gA[i]},i))})}function YBe(){let{view:e,config:t,onChangeView:r}=(0,kc.useContext)(nt),{infiniteScrollEnabled:o}=e;return!t||!t.perPageSizes||t.perPageSizes.length<2||t.perPageSizes.length>6||o?null:(0,jt.jsx)(Zo.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,isBlock:!0,label:(0,Rf.__)("Items per page"),value:e.perPage||10,disabled:!e?.sort?.field,onChange:n=>{let i=typeof n=="number"||n===void 0?n:parseInt(n,10);r({...e,perPage:i,page:1})},children:t.perPageSizes.map(n=>(0,jt.jsx)(Zo.__experimentalToggleGroupControlOption,{value:n,label:n.toString()},n))})}function qBe(){let{onReset:e}=(0,kc.useContext)(nt);return e===void 0?null:(0,jt.jsx)(Zo.Button,{variant:"tertiary",size:"compact",disabled:e===!1,accessibleWhenDisabled:!0,className:"dataviews-view-config__reset-button",onClick:()=>{typeof e=="function"&&e()},children:(0,Rf.__)("Reset view")})}function Yj(){let{view:e,onReset:t}=(0,kc.useContext)(nt),r=(0,Kse.useInstanceId)(Zse,"dataviews-view-config-dropdown"),o=Bp.find(i=>i.type===e.type),n=typeof t=="function";return(0,jt.jsx)(Zo.Dropdown,{expandOnMobile:!0,popoverProps:{...UBe,id:r},renderToggle:({onToggle:i,isOpen:s})=>(0,jt.jsxs)("div",{className:"dataviews-view-config__toggle-wrapper",children:[(0,jt.jsx)(Zo.Button,{size:"compact",icon:I4,label:(0,Rf._x)("View options","View is used as a noun"),onClick:i,"aria-expanded":s?"true":"false","aria-controls":r}),n&&(0,jt.jsx)("span",{className:"dataviews-view-config__modified-indicator"})]}),renderContent:()=>(0,jt.jsx)(Zo.__experimentalDropdownContentWrapper,{paddingSize:"medium",className:"dataviews-config__popover-content-wrapper",children:(0,jt.jsxs)(ne,{direction:"column",className:"dataviews-view-config",gap:"xl",children:[(0,jt.jsxs)(ne,{direction:"row",justify:"space-between",align:"center",className:"dataviews-view-config__header",children:[(0,jt.jsx)(Zo.__experimentalHeading,{level:2,className:"dataviews-settings-section__title",children:(0,Rf.__)("Appearance")}),(0,jt.jsx)(qBe,{})]}),(0,jt.jsxs)(ne,{direction:"column",gap:"lg",children:[(0,jt.jsxs)(ne,{direction:"row",gap:"sm",className:"dataviews-view-config__sort-controls",children:[(0,jt.jsx)(WBe,{}),(0,jt.jsx)(GBe,{})]}),!!o?.viewConfigOptions&&(0,jt.jsx)(o.viewConfigOptions,{}),(0,jt.jsx)(YBe,{}),(0,jt.jsx)(EA,{})]})]})})})}function Zse(){return(0,jt.jsxs)(jt.Fragment,{children:[(0,jt.jsx)(Gj,{}),(0,jt.jsx)(Yj,{})]})}var KBe=(0,kc.memo)(Zse),Xse=KBe;var Qse=a(W(),1),Jse=a(H(),1);function Er(e,t){let r;return e?.required&&t?.required?r=t?.required?.message?t.required:void 0:e?.pattern&&t?.pattern?r=t.pattern:e?.min&&t?.min?r=t.min:e?.max&&t?.max?r=t.max:e?.minLength&&t?.minLength?r=t.minLength:e?.maxLength&&t?.maxLength?r=t.maxLength:e?.elements&&t?.elements?r=t.elements:t?.custom&&(r=t.custom),r}var $se=a(T(),1),{ValidatedCheckboxControl:ZBe}=Ct(Qse.privateApis);function eae({field:e,onChange:t,data:r,hideLabelFromVision:o,markWhenOptional:n,validity:i}){let{getValue:s,setValue:l,label:c,description:u,isValid:d}=e,f=e.isDisabled({item:r,field:e}),m=(0,Jse.useCallback)(()=>{t(l({item:r,value:!s({item:r})}))},[r,s,t,l]);return(0,$se.jsx)(ZBe,{required:!!e.isValid?.required,markWhenOptional:n,customValidity:Er(d,i),hidden:o,label:c,help:u,checked:s({item:r}),onChange:m,disabled:f})}var OI=a(W(),1),tae=a(H(),1);var qj=a(T(),1),{ValidatedComboboxControl:XBe}=Ct(OI.privateApis);function NI({data:e,field:t,onChange:r,hideLabelFromVision:o,validity:n}){let{label:i,description:s,placeholder:l,getValue:c,setValue:u,isValid:d}=t,f=c({item:e})??"",m=(0,tae.useCallback)(v=>r(u({item:e,value:v??""})),[e,r,u]),{elements:h,isLoading:g}=jn({elements:t.elements,getElements:t.getElements});return g?(0,qj.jsx)(OI.Spinner,{}):(0,qj.jsx)(XBe,{required:!!t.isValid?.required,customValidity:Er(d,n),label:i,value:f,help:s,placeholder:l,options:h,onChange:m,hideLabelFromVision:o,allowReset:!0,expandOnFocus:!0})}var DI=a(W(),1),kl=a(H(),1),FI=a(V(),1),$a=a(en(),1);var J0=a(W(),1),Kj=a(H(),1),Gu=a(V(),1);var Q0=a(T(),1),QBe={[gs]:[{value:"days",label:(0,Gu.__)("Days")},{value:"weeks",label:(0,Gu.__)("Weeks")},{value:"months",label:(0,Gu.__)("Months")},{value:"years",label:(0,Gu.__)("Years")}],[ta]:[{value:"days",label:(0,Gu.__)("Days ago")},{value:"weeks",label:(0,Gu.__)("Weeks ago")},{value:"months",label:(0,Gu.__)("Months ago")},{value:"years",label:(0,Gu.__)("Years ago")}]};function MI({className:e,data:t,field:r,onChange:o,hideLabelFromVision:n,operator:i}){let s=QBe[i===gs?"inThePast":"over"],{id:l,label:c,description:u,getValue:d,setValue:f}=r,m=r.isDisabled({item:t,field:r}),h=d({item:t}),{value:g="",unit:v=s[0].value}=h&&typeof h=="object"?h:{},b=(0,Kj.useCallback)(y=>o(f({item:t,value:{value:Number(y),unit:v}})),[o,f,t,v]),S=(0,Kj.useCallback)(y=>o(f({item:t,value:{value:g,unit:y}})),[o,f,t,g]);return(0,Q0.jsx)(J0.BaseControl,{id:l,className:Q(e,"dataviews-controls__relative-date"),label:c,hideLabelFromVision:n,help:u,children:(0,Q0.jsxs)(ne,{direction:"row",gap:"sm",children:[(0,Q0.jsx)(J0.__experimentalNumberControl,{__next40pxDefaultSize:!0,className:"dataviews-controls__relative-date-number",spinControls:"none",min:1,step:1,value:g,onChange:b,disabled:m}),(0,Q0.jsx)(J0.SelectControl,{className:"dataviews-controls__relative-date-unit",__next40pxDefaultSize:!0,label:(0,Gu.__)("Unit"),value:v,options:s,onChange:S,hideLabelFromVision:!0,disabled:m})]})})}var rae=a(H(),1);function hC(e,t){let r=typeof e.min?.constraint=="string"?e.min.constraint:void 0,o=typeof e.max?.constraint=="string"?e.max.constraint:void 0,n=(0,rae.useMemo)(()=>{let i=[];if(r){let s=t(r);s&&i.push({before:s})}if(o){let s=t(o);s&&i.push({after:s})}return i.length>0?i:void 0},[r,o,t]);return{minConstraint:r,maxConstraint:o,disabledMatchers:n}}var oae=a(en(),1);function gC(e){if(!e)return null;let t=(0,oae.getDate)(e);return t&&Tf(t)?t:null}var Gp=a(T(),1),{DateCalendar:JBe,ValidatedInputControl:$Be}=Ct(DI.privateApis),Zj=e=>e?(0,$a.dateI18n)("Y-m-d\\TH:i",(0,$a.getDate)(e)):"";function eVe({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i,config:s}){let{compact:l}=s||{},{id:c,label:u,description:d,setValue:f,getValue:m,isValid:h}=t,g=t.isDisabled({item:e,field:t}),v=m({item:e}),b=typeof v=="string"?v:void 0,[S,y]=(0,kl.useState)(()=>gC(b)||new Date),w=(0,kl.useRef)(null),_=(0,kl.useRef)(void 0),x=(0,kl.useRef)(null),{minConstraint:E,maxConstraint:O,disabledMatchers:A}=hC(h,gC),C=(0,kl.useCallback)(D=>r(f({item:e,value:D})),[e,r,f]);(0,kl.useEffect)(()=>()=>{_.current&&clearTimeout(_.current)},[]);let I=(0,kl.useCallback)(D=>{let B;if(D){let L=(0,$a.dateI18n)("Y-m-d",D),M;b?M=(0,$a.dateI18n)("H:i",(0,$a.getDate)(b)):M=(0,$a.dateI18n)("H:i",D),B=(0,$a.getDate)(`${L}T${M}`).toISOString(),C(B),_.current&&clearTimeout(_.current)}else C(void 0);x.current=w.current&&w.current.ownerDocument.activeElement,_.current=setTimeout(()=>{w.current&&(w.current.focus(),w.current.blur(),C(B),x.current&&x.current instanceof HTMLElement&&x.current.focus())},0)},[C,b]),k=(0,kl.useCallback)(D=>{if(D){let B=(0,$a.getDate)(D);C(B.toISOString());let L=gC(B.toISOString());L&&y(L)}else C(void 0)},[C]),{format:P}=t,N=P.weekStartsOn??(0,$a.getSettings)().l10n.startOfWeek,{timezone:{string:U}}=(0,$a.getSettings)(),F=u;return h?.required&&!n&&!o?F=`${u} (${(0,FI.__)("Required")})`:!h?.required&&n&&!o&&(F=`${u} (${(0,FI.__)("Optional")})`),(0,Gp.jsx)(DI.BaseControl,{id:c,label:F,help:d,hideLabelFromVision:o,children:(0,Gp.jsxs)(ne,{direction:"column",gap:"lg",children:[(0,Gp.jsx)($Be,{ref:w,__next40pxDefaultSize:!0,required:!!h?.required,customValidity:Er(h,i),type:"datetime-local",label:(0,FI.__)("Date time"),hideLabelFromVision:!0,value:Zj(b),onChange:k,disabled:g,min:E?Zj(E):void 0,max:O?Zj(O):void 0}),!l&&(0,Gp.jsx)(JBe,{style:{width:"100%"},selected:b&&gC(b)||void 0,onSelect:I,month:S,onMonthChange:y,timeZone:U||void 0,weekStartsOn:N,disabled:g||A})]})})}function nae({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,operator:i,validity:s,config:l}){return i===gs||i===ta?(0,Gp.jsx)(MI,{className:"dataviews-controls__datetime",data:e,field:t,onChange:r,hideLabelFromVision:o,operator:i}):(0,Gp.jsx)(eVe,{data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:s,config:l})}var ji=a(W(),1),vr=a(H(),1),yn=a(V(),1),Vi=a(en(),1);var Pr=a(T(),1),{DateCalendar:tVe,DateRangeCalendar:rVe}=Ct(ji.privateApis),oVe=[{id:"today",label:(0,yn.__)("Today"),getValue:()=>(0,Vi.getDate)(null)},{id:"yesterday",label:(0,yn.__)("Yesterday"),getValue:()=>{let e=(0,Vi.getDate)(null);return kv(e,1)}},{id:"past-week",label:(0,yn.__)("Past week"),getValue:()=>{let e=(0,Vi.getDate)(null);return kv(e,7)}},{id:"past-month",label:(0,yn.__)("Past month"),getValue:()=>{let e=(0,Vi.getDate)(null);return CI(e,1)}}],nVe=[{id:"last-7-days",label:(0,yn.__)("Last 7 days"),getValue:()=>{let e=(0,Vi.getDate)(null);return[kv(e,7),e]}},{id:"last-30-days",label:(0,yn.__)("Last 30 days"),getValue:()=>{let e=(0,Vi.getDate)(null);return[kv(e,30),e]}},{id:"month-to-date",label:(0,yn.__)("Month to date"),getValue:()=>{let e=(0,Vi.getDate)(null);return[lC(e),e]}},{id:"last-year",label:(0,yn.__)("Last year"),getValue:()=>{let e=(0,Vi.getDate)(null);return[TI(e,1),e]}},{id:"year-to-date",label:(0,yn.__)("Year to date"),getValue:()=>{let e=(0,Vi.getDate)(null);return[wI(e),e]}}],Yp=e=>{if(!e)return null;let t=(0,Vi.getDate)(e);return t&&Tf(t)?t:null},Xj=e=>e?typeof e=="string"?e:Lj(e,"yyyy-MM-dd"):"";function iae({field:e,validity:t,inputRefs:r,isTouched:o,setIsTouched:n,children:i}){let{isValid:s}=e,[l,c]=(0,vr.useState)(void 0),u=(0,vr.useCallback)(()=>{let f=Array.isArray(r)?r:[r];for(let m of f){let h=m.current;if(h&&!h.validity.valid){c({type:"invalid",message:h.validationMessage});return}}c(void 0)},[r]);return(0,vr.useEffect)(()=>{let f=Array.isArray(r)?r:[r],m=t?Er(s,t):void 0;for(let h of f){let g=h.current;g&&g.setCustomValidity(m?.type==="invalid"&&m.message?m.message:"")}},[r,s,t]),(0,vr.useEffect)(()=>{let f=Array.isArray(r)?r:[r],m=h=>{h.preventDefault(),n(!0)};for(let h of f)h.current?.addEventListener("invalid",m);return()=>{for(let h of f)h.current?.removeEventListener("invalid",m)}},[r,n]),(0,vr.useEffect)(()=>{if(!o)return;let f=t?Er(s,t):void 0;f?c(f):u()},[o,s,t,u]),(0,Pr.jsxs)("div",{onBlur:f=>{o||(!f.relatedTarget||!f.currentTarget.contains(f.relatedTarget))&&n(!0)},children:[i,(0,Pr.jsx)("div",{"aria-live":"polite",children:l&&(0,Pr.jsxs)("p",{className:Q("components-validated-control__indicator",l.type==="invalid"?"is-invalid":void 0),children:[(0,Pr.jsx)(ji.Icon,{className:"components-validated-control__indicator-icon",icon:qd,size:16,fill:"currentColor"}),l.message]})})]})}function iVe({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i}){let{id:s,label:l,description:c,setValue:u,getValue:d,isValid:f,format:m}=t,h=t.isDisabled({item:e,field:t}),[g,v]=(0,vr.useState)(null),b=m.weekStartsOn??(0,Vi.getSettings)().l10n.startOfWeek,S=d({item:e}),y=typeof S=="string"?S:void 0,[w,_]=(0,vr.useState)(()=>Yp(y)||new Date),[x,E]=(0,vr.useState)(!1),O=(0,vr.useRef)(null),{minConstraint:A,maxConstraint:C,disabledMatchers:I}=hC(f,Yp),k=(0,vr.useCallback)(B=>r(u({item:e,value:B})),[e,r,u]),P=(0,vr.useCallback)(B=>{let L=B?Lj(B,"yyyy-MM-dd"):void 0;k(L),v(null),E(!0)},[k]),N=(0,vr.useCallback)(B=>{let L=B.getValue(),M=Xj(L);_(L),k(M),v(B.id),E(!0)},[k]),U=(0,vr.useCallback)(B=>{if(k(B),B){let L=Yp(B);L&&_(L)}v(null),E(!0)},[k]),{timezone:{string:F}}=(0,Vi.getSettings)(),D=l;return f?.required&&!n?D=`${l} (${(0,yn.__)("Required")})`:!f?.required&&n&&(D=`${l} (${(0,yn.__)("Optional")})`),(0,Pr.jsx)(iae,{field:t,validity:i,inputRefs:O,isTouched:x,setIsTouched:E,children:(0,Pr.jsx)(ji.BaseControl,{id:s,className:"dataviews-controls__date",label:D,help:c,hideLabelFromVision:o,children:(0,Pr.jsxs)(ne,{direction:"column",gap:"lg",children:[(0,Pr.jsxs)(ne,{direction:"row",gap:"sm",wrap:"wrap",justify:"flex-start",children:[oVe.map(B=>{let L=g===B.id;return(0,Pr.jsx)(ji.Button,{className:"dataviews-controls__date-preset",variant:"tertiary",isPressed:L,size:"small",disabled:h,accessibleWhenDisabled:!0,onClick:()=>N(B),children:B.label},B.id)}),(0,Pr.jsx)(ji.Button,{className:"dataviews-controls__date-preset",variant:"tertiary",isPressed:!g,size:"small",disabled:!!g||h,accessibleWhenDisabled:!0,children:(0,yn.__)("Custom")})]}),(0,Pr.jsx)(ji.__experimentalInputControl,{__next40pxDefaultSize:!0,ref:O,type:"date",label:(0,yn.__)("Date"),hideLabelFromVision:!0,value:y,onChange:U,required:!!t.isValid?.required,disabled:h,min:A,max:C}),(0,Pr.jsx)(tVe,{style:{width:"100%"},selected:y&&Yp(y)||void 0,onSelect:P,month:w,onMonthChange:_,timeZone:F||void 0,weekStartsOn:b,disabled:h||I,disableNavigation:h})]})})})}function sVe({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i}){let{id:s,label:l,description:c,getValue:u,setValue:d,isValid:f,format:m}=t,h=t.isDisabled({item:e,field:t}),g,v=u({item:e});Array.isArray(v)&&v.length===2&&v.every(z=>typeof z=="string")&&(g=v);let b=m.weekStartsOn??(0,Vi.getSettings)().l10n.startOfWeek,{minConstraint:S,maxConstraint:y,disabledMatchers:w}=hC(f,Yp),_=(0,vr.useCallback)(z=>{r(d({item:e,value:z}))},[e,r,d]),[x,E]=(0,vr.useState)(null),O=(0,vr.useMemo)(()=>{if(!g)return{from:void 0,to:void 0};let[z,K]=g;return{from:Yp(z)||void 0,to:Yp(K)||void 0}},[g]),[A,C]=(0,vr.useState)(()=>O.from||new Date),[I,k]=(0,vr.useState)(!1),P=(0,vr.useRef)(null),N=(0,vr.useRef)(null),U=(0,vr.useCallback)((z,K)=>{z&&K?_([Xj(z),Xj(K)]):!z&&!K&&_(void 0)},[_]),F=(0,vr.useCallback)(z=>{U(z?.from,z?.to),E(null),k(!0)},[U]),D=(0,vr.useCallback)(z=>{let[K,Z]=z.getValue();C(K),U(K,Z),E(z.id),k(!0)},[U]),B=(0,vr.useCallback)((z,K)=>{let[Z,q]=g||[void 0,void 0];if(U(z==="from"?K:Z,z==="to"?K:q),K){let $=Yp(K);$&&C($)}E(null),k(!0)},[g,U]),{timezone:L}=(0,Vi.getSettings)(),M=l;return t.isValid?.required&&!n?M=`${l} (${(0,yn.__)("Required")})`:!t.isValid?.required&&n&&(M=`${l} (${(0,yn.__)("Optional")})`),(0,Pr.jsx)(iae,{field:t,validity:i,inputRefs:[P,N],isTouched:I,setIsTouched:k,children:(0,Pr.jsx)(ji.BaseControl,{id:s,className:"dataviews-controls__date",label:M,help:c,hideLabelFromVision:o,children:(0,Pr.jsxs)(ne,{direction:"column",gap:"lg",children:[(0,Pr.jsxs)(ne,{direction:"row",gap:"sm",wrap:"wrap",justify:"flex-start",children:[nVe.map(z=>{let K=x===z.id;return(0,Pr.jsx)(ji.Button,{className:"dataviews-controls__date-preset",variant:"tertiary",isPressed:K,size:"small",disabled:h,accessibleWhenDisabled:!0,onClick:()=>D(z),children:z.label},z.id)}),(0,Pr.jsx)(ji.Button,{className:"dataviews-controls__date-preset",variant:"tertiary",isPressed:!x,size:"small",accessibleWhenDisabled:!0,disabled:!!x||h,children:(0,yn.__)("Custom")})]}),(0,Pr.jsxs)(ne,{direction:"row",gap:"sm",justify:"space-between",className:"dataviews-controls__date-range-inputs",children:[(0,Pr.jsx)(ji.__experimentalInputControl,{__next40pxDefaultSize:!0,ref:P,type:"date",label:(0,yn.__)("From"),hideLabelFromVision:!0,value:g?.[0],onChange:z=>B("from",z),required:!!t.isValid?.required,disabled:h,min:S,max:y}),(0,Pr.jsx)(ji.__experimentalInputControl,{__next40pxDefaultSize:!0,ref:N,type:"date",label:(0,yn.__)("To"),hideLabelFromVision:!0,value:g?.[1],onChange:z=>B("to",z),required:!!t.isValid?.required,disabled:h,min:S,max:y})]}),(0,Pr.jsx)(rVe,{style:{width:"100%"},selected:O,onSelect:F,month:A,onMonthChange:C,timeZone:L.string||void 0,weekStartsOn:b,disabled:h||w})]})})})}function sae({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,operator:i,validity:s}){return i===gs||i===ta?(0,Pr.jsx)(MI,{className:"dataviews-controls__date",data:e,field:t,onChange:r,hideLabelFromVision:o,operator:i}):i===hs?(0,Pr.jsx)(sVe,{data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:s}):(0,Pr.jsx)(iVe,{data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:s})}var LI=a(W(),1),aae=a(H(),1);var Qj=a(T(),1),{ValidatedSelectControl:aVe}=Ct(LI.privateApis);function BI({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i}){let{type:s,label:l,description:c,getValue:u,setValue:d,isValid:f}=t,m=t.isDisabled({item:e,field:t}),h=s==="array",g=u({item:e})??(h?[]:""),v=(0,aae.useCallback)(y=>r(d({item:e,value:y})),[e,r,d]),{elements:b,isLoading:S}=jn({elements:t.elements,getElements:t.getElements});return S?(0,Qj.jsx)(LI.Spinner,{}):(0,Qj.jsx)(aVe,{required:!!t.isValid?.required,markWhenOptional:n,customValidity:Er(f,i),label:l,value:g,help:c,options:b,onChange:v,__next40pxDefaultSize:!0,hideLabelFromVision:o,multiple:h,disabled:m})}var Jj=a(T(),1),lVe=10;function lae(e){let{field:t}=e,{elements:r}=jn({elements:t.elements,getElements:t.getElements});return r.length>=lVe?(0,Jj.jsx)(NI,{...e}):(0,Jj.jsx)(BI,{...e})}var jI=a(W(),1);var cae=a(W(),1),uae=a(H(),1);var dae=a(T(),1),{ValidatedInputControl:cVe}=Ct(cae.privateApis);function Yu({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,type:i,prefix:s,suffix:l,validity:c}){let{label:u,placeholder:d,description:f,getValue:m,setValue:h,isValid:g}=t,v=m({item:e}),b=t.isDisabled({item:e,field:t}),S=(0,uae.useCallback)(y=>r(h({item:e,value:y})),[e,h,r]);return(0,dae.jsx)(cVe,{required:!!g.required,markWhenOptional:n,customValidity:Er(g,c),label:u,placeholder:d,value:v??"",help:f,onChange:S,hideLabelFromVision:o,type:i,prefix:s,suffix:l,disabled:b,pattern:g.pattern?g.pattern.constraint:void 0,minLength:g.minLength?g.minLength.constraint:void 0,maxLength:g.maxLength?g.maxLength.constraint:void 0,__next40pxDefaultSize:!0})}var VI=a(T(),1);function fae({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i}){return(0,VI.jsx)(Yu,{data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i,type:"email",prefix:(0,VI.jsx)(jI.__experimentalInputControlPrefixWrapper,{variant:"icon",children:(0,VI.jsx)(jI.Icon,{icon:G4})})})}var HI=a(W(),1);var zI=a(T(),1);function mae({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i}){return(0,zI.jsx)(Yu,{data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i,type:"tel",prefix:(0,zI.jsx)(HI.__experimentalInputControlPrefixWrapper,{variant:"icon",children:(0,zI.jsx)(HI.Icon,{icon:Lm})})})}var WI=a(W(),1);var UI=a(T(),1);function pae({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i}){return(0,UI.jsx)(Yu,{data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i,type:"url",prefix:(0,UI.jsx)(WI.__experimentalInputControlPrefixWrapper,{variant:"icon",children:(0,UI.jsx)(WI.Icon,{icon:pL})})})}var Af=a(W(),1),vC=a(H(),1),GI=a(V(),1);var qp=a(T(),1),{ValidatedNumberControl:uVe}=Ct(Af.privateApis);function hae(e){if(e===""||e===void 0)return"";let t=Number(e);return Number.isFinite(t)?t:""}function dVe({value:e,onChange:t,hideLabelFromVision:r,step:o}){let[n="",i=""]=e,s=(0,vC.useCallback)(c=>t([hae(c),i]),[t,i]),l=(0,vC.useCallback)(c=>t([n,hae(c)]),[t,n]);return(0,qp.jsx)(Af.BaseControl,{help:(0,GI.__)("The max. value must be greater than the min. value."),children:(0,qp.jsxs)(Af.Flex,{direction:"row",gap:4,children:[(0,qp.jsx)(Af.__experimentalNumberControl,{label:(0,GI.__)("Min."),value:n,max:i?Number(i)-o:void 0,onChange:s,__next40pxDefaultSize:!0,hideLabelFromVision:r,step:o}),(0,qp.jsx)(Af.__experimentalNumberControl,{label:(0,GI.__)("Max."),value:i,min:n?Number(n)+o:void 0,onChange:l,__next40pxDefaultSize:!0,hideLabelFromVision:r,step:o})]})})}function YI({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,operator:i,validity:s}){let l=t.format?.decimals??0,c=Math.pow(10,Math.abs(l)*-1),{label:u,description:d,getValue:f,setValue:m,isValid:h}=t,g=f({item:e})??"",v=t.isDisabled({item:e,field:t}),b=(0,vC.useCallback)(y=>{r(m({item:e,value:["",void 0].includes(y)?void 0:Number(y)}))},[e,r,m]),S=(0,vC.useCallback)(y=>{r(m({item:e,value:y}))},[e,r,m]);if(i===hs){let y=["",""];return Array.isArray(g)&&g.length===2&&g.every(w=>typeof w=="number"||w==="")&&(y=g),(0,qp.jsx)(dVe,{value:y,onChange:S,hideLabelFromVision:o,step:c})}return(0,qp.jsx)(uVe,{required:!!h.required,markWhenOptional:n,customValidity:Er(h,s),label:u,help:d,value:g,onChange:b,__next40pxDefaultSize:!0,hideLabelFromVision:o,step:c,min:h.min?h.min.constraint:void 0,max:h.max?h.max.constraint:void 0,disabled:v})}var gae=a(T(),1);function vae(e){return(0,gae.jsx)(YI,{...e})}var bae=a(T(),1);function yae(e){return(0,bae.jsx)(YI,{...e})}var qI=a(W(),1),wae=a(H(),1);var $j=a(T(),1),{ValidatedRadioControl:fVe}=Ct(qI.privateApis);function Sae({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i}){let{label:s,description:l,getValue:c,setValue:u,isValid:d}=t,f=t.isDisabled({item:e,field:t}),{elements:m,isLoading:h}=jn({elements:t.elements,getElements:t.getElements}),g=c({item:e}),v=(0,wae.useCallback)(b=>r(u({item:e,value:b})),[e,r,u]);return h?(0,$j.jsx)(qI.Spinner,{}):(0,$j.jsx)(fVe,{required:!!t.isValid?.required,markWhenOptional:n,customValidity:Er(d,i),label:s,help:l,onChange:v,options:m,selected:g,hideLabelFromVision:o,disabled:f})}var ez=a(H(),1);var _ae=a(T(),1);function xae({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,config:i,validity:s}){let{prefix:l,suffix:c}=i||{};return(0,_ae.jsx)(Yu,{data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:s,prefix:l?(0,ez.createElement)(l):void 0,suffix:c?(0,ez.createElement)(c):void 0})}var Cae=a(W(),1),Tae=a(H(),1);var Eae=a(T(),1),{ValidatedToggleControl:mVe}=Ct(Cae.privateApis);function Pae({field:e,onChange:t,data:r,hideLabelFromVision:o,markWhenOptional:n,validity:i}){let{label:s,description:l,getValue:c,setValue:u,isValid:d}=e,f=e.isDisabled({item:r,field:e}),m=(0,Tae.useCallback)(()=>{t(u({item:r,value:!c({item:r})}))},[t,u,r,c]);return(0,Eae.jsx)(mVe,{required:!!d.required,markWhenOptional:n,customValidity:Er(d,i),hidden:o,label:s,help:l,checked:c({item:r}),onChange:m,disabled:f})}var kae=a(W(),1),Rae=a(H(),1);var Aae=a(T(),1),{ValidatedTextareaControl:pVe}=Ct(kae.privateApis);function Iae({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,config:i,validity:s}){let{rows:l=4}=i||{},c=t.isDisabled({item:e,field:t}),{label:u,placeholder:d,description:f,setValue:m,isValid:h}=t,g=t.getValue({item:e}),v=(0,Rae.useCallback)(b=>r(m({item:e,value:b})),[e,r,m]);return(0,Aae.jsx)(pVe,{required:!!h.required,markWhenOptional:n,customValidity:Er(h,s),label:u,placeholder:d,value:g??"",help:f,onChange:v,rows:l,disabled:c,minLength:h.minLength?h.minLength.constraint:void 0,maxLength:h.maxLength?h.maxLength.constraint:void 0,__next40pxDefaultSize:!0,hideLabelFromVision:o})}var $0=a(W(),1),Oae=a(H(),1);var KI=a(T(),1),{ValidatedToggleGroupControl:hVe}=Ct($0.privateApis);function Nae({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i}){let{getValue:s,setValue:l,isValid:c}=t,u=t.isDisabled({item:e,field:t}),d=s({item:e}),f=(0,Oae.useCallback)(v=>r(l({item:e,value:v})),[e,r,l]),{elements:m,isLoading:h}=jn({elements:t.elements,getElements:t.getElements});if(h)return(0,KI.jsx)($0.Spinner,{});if(m.length===0)return null;let g=m.find(v=>v.value===d);return(0,KI.jsx)(hVe,{required:!!t.isValid?.required,markWhenOptional:n,customValidity:Er(c,i),__next40pxDefaultSize:!0,isBlock:!0,label:t.label,help:g?.description||t.description,onChange:f,value:d,hideLabelFromVision:o,children:m.map(v=>(0,KI.jsx)($0.__experimentalToggleGroupControlOption,{label:v.label,value:v.value,disabled:u},v.value))})}var ZI=a(W(),1),XI=a(H(),1);var bC=a(T(),1),{ValidatedFormTokenField:gVe}=Ct(ZI.privateApis);function Mae({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i}){let{label:s,placeholder:l,description:c,getValue:u,setValue:d,isValid:f}=t,m=u({item:e}),h=t.isDisabled({item:e,field:t}),{elements:g,isLoading:v}=jn({elements:t.elements,getElements:t.getElements}),b=(0,XI.useMemo)(()=>Array.isArray(m)?m.map(y=>g?.find(_=>_.value===y)||{value:y,label:y}):[],[m,g]),S=(0,XI.useCallback)(y=>{let w=y.map(_=>typeof _=="object"&&"value"in _?_.value:_);r(d({item:e,value:w}))},[r,d,e]);return v?(0,bC.jsx)(ZI.Spinner,{}):(0,bC.jsx)(gVe,{required:!!f?.required,markWhenOptional:n,customValidity:Er(f,i),label:o?void 0:s,value:b,onChange:S,placeholder:l,suggestions:g?.map(y=>y.value),disabled:h,__experimentalValidateInput:y=>t.isValid?.elements&&g?g.some(w=>w.value===y||w.label===y):!0,__experimentalExpandOnFocus:g&&g.length>0,help:c??(t.isValid?.elements?"":void 0),displayTransform:y=>typeof y=="object"&&"label"in y?y.label:typeof y=="string"&&g&&g.find(_=>_.value===y)?.label||y,__experimentalRenderItem:({item:y})=>{if(typeof y=="string"&&g){let w=g.find(_=>_.value===y);return(0,bC.jsx)("span",{children:w?.label||y})}return(0,bC.jsx)("span",{children:y})}})}var vVe={grad:.9,turn:360,rad:360/(2*Math.PI)},If=function(e){return typeof e=="string"?e.length>0:typeof e=="number"},zn=function(e,t,r){return t===void 0&&(t=0),r===void 0&&(r=Math.pow(10,t)),Math.round(r*e)/r+0},Rl=function(e,t,r){return t===void 0&&(t=0),r===void 0&&(r=1),e>r?r:e>t?e:t},Hae=function(e){return(e=isFinite(e)?e%360:0)>0?e:e+360},Fae=function(e){return{r:Rl(e.r,0,255),g:Rl(e.g,0,255),b:Rl(e.b,0,255),a:Rl(e.a)}},tz=function(e){return{r:zn(e.r),g:zn(e.g),b:zn(e.b),a:zn(e.a,3)}},bVe=/^#([0-9a-f]{3,8})$/i,QI=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},Uae=function(e){var t=e.r,r=e.g,o=e.b,n=e.a,i=Math.max(t,r,o),s=i-Math.min(t,r,o),l=s?i===t?(r-o)/s:i===r?2+(o-t)/s:4+(t-r)/s:0;return{h:60*(l<0?l+6:l),s:i?s/i*100:0,v:i/255*100,a:n}},Wae=function(e){var t=e.h,r=e.s,o=e.v,n=e.a;t=t/360*6,r/=100,o/=100;var i=Math.floor(t),s=o*(1-r),l=o*(1-(t-i)*r),c=o*(1-(1-t+i)*r),u=i%6;return{r:255*[o,l,s,s,c,o][u],g:255*[c,o,o,l,s,s][u],b:255*[s,s,c,o,o,l][u],a:n}},Dae=function(e){return{h:Hae(e.h),s:Rl(e.s,0,100),l:Rl(e.l,0,100),a:Rl(e.a)}},Lae=function(e){return{h:zn(e.h),s:zn(e.s),l:zn(e.l),a:zn(e.a,3)}},Bae=function(e){return Wae((r=(t=e).s,{h:t.h,s:(r*=((o=t.l)<50?o:100-o)/100)>0?2*r/(o+r)*100:0,v:o+r,a:t.a}));var t,r,o},yC=function(e){return{h:(t=Uae(e)).h,s:(n=(200-(r=t.s))*(o=t.v)/100)>0&&n<200?r*o/100/(n<=100?n:200-n)*100:0,l:n/2,a:t.a};var t,r,o,n},yVe=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,wVe=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,SVe=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,_Ve=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,nz={string:[[function(e){var t=bVe.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:e.length===4?zn(parseInt(e[3]+e[3],16)/255,2):1}:e.length===6||e.length===8?{r:parseInt(e.substr(0,2),16),g:parseInt(e.substr(2,2),16),b:parseInt(e.substr(4,2),16),a:e.length===8?zn(parseInt(e.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(e){var t=SVe.exec(e)||_Ve.exec(e);return t?t[2]!==t[4]||t[4]!==t[6]?null:Fae({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:t[7]===void 0?1:Number(t[7])/(t[8]?100:1)}):null},"rgb"],[function(e){var t=yVe.exec(e)||wVe.exec(e);if(!t)return null;var r,o,n=Dae({h:(r=t[1],o=t[2],o===void 0&&(o="deg"),Number(r)*(vVe[o]||1)),s:Number(t[3]),l:Number(t[4]),a:t[5]===void 0?1:Number(t[5])/(t[6]?100:1)});return Bae(n)},"hsl"]],object:[[function(e){var t=e.r,r=e.g,o=e.b,n=e.a,i=n===void 0?1:n;return If(t)&&If(r)&&If(o)?Fae({r:Number(t),g:Number(r),b:Number(o),a:Number(i)}):null},"rgb"],[function(e){var t=e.h,r=e.s,o=e.l,n=e.a,i=n===void 0?1:n;if(!If(t)||!If(r)||!If(o))return null;var s=Dae({h:Number(t),s:Number(r),l:Number(o),a:Number(i)});return Bae(s)},"hsl"],[function(e){var t=e.h,r=e.s,o=e.v,n=e.a,i=n===void 0?1:n;if(!If(t)||!If(r)||!If(o))return null;var s=(function(l){return{h:Hae(l.h),s:Rl(l.s,0,100),v:Rl(l.v,0,100),a:Rl(l.a)}})({h:Number(t),s:Number(r),v:Number(o),a:Number(i)});return Wae(s)},"hsv"]]},Vae=function(e,t){for(var r=0;r<t.length;r++){var o=t[r][0](e);if(o)return[o,t[r][1]]}return[null,void 0]},xVe=function(e){return typeof e=="string"?Vae(e.trim(),nz.string):typeof e=="object"&&e!==null?Vae(e,nz.object):[null,void 0]};var rz=function(e,t){var r=yC(e);return{h:r.h,s:Rl(r.s+100*t,0,100),l:r.l,a:r.a}},oz=function(e){return(299*e.r+587*e.g+114*e.b)/1e3/255},jae=function(e,t){var r=yC(e);return{h:r.h,s:r.s,l:Rl(r.l+100*t,0,100),a:r.a}},iz=(function(){function e(t){this.parsed=xVe(t)[0],this.rgba=this.parsed||{r:0,g:0,b:0,a:1}}return e.prototype.isValid=function(){return this.parsed!==null},e.prototype.brightness=function(){return zn(oz(this.rgba),2)},e.prototype.isDark=function(){return oz(this.rgba)<.5},e.prototype.isLight=function(){return oz(this.rgba)>=.5},e.prototype.toHex=function(){return t=tz(this.rgba),r=t.r,o=t.g,n=t.b,s=(i=t.a)<1?QI(zn(255*i)):"","#"+QI(r)+QI(o)+QI(n)+s;var t,r,o,n,i,s},e.prototype.toRgb=function(){return tz(this.rgba)},e.prototype.toRgbString=function(){return t=tz(this.rgba),r=t.r,o=t.g,n=t.b,(i=t.a)<1?"rgba("+r+", "+o+", "+n+", "+i+")":"rgb("+r+", "+o+", "+n+")";var t,r,o,n,i},e.prototype.toHsl=function(){return Lae(yC(this.rgba))},e.prototype.toHslString=function(){return t=Lae(yC(this.rgba)),r=t.h,o=t.s,n=t.l,(i=t.a)<1?"hsla("+r+", "+o+"%, "+n+"%, "+i+")":"hsl("+r+", "+o+"%, "+n+"%)";var t,r,o,n,i},e.prototype.toHsv=function(){return t=Uae(this.rgba),{h:zn(t.h),s:zn(t.s),v:zn(t.v),a:zn(t.a,3)};var t},e.prototype.invert=function(){return Io({r:255-(t=this.rgba).r,g:255-t.g,b:255-t.b,a:t.a});var t},e.prototype.saturate=function(t){return t===void 0&&(t=.1),Io(rz(this.rgba,t))},e.prototype.desaturate=function(t){return t===void 0&&(t=.1),Io(rz(this.rgba,-t))},e.prototype.grayscale=function(){return Io(rz(this.rgba,-1))},e.prototype.lighten=function(t){return t===void 0&&(t=.1),Io(jae(this.rgba,t))},e.prototype.darken=function(t){return t===void 0&&(t=.1),Io(jae(this.rgba,-t))},e.prototype.rotate=function(t){return t===void 0&&(t=15),this.hue(this.hue()+t)},e.prototype.alpha=function(t){return typeof t=="number"?Io({r:(r=this.rgba).r,g:r.g,b:r.b,a:t}):zn(this.rgba.a,3);var r},e.prototype.hue=function(t){var r=yC(this.rgba);return typeof t=="number"?Io({h:t,s:r.s,l:r.l,a:r.a}):zn(r.h)},e.prototype.isEqual=function(t){return this.toHex()===Io(t).toHex()},e})(),Io=function(e){return e instanceof iz?e:new iz(e)},zae=[],JI=function(e){e.forEach(function(t){zae.indexOf(t)<0&&(t(iz,nz),zae.push(t))})};var aa=a(W(),1),sz=a(H(),1),Gae=a(V(),1);var Of=a(T(),1),{ValidatedInputControl:CVe}=Ct(aa.privateApis),TVe=({color:e,onColorChange:t,disabled:r})=>{let o=e&&Io(e).isValid()?e:"#ffffff";return(0,Of.jsx)(aa.Dropdown,{className:"dataviews-controls__color-picker-dropdown",popoverProps:{resize:!1},renderToggle:({onToggle:n})=>(0,Of.jsx)(aa.Button,{onClick:n,"aria-label":(0,Gae.__)("Open color picker"),size:"small",disabled:r,accessibleWhenDisabled:!0,icon:()=>(0,Of.jsx)(aa.ColorIndicator,{colorValue:o})}),renderContent:()=>(0,Of.jsx)(aa.__experimentalDropdownContentWrapper,{paddingSize:"none",children:(0,Of.jsx)(aa.ColorPicker,{color:o,onChange:t,enableAlpha:!0})})})};function Yae({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i}){let{label:s,placeholder:l,description:c,setValue:u,isValid:d}=t,f=t.isDisabled({item:e,field:t}),m=t.getValue({item:e})||"",h=(0,sz.useCallback)(v=>{r(u({item:e,value:v}))},[e,r,u]),g=(0,sz.useCallback)(v=>{r(u({item:e,value:v||""}))},[e,r,u]);return(0,Of.jsx)(CVe,{required:!!t.isValid?.required,markWhenOptional:n,customValidity:Er(d,i),label:s,placeholder:l,value:m,help:c,onChange:g,hideLabelFromVision:o,type:"text",disabled:f,prefix:(0,Of.jsx)(aa.__experimentalInputControlPrefixWrapper,{variant:"control",children:(0,Of.jsx)(TVe,{color:m,onColorChange:h,disabled:f})})})}var eO=a(W(),1),tO=a(H(),1),az=a(V(),1);var $I=a(T(),1);function qae({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i}){let[s,l]=(0,tO.useState)(!1),c=t.isDisabled({item:e,field:t}),u=(0,tO.useCallback)(()=>{l(d=>!d)},[]);return(0,$I.jsx)(Yu,{data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i,type:s?"text":"password",suffix:(0,$I.jsx)(eO.__experimentalInputControlSuffixWrapper,{variant:"control",children:(0,$I.jsx)(eO.Button,{icon:s?_x:Tg,onClick:u,size:"small",label:s?(0,az.__)("Hide password"):(0,az.__)("Show password"),disabled:c,accessibleWhenDisabled:!0})})})}function rO(e){return Array.isArray(e.elements)&&e.elements.length>0||typeof e.getElements=="function"}var Zae=a(T(),1),Kae={adaptiveSelect:lae,array:Mae,checkbox:eae,color:Yae,combobox:NI,datetime:nae,date:sae,email:fae,telephone:mae,url:pae,integer:vae,number:yae,password:qae,radio:Sae,select:BI,text:xae,toggle:Pae,textarea:Iae,toggleGroup:Nae};function EVe(e){return e&&typeof e=="object"&&typeof e.control=="string"}function PVe(e){let{control:t,...r}=e,o=oO(t);return o===null?null:function(i){return(0,Zae.jsx)(o,{...i,config:r})}}function Xae(e,t){return typeof e.Edit=="function"?e.Edit:typeof e.Edit=="string"?oO(e.Edit):EVe(e.Edit)?PVe(e.Edit):rO(e)&&e.type!=="array"?oO("adaptiveSelect"):t===null?null:oO(t)}function oO(e){return Object.keys(Kae).includes(e)?Kae[e]:null}function kVe(e,t,r){if(e.filterBy===!1)return!1;let o=e.filterBy?.operators?.filter(n=>r.includes(n))??t;return o.length===0?!1:{isPrimary:!!e.filterBy?.isPrimary,operators:o}}var Qae=kVe;var RVe=e=>({item:t})=>{let r=e.split("."),o=t;for(let n of r)o.hasOwnProperty(n)?o=o[n]:o=void 0;return o},Jae=RVe;var AVe=e=>({value:t})=>{let r=e.split("."),o={},n=o;for(let i of r.slice(0,-1))n[i]={},n=n[i];return n[r.at(-1)]=t,o},$ae=AVe;var tle=a(V(),1);function nO({item:e,field:t}){let{elements:r,isLoading:o}=jn({elements:t.elements,getElements:t.getElements}),n=t.getValue({item:e});return o||r.length===0?n:r?.find(i=>i.value===n)?.label||t.getValue({item:e})}var ele=a(T(),1);function Oo({item:e,field:t}){return t.hasElements?(0,ele.jsx)(nO,{item:e,field:t}):t.getValueFormatted({item:e,field:t})}var qu=(e,t,r)=>r==="asc"?e.localeCompare(t):t.localeCompare(e);function No(e,t){let r=t.getValue({item:e});return![void 0,"",null].includes(r)}function Ku(e,t){if(typeof t.isValid.minLength?.constraint!="number")return!1;let r=t.getValue({item:e});return[void 0,"",null].includes(r)?!0:String(r).length>=t.isValid.minLength.constraint}function Zu(e,t){if(typeof t.isValid.maxLength?.constraint!="number")return!1;let r=t.getValue({item:e});return[void 0,"",null].includes(r)?!0:String(r).length<=t.isValid.maxLength.constraint}function Xu(e,t){if(t.isValid.pattern?.constraint===void 0)return!0;try{let r=new RegExp(t.isValid.pattern.constraint),o=t.getValue({item:e});return[void 0,"",null].includes(o)?!0:r.test(String(o))}catch{return!1}}function Fr(e,t){let o=(t.elements??[]).map(i=>i.value);if(o.length===0)return!0;let n=t.getValue({item:e});return[].concat(n).every(i=>o.includes(i))}function IVe({item:e,field:t}){return t.getValue({item:e})}var ws=IVe;var OVe=/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;function NVe(e,t){let r=t.getValue({item:e});return![void 0,"",null].includes(r)&&!OVe.test(r)?(0,tle.__)("Value must be a valid email address."):null}var rle={type:"email",render:Oo,Edit:"email",sort:qu,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[Qr,Jr],validOperators:[po,ho,Au,Iu,Ou,Qr,Jr,Ni,Ln],format:{},getValueFormatted:ws,validate:{required:No,pattern:Xu,minLength:Ku,maxLength:Zu,elements:Fr,custom:NVe}};var ole=a(V(),1);var ew=(e,t,r)=>r==="asc"?e-t:t-e;function iO(e,t){if(typeof t.isValid.min?.constraint!="number")return!1;let r=t.getValue({item:e});return[void 0,"",null].includes(r)?!0:Number(r)>=t.isValid.min.constraint}function sO(e,t){if(typeof t.isValid.max?.constraint!="number")return!1;let r=t.getValue({item:e});return[void 0,"",null].includes(r)?!0:Number(r)<=t.isValid.max.constraint}var nle={separatorThousand:","};function MVe({item:e,field:t}){let r=t.getValue({item:e});if(r==null)return"";if(r=Number(r),!Number.isFinite(r))return String(r);let o;t.type!=="integer"?o=nle:o=t.format;let{separatorThousand:n}=o,i=Math.trunc(r);return n?String(i).replace(/\B(?=(\d{3})+(?!\d))/g,n):String(i)}function FVe(e,t){let r=t.getValue({item:e});return![void 0,"",null].includes(r)&&!Number.isInteger(r)?(0,ole.__)("Value must be an integer."):null}var ile={type:"integer",render:Oo,Edit:"integer",sort:ew,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[po,ho,wp,Sp,_p,xp,hs],validOperators:[po,ho,wp,Sp,_p,xp,hs,Qr,Jr,Ni,Ln],format:nle,getValueFormatted:MVe,validate:{required:No,min:iO,max:sO,elements:Fr,custom:FVe}};var sle=a(V(),1);var ale={separatorThousand:",",separatorDecimal:".",decimals:2};function DVe({item:e,field:t}){let r=t.getValue({item:e});if(r==null)return"";if(r=Number(r),!Number.isFinite(r))return String(r);let o;t.type!=="number"?o=ale:o=t.format;let{separatorThousand:n,separatorDecimal:i,decimals:s}=o,l=r.toFixed(s),[c,u]=l.split("."),d=n?c.replace(/\B(?=(\d{3})+(?!\d))/g,n):c;return s===0?d:d+i+u}function LVe(e){return e===""||e===void 0||e===null}function BVe(e,t){let r=t.getValue({item:e});return!LVe(r)&&!Number.isFinite(r)?(0,sle.__)("Value must be a number."):null}var lle={type:"number",render:Oo,Edit:"number",sort:ew,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[po,ho,wp,Sp,_p,xp,hs],validOperators:[po,ho,wp,Sp,_p,xp,hs,Qr,Jr,Ni,Ln],format:ale,getValueFormatted:DVe,validate:{required:No,min:iO,max:sO,elements:Fr,custom:BVe}};var cle={type:"text",render:Oo,Edit:"text",sort:qu,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[Qr,Jr],validOperators:[po,ho,Au,Iu,Ou,Qr,Jr,Ni,Ln],format:{},getValueFormatted:ws,validate:{required:No,pattern:Xu,minLength:Ku,maxLength:Zu,elements:Fr}};var Iv=a(en(),1);var dle=a(en(),1);function ule(e){if(!e||!Tf(new Date(e)))return null;let t=(0,dle.getDate)(e);return t&&Tf(t)?t:null}function fle(e,t,r){let o=t.isValid[r]?.constraint;if(typeof o!="string")return!1;let n=t.getValue({item:e}),i=Array.isArray(n)?n[r==="min"?0:n.length-1]:n;if(i==null||i==="")return!0;let s=ule(o),l=ule(String(i));return!!s&&!!l&&(r==="min"?l.getTime()>=s.getTime():l.getTime()<=s.getTime())}function aO(e,t){return fle(e,t,"min")}function lO(e,t){return fle(e,t,"max")}var mle={datetime:(0,Iv.getSettings)().formats.datetime,weekStartsOn:(0,Iv.getSettings)().l10n.startOfWeek};function VVe({item:e,field:t}){let r=t.getValue({item:e});if(["",void 0,null].includes(r))return"";let o;return t.type!=="datetime"?o=mle:o=t.format,(0,Iv.dateI18n)(o.datetime,(0,Iv.getDate)(r))}var jVe=(e,t,r)=>{let o=new Date(e).getTime(),n=new Date(t).getTime();return r==="asc"?o-n:n-o},ple={type:"datetime",render:Oo,Edit:"datetime",sort:jVe,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[kp,Rp,Cp,Tp,Ep,Pp,gs,ta],validOperators:[kp,Rp,Cp,Tp,Ep,Pp,gs,ta],format:mle,getValueFormatted:VVe,validate:{required:No,elements:Fr,min:aO,max:lO}};var Ov=a(en(),1);var hle={date:(0,Ov.getSettings)().formats.date,weekStartsOn:(0,Ov.getSettings)().l10n.startOfWeek};function zVe({item:e,field:t}){let r=t.getValue({item:e});if(["",void 0,null].includes(r))return"";let o;return t.type!=="date"?o=hle:o=t.format,(0,Ov.dateI18n)(o.date,(0,Ov.getDate)(r))}var HVe=(e,t,r)=>{let o=new Date(e).getTime(),n=new Date(t).getTime();return r==="asc"?o-n:n-o},gle={type:"date",render:Oo,Edit:"date",sort:HVe,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[kp,Rp,Cp,Tp,Ep,Pp,gs,ta,hs],validOperators:[kp,Rp,Cp,Tp,Ep,Pp,gs,ta,hs],format:hle,getValueFormatted:zVe,validate:{required:No,elements:Fr,min:aO,max:lO}};var cO=a(V(),1);function vle(e,t){return t.getValue({item:e})===!0}function UVe({item:e,field:t}){let r=t.getValue({item:e});return r===!0?(0,cO.__)("True"):r===!1?(0,cO.__)("False"):""}function WVe(e,t){let r=t.getValue({item:e});return![void 0,"",null].includes(r)&&![!0,!1].includes(r)?(0,cO.__)("Value must be true, false, or undefined"):null}var GVe=(e,t,r)=>{let o=!!e;return o===!!t?0:r==="asc"?o?1:-1:o?-1:1},ble={type:"boolean",render:Oo,Edit:"checkbox",sort:GVe,validate:{required:vle,elements:Fr,custom:WVe},enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[po,ho],validOperators:[po,ho],format:{},getValueFormatted:UVe};var yle={type:"media",render:()=>null,Edit:null,sort:()=>0,enableSorting:!1,enableGlobalSearch:!1,defaultOperators:[],validOperators:[],format:{},getValueFormatted:ws,validate:{}};var lz=a(V(),1);function wle(e,t){let r=t.getValue({item:e});return Array.isArray(r)&&r.length>0&&r.every(o=>![void 0,"",null].includes(o))}function Sle({item:e,field:t}){let r=t.getValue({item:e});return(Array.isArray(r)?r:[]).join(", ")}function YVe({item:e,field:t}){return Sle({item:e,field:t})}function qVe(e,t){let r=t.getValue({item:e});return![void 0,"",null].includes(r)&&!Array.isArray(r)?(0,lz.__)("Value must be an array."):r.every(o=>typeof o=="string")?null:(0,lz.__)("Every value must be a string.")}var KVe=(e,t,r)=>{let o=Array.isArray(e)?e:[],n=Array.isArray(t)?t:[];if(o.length!==n.length)return r==="asc"?o.length-n.length:n.length-o.length;let i=o.join(","),s=n.join(",");return r==="asc"?i.localeCompare(s):s.localeCompare(i)},_le={type:"array",render:YVe,Edit:"array",sort:KVe,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[Qr,Jr],validOperators:[Qr,Jr,Ni,Ln],format:{},getValueFormatted:Sle,validate:{required:wle,elements:Fr,custom:qVe}};function ZVe({item:e,field:t}){return t.getValue({item:e})?"\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022":""}var xle={type:"password",render:Oo,Edit:"password",sort:()=>0,enableSorting:!1,enableGlobalSearch:!1,defaultOperators:[],validOperators:[],format:{},getValueFormatted:ZVe,validate:{required:No,pattern:Xu,minLength:Ku,maxLength:Zu,elements:Fr}};var Cle={type:"telephone",render:Oo,Edit:"telephone",sort:qu,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[Qr,Jr],validOperators:[po,ho,Au,Iu,Ou,Qr,Jr,Ni,Ln],format:{},getValueFormatted:ws,validate:{required:No,pattern:Xu,minLength:Ku,maxLength:Zu,elements:Fr}};var Tle=a(V(),1);var tw=a(T(),1);function XVe({item:e,field:t}){if(t.hasElements)return(0,tw.jsx)(nO,{item:e,field:t});let r=ws({item:e,field:t});return!r||!Io(r).isValid()?r:(0,tw.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[(0,tw.jsx)("div",{style:{width:"16px",height:"16px",borderRadius:"50%",backgroundColor:r,border:"1px solid #ddd",flexShrink:0}}),(0,tw.jsx)("span",{children:r})]})}function QVe(e,t){let r=t.getValue({item:e});return![void 0,"",null].includes(r)&&!Io(r).isValid()?(0,Tle.__)("Value must be a valid color."):null}var JVe=(e,t,r)=>{let o=Io(e),n=Io(t);if(!o.isValid()&&!n.isValid())return 0;if(!o.isValid())return r==="asc"?1:-1;if(!n.isValid())return r==="asc"?-1:1;let i=o.toHsl(),s=n.toHsl();return i.h!==s.h?r==="asc"?i.h-s.h:s.h-i.h:i.s!==s.s?r==="asc"?i.s-s.s:s.s-i.s:r==="asc"?i.l-s.l:s.l-i.l},Ele={type:"color",render:XVe,Edit:"color",sort:JVe,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[Qr,Jr],validOperators:[po,ho,Qr,Jr],format:{},getValueFormatted:ws,validate:{required:No,elements:Fr,custom:QVe}};var Ple={type:"url",render:Oo,Edit:"url",sort:qu,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[Qr,Jr],validOperators:[po,ho,Au,Iu,Ou,Qr,Jr,Ni,Ln],format:{},getValueFormatted:ws,validate:{required:No,pattern:Xu,minLength:Ku,maxLength:Zu,elements:Fr}};var $Ve=(e,t,r)=>typeof e=="number"&&typeof t=="number"?ew(e,t,r):qu(e,t,r),kle={render:Oo,Edit:null,sort:$Ve,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[po,ho],validOperators:Tse(),format:{},getValueFormatted:ws,validate:{required:No,elements:Fr}};function e8e(e){return e==="integer"||e==="number"}function t8e(e){return e==="date"||e==="datetime"}function Rle(e,t,r){let o=t.validate[r];if(o&&(typeof e=="number"&&e8e(t.type)||typeof e=="string"&&t8e(t.type)))return{constraint:e,validate:o}}function Ale(e,t){let r=e.isValid,o;r?.required===!0&&t.validate.required!==void 0&&(o={constraint:!0,validate:t.validate.required});let n;(r?.elements===!0||r?.elements===void 0&&(e.elements||e.getElements))&&t.validate.elements!==void 0&&(n={constraint:!0,validate:t.validate.elements});let i=Rle(r?.min,t,"min"),s=Rle(r?.max,t,"max"),l=r?.minLength,c;typeof l=="number"&&t.validate.minLength!==void 0&&(c={constraint:l,validate:t.validate.minLength});let u=r?.maxLength,d;typeof u=="number"&&t.validate.maxLength!==void 0&&(d={constraint:u,validate:t.validate.maxLength});let f=r?.pattern,m;f!==void 0&&t.validate.pattern!==void 0&&(m={constraint:f,validate:t.validate.pattern});let h=r?.custom??t.validate.custom;return{required:o,elements:n,min:i,max:s,minLength:c,maxLength:d,pattern:m,custom:h}}function Ile(e){return e.validOperators.reduce((t,r)=>{let o=Rv(r);return o?.filter&&(t[r]=o.filter),t},{})}function r8e(e,t){return{...t.format,...e.format}}var Ole=r8e;function o8e(e){let t=[rle,ile,lle,cle,ple,gle,ble,yle,_le,xle,Cle,Ele,Ple].find(r=>r?.type===e);return t||kle}function Nf(e){return e.map(t=>{let r=o8e(t.type),o=t.getValue||Jae(t.id),n=function(i,s,l){let c=o({item:i}),u=o({item:s});return t.sort?t.sort(c,u,l):r.sort(c,u,l)};return{id:t.id,label:t.label||t.id,header:t.header||t.label||t.id,description:t.description,placeholder:t.placeholder,getValue:o,setValue:t.setValue||$ae(t.id),elements:t.elements,getElements:t.getElements,hasElements:rO(t),isVisible:t.isVisible,isDisabled:typeof t.isDisabled=="function"?t.isDisabled:()=>!!t.isDisabled,enableHiding:t.enableHiding??!0,readOnly:t.readOnly??!1,type:r.type,render:t.render??r.render,Edit:Xae(t,r.Edit),sort:n,enableSorting:t.enableSorting??r.enableSorting,enableGlobalSearch:t.enableGlobalSearch??r.enableGlobalSearch,isValid:Ale(t,r),filterBy:Qae(t,r.defaultOperators,r.validOperators),filter:Ile(r),format:Ole(t,r),getValueFormatted:t.getValueFormatted??r.getValueFormatted}})}var di=a(H(),1);function Nle({view:e,data:t,getItemId:r,isLoading:o,paginationInfo:n,selection:i}){let s=e.infiniteScrollEnabled,[l,c]=(0,di.useState)(!o);(0,di.useEffect)(()=>{o||c(!0)},[o]);let u=(0,di.useRef)(t),d=(0,di.useRef)(n);(0,di.useEffect)(()=>{o||(u.current=t,d.current=n)},[t,o,n]);let[f,m]=(0,di.useState)([]),h=(0,di.useRef)(new Map),g=(0,di.useRef)([]),v=(0,di.useRef)({search:void 0,filters:void 0,perPage:void 0}),b=(0,di.useRef)(void 0),S=(0,di.useRef)(void 0),y=(0,di.useRef)(!1),w=(0,di.useMemo)(()=>{e.startPosition!==void 0&&S.current!==void 0&&(e.startPosition<S.current?b.current="up":e.startPosition>S.current&&(b.current="down")),S.current=e.startPosition;let _=JSON.stringify(e.filters??[]),x=v.current.filters,E=!y.current||!e.infiniteScrollEnabled||e.search!==v.current.search||_!==x||e.perPage!==v.current.perPage;if(y.current=!0,v.current={search:e.search,filters:_,perPage:e.perPage},E){h.current.clear(),b.current=void 0;let F=e.search?1:e.startPosition??1,D=t.map((B,L)=>{let M=F+L;return h.current.set(r(B),M),{...B,position:M}});return g.current=D,D}let O=g.current,A=new Set(t.map(r)),C=b.current,I=e.search?1:e.startPosition??1,k=t.map((F,D)=>{let B=r(F),L=e.infiniteScrollEnabled?I+D:void 0;return L!==void 0&&h.current.set(B,L),{...F,position:L}});if(k.length===0)return O;let P=O.filter(F=>!A.has(r(F))),N=C==="up"?[...k,...P]:[...P,...k];N.sort((F,D)=>{let B=F.position,L=D.position;return B-L});let U=N;if(f.length>0){let F=Math.min(...f),D=Math.max(...f),B=20,L=N.map(Z=>Z.position),M=Math.min(...L);!(Math.max(...L)<F-B||M>D+B)&&(U=N.filter(Z=>{let q=r(Z);if(i?.includes(q))return!0;let ie=Z.position;return C==="up"?ie<=D+B:C==="down"?ie>=F-B:ie>=F-B&&ie<=D+B}))}return g.current=U,U},[t,e.search,e.filters,e.perPage,e.startPosition,e.infiniteScrollEnabled,f,i,r]);return s?{data:w,paginationInfo:n,hasInitiallyLoaded:l,setVisibleEntries:m}:{data:(o&&u.current?.length?u.current:t).map(x=>({...x,position:void 0})),paginationInfo:o&&u.current?.length?d.current:n,hasInitiallyLoaded:l,setVisibleEntries:void 0}}var Ss=a(H(),1),Fle=a(ke(),1);function Mle(e,t,r){let o=e.getBoundingClientRect(),n=o.top+o.height/2,i=Array.from(e.querySelectorAll("[aria-posinset]"));if(i.length===0)return!1;let s=i.reduce((u,d)=>{let f=d.getBoundingClientRect(),m=f.top+f.height/2,h=Math.abs(m-n),g=u.getBoundingClientRect(),v=g.top+g.height/2,b=Math.abs(v-n);return h<b?d:u}),l=Number(s.getAttribute("aria-posinset")),c=s.getBoundingClientRect();return t.current={posinset:l,viewportOffset:c.top-o.top,direction:r},!0}function Dle({view:e,onChangeView:t,isLoading:r,paginationInfo:o,containerRef:n,setVisibleEntries:i}){let s=(0,Ss.useRef)(null),l=(0,Ss.useRef)(e),c=(0,Ss.useRef)(r),u=(0,Ss.useRef)(t),d=(0,Ss.useRef)(o.totalItems);(0,Ss.useLayoutEffect)(()=>{l.current=e,c.current=r,u.current=t,d.current=o.totalItems},[e,r,t,o.totalItems]);let f=(0,Ss.useCallback)(h=>{i&&i(g=>{let v=new Set(g),b=!1;return h.forEach(S=>{let y=Number(S.target?.attributes?.getNamedItem("aria-posinset")?.value);isNaN(y)||(S.isIntersecting?v.has(y)||(v.add(y),b=!0):v.has(y)&&(v.delete(y),b=!0))}),b?Array.from(v).sort():g})},[i]);(0,Ss.useLayoutEffect)(()=>{let h=n.current,g=s.current;if(!h||!e.infiniteScrollEnabled||!g||r)return;let v=h.querySelector(`[aria-posinset="${g.posinset}"]`);if(v){let b=h.getBoundingClientRect(),w=v.getBoundingClientRect().top-b.top-g.viewportOffset;Math.abs(w)>1&&(h.scrollTop+=w)}s.current=null},[n,r,e.infiniteScrollEnabled]);let m=(0,Ss.useRef)(null);return(0,Ss.useEffect)(()=>{if(!e.infiniteScrollEnabled||!f){m.current&&(m.current.disconnect(),m.current=null);return}return m.current=new IntersectionObserver(f,{root:null,rootMargin:"0px",threshold:.1}),()=>{m.current&&(m.current.disconnect(),m.current=null)}},[e.infiniteScrollEnabled,f]),(0,Ss.useEffect)(()=>{if(!e.infiniteScrollEnabled||!n.current)return;let h=0,g=600,v=800,b=(0,Fle.throttle)(y=>{let w=l.current,_=d.current,x=y.target,E=x.scrollTop,O=x.scrollHeight,A=x.clientHeight,C=E>h?"down":"up";if(h=E,c.current)return;let I=w.startPosition||1,k=w.perPage||10,P=Math.min(I+k,_);if(C==="down"&&E+A>=O-g&&P<_){let N=P;Mle(x,s,"down"),u.current({...w,startPosition:N})}if(C==="up"&&E<=v&&I>1){let N=I-k,U=N<6?1:N;Mle(x,s,"up"),u.current({...w,startPosition:U})}},50),S=n.current;return S.addEventListener("scroll",b),()=>{S.removeEventListener("scroll",b),b.cancel()}},[n,e.infiniteScrollEnabled]),{intersectionObserver:m.current}}var la=a(H(),1),Lle=a(ke(),1);var fi=a(T(),1),n8e=()=>!1,i8e=Bp.filter(e=>e.isPicker),s8e=e=>e.id,a8e=[],l8e={pickerGrid:!0,pickerTable:!0};function c8e({search:e=!0,searchLabel:t=void 0}){let{view:r}=(0,la.useContext)(nt),o=r.infiniteScrollEnabled;return(0,fi.jsxs)(fi.Fragment,{children:[(0,fi.jsxs)(ne,{direction:"row",align:"top",justify:"space-between",className:Q("dataviews__view-actions",{"dataviews__view-actions--infinite-scroll":o}),gap:"xs",children:[(0,fi.jsxs)(ne,{direction:"row",gap:"sm",justify:"start",className:"dataviews__search",children:[e&&(0,fi.jsx)(Hj,{label:t}),(0,fi.jsx)(AI,{})]}),(0,fi.jsx)(ne,{direction:"row",gap:"xs",style:{flexShrink:0},children:(0,fi.jsx)(Xse,{})})]}),(0,fi.jsx)(II,{className:"dataviews-filters__container"}),(0,fi.jsx)(zj,{}),(0,fi.jsx)(tj,{})]})}function u8e({view:e,onChangeView:t,fields:r,search:o=!0,searchLabel:n=void 0,actions:i=a8e,data:s,getItemId:l=s8e,isLoading:c=!1,paginationInfo:u,defaultLayouts:d=l8e,selection:f,onChangeSelection:m,children:h,config:g={perPageSizes:[10,20,50,100]},itemListLabel:v,empty:b,onReset:S}){let{data:y,setVisibleEntries:w}=Nle({view:e,data:s,getItemId:l,selection:f,paginationInfo:u}),_=(0,la.useRef)(null),[x,E]=(0,la.useState)(0),O=(0,Lle.useResizeObserver)(L=>{E(L[0].borderBoxSize[0].inlineSize)},{box:"border-box"}),[A,C]=(0,la.useState)(null);function I(L){let M=typeof L=="function"?L(f):L;m&&m(M)}let k=(0,la.useMemo)(()=>Nf(r),[r]),P=dC(k,e),N=(0,la.useMemo)(()=>(P||[]).some(L=>L.isPrimary||L.isLocked),[P]),[U,F]=(0,la.useState)(N),{intersectionObserver:D}=Dle({view:e,onChangeView:t,isLoading:c,paginationInfo:u,containerRef:_,setVisibleEntries:w});(0,la.useEffect)(()=>{N&&!U&&F(!0)},[N,U]);let B=(0,la.useMemo)(()=>Object.fromEntries(Object.entries(d).filter(([L])=>i8e.some(M=>M.type===L)).map(([L,M])=>[L,M===!0?{}:M])),[d]);return B[e.type]?(0,fi.jsx)(nt.Provider,{value:{view:e,onChangeView:t,fields:k,actions:i,data:y,isLoading:c,paginationInfo:u,isItemClickable:n8e,selection:f,onChangeSelection:I,openedFilter:A,setOpenedFilter:C,getItemId:l,containerWidth:x,containerRef:_,resizeObserverRef:O,defaultLayouts:B,filters:P,isShowingFilter:U,setIsShowingFilter:F,config:g,itemListLabel:v,empty:b,onReset:S,hasInitiallyLoaded:!0,intersectionObserver:D},children:(0,fi.jsx)("div",{className:"dataviews-picker-wrapper",children:h??(0,fi.jsx)(c8e,{search:o,searchLabel:n})})}):null}var Rc=u8e;Rc.BulkActionToolbar=Boe;Rc.Footer=tj;Rc.Filters=mC;Rc.FiltersToggled=II;Rc.FiltersToggle=AI;Rc.Layout=zj;Rc.LayoutSwitcher=Gj;Rc.Pagination=$9;Rc.Search=Hj;Rc.ViewConfig=Yj;var wC=Rc;var pz=a(H(),1);var Ble=a(H(),1),Vle=a(T(),1),cz=(0,Ble.createContext)({fields:[]});cz.displayName="DataFormContext";function jle({fields:e,children:t}){return(0,Vle.jsx)(cz.Provider,{value:{fields:e},children:t})}var Al=cz;var wO=a(H(),1);var dO=a(H(),1),_C=a(W(),1);var SC=a(V(),1),zi={type:"regular",labelPosition:"top"},d8e=e=>typeof e=="string"?[{id:e,visibility:"when-collapsed"}]:e.map(t=>typeof t=="string"?{id:t,visibility:"when-collapsed"}:{id:t.id,visibility:t.visibility});function zle(e){let t=zi;if(e?.type==="regular")t={type:"regular",labelPosition:e?.labelPosition??"top"};else if(e?.type==="panel"){let r=e.summary??[],o=Array.isArray(r)?r:[r],n=e?.openAs,i;typeof n=="object"&&n.type==="modal"?i={type:"modal",applyLabel:n.applyLabel?.trim()||(0,SC.__)("Apply"),cancelLabel:n.cancelLabel?.trim()||(0,SC.__)("Cancel")}:n==="modal"?i={type:"modal",applyLabel:(0,SC.__)("Apply"),cancelLabel:(0,SC.__)("Cancel")}:i={type:"dropdown"},t={type:"panel",labelPosition:e?.labelPosition??"side",openAs:i,summary:o,editVisibility:e?.editVisibility??"on-hover"}}else if(e?.type==="card")if(e.withHeader===!1)t={type:"card",withHeader:!1,isOpened:!0,summary:[],isCollapsible:!1};else{let r=e.summary??[];t={type:"card",withHeader:!0,isOpened:typeof e.isOpened=="boolean"?e.isOpened:!0,summary:d8e(r),isCollapsible:e.isCollapsible===void 0?!0:e.isCollapsible}}else e?.type==="row"?t={type:"row",alignment:e?.alignment??"center",styles:e?.styles??{}}:e?.type==="details"&&(t={type:"details",summary:e?.summary??""});return t}function Hle(e){let t=zle(e?.layout),r=(e.fields??[]).map(o=>{if(typeof o=="string")return{id:o,layout:t};let n=o.layout?zle(o.layout):t;return{id:o.id,layout:n,...!!o.label&&{label:o.label},...!!o.description&&{description:o.description},..."children"in o&&Array.isArray(o.children)&&{children:Hle({fields:o.children,layout:zi}).fields}}});return{layout:t,fields:r}}var uO=Hle;var eo=a(T(),1);function f8e({title:e}){return(0,eo.jsx)(ne,{direction:"column",className:"dataforms-layouts-regular__header",gap:"lg",children:(0,eo.jsx)(ne,{direction:"row",align:"center",children:(0,eo.jsx)(_C.__experimentalHeading,{level:2,size:13,children:e})})})}function Ule({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i}){let{fields:s}=(0,dO.useContext)(Al),l=t.layout,c=(0,dO.useMemo)(()=>({layout:zi,fields:t.children?t.children:[]}),[t]);if(t.children)return(0,eo.jsxs)(eo.Fragment,{children:[!o&&t.label&&(0,eo.jsx)(f8e,{title:t.label}),(0,eo.jsx)(ca,{data:e,form:c,onChange:r,validity:i?.children})]});let u=l.labelPosition,d=s.find(f=>f.id===t.id);return!d||!d.Edit?null:u==="side"?(0,eo.jsxs)(ne,{direction:"row",className:"dataforms-layouts-regular__field",gap:"sm",children:[(0,eo.jsx)("div",{className:Q("dataforms-layouts-regular__field-label",`dataforms-layouts-regular__field-label--label-position-${u}`),children:(0,eo.jsx)(_C.BaseControl.VisualLabel,{children:d.label})}),(0,eo.jsx)("div",{className:"dataforms-layouts-regular__field-control",children:d.readOnly===!0?(0,eo.jsx)(d.render,{item:e,field:d}):(0,eo.jsx)(d.Edit,{data:e,field:d,onChange:r,hideLabelFromVision:!0,markWhenOptional:n,validity:i},d.id)})]}):(0,eo.jsx)("div",{className:"dataforms-layouts-regular__field",children:d.readOnly===!0?(0,eo.jsx)(eo.Fragment,{children:(0,eo.jsxs)(eo.Fragment,{children:[!o&&u!=="none"&&(0,eo.jsx)(_C.BaseControl.VisualLabel,{children:d.label}),(0,eo.jsx)(d.render,{item:e,field:d})]})}):(0,eo.jsx)(d.Edit,{data:e,field:d,onChange:r,hideLabelFromVision:u==="none"?!0:o,markWhenOptional:n,validity:i})})}var fz=a(fO(),1),Nv=a(W(),1),Ac=a(H(),1),gO=a(ke(),1);var mO=a(W(),1),ow=a(V(),1);var Jle=a(ke(),1);var uz=a(H(),1);function E8e(e,t){return Q("dataforms-layouts-panel__field-label",`dataforms-layouts-panel__field-label--label-position-${e}`,{"has-error":t})}var qle=E8e;var Kle=a(W(),1);var Kp=a(T(),1);function P8e(e,t,r){return e?(0,Kp.jsxs)(We.Root,{children:[(0,Kp.jsx)(We.Trigger,{render:(0,Kp.jsxs)("span",{className:"dataforms-layouts-panel__field-label-error-content",children:[(0,Kp.jsx)(Kle.Icon,{icon:qd,size:16}),(0,Kp.jsxs)(Ut,{children:[t,": "]}),r]})}),(0,Kp.jsx)(We.Popup,{children:t})]}):r}var Zle=P8e;function Xle(e){if(!e)return;let t=Object.keys(e).filter(r=>r!=="children");for(let r of t){let o=e[r];if(o!==void 0&&o.type==="invalid")return o.message?o.message:r==="required"?"A required field is empty":"Unidentified validation error"}if(e.children)for(let r of Object.values(e.children)){let o=Xle(r);if(o)return o}}var Qle=Xle;var _s=a(T(),1);function CC({data:e,field:t,fieldLabel:r,summaryFields:o,validity:n,touched:i,disabled:s,isOpen:l,onClick:c}){let{labelPosition:u,editVisibility:d}=t.layout,f=Qle(n),m=i&&!!f,h=qle(u,m),g=Zle(m,f,r),v=Q("dataforms-layouts-panel__field-trigger",`dataforms-layouts-panel__field-trigger--label-${u}`,{"is-disabled":s,"dataforms-layouts-panel__field-trigger--edit-always":d==="always"}),b=(0,Jle.useInstanceId)(CC,"dataforms-layouts-panel__field-control"),S=m?(0,ow.sprintf)((0,ow._x)("Edit %s (has errors)","field"),r||""):(0,ow.sprintf)((0,ow._x)("Edit %s","field"),r||""),y=(0,uz.useRef)(null),w=(0,uz.useRef)(null);return(0,_s.jsxs)("div",{ref:y,className:v,onClick:s?void 0:E=>{!l&&E.detail<2&&!w.current?.contains(E.target)&&y.current?.ownerDocument.defaultView?.getSelection()?.toString()||c()},onKeyDown:s?void 0:E=>{E.target===E.currentTarget&&(E.key==="Enter"||E.key===" ")&&(E.preventDefault(),c())},children:[u!=="none"&&(0,_s.jsx)("span",{className:h,children:g}),u==="none"&&m&&(0,_s.jsxs)(We.Root,{children:[(0,_s.jsx)(We.Trigger,{render:(0,_s.jsx)("span",{className:"dataforms-layouts-panel__field-label-error-content",role:"img","aria-label":f,children:(0,_s.jsx)(mO.Icon,{icon:qd,size:16})})}),(0,_s.jsx)(We.Popup,{children:f})]}),(0,_s.jsx)("span",{id:`${b}`,className:"dataforms-layouts-panel__field-control",children:o.length>1?(0,_s.jsx)("span",{style:{display:"flex",flexDirection:"column",alignItems:"flex-start",width:"100%",gap:"2px"},children:o.map(E=>(0,_s.jsx)("span",{style:{width:"100%"},children:(0,_s.jsx)(E.render,{item:e,field:E})},E.id))}):o.map(E=>(0,_s.jsx)(E.render,{item:e,field:E},E.id))}),!s&&(0,_s.jsx)(mO.Button,{ref:w,className:"dataforms-layouts-panel__field-trigger-icon",label:S,icon:mx,size:"small","aria-expanded":l,"aria-haspopup":"dialog","aria-describedby":`${b}`})]})}var $le=a(fO(),1),dz=a(hI(),1),Qu=a(H(),1),xs=a(V(),1);function ece(e){return e?Object.values(e).every(t=>Object.entries(t).every(([r,o])=>r==="children"&&o&&typeof o=="object"?ece(o):o.type!=="invalid"&&o.type!=="validating")):!0}function k8e(e,t){let r=uO(e);if(r.fields.length===0)return[];let o=new Map;t.forEach(s=>{o.set(s.id,s)});function n(s){if("children"in s&&Array.isArray(s.children)){let u=s.children.map(n).filter(f=>f!==null);if(u.length===0)return null;let d=o.get(s.id);if(d){let[f]=Nf([d]);return{id:s.id,children:u,field:f}}return{id:s.id,children:u}}let l=o.get(s.id);if(!l)return null;let[c]=Nf([l]);return{id:s.id,children:[],field:c}}return r.fields.map(n).filter(s=>s!==null)}function nw(e,t,r){if(e||(e={}),r.length===0)return e;let o={...e},n=o;for(let s=0;s<r.length-1;s++){let l=r[s];n[l]||(n[l]={}),n[l]={...n[l]},n=n[l]}let i=r[r.length-1];return n[i]={...n[i]||{},...t},o}function tce(e,t,r){if(!e||t.length===0)return e;let o={...e},n=o;for(let l=0;l<t.length-1;l++){let c=t[l];if(!n[c])return e;n[c]={...n[c]},n=n[c]}let i=t[t.length-1];if(!n[i])return e;let s={...n[i]};if(delete s[r],Object.keys(s).length===0?delete n[i]:n[i]=s,Object.keys(o).length!==0)return o}function R8e(e,t,r){let{elementsCounterRef:o,setFormValidity:n,path:i,item:s}=r,l=(o.current[t.id]||0)+1;o.current[t.id]=l,e.then(c=>{if(l===o.current[t.id]){if(!Array.isArray(c)){n(u=>nw(u,{elements:{type:"invalid",message:(0,xs.__)("Could not validate elements.")}},[...i,t.id]));return}t.field?.isValid.elements&&!t.field.isValid.elements.validate(s,{...t.field,elements:c})?n(u=>nw(u,{elements:{type:"invalid",message:(0,xs.__)("Value must be one of the elements.")}},[...i,t.id])):n(u=>tce(u,[...i,t.id],"elements"))}}).catch(c=>{if(l!==o.current[t.id])return;let u;c instanceof Error?u=c.message:u=String(c)||(0,xs.__)("Unknown error when running elements validation asynchronously."),n(d=>nw(d,{elements:{type:"invalid",message:u}},[...i,t.id]))})}function A8e(e,t,r){let{customCounterRef:o,setFormValidity:n,path:i}=r,s=(o.current[t.id]||0)+1;o.current[t.id]=s,e.then(l=>{if(s===o.current[t.id]){if(l===null){n(c=>tce(c,[...i,t.id],"custom"));return}if(typeof l=="string"){n(c=>nw(c,{custom:{type:"invalid",message:l}},[...i,t.id]));return}n(c=>nw(c,{custom:{type:"invalid",message:(0,xs.__)("Validation could not be processed.")}},[...i,t.id]))}}).catch(l=>{if(s!==o.current[t.id])return;let c;l instanceof Error?c=l.message:c=String(l)||(0,xs.__)("Unknown error when running custom validation asynchronously."),n(u=>nw(u,{custom:{type:"invalid",message:c}},[...i,t.id]))})}function rce(e,t,r){if(t.field?.isValid.required&&!t.field.isValid.required.validate(e,t.field))return{required:{type:"invalid"}};if(t.field?.isValid.pattern&&!t.field.isValid.pattern.validate(e,t.field))return{pattern:{type:"invalid",message:(0,xs.__)("Value does not match the required pattern.")}};if(t.field?.isValid.min&&!t.field.isValid.min.validate(e,t.field))return{min:{type:"invalid",message:(0,xs.__)("Value is below the minimum.")}};if(t.field?.isValid.max&&!t.field.isValid.max.validate(e,t.field))return{max:{type:"invalid",message:(0,xs.__)("Value is above the maximum.")}};if(t.field?.isValid.minLength&&!t.field.isValid.minLength.validate(e,t.field))return{minLength:{type:"invalid",message:(0,xs.__)("Value is too short.")}};if(t.field?.isValid.maxLength&&!t.field.isValid.maxLength.validate(e,t.field))return{maxLength:{type:"invalid",message:(0,xs.__)("Value is too long.")}};if(t.field?.isValid.elements&&t.field.hasElements&&!t.field.getElements&&Array.isArray(t.field.elements)&&!t.field.isValid.elements.validate(e,t.field))return{elements:{type:"invalid",message:(0,xs.__)("Value must be one of the elements.")}};let o;if(t.field&&t.field.isValid.custom)try{let i=t.field.getValue({item:e});o=t.field.isValid.custom((0,$le.default)(e,t.field.setValue({item:e,value:i})),t.field)}catch(i){let s;return i instanceof Error?s=i.message:s=String(i)||(0,xs.__)("Unknown error when running custom validation."),{custom:{type:"invalid",message:s}}}if(typeof o=="string")return{custom:{type:"invalid",message:o}};let n={};if(t.field&&t.field.isValid.elements&&t.field.hasElements&&typeof t.field.getElements=="function"&&(R8e(t.field.getElements(),t,r),n.elements={type:"validating",message:(0,xs.__)("Validating\u2026")}),o instanceof Promise&&(A8e(o,t,r),n.custom={type:"validating",message:(0,xs.__)("Validating\u2026")}),Object.keys(n).length>0)return n;if(t.children.length>0){let i={};t.children.forEach(l=>{i[l.id]=rce(e,l,{...r,path:[...r.path,t.id,"children"]})});let s={};return Object.entries(i).forEach(([l,c])=>{c!==void 0&&(s[l]=c)}),Object.keys(s).length===0?void 0:{children:s}}}function oce(e,t){let r=e?.field?.getValue({item:t});if(e.children.length===0)return r;let o=e.children.map(n=>oce(n,t));return o?{value:r,children:o}:r}function I8e(e,t,r){let[o,n]=(0,Qu.useState)(),i=(0,Qu.useRef)({}),s=(0,Qu.useRef)({}),l=(0,Qu.useRef)({}),c=(0,Qu.useCallback)(()=>{let u={customCounterRef:i,elementsCounterRef:s,setFormValidity:n,path:[],item:e},d=k8e(r,t);if(d.length===0){n(void 0);return}let f={},m=[];d.forEach(h=>{let g=oce(h,e);if(l.current.hasOwnProperty(h.id)&&(0,dz.default)(l.current[h.id],g)){m.push(h.id);return}l.current[h.id]=g;let v=rce(e,h,u);v!==void 0&&(f[h.id]=v)}),n(h=>{let g={...h,...f},v=[...m,...Object.keys(f)];return Object.keys(g).forEach(S=>{g&&!v.includes(S)&&delete g[S]}),Object.keys(g).length===0&&(g=void 0),(0,dz.default)(h,g)?h:g})},[e,t,r]);return(0,Qu.useEffect)(()=>{c()},[c]),{validity:o,isValid:ece(o)}}var nce=I8e;var ice=a(H(),1);function Zp(e,t){(0,ice.useEffect)(()=>{t&&e.current&&e.current.querySelectorAll("input, textarea, select").forEach(o=>{o.reportValidity()})},[t,e])}var sce=a(H(),1);function O8e(e){return Array.isArray(e)?e.map(t=>typeof t=="string"?t:t.id):[]}var pO=(e,t)=>Array.isArray(e)&&e.length>0?O8e(e).map(o=>t.find(n=>n.id===o)).filter(o=>o!==void 0):[];var N8e=(e,t)=>{let r=t.find(o=>o.id===e.id);return r||t.find(o=>{if(e.children){let n=e.children.filter(i=>!i.children);return n.length===0?!1:o.id===n[0].id}return o.id===e.id})};function M8e(e){let{fields:t}=(0,sce.useContext)(Al),r=e.layout,o=pO(r.summary,t),n=N8e(e,t),i=e.children?e.label:n?.label;return o.length===0?{summaryFields:n?[n]:[],fieldDefinition:n,fieldLabel:i}:{summaryFields:o,fieldDefinition:n,fieldLabel:i}}var hO=M8e;var Cs=a(T(),1);function F8e({data:e,field:t,onChange:r,fieldLabel:o,onClose:n,touched:i}){let{openAs:s}=t.layout,{applyLabel:l,cancelLabel:c}=s,{fields:u}=(0,Ac.useContext)(Al),[d,f]=(0,Ac.useState)({}),m=(0,Ac.useMemo)(()=>(0,fz.default)(e,d,{arrayMerge:(x,E)=>E}),[e,d]),h=(0,Ac.useMemo)(()=>({layout:zi,fields:t.children?t.children:[{id:t.id,layout:zi}]}),[t]),g=u.map(x=>({...x,Edit:x.Edit===null?void 0:x.Edit,isValid:{required:x.isValid.required?.constraint,elements:x.isValid.elements?.constraint,min:x.isValid.min?.constraint,max:x.isValid.max?.constraint,pattern:x.isValid.pattern?.constraint,minLength:x.isValid.minLength?.constraint,maxLength:x.isValid.maxLength?.constraint}})),{validity:v}=nce(m,g,h),b=()=>{r(d),n()},S=x=>{f(E=>(0,fz.default)(E,x,{arrayMerge:(O,A)=>A}))},y=(0,gO.useFocusOnMount)("firstInputElement"),w=(0,Ac.useRef)(null),_=(0,gO.useMergeRefs)([y,w]);return Zp(w,i),(0,Cs.jsxs)(Nv.Modal,{className:"dataforms-layouts-panel__modal",onRequestClose:n,isFullScreen:!1,title:o,size:"medium",children:[(0,Cs.jsx)("div",{ref:_,children:(0,Cs.jsx)(ca,{data:m,form:h,onChange:S,validity:v,children:(x,E,O,A)=>(0,Cs.jsx)(x,{data:m,field:E,onChange:S,hideLabelFromVision:h.fields.length<2,markWhenOptional:A,validity:O},E.id)})}),(0,Cs.jsxs)(ne,{direction:"row",className:"dataforms-layouts-panel__modal-footer",gap:"md",children:[(0,Cs.jsx)(Nv.__experimentalSpacer,{style:{flex:1}}),(0,Cs.jsx)(Nv.Button,{variant:"tertiary",onClick:n,__next40pxDefaultSize:!0,children:c}),(0,Cs.jsx)(Nv.Button,{variant:"primary",onClick:b,__next40pxDefaultSize:!0,children:l})]})]})}function D8e({data:e,field:t,onChange:r,validity:o}){let[n,i]=(0,Ac.useState)(!1),[s,l]=(0,Ac.useState)(!1),{fieldDefinition:c,fieldLabel:u,summaryFields:d}=hO(t);if(!c)return null;let f=()=>{l(!1),i(!0)};return(0,Cs.jsxs)(Cs.Fragment,{children:[(0,Cs.jsx)(CC,{data:e,field:t,fieldLabel:u,summaryFields:d,validity:o,touched:n,disabled:c.readOnly===!0,onClick:()=>l(!0),isOpen:s}),s&&(0,Cs.jsx)(F8e,{data:e,field:t,onChange:r,fieldLabel:u??"",onClose:f,touched:n})]})}var ace=D8e;var Xp=a(W(),1),lce=a(V(),1),Mf=a(H(),1);var cce=a(ke(),1);var Hi=a(T(),1);function L8e({title:e,onClose:t}){return(0,Hi.jsx)(ne,{direction:"column",className:"dataforms-layouts-panel__dropdown-header",gap:"lg",children:(0,Hi.jsxs)(ne,{direction:"row",gap:"sm",align:"center",children:[e&&(0,Hi.jsx)(Xp.__experimentalHeading,{level:2,size:13,children:e}),(0,Hi.jsx)(Xp.__experimentalSpacer,{style:{flex:1}}),t&&(0,Hi.jsx)(Xp.Button,{label:(0,lce.__)("Close"),icon:_i,onClick:t,size:"small"})]})})}function B8e({touched:e,children:t}){let r=(0,Mf.useRef)(null);return Zp(r,e),(0,Hi.jsx)("div",{ref:r,children:t})}function V8e({data:e,field:t,onChange:r,validity:o}){let[n,i]=(0,Mf.useState)(!1),[s,l]=(0,Mf.useState)(null),c=(0,Mf.useMemo)(()=>({anchor:s,placement:"left-start",offset:36,shift:!0}),[s]),[u,d]=(0,cce.__experimentalUseDialog)({focusOnMount:"firstInputElement"}),f=(0,Mf.useMemo)(()=>({layout:zi,fields:t.children?t.children:[{id:t.id,layout:zi}]}),[t]),m=(0,Mf.useMemo)(()=>{if(o!==void 0)return t.children?o?.children:{[t.id]:o}},[o,t]),{fieldDefinition:h,fieldLabel:g,summaryFields:v}=hO(t);return h?(0,Hi.jsx)("div",{ref:l,className:"dataforms-layouts-panel__field-dropdown-anchor",children:(0,Hi.jsx)(Xp.Dropdown,{contentClassName:"dataforms-layouts-panel__field-dropdown",popoverProps:c,focusOnMount:!1,onToggle:b=>{b||i(!0)},renderToggle:({isOpen:b,onToggle:S})=>(0,Hi.jsx)(CC,{data:e,field:t,fieldLabel:g,summaryFields:v,validity:o,touched:n,disabled:h.readOnly===!0,isOpen:b,onClick:S}),renderContent:({onClose:b})=>(0,Hi.jsx)(B8e,{touched:n,children:(0,Hi.jsxs)("div",{ref:u,...d,children:[(0,Hi.jsx)(L8e,{title:g,onClose:b}),(0,Hi.jsx)(ca,{data:e,form:f,onChange:r,validity:m,children:(S,y,w,_)=>(0,Hi.jsx)(S,{data:e,field:y,onChange:r,hideLabelFromVision:(f?.fields??[]).length<2,markWhenOptional:_,validity:w},y.id)})]})})})}):null}var uce=V8e;var mz=a(T(),1);function dce({data:e,field:t,onChange:r,validity:o}){return t.layout.openAs.type==="modal"?(0,mz.jsx)(ace,{data:e,field:t,onChange:r,validity:o}):(0,mz.jsx)(uce,{data:e,field:t,onChange:r,validity:o})}var ua=a(H(),1);var vO=a(V(),1),fce=a(T(),1);function mce(e){if(!e)return 0;let t=0,r=Object.keys(e).filter(o=>o!=="children");for(let o of r)e[o]?.type==="invalid"&&t++;if(e.children)for(let o of Object.values(e.children))t+=mce(o);return t}function bO({validity:e}){let t=mce(e);return t===0?null:(0,fce.jsx)(WV,{intent:"high",children:(0,vO.sprintf)((0,vO._n)("%d field needs attention","%d fields need attention",t),t)})}var Mo=a(T(),1);function j8e(e,t,r){if(!t||Array.isArray(t)&&t.length===0)return!1;let n=(Array.isArray(t)?t:[t]).find(i=>typeof i=="string"?i===e.id:typeof i=="object"&&"id"in i?i.id===e.id:!1);return n?typeof n=="string"?!0:typeof n=="object"&&"visibility"in n?n.visibility==="always"||n.visibility==="when-collapsed"&&!r:!0:!1}function z8e({data:e,fields:t,label:r,layout:o,isOpen:n,touched:i,validity:s}){let c=pO(o.summary,t).filter(f=>j8e(f,o.summary,n)),u=i&&o.isCollapsible,d=c.length>0&&o.withHeader;return(0,Mo.jsxs)(ne,{align:"center",justify:"space-between",className:"dataforms-layouts-card__field-header-content",children:[(0,Mo.jsx)(Eu.Title,{children:r}),(u||d)&&(0,Mo.jsxs)(Hg.HeaderDescription,{className:"dataforms-layouts-card__field-header-content-description",children:[u&&(0,Mo.jsx)(bO,{validity:s}),d&&(0,Mo.jsx)("div",{className:"dataforms-layouts-card__field-summary",children:c.map(f=>(0,Mo.jsx)(f.render,{item:e,field:f},f.id))})]})]})}function H8e({data:e,field:t,form:r,onChange:o,hideLabelFromVision:n,markWhenOptional:i,validity:s,withHeader:l}){if(t.children)return(0,Mo.jsxs)(Mo.Fragment,{children:[t.description&&(0,Mo.jsx)("div",{className:"dataforms-layouts-card__field-description",children:t.description}),(0,Mo.jsx)(ca,{data:e,form:r,onChange:o,validity:s?.children})]});let c=Mv("regular")?.component;return c?(0,Mo.jsx)(c,{data:e,field:t,onChange:o,hideLabelFromVision:n||l,markWhenOptional:i,validity:s}):null}function pce({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i}){let{fields:s}=(0,ua.useContext)(Al),l=t.layout,c=(0,ua.useRef)(null),u=(0,ua.useMemo)(()=>({layout:zi,fields:t.children??[]}),[t]),{isOpened:d,isCollapsible:f}=l,[m,h]=(0,ua.useState)(d),[g,v]=(0,ua.useState)(!1);(0,ua.useEffect)(()=>{h(d)},[d]);let b=(0,ua.useCallback)(E=>{E||v(!0),h(E)},[]),S=(0,ua.useCallback)(()=>{v(!0)},[]);Zp(c,(f?m:!0)&&g);let y=t.label,w;if(t.children)w=!!y&&l.withHeader;else{let E=s.find(O=>O.id===t.id);if(!E||!E.Edit)return null;y=E.label,w=!!y&&l.withHeader}let _=(0,Mo.jsx)(H8e,{data:e,field:t,form:u,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i,withHeader:w}),x=(0,Mo.jsx)(z8e,{data:e,fields:s,label:y,layout:l,isOpen:f?!!m:!0,touched:g,validity:i});return w&&f?(0,Mo.jsxs)(Hg.Root,{className:"dataforms-layouts-card__field",open:m,onOpenChange:b,children:[(0,Mo.jsx)(Hg.Header,{children:x}),(0,Mo.jsx)(Hg.Content,{ref:c,onBlur:S,children:_})]}):(0,Mo.jsxs)(Eu.Root,{className:"dataforms-layouts-card__field",children:[w&&(0,Mo.jsx)(Eu.Header,{children:x}),(0,Mo.jsx)(Eu.Content,{ref:c,onBlur:S,children:_})]})}var hce=a(W(),1);var Hn=a(T(),1);function U8e({title:e}){return(0,Hn.jsx)(ne,{direction:"column",className:"dataforms-layouts-row__header",gap:"lg",children:(0,Hn.jsx)(ne,{direction:"row",align:"center",children:(0,Hn.jsx)(hce.__experimentalHeading,{level:2,size:13,children:e})})})}var W8e=({children:e})=>(0,Hn.jsx)(Hn.Fragment,{children:e});function gce({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i}){let s=t.layout;if(t.children){let c={layout:zi,fields:t.children};return(0,Hn.jsxs)("div",{className:"dataforms-layouts-row__field",children:[!o&&t.label&&(0,Hn.jsx)(U8e,{title:t.label}),(0,Hn.jsx)(ne,{direction:"row",align:s.alignment,gap:"lg",children:(0,Hn.jsx)(ca,{data:e,form:c,onChange:r,validity:i?.children,as:W8e,children:(u,d,f)=>(0,Hn.jsx)("div",{className:"dataforms-layouts-row__field-control",style:s.styles[d.id],children:(0,Hn.jsx)(u,{data:e,field:d,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:f})},d.id)})})]})}let l=Mv("regular")?.component;return l?(0,Hn.jsx)(Hn.Fragment,{children:(0,Hn.jsx)("div",{className:"dataforms-layouts-row__field-control",children:(0,Hn.jsx)(l,{data:e,field:t,onChange:r,markWhenOptional:n,validity:i})})}):null}var da=a(H(),1),vce=a(V(),1);var Ff=a(T(),1);function bce({data:e,field:t,onChange:r,validity:o}){let{fields:n}=(0,da.useContext)(Al),i=(0,da.useRef)(null),s=(0,da.useRef)(null),[l,c]=(0,da.useState)(!1),[u,d]=(0,da.useState)(!1),f=(0,da.useMemo)(()=>({layout:zi,fields:t.children??[]}),[t]);(0,da.useEffect)(()=>{let b=i.current;if(!b)return;let S=()=>{let y=b.open;y||c(!0),d(y)};return b.addEventListener("toggle",S),()=>{b.removeEventListener("toggle",S)}},[]),Zp(s,u&&l);let m=(0,da.useCallback)(()=>{c(!0)},[]);if(!t.children)return null;let h=t.layout.summary??"",g=h?n.find(b=>b.id===h):void 0,v;return g&&g.render?v=(0,Ff.jsx)(g.render,{item:e,field:g}):v=t.label||(0,vce.__)("More details"),(0,Ff.jsxs)("details",{ref:i,className:"dataforms-layouts-details__details",children:[(0,Ff.jsx)("summary",{className:"dataforms-layouts-details__summary",children:(0,Ff.jsxs)(ne,{direction:"row",align:"center",gap:"md",className:"dataforms-layouts-details__summary-content",children:[v,l&&(0,Ff.jsx)(bO,{validity:o})]})}),(0,Ff.jsx)("div",{ref:s,className:"dataforms-layouts-details__content",onBlur:m,children:(0,Ff.jsx)(ca,{data:e,form:f,onChange:r,validity:o?.children})})]})}var Fv=a(T(),1),G8e=[{type:"regular",component:Ule,wrapper:({children:e})=>(0,Fv.jsx)(ne,{direction:"column",className:"dataforms-layouts__wrapper",gap:"lg",children:e})},{type:"panel",component:dce,wrapper:({children:e})=>(0,Fv.jsx)(ne,{direction:"column",className:"dataforms-layouts__wrapper",gap:"md",children:e})},{type:"card",component:pce,wrapper:({children:e})=>(0,Fv.jsx)(ne,{direction:"column",className:"dataforms-layouts__wrapper",gap:"xl",children:e})},{type:"row",component:gce,wrapper:({children:e,layout:t})=>(0,Fv.jsx)(ne,{direction:"column",className:"dataforms-layouts__wrapper",gap:"lg",children:(0,Fv.jsx)("div",{className:"dataforms-layouts-row__field",children:(0,Fv.jsx)(ne,{direction:"row",gap:"lg",align:t.alignment,children:e})})})},{type:"details",component:bce}];function Mv(e){return G8e.find(t=>t.type===e)}var yO=a(T(),1),Y8e=({children:e})=>(0,yO.jsx)(ne,{direction:"column",className:"dataforms-layouts__wrapper",gap:"lg",children:e});function ca({data:e,form:t,onChange:r,validity:o,children:n,as:i}){let{fields:s}=(0,wO.useContext)(Al),l=(0,wO.useMemo)(()=>{let d=s.filter(m=>!!m.isValid?.required).length,f=s.length-d;return d>f},[s]);function c(d){return s.find(f=>f.id===d.id)}let u=i??Mv(t.layout.type)?.wrapper??Y8e;return(0,yO.jsx)(u,{layout:t.layout,children:t.fields.map(d=>{let f=Mv(d.layout.type)?.component;if(!f)return null;let m=d.children?void 0:c(d);return m&&m.isVisible&&!m.isVisible(e)?null:n?n(f,d,o?.[d.id],l):(0,yO.jsx)(f,{data:e,field:d,onChange:r,markWhenOptional:l,validity:o?.[d.id]},d.id)})})}var hz=a(T(),1);function TC({data:e,form:t,fields:r,onChange:o,validity:n}){let i=(0,pz.useMemo)(()=>uO(t),[t]),s=(0,pz.useMemo)(()=>Nf(r),[r]);return t.fields?(0,hz.jsx)(jle,{fields:s,children:(0,hz.jsx)(ca,{data:e,form:i,onChange:o,validity:n})}):null}var wce=a(l0(),1),Sce=a(Va(),1);function yce(e=""){return(0,wce.default)(e.trim().toLowerCase())}var q8e=[];function gz(e,t,r){if(!e)return{data:q8e,paginationInfo:{totalItems:0,totalPages:0}};let o=Nf(r),n=[...e];if(t.search){let u=yce(t.search);n=n.filter(d=>o.filter(f=>f.enableGlobalSearch).some(f=>{let m=f.getValue({item:d});return(Array.isArray(m)?m:[m]).some(g=>yce(String(g)).includes(u))}))}t.filters&&t.filters?.length>0&&t.filters.forEach(u=>{let d=o.find(f=>f.id===u.field);if(d){u.operator===Ln&&(0,Sce.default)("The 'isNotAll' filter operator",{since:"7.0",alternative:"'isNone'"});let f=d.filter[u.operator];f&&(n=n.filter(m=>f(m,d,u.value)))}});let i=t.sort?.field?o.find(u=>u.enableSorting!==!1&&u.id===t.sort?.field):null,s=t.groupBy?.field?o.find(u=>u.enableSorting!==!1&&u.id===t.groupBy?.field):null;(i||s)&&n.sort((u,d)=>{if(s){let f=s.sort(u,d,t.groupBy?.direction??"asc");if(f!==0)return f}return i?i.sort(u,d,t.sort?.direction??"desc"):0});let l=n.length,c=1;if(t.infiniteScrollEnabled&&t.startPosition!==void 0&&t.perPage!==void 0){let u=t.startPosition-1,d=Math.min(u+t.perPage,l);n=n?.slice(u,d)}else if(t.page!==void 0&&t.perPage!==void 0){let u=(t.page-1)*t.perPage;l=n?.length||0,c=Math.ceil(l/t.perPage),n=n?.slice(u,u+t.perPage)}return{data:n,paginationInfo:{totalItems:l,totalPages:c}}}var SO=a(W(),1);var _ce=a(V(),1);var Df=a(T(),1);function xce({form:e,header:t}){let{media:r,fields:o,onChange:n}=E0();if(!r||!n)return(0,Df.jsx)("div",{className:"media-editor-form media-editor-form--loading",children:(0,Df.jsx)(SO.Spinner,{})});let i=["title","alt_text","caption","description"],s=[...o.filter(u=>i.includes(u.id)),...o.filter(u=>!i.includes(u.id))],l={layout:{type:"panel"},fields:s.map(u=>i.includes(u.id)?{id:u.id,layout:{type:"regular",labelPosition:"top"}}:u.id)},c=e||l;return(0,Df.jsx)("div",{className:"media-editor-form",children:(0,Df.jsxs)(SO.__experimentalVStack,{spacing:4,children:[(0,Df.jsx)(Ut,{render:(0,Df.jsx)("h2",{}),children:(0,_ce.__)("Media details")}),t,(0,Df.jsx)(TC,{data:r,fields:o,form:c,onChange:n})]})})}var Cce=a(zm(),1),{lock:Tce,unlock:Ece}=(0,Cce.__dangerousOptInToUnstableAPIsOnlyForCoreModules)("I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.","@wordpress/media-editor");var _O=a(G(),1);var Pce={isOpen:!1,id:null,onUpdate:null,onClose:null};function kce(e=Pce,t){switch(t.type){case"OPEN_MEDIA_EDITOR_MODAL":{let{id:r,onUpdate:o,onClose:n}=t;return{isOpen:!0,id:r,onUpdate:o,onClose:n}}case"CLOSE_MEDIA_EDITOR_MODAL":return Pce}return e}var vz={};Rn(vz,{closeMediaEditorModal:()=>Z8e,openMediaEditorModal:()=>K8e});function K8e({id:e,onUpdate:t,onClose:r}){return{type:"OPEN_MEDIA_EDITOR_MODAL",id:e,onUpdate:t??null,onClose:r??null}}function Z8e(){return{type:"CLOSE_MEDIA_EDITOR_MODAL"}}var bz={};Rn(bz,{getId:()=>Q8e,getOnClose:()=>$8e,getOnUpdate:()=>J8e,isOpen:()=>X8e});function X8e(e){return e.isOpen}function Q8e(e){return e.id}function J8e(e){return e.onUpdate}function $8e(e){return e.onClose}var Rce="core/media-editor";var iw=(0,_O.createReduxStore)(Rce,{reducer:kce,actions:vz,selectors:bz});(0,_O.register)(iw);var Ode=a(W(),1),WC=a(G(),1),UC=a(V(),1),Nde=a(fa(),1),Mde=a(Rt(),1);var Yn=a(W(),1);var Ade=a(ke(),1),HC=a(G(),1),Fz=a(oe(),1),Xo=a(H(),1),Gn=a(V(),1);var Fc=a(go(),1),o5=a(Rt(),1);var xz={};Rn(xz,{ActionItem:()=>Ol,ComplementaryArea:()=>Ml,ComplementaryAreaMoreMenuItem:()=>$p,FullscreenMode:()=>Xce,InterfaceSkeleton:()=>Bv,PinnedItems:()=>eh,store:()=>ze});var Nl=a(W(),1),RC=a(G(),1),OO=a(V(),1);var $u=a(H(),1),Sz=a(Oce(),1),Yce=a(Nt(),1),th=a(ke(),1),qce=a(Qp(),1);var Bce=a(W(),1),EO=a(G(),1),Vce=a(Qp(),1);var TO=a(G(),1);var yz={};Rn(yz,{closeModal:()=>c7e,disableComplementaryArea:()=>r7e,enableComplementaryArea:()=>t7e,openModal:()=>l7e,pinItem:()=>o7e,setDefaultComplementaryArea:()=>e7e,setFeatureDefaults:()=>a7e,setFeatureValue:()=>s7e,toggleFeature:()=>i7e,unpinItem:()=>n7e});var CO=a(Va(),1),Il=a(Nt(),1);var xO=a(Va(),1);function Ju(e){return["core/edit-post","core/edit-site"].includes(e)?((0,xO.default)(`${e} interface scope`,{alternative:"core interface scope",hint:"core/edit-post and core/edit-site are merging.",version:"6.6"}),"core"):e}function Dv(e,t){return e==="core"&&t==="edit-site/template"?((0,xO.default)("edit-site/template sidebar",{alternative:"edit-post/document",version:"6.6"}),"edit-post/document"):e==="core"&&t==="edit-site/block-inspector"?((0,xO.default)("edit-site/block-inspector sidebar",{alternative:"edit-post/block",version:"6.6"}),"edit-post/block"):t}var e7e=(e,t)=>(e=Ju(e),t=Dv(e,t),{type:"SET_DEFAULT_COMPLEMENTARY_AREA",scope:e,area:t}),t7e=(e,t)=>({registry:r,dispatch:o})=>{if(!t)return;e=Ju(e),t=Dv(e,t),r.select(Il.store).get(e,"isComplementaryAreaVisible")||r.dispatch(Il.store).set(e,"isComplementaryAreaVisible",!0),o({type:"ENABLE_COMPLEMENTARY_AREA",scope:e,area:t})},r7e=e=>({registry:t})=>{e=Ju(e),t.select(Il.store).get(e,"isComplementaryAreaVisible")&&t.dispatch(Il.store).set(e,"isComplementaryAreaVisible",!1)},o7e=(e,t)=>({registry:r})=>{if(!t)return;e=Ju(e),t=Dv(e,t);let o=r.select(Il.store).get(e,"pinnedItems");o?.[t]!==!0&&r.dispatch(Il.store).set(e,"pinnedItems",{...o,[t]:!0})},n7e=(e,t)=>({registry:r})=>{if(!t)return;e=Ju(e),t=Dv(e,t);let o=r.select(Il.store).get(e,"pinnedItems");r.dispatch(Il.store).set(e,"pinnedItems",{...o,[t]:!1})};function i7e(e,t){return function({registry:r}){(0,CO.default)("dispatch( 'core/interface' ).toggleFeature",{since:"6.0",alternative:"dispatch( 'core/preferences' ).toggle"}),r.dispatch(Il.store).toggle(e,t)}}function s7e(e,t,r){return function({registry:o}){(0,CO.default)("dispatch( 'core/interface' ).setFeatureValue",{since:"6.0",alternative:"dispatch( 'core/preferences' ).set"}),o.dispatch(Il.store).set(e,t,!!r)}}function a7e(e,t){return function({registry:r}){(0,CO.default)("dispatch( 'core/interface' ).setFeatureDefaults",{since:"6.0",alternative:"dispatch( 'core/preferences' ).setDefaults"}),r.dispatch(Il.store).setDefaults(e,t)}}function l7e(e){return{type:"OPEN_MODAL",name:e}}function c7e(){return{type:"CLOSE_MODAL"}}var wz={};Rn(wz,{getActiveComplementaryArea:()=>u7e,isComplementaryAreaLoading:()=>d7e,isFeatureActive:()=>m7e,isItemPinned:()=>f7e,isModalActive:()=>p7e});var EC=a(G(),1),Mce=a(Va(),1),PC=a(Nt(),1);var u7e=(0,EC.createRegistrySelector)(e=>(t,r)=>{r=Ju(r);let o=e(PC.store).get(r,"isComplementaryAreaVisible");if(o!==void 0)return o===!1?null:t?.complementaryAreas?.[r]}),d7e=(0,EC.createRegistrySelector)(e=>(t,r)=>{r=Ju(r);let o=e(PC.store).get(r,"isComplementaryAreaVisible"),n=t?.complementaryAreas?.[r];return o&&n===void 0}),f7e=(0,EC.createRegistrySelector)(e=>(t,r,o)=>(r=Ju(r),o=Dv(r,o),e(PC.store).get(r,"pinnedItems")?.[o]??!0)),m7e=(0,EC.createRegistrySelector)(e=>(t,r,o)=>((0,Mce.default)("select( 'core/interface' ).isFeatureActive( scope, featureName )",{since:"6.0",alternative:"select( 'core/preferences' ).get( scope, featureName )"}),!!e(PC.store).get(r,o)));function p7e(e,t){return e.activeModal===t}var Fce=a(G(),1);function h7e(e={},t){switch(t.type){case"SET_DEFAULT_COMPLEMENTARY_AREA":{let{scope:r,area:o}=t;return e[r]?e:{...e,[r]:o}}case"ENABLE_COMPLEMENTARY_AREA":{let{scope:r,area:o}=t;return{...e,[r]:o}}}return e}function g7e(e=null,t){switch(t.type){case"OPEN_MODAL":return t.name;case"CLOSE_MODAL":return null}return e}var Dce=(0,Fce.combineReducers)({complementaryAreas:h7e,activeModal:g7e});var Lce="core/interface";var ze=(0,TO.createReduxStore)(Lce,{reducer:Dce,actions:yz,selectors:wz});(0,TO.register)(ze);var jce=a(T(),1);function v7e(e){return["checkbox","option","radio","switch","menuitemcheckbox","menuitemradio","treeitem"].includes(e)}function sw({as:e=Bce.Button,scope:t,identifier:r,icon:o,selectedIcon:n,name:i,shortcut:s,...l}){let c=e,u=(0,Vce.usePluginContext)(),d=o||u.icon,f=r||`${u.name}/${i}`,m=(0,EO.useSelect)(v=>v(ze).getActiveComplementaryArea(t)===f,[f,t]),{enableComplementaryArea:h,disableComplementaryArea:g}=(0,EO.useDispatch)(ze);return(0,jce.jsx)(c,{icon:n&&m?n:d,"aria-controls":f.replace("/",":"),"aria-checked":v7e(l.role)?m:void 0,onClick:()=>{m?g(t):h(t,f)},shortcut:s,...l})}var PO=a(T(),1),b7e=({children:e,className:t,toggleButtonProps:r})=>{let o=(0,PO.jsx)(sw,{icon:_i,...r});return(0,PO.jsxs)("div",{className:Q("components-panel__header","interface-complementary-area-header",t),tabIndex:-1,children:[e,o]})},zce=b7e;var Wce=a(W(),1);var Jp=a(W(),1),kO=a(H(),1),kC=a(T(),1),Hce=()=>{};function y7e({name:e,as:t=Jp.MenuGroup,fillProps:r={},bubblesVirtually:o,...n}){return(0,kC.jsx)(Jp.Slot,{name:e,bubblesVirtually:o,fillProps:r,children:i=>{if(!kO.Children.toArray(i).length)return null;let s=[];kO.Children.forEach(i,({props:{__unstableExplicitMenuItem:c,__unstableTarget:u}})=>{u&&c&&s.push(u)});let l=kO.Children.map(i,c=>!c.props.__unstableExplicitMenuItem&&s.includes(c.props.__unstableTarget)?null:c);return(0,kC.jsx)(t,{...n,children:l})}})}function Uce({name:e,as:t=Jp.Button,onClick:r,...o}){return(0,kC.jsx)(Jp.Fill,{name:e,children:({onClick:n})=>(0,kC.jsx)(t,{onClick:r||n?(...i)=>{(r||Hce)(...i),(n||Hce)(...i)}:void 0,...o})})}Uce.Slot=y7e;var Ol=Uce;var RO=a(T(),1),w7e=({__unstableExplicitMenuItem:e,__unstableTarget:t,...r})=>(0,RO.jsx)(Wce.MenuItem,{...r});function $p({scope:e,target:t,__unstableExplicitMenuItem:r,...o}){return(0,RO.jsx)(sw,{as:n=>(0,RO.jsx)(Ol,{__unstableExplicitMenuItem:r,__unstableTarget:`${e}/${t}`,as:w7e,name:`${e}/plugin-more-menu`,...n}),role:"menuitemcheckbox",selectedIcon:To,name:t,scope:e,...o})}var IO=a(W(),1),AO=a(T(),1);function Gce({scope:e,...t}){return(0,AO.jsx)(IO.Fill,{name:`PinnedItems/${e}`,...t})}function S7e({scope:e,className:t,...r}){return(0,AO.jsx)(IO.Slot,{name:`PinnedItems/${e}`,...r,children:o=>o?.length>0&&(0,AO.jsx)("div",{className:Q(t,"interface-pinned-items"),children:o})})}Gce.Slot=S7e;var eh=Gce;var sn=a(T(),1),_7e=.3;function x7e({scope:e,...t}){return(0,sn.jsx)(Nl.Slot,{name:`ComplementaryArea/${e}`,...t})}var Kce=280,C7e={open:{width:Kce},closed:{width:0},mobileOpen:{width:"100vw"}};function T7e({activeArea:e,isActive:t,scope:r,children:o,className:n,id:i}){let s=(0,th.useReducedMotion)(),l=(0,th.useViewportMatch)("medium","<"),c=(0,th.usePrevious)(e),u=(0,th.usePrevious)(t),[,d]=(0,$u.useState)({});(0,$u.useEffect)(()=>{d({})},[t]);let f={type:"tween",duration:s||l||c&&e&&e!==c?0:_7e,ease:[.6,0,.4,1]};return(0,sn.jsx)(Nl.Fill,{name:`ComplementaryArea/${r}`,children:(0,sn.jsx)(Nl.__unstableAnimatePresence,{initial:!1,children:(u||t)&&(0,sn.jsx)(Nl.__unstableMotion.div,{variants:C7e,initial:"closed",animate:l?"mobileOpen":"open",exit:"closed",transition:f,className:"interface-complementary-area__fill",children:(0,sn.jsx)("div",{id:i,className:n,style:{width:l?"100vw":Kce},children:o})})})})}function E7e(e,t,r,o,n){let i=(0,$u.useRef)(!1),s=(0,$u.useRef)(!1),{enableComplementaryArea:l,disableComplementaryArea:c}=(0,RC.useDispatch)(ze);(0,$u.useEffect)(()=>{o&&n&&!i.current?(c(e),s.current=!0):s.current&&!n&&i.current?(s.current=!1,l(e,t)):s.current&&r&&r!==t&&(s.current=!1),n!==i.current&&(i.current=n)},[o,n,e,t,r,c,l])}function Zce({children:e,className:t,closeLabel:r=(0,OO.__)("Close plugin"),identifier:o,header:n,headerClassName:i,icon:s,isPinnable:l=!0,panelClassName:c,scope:u,name:d,title:f,toggleShortcut:m,isActiveByDefault:h}){let g=(0,qce.usePluginContext)(),v=s||g.icon,b=o||`${g.name}/${d}`,[S,y]=(0,$u.useState)(!1),{isLoading:w,isActive:_,isPinned:x,activeArea:E,isSmall:O,isLarge:A,showIconLabels:C}=(0,RC.useSelect)(F=>{let{getActiveComplementaryArea:D,isComplementaryAreaLoading:B,isItemPinned:L}=F(ze),{get:M}=F(Yce.store),z=D(u);return{isLoading:B(u),isActive:z===b,isPinned:L(u,b),activeArea:z,isSmall:F(Sz.store).isViewportMatch("< medium"),isLarge:F(Sz.store).isViewportMatch("large"),showIconLabels:M("core","showIconLabels")}},[b,u]),I=(0,th.useViewportMatch)("medium","<");E7e(u,b,E,_,O);let{enableComplementaryArea:k,disableComplementaryArea:P,pinItem:N,unpinItem:U}=(0,RC.useDispatch)(ze);if((0,$u.useEffect)(()=>{h&&E===void 0&&!O?k(u,b):E===void 0&&O&&P(u,b),y(!0)},[E,h,u,b,O,k,P]),!!S)return(0,sn.jsxs)(sn.Fragment,{children:[l&&(0,sn.jsx)(eh,{scope:u,children:x&&(0,sn.jsx)(sw,{scope:u,identifier:b,isPressed:_&&(!C||A),"aria-expanded":_,"aria-disabled":w,label:f,icon:C?To:v,showTooltip:!C,variant:C?"tertiary":void 0,size:"compact",shortcut:m})}),d&&l&&(0,sn.jsx)($p,{target:d,scope:u,icon:v,identifier:b,children:f}),(0,sn.jsxs)(T7e,{activeArea:E,isActive:_,className:Q("interface-complementary-area",t),scope:u,id:b.replace("/",":"),children:[(0,sn.jsx)(zce,{className:i,closeLabel:r,onClose:()=>P(u),toggleButtonProps:{label:r,size:"compact",shortcut:m,scope:u,identifier:b},children:n||(0,sn.jsxs)(sn.Fragment,{children:[(0,sn.jsx)("h2",{className:"interface-complementary-area-header__title",children:f}),l&&!I&&(0,sn.jsx)(Nl.Button,{className:"interface-complementary-area__pin-unpin-item",icon:x?$L:QL,label:x?(0,OO.__)("Unpin from toolbar"):(0,OO.__)("Pin to toolbar"),onClick:()=>(x?U:N)(u,b),isPressed:x,"aria-expanded":x,size:"compact"})]})}),(0,sn.jsx)(Nl.Panel,{className:c,children:e})]})]})}Zce.Slot=x7e;var Ml=Zce;var _z=a(H(),1),P7e=({isActive:e})=>((0,_z.useEffect)(()=>{let t=!1;return document.body.classList.contains("sticky-menu")&&(t=!0,document.body.classList.remove("sticky-menu")),()=>{t&&document.body.classList.add("sticky-menu")}},[]),(0,_z.useEffect)(()=>(e?document.body.classList.add("is-fullscreen-mode"):document.body.classList.remove("is-fullscreen-mode"),()=>{e&&document.body.classList.remove("is-fullscreen-mode")}),[e]),null),Xce=P7e;var Qce=a(H(),1),Jce=a(T(),1),$ce=(0,Qce.forwardRef)(({children:e,className:t,ariaLabel:r,as:o="div",...n},i)=>(0,Jce.jsx)(o,{ref:i,className:Q("admin-ui-navigable-region",t),"aria-label":r,role:"region",tabIndex:"-1",...n,children:e}));$ce.displayName="NavigableRegion";var rh=$ce;var NO=a(H(),1),Lv=a(W(),1),oh=a(V(),1),aw=a(ke(),1),Ts=a(T(),1),tue=.25,eue={type:"tween",duration:tue,ease:[.6,0,.4,1]};function k7e(e){(0,NO.useEffect)(()=>{let t=document&&document.querySelector(`html:not(.${e})`);if(t)return t.classList.toggle(e),()=>{t.classList.toggle(e)}},[e])}var R7e={hidden:{opacity:1,marginTop:-60},visible:{opacity:1,marginTop:0},distractionFreeHover:{opacity:1,marginTop:0,transition:{...eue,delay:.2,delayChildren:.2}},distractionFreeHidden:{opacity:0,marginTop:-60},distractionFreeDisabled:{opacity:0,marginTop:0,transition:{...eue,delay:.8,delayChildren:.8}}};function A7e({isDistractionFree:e,footer:t,header:r,editorNotices:o,sidebar:n,secondarySidebar:i,content:s,actions:l,labels:c,className:u},d){let[f,m]=(0,aw.useResizeObserver)(),h=(0,aw.useViewportMatch)("medium","<"),v={type:"tween",duration:(0,aw.useReducedMotion)()?0:tue,ease:[.6,0,.4,1]};k7e("interface-interface-skeleton__html-container");let S={...{header:(0,oh._x)("Header","header landmark area"),body:(0,oh.__)("Content"),secondarySidebar:(0,oh.__)("Block Library"),sidebar:(0,oh._x)("Settings","settings landmark area"),actions:(0,oh.__)("Publish"),footer:(0,oh.__)("Footer")},...c};return(0,Ts.jsxs)("div",{ref:d,className:Q(u,"interface-interface-skeleton",!!t&&"has-footer"),children:[(0,Ts.jsxs)("div",{className:"interface-interface-skeleton__editor",children:[(0,Ts.jsx)(Lv.__unstableAnimatePresence,{initial:!1,children:!!r&&(0,Ts.jsx)(rh,{as:Lv.__unstableMotion.div,className:"interface-interface-skeleton__header",ariaLabel:S.header,initial:e&&!h?"distractionFreeHidden":"hidden",whileHover:e&&!h?"distractionFreeHover":"visible",animate:e&&!h?"distractionFreeDisabled":"visible",exit:e&&!h?"distractionFreeHidden":"hidden",variants:R7e,transition:v,children:r})}),e&&(0,Ts.jsx)("div",{className:"interface-interface-skeleton__header",children:o}),(0,Ts.jsxs)("div",{className:"interface-interface-skeleton__body",children:[(0,Ts.jsx)(Lv.__unstableAnimatePresence,{initial:!1,children:!!i&&(0,Ts.jsx)(rh,{className:"interface-interface-skeleton__secondary-sidebar",ariaLabel:S.secondarySidebar,as:Lv.__unstableMotion.div,initial:"closed",animate:"open",exit:"closed",variants:{open:{width:m.width},closed:{width:0}},transition:v,children:(0,Ts.jsxs)(Lv.__unstableMotion.div,{style:{position:"absolute",width:h?"100vw":"fit-content",height:"100%",left:0},variants:{open:{x:0},closed:{x:"-100%"}},transition:v,children:[f,i]})})}),(0,Ts.jsx)(rh,{className:"interface-interface-skeleton__content",ariaLabel:S.body,children:s}),!!n&&(0,Ts.jsx)(rh,{className:"interface-interface-skeleton__sidebar",ariaLabel:S.sidebar,children:n}),!!l&&(0,Ts.jsx)(rh,{className:"interface-interface-skeleton__actions",ariaLabel:S.actions,children:l})]})]}),!!t&&(0,Ts.jsx)(rh,{className:"interface-interface-skeleton__footer",ariaLabel:S.footer,children:t})]})}var Bv=(0,NO.forwardRef)(A7e);var id=a(H(),1),ude=a(W(),1),dde=a(V(),1);var ed=a(V(),1),Lf=1,AC=.1,el=10,Cz=16,oue=44,nue=.8,iue=8,MO=1,sue=.0025,IC=.01,FO=10,OC=45,I7e={x:0,y:0,width:1,height:1},O7e={horizontal:!1,vertical:!1},rue={x:0,y:0},lw={image:null,pan:{...rue},zoom:Lf,rotation:0,basePan:{...rue},baseZoom:Lf,baseRotation:0,flip:{...O7e},cropRect:{...I7e}},NC=-1,MC=[{label:(0,ed.__)("Free"),value:0},{label:(0,ed.__)("Original"),value:NC},{label:(0,ed.__)("Square (1:1)"),value:1},{label:(0,ed.__)("Landscape (16:9)"),value:16/9},{label:(0,ed.__)("Portrait (9:16)"),value:9/16},{label:(0,ed.__)("Classic (4:3)"),value:4/3},{label:(0,ed.__)("Classic portrait (3:4)"),value:3/4},{label:(0,ed.__)("Photo (3:2)"),value:3/2},{label:(0,ed.__)("Photo portrait (2:3)"),value:2/3}];var td=1e-6,rd=typeof Float32Array<"u"?Float32Array:Array,aue=Math.random;function Tz(e){return e>=0?Math.round(e):e%.5===0?Math.floor(e):Math.round(e)}var f4t=Math.PI/180,m4t=180/Math.PI;var Hr={};Rn(Hr,{add:()=>Z7e,clone:()=>M7e,copy:()=>F7e,create:()=>N7e,determinant:()=>j7e,equals:()=>$7e,exactEquals:()=>J7e,frob:()=>K7e,fromRotation:()=>W7e,fromScaling:()=>G7e,fromTranslation:()=>Y7e,fromValues:()=>L7e,identity:()=>D7e,invert:()=>V7e,mul:()=>e9e,multiply:()=>cue,multiplyScalar:()=>X7e,multiplyScalarAndAdd:()=>Q7e,rotate:()=>z7e,scale:()=>H7e,set:()=>B7e,str:()=>q7e,sub:()=>t9e,subtract:()=>uue,translate:()=>U7e});function N7e(){var e=new rd(6);return rd!=Float32Array&&(e[1]=0,e[2]=0,e[4]=0,e[5]=0),e[0]=1,e[3]=1,e}function M7e(e){var t=new rd(6);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t}function F7e(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}function D7e(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=1,e[4]=0,e[5]=0,e}function L7e(e,t,r,o,n,i){var s=new rd(6);return s[0]=e,s[1]=t,s[2]=r,s[3]=o,s[4]=n,s[5]=i,s}function B7e(e,t,r,o,n,i,s){return e[0]=t,e[1]=r,e[2]=o,e[3]=n,e[4]=i,e[5]=s,e}function V7e(e,t){var r=t[0],o=t[1],n=t[2],i=t[3],s=t[4],l=t[5],c=r*i-o*n;return c?(c=1/c,e[0]=i*c,e[1]=-o*c,e[2]=-n*c,e[3]=r*c,e[4]=(n*l-i*s)*c,e[5]=(o*s-r*l)*c,e):null}function j7e(e){return e[0]*e[3]-e[1]*e[2]}function cue(e,t,r){var o=t[0],n=t[1],i=t[2],s=t[3],l=t[4],c=t[5],u=r[0],d=r[1],f=r[2],m=r[3],h=r[4],g=r[5];return e[0]=o*u+i*d,e[1]=n*u+s*d,e[2]=o*f+i*m,e[3]=n*f+s*m,e[4]=o*h+i*g+l,e[5]=n*h+s*g+c,e}function z7e(e,t,r){var o=t[0],n=t[1],i=t[2],s=t[3],l=t[4],c=t[5],u=Math.sin(r),d=Math.cos(r);return e[0]=o*d+i*u,e[1]=n*d+s*u,e[2]=o*-u+i*d,e[3]=n*-u+s*d,e[4]=l,e[5]=c,e}function H7e(e,t,r){var o=t[0],n=t[1],i=t[2],s=t[3],l=t[4],c=t[5],u=r[0],d=r[1];return e[0]=o*u,e[1]=n*u,e[2]=i*d,e[3]=s*d,e[4]=l,e[5]=c,e}function U7e(e,t,r){var o=t[0],n=t[1],i=t[2],s=t[3],l=t[4],c=t[5],u=r[0],d=r[1];return e[0]=o,e[1]=n,e[2]=i,e[3]=s,e[4]=o*u+i*d+l,e[5]=n*u+s*d+c,e}function W7e(e,t){var r=Math.sin(t),o=Math.cos(t);return e[0]=o,e[1]=r,e[2]=-r,e[3]=o,e[4]=0,e[5]=0,e}function G7e(e,t){return e[0]=t[0],e[1]=0,e[2]=0,e[3]=t[1],e[4]=0,e[5]=0,e}function Y7e(e,t){return e[0]=1,e[1]=0,e[2]=0,e[3]=1,e[4]=t[0],e[5]=t[1],e}function q7e(e){return"mat2d("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+", "+e[4]+", "+e[5]+")"}function K7e(e){return Math.sqrt(e[0]*e[0]+e[1]*e[1]+e[2]*e[2]+e[3]*e[3]+e[4]*e[4]+e[5]*e[5]+1)}function Z7e(e,t,r){return e[0]=t[0]+r[0],e[1]=t[1]+r[1],e[2]=t[2]+r[2],e[3]=t[3]+r[3],e[4]=t[4]+r[4],e[5]=t[5]+r[5],e}function uue(e,t,r){return e[0]=t[0]-r[0],e[1]=t[1]-r[1],e[2]=t[2]-r[2],e[3]=t[3]-r[3],e[4]=t[4]-r[4],e[5]=t[5]-r[5],e}function X7e(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e[3]=t[3]*r,e[4]=t[4]*r,e[5]=t[5]*r,e}function Q7e(e,t,r,o){return e[0]=t[0]+r[0]*o,e[1]=t[1]+r[1]*o,e[2]=t[2]+r[2]*o,e[3]=t[3]+r[3]*o,e[4]=t[4]+r[4]*o,e[5]=t[5]+r[5]*o,e}function J7e(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]&&e[4]===t[4]&&e[5]===t[5]}function $7e(e,t){var r=e[0],o=e[1],n=e[2],i=e[3],s=e[4],l=e[5],c=t[0],u=t[1],d=t[2],f=t[3],m=t[4],h=t[5];return Math.abs(r-c)<=td*Math.max(1,Math.abs(r),Math.abs(c))&&Math.abs(o-u)<=td*Math.max(1,Math.abs(o),Math.abs(u))&&Math.abs(n-d)<=td*Math.max(1,Math.abs(n),Math.abs(d))&&Math.abs(i-f)<=td*Math.max(1,Math.abs(i),Math.abs(f))&&Math.abs(s-m)<=td*Math.max(1,Math.abs(s),Math.abs(m))&&Math.abs(l-h)<=td*Math.max(1,Math.abs(l),Math.abs(h))}var e9e=cue,t9e=uue;var Es={};Rn(Es,{add:()=>s9e,angle:()=>E9e,ceil:()=>a9e,clone:()=>r9e,copy:()=>n9e,create:()=>due,cross:()=>b9e,dist:()=>D9e,distance:()=>hue,div:()=>F9e,divide:()=>pue,dot:()=>v9e,equals:()=>I9e,exactEquals:()=>A9e,floor:()=>l9e,forEach:()=>V9e,fromValues:()=>o9e,inverse:()=>h9e,len:()=>O9e,length:()=>vue,lerp:()=>y9e,max:()=>u9e,min:()=>c9e,mul:()=>M9e,multiply:()=>mue,negate:()=>p9e,normalize:()=>g9e,random:()=>w9e,rotate:()=>T9e,round:()=>d9e,scale:()=>f9e,scaleAndAdd:()=>m9e,set:()=>i9e,signedAngle:()=>P9e,sqrDist:()=>L9e,sqrLen:()=>B9e,squaredDistance:()=>gue,squaredLength:()=>bue,str:()=>R9e,sub:()=>N9e,subtract:()=>fue,transformMat2:()=>S9e,transformMat2d:()=>_9e,transformMat3:()=>x9e,transformMat4:()=>C9e,zero:()=>k9e});function due(){var e=new rd(2);return rd!=Float32Array&&(e[0]=0,e[1]=0),e}function r9e(e){var t=new rd(2);return t[0]=e[0],t[1]=e[1],t}function o9e(e,t){var r=new rd(2);return r[0]=e,r[1]=t,r}function n9e(e,t){return e[0]=t[0],e[1]=t[1],e}function i9e(e,t,r){return e[0]=t,e[1]=r,e}function s9e(e,t,r){return e[0]=t[0]+r[0],e[1]=t[1]+r[1],e}function fue(e,t,r){return e[0]=t[0]-r[0],e[1]=t[1]-r[1],e}function mue(e,t,r){return e[0]=t[0]*r[0],e[1]=t[1]*r[1],e}function pue(e,t,r){return e[0]=t[0]/r[0],e[1]=t[1]/r[1],e}function a9e(e,t){return e[0]=Math.ceil(t[0]),e[1]=Math.ceil(t[1]),e}function l9e(e,t){return e[0]=Math.floor(t[0]),e[1]=Math.floor(t[1]),e}function c9e(e,t,r){return e[0]=Math.min(t[0],r[0]),e[1]=Math.min(t[1],r[1]),e}function u9e(e,t,r){return e[0]=Math.max(t[0],r[0]),e[1]=Math.max(t[1],r[1]),e}function d9e(e,t){return e[0]=Tz(t[0]),e[1]=Tz(t[1]),e}function f9e(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e}function m9e(e,t,r,o){return e[0]=t[0]+r[0]*o,e[1]=t[1]+r[1]*o,e}function hue(e,t){var r=t[0]-e[0],o=t[1]-e[1];return Math.sqrt(r*r+o*o)}function gue(e,t){var r=t[0]-e[0],o=t[1]-e[1];return r*r+o*o}function vue(e){var t=e[0],r=e[1];return Math.sqrt(t*t+r*r)}function bue(e){var t=e[0],r=e[1];return t*t+r*r}function p9e(e,t){return e[0]=-t[0],e[1]=-t[1],e}function h9e(e,t){return e[0]=1/t[0],e[1]=1/t[1],e}function g9e(e,t){var r=t[0],o=t[1],n=r*r+o*o;return n>0&&(n=1/Math.sqrt(n)),e[0]=t[0]*n,e[1]=t[1]*n,e}function v9e(e,t){return e[0]*t[0]+e[1]*t[1]}function b9e(e,t,r){var o=t[0]*r[1]-t[1]*r[0];return e[0]=e[1]=0,e[2]=o,e}function y9e(e,t,r,o){var n=t[0],i=t[1];return e[0]=n+o*(r[0]-n),e[1]=i+o*(r[1]-i),e}function w9e(e,t){t=t===void 0?1:t;var r=aue()*2*Math.PI;return e[0]=Math.cos(r)*t,e[1]=Math.sin(r)*t,e}function S9e(e,t,r){var o=t[0],n=t[1];return e[0]=r[0]*o+r[2]*n,e[1]=r[1]*o+r[3]*n,e}function _9e(e,t,r){var o=t[0],n=t[1];return e[0]=r[0]*o+r[2]*n+r[4],e[1]=r[1]*o+r[3]*n+r[5],e}function x9e(e,t,r){var o=t[0],n=t[1];return e[0]=r[0]*o+r[3]*n+r[6],e[1]=r[1]*o+r[4]*n+r[7],e}function C9e(e,t,r){var o=t[0],n=t[1];return e[0]=r[0]*o+r[4]*n+r[12],e[1]=r[1]*o+r[5]*n+r[13],e}function T9e(e,t,r,o){var n=t[0]-r[0],i=t[1]-r[1],s=Math.sin(o),l=Math.cos(o);return e[0]=n*l-i*s+r[0],e[1]=n*s+i*l+r[1],e}function E9e(e,t){var r=e[0],o=e[1],n=t[0],i=t[1];return Math.abs(Math.atan2(o*n-r*i,r*n+o*i))}function P9e(e,t){var r=e[0],o=e[1],n=t[0],i=t[1];return Math.atan2(r*i-o*n,r*n+o*i)}function k9e(e){return e[0]=0,e[1]=0,e}function R9e(e){return"vec2("+e[0]+", "+e[1]+")"}function A9e(e,t){return e[0]===t[0]&&e[1]===t[1]}function I9e(e,t){var r=e[0],o=e[1],n=t[0],i=t[1];return Math.abs(r-n)<=td*Math.max(1,Math.abs(r),Math.abs(n))&&Math.abs(o-i)<=td*Math.max(1,Math.abs(o),Math.abs(i))}var O9e=vue,N9e=fue,M9e=mue,F9e=pue,D9e=hue,L9e=gue,B9e=bue,V9e=(function(){var e=due();return function(t,r,o,n,i,s){var l,c;for(r||(r=2),o||(o=0),n?c=Math.min(n*r+o,t.length):c=t.length,l=o;l<c;l+=r)e[0]=t[l],e[1]=t[l+1],i(e,e,s),t[l]=e[0],t[l+1]=e[1];return t}})();function cw(e){return e>=0?e%360:(360+e%360)%360}function Ic(e){return e*Math.PI/180}var DO=1e6;function Un(e,t){return!Number.isFinite(e)||Math.abs(e)>DO?t:e}function LO(e){return Number.isFinite(e)&&Math.abs(e)<=DO}function an(e){return Number.isFinite(e.width)&&Number.isFinite(e.height)&&e.width>=Number.EPSILON&&e.height>=Number.EPSILON&&e.width<=DO&&e.height<=DO}function BO(e){let t=Un(e.x,0),r=Un(e.y,0),o=Un(e.width,0),n=Un(e.height,0);return t===e.x&&r===e.y&&o===e.width&&n===e.height?e:{x:t,y:r,width:o,height:n}}function ma(e){let t=Un(e.pan.x,0),r=Un(e.pan.y,0),o=Un(e.basePan.x,0),n=Un(e.basePan.y,0),i=Un(e.rotation,0),s=Un(e.baseRotation,0),l=Un(e.zoom,1),c=l>=Number.EPSILON?l:1,u=Un(e.baseZoom,1),d=u>=Number.EPSILON?u:1,f=BO(e.cropRect),m=t===e.pan.x&&r===e.pan.y,h=o===e.basePan.x&&n===e.basePan.y;return m&&h&&c===e.zoom&&d===e.baseZoom&&i===e.rotation&&s===e.baseRotation&&f===e.cropRect?e:{...e,pan:m?e.pan:{x:t,y:r},zoom:c,rotation:i,basePan:h?e.basePan:{x:o,y:n},baseZoom:d,baseRotation:s,cropRect:f}}var w4t=Hr.create(),S4t=Es.create();function Wn(e,t,r){if(!LO(e)||!LO(t)||!LO(r)||e<=0||t<=0)return{width:0,height:0};let o=Ic(r),n=Math.abs(Math.cos(o)),i=Math.abs(Math.sin(o));return{width:n*e+i*t,height:i*e+n*t}}function yue(e,t,r){if(!an(e)||!an(t))return{elementSize:{width:0,height:0},visualSize:{width:0,height:0}};let o=Un(r,0),n=Math.round(o/90)*90,i=Wn(t.width,t.height,n);if(i.width===0||i.height===0)return{elementSize:{width:0,height:0},visualSize:{width:0,height:0}};let s=Math.min(e.width/i.width,e.height/i.height),l=t.width*s,c=t.height*s,u=Wn(l,c,n);return{elementSize:{width:l,height:c},visualSize:u}}function wue(e,t,r,o,n){let i=e.width*r.width,s=e.height*r.height;if(!an(t)||!an(r)||!(i>0)||!(s>0)||!Number.isFinite(o)||!Number.isFinite(n)||!(o>0)||!(n>=1))return 1;let l=o*t.width/i,c=o*t.height/s,u=Math.min(l,c);return Math.min(n,Math.max(1,u))}function nh(e,t,r){let o=Hr.create();if(!an(t)||!an(r))return o;let n=ma(e),i=Math.round(n.rotation/90)*90,s=Wn(r.width,r.height,i);if(s.width===0||s.height===0)return o;let l=Math.min(t.width/s.width,t.height/s.height),c=r.width*l,u=r.height*l,{width:d,height:f}=Wn(c,u,i);return Hr.translate(o,o,[t.width/2,t.height/2]),Hr.translate(o,o,[n.pan.x*d,n.pan.y*f]),Hr.scale(o,o,[n.flip.horizontal?-1:1,n.flip.vertical?-1:1]),Hr.rotate(o,o,Ic(n.rotation)),Hr.scale(o,o,[n.zoom,n.zoom]),Hr.translate(o,o,[-c/2,-u/2]),Hr.scale(o,o,[c,u]),o}function j9e(e,t){let r=t.map(l=>{let c=Es.create();return Es.transformMat2d(c,l,e),c}),o=r[0][0],n=r[0][0],i=r[0][1],s=r[0][1];for(let l=1;l<r.length;l++){let c=r[l];c[0]<o&&(o=c[0]),c[0]>n&&(n=c[0]),c[1]<i&&(i=c[1]),c[1]>s&&(s=c[1])}return{left:o,top:i,width:n-o,height:s-i}}function FC(e){return j9e(e,[[0,0],[1,0],[1,1],[0,1]])}function Sue(e,t,r){let o=Hr.create();if(!an(t)||!an(r))return o;let{rotation:n,flip:i,cropRect:s,zoom:l,pan:c}=ma(e),u=Math.round(n/90)*90,{width:d,height:f}=Wn(t.width,t.height,u),m=s.width*d,h=s.height*f,g=m>0?r.width/m:1,v=h>0?r.height/h:1,b=s.x*d+r.width/2/g,S=s.y*f+r.height/2/v,y=d/2+c.x*d,w=f/2+c.y*f;return Hr.scale(o,o,[g,v]),Hr.translate(o,o,[y-b+r.width/2/g,w-S+r.height/2/v]),Hr.scale(o,o,[i.horizontal?-1:1,i.vertical?-1:1]),Hr.rotate(o,o,Ic(n)),Hr.scale(o,o,[l,l]),Hr.translate(o,o,[-t.width/2,-t.height/2]),o}var _ue=.92;function z9e(e){return new Promise((t,r)=>{let o=new Image;o.addEventListener("load",()=>t(o)),o.addEventListener("error",n=>r(n)),o.crossOrigin="anonymous",o.src=e})}function H9e(e,t){let{naturalWidth:r,naturalHeight:o}=e,{rotation:n,cropRect:i}=t,s={width:r,height:o},l=Math.round(n/90)*90,c=Wn(r,o,l),u=Math.round(i.width*c.width),d=Math.round(i.height*c.height),f=document.createElement("canvas");f.width=u,f.height=d;let m=f.getContext("2d");if(!m)throw new Error("Could not obtain a 2D context for the export canvas.");let h=Sue(t,s,{width:u,height:d});return m.setTransform(h[0],h[1],h[2],h[3],h[4],h[5]),m.drawImage(e,0,0),f}function U9e(e,t="image/png",r=_ue){return new Promise((o,n)=>{e.toBlob(i=>{i?o(i):n(new Error("Canvas toBlob returned null."))},t,r)})}async function VO(e,t,r="image/png",o=_ue){let n=await z9e(e),i=H9e(n,t);return U9e(i,r,o)}var Bf=1e-9;function jO(e,t){let r=Ic(e),o=Math.abs(Math.cos(r)),n=Math.abs(Math.sin(r)),i=Wn(t,1,e);return{visualW:i.width,visualH:i.height,absC:o,absS:n}}function Eue(e,t,r){let o=Math.max(t,Number.EPSILON),n=Math.round(e/90)*90,{visualW:i,visualH:s}=jO(n,o),{absC:l,absS:c}=jO(e,o),u=r.width*i/2,d=r.height*s/2,f=u*l+d*c,m=u*c+d*l,h=2*f/o,g=2*m;return Math.max(h,g)}function uw(e){if(!e.image)return Lf;let t={width:e.image.naturalWidth,height:e.image.naturalHeight};if(!an(t))return Lf;let r=ma(e),o=t.width/t.height;return Math.max(AC,Eue(r.rotation,o,r.cropRect))}function Pue(e,t,r){if(!an(t)||!an(r))return{minX:0,minY:0,maxX:1,maxY:1};let o=ma(e),n=o.pan.x*r.width,i=o.pan.y*r.height,s=Ic(o.rotation),l=Math.cos(s),c=Math.sin(s),u=o.flip.horizontal?-1:1,d=o.flip.vertical?-1:1,f=o.zoom,m=u*l*f,h=d*c*f,g=-u*c*f,v=d*l*f,b=t.width/2,S=t.height/2,y=[[-b,-S],[b,-S],[b,S],[-b,S]],w=1/0,_=-1/0,x=1/0,E=-1/0;for(let[O,A]of y){let C=m*O+g*A+n,I=h*O+v*A+i,k=C/r.width+.5,P=I/r.height+.5;w=Math.min(w,k),_=Math.max(_,k),x=Math.min(x,P),E=Math.max(E,P)}return{minX:w,minY:x,maxX:_,maxY:E}}function kue(e,t,r,o){let n=BO(e),i=Un(t,1),s=i>=Number.EPSILON?i:1,l=Un(r,0),c=Un(o,1),u=Math.max(c,Number.EPSILON),d=Math.round(l/90)*90,{visualW:f,visualH:m}=jO(d,u),{absC:h,absS:g}=jO(l,u),v=n.width,b=n.height,S=v*f,y=b*m,w=S*h+y*g,_=S*g+y*h,x=u*s,E=s,O=1;if(w>0&&(O=Math.min(O,x/w)),_>0&&(O=Math.min(O,E/_)),O>=1-Bf)return n;let A=v*O,C=b*O,I=n.x+v/2,k=n.y+b/2,P=I-A/2,N=k-C/2;return P=Math.max(0,Math.min(P,1-A)),N=Math.max(0,Math.min(N,1-C)),{x:P,y:N,width:A,height:C}}var xue={width:1e3,height:1e3},Cue=Hr.create(),Tue=Es.create();function Ps(e,t,r){let o=ma(e),n=BO(r),i=an(t)?t.width/t.height:1,s=Math.max(AC,Eue(o.rotation,i,n)),l=Math.min(el,Math.max(o.zoom,s)),c={...o,zoom:l},u=nh(c,xue,t),d=Math.round(o.rotation/90)*90,f=nh({...c,pan:{x:0,y:0},zoom:1,rotation:d},xue,t),m=FC(f),h=[[m.left+n.x*m.width,m.top+n.y*m.height],[m.left+(n.x+n.width)*m.width,m.top+n.y*m.height],[m.left+(n.x+n.width)*m.width,m.top+(n.y+n.height)*m.height],[m.left+n.x*m.width,m.top+(n.y+n.height)*m.height]];Hr.invert(Cue,u);let g=1/0,v=-1/0,b=1/0,S=-1/0;for(let A of h){Es.transformMat2d(Tue,A,Cue);let C=Tue;C[0]<g&&(g=C[0]),C[0]>v&&(v=C[0]),C[1]<b&&(b=C[1]),C[1]>S&&(S=C[1])}if(g>=-Bf&&v<=1+Bf&&b>=-Bf&&S<=1+Bf)return{pan:o.pan,zoom:l};let y=0,w=0;g<0&&v<=1+Bf?y=-g:v>1&&g>=-Bf?y=1-v:g<0&&v>1&&(y=(1-v-g)/2),b<0&&S<=1+Bf?w=-b:S>1&&b>=-Bf?w=1-S:b<0&&S>1&&(w=(1-S-b)/2);let _=u[0]*y+u[2]*w,x=u[1]*y+u[3]*w,E=o.pan.x-(m.width>0?_/m.width:0),O=o.pan.y-(m.height>0?x/m.height:0);return{pan:{x:E,y:O},zoom:l}}var W9e=1e-6;function ih(e,t){return Math.abs(e-t)<W9e}function dw(e,t){let r=e.image,o=t.image;return r?.src===o?.src&&r?.naturalWidth===o?.naturalWidth&&r?.naturalHeight===o?.naturalHeight&&ih(e.pan.x,t.pan.x)&&ih(e.pan.y,t.pan.y)&&ih(e.zoom,t.zoom)&&ih(e.rotation,t.rotation)&&e.flip.horizontal===t.flip.horizontal&&e.flip.vertical===t.flip.vertical&&ih(e.cropRect.x,t.cropRect.x)&&ih(e.cropRect.y,t.cropRect.y)&&ih(e.cropRect.width,t.cropRect.width)&&ih(e.cropRect.height,t.cropRect.height)}function Rue(e,t){return e.image?Math.min(el,Math.max(AC,t)):Math.min(el,Math.max(Lf,t))}function G9e(e,t){switch(t.type){case"crop":return{type:"SET_CROP_RECT",payload:{...t.rect}};case"rotate":{let o=e.flip.horizontal!==e.flip.vertical?-t.degrees:t.degrees;return{type:"SET_ROTATION",payload:cw(e.rotation+o)}}case"flip":return{type:"SET_FLIP",payload:{...e.flip,[t.direction]:!e.flip[t.direction]}};case"zoom":return{type:"SET_ZOOM",payload:t.factor}}}function pa(e){if(!e.image)return e;let t={width:e.image.naturalWidth,height:e.image.naturalHeight},r=t.width/t.height,{pan:o,zoom:n}=Ps(e,t,e.cropRect),i=kue(e.cropRect,n,e.rotation,r),s=o;return i!==e.cropRect&&({pan:s}=Ps({...e,zoom:n,cropRect:i},t,i)),s.x===e.pan.x&&s.y===e.pan.y&&n===e.zoom&&i===e.cropRect?e:{...e,pan:s,zoom:n,cropRect:i}}function Vf(e){return e.basePan.x===e.pan.x&&e.basePan.y===e.pan.y&&e.baseZoom===e.zoom&&e.baseRotation===e.rotation?e:{...e,basePan:{x:e.pan.x,y:e.pan.y},baseZoom:e.zoom,baseRotation:e.rotation}}function Vv(e,t){switch(t.type){case"SET_IMAGE":return Vf(pa({...e,image:t.payload}));case"SET_PAN":return Vf(pa({...e,pan:t.payload}));case"SET_ZOOM":{let r=Rue(e,t.payload);return Vf(pa({...e,zoom:r}))}case"SET_ZOOM_AT_POINT":{let r=Rue(e,t.payload.zoom);return Vf(pa({...e,zoom:r,pan:t.payload.pan}))}case"SET_ROTATION":{let r=cw(t.payload),o=e.flip.horizontal!==e.flip.vertical,n=Ic(r-e.baseRotation),i=Math.cos(n),s=Math.sin(n)*(o?-1:1),l=e.cropRect.x+e.cropRect.width/2,c=e.cropRect.y+e.cropRect.height/2,u=l-.5,d=c-.5,f=e.basePan.x-u,m=e.basePan.y-d;return pa({...e,rotation:r,zoom:e.baseZoom,pan:{x:u+i*f-s*m,y:d+s*f+i*m}})}case"SNAP_ROTATE_90":{let r=t.payload.direction,n=e.flip.horizontal!==e.flip.vertical?-r:r,i=cw(e.rotation+n*90),s=e.cropRect,l=s.x+s.width/2,c=s.y+s.height/2,u=r===1?-e.pan.y:e.pan.y,d=r===1?e.pan.x:-e.pan.x;return Vf(pa({...e,rotation:i,zoom:e.baseZoom,pan:{x:u,y:d},cropRect:{x:l-s.height/2,y:c-s.width/2,width:s.height,height:s.width}}))}case"SET_FLIP":{let r=e.flip,o=t.payload,n=r.horizontal!==o.horizontal,i=r.vertical!==o.vertical,s=e.cropRect;return Vf(pa({...e,flip:o,pan:{x:n?-e.pan.x:e.pan.x,y:i?-e.pan.y:e.pan.y},cropRect:{x:n?1-s.x-s.width:s.x,y:i?1-s.y-s.height:s.y,width:s.width,height:s.height}}))}case"SET_CROP_RECT":return Vf(pa({...e,cropRect:t.payload}));case"SETTLE_CROP":{let r=e.cropRect;if(r.width===0||r.height===0||!e.image)return e;let o=1/Math.max(r.width,r.height),n=e.zoom>0?el/e.zoom:o,i=Math.min(o,n),s=r.width*i,l=r.height*i,c=r.x+r.width/2,u=r.y+r.height/2;return Vf(pa({...e,zoom:e.zoom*i,pan:{x:(e.pan.x-c+.5)*i,y:(e.pan.y-u+.5)*i},cropRect:{x:(1-s)/2,y:(1-l)/2,width:s,height:l}}))}case"APPLY_OPERATION":return Vv(e,G9e(e,t.payload));case"RESET":return Vf(pa({...lw,image:e.image,...t.payload}))}}function Aue(e,t){let r=Math.min(el,Math.max(uw(e),t));if(r===e.zoom)return null;let{cropRect:o}=e,n=o.x+o.width/2-.5,i=o.y+o.height/2-.5,s=1-r/e.zoom,l=e.pan.x+(n-e.pan.x)*s,c=e.pan.y+(i-e.pan.y)*s,u=e.image?{width:e.image.naturalWidth,height:e.image.naturalHeight}:{width:1,height:1},{pan:d}=Ps({...e,zoom:r,pan:{x:l,y:c}},u,e.cropRect);return{type:"SET_ZOOM_AT_POINT",payload:{zoom:r,pan:d}}}function zO(e,t){return{setPan:r=>e({type:"SET_PAN",payload:r}),setZoom:r=>{let o=Aue(t(),r);o&&e(o)},setZoomAtPoint:(r,o)=>e({type:"SET_ZOOM_AT_POINT",payload:{zoom:r,pan:o}}),setRotation:r=>e({type:"SET_ROTATION",payload:r}),setFlip:r=>e({type:"SET_FLIP",payload:r}),toggleFlip:r=>{let{flip:o}=t();e({type:"SET_FLIP",payload:{...o,[r]:!o[r]}})},snapRotate90:r=>e({type:"SNAP_ROTATE_90",payload:{direction:r}}),setCropRect:r=>e({type:"SET_CROP_RECT",payload:r}),settleCrop:()=>e({type:"SETTLE_CROP"}),applyOperation:r=>e({type:"APPLY_OPERATION",payload:r})}}var Je=a(H(),1),kz=a(V(),1);function jv(e,t){let r=1,o=1;if(e&&e>0&&t.width>0){let n=e*t.height/t.width;n<=1?r=n:o=1/n}return{x:(1-r)/2,y:(1-o)/2,width:r,height:o}}function Iue(e){return e<=0?Cz:Math.max(Cz,oue/e)}var Ez={width:.05,height:.05};function HO(e,t,r,o,n,i=Ez){let s=o.width>0?(t-e.startX)/o.width:0,l=o.height>0?(r-e.startY)/o.height:0,c=e.startRect,u=e.handle,d=c.y,f=c.y+c.height,m=c.x,h=c.x+c.width;return(u==="n"||u==="nw"||u==="ne")&&(d=Math.max(n.minY,Math.min(c.y+l,f-i.height))),(u==="s"||u==="sw"||u==="se")&&(f=Math.max(d+i.height,Math.min(c.y+c.height+l,n.maxY))),(u==="w"||u==="nw"||u==="sw")&&(m=Math.max(n.minX,Math.min(c.x+s,h-i.width))),(u==="e"||u==="ne"||u==="se")&&(h=Math.max(m+i.width,Math.min(c.x+c.width+s,n.maxX))),{x:m,y:d,width:h-m,height:f-d}}function Pz(e,t,r,o,n,i,s=Ez,l){if(i<=0||o.width<=0||o.height<=0)return{...e.startRect};let c=(t-e.startX)/o.width,u=(r-e.startY)/o.height,d=e.startRect,f=e.handle,m=f==="nw"||f==="sw"?d.x+d.width:d.x,h=f==="nw"||f==="ne"?d.y+d.height:d.y,g=f==="nw"||f==="sw"?-1:1,v=f==="nw"||f==="ne"?-1:1,b=(f==="nw"||f==="sw"?d.x:d.x+d.width)+c,S=(f==="nw"||f==="ne"?d.y:d.y+d.height)+u,y=(b-m)*g,w=(S-h)*v,_=Math.max(s.width,s.height*i),x=_/i;y=Math.max(y,_),w=Math.max(w,x);let E=i*o.width/o.height;l==="width"||!l&&y*o.width/(w*o.height)>E?w=y/i:y=w*i;let A=g>0?n.maxX-m:m-n.minX,C=v>0?n.maxY-h:h-n.minY;y>A&&(y=A,w=y/i),w>C&&(w=C,y=w*i),y=Math.max(y,_),w=Math.max(w,x);let I=g>0?m:m-y,k=v>0?h:h-w;return{x:I,y:k,width:y,height:w}}function Oue(e,t,r,o,n,i=Ez){let s=e.startRect,l=s.width*o.width;if(s.height*o.height<=0||l<=0)return HO(e,t,r,o,n,i);let u=s.width/s.height,d=e.handle;if(d==="nw"||d==="ne"||d==="sw"||d==="se")return Pz(e,t,r,o,n,u,i);let f=HO(e,t,r,o,n,i);if(d==="n"||d==="s"){let y=f.height,w=y*u,_=s.x+s.width/2,x=Math.min(_-n.minX,n.maxX-_)*2;w>x&&(w=x,y=w/u);let E=Math.max(i.height,i.width/u);y<E&&(y=E,w=y*u);let O=d==="n"?s.y+s.height-y:s.y;return{x:_-w/2,y:O,width:w,height:y}}let m=f.width,h=m/u,g=s.y+s.height/2,v=Math.min(g-n.minY,n.maxY-g)*2;h>v&&(h=v,m=h*u);let b=Math.max(i.width,i.height*u);return m<b&&(m=b,h=m/u),{x:d==="w"?s.x+s.width-m:s.x,y:g-h/2,width:m,height:h}}var Ur=a(H(),1);var Nue=300,Y9e=30,q9e=200;function jf(e){return e.image?{width:e.image.naturalWidth,height:e.image.naturalHeight}:{width:1,height:1}}function UO(e,t){let r=e.clientX-t.clientX,o=e.clientY-t.clientY;return Math.sqrt(r*r+o*o)}var Mue=class{options;isDragging=!1;isZooming=!1;drag=null;touch=null;touchCleanup=null;pointerCleanup=null;lastTap=null;zoomTimer;wheelGestureTimer;wheelGestureActive=!1;rafId=0;constructor(e){this.options=e}get minZoom(){return this.options.minZoom??Lf}get maxZoom(){return this.options.maxZoom??el}get zoomSpeed(){return this.options.zoomSpeed??sue}get keyboardStep(){return this.options.keyboardStep??IC}getKeyboardStep(e){return e.shiftKey?this.keyboardStep*FO:this.keyboardStep}get doubleTapZoom(){return this.options.doubleTapZoom??2}setStatus(e){let t=!1;e.isDragging!==void 0&&e.isDragging!==this.isDragging&&(this.isDragging=e.isDragging,t=!0),e.isZooming!==void 0&&e.isZooming!==this.isZooming&&(this.isZooming=e.isZooming,t=!0),t&&this.options.onStatusChange?.({isDragging:this.isDragging,isZooming:this.isZooming})}handlePointerDown(e,t){if(e.button!==0||e.pointerType==="touch")return;e.preventDefault();let r=t.ownerDocument;r?.activeElement instanceof HTMLElement&&r.activeElement!==t&&r.activeElement.blur(),t.focus(),t.setPointerCapture(e.pointerId),this.setStatus({isDragging:!0}),this.options.onGestureStart?.();let o=this.options.getState();this.drag={startX:e.clientX,startY:e.clientY,startPanX:o.pan.x,startPanY:o.pan.y};let n=l=>{let c=this.drag;if(!c)return;let u=l;cancelAnimationFrame(this.rafId),this.rafId=requestAnimationFrame(()=>{let d=this.options.getState(),f=this.options.getImageSize(),m=this.options.getContainerSize(),h=f??m,g=h.width>0?(u.clientX-c.startX)/h.width:0,v=h.height>0?(u.clientY-c.startY)/h.height:0,{pan:b}=Ps({...d,pan:{x:c.startPanX+g,y:c.startPanY+v}},jf(d),d.cropRect);this.options.actions.setPan(b)})},i=()=>{t.removeEventListener("pointermove",n),t.removeEventListener("pointerup",s),t.removeEventListener("lostpointercapture",s)},s=()=>{this.setStatus({isDragging:!1}),this.options.onGestureEnd?.(),this.drag=null,cancelAnimationFrame(this.rafId),i(),this.pointerCleanup=null};t.addEventListener("pointermove",n),t.addEventListener("pointerup",s),t.addEventListener("lostpointercapture",s),this.pointerCleanup=i}handleWheel(e){if(e.preventDefault(),this.drag)return;this.wheelGestureActive||(this.wheelGestureActive=!0,this.options.onGestureStart?.()),clearTimeout(this.wheelGestureTimer),this.wheelGestureTimer=setTimeout(()=>{this.wheelGestureActive=!1,this.options.onGestureEnd?.()},Nue);let t=this.options.getState(),r=-e.deltaY*this.zoomSpeed,o=Math.min(this.maxZoom,Math.max(this.minZoom,t.zoom+r));if(o===t.zoom)return;let n=this.options.getContainerSize(),s=this.options.getImageSize()??n,l=e.currentTarget,c=l instanceof Element?l.getBoundingClientRect():void 0;if(s.width>0&&s.height>0&&c){let u=e.clientX-c.left-n.width/2,d=e.clientY-c.top-n.height/2,f=1-o/t.zoom,m=u/s.width,h=d/s.height,g=t.pan.x+(m-t.pan.x)*f,v=t.pan.y+(h-t.pan.y)*f,{pan:b}=Ps({...t,zoom:o,pan:{x:g,y:v}},jf(t),t.cropRect);this.options.actions.setZoomAtPoint(o,b)}else this.options.actions.setZoom(o)}handleTouchStart(e,t,r=document){if(this.touch&&e.touches.length===2){let n=this.options.getState(),i=UO(e.touches[0],e.touches[1]),s=(e.touches[0].clientX+e.touches[1].clientX)/2,l=(e.touches[0].clientY+e.touches[1].clientY)/2;this.touch.didPinch=!0,this.touch.startDistance=i,this.touch.startZoom=n.zoom,this.touch.startPanX=n.pan.x,this.touch.startPanY=n.pan.y,this.touch.startMidX=s,this.touch.startMidY=l,this.touch.containerRect=t,this.setStatus({isDragging:!1});return}if(e.touches.length===1){let n=e.touches[0].clientX,i=e.touches[0].clientY;if(this.tryDoubleTap(e,n,i,t))return;let s=this.options.getState();this.touch={startDistance:0,startZoom:s.zoom,lastTouchX:e.touches[0].clientX,lastTouchY:e.touches[0].clientY,startPanX:s.pan.x,startPanY:s.pan.y,containerRect:t,startMidX:0,startMidY:0,didPinch:!1,moved:!1},this.options.onGestureStart?.()}else if(e.touches.length===2){let n=this.options.getState(),i=UO(e.touches[0],e.touches[1]),s=(e.touches[0].clientX+e.touches[1].clientX)/2,l=(e.touches[0].clientY+e.touches[1].clientY)/2;this.touch={startDistance:i,startZoom:n.zoom,lastTouchX:0,lastTouchY:0,startPanX:n.pan.x,startPanY:n.pan.y,containerRect:t,startMidX:s,startMidY:l,didPinch:!0,moved:!1},this.options.onGestureStart?.()}let o=()=>{this.touch=null,this.touchCleanup=null,cancelAnimationFrame(this.rafId),r.removeEventListener("touchmove",this.handleTouchMove),r.removeEventListener("touchend",o),r.removeEventListener("touchcancel",o),this.setStatus({isDragging:!1}),this.options.onGestureEnd?.()};this.touchCleanup?.(),r.addEventListener("touchmove",this.handleTouchMove,{passive:!1}),r.addEventListener("touchend",o),r.addEventListener("touchcancel",o),this.touchCleanup=o}handleTouchMove=e=>{let t=this.touch;t&&(e.preventDefault(),cancelAnimationFrame(this.rafId),this.rafId=requestAnimationFrame(()=>{let r=this.options.getState();if(e.touches.length===2){if(!t.didPinch){t.didPinch=!0,t.startDistance=UO(e.touches[0],e.touches[1]),t.startZoom=r.zoom,t.startPanX=r.pan.x,t.startPanY=r.pan.y,t.startMidX=(e.touches[0].clientX+e.touches[1].clientX)/2,t.startMidY=(e.touches[0].clientY+e.touches[1].clientY)/2,this.setStatus({isDragging:!1});return}let o=this.options.getContainerSize(),n=this.options.getImageSize(),i=e.touches[0],s=e.touches[1],c=UO(i,s)/t.startDistance,u=Math.min(this.maxZoom,Math.max(this.minZoom,t.startZoom*c)),d=n??o,f=t.containerRect;if(d.width>0&&d.height>0&&f){let m=(i.clientX+s.clientX)/2-f.left-o.width/2,h=(i.clientY+s.clientY)/2-f.top-o.height/2,g=t.startMidX-f.left-o.width/2,v=t.startMidY-f.top-o.height/2,b=d.width>0?(m-g)/d.width:0,S=d.height>0?(h-v)/d.height:0,y=t.startZoom!==0?1-u/t.startZoom:0,w=g/d.width,_=v/d.height,x=t.startPanX+b+(w-t.startPanX)*y,E=t.startPanY+S+(_-t.startPanY)*y,{pan:O}=Ps({...r,zoom:u,pan:{x,y:E}},jf(r),r.cropRect);this.options.actions.setZoomAtPoint(u,O)}else u!==r.zoom&&this.options.actions.setZoom(u)}else if(e.touches.length===1&&!t.didPinch){t.moved||(t.moved=!0,this.setStatus({isDragging:!0}));let o=this.options.getImageSize(),n=this.options.getContainerSize(),i=o??n,s=i.width>0?(e.touches[0].clientX-t.lastTouchX)/i.width:0,l=i.height>0?(e.touches[0].clientY-t.lastTouchY)/i.height:0,{pan:c}=Ps({...r,pan:{x:t.startPanX+s,y:t.startPanY+l}},jf(r),r.cropRect);this.options.actions.setPan(c)}}))};tryDoubleTap(e,t,r,o){let n=Date.now(),i=this.lastTap;if(!i)return this.lastTap={time:n,x:t,y:r},!1;let s=n-i.time,l=Math.sqrt((t-i.x)**2+(r-i.y)**2);if(!(s<Nue&&l<Y9e))return this.lastTap={time:n,x:t,y:r},!1;e.preventDefault(),this.lastTap=null;let u=this.options.getState(),d=this.options.getContainerSize(),f=this.options.getImageSize(),m=u.zoom>(this.minZoom+this.doubleTapZoom)/2?this.minZoom:this.doubleTapZoom,h=f??d;if(this.setStatus({isZooming:!0}),clearTimeout(this.zoomTimer),this.zoomTimer=setTimeout(()=>{this.setStatus({isZooming:!1})},q9e),this.options.onGestureStart?.(),h.width>0&&h.height>0){let g=t-o.left-d.width/2,v=r-o.top-d.height/2,b=1-m/u.zoom,S=g/h.width,y=v/h.height,w=u.pan.x+(S-u.pan.x)*b,_=u.pan.y+(y-u.pan.y)*b,{pan:x}=Ps({...u,zoom:m,pan:{x:w,y:_}},jf(u),u.cropRect);this.options.actions.setZoomAtPoint(m,x)}else this.options.actions.setZoom(m);return this.options.onGestureEnd?.(),!0}handleKeyDown(e){let t=this.options.getState();switch(e.key){case"ArrowUp":{e.preventDefault();let r=this.getKeyboardStep(e),{pan:o}=Ps({...t,pan:{x:t.pan.x,y:t.pan.y+r}},jf(t),t.cropRect);this.options.actions.setPan(o);break}case"ArrowDown":{e.preventDefault();let r=this.getKeyboardStep(e),{pan:o}=Ps({...t,pan:{x:t.pan.x,y:t.pan.y-r}},jf(t),t.cropRect);this.options.actions.setPan(o);break}case"ArrowLeft":{e.preventDefault();let r=this.getKeyboardStep(e),{pan:o}=Ps({...t,pan:{x:t.pan.x+r,y:t.pan.y}},jf(t),t.cropRect);this.options.actions.setPan(o);break}case"ArrowRight":{e.preventDefault();let r=this.getKeyboardStep(e),{pan:o}=Ps({...t,pan:{x:t.pan.x-r,y:t.pan.y}},jf(t),t.cropRect);this.options.actions.setPan(o);break}case"+":case"=":{e.preventDefault();let r=Math.min(this.maxZoom,Math.max(this.minZoom,t.zoom+.5));this.options.actions.setZoom(r);break}case"-":case"_":{e.preventDefault();let r=Math.min(this.maxZoom,Math.max(this.minZoom,t.zoom-.5));this.options.actions.setZoom(r);break}case"r":case"R":{if(e.metaKey||e.ctrlKey||e.altKey)break;e.preventDefault(),this.options.actions.snapRotate90(e.shiftKey?-1:1);break}case"h":case"H":{if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)break;e.preventDefault(),this.options.actions.toggleFlip?.("horizontal");break}case"v":case"V":{if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)break;e.preventDefault(),this.options.actions.toggleFlip?.("vertical");break}}}destroy(){cancelAnimationFrame(this.rafId),clearTimeout(this.zoomTimer),clearTimeout(this.wheelGestureTimer),this.touchCleanup?.(),this.touchCleanup=null,this.pointerCleanup?.(),this.pointerCleanup=null,this.drag=null,this.touch=null,this.lastTap=null}};var K9e=300;function Z9e(e){switch(e.key){case"ArrowUp":case"ArrowDown":case"ArrowLeft":case"ArrowRight":return!0;default:return!1}}function X9e(e){switch(e.key){case"+":case"=":case"-":case"_":return!0;default:return!1}}function Fue(e,t,r,o,n){let[i,s]=(0,Ur.useState)(!1),[l,c]=(0,Ur.useState)(!1),[u,d]=(0,Ur.useState)(!1),[f,m]=(0,Ur.useState)(!1),h=(0,Ur.useRef)(),g=(0,Ur.useRef)(!1),v=(0,Ur.useRef)(e);v.current=e;let b=(0,Ur.useRef)(r);b.current=r;let S=(0,Ur.useRef)(o);S.current=o;let y=(0,Ur.useRef)(n);y.current=n;let w=(0,Ur.useRef)(t);w.current=t;let _=(0,Ur.useRef)(null),x=(0,Ur.useCallback)(()=>{d(!0)},[]),E=(0,Ur.useCallback)(()=>{d(!1)},[]),O=(0,Ur.useCallback)(()=>{g.current||(g.current=!0,y.current?.onGestureStart?.()),clearTimeout(h.current),h.current=setTimeout(()=>{g.current=!1,m(!1),y.current?.onGestureEnd?.()},K9e)},[]);(0,Ur.useEffect)(()=>()=>{clearTimeout(h.current)},[]),(0,Ur.useEffect)(()=>{let P=new Mue({getState:()=>v.current,actions:{setPan:N=>w.current.setPan(N),setZoom:N=>w.current.setZoom(N),setZoomAtPoint:(N,U)=>w.current.setZoomAtPoint(N,U),snapRotate90:N=>w.current.snapRotate90(N),toggleFlip:N=>w.current.toggleFlip?.(N)},getContainerSize:()=>b.current,getImageSize:()=>S.current,get minZoom(){return y.current?.minZoom},get maxZoom(){return y.current?.maxZoom},get zoomSpeed(){return y.current?.zoomSpeed},get keyboardStep(){return y.current?.keyboardStep},get doubleTapZoom(){return y.current?.doubleTapZoom},onGestureStart:()=>{x(),y.current?.onGestureStart?.()},onGestureEnd:()=>{E(),y.current?.onGestureEnd?.()},onStatusChange:N=>{s(N.isDragging),c(N.isZooming)}});return _.current=P,()=>{P.destroy(),_.current=null}},[x,E]);let A=(0,Ur.useCallback)(P=>{let N=P.currentTarget;_.current?.handlePointerDown(P.nativeEvent,N)},[]),C=(0,Ur.useCallback)(P=>{let N=P.currentTarget,U=N.getBoundingClientRect();_.current?.handleTouchStart(P.nativeEvent,U,N.ownerDocument)},[]),I=(0,Ur.useCallback)(P=>{Z9e(P.nativeEvent)?(m(!0),O()):X9e(P.nativeEvent)&&O(),_.current?.handleKeyDown(P.nativeEvent)},[O]),k=(0,Ur.useCallback)(P=>{_.current?.handleWheel(P)},[]);return{handlers:{onPointerDown:A,onTouchStart:C,onKeyDown:I},onWheelNative:k,isDragging:i,isZooming:l,isPlacementActive:u||f||l}}var Lue=a(H(),1);var Q9e="matrix(1, 0, 0, 1, 0, 0)";function Due(e,t){if(!an(t))return Q9e;let r=ma(e),o=r.pan.x*t.width,n=r.pan.y*t.height,i=Ic(r.rotation),s=Math.cos(i),l=Math.sin(i),c=r.flip.horizontal?-1:1,u=r.flip.vertical?-1:1,d=r.zoom,f=c*s*d,m=u*l*d,h=-c*l*d,g=u*s*d;return`matrix(${f}, ${m}, ${h}, ${g}, ${o}, ${n})`}function Bue(e,t){return(0,Lue.useMemo)(()=>Due(e,t),[e,t])}var Oc=a(H(),1),Fl=a(V(),1),J9e=300;function Vue(e){let{horizontal:t,vertical:r}=e.flip;return t&&r?(0,Fl.__)("Flipped horizontally and vertically"):t?(0,Fl.__)("Flipped horizontally"):r?(0,Fl.__)("Flipped vertically"):(0,Fl.__)("Flip removed")}function $9e(e,t){if(t&&(t.flip.horizontal!==e.flip.horizontal||t.flip.vertical!==e.flip.vertical))return Vue(e);let r=[];r.push((0,Fl.sprintf)((0,Fl.__)("Zoom %d%%"),Math.round(e.zoom*100))),e.rotation!==0&&r.push((0,Fl.sprintf)((0,Fl.__)("Rotation %d degrees"),Math.round(e.rotation)));let o=Math.round(e.cropRect.width*100),n=Math.round(e.cropRect.height*100);return r.push((0,Fl.sprintf)((0,Fl.__)("Crop %1$d%% by %2$d%%"),o,n)),(e.flip.horizontal||e.flip.vertical)&&r.push(Vue(e)),r.join(", ")}function jue(e){let[t,r]=(0,Oc.useState)(""),o=(0,Oc.useRef)(),n=(0,Oc.useRef)(""),i=(0,Oc.useRef)(null),s=(0,Oc.useRef)(e);return(0,Oc.useLayoutEffect)(()=>{s.current=e},[e]),(0,Oc.useEffect)(()=>(clearTimeout(o.current),o.current=setTimeout(()=>{let l=s.current,c=$9e(l,i.current);i.current=l,c!==n.current&&(n.current=c,r(c))},J9e),()=>{clearTimeout(o.current)}),[e.zoom,e.rotation,e.cropRect.width,e.cropRect.height,e.flip.horizontal,e.flip.vertical]),t}var wn=a(H(),1),od=a(V(),1);var DC={position:"absolute",width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",border:0};var fw=a(T(),1),eje=["nw","ne","se","sw"],tje=["nw","n","ne","e","se","s","sw","w"];function rje(e){switch(e){case"n":return(0,od.__)("Resize top edge");case"s":return(0,od.__)("Resize bottom edge");case"e":return(0,od.__)("Resize right edge");case"w":return(0,od.__)("Resize left edge");case"nw":return(0,od.__)("Resize top-left corner");case"ne":return(0,od.__)("Resize top-right corner");case"sw":return(0,od.__)("Resize bottom-left corner");case"se":return(0,od.__)("Resize bottom-right corner")}}var oje=500;function zue({cropRect:e,containerSize:t,imageSize:r,onCropChange:o,onResizeStart:n,onResizeEnd:i,aspectRatio:s,freeformCrop:l=!1,isResizeDisabled:c=!1,stencilTransition:u,cropBounds:d,onEscape:f,minCropSize:m,snapCropRect:h,keyboardResizeStep:g}){let v=d?.minX??0,b=d?.minY??0,S=d?.maxX??1,y=d?.maxY??1,w=(0,wn.useMemo)(()=>({minX:v,minY:b,maxX:S,maxY:y}),[v,b,S,y]),_=(0,wn.useRef)(),x=(0,wn.useRef)(!1),E=(0,wn.useId)(),O=!!(s&&s>0),A=(0,wn.useRef)(null);(0,wn.useEffect)(()=>()=>{clearTimeout(_.current),x.current=!1,A.current?.cancel(!1)},[]),(0,wn.useEffect)(()=>{c&&A.current?.cancel()},[c]);let C=(0,wn.useRef)(null),I=(0,wn.useMemo)(()=>!O||r.width===0?0:s*r.height/r.width,[s,O,r.width,r.height]),k=(t.width-r.width)/2,P=(t.height-r.height)/2,N=k+e.x*r.width,U=P+e.y*r.height,F=e.width*r.width,D=e.height*r.height,B=(0,wn.useCallback)((q,X)=>{if(c||X.pointerType==="touch"&&X.isPrimary===!1){X.preventDefault(),X.stopPropagation();return}if(X.button!==0)return;X.preventDefault(),X.stopPropagation();let ie=X.currentTarget.ownerDocument;ie.activeElement instanceof HTMLElement&&ie.activeElement.blur();let $=X.currentTarget;$.setPointerCapture(X.pointerId);let le={handle:q,startX:X.clientX,startY:X.clientY,startRect:{...e}},ae=0,re=X.clientX,ve=X.clientY,Ce=X.shiftKey,_e=se=>{let fe=se;re=fe.clientX,ve=fe.clientY,Ce=fe.shiftKey,!ae&&(ae=requestAnimationFrame(()=>{ae=0;let Ne=C.current;if(!Ne)return;let Ie;Ne.hasLockedRatio?Ie=Ne.computeLockedRect(le,re,ve):Ce?Ie=Ne.computeShiftLockedRect(le,re,ve):(Ie=Ne.computeFreeRect(le,re,ve),Ie=Ne.snapCropRect?.(Ie,le.handle)??Ie),Ne.onCropChange(Ie)}))},Me=!1,ue=(se=!0,fe=!0)=>{Me||(Me=!0,ae&&(cancelAnimationFrame(ae),ae=0),$.removeEventListener("pointermove",_e),$.removeEventListener("pointerup",de),$.removeEventListener("lostpointercapture",de),A.current=null,se&&C.current?.onResizeEnd?.(),fe&&$.focus({preventScroll:!0}))},te=(se=!0)=>ue(se,!1),de=()=>ue();$.addEventListener("pointermove",_e),$.addEventListener("pointerup",de),$.addEventListener("lostpointercapture",de),A.current={cancel:te},n?.(q),clearTimeout(_.current),x.current=!1},[e,c,n]),L=(0,wn.useCallback)((q,X,ie)=>HO(q,X,ie,r,w,m),[r,w,m]),M=(0,wn.useCallback)((q,X,ie,$)=>Pz(q,X,ie,r,w,I,m,$),[r,w,I,m]),z=(0,wn.useCallback)((q,X,ie)=>Oue(q,X,ie,r,w,m),[r,w,m]);C.current={hasLockedRatio:O,computeLockedRect:M,computeFreeRect:L,computeShiftLockedRect:z,onCropChange:o,onResizeEnd:i,snapCropRect:h};let K=(0,wn.useCallback)((q,X)=>{let ie=X.key;if(c)return;if(ie==="Escape"){X.preventDefault(),X.stopPropagation(),f?.();return}if(ie!=="ArrowUp"&&ie!=="ArrowDown"&&ie!=="ArrowLeft"&&ie!=="ArrowRight")return;X.preventDefault(),X.stopPropagation(),x.current||(x.current=!0,n?.(q));let $=()=>{clearTimeout(_.current),_.current=setTimeout(()=>{x.current=!1,i?.()},oje)},le=X.shiftKey?FO:1,ae=g?.width??IC,re=g?.height??IC,ve=ae*le,Ce=re*le,_e=0,Me=0;ie==="ArrowLeft"&&(_e=-ve),ie==="ArrowRight"&&(_e=ve),ie==="ArrowUp"&&(Me=-Ce),ie==="ArrowDown"&&(Me=Ce);let ue=_e!==0?"width":"height";if(O){let te={handle:q,startX:0,startY:0,startRect:{...e}},de=_e*r.width,se=Me*r.height;o(M(te,de,se,ue)),$()}else{let te={handle:q,startX:0,startY:0,startRect:{...e}},de=_e*r.width,se=Me*r.height,fe=L(te,de,se);o(h?.(fe,q)??fe),$()}},[e,O,r.width,r.height,M,L,o,n,i,f,g,h,c]);if(t.width===0||t.height===0)return null;let Z=O?eje:tje;return(0,fw.jsxs)("div",{className:"wp-media-editor-image-editor__stencil","data-testid":"cropper-stencil",style:{left:N,top:U,width:F,height:D,transition:u},children:[l&&(0,fw.jsx)("div",{id:E,style:DC,children:(0,od.__)("Use arrow keys to resize the crop area. Hold Shift for larger steps.")}),(0,fw.jsx)("div",{className:"wp-media-editor-image-editor__stencil-rect",style:{width:"100%",height:"100%",top:0,left:0}}),l&&Z.map(q=>(0,fw.jsx)("button",{type:"button",className:`wp-media-editor-image-editor__handle wp-media-editor-image-editor__handle--${q}`,onPointerDown:X=>B(q,X),onTouchStart:X=>{X.touches.length<2&&X.stopPropagation()},onKeyDown:X=>K(q,X),"aria-label":rje(q),"aria-describedby":E},q))]})}var Hue=a(T(),1);function Uue({cropRect:e,containerSize:t,imageSize:r,transition:o}){if(t.width===0||t.height===0)return null;let n=(t.width-r.width)/2,i=(t.height-r.height)/2,s=n+e.x*r.width,l=i+e.y*r.height,c=e.width*r.width,u=e.height*r.height,d=o?`${o}, box-shadow 0.15s ease`:void 0;return(0,Hue.jsx)("div",{className:"wp-media-editor-image-editor__dimming","data-testid":"cropper-dimming",style:{left:s,top:l,width:c,height:u,transition:d}})}var zv=a(T(),1);function Wue({cropRect:e,containerSize:t,imageSize:r}){if(t.width===0||t.height===0)return null;let o=(t.width-r.width)/2,n=(t.height-r.height)/2,i=o+e.x*r.width,s=n+e.y*r.height,l=e.width*r.width,c=e.height*r.height,u=l/3,d=c/3;return(0,zv.jsxs)("div",{className:"wp-media-editor-image-editor__grid","data-testid":"cropper-grid",style:{left:i,top:s,width:l,height:c},children:[(0,zv.jsx)("div",{className:"wp-media-editor-image-editor__grid-line wp-media-editor-image-editor__grid-line--horizontal",style:{top:d}}),(0,zv.jsx)("div",{className:"wp-media-editor-image-editor__grid-line wp-media-editor-image-editor__grid-line--horizontal",style:{top:d*2}}),(0,zv.jsx)("div",{className:"wp-media-editor-image-editor__grid-line wp-media-editor-image-editor__grid-line--vertical",style:{left:u}}),(0,zv.jsx)("div",{className:"wp-media-editor-image-editor__grid-line wp-media-editor-image-editor__grid-line--vertical",style:{left:u*2}})]})}var mw=a(H(),1),Zue=a(T(),1),WO=12,Gue={before:"-100%",center:"-50%",after:"0"},Yue={before:-1,center:0,after:1},nje={before:"after",center:"center",after:"before"};function ije(e){let t="center";e.includes("w")?t="before":e.includes("e")&&(t="after");let r="center";return e.includes("n")?r="before":e.includes("s")&&(r="after"),{x:t,y:r}}function que(e,t,r){return e==="before"?t-WO-r:e==="after"?t+WO:t-r/2}function Kue(e,t,r,o){let n=c=>{let u=que(c,t,r);return u>=0&&u+r<=o};if(n(e))return e;let i=nje[e];if(i!==e&&n(i))return i;if(e!=="center"&&n("center"))return"center";let s=c=>{let u=que(c,t,r);return Math.max(0,-u)+Math.max(0,u+r-o)};return[e,i,"center"].reduce((c,u)=>s(u)<s(c)?u:c)}function Xue({cropRect:e,containerSize:t,imageSize:r,activeHandle:o,outputWidth:n,outputHeight:i}){let s=(0,mw.useRef)(null),[l,c]=(0,mw.useState)(null);if((0,mw.useLayoutEffect)(()=>{if(!s.current)return;let w=s.current.getBoundingClientRect();c(_=>_&&_.width===w.width&&_.height===w.height?_:{width:w.width,height:w.height})},[n,i]),!o||t.width===0||t.height===0)return null;let u=(t.width-r.width)/2,d=(t.height-r.height)/2,f=u+e.x*r.width,m=d+e.y*r.height,h=e.width*r.width,g=e.height*r.height,v=f+h/2;o.includes("w")?v=f:o.includes("e")&&(v=f+h);let b=m+g/2;o.includes("n")?b=m:o.includes("s")&&(b=m+g);let S=ije(o),y=l?{x:Kue(S.x,v,l.width,t.width),y:Kue(S.y,b,l.height,t.height)}:S;return(0,Zue.jsx)("div",{ref:s,className:"wp-media-editor-image-editor__dimensions-tooltip","data-testid":"cropper-dimensions-tooltip",style:{left:v+Yue[y.x]*WO,top:b+Yue[y.y]*WO,transform:`translate(${Gue[y.x]}, ${Gue[y.y]})`},"aria-hidden":"true",children:`W: ${Math.round(n)}px H: ${Math.round(i)}px`})}function GO(e,t){let r=ma(e);if(!an(t))return{x:0,y:0,width:0,height:0,rotation:r.rotation,flip:{...r.flip},zoom:r.zoom};let o={width:1e3,height:1e3},n=nh(r,o,t),i=Hr.create();Hr.invert(i,n);let s=nh({...r,pan:{x:0,y:0},zoom:1},o,t),l=FC(s),c=r.cropRect,u=l.left+(c.x+c.width/2)*l.width,d=l.top+(c.y+c.height/2)*l.height,f=Es.create();Es.transformMat2d(f,[u,d],i);let m=Math.round(r.rotation/90)*90,{width:h,height:g}=Wn(t.width,t.height,m),v=c.width*h/r.zoom,b=c.height*g/r.zoom;return{x:f[0]*t.width-v/2,y:f[1]*t.height-b/2,width:v,height:b,rotation:r.rotation,flip:{...r.flip},zoom:r.zoom}}function sje(e,t,r){if(!an(t)||r.width<=0||r.height<=0)return null;let o=ma(e),n={width:1e3,height:1e3},i=nh({...o,pan:{x:0,y:0},zoom:1},n,t),s=FC(i);if(s.width<=0||s.height<=0)return null;let l=Es.fromValues((r.x+r.width/2)/t.width,(r.y+r.height/2)/t.height),c=Es.create(),u=nh(o,n,t);Es.transformMat2d(c,l,u);let d=Math.round(o.rotation/90)*90,{width:f,height:m}=Wn(t.width,t.height,d);if(f<=0||m<=0)return null;let h=r.width*o.zoom/f,g=r.height*o.zoom/m,v=(c[0]-s.left)/s.width,b=(c[1]-s.top)/s.height;return{x:v-h/2,y:b-g/2,width:h,height:g}}var aje=1e-6;function lje(e){let t=cw(e),r=Math.round(t/90)*90;return Math.abs(t-r)<aje}function Que(e,t,r,o){let n=ma(e);return lje(n.rotation)?$ue(n,t,r,{left:o.includes("w"),top:o.includes("n"),right:o.includes("e"),bottom:o.includes("s")}):r}function Jue(e,t,r){return $ue(e,t,r,{left:!0,top:!0,right:!0,bottom:!0})}function $ue(e,t,r,o){if(!an(t))return r;let n=ma({...e,cropRect:r}),i=GO(n,t),s=o.left||o.right,l=o.top||o.bottom,c=o.left?Math.round(i.x):i.x,u=o.top?Math.round(i.y):i.y,d=o.right?Math.round(i.x+i.width):i.x+i.width,f=o.bottom?Math.round(i.y+i.height):i.y+i.height;if(d<=c||f<=u)return r;let m=sje(n,t,{...i,x:c,y:u,width:d-c,height:f-u});return m?{x:s?m.x:r.x,y:l?m.y:r.y,width:s?m.width:r.width,height:l?m.height:r.height}:r}var YO=a(H(),1);var sh=a(H(),1);var pw={zoom:1,pan:{x:0,y:0}};function ede(e,t){switch(t.type){case"SET_VIEWPORT_ZOOM":{let r=Math.min(4,Math.max(.1,t.payload));return r===e.zoom?e:{...e,zoom:r}}case"SET_VIEWPORT_PAN":{let{x:r,y:o}=t.payload;return r===e.pan.x&&o===e.pan.y?e:{...e,pan:t.payload}}case"RESET_VIEWPORT":return e.zoom===pw.zoom&&e.pan.x===pw.pan.x&&e.pan.y===pw.pan.y?e:pw}}function tde(){let[e,t]=(0,sh.useReducer)(ede,pw),r=(0,sh.useCallback)(i=>{t({type:"SET_VIEWPORT_ZOOM",payload:i})},[]),o=(0,sh.useCallback)(i=>{t({type:"SET_VIEWPORT_PAN",payload:i})},[]),n=(0,sh.useCallback)(()=>{t({type:"RESET_VIEWPORT"})},[]);return(0,sh.useMemo)(()=>({viewport:e,setViewportZoom:r,setViewportPan:o,resetViewport:n}),[e,r,o,n])}var rde=a(T(),1),ode=(0,YO.createContext)(null);function nde({children:e}){let t=tde();return(0,rde.jsx)(ode.Provider,{value:t,children:e})}function ide(){let e=(0,YO.useContext)(ode);if(!e)throw new Error("useViewport must be used within a ViewportProvider.");return e}var ha=a(T(),1),Dl=1e-6,cje=1e-6,hw=200,uje=hw+100,sde=`transform ${hw}ms ease-out`,dje=[`left ${hw}ms ease-out`,`top ${hw}ms ease-out`,`width ${hw}ms ease-out`,`height ${hw}ms ease-out`].join(", ");function fje({src:e,controller:t,stencil:r=zue,showGrid:o=!1,isPlacementActive:n=!1,showDimming:i=!0,showDimensions:s=!0,minZoom:l,maxZoom:c,aspectRatio:u,freeformCrop:d=!1,focusOnMount:f=!1,onImageLoaded:m,onStateChange:h,onGestureStart:g,onGestureEnd:v,className:b},S){let{state:y,setImage:w,setCropRect:_,settleCrop:x,setVisualSize:E,adjustCropRectForViewport:O}=t,{viewport:A,setViewportPan:C,resetViewport:I}=ide(),k=(0,Je.useRef)(null),P=(0,Je.useId)(),[N,U]=(0,Je.useState)(f),[F,D]=(0,Je.useState)(!1),[B,L]=(0,Je.useState)({width:0,height:0});(0,Je.useLayoutEffect)(()=>{f&&k.current?.focus({preventScroll:!0})},[f]);let M=(0,Je.useCallback)(ye=>{let Be=ye.target;Be===ye.currentTarget&&U(!0),ye.relatedTarget!==null&&Be.matches(":focus-visible")&&D(!0)},[]),z=(0,Je.useCallback)(ye=>{ye.target===ye.currentTarget&&U(!1),ye.currentTarget.contains(ye.relatedTarget)||D(!1)},[]);(0,Je.useEffect)(()=>{let ye=k.current;if(!ye)return;let Be=new ResizeObserver(qe=>{for(let rr of qe){let{width:Vr,height:lo}=rr.contentRect;L(ts=>ts.width===Vr&&ts.height===lo?ts:{width:Vr,height:lo})}});return Be.observe(ye),()=>{Be.disconnect()}},[]),(0,Je.useEffect)(()=>{h?.(y)},[y,h]);let K=jue(y),Z=y.image?.naturalWidth??0,q=y.image?.naturalHeight??0,{elementSize:X,visualSize:ie}=(0,Je.useMemo)(()=>yue(B,{width:Z,height:q},y.rotation),[B,Z,q,y.rotation]);(0,Je.useEffect)(()=>{E(ie)},[ie,E]),(0,Je.useEffect)(()=>{if(d||ie.width===0||ie.height===0||!u||u<=0)return;let ye=jv(u,ie),Be=y.cropRect;Math.abs(Be.x-ye.x)<Dl&&Math.abs(Be.y-ye.y)<Dl&&Math.abs(Be.width-ye.width)<Dl&&Math.abs(Be.height-ye.height)<Dl||O(ye)},[d,u,ie,O,y.cropRect]);let $=(0,Je.useRef)(u);(0,Je.useEffect)(()=>{if($.current===u||($.current=u,!d||ie.width===0||ie.height===0||!u||u<=0))return;let ye=jv(u,ie),Be=y.cropRect;Math.abs(Be.x-ye.x)<Dl&&Math.abs(Be.y-ye.y)<Dl&&Math.abs(Be.width-ye.width)<Dl&&Math.abs(Be.height-ye.height)<Dl||O(ye)},[u,d,ie,O,y.cropRect]);let le=(0,Je.useMemo)(()=>{if(!(!y.image||X.width===0))return Pue(y,X,ie)},[y,X,ie]),ae=l!==void 0?l:uw(y),[re,ve]=(0,Je.useState)(!1),Ce=(0,Je.useRef)(!1),_e=(0,Je.useRef)(!1),[Me,ue]=(0,Je.useState)(!1),te=(0,Je.useRef)(!1),de=(0,Je.useCallback)(ye=>{te.current=ye,ue(ye)},[]),[se,fe]=(0,Je.useState)(null),Ne=(0,Je.useMemo)(()=>wue(y.cropRect,B,ie,nue,iue),[y.cropRect,B,ie]),[Ie,je]=(0,Je.useState)(1),Ge=re?Ie:Ne,Se=(0,Je.useMemo)(()=>({width:ie.width*Ge,height:ie.height*Ge}),[ie.width,ie.height,Ge]),Te=Z>0?X.width/Z*y.zoom*Ge:0,J=(0,Je.useMemo)(()=>{if(Te<MO||u&&u>0||Z<=0||q<=0)return;let ye=Math.round(y.rotation/90)*90;if(Math.abs(y.rotation-ye)>=cje)return;let Be=Wn(Z,q,ye);if(!(Be.width<=0||Be.height<=0))return{width:y.zoom/Be.width,height:y.zoom/Be.height}},[Te,u,Z,q,y.rotation,y.zoom]),he=(0,Je.useMemo)(()=>{if(Z<=0||q<=0)return;let ye=Math.round(y.rotation/90)*90,Be=Wn(Z,q,ye),qe=Iue(Te);return{width:Math.min(1,qe*y.zoom/Be.width),height:Math.min(1,qe*y.zoom/Be.height)}},[Z,q,y.rotation,y.zoom,Te]),ct=(0,Je.useCallback)((ye,Be)=>Te<MO||Z<=0||q<=0?ye:Que(y,{width:Z,height:q},ye,Be),[Te,Z,q,y]),Ke=(0,Je.useRef)(!1);(0,Je.useEffect)(()=>{let ye=d&&(!u||u<=0)&&Te>=MO&&Z>0&&q>0,Be=Ke.current;if(Ke.current=ye,!ye||Be)return;let qe=Jue(y,{width:Z,height:q},y.cropRect),rr=y.cropRect;Math.abs(rr.x-qe.x)<Dl&&Math.abs(rr.y-qe.y)<Dl&&Math.abs(rr.width-qe.width)<Dl&&Math.abs(rr.height-qe.height)<Dl||_(qe)},[u,Te,d,Z,q,_,y]);let{handlers:dt,onWheelNative:yt,isDragging:Pt,isZooming:_t,isPlacementActive:Ye}=Fue(y,t,B,Se,{minZoom:ae,maxZoom:c,onGestureStart:g,onGestureEnd:v}),La={...dt,onPointerDownCapture:()=>{D(!1)},onTouchStartCapture:ye=>{ye.touches.length>1&&de(!0)},onTouchMoveCapture:ye=>{ye.touches.length>1&&de(!0)},onTouchEndCapture:ye=>{ye.touches.length===0&&de(!1)},onTouchCancelCapture:ye=>{ye.touches.length===0&&de(!1)},onKeyDownCapture:ye=>{["Shift","Control","Alt","Meta"].includes(ye.key)||D(!0)},onPointerDown:ye=>{if(Ce.current||te.current||ye.pointerType==="touch"&&ye.isPrimary===!1){ye.preventDefault();return}dt.onPointerDown?.(ye),D(!1)}};(0,Je.useEffect)(()=>{let ye=k.current;if(!ye)return;let Be=qe=>{if(Ce.current||_e.current){qe.preventDefault();return}yt(qe)};return ye.addEventListener("wheel",Be,{passive:!1}),()=>{ye.removeEventListener("wheel",Be)}},[yt]);let js=Bue(y,ie),_r=(0,Je.useCallback)(ye=>{let Be=ye.currentTarget,qe={width:Be.naturalWidth,height:Be.naturalHeight};w({src:e,naturalWidth:qe.width,naturalHeight:qe.height}),m?.(qe)},[e,w,m]),uc=(0,Je.useCallback)(ye=>{if(!te.current&&(_(ye),Ce.current&&Se.width>0&&Se.height>0)){let Be=(B.width-Se.width)/2,qe=(B.height-Se.height)/2,rr=Math.max(0,Be+(ye.x+ye.width)*Se.width-B.width),Vr=Math.max(0,-(Be+ye.x*Se.width)),lo=Math.max(0,qe+(ye.y+ye.height)*Se.height-B.height),ts=Math.max(0,-(qe+ye.y*Se.height));C({x:-rr+Vr,y:-lo+ts})}},[_,C,B,Se]),[Kr,wt]=(0,Je.useState)(!1),Ht=(0,Je.useRef)(),ee=(0,Je.useCallback)(()=>{clearTimeout(Ht.current),_e.current=!1,wt(!1)},[]);(0,Je.useEffect)(()=>()=>{clearTimeout(Ht.current)},[]);let we=o==="interactive",j=we&&(Ye||re||n),Pe=(0,Je.useMemo)(()=>{if(!s||!se||!y.image)return null;let ye=GO(y,{width:y.image.naturalWidth,height:y.image.naturalHeight});return{width:ye.width,height:ye.height}},[s,se,y]),Dt=(0,Je.useCallback)(()=>{D(!0),k.current?.focus({preventScroll:!0})},[]),Ee=(0,Je.useCallback)(ye=>{te.current||(je(Ne),Ce.current=!0,ve(!0),fe(ye??null),ee(),I(),g?.())},[ee,g,I,Ne]),xo=(0,Je.useCallback)(()=>{let ye=te.current;if(Ce.current=!1,ve(!1),fe(null),clearTimeout(Ht.current),ye){ee(),I();return}_e.current=!0,wt(!0),I(),x(),v?.(),Ht.current=setTimeout(ee,uje)},[ee,x,v,I]),Ae=(0,Je.useCallback)(ye=>{!_e.current||ye.propertyName!=="transform"||ee()},[ee]),tr;Kr?tr=sde:_t&&(tr="transform 150ms linear");let ce=Kr?dje:void 0,me=(0,Je.useMemo)(()=>{if(X.width===0||X.height===0)return{};let ye=(B.width-X.width)/2,Be=(B.height-X.height)/2;return{width:X.width,height:X.height,maxWidth:X.width,maxHeight:X.height,left:ye,top:Be,transform:`scale(${Ge}) ${js}`,transition:tr,imageRendering:Te>1?"pixelated":void 0}},[B,X,js,tr,Te,Ge]),zs=Kr?sde:void 0,Yt=re||Kr?"transform":void 0,De;A.pan.x!==0||A.pan.y!==0?De={transform:`translate(${A.pan.x}px, ${A.pan.y}px)`,transition:zs,willChange:Yt}:Kr&&(De={transform:"translate(0px, 0px)",transition:zs,willChange:Yt});let dc=(0,Je.useCallback)(ye=>{typeof S=="function"?S(ye):S&&(S.current=ye)},[S]);return(0,ha.jsx)("div",{ref:dc,className:Q("wp-media-editor-image-editor",Pt&&"wp-media-editor-image-editor--dragging",b),children:(0,ha.jsxs)("div",{ref:k,className:Q("wp-media-editor-image-editor__canvas",we&&"wp-media-editor-image-editor__canvas--grid-interactive",j&&"wp-media-editor-image-editor__canvas--show-grid",Kr&&"wp-media-editor-image-editor__canvas--settling",F&&"wp-media-editor-image-editor__canvas--focus-visible"),tabIndex:0,role:"group","aria-label":(0,kz.__)("Crop area"),"aria-describedby":N?P:void 0,onFocus:M,onBlur:z,...La,children:[(0,ha.jsx)("div",{id:P,style:DC,children:(0,kz.__)("When this area is focused, use arrow keys to move the image and plus or minus to zoom. Tab to resize handles and controls.")}),(0,ha.jsxs)("div",{className:"wp-media-editor-image-editor__stage","data-testid":"cropper-stage",style:De,onTransitionEnd:Ae,children:[(0,ha.jsx)("img",{className:"wp-media-editor-image-editor__image","data-testid":"cropper-image",src:e,alt:"",onLoad:_r,style:me,draggable:!1}),i&&(0,ha.jsx)(Uue,{cropRect:y.cropRect,containerSize:B,imageSize:Se,transition:ce}),(0,ha.jsx)(r,{cropRect:y.cropRect,containerSize:B,imageSize:Se,onCropChange:uc,onResizeStart:Ee,onResizeEnd:xo,onEscape:Dt,aspectRatio:u,freeformCrop:d,isResizeDisabled:Me,stencilTransition:ce,cropBounds:le,minCropSize:he,snapCropRect:ct,keyboardResizeStep:J}),(o===!0||we)&&(0,ha.jsx)(Wue,{cropRect:y.cropRect,containerSize:B,imageSize:Se}),se&&Pe&&(0,ha.jsx)(Xue,{cropRect:y.cropRect,containerSize:B,imageSize:Se,activeHandle:se,outputWidth:Pe.width,outputHeight:Pe.height})]}),(0,ha.jsx)("div",{"aria-live":"polite","aria-atomic":"true",className:"wp-media-editor-image-editor__aria-live",style:DC,children:K})]})})}var mje=(0,Je.forwardRef)(fje),qO=(0,Je.forwardRef)((e,t)=>(0,ha.jsx)(nde,{children:(0,ha.jsx)(mje,{...e,ref:t})}));var nr=a(H(),1);var KO={aspectRatioValue:"0"};function ZO(e,t){switch(t.type){case"CROPPER":{let r=Vv(e.cropper,t.action);return r===e.cropper?e:{...e,cropper:r}}case"SET_ASPECT_RATIO_VALUE":{let{presetKey:r,resolved:o,visualSize:n}=t.payload,i=o!==void 0&&o>0&&n.width>0&&n.height>0,s={...e.cropOptions,aspectRatioValue:r};if(!i)return e.cropOptions.aspectRatioValue===r?e:{...e,cropOptions:s};let l=jv(o,n);return{cropper:Vv(e.cropper,{type:"SET_CROP_RECT",payload:l}),cropOptions:s}}case"RESET_CROP_OPTIONS":return e.cropOptions.aspectRatioValue===KO.aspectRatioValue?e:{...e,cropOptions:{...KO}};case"RESTORE_SNAPSHOT":return t.payload;case"VIEWPORT_ADJUST_CROP_RECT":{let r=Vv(e.cropper,{type:"SET_CROP_RECT",payload:t.payload});return r===e.cropper?e:{...e,cropper:r}}}}function LC(e,t){return e===t?!0:dw(e.cropper,t.cropper)&&e.cropOptions.aspectRatioValue===t.cropOptions.aspectRatioValue}function ade(e,t){return{cropper:e,cropOptions:{...KO,...t}}}function gw(e,t){let r=parseFloat(e);if(!(r===0||Number.isNaN(r))){if(r===NC)return t&&t.naturalWidth>0&&t.naturalHeight>0?t.naturalWidth/t.naturalHeight:void 0;if(r>0)return r}}function hje(e,t){return e?.src===t?.src&&e?.naturalWidth===t?.naturalWidth&&e?.naturalHeight===t?.naturalHeight}function Rz(e){let[t,r]=(0,nr.useReducer)(ZO,null,()=>ade(pa({...lw,...e?.cropper}),e?.cropOptions)),[o,n]=(0,nr.useState)(()=>t),i=(0,nr.useRef)(t),s=(0,nr.useRef)({width:0,height:0}),l=(0,nr.useRef)([]),c=(0,nr.useRef)([]),[u,d]=(0,nr.useState)(!1),[f,m]=(0,nr.useState)(!1),h=(0,nr.useRef)(!1),g=(0,nr.useRef)(null),v=(0,nr.useCallback)(B=>{let L=l.current[l.current.length-1];L&&LC(L,B)||(l.current=[...l.current,B],c.current=[],d(!0),m(!1))},[]),b=(0,nr.useCallback)((B,L=!0)=>{let M=i.current,z=ZO(M,B);L&&(LC(M,z)||(h.current?g.current===null&&(g.current=M):v(M))),i.current=z,r(B)},[v]),S=(0,nr.useCallback)(()=>{h.current||(h.current=!0,g.current=null)},[]),y=(0,nr.useCallback)(()=>{let B=g.current;B&&!LC(B,i.current)&&v(B),g.current=null,h.current=!1},[v]),w=(0,nr.useCallback)(B=>{b({type:"CROPPER",action:B})},[b]),_=(0,nr.useMemo)(()=>zO(w,()=>i.current.cropper),[w]),x=(0,nr.useCallback)(B=>{if(hje(i.current.cropper.image,B))return;let L={type:"CROPPER",action:{type:"SET_IMAGE",payload:B}},M=ZO(i.current,L);i.current=M,r(L),n(M),h.current=!1,g.current=null,l.current=[],c.current=[],d(!1),m(!1)},[]),E=(0,nr.useCallback)(B=>{b({type:"CROPPER",action:{type:"RESET",payload:B}})},[b]),O=(0,nr.useCallback)(B=>{let L=gw(B,i.current.cropper.image);b({type:"SET_ASPECT_RATIO_VALUE",payload:{presetKey:B,resolved:L,visualSize:s.current}})},[b]),A=(0,nr.useCallback)(()=>{b({type:"RESET_CROP_OPTIONS"})},[b]),C=(0,nr.useCallback)(()=>{y();let B=l.current[l.current.length-1];B&&(c.current=[i.current,...c.current],l.current=l.current.slice(0,-1),d(l.current.length>0),m(!0),i.current=B,r({type:"RESTORE_SNAPSHOT",payload:B}))},[y]),I=(0,nr.useCallback)(()=>{y();let B=c.current[0];B&&(l.current=[...l.current,i.current],c.current=c.current.slice(1),d(!0),m(c.current.length>0),i.current=B,r({type:"RESTORE_SNAPSHOT",payload:B}))},[y]),k=(0,nr.useCallback)(B=>{s.current=B},[]),P=(0,nr.useCallback)(B=>{b({type:"VIEWPORT_ADJUST_CROP_RECT",payload:B},!1)},[b]),N=!LC(t,o),U=!dw(t.cropper,o.cropper),F=(0,nr.useCallback)((B,L)=>t.cropper.image?VO(t.cropper.image.src,t.cropper,B,L):Promise.reject(new Error("No image loaded \u2014 call setImage first.")),[t.cropper]);return(0,nr.useMemo)(()=>({..._,state:t.cropper,setImage:x,reset:E,isDirty:N,getCroppedImage:F,cropOptions:t.cropOptions,setAspectRatioValue:O,resetCropOptions:A,isCropperDirty:U,hasUndo:u,hasRedo:f,undo:C,redo:I,beginGesture:S,endGesture:y,setVisualSize:k,adjustCropRectForViewport:P}),[_,t.cropper,x,E,N,F,t.cropOptions,O,A,U,u,f,C,I,S,y,k,P])}var XO=a(H(),1);var lde=a(T(),1),cde=(0,XO.createContext)(null);function Az({initialCropperState:e,initialCropOptions:t,children:r}){let o=Rz({cropper:e,cropOptions:t});return(0,lde.jsx)(cde.Provider,{value:o,children:r})}function ga(){let e=(0,XO.useContext)(cde);if(!e)throw new Error("useMediaEditor must be used within a MediaEditorStateProvider.");return e}var nd=a(T(),1);function fde({focusOnMount:e,isPlacementActive:t=!1,onGestureStart:r,onGestureEnd:o}){let{media:n}=E0(),i=ga(),{aspectRatioValue:s}=i.cropOptions,l=i.state.image,{beginGesture:c,endGesture:u,setImage:d}=i,[f,m]=(0,id.useState)("loading"),h=(0,id.useMemo)(()=>gw(s,l),[s,l]),g=(0,id.useCallback)(()=>{c(),r?.()},[c,r]),v=(0,id.useCallback)(()=>{u(),o?.()},[u,o]),b=n?.source_url,S=lv(n?.mime_type),y=Number(n?.media_details?.width),w=Number(n?.media_details?.height);(0,id.useEffect)(()=>{l||!b||!Number.isFinite(y)||!Number.isFinite(w)||y<=0||w<=0||d({src:b,naturalWidth:y,naturalHeight:w})},[l,b,y,w,d]);let _=S.type==="image";return(0,id.useEffect)(()=>{if(!b||!_)return;m("loading");let x=new window.Image;return x.onload=()=>m("loaded"),x.onerror=()=>m("error"),x.src=b,x.complete&&m(x.naturalWidth>0?"loaded":"error"),()=>{x.onload=null,x.onerror=null}},[b,_]),!b||!_?null:f==="error"?(0,nd.jsx)("div",{className:"media-editor-canvas",children:(0,nd.jsx)("div",{className:"media-editor-canvas__error",role:"alert",children:(0,nd.jsx)("p",{children:(0,dde.__)("Failed to load image.")})})}):(0,nd.jsxs)("div",{className:"media-editor-canvas",children:[f==="loading"&&(0,nd.jsx)("div",{className:"media-editor-canvas__spinner",children:(0,nd.jsx)(ude.Spinner,{})}),(0,nd.jsx)("div",{className:Q("media-editor-canvas__cropper",{"is-loaded":f==="loaded"}),children:(0,nd.jsx)(qO,{src:b,controller:i,aspectRatio:h,freeformCrop:!0,focusOnMount:e&&f==="loaded",showGrid:"interactive",isPlacementActive:t,onGestureStart:g,onGestureEnd:v})})]})}var bde=a(V(),1);var Nc=a(H(),1);var BC="data-crop-control",gje=300;function mde(e={}){let{commitOnKeyUp:t=!0}=e,{beginGesture:r,endGesture:o}=ga(),n=(0,Nc.useRef)(),i=(0,Nc.useCallback)(()=>{clearTimeout(n.current)},[]),s=(0,Nc.useCallback)(()=>{i(),n.current=setTimeout(()=>{o()},gje)},[i,o]);(0,Nc.useEffect)(()=>i,[i]);let l=(0,Nc.useCallback)(()=>{i(),r()},[r,i]),c=(0,Nc.useCallback)(()=>{i(),o()},[i,o]),u=(0,Nc.useCallback)(()=>{r(),t||s()},[r,t,s]),d=(0,Nc.useCallback)(()=>{if(t){o();return}s()},[t,o,s]);return{[BC]:!0,onPointerDownCapture:l,onPointerUp:c,onPointerCancel:c,onKeyDownCapture:u,onKeyUp:d}}var Hv=a(H(),1);var zf=a(H(),1);function vje(e,t,r){return-e/t*r}function QO(e,t,r){return e<t?t:e>r?r:e}function bje(e,t){return Math.round(e/t)*t}function pde(e){let{value:t,onChange:r,min:o,max:n,step:i,pixelsPerStep:s,disabled:l,onPointerDownStart:c}=e,u=(0,zf.useRef)({value:t,startX:0,startValue:0,activeStep:i,dragging:!1,captureElement:null,capturePointerId:0,windowPointerUp:null});(0,zf.useEffect)(()=>{u.current.value=t},[t]);let d=(0,zf.useCallback)(()=>{let h=u.current;h.dragging&&(h.dragging=!1,h.captureElement&&h.captureElement.hasPointerCapture(h.capturePointerId)&&h.captureElement.releasePointerCapture(h.capturePointerId),h.captureElement=null,h.windowPointerUp&&(window.removeEventListener("pointerup",h.windowPointerUp),window.removeEventListener("pointercancel",h.windowPointerUp),h.windowPointerUp=null))},[]);(0,zf.useEffect)(()=>d,[d]);let f=(0,zf.useCallback)(h=>{if(l||h.button!==0)return;let g=u.current;h.currentTarget.setPointerCapture(h.pointerId),g.captureElement=h.currentTarget,g.capturePointerId=h.pointerId,g.startX=h.clientX,g.startValue=g.value,g.activeStep=h.shiftKey?i/2:i,g.dragging=!0,c?.();let v=()=>d();g.windowPointerUp=v,window.addEventListener("pointerup",v),window.addEventListener("pointercancel",v)},[l,c,d,i]),m=(0,zf.useCallback)(h=>{let g=u.current;if(!g.dragging)return;let v=h.shiftKey?i/2:i;v!==g.activeStep&&(g.startX=h.clientX,g.startValue=g.value,g.activeStep=v);let b=h.clientX-g.startX,S=vje(b,s,g.activeStep),y=g.startValue+S,w=bje(y,g.activeStep),_=QO(w,o,n);_!==g.value&&(g.value=_,r(_))},[r,o,n,i,s]);return{onPointerDown:f,onPointerMove:m,onPointerUp:d,onPointerCancel:d}}var tl=a(T(),1),JO=32,yje=11,hde=15,wje=4,Sje=8,_je=14;function xje(e,t){return(0,Hv.useMemo)(()=>{let r=[];for(let o=Math.ceil(e);o<=Math.floor(t);o+=1){let n="minor",i=wje;o%15===0?(n="major",i=_je):o%5===0&&(n="mid",i=Sje),r.push({value:o,kind:n,height:i})}return r},[e,t])}function gde(e){let t=Math.round(e*10)/10;return Number.isInteger(t)?t.toFixed(0):t.toFixed(1)}function vde(e){let{value:t,onChange:r,min:o=-45,max:n=45,step:i=1,label:s,unit:l="\xB0",pixelsPerStep:c=6,className:u,id:d,disabled:f=!1}=e,m=(0,Hv.useRef)(null),h=(0,Hv.useId)(),g=d??h,v=pde({value:t,onChange:r,min:o,max:n,step:i,pixelsPerStep:c,disabled:f,onPointerDownStart:()=>m.current?.focus()}),b=k=>{let P=k.key==="ArrowRight"||k.key==="ArrowUp",N=k.key==="ArrowLeft"||k.key==="ArrowDown";if(!P&&!N||(k.preventDefault(),f))return;let U=P?1:-1,F=k.shiftKey?i/2:i,D=QO(t+U*F,o,n);D!==t&&r(D)},S=`${gde(t)}${l}`,y=xje(o,n),w=c/i,_=(0,Hv.useMemo)(()=>({transform:`translateX(calc(-50% + ${-t*w}px))`}),[t,w]),x=Math.round(t/hde)*hde,O=Math.abs(t-x)<.01?`${x}`:gde(t),A=O.startsWith("-"),C=A?O.slice(1):O,I=y.filter(k=>k.kind==="major");return(0,tl.jsxs)("div",{className:Q("rotation-ruler",u),role:"presentation","data-disabled":f||void 0,...v,children:[(0,tl.jsx)("input",{ref:m,id:g,type:"range",className:"rotation-ruler__input",min:o,max:n,step:"any",value:t,disabled:f,"aria-label":s,"aria-valuetext":S,onChange:k=>r(QO(k.target.valueAsNumber,o,n)),onKeyDown:b}),(0,tl.jsx)("div",{className:"rotation-ruler__strip","aria-hidden":"true",children:(0,tl.jsxs)("svg",{className:"rotation-ruler__ticks",style:_,width:(n-o)*w,height:JO,viewBox:`${o*w} 0 ${(n-o)*w} ${JO}`,preserveAspectRatio:"xMidYMid meet",children:[y.map(k=>(0,tl.jsx)("line",{x1:k.value*w,x2:k.value*w,y1:JO-k.height,y2:JO,className:`rotation-ruler__tick rotation-ruler__tick--${k.kind}`},k.value)),I.map(k=>(0,tl.jsxs)("text",{x:k.value*w,y:yje,textAnchor:"middle",className:"rotation-ruler__label",children:[k.value,l]},k.value))]})}),(0,tl.jsx)("div",{className:"rotation-ruler__active-label","aria-hidden":"true",children:(0,tl.jsxs)("span",{className:"rotation-ruler__active-label-number",children:[A&&(0,tl.jsx)("span",{className:"rotation-ruler__active-label-sign",children:"-"}),C,(0,tl.jsx)("span",{className:"rotation-ruler__active-label-unit",children:l})]})}),(0,tl.jsx)("div",{className:"rotation-ruler__pointer","aria-hidden":"true"})]})}var Iz=a(T(),1);function yde({onPlacementControlInteraction:e}){let{state:t,setRotation:r}=ga(),o=mde({commitOnKeyUp:!1}),n=Math.round(t.rotation/90)*90,s=t.flip.horizontal!==t.flip.vertical?-1:1,l=(t.rotation-n)*s,c=u=>{let f=Math.max(-OC+.01,Math.min(OC-.01,u));e?.(),r(n+f*s)};return(0,Iz.jsx)("div",{role:"presentation",className:"media-editor-fine-rotation",...o,children:(0,Iz.jsx)(vde,{label:(0,bde.__)("Fine rotation"),min:-OC,max:OC,value:l,onChange:c})})}var rl=a(W(),1),ks=a(V(),1);var Oz=a(H(),1);function Cje(e){return[...MC.filter(t=>t.value<=0),...e??MC.filter(t=>t.value>0)]}function $O({aspectRatioPresets:e}={}){let t=ga(),{aspectRatioValue:r}=t.cropOptions,o=t.state.image,n=(0,Oz.useMemo)(()=>Cje(e),[e]),i=(0,Oz.useMemo)(()=>gw(r,o),[r,o]);return{aspectRatioValue:r,setAspectRatioValue:t.setAspectRatioValue,aspectRatioOptions:n,resolvedAspectRatio:i,resetCropOptions:t.resetCropOptions}}var cr=a(T(),1),Tje=1.2;function e5({withLabels:e=!1,showAspectRatioControl:t=!1,aspectRatioPresets:r,zoomFactor:o=Tje}){let{state:n,setFlip:i,snapRotate90:s,setZoom:l}=ga(),{aspectRatioValue:c,setAspectRatioValue:u,aspectRatioOptions:d}=$O({aspectRatioPresets:r}),f=!e&&t,m=uw(n),h=y=>{l(Math.min(el,Math.max(m,n.zoom*y)))},g=(0,cr.jsxs)(cr.Fragment,{children:[(0,cr.jsx)(rl.Button,{size:"compact",icon:hx,label:(0,ks.__)("Rotate 90\xB0 counter-clockwise"),showTooltip:!0,onClick:()=>s(-1)}),(0,cr.jsx)(rl.Button,{size:"compact",icon:gx,label:(0,ks.__)("Rotate 90\xB0 clockwise"),showTooltip:!0,onClick:()=>s(1)})]}),v=(0,cr.jsxs)(cr.Fragment,{children:[(0,cr.jsx)(rl.Button,{size:"compact",icon:Q4,label:(0,ks.__)("Flip horizontal"),showTooltip:!0,isPressed:n.flip.horizontal,onClick:()=>i({horizontal:!n.flip.horizontal,vertical:n.flip.vertical})}),(0,cr.jsx)(rl.Button,{size:"compact",icon:$4,label:(0,ks.__)("Flip vertical"),showTooltip:!0,isPressed:n.flip.vertical,onClick:()=>i({horizontal:n.flip.horizontal,vertical:!n.flip.vertical})})]}),b=(0,cr.jsxs)(cr.Fragment,{children:[(0,cr.jsx)(rl.Button,{size:"compact",icon:fc,label:(0,ks.__)("Zoom in"),showTooltip:!0,disabled:n.zoom>=el,accessibleWhenDisabled:!0,onClick:()=>h(o)}),(0,cr.jsx)(rl.Button,{size:"compact",icon:fL,label:(0,ks.__)("Zoom out"),showTooltip:!0,disabled:n.zoom<=m,accessibleWhenDisabled:!0,onClick:()=>h(1/o)})]}),S=f?(0,cr.jsx)(rl.DropdownMenu,{icon:r4,label:(0,ks.__)("Aspect ratio"),popoverProps:{placement:"top"},toggleProps:{size:"compact"},children:({onClose:y})=>(0,cr.jsx)(rl.MenuGroup,{label:(0,ks.__)("Aspect ratio"),children:d.map(w=>{let _=w.value.toString(),x=_===c;return(0,cr.jsx)(rl.MenuItem,{role:"menuitemradio",isSelected:x,icon:x?To:void 0,onClick:()=>{u(_),y()},children:w.label},_)})})}):null;return e?(0,cr.jsxs)("div",{className:"media-editor-image-controls is-stacked",children:[(0,cr.jsxs)("div",{className:"media-editor-image-controls__transforms",children:[(0,cr.jsxs)("div",{className:"media-editor-image-controls__group",role:"group","aria-label":(0,ks.__)("Rotate"),children:[(0,cr.jsx)("span",{className:"media-editor-image-controls__label","aria-hidden":"true",children:(0,ks.__)("Rotate")}),(0,cr.jsx)("div",{className:"media-editor-image-controls__buttons",children:g})]}),(0,cr.jsxs)("div",{className:"media-editor-image-controls__group",role:"group","aria-label":(0,ks.__)("Flip"),children:[(0,cr.jsx)("span",{className:"media-editor-image-controls__label","aria-hidden":"true",children:(0,ks.__)("Flip")}),(0,cr.jsx)("div",{className:"media-editor-image-controls__buttons",children:v})]})]}),(0,cr.jsxs)("div",{className:"media-editor-image-controls__group",role:"group","aria-label":(0,ks.__)("Zoom"),children:[(0,cr.jsx)("span",{className:"media-editor-image-controls__label","aria-hidden":"true",children:(0,ks.__)("Zoom")}),(0,cr.jsx)("div",{className:"media-editor-image-controls__buttons",children:b})]})]}):(0,cr.jsxs)("div",{className:"media-editor-image-controls",children:[g,v,b,S]})}var wde=a(W(),1);var Nz=a(V(),1);var Uv=a(T(),1);function Sde({aspectRatioValue:e,onAspectRatioChange:t,aspectRatioOptions:r,showTransformControls:o=!1}){return(0,Uv.jsxs)(ne,{direction:"column",gap:"xl",[BC]:!0,children:[(0,Uv.jsx)(Ut,{render:(0,Uv.jsx)("h2",{}),children:(0,Nz.__)("Crop options")}),o&&(0,Uv.jsx)(e5,{withLabels:!0}),(0,Uv.jsx)(wde.SelectControl,{__next40pxDefaultSize:!0,label:(0,Nz.__)("Aspect ratio"),value:e,onChange:t,options:r.map(n=>({label:n.label,value:n.value.toString()}))})]})}var _de=a(W(),1),xde=a(H(),1),Rs=a(V(),1),VC=a(go(),1),Mc=a(T(),1),Eje=[{description:(0,Rs.__)("Undo"),keyCombination:{modifier:"primary",character:"z"}},{description:(0,Rs.__)("Redo"),keyCombination:{modifier:"primaryShift",character:"z"}},{description:(0,Rs.__)("Pan"),keyCombination:{character:["\u2191","\u2193","\u2190","\u2192"],ariaLabel:(0,Rs.__)("Arrow keys")}},{description:(0,Rs.__)("Zoom in"),keyCombination:{character:"+"}},{description:(0,Rs.__)("Zoom out"),keyCombination:{character:"-"}},{description:(0,Rs.__)("Rotate 90\xB0 clockwise"),keyCombination:{character:"R"}},{description:(0,Rs.__)("Rotate 90\xB0 counter-clockwise"),keyCombination:{modifier:"shift",character:"R"}},{description:(0,Rs.__)("Flip horizontal"),keyCombination:{character:"H"}},{description:(0,Rs.__)("Flip vertical"),keyCombination:{character:"V"}},{description:(0,Rs.__)("Pan or resize crop (large step)"),keyCombination:{modifier:"shift",character:["\u2191","\u2193","\u2190","\u2192"],ariaLabel:(0,Rs.__)("Shift + Arrow keys")}}];function Pje({keyCombination:e}){let{modifier:t,character:r,ariaLabel:o}=e,n;Array.isArray(r)?t?n=[...VC.displayShortcutList[t](r[0]).slice(0,-1),...r]:n=r:n=t?VC.displayShortcutList[t](r):[r];let i=Array.isArray(r)?r.join(""):r,s;return o?s=o:t?s=VC.shortcutAriaLabel[t](i):s=i,(0,Mc.jsx)("kbd",{className:"media-editor-keyboard-shortcuts-modal__shortcut-term","aria-label":s,children:n.map((l,c)=>l==="+"&&t?(0,Mc.jsx)(xde.Fragment,{children:l},c):(0,Mc.jsx)("kbd",{className:"media-editor-keyboard-shortcuts-modal__shortcut-key",children:l},c))})}function Cde({onClose:e}){return(0,Mc.jsxs)(_de.Modal,{className:"media-editor-keyboard-shortcuts-modal",title:(0,Rs.__)("Keyboard shortcuts"),onRequestClose:e,children:[(0,Mc.jsx)("p",{className:"media-editor-keyboard-shortcuts-modal__note",children:(0,Rs.__)("These shortcuts work when the image editor has focus.")}),(0,Mc.jsx)("ul",{className:"media-editor-keyboard-shortcuts-modal__shortcut-list",role:"list",children:Eje.map(({description:t,keyCombination:r},o)=>(0,Mc.jsxs)("li",{className:"media-editor-keyboard-shortcuts-modal__shortcut",children:[(0,Mc.jsx)("span",{className:"media-editor-keyboard-shortcuts-modal__shortcut-description",children:t}),(0,Mc.jsx)(Pje,{keyCombination:r})]},o))})]})}var Ede=a(Zd(),1),jC=a(G(),1),Mz=a(oe(),1),r5=a(H(),1),Wv=a(V(),1),Pde=a(Rt(),1);var t5=.1;function Tde(e,t){let r=[];if(t.width===0||t.height===0)return r;let{cropRect:o,pan:n,zoom:i,flip:s}=e,l=s.horizontal,c=s.vertical;(l||c)&&r.push({type:"flip",args:{flip:{horizontal:l,vertical:c}}});let u=(e.rotation%360+360)%360,f=l!==c?(360-u)%360:u;f!==0&&r.push({type:"rotate",args:{angle:f}});let m=Math.round(e.rotation/90)*90,{width:h,height:g}=Wn(t.width,t.height,m),{width:v,height:b}=Wn(t.width,t.height,e.rotation),S=.5+n.x-i/2,y=.5+n.y-i/2,w=(o.x-S)/i*h,_=(o.y-y)/i*g,x=o.width/i*h,E=o.height/i*g,O=(v-h)/2,A=(b-g)/2,C=w+O,I=_+A,k=C/v*100,P=I/b*100,N=x/v*100,U=E/b*100;return k<=t5&&P<=t5&&N>=100-t5&&U>=100-t5||r.push({type:"crop",args:{left:k,top:P,width:N,height:U}}),r}var kje=["title","caption","description","alt_text","post"],zC="media-editor";function Rje(e){return!e.isCropperDirty||!e.state.image?[]:Tde(e.state,{width:e.state.image.naturalWidth,height:e.state.image.naturalHeight})}function Aje(e,t){let r={};for(let o of kje)e&&o in e&&(r[o]=e[o]);return!("post"in r)&&t?.post!==void 0&&(r.post=t.post),r}function kde({cropper:e,id:t,isImage:r,media:o,onSaved:n}){let i=(0,jC.useRegistry)(),{clearEntityRecordEdits:s,receiveEntityRecords:l,saveEditedEntityRecord:c}=(0,jC.useDispatch)(Mz.store),{createErrorNotice:u,removeAllNotices:d}=(0,jC.useDispatch)(Pde.store),[f,m]=(0,r5.useState)(!1),h=(0,r5.useCallback)(async()=>{d("snackbar",zC),m(!0);try{let g,v=Rje(e),b=v.length>0&&o?{id:t,url:o.source_url}:void 0;if(v.length>0){let y=i.select(Mz.store).getEntityRecordNonTransientEdits("postType","attachment",t),w=Aje(y,o);g=await(0,Ede.default)({path:`/wp/v2/media/${t}/edit`,method:"POST",data:{src:o?.source_url,modifiers:v,...w}}),g&&l("postType","attachment",g,void 0,!0)}else g=await c("postType","attachment",t);let S=g??o;S&&S.id!==t&&s("postType","attachment",t),S&&S.id&&(S.id===t&&e.reset(),n?.({id:S.id,url:S.source_url,media:S,previous:b}))}catch(g){let v=g instanceof Error?g.message:g?.message??(0,Wv.__)("An unknown error occurred.");u(r?(0,Wv.sprintf)((0,Wv.__)("Could not save image. %s"),v):(0,Wv.sprintf)((0,Wv.__)("Could not save media. %s"),v),{type:"snackbar",context:zC})}finally{m(!1)}},[s,u,e,t,r,o,n,l,i,d,c]);return{isSaving:f,save:h}}var tt=a(T(),1),Rde={_embed:"author,wp:attached-to"},Ije=300,{Tabs:Gv}=Ece(Yn.privateApis);function Oje({tabs:e}){let t=(0,Xo.useContext)(Gv.Context);return(0,tt.jsx)(Ml,{scope:"media-editor",identifier:"media-editor/details",title:(0,Gn.__)("Details"),icon:Yd,isActiveByDefault:!0,className:"media-editor__sidebar",panelClassName:"media-editor__sidebar-panel",headerClassName:"media-editor__sidebar-header",closeLabel:(0,Gn.__)("Close media panel"),header:(0,tt.jsx)(Gv.Context.Provider,{value:t,children:(0,tt.jsx)(Gv.TabList,{children:e.map(r=>(0,tt.jsx)(Gv.Tab,{tabId:r.id,children:r.title},r.id))})}),children:(0,tt.jsx)(Gv.Context.Provider,{value:t,children:e.map(r=>(0,tt.jsx)(Gv.TabPanel,{tabId:r.id,focusable:!1,children:r.panel},r.id))})})}function Nje({isSaving:e,isImage:t,showCloseButton:r=!1,onCancel:o}){let[n,i]=(0,Xo.useState)(!1);return(0,tt.jsxs)(Yn.Flex,{className:"media-editor__header-actions",justify:"flex-end",expanded:!1,gap:2,children:[t&&(0,tt.jsx)(Yn.Button,{size:"compact",icon:ax,label:(0,Gn.__)("Keyboard shortcuts"),onClick:()=>i(!0)}),(0,tt.jsx)(eh.Slot,{scope:"media-editor"}),r&&(0,tt.jsx)(Yn.Button,{size:"compact",icon:$_,label:(0,Gn.__)("Close"),onClick:o,disabled:e,accessibleWhenDisabled:!0}),n&&(0,tt.jsx)(Cde,{onClose:()=>i(!1)})]})}function Mje({isUndoRedoDisabled:e=!1,onReset:t}){let{reset:r,isDirty:o,hasUndo:n,hasRedo:i,undo:s,redo:l,beginGesture:c,endGesture:u}=ga(),d=()=>{e||s()},f=()=>{e||l()};return(0,tt.jsxs)(Yn.Flex,{className:"media-editor__history-actions",expanded:!1,gap:2,children:[(0,tt.jsx)(Yn.Button,{size:"compact",variant:"tertiary",disabled:!o,accessibleWhenDisabled:!0,onClick:()=>{c(),r(),t(),u()},children:(0,Gn.__)("Reset")}),(0,tt.jsx)(Yn.Button,{size:"compact",icon:Pg,label:(0,Gn.__)("Undo"),showTooltip:!0,shortcut:Fc.displayShortcut.primary("z"),disabled:e||!n,accessibleWhenDisabled:!0,onClick:d}),(0,tt.jsx)(Yn.Button,{size:"compact",icon:Cg,label:(0,Gn.__)("Redo"),showTooltip:!0,shortcut:(0,Fc.isAppleOS)()?Fc.displayShortcut.primaryShift("z"):Fc.displayShortcut.primary("y"),disabled:e||!i,accessibleWhenDisabled:!0,onClick:f})]})}function Fje({isSaving:e,hasMedia:t,hasChanges:r,onCancel:o,onSave:n}){let i=e||!t||!r;return(0,tt.jsxs)(Yn.Flex,{className:"media-editor__footer-actions",justify:"flex-end",expanded:!1,gap:2,children:[(0,tt.jsx)(Yn.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:o,disabled:e,accessibleWhenDisabled:!0,children:(0,Gn.__)("Cancel")}),(0,tt.jsx)(Yn.Button,{__next40pxDefaultSize:!0,variant:"primary",onClick:n,isBusy:e,disabled:i,accessibleWhenDisabled:!0,children:(0,Gn.__)("Save")})]})}function Dje({fields:e=[],id:t,aspectRatioPresets:r,onClose:o,onSaved:n,renderFrame:i,noticesClassName:s="media-editor__snackbar",noticesPortalElement:l,showCloseButton:c=!1,shouldCloseOnEsc:u=!1}){let d=ga(),f=(0,Ade.useViewportMatch)("small"),m=f?"wide":"narrow",{media:h,hasEdits:g}=(0,HC.useSelect)(te=>{let{getEditedEntityRecord:de,getEntityRecord:se,hasEditsForEntityRecord:fe}=te(Fz.store);return se("postType","attachment",t,Rde),{media:de("postType","attachment",t),hasEdits:fe("postType","attachment",t)}},[t]),v=d.isCropperDirty||g,{clearEntityRecordEdits:b,editEntityRecord:S,invalidateResolution:y}=(0,HC.useDispatch)(Fz.store),{removeAllNotices:w}=(0,HC.useDispatch)(o5.store),[_,x]=(0,Xo.useState)(!1),[E,O]=(0,Xo.useState)(!1),[A,C]=(0,Xo.useState)(!1),I=(0,Xo.useRef)(),k=(0,Xo.useCallback)(()=>{O(!0),clearTimeout(I.current),I.current=setTimeout(()=>{O(!1)},Ije)},[]),P=(0,Xo.useCallback)(()=>{C(!0)},[]),N=(0,Xo.useCallback)(()=>{C(!1)},[]),U=E||A;(0,Xo.useEffect)(()=>()=>{clearTimeout(I.current)},[]),(0,Xo.useEffect)(()=>{O(!1),C(!1)},[t]),(0,Xo.useEffect)(()=>{y("getEntityRecord",["postType","attachment",t,Rde])},[t,y]);let F=lv(h?.mime_type).type,D=!!h&&F==="image",{aspectRatioValue:B,setAspectRatioValue:L,aspectRatioOptions:M,resetCropOptions:z}=$O({aspectRatioPresets:r}),{isSaving:K,save:Z}=kde({cropper:d,id:t,isImage:D,media:h,onSaved:n}),q=(0,Xo.useMemo)(()=>{let te={id:"details",title:(0,Gn.__)("Details"),panel:(0,tt.jsx)(ne,{className:"media-editor__panel",direction:"column",gap:"lg",children:(0,tt.jsx)(xce,{})})};return D?[{id:"crop",title:(0,Gn.__)("Crop"),panel:(0,tt.jsx)(ne,{className:"media-editor__panel",direction:"column",gap:"lg",children:(0,tt.jsx)(Sde,{aspectRatioValue:B,onAspectRatioChange:L,aspectRatioOptions:M,showTransformControls:f})})},te]:[te]},[D,B,L,M,f]),X=te=>{S("postType","attachment",t,te)},ie=()=>{w("snackbar",zC),b("postType","attachment",t),o?.()},$=()=>{if(!K){if(v){x(!0);return}ie()}},le=te=>{let de=Fc.isKeyboardEvent.primary(te,"z"),se=Fc.isKeyboardEvent.primaryShift(te,"z")||!(0,Fc.isAppleOS)()&&Fc.isKeyboardEvent.primary(te,"y");if((de||se)&&D){let fe=te.target;if(!((fe.tagName==="INPUT"||fe.tagName==="TEXTAREA"||fe.isContentEditable)&&!fe.closest(`[${BC}]`))){if(te.preventDefault(),U)return;se?d.redo():d.undo()}}if(u){if(te.code!=="Escape"&&te.key!=="Escape")return;if(K){te.preventDefault();return}v&&(te.preventDefault(),x(!0))}},ae=(0,tt.jsx)(o5.SnackbarNotices,{className:s,context:zC}),re=D?(0,tt.jsx)(yde,{onPlacementControlInteraction:k}):null,ve=(0,tt.jsxs)(zre,{value:h??void 0,onChange:X,settings:{fields:e},children:[(0,tt.jsx)("div",{className:"media-editor",children:h?(0,tt.jsxs)(tt.Fragment,{children:[(0,tt.jsx)(Gv,{children:(0,tt.jsx)(Oje,{tabs:q})}),(0,tt.jsx)(Bv,{className:"media-editor__skeleton",labels:{body:D?(0,Gn.__)("Image editor"):(0,Gn.__)("Media preview"),sidebar:(0,Gn.__)("Media details")},content:(0,tt.jsxs)("div",{className:"media-editor__content",children:[(0,tt.jsx)("div",{className:"media-editor__canvas-area",children:D?(0,tt.jsx)(fde,{focusOnMount:!0,isPlacementActive:E,onGestureStart:P,onGestureEnd:N}):(0,tt.jsx)(Wre,{})}),D&&(0,tt.jsx)("div",{className:"media-editor__canvas-toolbar",children:re})]}),sidebar:(0,tt.jsx)(Ml.Slot,{scope:"media-editor"})})]}):(0,tt.jsx)("div",{className:"media-editor__loading",children:(0,tt.jsx)(Yn.Spinner,{})})}),(0,tt.jsx)(Yn.__experimentalConfirmDialog,{isOpen:_,confirmButtonText:(0,Gn.__)("Discard"),cancelButtonText:(0,Gn.__)("Keep editing"),onCancel:()=>x(!1),onConfirm:()=>{x(!1),ie()},children:(0,Gn.__)("Are you sure you want to discard your unsaved changes?")}),l?(0,Xo.createPortal)(ae,l):ae]}),Ce=D?(0,tt.jsx)(Mje,{isUndoRedoDisabled:U,onReset:z}):null,_e=D?(0,tt.jsx)(e5,{showAspectRatioControl:!0,aspectRatioPresets:r}):null,Me=(0,tt.jsx)(Fje,{isSaving:K,hasMedia:!!h,hasChanges:v,onCancel:$,onSave:Z}),ue;return m==="wide"?ue=(0,tt.jsxs)(tt.Fragment,{children:[Ce,Me]}):ue=(0,tt.jsxs)(tt.Fragment,{children:[_e,(0,tt.jsxs)("div",{className:"media-editor-modal__footer-row",children:[Ce,Me]})]}),i({children:ve,headerActions:(0,tt.jsx)(Nje,{isSaving:K,isImage:D,showCloseButton:c,onCancel:$}),footerActions:ue,footerLayout:m,onRequestClose:$,onKeyDown:le,shouldCloseOnClickOutside:!v&&!K,isSaving:K,hasChanges:v,hasMedia:!!h})}function Dz(e){return(0,tt.jsx)(Az,{children:(0,tt.jsx)(Dje,{...e})},e.id)}var Ide=Dz;var vw=a(T(),1);function Fde({fields:e=[],aspectRatioPresets:t}){let{isModalOpen:r,id:o,onUpdate:n,onClose:i}=(0,WC.useSelect)(f=>{let{isOpen:m,getId:h,getOnUpdate:g,getOnClose:v}=f(iw);return{isModalOpen:m(),id:h(),onUpdate:g(),onClose:v()}},[]),{closeMediaEditorModal:s}=(0,WC.useDispatch)(iw),{createSuccessNotice:l}=(0,WC.useDispatch)(Mde.store);if(!r||!o)return null;let c=typeof document>"u"?null:document.body,u=f=>{f.stopPropagation()},d=()=>{s(),i?.()};return(0,vw.jsx)(Ide,{id:o,fields:e,aspectRatioPresets:t,showCloseButton:!0,shouldCloseOnEsc:!0,noticesClassName:"media-editor-modal__snackbar",noticesPortalElement:c,onClose:d,onSaved:({id:f,url:m,previous:h})=>{f&&n&&n({id:f,url:m}),d(),h&&f!==h.id&&n&&l((0,UC.__)("Image edited."),{type:"snackbar",actions:[{label:(0,UC.__)("Undo"),onClick:()=>{n({id:h.id,url:h.url})}}]})},renderFrame:({children:f,headerActions:m,footerActions:h,footerLayout:g,onRequestClose:v,onKeyDown:b,shouldCloseOnClickOutside:S})=>(0,vw.jsx)(Nde.ShortcutProvider,{className:"media-editor-modal__shortcut-scope",onKeyDown:u,children:(0,vw.jsxs)(Ode.Modal,{className:"media-editor-modal",title:(0,UC.__)("Edit media"),size:"fill",isDismissible:!1,shouldCloseOnClickOutside:S,onKeyDown:b,onRequestClose:v,headerActions:m,children:[f,(0,vw.jsx)("div",{className:`media-editor-modal__footer is-${g}`,role:"region","aria-label":(0,UC.__)("Editor actions"),children:h})]})})})}var bw={};Tce(bw,{store:iw,MediaEditor:Dz,MediaEditorModal:Fde});var Sn=a(V(),1),Dde=a(G(),1),n5=a(Lt(),1),Lde=a(oe(),1),ah=(e,t)=>`<a ${Bz(e)}>${t}</a>`,Bz=e=>`href="${e}" target="_blank" rel="noopener"`,Lje=(e,t)=>{let r=e.trim();return e!=="pdm"&&(r=e.toUpperCase().replace("SAMPLING","Sampling")),t&&(r+=` ${t}`),["pdm","cc0"].includes(e)||(r=`CC ${r}`),r},Bje=e=>{let{title:t,foreign_landing_url:r,creator:o,creator_url:n,license:i,license_version:s,license_url:l}=e,c=Lje(i,s),u=(0,n5.decodeEntities)(o),d;return u?d=t?(0,Sn.sprintf)((0,Sn._x)('"%1$s" by %2$s/ %3$s',"caption"),ah(r,(0,n5.decodeEntities)(t)),n?ah(n,u):u,l?ah(`${l}?ref=openverse`,c):c):(0,Sn.sprintf)((0,Sn._x)("<a %1$s>Work</a> by %2$s/ %3$s","caption"),Bz(r),n?ah(n,u):u,l?ah(`${l}?ref=openverse`,c):c):d=t?(0,Sn.sprintf)((0,Sn._x)('"%1$s"/ %2$s',"caption"),ah(r,(0,n5.decodeEntities)(t)),l?ah(`${l}?ref=openverse`,c):c):(0,Sn.sprintf)((0,Sn._x)("<a %1$s>Work</a>/ %2$s","caption"),Bz(r),l?ah(`${l}?ref=openverse`,c):c),d.replace(/\s{2}/g," ")},Lz=async(e={})=>(await(0,Dde.resolveSelect)(Lde.store).getEntityRecords("postType","attachment",{...e,orderBy:e?.search?"relevance":"date"})).map(r=>({...r,alt:r.alt_text,url:r.source_url,previewUrl:r.media_details?.sizes?.medium?.source_url,caption:r.caption?.raw})),Vje=[{name:"images",labels:{name:(0,Sn.__)("Images"),search_items:(0,Sn.__)("Search images")},mediaType:"image",async fetch(e={}){return Lz({...e,media_type:"image"})}},{name:"videos",labels:{name:(0,Sn.__)("Videos"),search_items:(0,Sn.__)("Search videos")},mediaType:"video",async fetch(e={}){return Lz({...e,media_type:"video"})}},{name:"audio",labels:{name:(0,Sn.__)("Audio"),search_items:(0,Sn.__)("Search audio")},mediaType:"audio",async fetch(e={}){return Lz({...e,media_type:"audio"})}},{name:"openverse",labels:{name:(0,Sn.__)("Openverse"),search_items:(0,Sn.__)("Search Openverse")},mediaType:"image",async fetch(e={}){let r={...e,...{mature:!1,excluded_source:"flickr,inaturalist,wikimedia",license:"pdm,cc0"}},o={per_page:"page_size",search:"q"},n=new URL("https://api.openverse.org/v1/images/");return Object.entries(r).forEach(([c,u])=>{let d=o[c]||c;n.searchParams.set(d,u)}),(await(await window.fetch(n,{headers:{"User-Agent":"WordPress/inserter-media-fetch"}})).json()).results.map(c=>({...c,title:c.title?.toLowerCase().startsWith("file:")?c.title.slice(5):c.title,sourceId:c.id,id:void 0,caption:Bje(c),previewUrl:c.thumbnail}))},getReportUrl:({sourceId:e})=>`https://wordpress.org/openverse/image/${e}/report/`,isExternalResource:!0}],Bde=Vje;var Vde=a(G(),1),jde=a(oe(),1);function zde(e){let{invalidateResolution:t}=(0,Vde.dispatch)(jde.store);for(let r of e)r.id&&(t("getEntityRecord",["postType","attachment",r.id,{context:"view"}]),t("getEntityRecord",["postType","attachment",r.id]))}var Hde=a(Wm(),1);var{sideloadMedia:jje}=Y(Hde.privateApis),Ude=jje;var Wde=a(Zd(),1),Gde=a(Wm(),1);async function Yde(e,t=[]){let r=await(0,Wde.default)({path:`/wp/v2/media/${e}/finalize`,method:"POST",data:{sub_sizes:t}});return r?(0,Gde.transformAttachment)(r):void 0}var qde=a(Zd(),1);async function Kde(e){await(0,qde.default)({path:`/wp/v2/media/${e}?force=true`,method:"DELETE"})}var mge=a(oe(),1),pge=a(G(),1),RH=a(H(),1);var Uw=a(W(),1),iN=a(kt(),1),ige=a(G(),1),sge=a(pe(),1),wh=a(H(),1),CH=a(ke(),1);function lh(e,t,r){t=Array.isArray(t)?[...t]:[t],e=Array.isArray(e)?[...e]:{...e};let o=t.pop(),n=e;for(let i of t){let s=n[i];n=n[i]=Array.isArray(s)?[...s]:{...s}}return n[o]=r,e}var ur=(e,t,r)=>{let o=Array.isArray(t)?t:t.split("."),n=e;return o.forEach(i=>{n=n?.[i]}),n??r};var zje=["appearanceTools","useRootPaddingAwareAlignments","background.backgroundImage","background.backgroundRepeat","background.backgroundSize","background.backgroundPosition","background.gradient","border.color","border.radius","border.radiusSizes","border.style","border.width","shadow.presets","shadow.defaultPresets","color.background","color.button","color.caption","color.custom","color.customDuotone","color.customGradient","color.defaultDuotone","color.defaultGradients","color.defaultPalette","color.duotone","color.gradients","color.heading","color.link","color.palette","color.text","custom","dimensions.aspectRatio","dimensions.height","dimensions.minHeight","dimensions.minWidth","dimensions.width","dimensions.dimensionSizes","layout.contentSize","layout.definitions","layout.wideSize","lightbox.enabled","lightbox.allowEditing","position.fixed","position.sticky","spacing.customSpacingSize","spacing.defaultSpacingSizes","spacing.spacingSizes","spacing.spacingScale","spacing.blockGap","spacing.margin","spacing.padding","spacing.units","typography.fluid","typography.customFontSize","typography.defaultFontSizes","typography.dropCap","typography.fontFamilies","typography.fontSizes","typography.fontStyle","typography.fontWeight","typography.letterSpacing","typography.lineHeight","typography.textAlign","typography.textColumns","typography.textDecoration","typography.textIndent","typography.textTransform","typography.writingMode"];function Yv(e,t,r){let o=r?".blocks."+r:"",n=t?"."+t:"",i=`settings${o}${n}`,s=`settings${n}`;if(t)return ur(e,i)??ur(e,s);let l={};return zje.forEach(c=>{let u=ur(e,`settings${o}.${c}`)??ur(e,`settings.${c}`);u!==void 0&&(l=lh(l,c.split("."),u))}),l}function GC(e,t,r,o){let n=o?".blocks."+o:"",i=t?"."+t:"",s=`settings${n}${i}`;return lh(e,s.split("."),r)}var Qde=a(Vz(),1);var Hje="1600px",Uje="320px",Wje=1,Gje=.25,Yje=.75,qje="14px";function Xde({minimumFontSize:e,maximumFontSize:t,fontSize:r,minimumViewportWidth:o=Uje,maximumViewportWidth:n=Hje,scaleFactor:i=Wje,minimumFontSizeLimit:s}){if(s=sd(s)?s:qje,r){let w=sd(r);if(!w?.unit||!w?.value)return null;let _=sd(s,{coerceTo:w.unit});if(_?.value&&!e&&!t&&w?.value<=_?.value)return null;if(t||(t=`${w.value}${w.unit}`),!e){let x=w.unit==="px"?w.value:w.value*16,E=Math.min(Math.max(1-.075*Math.log2(x),Gje),Yje),O=YC(w.value*E,3);_?.value&&O<_?.value?e=`${_.value}${_.unit}`:e=`${O}${w.unit}`}}let l=sd(e),c=l?.unit||"rem",u=sd(t,{coerceTo:c});if(!l||!u)return null;let d=sd(e,{coerceTo:"rem"}),f=sd(n,{coerceTo:c}),m=sd(o,{coerceTo:c});if(!f||!m||!d)return null;let h=f.value-m.value;if(!h)return null;let g=YC(m.value/100,3),v=YC(g,3)+c,b=100*((u.value-l.value)/h),S=YC((b||1)*i,3),y=`${d.value}${d.unit} + ((1vw - ${v}) * ${S})`;return`clamp(${e}, ${y}, ${t})`}function sd(e,t={}){if(typeof e!="string"&&typeof e!="number")return null;isFinite(e)&&(e=`${e}px`);let{coerceTo:r,rootSizeValue:o,acceptableUnits:n}={coerceTo:"",rootSizeValue:16,acceptableUnits:["rem","px","em"],...t},i=n?.join("|"),s=new RegExp(`^(\\d*\\.?\\d+)(${i}){1,1}$`),l=e.toString().match(s);if(!l||l.length<3)return null;let[,c,u]=l,d=parseFloat(c);return r==="px"&&(u==="em"||u==="rem")&&(d=d*o,u=r),u==="px"&&(r==="em"||r==="rem")&&(d=d/o,u=r),(r==="em"||r==="rem")&&(u==="em"||u==="rem")&&(u=r),u?{value:YC(d,3),unit:u}:null}function YC(e,t=3){let r=Math.pow(10,t);return Math.round(e*r)/r}function jz(e){let t=e?.fluid;return t===!0||t&&typeof t=="object"&&Object.keys(t).length>0}function Kje(e){let t=e?.typography??{},r=e?.layout,o=sd(r?.wideSize)?r?.wideSize:null;return jz(t)&&o?{fluid:{maxViewportWidth:o,...typeof t.fluid=="object"?t.fluid:{}}}:{fluid:t?.fluid}}function i5(e,t){let{size:r}=e;if(!r||r==="0"||e?.fluid===!1||!jz(t?.typography)&&!jz(e))return r;let o=Kje(t)?.fluid??{},n=Xde({minimumFontSize:typeof e?.fluid=="boolean"?void 0:e?.fluid?.min,maximumFontSize:typeof e?.fluid=="boolean"?void 0:e?.fluid?.max,fontSize:r,minimumFontSizeLimit:typeof o=="object"?o?.minFontSize:void 0,maximumViewportWidth:typeof o=="object"?o?.maxViewportWidth:void 0,minimumViewportWidth:typeof o=="object"?o?.minViewportWidth:void 0});return n||r}var ad="body",KC=":root";function qC(e){if(!e.includes(","))return[e];let t=[],r="",o=0;for(let n of e){if(n==="(")o++;else if(n===")"&&o>0)o--;else if(n===","&&o===0){t.push(r),r="";continue}r+=n}return t.push(r),t}var yw=[{path:["color","palette"],valueKey:"color",cssVarInfix:"color",classes:[{classSuffix:"color",propertyName:"color"},{classSuffix:"background-color",propertyName:"background-color"},{classSuffix:"border-color",propertyName:"border-color"}]},{path:["color","gradients"],valueKey:"gradient",cssVarInfix:"gradient",classes:[{classSuffix:"gradient-background",propertyName:"background"}]},{path:["color","duotone"],valueKey:"colors",cssVarInfix:"duotone",valueFunc:({slug:e})=>`url( '#wp-duotone-${e}' )`,classes:[]},{path:["shadow","presets"],valueKey:"shadow",cssVarInfix:"shadow",classes:[]},{path:["typography","fontSizes"],valueFunc:(e,t)=>i5(e,t),valueKey:"size",cssVarInfix:"font-size",classes:[{classSuffix:"font-size",propertyName:"font-size"}]},{path:["typography","fontFamilies"],valueKey:"fontFamily",cssVarInfix:"font-family",classes:[{classSuffix:"font-family",propertyName:"font-family"}]},{path:["spacing","spacingSizes"],valueKey:"size",cssVarInfix:"spacing",valueFunc:({size:e})=>e,classes:[]},{path:["border","radiusSizes"],valueKey:"size",cssVarInfix:"border-radius",classes:[]},{path:["dimensions","dimensionSizes"],valueKey:"size",cssVarInfix:"dimension",classes:[]}];function Dc(e,t){if(!e||!t)return t;let r=qC(e),o=qC(t),n=[];return r.forEach(i=>{o.forEach(s=>{n.push(`${i.trim()} ${s.trim()}`)})}),n.join(", ")}function Jde(e,t){if(!e||!t)return;let r={};return Object.entries(t).forEach(([o,n])=>{typeof n=="string"&&(r[o]=Dc(e,n)),typeof n=="object"&&(r[o]={},Object.entries(n).forEach(([i,s])=>{r[o][i]=Dc(e,s)}))}),r}function s5(e,t){return e.includes(",")?qC(e).map(n=>n+t).join(","):e+t}function zz(e,t){let r=`.is-style-${e}`;if(!t)return r;let o=/((?::\([^)]+\))?\s*)([^\s:]+)/,n=(s,l,c)=>l+c+r;return qC(t).map(s=>s.replace(o,n)).join(",")}function $de(e,t){let r=`.is-style-${e}`,o=qC(t).map(n=>{let i=n.trim(),s=`${r} `;return i.startsWith(s)?i.slice(s.length):i});return zz(e,o.join(","))}function Zje(e,t){if(!e||!t)return e;if(typeof e=="object"&&"ref"in e&&e?.ref){let r=(0,Qde.getCSSValueFromRawStyle)(ur(t,e.ref));return typeof r=="object"&&r!==null&&"ref"in r&&r?.ref?void 0:r===void 0?e:r}return e}function Xje(e,t){if(!e||!t||!Array.isArray(t))return e;let r=t.find(o=>o?.name===e);return r?.href?r?.href:e}function Hz(e,t){if(!e||!t)return e;let r=Zje(e,t);return typeof r=="object"&&r!==null&&"url"in r&&r?.url&&(r.url=Xje(r.url,t?._links?.["wp:theme-file"])),r}function efe(e,t,r=[],o="slug",n){let i=[t?ur(e,["blocks",t,...r]):void 0,ur(e,r)].filter(Boolean);for(let s of i)if(s){let l=["custom","theme","default"];for(let c of l){let u=s[c];if(u){let d=u.find(f=>f[o]===n);if(d)return o==="slug"||efe(e,t,r,"slug",d.slug)[o]===d[o]?d:void 0}}}}function Qje(e,t,r,[o,n]=[]){let i=yw.find(l=>l.cssVarInfix===o);if(!i||!e.settings)return r;let s=efe(e.settings,t,i.path,"slug",n);if(s){let{valueKey:l}=i,c=s[l];return a5(e,t,c)}return r}function Jje(e,t,r,o=[]){let n=(t?ur(e?.settings??{},["blocks",t,"custom",...o]):void 0)??ur(e?.settings??{},["custom",...o]);return n?a5(e,t,n):r}function a5(e,t,r){if(!r||typeof r!="string")if(typeof r=="object"&&r!==null&&"ref"in r&&typeof r.ref=="string"){let u=ur(e,r.ref);if(!u||typeof u=="object"&&"ref"in u)return u;r=u}else return r;let o="var:",n="var(--wp--",i=")",s;if(r.startsWith(o))s=r.slice(o.length).split("|");else if(r.startsWith(n)&&r.endsWith(i))s=r.slice(n.length,-i.length).split("--");else return r;let[l,...c]=s;return l==="preset"?Qje(e,t,r,c):l==="custom"?Jje(e,t,r,c):r}var rfe={"@mobile":"mobile","@tablet":"tablet","-current":"@current"};function tfe(e){return!!e&&typeof e=="object"&&!Array.isArray(e)}function ofe(e){if(!tfe(e))return e;let t=e;return Object.entries(rfe).forEach(([r,o])=>{Object.hasOwn(e,o)&&(t===e&&(t={...e}),Object.hasOwn(e,r)||(t[r]=e[o]),delete t[o])}),Object.entries(t).forEach(([r,o])=>{if(!tfe(o))return;let n=ofe(o);n!==o&&(t===e&&(t={...e}),t[r]=n)}),t}function qv(e){if(!e?.styles)return e;let t=ofe(e.styles);return t===e.styles?e:{...e,styles:t}}function nfe(e){let t=e.split("."),r=t.map(o=>rfe[o]??o);return r.some((o,n)=>o!==t[n])?r.join("."):void 0}function ww(e,t,r,o=!0){let n=t?"."+t:"",i=r?`styles.blocks.${r}${n}`:`styles${n}`;if(!e)return;let s=ur(e,i),l=nfe(i);if(s===void 0&&l){let u=!0,d=e;for(let f of i.split(".")){if(!d||typeof d!="object"||!Object.hasOwn(d,f)){u=!1;break}d=d[f]}u||(s=ur(e,l))}return o?a5(e,r,s):s}function ZC(e,t,r,o){let n=t?"."+t:"",i=o?`styles.blocks.${o}${n}`:`styles${n}`;return lh(qv(e),i.split("."),r)}var Uz=a(hI(),1);function Kv(e,t){return typeof e!="object"||typeof t!="object"?e===t:(0,Uz.default)(e?.styles,t?.styles)&&(0,Uz.default)(e?.settings,t?.settings)}var afe=a(fO(),1);function ife(e){return Object.prototype.toString.call(e)==="[object Object]"}function sfe(e){var t,r;return ife(e)===!1?!1:(t=e.constructor,t===void 0?!0:(r=t.prototype,!(ife(r)===!1||r.hasOwnProperty("isPrototypeOf")===!1)))}function Ui(e,t){return(0,afe.default)(qv(e),qv(t),{isMergeableObject:sfe,customMerge:r=>{if(r==="backgroundImage")return(o,n)=>n??o}})}function lfe(e,t){var r=0,o,n;t=t||{};function i(){var s=o,l=arguments.length,c,u;e:for(;s;){if(s.args.length!==arguments.length){s=s.next;continue}for(u=0;u<l;u++)if(s.args[u]!==arguments[u]){s=s.next;continue e}return s!==o&&(s===n&&(n=s.prev),s.prev.next=s.next,s.next&&(s.next.prev=s.prev),s.next=o,s.prev=null,o.prev=s,o=s),s.val}for(c=new Array(l),u=0;u<l;u++)c[u]=arguments[u];return s={args:c,val:e.apply(null,c)},o?(o.prev=s,s.next=o):n=s,r===t.maxSize?(n=n.prev,n.next=null):r++,o=s,s.val}return i.clear=function(){o=null,n=null,r=0},i}var Jt=a(V(),1),cfe=a(kt(),1),l5=new Map,$je=[],Wz={caption:(0,Jt.__)("Caption"),link:(0,Jt.__)("Link"),button:(0,Jt.__)("Button"),heading:(0,Jt.__)("Heading"),h1:(0,Jt.__)("H1"),h2:(0,Jt.__)("H2"),h3:(0,Jt.__)("H3"),h4:(0,Jt.__)("H4"),h5:(0,Jt.__)("H5"),h6:(0,Jt.__)("H6"),"settings.color":(0,Jt.__)("Color"),"settings.typography":(0,Jt.__)("Typography"),"settings.shadow":(0,Jt.__)("Shadow"),"settings.layout":(0,Jt.__)("Layout"),"styles.color":(0,Jt.__)("Colors"),"styles.spacing":(0,Jt.__)("Spacing"),"styles.background":(0,Jt.__)("Background"),"styles.typography":(0,Jt.__)("Typography")},eze=lfe(()=>(0,cfe.getBlockTypes)().reduce((e,{name:t,title:r})=>(e[t]=r,e),{})),c5=e=>e!==null&&typeof e=="object";function tze(e){if(Wz[e])return Wz[e];let t=e.split(".");if(t?.[0]==="blocks")return eze()?.[t[1]]||t[1];if(t?.[0]==="elements")return Wz[t[1]]||t[1]}function ufe(e,t,r=""){if(!c5(e)&&!c5(t))return e!==t?r.split(".").slice(0,2).join("."):void 0;e=c5(e)?e:{},t=c5(t)?t:{};let o=new Set([...Object.keys(e),...Object.keys(t)]),n=[];for(let i of o){let s=r?r+"."+i:i,l=ufe(e[i],t[i],s);l&&(n=n.concat(l))}return n}function rze(e,t){let r=JSON.stringify({next:e,previous:t});if(l5.has(r))return l5.get(r);let o=ufe({styles:{background:e?.styles?.background,color:e?.styles?.color,typography:e?.styles?.typography,spacing:e?.styles?.spacing},blocks:e?.styles?.blocks,elements:e?.styles?.elements,settings:e?.settings},{styles:{background:t?.styles?.background,color:t?.styles?.color,typography:t?.styles?.typography,spacing:t?.styles?.spacing},blocks:t?.styles?.blocks,elements:t?.styles?.elements,settings:t?.settings});if(!o||Array.isArray(o)&&!o.length)return l5.set(r,[]),[];let n=Array.isArray(o)?o:[o],i=[...new Set(n)].reduce((s,l)=>{let c=tze(l);return c&&s.push([l.split(".")[0],c]),s},[]);return l5.set(r,i),i}function XC(e,t,r={}){let o=rze(e,t),n=o.length,{maxResults:i}=r;return n?(i&&n>i&&(o=o.slice(0,i)),Object.entries(o.reduce((s,l)=>{let c=s[l[0]]||[];return c.includes(l[1])||(s[l[0]]=[...c,l[1]]),s},{})).map(([s,l])=>{let c=l.length,u=l.join((0,Jt.__)(", "));switch(s){case"blocks":return(0,Jt.sprintf)((0,Jt._n)("%s block.","%s blocks.",c),u);case"elements":return(0,Jt.sprintf)((0,Jt._n)("%s element.","%s elements.",c),u);case"settings":return(0,Jt.sprintf)((0,Jt.__)("%s settings."),u);case"styles":return(0,Jt.sprintf)((0,Jt.__)("%s styles."),u);default:return(0,Jt.sprintf)((0,Jt.__)("%s."),u)}})):$je}var Wi=a(kt(),1),QC=a(Vz(),1),gfe=a(G(),1);function Sw(e,t="root",r={}){if(!t)return null;let{fallback:o=!1}=r,{name:n,selectors:i,supports:s}=e,l=i&&Object.keys(i).length>0,c=Array.isArray(t)?t.join("."):t,u=null;if(l&&i.root?u=i?.root:s?.__experimentalSelector?u=s.__experimentalSelector:u=".wp-block-"+n.replace("core/","").replace("/","-"),c==="root")return u;let d=Array.isArray(t)?t:t.split(".");if(d.length===1){let m=o?u:null;if(l)return ur(i,`${c}.root`,null)||ur(i,c,null)||m;let h=s?ur(s,`${c}.__experimentalSelector`,null):void 0;return h?Dc(u,h):m}let f;return l&&(f=ur(i,c,null)),f||(o?Sw(e,d[0],r):null)}function oze(e=[]){let t={r:[],g:[],b:[],a:[]};return e.forEach(r=>{let o=Io(r).toRgb();t.r.push(o.r/255),t.g.push(o.g/255),t.b.push(o.b/255),t.a.push(o.a)}),t}function dfe(e,t){let r=oze(t);return`
2 <svg
3 xmlns:xlink="http://www.w3.org/1999/xlink"
4 viewBox="0 0 0 0"
5 width="0"
6 height="0"
7 focusable="false"
8 role="none"
9 aria-hidden="true"
10 style="visibility: hidden; position: absolute; left: -9999px; overflow: hidden;"
11 >
12 <defs>
13 <filter id="${e}">
14 <!--
15 Use sRGB instead of linearRGB so transparency looks correct.
16 Use perceptual brightness to convert to grayscale.
17 -->
18 <feColorMatrix color-interpolation-filters="sRGB" type="matrix" values=" .299 .587 .114 0 0 .299 .587 .114 0 0 .299 .587 .114 0 0 .299 .587 .114 0 0 "></feColorMatrix>
19 <!-- Use sRGB instead of linearRGB to be consistent with how CSS gradients work. -->
20 <feComponentTransfer color-interpolation-filters="sRGB">
21 <feFuncR type="table" tableValues="${r.r.join(" ")}"></feFuncR>
22 <feFuncG type="table" tableValues="${r.g.join(" ")}"></feFuncG>
23 <feFuncB type="table" tableValues="${r.b.join(" ")}"></feFuncB>
24 <feFuncA type="table" tableValues="${r.a.join(" ")}"></feFuncA>
25 </feComponentTransfer>
26 <!-- Re-mask the image with the original transparency since the feColorMatrix above loses that information. -->
27 <feComposite in2="SourceGraphic" operator="in"></feComposite>
28 </filter>
29 </defs>
30 </svg>`}function ch(e){return e.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/([0-9])([a-zA-Z])/g,"$1-$2").replace(/([a-zA-Z])([0-9])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase()}function Gz(e){if(!e)return;let t=e.match(/var:preset\|spacing\|(.+)/);return t?`var(--wp--preset--spacing--${t[1]})`:e}function nze(e){if(!e)return null;let t=typeof e=="string";return{top:t?e:e?.top,left:t?e:e?.left}}function Yz(e,t="0"){let r=nze(e);if(!r)return null;let o=Gz(r?.top)||t,n=Gz(r?.left)||t;return o===n?o:`${o} ${n}`}var ffe={backgroundSize:"cover",backgroundPosition:"50% 50%"};function mfe(e){if(!e||!e?.backgroundImage?.url)return;let t;return e?.backgroundSize||(t={backgroundSize:ffe.backgroundSize}),e?.backgroundSize==="contain"&&!e?.backgroundPosition&&(t={backgroundPosition:ffe.backgroundPosition}),t}var pfe={default:{name:"default",slug:"flow",className:"is-layout-flow",baseStyles:[{selector:" > .alignleft",rules:{float:"left","margin-inline-start":"0","margin-inline-end":"2em"}},{selector:" > .alignright",rules:{float:"right","margin-inline-start":"2em","margin-inline-end":"0"}},{selector:" > .aligncenter",rules:{"margin-left":"auto !important","margin-right":"auto !important"}}],spacingStyles:[{selector:" > :first-child",rules:{"margin-block-start":"0"}},{selector:" > :last-child",rules:{"margin-block-end":"0"}},{selector:" > *",rules:{"margin-block-start":null,"margin-block-end":"0"}}]},constrained:{name:"constrained",slug:"constrained",className:"is-layout-constrained",baseStyles:[{selector:" > .alignleft",rules:{float:"left","margin-inline-start":"0","margin-inline-end":"2em"}},{selector:" > .alignright",rules:{float:"right","margin-inline-start":"2em","margin-inline-end":"0"}},{selector:" > .aligncenter",rules:{"margin-left":"auto !important","margin-right":"auto !important"}},{selector:" > :where(:not(.alignleft):not(.alignright):not(.alignfull))",rules:{"max-width":"var(--wp--style--global--content-size)","margin-left":"auto !important","margin-right":"auto !important"}},{selector:" > .alignwide",rules:{"max-width":"var(--wp--style--global--wide-size)"}}],spacingStyles:[{selector:" > :first-child",rules:{"margin-block-start":"0"}},{selector:" > :last-child",rules:{"margin-block-end":"0"}},{selector:" > *",rules:{"margin-block-start":null,"margin-block-end":"0"}}]},flex:{name:"flex",slug:"flex",className:"is-layout-flex",displayMode:"flex",baseStyles:[{selector:"",rules:{"flex-wrap":"wrap","align-items":"center"}},{selector:" > :is(*, div)",rules:{margin:"0"}}],spacingStyles:[{selector:"",rules:{gap:null}}]},grid:{name:"grid",slug:"grid",className:"is-layout-grid",displayMode:"grid",baseStyles:[{selector:" > :is(*, div)",rules:{margin:"0"}}],spacingStyles:[{selector:"",rules:{gap:null}}]}};var ize={button:"wp-element-button",caption:"wp-element-caption"},sze={__experimentalBorder:"border",color:"color",dimensions:"dimensions",spacing:"spacing",typography:"typography"},vfe={"core/button":[":hover",":focus",":focus-visible",":active"],"core/navigation-link":[":hover",":focus",":focus-visible",":active"]},aze={link:[":link",":any-link",":visited",":hover",":focus",":focus-visible",":active"],button:[":link",":any-link",":visited",":hover",":focus",":focus-visible",":active"]},bfe={"@mobile":"@media (width <= 480px)","@tablet":"@media (480px < width <= 782px)"};function lze(e="*",t={}){return yw.reduce((r,{path:o,cssVarInfix:n,classes:i})=>{if(!i)return r;let s=ur(t,o,[]);return["default","theme","custom"].forEach(l=>{s[l]&&s[l].forEach(({slug:c})=>{i.forEach(({classSuffix:u,propertyName:d})=>{let f=`.has-${ch(c)}-${u}`,m=e.split(",").map(g=>`${g}${f}`).join(","),h=`var(--wp--preset--${n}--${ch(c)})`;r+=`${m}{${d}: ${h} !important;}`})})}),r},"")}function cze(e={}){return yw.filter(t=>t.path.at(-1)==="duotone").flatMap(t=>{let r=ur(e,t.path,{});return["default","theme"].filter(o=>r[o]).flatMap(o=>r[o].map(n=>dfe(`wp-duotone-${n.slug}`,n.colors))).join("")})}function yfe(e={},t,r){let o=[];return Object.keys(e).forEach(n=>{let i=t+ch(n.replace("/","-")),s=e[n];if(s instanceof Object){let l=i+r;o=[...o,...yfe(s,l,r)]}else o.push(`${i}: ${s}`)}),o}var uze=(e,t,r)=>{if(r!=="core/paragraph"||(t?.blocks?.["core/paragraph"]?.typography?.textIndent??t?.typography?.textIndent??"subsequent")!=="all")return e;let i=".wp-block-paragraph + .wp-block-paragraph",s=".wp-block-paragraph";if(i in e){let l=e[i],c={...e};return delete c[i],c[s]=l,c}return e},dze=(e,t)=>{let r=".wp-block-button";if(!(r in e))return e;let o={...e};return o[r]=o[r].map(n=>{let i=n.match(/^width:\s*(.+)$/);if(!i)return n;let s=i[1],l=null;s.endsWith("%")&&(l=parseFloat(s));let c="var(--wp--preset--dimension--";if(l===null&&s.startsWith(c)&&s.endsWith(")")){let u=s.slice(c.length,-1),d={...t?.dimensions?.dimensionSizes??{},...t?.blocks?.["core/button"]?.dimensions?.dimensionSizes??{}};for(let f of Object.values(d))if(Array.isArray(f)){for(let m of f)if(m.slug===u&&typeof m.size=="string"&&m.size.endsWith("%")){l=parseFloat(m.size);break}if(l!==null)break}}return l===null||isNaN(l)?n:`width: calc(${l} * 1% - (var(--wp--style--block-gap, 0.5em) * (1 - ${l} / 100)))`}),o},fze=(e,t)=>{let r={};return Object.entries(e).forEach(([o,n])=>{if(o==="root"||!t?.[o])return;let i=typeof n=="string";if(!i&&typeof n=="object"&&n!==null&&Object.entries(n).forEach(([s,l])=>{if(s==="root"||!t?.[o][s])return;let c={[o]:{[s]:t[o][s]}},u=d5(c);r[l]=[...r[l]||[],...u],delete t[o][s]}),i||typeof n=="object"&&n!==null&&"root"in n){let s=i?n:n.root,l={[o]:t[o]},c=d5(l);r[s]=[...r[s]||[],...c],delete t[o]}}),r};function d5(e={},t="",r,o={},n=!1){let i=ad===t,s=Object.entries(Wi.__EXPERIMENTAL_STYLE_PROPERTY).reduce((c,[u,{value:d,properties:f,useEngine:m,rootOnly:h}])=>{if(h&&!i)return c;let g=d;if(g[0]==="elements"||m)return c;let v=ur(e,g);if(u==="--wp--style--root--padding"&&(typeof v=="string"||!r))return c;if(f&&typeof v!="string")Object.entries(f).forEach(b=>{let[S,y]=b;if(!ur(v,[y],!1))return;let w=S.startsWith("--")?S:ch(S);c.push(`${w}: ${(0,QC.getCSSValueFromRawStyle)(ur(v,[y]))}`)});else if(ur(e,g,!1)){let b=u.startsWith("--")?u:ch(u);c.push(`${b}: ${(0,QC.getCSSValueFromRawStyle)(ur(e,g))}`)}return c},[]);return e.background&&(e.background?.backgroundImage&&(e.background.backgroundImage=Hz(e.background.backgroundImage,o)),!i&&e.background?.backgroundImage?.id&&(e={...e,background:{...e.background,...mfe(e.background)}})),(0,QC.getCSSRules)(e).forEach(c=>{if(i&&(r||n)&&c.key.startsWith("padding"))return;let u=c.key.startsWith("--")?c.key:ch(c.key),d=Hz(c.value,o);u==="font-size"&&(d=i5({name:"",slug:"",size:d},o?.settings)),u==="aspect-ratio"&&s.push("min-height: unset"),s.push(`${u}: ${d}`)}),s}function mze({layoutDefinitions:e=pfe,style:t,selector:r,hasBlockGapSupport:o,hasFallbackGapSupport:n,fallbackGapValue:i}){let s="",l=o?Yz(t?.spacing?.blockGap):"";if(n&&(r===ad?l=l||"0.5em":!o&&i&&(l=i)),l&&e&&(Object.values(e).forEach(({className:c,name:u,spacingStyles:d})=>{!o&&u!=="flex"&&u!=="grid"||d?.length&&d.forEach(f=>{let m=[];if(f.rules&&Object.entries(f.rules).forEach(([h,g])=>{m.push(`${h}: ${g||l}`)}),m.length){let h="";o?h=r===ad?`:root :where(.${c})${f?.selector||""}`:`:root :where(${r}-${c})${f?.selector||""}`:h=r===ad?`:where(.${c}${f?.selector||""})`:`:where(${r}.${c}${f?.selector||""})`,s+=`${h} { ${m.join("; ")}; }`}})}),r===ad&&o&&(s+=`${KC} { --wp--style--block-gap: ${l}; }`)),r===ad&&e){let c=["block","flex","grid"];Object.values(e).forEach(({className:u,displayMode:d,baseStyles:f})=>{d&&c.includes(d)&&(s+=`${r} .${u} { display:${d}; }`),f?.length&&f.forEach(m=>{let h=[];if(m.rules&&Object.entries(m.rules).forEach(([g,v])=>{h.push(`${g}: ${v}`)}),h.length){let g=`.${u}${m?.selector||""}`;s+=`${g} { ${h.join("; ")}; }`}})})}return s}var pze=["border","color","dimensions","spacing","typography","filter","outline","shadow","background"];function hze(e){return u5(e)}function u5(e,t){if(!e)return{};let r=Object.entries(e),o=t?vfe[t]??[]:[],i=r.filter(([s])=>pze.includes(s)||o.includes(s)||bfe[s]).map(([s,l])=>[s,JSON.parse(JSON.stringify(l))]);return Object.fromEntries(i)}function hfe(e){let{styles:t,selector:r,featureSelectors:o,name:n,elementName:i,mediaQuery:s,variationName:l}=e,c=n?vfe[n]??[]:aze[i??""]??[];return c.length?c.flatMap(u=>{let d=t?.[u];return!d||typeof d!="object"?[]:[{styles:JSON.parse(JSON.stringify(d)),selector:r,selectorSuffix:u,mediaQuery:s,featureSelectors:o&&typeof o!="string"?o:void 0,name:n,elementName:i,variationName:l}]}):[]}function gze(e){let{styles:t,selector:r,featureSelectors:o,name:n,elementName:i,isStyleVariation:s,variationName:l}=e;return!n&&!i?[]:Object.entries(bfe).flatMap(([c,u])=>{let d=t?.[c];return!d||typeof d!="object"?[]:[{styles:JSON.parse(JSON.stringify(d)),selector:r,mediaQuery:u,featureSelectors:o&&typeof o!="string"?o:void 0,name:n,elementName:i,isStyleVariation:s,variationName:l}]})}var vze=(e,t)=>{let r=[];if(!e?.styles)return r;let o=hze(e.styles);return o&&r.push({styles:o,selector:ad,skipSelectorWrapper:!0}),Object.entries(Wi.__EXPERIMENTAL_ELEMENTS).forEach(([n,i])=>{e.styles?.elements?.[n]&&r.push({styles:e.styles?.elements?.[n]??{},selector:i,elementName:n,skipSelectorWrapper:!ize[n]})}),Object.entries(e.styles?.blocks??{}).forEach(([n,i])=>{let s=u5(i,n),l=i,c=[],u=[];l?.variations&&Object.entries(l.variations).forEach(([d,f])=>{let m=f,h=u5(m,n);m?.css&&(h.css=m.css);let g=typeof t!="string"?t[n]?.styleVariationSelectors?.[d]:void 0;if(g&&typeof t!="string"){let v=t[n];u.push({styles:h,selector:g,featureSelectors:v?.featureSelectors,fallbackGapValue:v?.fallbackGapValue,hasLayoutSupport:v?.hasLayoutSupport,isStyleVariation:!0,variationName:d,layoutSelector:g+v.selector,layoutHasBlockGapSupport:!0,name:n})}Object.entries(m?.elements??{}).forEach(([v,b])=>{b&&Wi.__EXPERIMENTAL_ELEMENTS[v]&&c.push({styles:b,selector:Dc(g,Wi.__EXPERIMENTAL_ELEMENTS[v]),elementName:v,isStyleVariation:!0})}),Object.entries(m?.blocks??{}).forEach(([v,b])=>{let S=typeof t!="string"?Dc(g,t[v]?.selector):void 0,y=typeof t!="string"?Dc(g,t[v]?.duotoneSelector):void 0,w=typeof t!="string"?Jde(g,t[v]?.featureSelectors??{}):void 0,_=u5(b,v);b?.css&&(_.css=b.css),!(!S||typeof t=="string")&&(c.push({selector:S,name:v,isStyleVariation:!0,duotoneSelector:y,featureSelectors:w,fallbackGapValue:t[v]?.fallbackGapValue,hasLayoutSupport:t[v]?.hasLayoutSupport,styles:_}),Object.entries(b.elements??{}).forEach(([x,E])=>{E&&Wi.__EXPERIMENTAL_ELEMENTS[x]&&c.push({styles:E,selector:Dc(S,Wi.__EXPERIMENTAL_ELEMENTS[x]),elementName:x,isStyleVariation:!0})}))})}),typeof t!="string"&&t?.[n]?.selector&&r.push({duotoneSelector:t[n].duotoneSelector,fallbackGapValue:t[n].fallbackGapValue,hasLayoutSupport:t[n].hasLayoutSupport,selector:t[n].selector,styles:s,featureSelectors:t[n].featureSelectors,name:n}),r.push(...u),Object.entries(l?.elements??{}).forEach(([d,f])=>{typeof t!="string"&&f&&t?.[n]&&Wi.__EXPERIMENTAL_ELEMENTS[d]&&r.push({styles:f,selector:t[n]?.selector.split(",").map(m=>Wi.__EXPERIMENTAL_ELEMENTS[d].split(",").map(g=>m+" "+g)).join(","),elementName:d})}),r.push(...c)}),r},qz=(e,t)=>{let r=[];if(!e?.settings)return r;let o=s=>{let l={};return yw.forEach(({path:c})=>{let u=ur(s,c,!1);u!==!1&&(l=lh(l,c,u))}),l},n=o(e.settings),i=e.settings?.custom;return(Object.keys(n).length>0||i)&&r.push({presets:n,custom:i,selector:KC}),Object.entries(e.settings?.blocks??{}).forEach(([s,l])=>{let c=l.custom;if(typeof t=="string"||!t[s])return;let u=o(l);(Object.keys(u).length>0||c)&&r.push({presets:u,custom:c,selector:t[s]?.selector,featureSelectors:t[s]?.featureSelectors})}),r};function bze(e,t,r){if(!e||typeof e=="string")return r;let o=e[t];return typeof o=="string"?o:typeof o=="object"&&o.root?o.root:r}function yze(e,t,{path:r,valueKey:o,valueFunc:n,cssVarInfix:i}){let s=ur(e,r,[]),l=[];for(let c of["default","theme","custom"])if(s[c])for(let u of s[c]){let d=ch(u.slug);o&&!n?l.push(`--wp--preset--${i}--${d}: ${u[o]}`):n&&typeof n=="function"&&l.push(`--wp--preset--${i}--${d}: ${n(u,t)}`)}return l}var wze=(e,t)=>{let r=qz(e,t),o="";for(let{presets:n,custom:i,selector:s,featureSelectors:l}of r){let c=s,u={[c]:[]};if(e?.settings)for(let f of yw){let m=yze(n,e.settings,f);if(m.length===0)continue;let h=bze(l,f.path[0],c);u[h]||(u[h]=[]),u[h].push(...m)}let d=yfe(i,"--wp--custom--","--");d.length>0&&u[c].push(...d);for(let[f,m]of Object.entries(u))m.length>0&&(o+=`${f}{${m.join(";")};}`)}return o};function Sze(e,{tree:t,useRootPaddingAlign:r,disableLayoutStyles:o,hasBlockGapSupport:n,hasFallbackGapSupport:i,disableRootPadding:s}){let{selector:l,selectorSuffix:c,mediaQuery:u,duotoneSelector:d,styles:f,fallbackGapValue:m,hasLayoutSupport:h,featureSelectors:g,layoutSelector:v,layoutHasBlockGapSupport:b,skipSelectorWrapper:S,name:y,variationName:w}=e,_="",x=c?s5(l,c):l;if(g&&typeof g!="string"){let C=fze(g,f);C=uze(C,t.settings,y),C=dze(C,t.settings),Object.entries(C).forEach(([I,k])=>{if(k.length){let P=w?$de(w,I):I;P=c?s5(P,c):P;let N=k.join(";");_+=`:root :where(${P}){${N};}`}})}if(d){let C={};f?.filter&&(C.filter=f.filter,delete f.filter);let I=d5(C);I.length&&(_+=`${d}{${I.join(";")};}`)}let E=v??x;!o&&(ad===E||h)&&(_+=mze({style:f,selector:E,hasBlockGapSupport:b??n,hasFallbackGapSupport:i,fallbackGapValue:m}));let A=d5(f,x,r,t,s);if(A?.length){let C=S?x:`:root :where(${x})`;_+=`${C}{${A.join(";")};}`}return f?.css&&(_+=wfe(f.css,`:root :where(${x})`)),u&&_?`${u}{${_}}`:_}var _ze=(e,t,r,o,n=!1,i=!1,s={})=>{let l={blockGap:!0,blockStyles:!0,layoutStyles:!0,marginReset:!0,presets:!0,rootPadding:!0,variationStyles:!1,...s},c=qv(e),u=vze(c,t),d=qz(c,t),f=c?.settings?.useRootPaddingAwareAlignments,{contentSize:m,wideSize:h}=c?.settings?.layout||{},g=l.marginReset||l.rootPadding||l.layoutStyles,v="";if(l.presets&&(m||h)&&(v+=`${KC} {`,v=m?v+` --wp--style--global--content-size: ${m};`:v,v=h?v+` --wp--style--global--wide-size: ${h};`:v,v+="}"),g&&(v+=":where(body) {margin: 0;",l.rootPadding&&f&&(v+=`padding-right: 0; padding-left: 0; padding-top: var(--wp--style--root--padding-top); padding-bottom: var(--wp--style--root--padding-bottom) }
31 .has-global-padding { padding-right: var(--wp--style--root--padding-right); padding-left: var(--wp--style--root--padding-left); }
32 .has-global-padding > .alignfull { margin-right: calc(var(--wp--style--root--padding-right) * -1); margin-left: calc(var(--wp--style--root--padding-left) * -1); }
33 .has-global-padding :where(:not(.alignfull.is-layout-flow) > .has-global-padding:not(.wp-block-block, .alignfull)) { padding-right: 0; padding-left: 0; }
34 .has-global-padding :where(:not(.alignfull.is-layout-flow) > .has-global-padding:not(.wp-block-block, .alignfull)) > .alignfull { margin-left: 0; margin-right: 0;
35 `),v+="}"),l.blockStyles&&u.forEach(b=>{if(b.isStyleVariation&&!l.variationStyles)return;let S=gze(b);[b,...S,...hfe(b),...S.flatMap(hfe)].forEach(y=>{v+=Sze(y,{tree:c,useRootPaddingAlign:f,disableLayoutStyles:n,hasBlockGapSupport:r,hasFallbackGapSupport:o,disableRootPadding:i})})}),l.layoutStyles&&(v=v+".wp-site-blocks > .alignleft { float: left; margin-right: 2em; }",v=v+".wp-site-blocks > .alignright { float: right; margin-left: 2em; }",v=v+".wp-site-blocks > .aligncenter { justify-content: center; margin-left: auto; margin-right: auto; }"),l.blockGap&&r){let b=Yz(c?.styles?.spacing?.blockGap)||"0.5em";v=v+`:root :where(.wp-site-blocks) > * { margin-block-start: ${b}; margin-block-end: 0; }`,v=v+":root :where(.wp-site-blocks) > :first-child { margin-block-start: 0; }",v=v+":root :where(.wp-site-blocks) > :last-child { margin-block-end: 0; }"}return l.presets&&d.forEach(({selector:b,presets:S})=>{(ad===b||KC===b)&&(b="");let y=lze(b,S);y.length>0&&(v+=y)}),v};function xze(e,t){return qz(e,t).flatMap(({presets:o})=>cze(o))}var Cze=(e,t)=>{if(e?.selectors&&Object.keys(e.selectors).length>0)return e.selectors;let r={root:t};return Object.entries(sze).forEach(([o,n])=>{let i=Sw(e,o);i&&(r[n]=i)}),r},Tze=(e,t)=>{let{getBlockStyles:r}=(0,gfe.select)(Wi.store),o={};return e.forEach(n=>{let i=n.name,s=Sw(n);if(!s)return;let l=Sw(n,"filter.duotone");if(!l){let h=Sw(n),g=(0,Wi.getBlockSupport)(n,"color.__experimentalDuotone",!1);typeof g=="string"&&h&&(l=Dc(h,g))}let c=!!n?.supports?.layout||!!n?.supports?.__experimentalLayout,u=n?.supports?.spacing?.blockGap?.__experimentalDefault,d=r(i),f={};d?.forEach(h=>{let g=t?`-${t}`:"",v=`${h.name}${g}`,b=zz(v,s);f[v]=b});let m=Cze(n,s);o[i]={duotoneSelector:l??void 0,fallbackGapValue:u,featureSelectors:Object.keys(m).length?m:void 0,hasLayoutSupport:c,name:i,selector:s,styleVariationSelectors:d?.length?f:void 0}}),o};function Eze(e){let t=e.styles?.blocks,r=t?.["core/separator"];return r&&r.color?.background&&!r.color?.text&&!r.border?.color?{...e,styles:{...e.styles,blocks:{...t,"core/separator":{...r,color:{...r.color,text:r.color?.background}}}}}:e}function wfe(e,t){let r="";return!e||e.trim()===""||e.split("&").forEach(n=>{if(!n||n.trim()==="")return;if(!n.includes("{"))r+=`:root :where(${t}){${n.trim()}}`;else{let s=n.replace("}","").split("{");if(s.length!==2)return;let[l,c]=s,u=l.match(/([>+~\s]*::[a-zA-Z-]+)/),d=u?u[1]:"",f=u?l.replace(d,"").trim():l.trim(),m;f===""?m=t:m=l.startsWith(" ")?Dc(t,f):s5(t,f),r+=`:root :where(${m})${d}{${c.trim()}}`}}),r}function Zv(e={},t=[],r={}){let{hasBlockGapSupport:o,hasFallbackGapSupport:n,disableLayoutStyles:i=!1,disableRootPadding:s=!1,styleOptions:l={}}=r,c=t.length>0?t:(0,Wi.getBlockTypes)(),u=Yv(e,"spacing.blockGap"),d=o??u!==null,f=n??!d;if(!e?.styles||!e?.settings)return[[],{}];let m=Eze(e),h=Tze(c),g=wze(m,h),v=_ze(m,h,d,f,i,s,l),b=xze(m,h),S=[{css:g,isGlobalStyles:!0},{css:v,isGlobalStyles:!0},{css:m?.styles?.css??"",isGlobalStyles:!0},{assets:b,__unstableType:"svgs",isGlobalStyles:!0}];return c.forEach(y=>{let w=m?.styles?.blocks?.[y.name];if(w?.css){let{featureSelectors:_}=h[y.name],x=typeof _=="object"?_?.css:void 0,E;typeof x=="string"?E=x:typeof x=="object"&&(E=x?.root);let O=E??h[y.name].selector;S.push({css:wfe(w.css,O),isGlobalStyles:!0})}}),[S,m.settings]}function Kz(e,t){if(!e||!t)return"";let r={settings:{},styles:{blocks:{[t]:e}}};try{let[o]=Zv(r,[]);return o.map(n=>n.css).join(`
36 `)}catch{return""}}var Zz=a(H(),1);var Sfe=a(H(),1),Qo=(0,Sfe.createContext)({user:{styles:{},settings:{}},base:{styles:{},settings:{}},merged:{styles:{},settings:{}},onChange:()=>{},fontLibraryEnabled:!1});var _fe=a(T(),1);function JC({children:e,value:t,baseValue:r,onChange:o,fontLibraryEnabled:n}){let i=(0,Zz.useMemo)(()=>Ui(r,t),[r,t]),s=(0,Zz.useMemo)(()=>({user:t,base:r,merged:i,onChange:o,fontLibraryEnabled:n}),[t,r,i,o,n]);return(0,_fe.jsx)(Qo.Provider,{value:s,children:e})}var bo=a(W(),1),eb=a(V(),1);var Kfe=a(G(),1),Zfe=a(oe(),1);var xfe=a(T(),1);function $C({className:e,...t}){return(0,xfe.jsx)(hn,{className:Q(e,"global-styles-ui-icon-with-current-color"),...t})}var uh=a(W(),1);var Xv=a(T(),1);function Pze({icon:e,children:t,...r}){return(0,Xv.jsxs)(uh.__experimentalItem,{...r,children:[e&&(0,Xv.jsxs)(uh.__experimentalHStack,{justify:"flex-start",children:[(0,Xv.jsx)($C,{icon:e,size:24}),(0,Xv.jsx)(uh.FlexItem,{children:t})]}),!e&&t]})}function vo(e){return(0,Xv.jsx)(uh.Navigator.Button,{as:Pze,...e})}var Ffe=a(W(),1);var Qv=a(V(),1),Dfe=a(pe(),1);var Xz=function(e){var t=e/255;return t<.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)},Qz=function(e){return .2126*Xz(e.r)+.7152*Xz(e.g)+.0722*Xz(e.b)};function f5(e){e.prototype.luminance=function(){return t=Qz(this.rgba),(r=2)===void 0&&(r=0),o===void 0&&(o=Math.pow(10,r)),Math.round(o*t)/o+0;var t,r,o},e.prototype.contrast=function(t){t===void 0&&(t="#FFF");var r,o,n,i,s,l,c,u=t instanceof e?t:new e(t);return i=this.rgba,s=u.toRgb(),l=Qz(i),c=Qz(s),r=l>c?(l+.05)/(c+.05):(c+.05)/(l+.05),(o=2)===void 0&&(o=0),n===void 0&&(n=Math.pow(10,o)),Math.floor(n*r)/n+0},e.prototype.isReadable=function(t,r){return t===void 0&&(t="#FFF"),r===void 0&&(r={}),this.contrast(t)>=(l=(s=(o=r).size)===void 0?"normal":s,(i=(n=o.level)===void 0?"AA":n)==="AAA"&&l==="normal"?7:i==="AA"&&l==="large"?3:4.5);var o,n,i,s,l}}var Ll=a(H(),1),Ife=a(G(),1),Ofe=a(oe(),1),$z=a(V(),1);var Jo=a(V(),1),Cfe={link:[{value:":link",label:(0,Jo.__)("Link")},{value:":any-link",label:(0,Jo.__)("Any Link")},{value:":visited",label:(0,Jo.__)("Visited")},{value:":hover",label:(0,Jo.__)("Hover")},{value:":focus",label:(0,Jo.__)("Focus")},{value:":focus-visible",label:(0,Jo.__)("Focus-visible")},{value:":active",label:(0,Jo.__)("Active")}],button:[{value:":link",label:(0,Jo.__)("Link")},{value:":any-link",label:(0,Jo.__)("Any Link")},{value:":visited",label:(0,Jo.__)("Visited")},{value:":hover",label:(0,Jo.__)("Hover")},{value:":focus",label:(0,Jo.__)("Focus")},{value:":focus-visible",label:(0,Jo.__)("Focus-visible")},{value:":active",label:(0,Jo.__)("Active")}]},Tfe={"core/button":[{value:":hover",label:(0,Jo.__)("Hover")},{value:":focus",label:(0,Jo.__)("Focus")},{value:":focus-visible",label:(0,Jo.__)("Focus-visible")},{value:":active",label:(0,Jo.__)("Active")}]},kze=[{value:"@tablet",label:(0,Jo.__)("Tablet")},{value:"@mobile",label:(0,Jo.__)("Mobile")}];function Pfe(e){return Tfe[e]?Tfe[e]??[]:Cfe[e]?Cfe[e]:[]}function kfe(){return kze}function Jz(e,t){if(!t?.length||typeof e!="object"||!e||!Object.keys(e).length)return e;for(let r in e)t.includes(r)?delete e[r]:typeof e[r]=="object"&&Jz(e[r],t);return e}var m5=(e,t)=>{if(!e||!t?.length)return{};let r={};return Object.keys(e).forEach(o=>{if(t.includes(o))r[o]=e[o];else if(typeof e[o]=="object"){let n=m5(e[o],t);Object.keys(n).length&&(r[o]=n)}}),r};function eT(e,t){let r=m5(structuredClone(e),t);return Kv(r,e)}function Efe(e,t){if(!Array.isArray(e)||!t)return null;let o=t.replace("var(","").replace(")","")?.split("--").slice(-1)[0];return e.find(n=>n.slug===o)}function Rfe(e){let t=e?.settings?.typography?.fontFamilies?.theme,r=e?.settings?.typography?.fontFamilies?.custom,o=[];t&&r?o=[...t,...r]:t?o=t:r&&(o=r);let n=e?.styles?.typography?.fontFamily,i=Efe(o,n),s=e?.styles?.elements?.heading?.typography?.fontFamily,l;return s?l=Efe(o,e?.styles?.elements?.heading?.typography?.fontFamily):l=i,[i,l]}function Afe(e){return e?`is-style-${e}`:""}function p5(e,t){let r=new RegExp(`^${t}([\\d]+)$`);return e.reduce((n,i)=>{if(typeof i?.slug=="string"){let s=i?.slug.match(r);if(s){let l=parseInt(s[1],10);if(l>n)return l}}return n},0)+1}JI([f5]);function Ue(e,t,r="merged",o=!0,n){let{user:i,base:s,merged:l,onChange:c}=(0,Ll.useContext)(Qo),u=n?.split(".").filter(Boolean)??[],d=u.find(b=>b.startsWith(":")),f=u.filter(b=>!b.startsWith(":")).join("."),m=[e,f].filter(Boolean).join("."),h=l;r==="base"?h=s:r==="user"&&(h=i);let g=(0,Ll.useMemo)(()=>{let b=ww(h,m,t,o);return d?b?.[d]??{}:b},[h,m,t,o,d]),v=(0,Ll.useCallback)(b=>{let S=b;d&&(S={...ww(i,m,t,!1),[d]:b});let y=ZC(i,m,S,t);c(y)},[i,c,m,t,d]);return[g,v]}function Oe(e,t,r="merged"){let{user:o,base:n,merged:i,onChange:s}=(0,Ll.useContext)(Qo),l=i;r==="base"?l=n:r==="user"&&(l=o);let c=(0,Ll.useMemo)(()=>Yv(l,e,t),[l,e,t]),u=(0,Ll.useCallback)(d=>{let f=GC(o,e,d,t);s(f)},[o,s,e,t]);return[c,u]}var Rze=[];function Aze({title:e,settings:t,styles:r}){return e===(0,$z.__)("Default")||Object.keys(t||{}).length>0||Object.keys(r||{}).length>0}function h5(e=[]){let{variationsFromTheme:t}=(0,Ife.useSelect)(o=>({variationsFromTheme:o(Ofe.store).__experimentalGetCurrentThemeGlobalStylesVariations?.()||Rze}),[]),{user:r}=(0,Ll.useContext)(Qo);return(0,Ll.useMemo)(()=>{let o=structuredClone(r),n=Jz(o,e);n.title=(0,$z.__)("Default");let i=t.filter(l=>eT(l,e)).map(l=>Ui(n,l)),s=[n,...i];return s?.length?s.filter(Aze):[]},[e,r,t])}function Nfe(e){let[t,r]=Oe("color.palette.theme",e),o=(0,Ll.useCallback)(()=>{if(!t||!t.length)return;let n=Math.floor(Math.random()*225),i=t.map(s=>{let{color:l}=s,c=Io(l).rotate(n).toHex();return{...s,color:c}});r(i)},[t,r]);return window.__experimentalEnableColorRandomizer?[o]:[]}var Mfe=a(zm(),1),{lock:r7t,unlock:Tt}=(0,Mfe.__dangerousOptInToUnstableAPIsOnlyForCoreModules)("I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.","@wordpress/global-styles-ui");var Lc=a(T(),1),{useHasDimensionsPanel:Ize,useHasTypographyPanel:Oze,useHasColorPanel:Nze,useSettingsForBlockElement:Mze,useHasBackgroundPanel:Fze}=Tt(Dfe.privateApis);function Dze(){let[e]=Oe(""),t=Mze(e),r=Fze(e),o=Oze(t),n=Nze(t),i=!0,l=Ize(t);return(0,Lc.jsx)(Lc.Fragment,{children:(0,Lc.jsxs)(Ffe.__experimentalItemGroup,{children:[o&&(0,Lc.jsx)(vo,{icon:aB,path:"/typography",children:(0,Qv.__)("Typography")}),n&&(0,Lc.jsx)(vo,{icon:N4,path:"/colors",children:(0,Qv.__)("Colors")}),r&&(0,Lc.jsx)(vo,{icon:s4,path:"/background","aria-label":(0,Qv.__)("Background styles"),children:(0,Qv.__)("Background")}),i&&(0,Lc.jsx)(vo,{icon:yx,path:"/shadows",children:(0,Qv.__)("Shadows")}),l&&(0,Lc.jsx)(vo,{icon:ja,path:"/layout",children:(0,Qv.__)("Layout")})]})})}var Lfe=Dze;var ld=a(W(),1);function _w(){let[e="black"]=Ue("color.text"),[t="white"]=Ue("color.background"),[r=e]=Ue("elements.h1.color.text"),[o=r]=Ue("elements.link.color.text"),[n=o]=Ue("elements.button.color.background"),[i]=Oe("color.palette.core")||[],[s]=Oe("color.palette.theme")||[],[l]=Oe("color.palette.custom")||[],c=(s??[]).concat(l??[]).concat(i??[]),u=c.filter(({color:m})=>m===e),d=c.filter(({color:m})=>m===n),f=u.concat(d).concat(c).filter(({color:m})=>m!==t).slice(0,2);return{paletteColors:c,highlightedColors:f}}var jfe=a(H(),1),zfe=a(W(),1),tH=a(V(),1);function Lze(e,t){return t.length===0?null:(t.sort((r,o)=>Math.abs(e-r)-Math.abs(e-o)),t[0])}function Bze(e){let t=[];return e.forEach(r=>{let o=String(r.fontWeight).split(" ");if(o.length===2){let n=parseInt(o[0]),i=parseInt(o[1]);for(let s=n;s<=i;s+=100)t.push(s)}else o.length===1&&t.push(parseInt(o[0]))}),t}function Bfe(e){let t=/^(?!generic\([ a-zA-Z\-]+\)$)(?!^[a-zA-Z\-]+$).+/,r=e.trim(),o=n=>(n=n.trim(),n.match(t)?(n=n.replace(/^["']|["']$/g,""),`"${n}"`):n);return r.includes(",")?r.split(",").map(o).filter(n=>n!=="").join(", "):o(r)}function eH(e){if(!e)return"";let t=e.trim();return t.includes(",")&&(t=(t.split(",").find(r=>r.trim()!=="")??"").trim()),t=t.replace(/^["']|["']$/g,""),window.navigator.userAgent.toLowerCase().includes("firefox")&&(t=`"${t}"`),t}function Jv(e){let t={fontFamily:Bfe(e.fontFamily)};if(!("fontFace"in e)||!Array.isArray(e.fontFace))return t.fontWeight="400",t.fontStyle="normal",t;if(e.fontFace){let r=e.fontFace.filter(o=>o?.fontStyle&&o.fontStyle.toLowerCase()==="normal");if(r.length>0){t.fontStyle="normal";let o=Bze(r),n=Lze(400,o);t.fontWeight=String(n)||"400"}else t.fontStyle=e.fontFace.length&&e.fontFace[0].fontStyle||"normal",t.fontWeight=e.fontFace.length&&String(e.fontFace[0].fontWeight)||"400"}return t}function Vfe(e){return{fontFamily:Bfe(e.fontFamily),fontStyle:e.fontStyle||"normal",fontWeight:e.fontWeight||"400"}}var tT=a(T(),1);function g5({fontSize:e,variation:t}){let{base:r}=(0,jfe.useContext)(Qo),o=r;t&&(o={...r,...t});let[n]=Ue("color.text"),[i,s]=Rfe(o),l=i?Jv(i):{},c=s?Jv(s):{};return n&&(l.color=n,c.color=n),e&&(l.fontSize=e,c.fontSize=e),(0,tT.jsxs)(zfe.__unstableMotion.div,{animate:{scale:1,opacity:1},initial:{scale:.1,opacity:0},transition:{delay:.3,type:"tween"},style:{textAlign:"center",lineHeight:1},children:[(0,tT.jsx)("span",{style:c,children:(0,tH._x)("A","Uppercase letter A")}),(0,tT.jsx)("span",{style:l,children:(0,tH._x)("a","Lowercase letter A")})]})}var Hfe=a(W(),1);var Ufe=a(T(),1);function Wfe({normalizedColorSwatchSize:e,ratio:t}){let{highlightedColors:r}=_w(),o=e*t;return r.map(({slug:n,color:i},s)=>(0,Ufe.jsx)(Hfe.__unstableMotion.div,{style:{height:o,width:o,background:i,borderRadius:o/2},animate:{scale:1,opacity:1},initial:{scale:.1,opacity:0},transition:{delay:s===1?.2:.1}},`${n}-${s}`))}var qfe=a(W(),1),xw=a(ke(),1),$v=a(H(),1);var dh=a(T(),1),Gfe=248,Yfe=152,Vze={leading:!0,trailing:!0};function jze({children:e,label:t,isFocused:r,withHoverView:o}){let[n="white"]=Ue("color.background"),[i]=Ue("color.gradient"),s=(0,xw.useReducedMotion)(),[l,c]=(0,$v.useState)(!1),[u,{width:d}]=(0,xw.useResizeObserver)(),[f,m]=(0,$v.useState)(d),[h,g]=(0,$v.useState)(),v=(0,xw.useThrottle)(m,250,Vze);(0,$v.useLayoutEffect)(()=>{d&&v(d)},[d,v]),(0,$v.useLayoutEffect)(()=>{let w=f?f/Gfe:1,_=w-(h||0);(Math.abs(_)>.1||!h)&&g(w)},[f,h]);let b=d?d/Gfe:1,S=h||b;return(0,dh.jsxs)(dh.Fragment,{children:[(0,dh.jsx)("div",{style:{position:"relative"},children:u}),!!d&&(0,dh.jsx)("div",{className:Q("global-styles-ui-preview__wrapper",{"is-hoverable":o}),style:{height:Yfe*S},onMouseEnter:()=>c(!0),onMouseLeave:()=>c(!1),tabIndex:-1,children:(0,dh.jsx)(qfe.__unstableMotion.div,{style:{height:Yfe*S,width:"100%",background:i??n},initial:"start",animate:(l||r)&&!s&&t?"hover":"start",children:[].concat(e).map((w,_)=>w({ratio:S,key:_}))})})]})}var Cw=jze;var va=a(T(),1),zze={start:{scale:1,opacity:1},hover:{scale:0,opacity:0}},Hze={hover:{opacity:1},start:{opacity:.5}},Uze={hover:{scale:1,opacity:1},start:{scale:0,opacity:0}};function Wze({label:e,isFocused:t,withHoverView:r,variation:o}){let[n]=Ue("typography.fontWeight"),[i="serif"]=Ue("typography.fontFamily"),[s=i]=Ue("elements.h1.typography.fontFamily"),[l=n]=Ue("elements.h1.typography.fontWeight"),[c="black"]=Ue("color.text"),[u=c]=Ue("elements.h1.color.text"),{paletteColors:d}=_w();return(0,va.jsxs)(Cw,{label:e,isFocused:t,withHoverView:r,children:[({ratio:f,key:m})=>(0,va.jsx)(ld.__unstableMotion.div,{variants:zze,style:{height:"100%",overflow:"hidden"},children:(0,va.jsxs)(ld.__experimentalHStack,{spacing:10*f,justify:"center",style:{height:"100%",overflow:"hidden"},children:[(0,va.jsx)(g5,{fontSize:65*f,variation:o}),(0,va.jsx)(ld.__experimentalVStack,{spacing:4*f,children:(0,va.jsx)(Wfe,{normalizedColorSwatchSize:32,ratio:f})})]})},m),({key:f})=>(0,va.jsx)(ld.__unstableMotion.div,{variants:r?Hze:void 0,style:{height:"100%",width:"100%",position:"absolute",top:0,overflow:"hidden",filter:"blur(60px)",opacity:.1},children:(0,va.jsx)(ld.__experimentalHStack,{spacing:0,justify:"flex-start",style:{height:"100%",overflow:"hidden"},children:d.slice(0,4).map(({color:m},h)=>(0,va.jsx)("div",{style:{height:"100%",background:m,flexGrow:1}},h))})},f),({ratio:f,key:m})=>(0,va.jsx)(ld.__unstableMotion.div,{variants:Uze,style:{height:"100%",width:"100%",overflow:"hidden",position:"absolute",top:0},children:(0,va.jsx)(ld.__experimentalVStack,{spacing:3*f,justify:"center",style:{height:"100%",overflow:"hidden",padding:10*f,boxSizing:"border-box"},children:e&&(0,va.jsx)("div",{style:{fontSize:40*f,fontFamily:s,color:u,fontWeight:l,lineHeight:"1em",textAlign:"center"},children:e})})},m)]})}var v5=Wze;var Fo=a(T(),1);function Gze(){let e=(0,Kfe.useSelect)(t=>{let{__experimentalGetCurrentThemeGlobalStylesVariations:r}=t(Zfe.store);return!!r()?.length},[]);return(0,Fo.jsxs)(bo.Card,{size:"small",isBorderless:!0,className:"global-styles-ui-screen-root",isRounded:!1,children:[(0,Fo.jsx)(bo.CardBody,{children:(0,Fo.jsxs)(bo.__experimentalVStack,{spacing:4,children:[(0,Fo.jsx)(bo.Card,{className:"global-styles-ui-screen-root__active-style-tile",children:(0,Fo.jsx)(bo.CardMedia,{className:"global-styles-ui-screen-root__active-style-tile-preview",children:(0,Fo.jsx)(v5,{})})}),e&&(0,Fo.jsx)(bo.__experimentalItemGroup,{children:(0,Fo.jsx)(vo,{path:"/variations",children:(0,Fo.jsxs)(bo.__experimentalHStack,{justify:"space-between",children:[(0,Fo.jsx)(bo.FlexItem,{children:(0,eb.__)("Browse styles")}),(0,Fo.jsx)($C,{icon:(0,eb.isRTL)()?xr:Cr})]})})}),(0,Fo.jsx)(Lfe,{})]})}),(0,Fo.jsx)(bo.CardDivider,{}),(0,Fo.jsxs)(bo.CardBody,{children:[(0,Fo.jsx)(bo.__experimentalSpacer,{as:"p",paddingTop:2,paddingX:"13px",marginBottom:4,children:(0,eb.__)("Customize the appearance of specific blocks for the whole site.")}),(0,Fo.jsx)(bo.__experimentalItemGroup,{children:(0,Fo.jsx)(vo,{path:"/blocks",children:(0,Fo.jsxs)(bo.__experimentalHStack,{justify:"space-between",children:[(0,Fo.jsx)(bo.FlexItem,{children:(0,eb.__)("Blocks")}),(0,Fo.jsx)($C,{icon:(0,eb.isRTL)()?xr:Cr})]})})})]})]})}var Xfe=Gze;var oH=a(kt(),1),cd=a(V(),1),fh=a(W(),1),nH=a(G(),1),ud=a(H(),1),y5=a(pe(),1),rme=a(ke(),1),ome=a(Um(),1);var Qfe=a(kt(),1),Jfe=a(G(),1),$fe=a(W(),1);var rH=a(T(),1);function Yze(e,t){return e?.filter(r=>r.source==="block"||t.includes(r.name))||[]}function rT(e){let t=(0,Jfe.useSelect)(n=>{let{getBlockStyles:i}=n(Qfe.store);return i(e)},[e]),[r]=Ue("variations",e),o=Object.keys(r??{});return Yze(t,o)}function eme({name:e}){let t=rT(e);return(0,rH.jsx)($fe.__experimentalItemGroup,{isBordered:!0,isSeparated:!0,children:t.map((r,o)=>r?.isDefault?null:(0,rH.jsx)(vo,{path:"/blocks/"+encodeURIComponent(e)+"/variations/"+encodeURIComponent(r.name),children:r.label},o))})}var qn=a(W(),1),b5=a(V(),1);var tme=a(pe(),1);var As=a(T(),1),{StateControl:qze,StateControlBadges:Kze}=Tt(tme.privateApis);function ir({title:e,description:t,onBack:r,viewportStates:o,pseudoStates:n,selectedViewport:i="default",selectedPseudoState:s="default",onChangeViewport:l,onChangePseudoState:c}){return(0,As.jsx)(qn.__experimentalVStack,{spacing:0,children:(0,As.jsx)(qn.__experimentalView,{children:(0,As.jsx)(qn.__experimentalSpacer,{marginBottom:0,paddingX:4,paddingY:3,children:(0,As.jsxs)(qn.__experimentalVStack,{spacing:2,children:[(0,As.jsxs)(qn.__experimentalHStack,{spacing:2,alignment:"top",children:[(0,As.jsx)(qn.Navigator.BackButton,{icon:(0,b5.isRTL)()?Cr:xr,size:"small",label:(0,b5.__)("Back"),onClick:r}),(0,As.jsx)(qn.__experimentalSpacer,{children:(0,As.jsxs)(qn.__experimentalHStack,{justify:"space-between",alignment:"top",children:[(0,As.jsx)(qn.__experimentalHeading,{className:"global-styles-ui-header",level:2,size:13,children:e}),(0,As.jsxs)(qn.__experimentalVStack,{spacing:2,alignment:"right",children:[(0,As.jsx)(qze,{viewportStates:o,pseudoStates:n,viewportValue:i,pseudoStateValue:s,onChangeViewport:l,onChangePseudoState:c}),(0,As.jsx)(Kze,{viewportStates:o,pseudoStates:n,viewportValue:i,pseudoStateValue:s})]})]})})]}),t&&(0,As.jsx)(qn.__experimentalText,{className:"global-styles-ui-header__description",children:t})]})})})})}var Is=a(T(),1),{useHasDimensionsPanel:Zze,useHasTypographyPanel:Xze,useHasBorderPanel:Qze,useSettingsForBlockElement:Jze,useHasColorPanel:$ze,useHasBackgroundPanel:eHe}=Tt(y5.privateApis);function tHe(){let e=(0,nH.useSelect)(n=>n(oH.store).getBlockTypes(),[]),t=(n,i)=>{let{core:s,noncore:l}=n;return(i.name.startsWith("core/")?s:l).push(i),n},{core:r,noncore:o}=e.reduce(t,{core:[],noncore:[]});return[...r,...o]}function rHe(e){let[t]=Oe("",e),r=Jze(t,e),o=Xze(r),n=$ze(r),i=eHe(r),s=Qze(r),l=Zze(r),c=s||l,u=!!rT(e)?.length;return o||n||i||c||u}function oHe({block:e}){return rHe(e.name)?(0,Is.jsx)(vo,{path:"/blocks/"+encodeURIComponent(e.name),children:(0,Is.jsxs)(fh.__experimentalHStack,{justify:"flex-start",children:[(0,Is.jsx)(y5.BlockIcon,{icon:e.icon}),(0,Is.jsx)(fh.FlexItem,{children:e.title})]})}):null}function nHe({filterValue:e}){let t=tHe(),r=(0,rme.useDebounce)(ome.speak,500),{isMatchingSearchTerm:o}=(0,nH.useSelect)(oH.store),n=e?t.filter(s=>o(s,e)):t,i=(0,ud.useRef)(null);return(0,ud.useEffect)(()=>{if(!e)return;let s=i.current?.childElementCount||0,l=(0,cd.sprintf)((0,cd._n)("%d result found.","%d results found.",s),s);r(l,"polite")},[e,r]),(0,Is.jsx)("div",{ref:i,className:"global-styles-ui-block-types-item-list",role:"list",children:n.length===0?(0,Is.jsx)(fh.__experimentalText,{align:"center",as:"p",children:(0,cd.__)("No blocks found.")}):n.map(s=>(0,Is.jsx)(oHe,{block:s},"menu-itemblock-"+s.name))})}var iHe=(0,ud.memo)(nHe);function sHe(){let[e,t]=(0,ud.useState)(""),r=(0,ud.useDeferredValue)(e);return(0,Is.jsxs)(Is.Fragment,{children:[(0,Is.jsx)(ir,{title:(0,cd.__)("Blocks"),description:(0,cd.__)("Customize the appearance of specific blocks and for the whole site.")}),(0,Is.jsx)(fh.SearchControl,{className:"global-styles-ui-block-types-search",onChange:t,value:e,label:(0,cd.__)("Search"),placeholder:(0,cd.__)("Search")}),(0,Is.jsx)(iHe,{filterValue:r})]})}var nme=sHe;var ume=a(kt(),1),dme=a(pe(),1),Bc=a(H(),1),fme=a(G(),1),mme=a(oe(),1),tb=a(W(),1),Tw=a(V(),1);var ime=a(pe(),1),S5=a(kt(),1),sme=a(W(),1),iH=a(H(),1);var w5=a(T(),1),aHe={default:783,"@tablet":600,"@mobile":480},lHe=({name:e,variation:t="",selectedViewport:r="default",selectedState:o="default",stateStyles:n})=>{let i=(0,S5.getBlockType)(e)?.example,s=(0,iH.useMemo)(()=>{if(!i)return null;let b={...i,attributes:{...i.attributes,style:void 0,className:t?Afe(t):i.attributes?.className}};return(0,S5.getBlockFromExample)(e,b)},[e,i,t]),l=(0,iH.useMemo)(()=>o==="default"||!n?"":Kz(n,e),[o,n,e]);if(!i)return null;let c=aHe[r]??i.viewportWidth??500,u=i.viewportWidth??500,d=Math.max(c/u,1),f=24*d,m=144,g=235/c,v=g!==0&&g<1&&m?m/g:m;return(0,w5.jsx)(sme.__experimentalSpacer,{marginX:4,marginBottom:4,children:(0,w5.jsx)("div",{className:"global-styles-ui__block-preview-panel",style:{maxHeight:m,boxSizing:"initial"},children:(0,w5.jsx)(ime.BlockPreview,{blocks:s,viewportWidth:c,minHeight:m,additionalStyles:[{css:`
37 body{
38 padding: ${f}px;
39 min-height:${Math.round(v)}px;
40 display:flex;
41 }
42 .is-root-container {
43 width: ${100/d}%;
44 transform: scale(${d});
45 transform-origin: top left;
46 }
47 ${l}
48 `}]})})})},ame=lHe;var lme=a(W(),1),cme=a(T(),1);function Do({children:e,level:t=2}){return(0,cme.jsx)(lme.__experimentalHeading,{className:"global-styles-ui-subtitle",level:t,children:e})}var ln=a(T(),1),cHe={backgroundSize:"cover",backgroundPosition:"50% 50%"};function oT(e){if(!e)return e;let t=e.color||e.width;if(!e.style&&t)return{...e,style:"solid"};if(!(e.style&&!t))return e}function uHe(e){return e&&((0,tb.__experimentalHasSplitBorders)(e)?{top:oT(e.top),right:oT(e.right),bottom:oT(e.bottom),left:oT(e.left)}:oT(e))}var{useHasDimensionsPanel:dHe,useHasTypographyPanel:fHe,useHasBorderPanel:mHe,useSettingsForBlockElement:pHe,useHasColorPanel:hHe,useHasFiltersPanel:gHe,useHasImageSettingsPanel:vHe,useHasBackgroundPanel:bHe,BackgroundPanel:yHe,BorderPanel:wHe,ColorPanel:SHe,TypographyPanel:_He,DimensionsPanel:xHe,FiltersPanel:CHe,ImageSettingsPanel:THe,AdvancedPanel:EHe}=Tt(dme.privateApis);function PHe({name:e,variation:t}){let{user:r,onChange:o}=(0,Bc.useContext)(Qo),n=[];t&&(n=["variations",t].concat(n));let i=n.join("."),[s,l]=(0,Bc.useState)("default"),[c,u]=(0,Bc.useState)("default"),d=(0,Bc.useMemo)(()=>kfe(),[]),f=(0,Bc.useMemo)(()=>Pfe(e),[e]),m=[s,c].filter(le=>le!=="default").join("."),h=m.length>0,[g,v]=Ue(i,e,"user",!1,h?m:void 0),[b]=Ue(i,e,"merged",!1,h?m:void 0),[S]=Oe("",e,"user"),[y,w]=Oe("",e),_=pHe(y,e),x=(0,ume.getBlockType)(e),E=!1;_?.spacing?.blockGap&&x?.supports?.spacing?.blockGap&&(x?.supports?.spacing?.__experimentalSkipSerialization===!0||x?.supports?.spacing?.__experimentalSkipSerialization?.some?.(le=>le==="blockGap"))&&(E=!0);let O=!1;_?.dimensions?.aspectRatio&&e==="core/group"&&(O=!0);let A=(0,Bc.useMemo)(()=>{let le=structuredClone(_);return E&&(le.spacing.blockGap=!1),O&&(le.dimensions.aspectRatio=!1),le},[_,E,O]),C=rT(e),I=bHe(A),k=fHe(A),P=hHe(A),N=mHe(A),U=dHe(A),D=gHe(A)&&s==="default",B=vHe(e,S,A),L=!!C?.length&&!t,{canEditCSS:M}=(0,fme.useSelect)(le=>{let{getEntityRecord:ae,__experimentalGetCurrentGlobalStylesId:re}=le(mme.store),ve=re();return{canEditCSS:!!(ve?ae("root","globalStyles",ve):void 0)?._links?.["wp:action-edit-css"]}},[]),z=t?C.find(le=>le.name===t):null,K=(0,Bc.useMemo)(()=>({...b,layout:A.layout}),[b,A.layout]),Z=(0,Bc.useMemo)(()=>({...g,layout:S.layout}),[g,S.layout]),q=le=>{let ae={...le};delete ae.layout,v(ae),le.layout!==S.layout&&w({...S,layout:le.layout})},X=le=>{w(le===void 0?{...y,lightbox:void 0}:{...y,lightbox:{...y.lightbox,...le}})},ie=le=>{let{settings:ae,...re}=le;if(ae?.typography){let ve=[i,m].filter(Boolean).join("."),Ce=ZC(r,ve,re,e);Ce=GC(Ce,"typography",{...S.typography,...ae.typography},e),o(Ce)}else v(re)},$=le=>{if(!le?.border){v(le);return}let{radius:ae,...re}=le.border,ve=uHe(re),Ce=(0,tb.__experimentalHasSplitBorders)(ve)?{color:null,style:null,width:null,...ve}:{top:ve,right:ve,bottom:ve,left:ve};v({...le,border:{...Ce,radius:ae}})};return(0,ln.jsxs)(ln.Fragment,{children:[(0,ln.jsx)(ir,{title:t?z?.label:x?.title,viewportStates:d,pseudoStates:f,selectedViewport:s,selectedPseudoState:c,onChangeViewport:l,onChangePseudoState:u}),(0,ln.jsx)(ame,{name:e,variation:t,selectedViewport:s,selectedState:h?m:"default",stateStyles:h?b:void 0}),L&&(0,ln.jsx)("div",{className:"global-styles-ui-screen-variations",children:(0,ln.jsxs)(tb.__experimentalVStack,{spacing:3,children:[(0,ln.jsx)(Do,{children:(0,Tw.__)("Style Variations")}),(0,ln.jsx)(eme,{name:e})]})}),I&&(0,ln.jsx)(yHe,{inheritedValue:b,value:g,onChange:v,settings:A,defaultValues:cHe}),k&&(0,ln.jsx)(_He,{inheritedValue:b,value:g,onChange:ie,settings:A,isGlobalStyles:!h}),U&&(0,ln.jsx)(xHe,{inheritedValue:K,value:Z,onChange:q,settings:A,includeLayoutControls:!0}),N&&(0,ln.jsx)(wHe,{inheritedValue:b,value:g,onChange:$,settings:A}),D&&(0,ln.jsx)(CHe,{inheritedValue:K,value:Z,onChange:v,settings:A,includeLayoutControls:!0}),P&&(0,ln.jsx)(SHe,{inheritedValue:b,value:g,onChange:v,settings:A}),B&&!h&&(0,ln.jsx)(THe,{onChange:X,value:S,inheritedValue:A}),M&&(0,ln.jsx)(tb.PanelBody,{title:(0,Tw.__)("Advanced"),initialOpen:!1,children:(0,ln.jsx)(EHe,{value:g,onChange:v,inheritedValue:b,help:(0,Tw.sprintf)((0,Tw.__)("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."),x?.title)})})]})}var sH=PHe;var q5=a(V(),1),Ppe=a(W(),1),kpe=a(H(),1);var pme=a(W(),1);var hme=a(T(),1);function mh({children:e,className:t}){return(0,hme.jsx)(pme.__experimentalSpacer,{className:Q("global-styles-ui-screen-body",t),padding:4,children:e})}var ph=a(V(),1),Hf=a(W(),1);var ba=a(T(),1);function nT({parentMenu:e,element:t,label:r}){let o=t==="text"||!t?"":`elements.${t}.`,n=t==="link"?{textDecoration:"underline"}:{},[i]=Ue(o+"typography.fontFamily"),[s]=Ue(o+"typography.fontStyle"),[l]=Ue(o+"typography.fontWeight"),[c]=Ue(o+"color.background"),[u]=Ue("color.background"),[d]=Ue(o+"color.gradient"),[f]=Ue(o+"color.text");return(0,ba.jsx)(vo,{path:e+"/typography/"+t,children:(0,ba.jsxs)(Hf.__experimentalHStack,{justify:"flex-start",children:[(0,ba.jsx)(Hf.FlexItem,{className:"global-styles-ui-screen-typography__indicator","aria-hidden":"true",style:{fontFamily:i??"serif",background:d??c??u,color:f,fontStyle:s,fontWeight:l,...n},children:(0,ph.__)("Aa")}),(0,ba.jsx)(Hf.FlexItem,{children:r})]})})}function kHe(){return(0,ba.jsxs)(Hf.__experimentalVStack,{spacing:3,children:[(0,ba.jsx)(Do,{level:3,children:(0,ph.__)("Elements")}),(0,ba.jsxs)(Hf.__experimentalItemGroup,{isBordered:!0,isSeparated:!0,children:[(0,ba.jsx)(nT,{parentMenu:"",element:"text",label:(0,ph.__)("Text")}),(0,ba.jsx)(nT,{parentMenu:"",element:"link",label:(0,ph.__)("Links")}),(0,ba.jsx)(nT,{parentMenu:"",element:"heading",label:(0,ph.__)("Headings")}),(0,ba.jsx)(nT,{parentMenu:"",element:"caption",label:(0,ph.__)("Captions")}),(0,ba.jsx)(nT,{parentMenu:"",element:"button",label:(0,ph.__)("Buttons")})]})]})}var gme=kHe;var C5=a(W(),1);var vme=a(W(),1);var _5=a(T(),1),RHe=({variation:e,isFocused:t,withHoverView:r})=>(0,_5.jsx)(Cw,{label:e.title,isFocused:t,withHoverView:r,children:({ratio:o,key:n})=>(0,_5.jsx)(vme.__experimentalHStack,{spacing:10*o,justify:"center",style:{height:"100%",overflow:"hidden"},children:(0,_5.jsx)(g5,{variation:e,fontSize:85*o})},n)}),bme=RHe;var rb=a(H(),1),yme=a(go(),1),x5=a(V(),1);var hh=a(T(),1);function Ew({variation:e,children:t,isPill:r=!1,properties:o,showTooltip:n=!1}){let[i,s]=(0,rb.useState)(!1),{base:l,user:c,onChange:u}=(0,rb.useContext)(Qo),d=(0,rb.useMemo)(()=>{let b=Ui(l,e);return o&&(b=m5(b,o)),{user:e,base:l,merged:b,onChange:()=>{}}},[e,l,o]),f=()=>u(e),m=b=>{b.keyCode===yme.ENTER&&(b.preventDefault(),f())},h=(0,rb.useMemo)(()=>Kv(c,e),[c,e]),g=e?.title;e?.description&&(g=(0,x5.sprintf)((0,x5._x)("%1$s (%2$s)","variation label"),e?.title,e?.description));let v=(0,hh.jsx)("div",{className:Q("global-styles-ui-variations_item",{"is-active":h}),role:"button",onClick:f,onKeyDown:m,tabIndex:0,"aria-label":g,"aria-current":h,onFocus:()=>s(!0),onBlur:()=>s(!1),children:(0,hh.jsx)("div",{className:Q("global-styles-ui-variations_item-preview",{"is-pill":r}),children:t(i)})});return(0,hh.jsx)(Qo.Provider,{value:d,children:n?(0,hh.jsxs)(We.Root,{children:[(0,hh.jsx)(We.Trigger,{render:v}),(0,hh.jsx)(We.Popup,{children:e?.title})]}):v})}var ob=a(T(),1),wme=["typography"];function Pw({title:e,gap:t=2}){let r=h5(wme);return r?.length<=1?null:(0,ob.jsxs)(C5.__experimentalVStack,{spacing:3,children:[e&&(0,ob.jsx)(Do,{level:3,children:e}),(0,ob.jsx)(C5.__experimentalGrid,{columns:3,gap:t,className:"global-styles-ui-style-variations-container",children:r.map((o,n)=>(0,ob.jsx)(Ew,{variation:o,properties:wme,showTooltip:!0,children:()=>(0,ob.jsx)(bme,{variation:o})},n))})]})}var lb=a(V(),1),jc=a(W(),1);var Cpe=a(H(),1);var Wf=a(H(),1),bh=a(G(),1),vh=a(oe(),1),uH=a(V(),1);var aH=a(Zd(),1),Sme=a(oe(),1),_me="/wp/v2/font-families";function xme(e){let{receiveEntityRecords:t}=e.dispatch(Sme.store);t("postType","wp_font_family",[],void 0,!0)}async function Cme(e,t){let o=await(0,aH.default)({path:_me,method:"POST",body:e});return xme(t),{id:o.id,...o.font_family_settings,fontFace:[]}}async function Tme(e,t,r){let o={path:`${_me}/${e}/font-faces`,method:"POST",body:t},n=await(0,aH.default)(o);return xme(r),{id:n.id,...n.font_face_settings}}var kme=a(W(),1);var Bl=a(V(),1),lH=["otf","ttf","woff","woff2"],Eme={100:(0,Bl._x)("Thin","font weight"),200:(0,Bl._x)("Extra-light","font weight"),300:(0,Bl._x)("Light","font weight"),400:(0,Bl._x)("Normal","font weight"),500:(0,Bl._x)("Medium","font weight"),600:(0,Bl._x)("Semi-bold","font weight"),700:(0,Bl._x)("Bold","font weight"),800:(0,Bl._x)("Extra-bold","font weight"),900:(0,Bl._x)("Black","font weight")},Pme={normal:(0,Bl._x)("Normal","font style"),italic:(0,Bl._x)("Italic","font style")};var{File:Rme}=window,{kebabCase:AHe}=Tt(kme.privateApis);function Uf(e,t={}){return!e.name&&(e.fontFamily||e.slug)&&(e.name=e.fontFamily||e.slug),{...e,...t}}function IHe(e){return typeof e!="string"?!1:e!==decodeURIComponent(e)}function T5(e){let t=Eme[e.fontWeight??""]||e.fontWeight,r=e.fontStyle==="normal"?"":Pme[e.fontStyle??""]||e.fontStyle;return`${t} ${r}`}function OHe(e=[],t=[]){let r=new Map;for(let o of e)r.set(`${o.fontWeight}${o.fontStyle}`,o);for(let o of t)r.set(`${o.fontWeight}${o.fontStyle}`,o);return Array.from(r.values())}function Ame(e=[],t=[]){let r=new Map;for(let o of e)r.set(o.slug,{...o});for(let o of t)if(r.has(o.slug)){let{fontFace:n,...i}=o,s=r.get(o.slug),l=OHe(s.fontFace,n);r.set(o.slug,{...i,fontFace:l})}else r.set(o.slug,{...o});return Array.from(r.values())}async function gh(e,t,r="all"){let o;if(typeof t=="string")o=`url(${t})`;else if(t instanceof Rme)o=await t.arrayBuffer();else return;let i=await new window.FontFace(eH(e.fontFamily),o,{style:e.fontStyle,weight:String(e.fontWeight)}).load();if((r==="document"||r==="all")&&document.fonts.add(i),r==="iframe"||r==="all"){let s=document.querySelector('iframe[name="editor-canvas"]');s?.contentDocument&&s.contentDocument.fonts.add(i)}}function iT(e,t="all"){let r=o=>{o.forEach(n=>{n.family===eH(e?.fontFamily)&&n.weight===e?.fontWeight&&n.style===e?.fontStyle&&o.delete(n)})};if((t==="document"||t==="all")&&r(document.fonts),t==="iframe"||t==="all"){let o=document.querySelector('iframe[name="editor-canvas"]');o?.contentDocument&&r(o.contentDocument.fonts)}}function kw(e){if(!e)return;let t;if(Array.isArray(e)?t=e[0]:t=e,!t.startsWith("file:."))return IHe(t)||(t=encodeURI(t)),t}function Ime(e){let t=new FormData,{fontFace:r,category:o,...n}=e,i={...n,slug:AHe(e.slug)};return t.append("font_family_settings",JSON.stringify(i)),t}function Ome(e){return(e?.fontFace??[]).map((r,o)=>{let n={...r},i=new FormData;if(n.file){let s=Array.isArray(n.file)?n.file:[n.file],l=[];s.forEach((c,u)=>{let d=`file-${o}-${u}`;i.append(d,c,c.name),l.push(d)}),n.src=l.length===1?l[0]:l,delete n.file,i.append("font_face_settings",JSON.stringify(n))}else i.append("font_face_settings",JSON.stringify(n));return i})}async function Nme(e,t,r){let o=[];for(let i of t)try{let s=await Tme(e,i,r);o.push({status:"fulfilled",value:s})}catch(s){o.push({status:"rejected",reason:s})}let n={errors:[],successes:[]};return o.forEach((i,s)=>{if(i.status==="fulfilled"&&i.value){let l=i.value;n.successes.push(l)}else i.reason&&n.errors.push({data:t[s],message:i.reason.message})}),n}async function Mme(e){e=Array.isArray(e)?e:[e];let t=await Promise.all(e.map(async r=>fetch(new Request(r)).then(o=>{if(!o.ok)throw new Error(`Error downloading font face asset from ${r}. Server responded with status: ${o.status}`);return o.blob()}).then(o=>{let n=r.split("/").pop();return new Rme([o],n,{type:o.type})})));return t.length===1?t[0]:t}function cH(e,t){return t.findIndex(r=>r.fontWeight===e.fontWeight&&r.fontStyle===e.fontStyle)!==-1}function Fme(e,t,r){t=Array.isArray(t)?[...t]:[t],e=Array.isArray(e)?[...e]:{...e};let o=t.pop(),n=e;for(let i of t){let s=n[i];n=n[i]=Array.isArray(s)?[...s]:{...s}}return n[o]=r,e}function E5(e,t,r=[]){let o=c=>c.slug===e.slug,n=c=>c.find(o),i=c=>c?r.filter(u=>!o(u)):[...r,e],s=c=>{let u=f=>f.fontWeight===t.fontWeight&&f.fontStyle===t.fontStyle;if(!c)return[...r,{...e,fontFace:[t]}];let d=c.fontFace||[];return d.find(u)?d=d.filter(f=>!u(f)):d=[...d,t],d.length===0?r.filter(f=>!o(f)):r.map(f=>o(f)?{...f,fontFace:d}:f)},l=n(r);return t?s(l):i(l)}var Dme=a(T(),1),mi=(0,Wf.createContext)({});mi.displayName="FontLibraryContext";function NHe({children:e}){let t=(0,bh.useRegistry)(),{saveEntityRecord:r,deleteEntityRecord:o}=(0,bh.useDispatch)(vh.store),{globalStylesId:n}=(0,bh.useSelect)(M=>{let{__experimentalGetCurrentGlobalStylesId:z}=M(vh.store);return{globalStylesId:z()}},[]),i=(0,vh.useEntityRecord)("root","globalStyles",n),[s,l]=(0,Wf.useState)(!1),{records:c=[],isResolving:u}=(0,vh.useEntityRecords)("postType","wp_font_family",{_embed:!0}),d=(c||[]).map(M=>({id:M.id,...M.font_family_settings||{},fontFace:M?._embedded?.font_faces?.map(z=>z.font_face_settings)||[]}))||[],[f,m]=Oe("typography.fontFamilies"),h=async M=>{if(!i.record)return;let z=i.record,K=Fme(z??{},["settings","typography","fontFamilies"],M);await r("root","globalStyles",K)},[g,v]=(0,Wf.useState)(""),[b,S]=(0,Wf.useState)(void 0),y=f?.theme?f.theme.map(M=>Uf(M,{source:"theme"})).sort((M,z)=>M.name.localeCompare(z.name)):[],w=f?.custom?f.custom.map(M=>Uf(M,{source:"custom"})).sort((M,z)=>M.name.localeCompare(z.name)):[],_=d?d.map(M=>Uf(M,{source:"custom"})).sort((M,z)=>M.name.localeCompare(z.name)):[];(0,Wf.useEffect)(()=>{g||S(void 0)},[g]);let x=M=>{if(!M){S(void 0);return}let K=(M.source==="theme"?y:_).find(Z=>Z.slug===M.slug);S({...K||M,source:M.source})},[E]=(0,Wf.useState)(new Set),O=M=>M.reduce((K,Z)=>{let q=Z?.fontFace&&Z.fontFace?.length>0?Z?.fontFace.map(X=>`${X.fontStyle??""}${X.fontWeight??""}`):["normal400"];return K[Z.slug]=q,K},{}),A=M=>O(M==="theme"?y:w),C=(M,z,K,Z)=>!z&&!K?!!A(Z)[M]:!!A(Z)[M]?.includes((z??"")+(K??"")),I=(M,z)=>A(z)[M]||[];async function k(M){l(!0);try{let z=[],K=[];for(let q of M){let X=!1,ie=await(0,bh.resolveSelect)(vh.store).getEntityRecords("postType","wp_font_family",{slug:q.slug,per_page:1,_embed:!0}),$=ie&&ie.length>0?ie[0]:null,le=$?{id:$.id,...$.font_family_settings,fontFace:($?._embedded?.font_faces??[]).map(Ce=>Ce.font_face_settings)||[]}:null;le||(X=!0,le=await Cme(Ime(q),t));let ae=le.fontFace&&q.fontFace?le.fontFace.filter(Ce=>Ce&&q.fontFace&&cH(Ce,q.fontFace)):[];le.fontFace&&q.fontFace&&(q.fontFace=q.fontFace.filter(Ce=>!cH(Ce,le.fontFace)));let re=[],ve=[];if(q?.fontFace?.length??!1){let Ce=await Nme(le.id,Ome(q),t);re=Ce?.successes,ve=Ce?.errors}(re?.length>0||ae?.length>0)&&(le.fontFace=[...re],z.push(le)),le&&!q?.fontFace?.length&&z.push(le),X&&(q?.fontFace?.length??0)>0&&re?.length===0&&await o("postType","wp_font_family",le.id,{force:!0}),K=K.concat(ve)}let Z=K.reduce((q,X)=>q.includes(X.message)?q:[...q,X.message],[]);if(z.length>0){let q=U(z);await h(q)}if(Z.length>0){let q=new Error((0,uH.__)("There was an error installing fonts."));throw q.installationErrors=Z,q}}finally{l(!1)}}async function P(M){if(!M?.id)throw new Error((0,uH.__)("Font family to uninstall is not defined."));try{await o("postType","wp_font_family",M.id,{force:!0});let z=N(M);return await h(z),{deleted:!0}}catch(z){throw console.error("There was an error uninstalling the font family:",z),z}}let N=M=>{let K=(f?.[M.source??""]??[]).filter(q=>q.slug!==M.slug),Z={...f,[M.source??""]:K};return m(Z),M.fontFace&&M.fontFace.forEach(q=>{iT(q,"all")}),Z},U=M=>{let z=F(M),K={...f,custom:Ame(f?.custom,z)};return m(K),D(z),K},F=M=>M.map(({id:z,fontFace:K,...Z})=>({...Z,...K&&K.length>0?{fontFace:K.map(({id:q,...X})=>X)}:{}})),D=M=>{M.forEach(z=>{z.fontFace&&z.fontFace.forEach(K=>{let Z=kw(K?.src??"");Z&&gh(K,Z,"all")})})},B=(M,z)=>{let K=f?.[M.source??""]??[],Z=E5(M,z,K);m({...f,[M.source??""]:Z});let q=C(M.slug,z?.fontStyle??"",z?.fontWeight??"",M.source??"custom");if(z&&q)iT(z,"all");else{let X=kw(z?.src??"");z&&X&&gh(z,X,"all")}},L=async M=>{if(!M.src)return;let z=kw(M.src);!z||E.has(z)||(gh(M,z,"document"),E.add(z))};return(0,Dme.jsx)(mi.Provider,{value:{libraryFontSelected:b,handleSetLibraryFontSelected:x,fontFamilies:f??{},baseCustomFonts:_,isFontActivated:C,getFontFacesActivated:I,loadFontFaceAsset:L,installFonts:k,uninstallFontFamily:P,toggleActivateFont:B,getAvailableFontsOutline:O,modalTabOpen:g,setModalTabOpen:v,saveFontFamilies:h,isResolvingLibrary:u,isInstalling:s},children:e})}var P5=NHe;var Ow=a(V(),1),W5=a(W(),1),G5=a(oe(),1),ype=a(G(),1);var Et=a(W(),1),aT=a(oe(),1),dH=a(G(),1),md=a(H(),1),to=a(V(),1);var Aw=a(V(),1),R5=a(H(),1),Vl=a(W(),1);var Lme=a(W(),1),dd=a(H(),1);var k5=a(T(),1);function MHe(e){if(e.preview)return e.preview;if(e.src)return Array.isArray(e.src)?e.src[0]:e.src}function FHe(e){return"fontStyle"in e&&e.fontStyle||"fontWeight"in e&&e.fontWeight?e:"fontFace"in e&&e.fontFace&&e.fontFace.length?e.fontFace.find(t=>t.fontStyle==="normal"&&t.fontWeight==="400")||e.fontFace[0]:{fontStyle:"normal",fontWeight:"400",fontFamily:e.fontFamily}}function DHe({font:e,text:t}){let r=(0,dd.useRef)(null),o=FHe(e),n=Jv(e);t=t||("name"in e?e.name:"");let i=e.preview,[s,l]=(0,dd.useState)(!1),[c,u]=(0,dd.useState)(!1),{loadFontFaceAsset:d}=(0,dd.useContext)(mi),f=i??MHe(o),m=f&&f.match(/\.(png|jpg|jpeg|gif|svg)$/i),h=Vfe(o),g={fontSize:"18px",lineHeight:1,opacity:c?"1":"0",...n,...h};return(0,dd.useEffect)(()=>{let v=new window.IntersectionObserver(([b])=>{l(b.isIntersecting)},{});return r.current&&v.observe(r.current),()=>v.disconnect()},[r]),(0,dd.useEffect)(()=>{(async()=>s&&(!m&&o.src&&await d(o),u(!0)))()},[o,s,d,m]),(0,k5.jsx)("div",{ref:r,children:m?(0,k5.jsx)("img",{src:f,loading:"lazy",alt:t,className:"font-library__font-variant_demo-image"}):(0,k5.jsx)(Lme.__experimentalText,{style:g,className:"font-library__font-variant_demo-text",children:t})})}var Rw=DHe;var fd=a(T(),1);function LHe({font:e,onClick:t,variantsText:r,navigatorPath:o,shouldFocus:n}){let i=e.fontFace?.length||1,s={cursor:t?"pointer":"default"},l=(0,Vl.useNavigator)(),c=(0,R5.useRef)(null);return(0,R5.useEffect)(()=>{n&&c.current?.focus()},[n]),(0,fd.jsx)(Vl.Button,{ref:c,__next40pxDefaultSize:!0,onClick:()=>{t(),o&&l.goTo(o)},style:s,className:"font-library__font-card",children:(0,fd.jsxs)(Vl.Flex,{justify:"space-between",wrap:!1,children:[(0,fd.jsx)(Rw,{font:e}),(0,fd.jsxs)(Vl.Flex,{justify:"flex-end",children:[(0,fd.jsx)(Vl.FlexItem,{children:(0,fd.jsx)(Vl.__experimentalText,{className:"font-library__font-card__count",children:r||(0,Aw.sprintf)((0,Aw._n)("%d variant","%d variants",i),i)})}),(0,fd.jsx)(Vl.FlexItem,{children:(0,fd.jsx)(hn,{icon:(0,Aw.isRTL)()?xr:Cr})})]})]})})}var sT=LHe;var A5=a(H(),1),I5=a(W(),1);var nb=a(T(),1);function BHe({face:e,font:t}){let{isFontActivated:r,toggleActivateFont:o}=(0,A5.useContext)(mi),n=(t?.fontFace?.length??0)>0?r(t.slug,e.fontStyle,e.fontWeight,t.source):r(t.slug,void 0,void 0,t.source),i=()=>{if((t?.fontFace?.length??0)>0){o(t,e);return}o(t)},s=t.name+" "+T5(e),l=(0,A5.useId)();return(0,nb.jsx)("div",{className:"font-library__font-card",children:(0,nb.jsxs)(I5.Flex,{justify:"flex-start",align:"center",gap:"1rem",children:[(0,nb.jsx)(I5.CheckboxControl,{checked:n,onChange:i,id:l}),(0,nb.jsx)("label",{htmlFor:l,children:(0,nb.jsx)(Rw,{font:e,text:s,onClick:i})})]})})}var Bme=BHe;function Vme(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 O5(e){return e.sort((t,r)=>t.fontStyle==="normal"&&r.fontStyle!=="normal"?-1:r.fontStyle==="normal"&&t.fontStyle!=="normal"?1:t.fontStyle===r.fontStyle?Vme(t.fontWeight?.toString()??"normal")-Vme(r.fontWeight?.toString()??"normal"):!t.fontStyle||!r.fontStyle?t.fontStyle?-1:1:t.fontStyle.localeCompare(r.fontStyle))}var ht=a(T(),1);function jme(e){if(!e)return"";let t={};for(let r of Object.keys(e).sort())t[r]=(e[r]??[]).map(o=>({slug:o.slug,fontFace:(o.fontFace??[]).map(n=>`${n.fontStyle}-${n.fontWeight}`).sort()})).sort((o,n)=>o.slug.localeCompare(n.slug));return JSON.stringify(t)}function VHe(){let{baseCustomFonts:e,libraryFontSelected:t,handleSetLibraryFontSelected:r,uninstallFontFamily:o,isResolvingLibrary:n,isInstalling:i,saveFontFamilies:s,getFontFacesActivated:l}=(0,md.useContext)(mi),[c,u]=Oe("typography.fontFamilies"),[d,f]=(0,md.useState)(void 0),[m,h]=(0,md.useState)(!1),[g,v]=(0,md.useState)(null),[b]=Oe("typography.fontFamilies",void 0,"base"),S=(0,dH.useSelect)(Z=>{let{__experimentalGetCurrentGlobalStylesId:q}=Z(aT.store);return q()},[]),y=(0,aT.useEntityRecord)("root","globalStyles",S),w=y?.edits?.settings?.typography?.fontFamilies,_=y?.record?.settings?.typography?.fontFamilies,x=(0,md.useMemo)(()=>w===void 0?!1:jme(w)!==jme(_),[w,_]),E=c?.theme?c.theme.map(Z=>Uf(Z,{source:"theme"})).sort((Z,q)=>Z.name.localeCompare(q.name)):[],O=new Set(E.map(Z=>Z.slug)),A=b?.theme?E.concat(b.theme.filter(Z=>!O.has(Z.slug)).map(Z=>Uf(Z,{source:"theme"})).sort((Z,q)=>Z.name.localeCompare(q.name))):[],C=t?.source==="custom"&&t?.id,I=(0,dH.useSelect)(Z=>{let{canUser:q}=Z(aT.store);return C&&q("delete",{kind:"postType",name:"wp_font_family",id:C})},[C]),k=!!t&&t?.source!=="theme"&&I,P=()=>{h(!0)},N=async()=>{v(null);try{await s(c),v({type:"success",message:(0,to.__)("Font family updated successfully.")})}catch(Z){v({type:"error",message:(0,to.sprintf)((0,to.__)("There was an error updating the font family. %s"),Z.message)})}},U=Z=>Z?!Z.fontFace||!Z.fontFace.length?[{fontFamily:Z.fontFamily,fontStyle:"normal",fontWeight:"400"}]:O5(Z.fontFace):[],F=Z=>{let q=Z?.fontFace&&(Z?.fontFace?.length??0)>0?Z.fontFace.length:1,X=l(Z.slug,Z.source).length;return(0,to.sprintf)((0,to.__)("%1$d of %2$d active"),X,q)};(0,md.useEffect)(()=>{r(t)},[]);let D=t?l(t.slug,t.source).length:0,B=t?.fontFace?.length??(t?.fontFamily?1:0),L=D>0&&D!==B,M=D===B,z=()=>{if(!t||!t?.source)return;let Z=c?.[t.source]?.filter(X=>X.slug!==t.slug)??[],q=M?Z:[...Z,t];u({...c,[t.source]:q}),t.fontFace&&t.fontFace.forEach(X=>{if(M)iT(X,"all");else{let ie=kw(X?.src??"");ie&&gh(X,ie,"all")}})},K=A.length>0||e.length>0;return(0,ht.jsxs)("div",{className:"font-library__tabpanel-layout",children:[n&&(0,ht.jsx)("div",{className:"font-library__loading",children:(0,ht.jsx)(Et.ProgressBar,{})}),!n&&(0,ht.jsxs)(ht.Fragment,{children:[(0,ht.jsxs)(Et.Navigator,{initialPath:t?"/fontFamily":"/",children:[(0,ht.jsx)(Et.Navigator.Screen,{path:"/",children:(0,ht.jsxs)(Et.__experimentalVStack,{spacing:"8",children:[g&&(0,ht.jsx)(Et.Notice,{status:g.type,onRemove:()=>v(null),children:g.message}),!K&&(0,ht.jsx)(Et.__experimentalText,{as:"p",children:(0,to.__)("No fonts installed.")}),A.length>0&&(0,ht.jsxs)(Et.__experimentalVStack,{children:[(0,ht.jsx)("h2",{className:"font-library__fonts-title",children:(0,to._x)("Theme","font source")}),(0,ht.jsx)("ul",{role:"list",className:"font-library__fonts-list",children:A.map(Z=>(0,ht.jsx)("li",{className:"font-library__fonts-list-item",children:(0,ht.jsx)(sT,{font:Z,navigatorPath:"/fontFamily",variantsText:F(Z),shouldFocus:Z.slug===d,onClick:()=>{v(null),r(Z)}})},Z.slug))})]}),e.length>0&&(0,ht.jsxs)(Et.__experimentalVStack,{children:[(0,ht.jsx)("h2",{className:"font-library__fonts-title",children:(0,to._x)("Custom","font source")}),(0,ht.jsx)("ul",{role:"list",className:"font-library__fonts-list",children:e.map(Z=>(0,ht.jsx)("li",{className:"font-library__fonts-list-item",children:(0,ht.jsx)(sT,{font:Z,navigatorPath:"/fontFamily",variantsText:F(Z),shouldFocus:Z.slug===d,onClick:()=>{v(null),r(Z)}})},Z.slug))})]})]})}),(0,ht.jsxs)(Et.Navigator.Screen,{path:"/fontFamily",children:[t&&(0,ht.jsx)(jHe,{font:t,isOpen:m,setIsOpen:h,setNotice:v,uninstallFontFamily:o,handleSetLibraryFontSelected:r}),(0,ht.jsxs)(Et.Flex,{justify:"flex-start",children:[(0,ht.jsx)(Et.Navigator.BackButton,{icon:(0,to.isRTL)()?Cr:xr,size:"small",onClick:()=>{f(t?.slug),r(void 0),v(null)},label:(0,to.__)("Back")}),(0,ht.jsx)(Et.__experimentalHeading,{level:2,size:13,className:"global-styles-ui-header",children:t?.name})]}),g&&(0,ht.jsxs)(ht.Fragment,{children:[(0,ht.jsx)(Et.__experimentalSpacer,{margin:1}),(0,ht.jsx)(Et.Notice,{status:g.type,onRemove:()=>v(null),children:g.message}),(0,ht.jsx)(Et.__experimentalSpacer,{margin:1})]}),(0,ht.jsx)(Et.__experimentalSpacer,{margin:4}),(0,ht.jsx)(Et.__experimentalText,{children:(0,to.__)("Choose font variants. Keep in mind that too many variants could make your site slower.")}),(0,ht.jsx)(Et.__experimentalSpacer,{margin:4}),(0,ht.jsxs)(Et.__experimentalVStack,{spacing:0,children:[(0,ht.jsx)(Et.CheckboxControl,{className:"font-library__select-all",label:(0,to.__)("Select all"),checked:M,onChange:z,indeterminate:L}),(0,ht.jsx)(Et.__experimentalSpacer,{margin:8}),(0,ht.jsx)("ul",{role:"list",className:"font-library__fonts-list",children:t&&U(t).map((Z,q)=>(0,ht.jsx)("li",{className:"font-library__fonts-list-item",children:(0,ht.jsx)(Bme,{font:t,face:Z},`face${q}`)},`face${q}`))})]})]})]}),(0,ht.jsxs)(Et.__experimentalHStack,{justify:"flex-end",className:"font-library__footer",children:[i&&(0,ht.jsx)(Et.ProgressBar,{}),k&&(0,ht.jsx)(Et.Button,{__next40pxDefaultSize:!0,isDestructive:!0,variant:"tertiary",onClick:P,children:(0,to.__)("Delete")}),(0,ht.jsx)(Et.Button,{__next40pxDefaultSize:!0,variant:"primary",onClick:N,disabled:!x,accessibleWhenDisabled:!0,children:(0,to.__)("Update")})]})]})]})}function jHe({font:e,isOpen:t,setIsOpen:r,setNotice:o,uninstallFontFamily:n,handleSetLibraryFontSelected:i}){let s=(0,Et.useNavigator)(),l=async()=>{o(null),r(!1);try{await n(e),s.goBack(),i(void 0),o({type:"success",message:(0,to.__)("Font family uninstalled successfully.")})}catch(u){o({type:"error",message:(0,to.__)("There was an error uninstalling the font family.")+u.message})}},c=()=>{r(!1)};return(0,ht.jsx)(Et.__experimentalConfirmDialog,{isOpen:t,cancelButtonText:(0,to.__)("Cancel"),confirmButtonText:(0,to.__)("Delete"),onCancel:c,onConfirm:l,size:"medium",children:e&&(0,to.sprintf)((0,to.__)('Are you sure you want to delete "%s" font and all its variants and assets?'),e.name)})}var N5=VHe;var _n=a(H(),1),ut=a(W(),1),Kme=a(ke(),1),Wr=a(V(),1);var Zme=a(oe(),1);function zme(e,t){let{category:r,search:o}=t,n=e||[];return r&&r!=="all"&&(n=n.filter(i=>i.categories&&i.categories.indexOf(r)!==-1)),o&&(n=n.filter(i=>i.font_family_settings&&i.font_family_settings.name.toLowerCase().includes(o.toLowerCase()))),n}function Hme(e){return e.reduce((t,r)=>({...t,[r.slug]:(r?.fontFace||[]).reduce((o,n)=>({...o,[`${n.fontStyle}-${n.fontWeight}`]:!0}),{})}),{})}function Ume(e,t,r){return t?!!r[e]?.[`${t.fontStyle}-${t.fontWeight}`]:!!r[e]}var lT=a(V(),1),Os=a(W(),1),jl=a(T(),1);function zHe(){let e=()=>{window.localStorage.setItem("wp-font-library-google-fonts-permission","true"),window.dispatchEvent(new Event("storage"))};return(0,jl.jsx)("div",{className:"font-library__google-fonts-confirm",children:(0,jl.jsx)(Os.Card,{children:(0,jl.jsxs)(Os.CardBody,{children:[(0,jl.jsx)(Os.__experimentalHeading,{level:2,children:(0,lT.__)("Connect to Google Fonts")}),(0,jl.jsx)(Os.__experimentalSpacer,{margin:6}),(0,jl.jsx)(Os.__experimentalText,{as:"p",children:(0,lT.__)("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,jl.jsx)(Os.__experimentalSpacer,{margin:3}),(0,jl.jsx)(Os.__experimentalText,{as:"p",children:(0,lT.__)("You can alternatively upload files directly on the Upload tab.")}),(0,jl.jsx)(Os.__experimentalSpacer,{margin:6}),(0,jl.jsx)(Os.Button,{__next40pxDefaultSize:!0,variant:"primary",onClick:e,children:(0,lT.__)("Allow access to Google Fonts")})]})})})}var Wme=zHe;var Gme=a(H(),1),M5=a(W(),1);var ib=a(T(),1);function HHe({face:e,font:t,handleToggleVariant:r,selected:o}){let n=()=>{if(t?.fontFace){r(t,e);return}r(t)},i=t.name+" "+T5(e),s=(0,Gme.useId)();return(0,ib.jsx)("div",{className:"font-library__font-card",children:(0,ib.jsxs)(M5.Flex,{justify:"flex-start",align:"center",gap:"1rem",children:[(0,ib.jsx)(M5.CheckboxControl,{checked:o,onChange:n,id:s}),(0,ib.jsx)("label",{htmlFor:s,children:(0,ib.jsx)(Rw,{font:e,text:i,onClick:n})})]})})}var Yme=HHe;var rt=a(T(),1),UHe={slug:"all",name:(0,Wr._x)("All","font categories")},qme="wp-font-library-google-fonts-permission",WHe=500;function GHe({slug:e}){let t=e==="google-fonts",r=()=>window.localStorage.getItem(qme)==="true",[o,n]=(0,_n.useState)(null),[i,s]=(0,_n.useState)(void 0),[l,c]=(0,_n.useState)(null),[u,d]=(0,_n.useState)([]),[f,m]=(0,_n.useState)(1),[h,g]=(0,_n.useState)({}),[v,b]=(0,_n.useState)(t&&!r()),{installFonts:S,isInstalling:y}=(0,_n.useContext)(mi),{record:w,isResolving:_}=(0,Zme.useEntityRecord)("root","fontCollection",e);(0,_n.useEffect)(()=>{let re=()=>{b(t&&!r())};return re(),window.addEventListener("storage",re),()=>window.removeEventListener("storage",re)},[e,t]);let x=()=>{window.localStorage.setItem(qme,"false"),window.dispatchEvent(new Event("storage"))};(0,_n.useEffect)(()=>{n(null)},[e]),(0,_n.useEffect)(()=>{d([])},[o]);let E=(0,_n.useMemo)(()=>w?.font_families??[],[w]),O=w?.categories??[],A=[UHe,...O],C=(0,_n.useMemo)(()=>zme(E,h),[E,h]),I=Math.max(window.innerHeight,WHe),k=Math.floor((I-417)/61),P=Math.ceil(C.length/k),N=(f-1)*k,U=f*k,F=C.slice(N,U),D=re=>{g({...h,category:re}),m(1)},L=(0,Kme.debounce)(re=>{g({...h,search:re}),m(1)},300),M=(re,ve)=>{let Ce=E5(re,ve,u);d(Ce)},z=Hme(u),K=()=>{d([])},Z=u.length>0?u[0]?.fontFace?.length??0:0,q=Z>0&&Z!==o?.fontFace?.length,X=Z===o?.fontFace?.length,ie=()=>{let re=[];!X&&o&&re.push(o),d(re)},$=async()=>{c(null);let re=u[0];try{re?.fontFace&&await Promise.all(re.fontFace.map(async ve=>{ve.src&&(ve.file=await Mme(ve.src))}))}catch{c({type:"error",message:(0,Wr.__)("Error installing the fonts, could not be downloaded.")});return}try{await S([re]),c({type:"success",message:(0,Wr.__)("Fonts were installed successfully.")})}catch(ve){c({type:"error",message:ve.message})}K()},le=re=>re?!re.fontFace||!re.fontFace.length?[{fontFamily:re.fontFamily,fontStyle:"normal",fontWeight:"400"}]:O5(re.fontFace):[];if(v)return(0,rt.jsx)(Wme,{});let ae=e==="google-fonts"&&!v&&!o;return(0,rt.jsxs)("div",{className:"font-library__tabpanel-layout",children:[_&&(0,rt.jsx)("div",{className:"font-library__loading",children:(0,rt.jsx)(ut.ProgressBar,{})}),!_&&w&&(0,rt.jsxs)(rt.Fragment,{children:[(0,rt.jsxs)(ut.Navigator,{initialPath:"/",className:"font-library__tabpanel-layout",children:[(0,rt.jsxs)(ut.Navigator.Screen,{path:"/",children:[(0,rt.jsxs)(ut.__experimentalHStack,{justify:"space-between",children:[(0,rt.jsxs)(ut.__experimentalVStack,{children:[(0,rt.jsx)(ut.__experimentalHeading,{level:2,size:13,children:w.name}),(0,rt.jsx)(ut.__experimentalText,{children:w.description})]}),ae&&(0,rt.jsx)(ut.DropdownMenu,{icon:fo,label:(0,Wr.__)("Actions"),popoverProps:{position:"bottom left"},controls:[{title:(0,Wr.__)("Revoke access to Google Fonts"),onClick:x}]})]}),(0,rt.jsx)(ut.__experimentalSpacer,{margin:4}),(0,rt.jsxs)(ut.__experimentalHStack,{spacing:4,justify:"space-between",children:[(0,rt.jsx)(ut.SearchControl,{value:h.search,placeholder:(0,Wr.__)("Font name\u2026"),label:(0,Wr.__)("Search"),onChange:L,hideLabelFromVision:!1}),(0,rt.jsx)(ut.SelectControl,{__next40pxDefaultSize:!0,label:(0,Wr.__)("Category"),value:h.category,onChange:D,children:A&&A.map(re=>(0,rt.jsx)("option",{value:re.slug,children:re.name},re.slug))})]}),(0,rt.jsx)(ut.__experimentalSpacer,{margin:4}),!!w?.font_families?.length&&!C.length&&(0,rt.jsx)(ut.__experimentalText,{children:(0,Wr.__)("No fonts found. Try with a different search term.")}),(0,rt.jsx)("div",{className:"font-library__fonts-grid__main",children:(0,rt.jsx)("ul",{role:"list",className:"font-library__fonts-list",children:F.map(re=>(0,rt.jsx)("li",{className:"font-library__fonts-list-item",children:(0,rt.jsx)(sT,{font:re.font_family_settings,navigatorPath:"/fontFamily",shouldFocus:re.font_family_settings.slug===i,onClick:()=>{n(re.font_family_settings)}})},re.font_family_settings.slug))})})]}),(0,rt.jsxs)(ut.Navigator.Screen,{path:"/fontFamily",children:[(0,rt.jsxs)(ut.Flex,{justify:"flex-start",children:[(0,rt.jsx)(ut.Navigator.BackButton,{icon:(0,Wr.isRTL)()?Cr:xr,size:"small",onClick:()=>{s(o?.slug),n(null),c(null)},label:(0,Wr.__)("Back")}),(0,rt.jsx)(ut.__experimentalHeading,{level:2,size:13,className:"global-styles-ui-header",children:o?.name})]}),l&&(0,rt.jsxs)(rt.Fragment,{children:[(0,rt.jsx)(ut.__experimentalSpacer,{margin:1}),(0,rt.jsx)(ut.Notice,{status:l.type,onRemove:()=>c(null),children:l.message}),(0,rt.jsx)(ut.__experimentalSpacer,{margin:1})]}),(0,rt.jsx)(ut.__experimentalSpacer,{margin:4}),(0,rt.jsx)(ut.__experimentalText,{children:(0,Wr.__)("Select font variants to install.")}),(0,rt.jsx)(ut.__experimentalSpacer,{margin:4}),(0,rt.jsx)(ut.CheckboxControl,{className:"font-library__select-all",label:(0,Wr.__)("Select all"),checked:X,onChange:ie,indeterminate:q}),(0,rt.jsx)(ut.__experimentalVStack,{spacing:0,children:(0,rt.jsx)("ul",{role:"list",className:"font-library__fonts-list",children:o&&le(o).map((re,ve)=>(0,rt.jsx)("li",{className:"font-library__fonts-list-item",children:(0,rt.jsx)(Yme,{font:o,face:re,handleToggleVariant:M,selected:Ume(o.slug,o.fontFace?re:null,z)})},`face${ve}`))})}),(0,rt.jsx)(ut.__experimentalSpacer,{margin:16})]})]}),o&&(0,rt.jsx)(ut.Flex,{justify:"flex-end",className:"font-library__footer",children:(0,rt.jsx)(ut.Button,{__next40pxDefaultSize:!0,variant:"primary",onClick:$,isBusy:y,disabled:u.length===0||y,accessibleWhenDisabled:!0,children:(0,Wr.__)("Install")})}),!o&&(0,rt.jsxs)(ut.__experimentalHStack,{expanded:!1,className:"font-library__footer",justify:"end",spacing:6,children:[(0,rt.jsx)(ut.__experimentalHStack,{justify:"flex-start",expanded:!1,spacing:1,className:"font-library__page-selection",children:(0,_n.createInterpolateElement)((0,Wr.sprintf)((0,Wr._x)("<div>Page</div>%1$s<div>of %2$d</div>","paging"),"<CurrentPage />",P),{div:(0,rt.jsx)("div",{"aria-hidden":!0}),CurrentPage:(0,rt.jsx)(ut.SelectControl,{"aria-label":(0,Wr.__)("Current page"),value:f.toString(),options:[...Array(P)].map((re,ve)=>({label:(ve+1).toString(),value:(ve+1).toString()})),onChange:re=>m(parseInt(re)),size:"small",variant:"minimal"})})}),(0,rt.jsxs)(ut.__experimentalHStack,{expanded:!1,spacing:1,children:[(0,rt.jsx)(ut.Button,{onClick:()=>m(f-1),disabled:f===1,accessibleWhenDisabled:!0,label:(0,Wr.__)("Previous page"),icon:(0,Wr.isRTL)()?hl:gl,showTooltip:!0,size:"compact",tooltipPosition:"top"}),(0,rt.jsx)(ut.Button,{onClick:()=>m(f+1),disabled:f===P,accessibleWhenDisabled:!0,label:(0,Wr.__)("Next page"),icon:(0,Wr.isRTL)()?gl:hl,showTooltip:!0,size:"compact",tooltipPosition:"top"})]})]})]})]})}var F5=GHe;var Iw=a(V(),1),Gi=a(W(),1),uT=a(H(),1);var D5=(e=>typeof Ws<"u"?Ws:typeof Proxy<"u"?new Proxy(e,{get:(t,r)=>(typeof Ws<"u"?Ws:t)[r]}):e)(function(e){if(typeof Ws<"u")return Ws.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')}),Xme=(function(){var e,t,r;return(function(){function o(n,i,s){function l(d,f){if(!i[d]){if(!n[d]){var m=typeof D5=="function"&&D5;if(!f&&m)return m(d,!0);if(c)return c(d,!0);var h=new Error("Cannot find module '"+d+"'");throw h.code="MODULE_NOT_FOUND",h}var g=i[d]={exports:{}};n[d][0].call(g.exports,function(v){var b=n[d][1][v];return l(b||v)},g,g.exports,o,n,i,s)}return i[d].exports}for(var c=typeof D5=="function"&&D5,u=0;u<s.length;u++)l(s[u]);return l}return o})()({1:[function(o,n,i){var s=4096,l=2*s+32,c=2*s-1,u=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 d(f){this.buf_=new Uint8Array(l),this.input_=f,this.reset()}d.READ_SIZE=s,d.IBUF_MASK=c,d.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 f=0;f<4;f++)this.val_|=this.buf_[this.pos_]<<8*f,++this.pos_;return this.bit_end_pos_>0},d.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 f=this.buf_ptr_,m=this.input_.read(this.buf_,f,s);if(m<0)throw new Error("Unexpected end of input");if(m<s){this.eos_=1;for(var h=0;h<32;h++)this.buf_[f+m+h]=0}if(f===0){for(var h=0;h<32;h++)this.buf_[(s<<1)+h]=this.buf_[h];this.buf_ptr_=s}else this.buf_ptr_=0;this.bit_end_pos_+=m<<3}},d.prototype.fillBitWindow=function(){for(;this.bit_pos_>=8;)this.val_>>>=8,this.val_|=this.buf_[this.pos_&c]<<24,++this.pos_,this.bit_pos_=this.bit_pos_-8>>>0,this.bit_end_pos_=this.bit_end_pos_-8>>>0},d.prototype.readBits=function(f){32-this.bit_pos_<f&&this.fillBitWindow();var m=this.val_>>>this.bit_pos_&u[f];return this.bit_pos_+=f,m},n.exports=d},{}],2:[function(o,n,i){var s=0,l=1,c=2,u=3;i.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,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,1,0,1,0,1,0,1,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,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,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,1,1,1,1,1,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,1,1,1,1,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,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,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,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]),i.lookupOffsets=new Uint16Array([1024,1536,1280,1536,0,256,768,512])},{}],3:[function(o,n,i){var s=o("./streams").BrotliInput,l=o("./streams").BrotliOutput,c=o("./bit_reader"),u=o("./dictionary"),d=o("./huffman").HuffmanCode,f=o("./huffman").BrotliBuildHuffmanTable,m=o("./context"),h=o("./prefix"),g=o("./transform"),v=8,b=16,S=256,y=704,w=26,_=6,x=2,E=8,O=255,A=1080,C=18,I=new Uint8Array([1,2,3,4,0,5,17,6,16,7,8,9,10,11,12,13,14,15]),k=16,P=new Uint8Array([3,2,1,0,3,3,3,3,3,3,2,2,2,2,2,2]),N=new Int8Array([0,0,0,0,-1,1,-2,2,-3,3,-1,1,-2,2,-3,3]),U=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 F(ue){var te;return ue.readBits(1)===0?16:(te=ue.readBits(3),te>0?17+te:(te=ue.readBits(3),te>0?8+te:17))}function D(ue){if(ue.readBits(1)){var te=ue.readBits(3);return te===0?1:ue.readBits(te)+(1<<te)}return 0}function B(){this.meta_block_length=0,this.input_end=0,this.is_uncompressed=0,this.is_metadata=!1}function L(ue){var te=new B,de,se,fe;if(te.input_end=ue.readBits(1),te.input_end&&ue.readBits(1))return te;if(de=ue.readBits(2)+4,de===7){if(te.is_metadata=!0,ue.readBits(1)!==0)throw new Error("Invalid reserved bit");if(se=ue.readBits(2),se===0)return te;for(fe=0;fe<se;fe++){var Ne=ue.readBits(8);if(fe+1===se&&se>1&&Ne===0)throw new Error("Invalid size byte");te.meta_block_length|=Ne<<fe*8}}else for(fe=0;fe<de;++fe){var Ie=ue.readBits(4);if(fe+1===de&&de>4&&Ie===0)throw new Error("Invalid size nibble");te.meta_block_length|=Ie<<fe*4}return++te.meta_block_length,!te.input_end&&!te.is_metadata&&(te.is_uncompressed=ue.readBits(1)),te}function M(ue,te,de){var se=te,fe;return de.fillBitWindow(),te+=de.val_>>>de.bit_pos_&O,fe=ue[te].bits-E,fe>0&&(de.bit_pos_+=E,te+=ue[te].value,te+=de.val_>>>de.bit_pos_&(1<<fe)-1),de.bit_pos_+=ue[te].bits,ue[te].value}function z(ue,te,de,se){for(var fe=0,Ne=v,Ie=0,je=0,Ge=32768,Se=[],Te=0;Te<32;Te++)Se.push(new d(0,0));for(f(Se,0,5,ue,C);fe<te&&Ge>0;){var J=0,he;if(se.readMoreInput(),se.fillBitWindow(),J+=se.val_>>>se.bit_pos_&31,se.bit_pos_+=Se[J].bits,he=Se[J].value&255,he<b)Ie=0,de[fe++]=he,he!==0&&(Ne=he,Ge-=32768>>he);else{var ct=he-14,Ke,dt,yt=0;if(he===b&&(yt=Ne),je!==yt&&(Ie=0,je=yt),Ke=Ie,Ie>0&&(Ie-=2,Ie<<=ct),Ie+=se.readBits(ct)+3,dt=Ie-Ke,fe+dt>te)throw new Error("[ReadHuffmanCodeLengths] symbol + repeat_delta > num_symbols");for(var Pt=0;Pt<dt;Pt++)de[fe+Pt]=je;fe+=dt,je!==0&&(Ge-=dt<<15-je)}}if(Ge!==0)throw new Error("[ReadHuffmanCodeLengths] space = "+Ge);for(;fe<te;fe++)de[fe]=0}function K(ue,te,de,se){var fe=0,Ne,Ie=new Uint8Array(ue);if(se.readMoreInput(),Ne=se.readBits(2),Ne===1){for(var je,Ge=ue-1,Se=0,Te=new Int32Array(4),J=se.readBits(2)+1;Ge;)Ge>>=1,++Se;for(je=0;je<J;++je)Te[je]=se.readBits(Se)%ue,Ie[Te[je]]=2;switch(Ie[Te[0]]=1,J){case 1:break;case 3:if(Te[0]===Te[1]||Te[0]===Te[2]||Te[1]===Te[2])throw new Error("[ReadHuffmanCode] invalid symbols");break;case 2:if(Te[0]===Te[1])throw new Error("[ReadHuffmanCode] invalid symbols");Ie[Te[1]]=1;break;case 4:if(Te[0]===Te[1]||Te[0]===Te[2]||Te[0]===Te[3]||Te[1]===Te[2]||Te[1]===Te[3]||Te[2]===Te[3])throw new Error("[ReadHuffmanCode] invalid symbols");se.readBits(1)?(Ie[Te[2]]=3,Ie[Te[3]]=3):Ie[Te[0]]=2;break}}else{var je,he=new Uint8Array(C),ct=32,Ke=0,dt=[new d(2,0),new d(2,4),new d(2,3),new d(3,2),new d(2,0),new d(2,4),new d(2,3),new d(4,1),new d(2,0),new d(2,4),new d(2,3),new d(3,2),new d(2,0),new d(2,4),new d(2,3),new d(4,5)];for(je=Ne;je<C&&ct>0;++je){var yt=I[je],Pt=0,_t;se.fillBitWindow(),Pt+=se.val_>>>se.bit_pos_&15,se.bit_pos_+=dt[Pt].bits,_t=dt[Pt].value,he[yt]=_t,_t!==0&&(ct-=32>>_t,++Ke)}if(!(Ke===1||ct===0))throw new Error("[ReadHuffmanCode] invalid num_codes or space");z(he,ue,Ie,se)}if(fe=f(te,de,E,Ie,ue),fe===0)throw new Error("[ReadHuffmanCode] BuildHuffmanTable failed: ");return fe}function Z(ue,te,de){var se,fe;return se=M(ue,te,de),fe=h.kBlockLengthPrefixCode[se].nbits,h.kBlockLengthPrefixCode[se].offset+de.readBits(fe)}function q(ue,te,de){var se;return ue<k?(de+=P[ue],de&=3,se=te[de]+N[ue]):se=ue-k+1,se}function X(ue,te){for(var de=ue[te],se=te;se;--se)ue[se]=ue[se-1];ue[0]=de}function ie(ue,te){var de=new Uint8Array(256),se;for(se=0;se<256;++se)de[se]=se;for(se=0;se<te;++se){var fe=ue[se];ue[se]=de[fe],fe&&X(de,fe)}}function $(ue,te){this.alphabet_size=ue,this.num_htrees=te,this.codes=new Array(te+te*U[ue+31>>>5]),this.htrees=new Uint32Array(te)}$.prototype.decode=function(ue){var te,de,se=0;for(te=0;te<this.num_htrees;++te)this.htrees[te]=se,de=K(this.alphabet_size,this.codes,se,ue),se+=de};function le(ue,te){var de={num_htrees:null,context_map:null},se,fe=0,Ne,Ie;te.readMoreInput();var je=de.num_htrees=D(te)+1,Ge=de.context_map=new Uint8Array(ue);if(je<=1)return de;for(se=te.readBits(1),se&&(fe=te.readBits(4)+1),Ne=[],Ie=0;Ie<A;Ie++)Ne[Ie]=new d(0,0);for(K(je+fe,Ne,0,te),Ie=0;Ie<ue;){var Se;if(te.readMoreInput(),Se=M(Ne,0,te),Se===0)Ge[Ie]=0,++Ie;else if(Se<=fe)for(var Te=1+(1<<Se)+te.readBits(Se);--Te;){if(Ie>=ue)throw new Error("[DecodeContextMap] i >= context_map_size");Ge[Ie]=0,++Ie}else Ge[Ie]=Se-fe,++Ie}return te.readBits(1)&&ie(Ge,ue),de}function ae(ue,te,de,se,fe,Ne,Ie){var je=de*2,Ge=de,Se=M(te,de*A,Ie),Te;Se===0?Te=fe[je+(Ne[Ge]&1)]:Se===1?Te=fe[je+(Ne[Ge]-1&1)]+1:Te=Se-2,Te>=ue&&(Te-=ue),se[de]=Te,fe[je+(Ne[Ge]&1)]=Te,++Ne[Ge]}function re(ue,te,de,se,fe,Ne){var Ie=fe+1,je=de&fe,Ge=Ne.pos_&c.IBUF_MASK,Se;if(te<8||Ne.bit_pos_+(te<<3)<Ne.bit_end_pos_){for(;te-- >0;)Ne.readMoreInput(),se[je++]=Ne.readBits(8),je===Ie&&(ue.write(se,Ie),je=0);return}if(Ne.bit_end_pos_<32)throw new Error("[CopyUncompressedBlockToOutput] br.bit_end_pos_ < 32");for(;Ne.bit_pos_<32;)se[je]=Ne.val_>>>Ne.bit_pos_,Ne.bit_pos_+=8,++je,--te;if(Se=Ne.bit_end_pos_-Ne.bit_pos_>>3,Ge+Se>c.IBUF_MASK){for(var Te=c.IBUF_MASK+1-Ge,J=0;J<Te;J++)se[je+J]=Ne.buf_[Ge+J];Se-=Te,je+=Te,te-=Te,Ge=0}for(var J=0;J<Se;J++)se[je+J]=Ne.buf_[Ge+J];if(je+=Se,te-=Se,je>=Ie){ue.write(se,Ie),je-=Ie;for(var J=0;J<je;J++)se[J]=se[Ie+J]}for(;je+te>=Ie;){if(Se=Ie-je,Ne.input_.read(se,je,Se)<Se)throw new Error("[CopyUncompressedBlockToOutput] not enough bytes");ue.write(se,Ie),te-=Se,je=0}if(Ne.input_.read(se,je,te)<te)throw new Error("[CopyUncompressedBlockToOutput] not enough bytes");Ne.reset()}function ve(ue){var te=ue.bit_pos_+7&-8,de=ue.readBits(te-ue.bit_pos_);return de==0}function Ce(ue){var te=new s(ue),de=new c(te);F(de);var se=L(de);return se.meta_block_length}i.BrotliDecompressedSize=Ce;function _e(ue,te){var de=new s(ue);te==null&&(te=Ce(ue));var se=new Uint8Array(te),fe=new l(se);return Me(de,fe),fe.pos<fe.buffer.length&&(fe.buffer=fe.buffer.subarray(0,fe.pos)),fe.buffer}i.BrotliDecompressBuffer=_e;function Me(ue,te){var de,se=0,fe=0,Ne=0,Ie,je=0,Ge,Se,Te,J,he=[16,15,11,4],ct=0,Ke=0,dt=0,yt=[new $(0,0),new $(0,0),new $(0,0)],Pt,_t,Ye,La=128+c.READ_SIZE;Ye=new c(ue),Ne=F(Ye),Ie=(1<<Ne)-16,Ge=1<<Ne,Se=Ge-1,Te=new Uint8Array(Ge+La+u.maxDictionaryWordLength),J=Ge,Pt=[],_t=[];for(var js=0;js<3*A;js++)Pt[js]=new d(0,0),_t[js]=new d(0,0);for(;!fe;){var _r=0,uc,Kr=[1<<28,1<<28,1<<28],wt=[0],Ht=[1,1,1],ee=[0,1,0,1,0,1],we=[0],j,Pe,Dt,Ee,xo=null,Ae=null,tr,ce=null,me,zs=0,Yt=null,De=0,dc=0,ye=null,Be=0,qe=0,rr=0,Vr,lo;for(de=0;de<3;++de)yt[de].codes=null,yt[de].htrees=null;Ye.readMoreInput();var ts=L(Ye);if(_r=ts.meta_block_length,se+_r>te.buffer.length){var wg=new Uint8Array(se+_r);wg.set(te.buffer),te.buffer=wg}if(fe=ts.input_end,uc=ts.is_uncompressed,ts.is_metadata){for(ve(Ye);_r>0;--_r)Ye.readMoreInput(),Ye.readBits(8);continue}if(_r!==0){if(uc){Ye.bit_pos_=Ye.bit_pos_+7&-8,re(te,_r,se,Te,Se,Ye),se+=_r;continue}for(de=0;de<3;++de)Ht[de]=D(Ye)+1,Ht[de]>=2&&(K(Ht[de]+2,Pt,de*A,Ye),K(w,_t,de*A,Ye),Kr[de]=Z(_t,de*A,Ye),we[de]=1);for(Ye.readMoreInput(),j=Ye.readBits(2),Pe=k+(Ye.readBits(4)<<j),Dt=(1<<j)-1,Ee=Pe+(48<<j),Ae=new Uint8Array(Ht[0]),de=0;de<Ht[0];++de)Ye.readMoreInput(),Ae[de]=Ye.readBits(2)<<1;var co=le(Ht[0]<<_,Ye);tr=co.num_htrees,xo=co.context_map;var rs=le(Ht[2]<<x,Ye);for(me=rs.num_htrees,ce=rs.context_map,yt[0]=new $(S,tr),yt[1]=new $(y,Ht[1]),yt[2]=new $(Ee,me),de=0;de<3;++de)yt[de].decode(Ye);for(Yt=0,ye=0,Vr=Ae[wt[0]],qe=m.lookupOffsets[Vr],rr=m.lookupOffsets[Vr+1],lo=yt[1].htrees[0];_r>0;){var Co,os,Hs,gy,jD,Us,Ba,Wd,Z_,vy,X_;for(Ye.readMoreInput(),Kr[1]===0&&(ae(Ht[1],Pt,1,wt,ee,we,Ye),Kr[1]=Z(_t,A,Ye),lo=yt[1].htrees[wt[1]]),--Kr[1],Co=M(yt[1].codes,lo,Ye),os=Co>>6,os>=2?(os-=2,Ba=-1):Ba=0,Hs=h.kInsertRangeLut[os]+(Co>>3&7),gy=h.kCopyRangeLut[os]+(Co&7),jD=h.kInsertLengthPrefixCode[Hs].offset+Ye.readBits(h.kInsertLengthPrefixCode[Hs].nbits),Us=h.kCopyLengthPrefixCode[gy].offset+Ye.readBits(h.kCopyLengthPrefixCode[gy].nbits),Ke=Te[se-1&Se],dt=Te[se-2&Se],vy=0;vy<jD;++vy)Ye.readMoreInput(),Kr[0]===0&&(ae(Ht[0],Pt,0,wt,ee,we,Ye),Kr[0]=Z(_t,0,Ye),zs=wt[0]<<_,Yt=zs,Vr=Ae[wt[0]],qe=m.lookupOffsets[Vr],rr=m.lookupOffsets[Vr+1]),Z_=m.lookup[qe+Ke]|m.lookup[rr+dt],De=xo[Yt+Z_],--Kr[0],dt=Ke,Ke=M(yt[0].codes,yt[0].htrees[De],Ye),Te[se&Se]=Ke,(se&Se)===Se&&te.write(Te,Ge),++se;if(_r-=jD,_r<=0)break;if(Ba<0){var Z_;if(Ye.readMoreInput(),Kr[2]===0&&(ae(Ht[2],Pt,2,wt,ee,we,Ye),Kr[2]=Z(_t,2*A,Ye),dc=wt[2]<<x,ye=dc),--Kr[2],Z_=(Us>4?3:Us-2)&255,Be=ce[ye+Z_],Ba=M(yt[2].codes,yt[2].htrees[Be],Ye),Ba>=Pe){var zD,aY,Q_;Ba-=Pe,aY=Ba&Dt,Ba>>=j,zD=(Ba>>1)+1,Q_=(2+(Ba&1)<<zD)-4,Ba=Pe+(Q_+Ye.readBits(zD)<<j)+aY}}if(Wd=q(Ba,he,ct),Wd<0)throw new Error("[BrotliDecompress] invalid distance");if(se<Ie&&je!==Ie?je=se:je=Ie,X_=se&Se,Wd>je)if(Us>=u.minDictionaryWordLength&&Us<=u.maxDictionaryWordLength){var Q_=u.offsetsByLength[Us],lY=Wd-je-1,cY=u.sizeBitsByLength[Us],iRe=(1<<cY)-1,sRe=lY&iRe,uY=lY>>cY;if(Q_+=sRe*Us,uY<g.kNumTransforms){var HD=g.transformDictionaryWord(Te,X_,Q_,Us,uY);if(X_+=HD,se+=HD,_r-=HD,X_>=J){te.write(Te,Ge);for(var dP=0;dP<X_-J;dP++)Te[dP]=Te[J+dP]}}else throw new Error("Invalid backward reference. pos: "+se+" distance: "+Wd+" len: "+Us+" bytes left: "+_r)}else throw new Error("Invalid backward reference. pos: "+se+" distance: "+Wd+" len: "+Us+" bytes left: "+_r);else{if(Ba>0&&(he[ct&3]=Wd,++ct),Us>_r)throw new Error("Invalid backward reference. pos: "+se+" distance: "+Wd+" len: "+Us+" bytes left: "+_r);for(vy=0;vy<Us;++vy)Te[se&Se]=Te[se-Wd&Se],(se&Se)===Se&&te.write(Te,Ge),++se,--_r}Ke=Te[se-1&Se],dt=Te[se-2&Se]}se&=1073741823}}te.write(Te,se&Se)}i.BrotliDecompress=Me,u.init()},{"./bit_reader":1,"./context":2,"./dictionary":6,"./huffman":7,"./prefix":9,"./streams":10,"./transform":11}],4:[function(o,n,i){var s=o("base64-js");i.init=function(){var l=o("./decode").BrotliDecompressBuffer,c=s.toByteArray(o("./dictionary.bin.js"));return l(c)}},{"./decode":3,"./dictionary.bin.js":5,"base64-js":8}],5:[function(o,n,i){n.exports="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"},{}],6:[function(o,n,i){var s=o("./dictionary-browser");i.init=function(){i.dictionary=s.init()},i.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]),i.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]),i.minDictionaryWordLength=4,i.maxDictionaryWordLength=24},{"./dictionary-browser":4}],7:[function(o,n,i){function s(f,m){this.bits=f,this.value=m}i.HuffmanCode=s;var l=15;function c(f,m){for(var h=1<<m-1;f&h;)h>>=1;return(f&h-1)+h}function u(f,m,h,g,v){do g-=h,f[m+g]=new s(v.bits,v.value);while(g>0)}function d(f,m,h){for(var g=1<<m-h;m<l&&(g-=f[m],!(g<=0));)++m,g<<=1;return m-h}i.BrotliBuildHuffmanTable=function(f,m,h,g,v){var b=m,S,y,w,_,x,E,O,A,C,I,k,P=new Int32Array(l+1),N=new Int32Array(l+1);for(k=new Int32Array(v),w=0;w<v;w++)P[g[w]]++;for(N[1]=0,y=1;y<l;y++)N[y+1]=N[y]+P[y];for(w=0;w<v;w++)g[w]!==0&&(k[N[g[w]]++]=w);if(A=h,C=1<<A,I=C,N[l]===1){for(_=0;_<I;++_)f[m+_]=new s(0,k[0]&65535);return I}for(_=0,w=0,y=1,x=2;y<=h;++y,x<<=1)for(;P[y]>0;--P[y])S=new s(y&255,k[w++]&65535),u(f,m+_,x,C,S),_=c(_,y);for(O=I-1,E=-1,y=h+1,x=2;y<=l;++y,x<<=1)for(;P[y]>0;--P[y])(_&O)!==E&&(m+=C,A=d(P,y,h),C=1<<A,I+=C,E=_&O,f[b+E]=new s(A+h&255,m-b-E&65535)),S=new s(y-h&255,k[w++]&65535),u(f,m+(_>>h),x,C,S),_=c(_,y);return I}},{}],8:[function(o,n,i){"use strict";i.byteLength=h,i.toByteArray=v,i.fromByteArray=y;for(var s=[],l=[],c=typeof Uint8Array<"u"?Uint8Array:Array,u="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",d=0,f=u.length;d<f;++d)s[d]=u[d],l[u.charCodeAt(d)]=d;l[45]=62,l[95]=63;function m(w){var _=w.length;if(_%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var x=w.indexOf("=");x===-1&&(x=_);var E=x===_?0:4-x%4;return[x,E]}function h(w){var _=m(w),x=_[0],E=_[1];return(x+E)*3/4-E}function g(w,_,x){return(_+x)*3/4-x}function v(w){for(var _,x=m(w),E=x[0],O=x[1],A=new c(g(w,E,O)),C=0,I=O>0?E-4:E,k=0;k<I;k+=4)_=l[w.charCodeAt(k)]<<18|l[w.charCodeAt(k+1)]<<12|l[w.charCodeAt(k+2)]<<6|l[w.charCodeAt(k+3)],A[C++]=_>>16&255,A[C++]=_>>8&255,A[C++]=_&255;return O===2&&(_=l[w.charCodeAt(k)]<<2|l[w.charCodeAt(k+1)]>>4,A[C++]=_&255),O===1&&(_=l[w.charCodeAt(k)]<<10|l[w.charCodeAt(k+1)]<<4|l[w.charCodeAt(k+2)]>>2,A[C++]=_>>8&255,A[C++]=_&255),A}function b(w){return s[w>>18&63]+s[w>>12&63]+s[w>>6&63]+s[w&63]}function S(w,_,x){for(var E,O=[],A=_;A<x;A+=3)E=(w[A]<<16&16711680)+(w[A+1]<<8&65280)+(w[A+2]&255),O.push(b(E));return O.join("")}function y(w){for(var _,x=w.length,E=x%3,O=[],A=16383,C=0,I=x-E;C<I;C+=A)O.push(S(w,C,C+A>I?I:C+A));return E===1?(_=w[x-1],O.push(s[_>>2]+s[_<<4&63]+"==")):E===2&&(_=(w[x-2]<<8)+w[x-1],O.push(s[_>>10]+s[_>>4&63]+s[_<<2&63]+"=")),O.join("")}},{}],9:[function(o,n,i){function s(l,c){this.offset=l,this.nbits=c}i.kBlockLengthPrefixCode=[new s(1,2),new s(5,2),new s(9,2),new s(13,2),new s(17,3),new s(25,3),new s(33,3),new s(41,3),new s(49,4),new s(65,4),new s(81,4),new s(97,4),new s(113,5),new s(145,5),new s(177,5),new s(209,5),new s(241,6),new s(305,6),new s(369,7),new s(497,8),new s(753,9),new s(1265,10),new s(2289,11),new s(4337,12),new s(8433,13),new s(16625,24)],i.kInsertLengthPrefixCode=[new s(0,0),new s(1,0),new s(2,0),new s(3,0),new s(4,0),new s(5,0),new s(6,1),new s(8,1),new s(10,2),new s(14,2),new s(18,3),new s(26,3),new s(34,4),new s(50,4),new s(66,5),new s(98,5),new s(130,6),new s(194,7),new s(322,8),new s(578,9),new s(1090,10),new s(2114,12),new s(6210,14),new s(22594,24)],i.kCopyLengthPrefixCode=[new s(2,0),new s(3,0),new s(4,0),new s(5,0),new s(6,0),new s(7,0),new s(8,0),new s(9,0),new s(10,1),new s(12,1),new s(14,2),new s(18,2),new s(22,3),new s(30,3),new s(38,4),new s(54,4),new s(70,5),new s(102,5),new s(134,6),new s(198,7),new s(326,8),new s(582,9),new s(1094,10),new s(2118,24)],i.kInsertRangeLut=[0,0,8,8,0,16,8,16,16],i.kCopyRangeLut=[0,8,0,8,16,0,16,8,16]},{}],10:[function(o,n,i){function s(c){this.buffer=c,this.pos=0}s.prototype.read=function(c,u,d){this.pos+d>this.buffer.length&&(d=this.buffer.length-this.pos);for(var f=0;f<d;f++)c[u+f]=this.buffer[this.pos+f];return this.pos+=d,d},i.BrotliInput=s;function l(c){this.buffer=c,this.pos=0}l.prototype.write=function(c,u){if(this.pos+u>this.buffer.length)throw new Error("Output buffer is not large enough");return this.buffer.set(c.subarray(0,u),this.pos),this.pos+=u,u},i.BrotliOutput=l},{}],11:[function(o,n,i){var s=o("./dictionary"),l=0,c=1,u=2,d=3,f=4,m=5,h=6,g=7,v=8,b=9,S=10,y=11,w=12,_=13,x=14,E=15,O=16,A=17,C=18,I=19,k=20;function P(F,D,B){this.prefix=new Uint8Array(F.length),this.transform=D,this.suffix=new Uint8Array(B.length);for(var L=0;L<F.length;L++)this.prefix[L]=F.charCodeAt(L);for(var L=0;L<B.length;L++)this.suffix[L]=B.charCodeAt(L)}var N=[new P("",l,""),new P("",l," "),new P(" ",l," "),new P("",w,""),new P("",S," "),new P("",l," the "),new P(" ",l,""),new P("s ",l," "),new P("",l," of "),new P("",S,""),new P("",l," and "),new P("",_,""),new P("",c,""),new P(", ",l," "),new P("",l,", "),new P(" ",S," "),new P("",l," in "),new P("",l," to "),new P("e ",l," "),new P("",l,'"'),new P("",l,"."),new P("",l,'">'),new P("",l,`
49 `),new P("",d,""),new P("",l,"]"),new P("",l," for "),new P("",x,""),new P("",u,""),new P("",l," a "),new P("",l," that "),new P(" ",S,""),new P("",l,". "),new P(".",l,""),new P(" ",l,", "),new P("",E,""),new P("",l," with "),new P("",l,"'"),new P("",l," from "),new P("",l," by "),new P("",O,""),new P("",A,""),new P(" the ",l,""),new P("",f,""),new P("",l,". The "),new P("",y,""),new P("",l," on "),new P("",l," as "),new P("",l," is "),new P("",g,""),new P("",c,"ing "),new P("",l,`
50 `),new P("",l,":"),new P(" ",l,". "),new P("",l,"ed "),new P("",k,""),new P("",C,""),new P("",h,""),new P("",l,"("),new P("",S,", "),new P("",v,""),new P("",l," at "),new P("",l,"ly "),new P(" the ",l," of "),new P("",m,""),new P("",b,""),new P(" ",S,", "),new P("",S,'"'),new P(".",l,"("),new P("",y," "),new P("",S,'">'),new P("",l,'="'),new P(" ",l,"."),new P(".com/",l,""),new P(" the ",l," of the "),new P("",S,"'"),new P("",l,". This "),new P("",l,","),new P(".",l," "),new P("",S,"("),new P("",S,"."),new P("",l," not "),new P(" ",l,'="'),new P("",l,"er "),new P(" ",y," "),new P("",l,"al "),new P(" ",y,""),new P("",l,"='"),new P("",y,'"'),new P("",S,". "),new P(" ",l,"("),new P("",l,"ful "),new P(" ",S,". "),new P("",l,"ive "),new P("",l,"less "),new P("",y,"'"),new P("",l,"est "),new P(" ",S,"."),new P("",y,'">'),new P(" ",l,"='"),new P("",S,","),new P("",l,"ize "),new P("",y,"."),new P("\xC2\xA0",l,""),new P(" ",l,","),new P("",S,'="'),new P("",y,'="'),new P("",l,"ous "),new P("",y,", "),new P("",S,"='"),new P(" ",S,","),new P(" ",y,'="'),new P(" ",y,", "),new P("",y,","),new P("",y,"("),new P("",y,". "),new P(" ",y,"."),new P("",y,"='"),new P(" ",y,". "),new P(" ",S,'="'),new P(" ",y,"='"),new P(" ",S,"='")];i.kTransforms=N,i.kNumTransforms=N.length;function U(F,D){return F[D]<192?(F[D]>=97&&F[D]<=122&&(F[D]^=32),1):F[D]<224?(F[D+1]^=32,2):(F[D+2]^=5,3)}i.transformDictionaryWord=function(F,D,B,L,M){var z=N[M].prefix,K=N[M].suffix,Z=N[M].transform,q=Z<w?0:Z-(w-1),X=0,ie=D,$;q>L&&(q=L);for(var le=0;le<z.length;)F[D++]=z[le++];for(B+=q,L-=q,Z<=b&&(L-=Z),X=0;X<L;X++)F[D++]=s.dictionary[B+X];if($=D-L,Z===S)U(F,$);else if(Z===y)for(;L>0;){var ae=U(F,$);$+=ae,L-=ae}for(var re=0;re<K.length;)F[D++]=K[re++];return D-ie}},{"./dictionary":6}],12:[function(o,n,i){n.exports=o("./dec/decode").BrotliDecompressBuffer},{"./dec/decode":3}]},{},[12])(12)})();var L5=(e=>typeof Ws<"u"?Ws:typeof Proxy<"u"?new Proxy(e,{get:(t,r)=>(typeof Ws<"u"?Ws:t)[r]}):e)(function(e){if(typeof Ws<"u")return Ws.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')}),Qme=(function(){var e,t,r;return(function(){function o(n,i,s){function l(d,f){if(!i[d]){if(!n[d]){var m=typeof L5=="function"&&L5;if(!f&&m)return m(d,!0);if(c)return c(d,!0);var h=new Error("Cannot find module '"+d+"'");throw h.code="MODULE_NOT_FOUND",h}var g=i[d]={exports:{}};n[d][0].call(g.exports,function(v){var b=n[d][1][v];return l(b||v)},g,g.exports,o,n,i,s)}return i[d].exports}for(var c=typeof L5=="function"&&L5,u=0;u<s.length;u++)l(s[u]);return l}return o})()({1:[function(o,n,i){"use strict";var s=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";function l(d,f){return Object.prototype.hasOwnProperty.call(d,f)}i.assign=function(d){for(var f=Array.prototype.slice.call(arguments,1);f.length;){var m=f.shift();if(m){if(typeof m!="object")throw new TypeError(m+"must be non-object");for(var h in m)l(m,h)&&(d[h]=m[h])}}return d},i.shrinkBuf=function(d,f){return d.length===f?d:d.subarray?d.subarray(0,f):(d.length=f,d)};var c={arraySet:function(d,f,m,h,g){if(f.subarray&&d.subarray){d.set(f.subarray(m,m+h),g);return}for(var v=0;v<h;v++)d[g+v]=f[m+v]},flattenChunks:function(d){var f,m,h,g,v,b;for(h=0,f=0,m=d.length;f<m;f++)h+=d[f].length;for(b=new Uint8Array(h),g=0,f=0,m=d.length;f<m;f++)v=d[f],b.set(v,g),g+=v.length;return b}},u={arraySet:function(d,f,m,h,g){for(var v=0;v<h;v++)d[g+v]=f[m+v]},flattenChunks:function(d){return[].concat.apply([],d)}};i.setTyped=function(d){d?(i.Buf8=Uint8Array,i.Buf16=Uint16Array,i.Buf32=Int32Array,i.assign(i,c)):(i.Buf8=Array,i.Buf16=Array,i.Buf32=Array,i.assign(i,u))},i.setTyped(s)},{}],2:[function(o,n,i){"use strict";var s=o("./common"),l=!0,c=!0;try{String.fromCharCode.apply(null,[0])}catch{l=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{c=!1}for(var u=new s.Buf8(256),d=0;d<256;d++)u[d]=d>=252?6:d>=248?5:d>=240?4:d>=224?3:d>=192?2:1;u[254]=u[254]=1,i.string2buf=function(m){var h,g,v,b,S,y=m.length,w=0;for(b=0;b<y;b++)g=m.charCodeAt(b),(g&64512)===55296&&b+1<y&&(v=m.charCodeAt(b+1),(v&64512)===56320&&(g=65536+(g-55296<<10)+(v-56320),b++)),w+=g<128?1:g<2048?2:g<65536?3:4;for(h=new s.Buf8(w),S=0,b=0;S<w;b++)g=m.charCodeAt(b),(g&64512)===55296&&b+1<y&&(v=m.charCodeAt(b+1),(v&64512)===56320&&(g=65536+(g-55296<<10)+(v-56320),b++)),g<128?h[S++]=g:g<2048?(h[S++]=192|g>>>6,h[S++]=128|g&63):g<65536?(h[S++]=224|g>>>12,h[S++]=128|g>>>6&63,h[S++]=128|g&63):(h[S++]=240|g>>>18,h[S++]=128|g>>>12&63,h[S++]=128|g>>>6&63,h[S++]=128|g&63);return h};function f(m,h){if(h<65534&&(m.subarray&&c||!m.subarray&&l))return String.fromCharCode.apply(null,s.shrinkBuf(m,h));for(var g="",v=0;v<h;v++)g+=String.fromCharCode(m[v]);return g}i.buf2binstring=function(m){return f(m,m.length)},i.binstring2buf=function(m){for(var h=new s.Buf8(m.length),g=0,v=h.length;g<v;g++)h[g]=m.charCodeAt(g);return h},i.buf2string=function(m,h){var g,v,b,S,y=h||m.length,w=new Array(y*2);for(v=0,g=0;g<y;){if(b=m[g++],b<128){w[v++]=b;continue}if(S=u[b],S>4){w[v++]=65533,g+=S-1;continue}for(b&=S===2?31:S===3?15:7;S>1&&g<y;)b=b<<6|m[g++]&63,S--;if(S>1){w[v++]=65533;continue}b<65536?w[v++]=b:(b-=65536,w[v++]=55296|b>>10&1023,w[v++]=56320|b&1023)}return f(w,v)},i.utf8border=function(m,h){var g;for(h=h||m.length,h>m.length&&(h=m.length),g=h-1;g>=0&&(m[g]&192)===128;)g--;return g<0||g===0?h:g+u[m[g]]>h?g:h}},{"./common":1}],3:[function(o,n,i){"use strict";function s(l,c,u,d){for(var f=l&65535|0,m=l>>>16&65535|0,h=0;u!==0;){h=u>2e3?2e3:u,u-=h;do f=f+c[d++]|0,m=m+f|0;while(--h);f%=65521,m%=65521}return f|m<<16|0}n.exports=s},{}],4:[function(o,n,i){"use strict";n.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(o,n,i){"use strict";function s(){for(var u,d=[],f=0;f<256;f++){u=f;for(var m=0;m<8;m++)u=u&1?3988292384^u>>>1:u>>>1;d[f]=u}return d}var l=s();function c(u,d,f,m){var h=l,g=m+f;u^=-1;for(var v=m;v<g;v++)u=u>>>8^h[(u^d[v])&255];return u^-1}n.exports=c},{}],6:[function(o,n,i){"use strict";function s(){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}n.exports=s},{}],7:[function(o,n,i){"use strict";var s=30,l=12;n.exports=function(u,d){var f,m,h,g,v,b,S,y,w,_,x,E,O,A,C,I,k,P,N,U,F,D,B,L,M;f=u.state,m=u.next_in,L=u.input,h=m+(u.avail_in-5),g=u.next_out,M=u.output,v=g-(d-u.avail_out),b=g+(u.avail_out-257),S=f.dmax,y=f.wsize,w=f.whave,_=f.wnext,x=f.window,E=f.hold,O=f.bits,A=f.lencode,C=f.distcode,I=(1<<f.lenbits)-1,k=(1<<f.distbits)-1;e:do{O<15&&(E+=L[m++]<<O,O+=8,E+=L[m++]<<O,O+=8),P=A[E&I];t:for(;;){if(N=P>>>24,E>>>=N,O-=N,N=P>>>16&255,N===0)M[g++]=P&65535;else if(N&16){U=P&65535,N&=15,N&&(O<N&&(E+=L[m++]<<O,O+=8),U+=E&(1<<N)-1,E>>>=N,O-=N),O<15&&(E+=L[m++]<<O,O+=8,E+=L[m++]<<O,O+=8),P=C[E&k];r:for(;;){if(N=P>>>24,E>>>=N,O-=N,N=P>>>16&255,N&16){if(F=P&65535,N&=15,O<N&&(E+=L[m++]<<O,O+=8,O<N&&(E+=L[m++]<<O,O+=8)),F+=E&(1<<N)-1,F>S){u.msg="invalid distance too far back",f.mode=s;break e}if(E>>>=N,O-=N,N=g-v,F>N){if(N=F-N,N>w&&f.sane){u.msg="invalid distance too far back",f.mode=s;break e}if(D=0,B=x,_===0){if(D+=y-N,N<U){U-=N;do M[g++]=x[D++];while(--N);D=g-F,B=M}}else if(_<N){if(D+=y+_-N,N-=_,N<U){U-=N;do M[g++]=x[D++];while(--N);if(D=0,_<U){N=_,U-=N;do M[g++]=x[D++];while(--N);D=g-F,B=M}}}else if(D+=_-N,N<U){U-=N;do M[g++]=x[D++];while(--N);D=g-F,B=M}for(;U>2;)M[g++]=B[D++],M[g++]=B[D++],M[g++]=B[D++],U-=3;U&&(M[g++]=B[D++],U>1&&(M[g++]=B[D++]))}else{D=g-F;do M[g++]=M[D++],M[g++]=M[D++],M[g++]=M[D++],U-=3;while(U>2);U&&(M[g++]=M[D++],U>1&&(M[g++]=M[D++]))}}else if((N&64)===0){P=C[(P&65535)+(E&(1<<N)-1)];continue r}else{u.msg="invalid distance code",f.mode=s;break e}break}}else if((N&64)===0){P=A[(P&65535)+(E&(1<<N)-1)];continue t}else if(N&32){f.mode=l;break e}else{u.msg="invalid literal/length code",f.mode=s;break e}break}}while(m<h&&g<b);U=O>>3,m-=U,O-=U<<3,E&=(1<<O)-1,u.next_in=m,u.next_out=g,u.avail_in=m<h?5+(h-m):5-(m-h),u.avail_out=g<b?257+(b-g):257-(g-b),f.hold=E,f.bits=O}},{}],8:[function(o,n,i){"use strict";var s=o("../utils/common"),l=o("./adler32"),c=o("./crc32"),u=o("./inffast"),d=o("./inftrees"),f=0,m=1,h=2,g=4,v=5,b=6,S=0,y=1,w=2,_=-2,x=-3,E=-4,O=-5,A=8,C=1,I=2,k=3,P=4,N=5,U=6,F=7,D=8,B=9,L=10,M=11,z=12,K=13,Z=14,q=15,X=16,ie=17,$=18,le=19,ae=20,re=21,ve=22,Ce=23,_e=24,Me=25,ue=26,te=27,de=28,se=29,fe=30,Ne=31,Ie=32,je=852,Ge=592,Se=15,Te=Se;function J(ee){return(ee>>>24&255)+(ee>>>8&65280)+((ee&65280)<<8)+((ee&255)<<24)}function he(){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 s.Buf16(320),this.work=new s.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function ct(ee){var we;return!ee||!ee.state?_:(we=ee.state,ee.total_in=ee.total_out=we.total=0,ee.msg="",we.wrap&&(ee.adler=we.wrap&1),we.mode=C,we.last=0,we.havedict=0,we.dmax=32768,we.head=null,we.hold=0,we.bits=0,we.lencode=we.lendyn=new s.Buf32(je),we.distcode=we.distdyn=new s.Buf32(Ge),we.sane=1,we.back=-1,S)}function Ke(ee){var we;return!ee||!ee.state?_:(we=ee.state,we.wsize=0,we.whave=0,we.wnext=0,ct(ee))}function dt(ee,we){var j,Pe;return!ee||!ee.state||(Pe=ee.state,we<0?(j=0,we=-we):(j=(we>>4)+1,we<48&&(we&=15)),we&&(we<8||we>15))?_:(Pe.window!==null&&Pe.wbits!==we&&(Pe.window=null),Pe.wrap=j,Pe.wbits=we,Ke(ee))}function yt(ee,we){var j,Pe;return ee?(Pe=new he,ee.state=Pe,Pe.window=null,j=dt(ee,we),j!==S&&(ee.state=null),j):_}function Pt(ee){return yt(ee,Te)}var _t=!0,Ye,La;function js(ee){if(_t){var we;for(Ye=new s.Buf32(512),La=new s.Buf32(32),we=0;we<144;)ee.lens[we++]=8;for(;we<256;)ee.lens[we++]=9;for(;we<280;)ee.lens[we++]=7;for(;we<288;)ee.lens[we++]=8;for(d(m,ee.lens,0,288,Ye,0,ee.work,{bits:9}),we=0;we<32;)ee.lens[we++]=5;d(h,ee.lens,0,32,La,0,ee.work,{bits:5}),_t=!1}ee.lencode=Ye,ee.lenbits=9,ee.distcode=La,ee.distbits=5}function _r(ee,we,j,Pe){var Dt,Ee=ee.state;return Ee.window===null&&(Ee.wsize=1<<Ee.wbits,Ee.wnext=0,Ee.whave=0,Ee.window=new s.Buf8(Ee.wsize)),Pe>=Ee.wsize?(s.arraySet(Ee.window,we,j-Ee.wsize,Ee.wsize,0),Ee.wnext=0,Ee.whave=Ee.wsize):(Dt=Ee.wsize-Ee.wnext,Dt>Pe&&(Dt=Pe),s.arraySet(Ee.window,we,j-Pe,Dt,Ee.wnext),Pe-=Dt,Pe?(s.arraySet(Ee.window,we,j-Pe,Pe,0),Ee.wnext=Pe,Ee.whave=Ee.wsize):(Ee.wnext+=Dt,Ee.wnext===Ee.wsize&&(Ee.wnext=0),Ee.whave<Ee.wsize&&(Ee.whave+=Dt))),0}function uc(ee,we){var j,Pe,Dt,Ee,xo,Ae,tr,ce,me,zs,Yt,De,dc,ye,Be=0,qe,rr,Vr,lo,ts,wg,co,rs,Co=new s.Buf8(4),os,Hs,gy=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!ee||!ee.state||!ee.output||!ee.input&&ee.avail_in!==0)return _;j=ee.state,j.mode===z&&(j.mode=K),xo=ee.next_out,Dt=ee.output,tr=ee.avail_out,Ee=ee.next_in,Pe=ee.input,Ae=ee.avail_in,ce=j.hold,me=j.bits,zs=Ae,Yt=tr,rs=S;e:for(;;)switch(j.mode){case C:if(j.wrap===0){j.mode=K;break}for(;me<16;){if(Ae===0)break e;Ae--,ce+=Pe[Ee++]<<me,me+=8}if(j.wrap&2&&ce===35615){j.check=0,Co[0]=ce&255,Co[1]=ce>>>8&255,j.check=c(j.check,Co,2,0),ce=0,me=0,j.mode=I;break}if(j.flags=0,j.head&&(j.head.done=!1),!(j.wrap&1)||(((ce&255)<<8)+(ce>>8))%31){ee.msg="incorrect header check",j.mode=fe;break}if((ce&15)!==A){ee.msg="unknown compression method",j.mode=fe;break}if(ce>>>=4,me-=4,co=(ce&15)+8,j.wbits===0)j.wbits=co;else if(co>j.wbits){ee.msg="invalid window size",j.mode=fe;break}j.dmax=1<<co,ee.adler=j.check=1,j.mode=ce&512?L:z,ce=0,me=0;break;case I:for(;me<16;){if(Ae===0)break e;Ae--,ce+=Pe[Ee++]<<me,me+=8}if(j.flags=ce,(j.flags&255)!==A){ee.msg="unknown compression method",j.mode=fe;break}if(j.flags&57344){ee.msg="unknown header flags set",j.mode=fe;break}j.head&&(j.head.text=ce>>8&1),j.flags&512&&(Co[0]=ce&255,Co[1]=ce>>>8&255,j.check=c(j.check,Co,2,0)),ce=0,me=0,j.mode=k;case k:for(;me<32;){if(Ae===0)break e;Ae--,ce+=Pe[Ee++]<<me,me+=8}j.head&&(j.head.time=ce),j.flags&512&&(Co[0]=ce&255,Co[1]=ce>>>8&255,Co[2]=ce>>>16&255,Co[3]=ce>>>24&255,j.check=c(j.check,Co,4,0)),ce=0,me=0,j.mode=P;case P:for(;me<16;){if(Ae===0)break e;Ae--,ce+=Pe[Ee++]<<me,me+=8}j.head&&(j.head.xflags=ce&255,j.head.os=ce>>8),j.flags&512&&(Co[0]=ce&255,Co[1]=ce>>>8&255,j.check=c(j.check,Co,2,0)),ce=0,me=0,j.mode=N;case N:if(j.flags&1024){for(;me<16;){if(Ae===0)break e;Ae--,ce+=Pe[Ee++]<<me,me+=8}j.length=ce,j.head&&(j.head.extra_len=ce),j.flags&512&&(Co[0]=ce&255,Co[1]=ce>>>8&255,j.check=c(j.check,Co,2,0)),ce=0,me=0}else j.head&&(j.head.extra=null);j.mode=U;case U:if(j.flags&1024&&(De=j.length,De>Ae&&(De=Ae),De&&(j.head&&(co=j.head.extra_len-j.length,j.head.extra||(j.head.extra=new Array(j.head.extra_len)),s.arraySet(j.head.extra,Pe,Ee,De,co)),j.flags&512&&(j.check=c(j.check,Pe,De,Ee)),Ae-=De,Ee+=De,j.length-=De),j.length))break e;j.length=0,j.mode=F;case F:if(j.flags&2048){if(Ae===0)break e;De=0;do co=Pe[Ee+De++],j.head&&co&&j.length<65536&&(j.head.name+=String.fromCharCode(co));while(co&&De<Ae);if(j.flags&512&&(j.check=c(j.check,Pe,De,Ee)),Ae-=De,Ee+=De,co)break e}else j.head&&(j.head.name=null);j.length=0,j.mode=D;case D:if(j.flags&4096){if(Ae===0)break e;De=0;do co=Pe[Ee+De++],j.head&&co&&j.length<65536&&(j.head.comment+=String.fromCharCode(co));while(co&&De<Ae);if(j.flags&512&&(j.check=c(j.check,Pe,De,Ee)),Ae-=De,Ee+=De,co)break e}else j.head&&(j.head.comment=null);j.mode=B;case B:if(j.flags&512){for(;me<16;){if(Ae===0)break e;Ae--,ce+=Pe[Ee++]<<me,me+=8}if(ce!==(j.check&65535)){ee.msg="header crc mismatch",j.mode=fe;break}ce=0,me=0}j.head&&(j.head.hcrc=j.flags>>9&1,j.head.done=!0),ee.adler=j.check=0,j.mode=z;break;case L:for(;me<32;){if(Ae===0)break e;Ae--,ce+=Pe[Ee++]<<me,me+=8}ee.adler=j.check=J(ce),ce=0,me=0,j.mode=M;case M:if(j.havedict===0)return ee.next_out=xo,ee.avail_out=tr,ee.next_in=Ee,ee.avail_in=Ae,j.hold=ce,j.bits=me,w;ee.adler=j.check=1,j.mode=z;case z:if(we===v||we===b)break e;case K:if(j.last){ce>>>=me&7,me-=me&7,j.mode=te;break}for(;me<3;){if(Ae===0)break e;Ae--,ce+=Pe[Ee++]<<me,me+=8}switch(j.last=ce&1,ce>>>=1,me-=1,ce&3){case 0:j.mode=Z;break;case 1:if(js(j),j.mode=ae,we===b){ce>>>=2,me-=2;break e}break;case 2:j.mode=ie;break;case 3:ee.msg="invalid block type",j.mode=fe}ce>>>=2,me-=2;break;case Z:for(ce>>>=me&7,me-=me&7;me<32;){if(Ae===0)break e;Ae--,ce+=Pe[Ee++]<<me,me+=8}if((ce&65535)!==(ce>>>16^65535)){ee.msg="invalid stored block lengths",j.mode=fe;break}if(j.length=ce&65535,ce=0,me=0,j.mode=q,we===b)break e;case q:j.mode=X;case X:if(De=j.length,De){if(De>Ae&&(De=Ae),De>tr&&(De=tr),De===0)break e;s.arraySet(Dt,Pe,Ee,De,xo),Ae-=De,Ee+=De,tr-=De,xo+=De,j.length-=De;break}j.mode=z;break;case ie:for(;me<14;){if(Ae===0)break e;Ae--,ce+=Pe[Ee++]<<me,me+=8}if(j.nlen=(ce&31)+257,ce>>>=5,me-=5,j.ndist=(ce&31)+1,ce>>>=5,me-=5,j.ncode=(ce&15)+4,ce>>>=4,me-=4,j.nlen>286||j.ndist>30){ee.msg="too many length or distance symbols",j.mode=fe;break}j.have=0,j.mode=$;case $:for(;j.have<j.ncode;){for(;me<3;){if(Ae===0)break e;Ae--,ce+=Pe[Ee++]<<me,me+=8}j.lens[gy[j.have++]]=ce&7,ce>>>=3,me-=3}for(;j.have<19;)j.lens[gy[j.have++]]=0;if(j.lencode=j.lendyn,j.lenbits=7,os={bits:j.lenbits},rs=d(f,j.lens,0,19,j.lencode,0,j.work,os),j.lenbits=os.bits,rs){ee.msg="invalid code lengths set",j.mode=fe;break}j.have=0,j.mode=le;case le:for(;j.have<j.nlen+j.ndist;){for(;Be=j.lencode[ce&(1<<j.lenbits)-1],qe=Be>>>24,rr=Be>>>16&255,Vr=Be&65535,!(qe<=me);){if(Ae===0)break e;Ae--,ce+=Pe[Ee++]<<me,me+=8}if(Vr<16)ce>>>=qe,me-=qe,j.lens[j.have++]=Vr;else{if(Vr===16){for(Hs=qe+2;me<Hs;){if(Ae===0)break e;Ae--,ce+=Pe[Ee++]<<me,me+=8}if(ce>>>=qe,me-=qe,j.have===0){ee.msg="invalid bit length repeat",j.mode=fe;break}co=j.lens[j.have-1],De=3+(ce&3),ce>>>=2,me-=2}else if(Vr===17){for(Hs=qe+3;me<Hs;){if(Ae===0)break e;Ae--,ce+=Pe[Ee++]<<me,me+=8}ce>>>=qe,me-=qe,co=0,De=3+(ce&7),ce>>>=3,me-=3}else{for(Hs=qe+7;me<Hs;){if(Ae===0)break e;Ae--,ce+=Pe[Ee++]<<me,me+=8}ce>>>=qe,me-=qe,co=0,De=11+(ce&127),ce>>>=7,me-=7}if(j.have+De>j.nlen+j.ndist){ee.msg="invalid bit length repeat",j.mode=fe;break}for(;De--;)j.lens[j.have++]=co}}if(j.mode===fe)break;if(j.lens[256]===0){ee.msg="invalid code -- missing end-of-block",j.mode=fe;break}if(j.lenbits=9,os={bits:j.lenbits},rs=d(m,j.lens,0,j.nlen,j.lencode,0,j.work,os),j.lenbits=os.bits,rs){ee.msg="invalid literal/lengths set",j.mode=fe;break}if(j.distbits=6,j.distcode=j.distdyn,os={bits:j.distbits},rs=d(h,j.lens,j.nlen,j.ndist,j.distcode,0,j.work,os),j.distbits=os.bits,rs){ee.msg="invalid distances set",j.mode=fe;break}if(j.mode=ae,we===b)break e;case ae:j.mode=re;case re:if(Ae>=6&&tr>=258){ee.next_out=xo,ee.avail_out=tr,ee.next_in=Ee,ee.avail_in=Ae,j.hold=ce,j.bits=me,u(ee,Yt),xo=ee.next_out,Dt=ee.output,tr=ee.avail_out,Ee=ee.next_in,Pe=ee.input,Ae=ee.avail_in,ce=j.hold,me=j.bits,j.mode===z&&(j.back=-1);break}for(j.back=0;Be=j.lencode[ce&(1<<j.lenbits)-1],qe=Be>>>24,rr=Be>>>16&255,Vr=Be&65535,!(qe<=me);){if(Ae===0)break e;Ae--,ce+=Pe[Ee++]<<me,me+=8}if(rr&&(rr&240)===0){for(lo=qe,ts=rr,wg=Vr;Be=j.lencode[wg+((ce&(1<<lo+ts)-1)>>lo)],qe=Be>>>24,rr=Be>>>16&255,Vr=Be&65535,!(lo+qe<=me);){if(Ae===0)break e;Ae--,ce+=Pe[Ee++]<<me,me+=8}ce>>>=lo,me-=lo,j.back+=lo}if(ce>>>=qe,me-=qe,j.back+=qe,j.length=Vr,rr===0){j.mode=ue;break}if(rr&32){j.back=-1,j.mode=z;break}if(rr&64){ee.msg="invalid literal/length code",j.mode=fe;break}j.extra=rr&15,j.mode=ve;case ve:if(j.extra){for(Hs=j.extra;me<Hs;){if(Ae===0)break e;Ae--,ce+=Pe[Ee++]<<me,me+=8}j.length+=ce&(1<<j.extra)-1,ce>>>=j.extra,me-=j.extra,j.back+=j.extra}j.was=j.length,j.mode=Ce;case Ce:for(;Be=j.distcode[ce&(1<<j.distbits)-1],qe=Be>>>24,rr=Be>>>16&255,Vr=Be&65535,!(qe<=me);){if(Ae===0)break e;Ae--,ce+=Pe[Ee++]<<me,me+=8}if((rr&240)===0){for(lo=qe,ts=rr,wg=Vr;Be=j.distcode[wg+((ce&(1<<lo+ts)-1)>>lo)],qe=Be>>>24,rr=Be>>>16&255,Vr=Be&65535,!(lo+qe<=me);){if(Ae===0)break e;Ae--,ce+=Pe[Ee++]<<me,me+=8}ce>>>=lo,me-=lo,j.back+=lo}if(ce>>>=qe,me-=qe,j.back+=qe,rr&64){ee.msg="invalid distance code",j.mode=fe;break}j.offset=Vr,j.extra=rr&15,j.mode=_e;case _e:if(j.extra){for(Hs=j.extra;me<Hs;){if(Ae===0)break e;Ae--,ce+=Pe[Ee++]<<me,me+=8}j.offset+=ce&(1<<j.extra)-1,ce>>>=j.extra,me-=j.extra,j.back+=j.extra}if(j.offset>j.dmax){ee.msg="invalid distance too far back",j.mode=fe;break}j.mode=Me;case Me:if(tr===0)break e;if(De=Yt-tr,j.offset>De){if(De=j.offset-De,De>j.whave&&j.sane){ee.msg="invalid distance too far back",j.mode=fe;break}De>j.wnext?(De-=j.wnext,dc=j.wsize-De):dc=j.wnext-De,De>j.length&&(De=j.length),ye=j.window}else ye=Dt,dc=xo-j.offset,De=j.length;De>tr&&(De=tr),tr-=De,j.length-=De;do Dt[xo++]=ye[dc++];while(--De);j.length===0&&(j.mode=re);break;case ue:if(tr===0)break e;Dt[xo++]=j.length,tr--,j.mode=re;break;case te:if(j.wrap){for(;me<32;){if(Ae===0)break e;Ae--,ce|=Pe[Ee++]<<me,me+=8}if(Yt-=tr,ee.total_out+=Yt,j.total+=Yt,Yt&&(ee.adler=j.check=j.flags?c(j.check,Dt,Yt,xo-Yt):l(j.check,Dt,Yt,xo-Yt)),Yt=tr,(j.flags?ce:J(ce))!==j.check){ee.msg="incorrect data check",j.mode=fe;break}ce=0,me=0}j.mode=de;case de:if(j.wrap&&j.flags){for(;me<32;){if(Ae===0)break e;Ae--,ce+=Pe[Ee++]<<me,me+=8}if(ce!==(j.total&4294967295)){ee.msg="incorrect length check",j.mode=fe;break}ce=0,me=0}j.mode=se;case se:rs=y;break e;case fe:rs=x;break e;case Ne:return E;case Ie:default:return _}return ee.next_out=xo,ee.avail_out=tr,ee.next_in=Ee,ee.avail_in=Ae,j.hold=ce,j.bits=me,(j.wsize||Yt!==ee.avail_out&&j.mode<fe&&(j.mode<te||we!==g))&&_r(ee,ee.output,ee.next_out,Yt-ee.avail_out)?(j.mode=Ne,E):(zs-=ee.avail_in,Yt-=ee.avail_out,ee.total_in+=zs,ee.total_out+=Yt,j.total+=Yt,j.wrap&&Yt&&(ee.adler=j.check=j.flags?c(j.check,Dt,Yt,ee.next_out-Yt):l(j.check,Dt,Yt,ee.next_out-Yt)),ee.data_type=j.bits+(j.last?64:0)+(j.mode===z?128:0)+(j.mode===ae||j.mode===q?256:0),(zs===0&&Yt===0||we===g)&&rs===S&&(rs=O),rs)}function Kr(ee){if(!ee||!ee.state)return _;var we=ee.state;return we.window&&(we.window=null),ee.state=null,S}function wt(ee,we){var j;return!ee||!ee.state||(j=ee.state,(j.wrap&2)===0)?_:(j.head=we,we.done=!1,S)}function Ht(ee,we){var j=we.length,Pe,Dt,Ee;return!ee||!ee.state||(Pe=ee.state,Pe.wrap!==0&&Pe.mode!==M)?_:Pe.mode===M&&(Dt=1,Dt=l(Dt,we,j,0),Dt!==Pe.check)?x:(Ee=_r(ee,we,j,j),Ee?(Pe.mode=Ne,E):(Pe.havedict=1,S))}i.inflateReset=Ke,i.inflateReset2=dt,i.inflateResetKeep=ct,i.inflateInit=Pt,i.inflateInit2=yt,i.inflate=uc,i.inflateEnd=Kr,i.inflateGetHeader=wt,i.inflateSetDictionary=Ht,i.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":1,"./adler32":3,"./crc32":5,"./inffast":7,"./inftrees":9}],9:[function(o,n,i){"use strict";var s=o("../utils/common"),l=15,c=852,u=592,d=0,f=1,m=2,h=[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],g=[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],v=[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],b=[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];n.exports=function(y,w,_,x,E,O,A,C){var I=C.bits,k=0,P=0,N=0,U=0,F=0,D=0,B=0,L=0,M=0,z=0,K,Z,q,X,ie,$=null,le=0,ae,re=new s.Buf16(l+1),ve=new s.Buf16(l+1),Ce=null,_e=0,Me,ue,te;for(k=0;k<=l;k++)re[k]=0;for(P=0;P<x;P++)re[w[_+P]]++;for(F=I,U=l;U>=1&&re[U]===0;U--);if(F>U&&(F=U),U===0)return E[O++]=1<<24|64<<16|0,E[O++]=1<<24|64<<16|0,C.bits=1,0;for(N=1;N<U&&re[N]===0;N++);for(F<N&&(F=N),L=1,k=1;k<=l;k++)if(L<<=1,L-=re[k],L<0)return-1;if(L>0&&(y===d||U!==1))return-1;for(ve[1]=0,k=1;k<l;k++)ve[k+1]=ve[k]+re[k];for(P=0;P<x;P++)w[_+P]!==0&&(A[ve[w[_+P]]++]=P);if(y===d?($=Ce=A,ae=19):y===f?($=h,le-=257,Ce=g,_e-=257,ae=256):($=v,Ce=b,ae=-1),z=0,P=0,k=N,ie=O,D=F,B=0,q=-1,M=1<<F,X=M-1,y===f&&M>c||y===m&&M>u)return 1;for(;;){Me=k-B,A[P]<ae?(ue=0,te=A[P]):A[P]>ae?(ue=Ce[_e+A[P]],te=$[le+A[P]]):(ue=96,te=0),K=1<<k-B,Z=1<<D,N=Z;do Z-=K,E[ie+(z>>B)+Z]=Me<<24|ue<<16|te|0;while(Z!==0);for(K=1<<k-1;z&K;)K>>=1;if(K!==0?(z&=K-1,z+=K):z=0,P++,--re[k]===0){if(k===U)break;k=w[_+A[P]]}if(k>F&&(z&X)!==q){for(B===0&&(B=F),ie+=N,D=k-B,L=1<<D;D+B<U&&(L-=re[D+B],!(L<=0));)D++,L<<=1;if(M+=1<<D,y===f&&M>c||y===m&&M>u)return 1;q=z&X,E[q]=F<<24|D<<16|ie-O|0}}return z!==0&&(E[ie+z]=k-B<<24|64<<16|0),C.bits=F,0}},{"../utils/common":1}],10:[function(o,n,i){"use strict";n.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(o,n,i){"use strict";function s(){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}n.exports=s},{}],"/lib/inflate.js":[function(o,n,i){"use strict";var s=o("./zlib/inflate"),l=o("./utils/common"),c=o("./utils/strings"),u=o("./zlib/constants"),d=o("./zlib/messages"),f=o("./zlib/zstream"),m=o("./zlib/gzheader"),h=Object.prototype.toString;function g(S){if(!(this instanceof g))return new g(S);this.options=l.assign({chunkSize:16384,windowBits:0,to:""},S||{});var y=this.options;y.raw&&y.windowBits>=0&&y.windowBits<16&&(y.windowBits=-y.windowBits,y.windowBits===0&&(y.windowBits=-15)),y.windowBits>=0&&y.windowBits<16&&!(S&&S.windowBits)&&(y.windowBits+=32),y.windowBits>15&&y.windowBits<48&&(y.windowBits&15)===0&&(y.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new f,this.strm.avail_out=0;var w=s.inflateInit2(this.strm,y.windowBits);if(w!==u.Z_OK)throw new Error(d[w]);if(this.header=new m,s.inflateGetHeader(this.strm,this.header),y.dictionary&&(typeof y.dictionary=="string"?y.dictionary=c.string2buf(y.dictionary):h.call(y.dictionary)==="[object ArrayBuffer]"&&(y.dictionary=new Uint8Array(y.dictionary)),y.raw&&(w=s.inflateSetDictionary(this.strm,y.dictionary),w!==u.Z_OK)))throw new Error(d[w])}g.prototype.push=function(S,y){var w=this.strm,_=this.options.chunkSize,x=this.options.dictionary,E,O,A,C,I,k=!1;if(this.ended)return!1;O=y===~~y?y:y===!0?u.Z_FINISH:u.Z_NO_FLUSH,typeof S=="string"?w.input=c.binstring2buf(S):h.call(S)==="[object ArrayBuffer]"?w.input=new Uint8Array(S):w.input=S,w.next_in=0,w.avail_in=w.input.length;do{if(w.avail_out===0&&(w.output=new l.Buf8(_),w.next_out=0,w.avail_out=_),E=s.inflate(w,u.Z_NO_FLUSH),E===u.Z_NEED_DICT&&x&&(E=s.inflateSetDictionary(this.strm,x)),E===u.Z_BUF_ERROR&&k===!0&&(E=u.Z_OK,k=!1),E!==u.Z_STREAM_END&&E!==u.Z_OK)return this.onEnd(E),this.ended=!0,!1;w.next_out&&(w.avail_out===0||E===u.Z_STREAM_END||w.avail_in===0&&(O===u.Z_FINISH||O===u.Z_SYNC_FLUSH))&&(this.options.to==="string"?(A=c.utf8border(w.output,w.next_out),C=w.next_out-A,I=c.buf2string(w.output,A),w.next_out=C,w.avail_out=_-C,C&&l.arraySet(w.output,w.output,A,C,0),this.onData(I)):this.onData(l.shrinkBuf(w.output,w.next_out))),w.avail_in===0&&w.avail_out===0&&(k=!0)}while((w.avail_in>0||w.avail_out===0)&&E!==u.Z_STREAM_END);return E===u.Z_STREAM_END&&(O=u.Z_FINISH),O===u.Z_FINISH?(E=s.inflateEnd(this.strm),this.onEnd(E),this.ended=!0,E===u.Z_OK):(O===u.Z_SYNC_FLUSH&&(this.onEnd(u.Z_OK),w.avail_out=0),!0)},g.prototype.onData=function(S){this.chunks.push(S)},g.prototype.onEnd=function(S){S===u.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=l.flattenChunks(this.chunks)),this.chunks=[],this.err=S,this.msg=this.strm.msg};function v(S,y){var w=new g(y);if(w.push(S,!0),w.err)throw w.msg||d[w.err];return w.result}function b(S,y){return y=y||{},y.raw=!0,v(S,y)}i.Inflate=g,i.inflate=v,i.inflateRaw=b,i.ungzip=v},{"./utils/common":1,"./utils/strings":2,"./zlib/constants":4,"./zlib/gzheader":6,"./zlib/inflate":8,"./zlib/messages":10,"./zlib/zstream":11}]},{},[])("/lib/inflate.js")})();var Rjt=globalThis.fetch,B5=class{constructor(e,t={},r){this.type=e,this.detail=t,this.msg=r,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]`}},YHe=class{constructor(){this.listeners={}}addEventListener(e,t,r){let o=this.listeners[e]||[];r?o.unshift(t):o.push(t),this.listeners[e]=o}removeEventListener(e,t){let r=this.listeners[e]||[],o=r.findIndex(n=>n===t);o>-1&&(r.splice(o,1),this.listeners[e]=r)}dispatch(e){let t=this.listeners[e.type];if(t)for(let r=0,o=t.length;r<o&&e.__mayPropagate;r++)t[r](e)}},qHe=new Date("1904-01-01T00:00:00+0000").getTime();function KHe(e){return Array.from(e).map(t=>String.fromCharCode(t)).join("")}var ZHe=class{constructor(e,t,r){this.name=(r||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(o=>{let n=o.replace(/get(Big)?/,"").toLowerCase(),i=parseInt(o.replace(/[^\d]/g,""))/8;Object.defineProperty(this,n,{get:()=>this.getValue(o,i)})})}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 r=this.start+this.offset;this.offset+=t;try{return this.data[e](r)}catch(o){throw console.error("parser",e,t,this),console.error("parser",this.start,this.offset),o}}flags(e){if(e===8||e===16||e===32||e===64)return this[`uint${e}`].toString(2).padStart(e,0).split("").map(t=>t==="1");console.error("Error parsing flags: flag types can only be 1, 2, 4, or 8 bytes long"),console.trace()}get tag(){let e=this.uint32;return KHe([e>>24&255,e>>16&255,e>>8&255,e&255])}get fixed(){let e=this.int16,t=Math.round(1e3*this.uint16/65356);return e+t/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 r=this.uint8;if(e=e*128+(r&127),r<128)break}return e}get longdatetime(){return new Date(qHe+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(){let e=p.uint16,t=[0,1,-2,-1][e>>14],r=e&16383;return t+r/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,r=8,o=!1){if(e=e||this.length,e===0)return[];t&&(this.currentPosition=t);let n=`${o?"":"u"}int${r}`,i=[];for(;e--;)i.push(this[n]);return i}},yo=class{constructor(e){Object.defineProperty(this,"parser",{enumerable:!1,get:()=>e});let r=e.currentPosition;Object.defineProperty(this,"start",{enumerable:!1,get:()=>r})}load(e){Object.keys(e).forEach(t=>{let r=Object.getOwnPropertyDescriptor(e,t);r.get?this[t]=r.get.bind(this):r.value!==void 0&&(this[t]=r.value)}),this.parser.length&&this.parser.verifyLength()}},vt=class extends yo{constructor(e,t,r){let{parser:o,start:n}=super(new ZHe(e,t,r));Object.defineProperty(this,"p",{enumerable:!1,get:()=>o}),Object.defineProperty(this,"tableStart",{enumerable:!1,get:()=>n})}};function Ve(e,t,r){let o;Object.defineProperty(e,t,{get:()=>o||(o=r(),o),enumerable:!0})}var XHe=class extends vt{constructor(e,t,r){let{p:o}=super({offset:0,length:12},t,"sfnt");this.version=o.uint32,this.numTables=o.uint16,this.searchRange=o.uint16,this.entrySelector=o.uint16,this.rangeShift=o.uint16,o.verifyLength(),this.directory=[...new Array(this.numTables)].map(n=>new QHe(o)),this.tables={},this.directory.forEach(n=>{let i=()=>r(this.tables,{tag:n.tag,offset:n.offset,length:n.length},t);Ve(this.tables,n.tag.trim(),i)})}},QHe=class{constructor(e){this.tag=e.tag,this.checksum=e.uint32,this.offset=e.uint32,this.length=e.uint32}},Jme=Qme.inflate||void 0,$me=void 0,JHe=class extends vt{constructor(e,t,r){let{p:o}=super({offset:0,length:44},t,"woff");this.signature=o.tag,this.flavor=o.uint32,this.length=o.uint32,this.numTables=o.uint16,o.uint16,this.totalSfntSize=o.uint32,this.majorVersion=o.uint16,this.minorVersion=o.uint16,this.metaOffset=o.uint32,this.metaLength=o.uint32,this.metaOrigLength=o.uint32,this.privOffset=o.uint32,this.privLength=o.uint32,o.verifyLength(),this.directory=[...new Array(this.numTables)].map(n=>new $He(o)),eUe(this,t,r)}},$He=class{constructor(e){this.tag=e.tag,this.offset=e.uint32,this.compLength=e.uint32,this.origLength=e.uint32,this.origChecksum=e.uint32}};function eUe(e,t,r){e.tables={},e.directory.forEach(o=>{Ve(e.tables,o.tag.trim(),()=>{let n=0,i=t;if(o.compLength!==o.origLength){let s=t.buffer.slice(o.offset,o.offset+o.compLength),l;if(Jme)l=Jme(new Uint8Array(s));else if($me)l=$me(new Uint8Array(s));else{let c="no brotli decoder available to decode WOFF2 font";throw font.onerror&&font.onerror(c),new Error(c)}i=new DataView(l.buffer)}else n=o.offset;return r(e.tables,{tag:o.tag,offset:n,length:o.origLength},i)})})}var epe=Xme,tpe=void 0,tUe=class extends vt{constructor(e,t,r){let{p:o}=super({offset:0,length:48},t,"woff2");this.signature=o.tag,this.flavor=o.uint32,this.length=o.uint32,this.numTables=o.uint16,o.uint16,this.totalSfntSize=o.uint32,this.totalCompressedSize=o.uint32,this.majorVersion=o.uint16,this.minorVersion=o.uint16,this.metaOffset=o.uint32,this.metaLength=o.uint32,this.metaOrigLength=o.uint32,this.privOffset=o.uint32,this.privLength=o.uint32,o.verifyLength(),this.directory=[...new Array(this.numTables)].map(l=>new rUe(o));let n=o.currentPosition;this.directory[0].offset=0,this.directory.forEach((l,c)=>{let u=this.directory[c+1];u&&(u.offset=l.offset+(l.transformLength!==void 0?l.transformLength:l.origLength))});let i,s=t.buffer.slice(n);if(epe)i=epe(new Uint8Array(s));else if(tpe)i=new Uint8Array(tpe(s));else{let l="no brotli decoder available to decode WOFF2 font";throw e.onerror&&e.onerror(l),new Error(l)}oUe(this,i,r)}},rUe=class{constructor(e){this.flags=e.uint8;let t=this.tagNumber=this.flags&63;t===63?this.tag=e.tag:this.tag=nUe(t);let o=(this.transformVersion=(this.flags&192)>>6)!==0;(this.tag==="glyf"||this.tag==="loca")&&(o=this.transformVersion!==3),this.origLength=e.uint128,o&&(this.transformLength=e.uint128)}};function oUe(e,t,r){e.tables={},e.directory.forEach(o=>{Ve(e.tables,o.tag.trim(),()=>{let n=o.offset,i=n+(o.transformLength?o.transformLength:o.origLength),s=new DataView(t.slice(n,i).buffer);try{return r(e.tables,{tag:o.tag,offset:0,length:o.origLength},s)}catch(l){console.error(l)}})})}function nUe(e){return["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"][e&63]}var lpe={},cpe=!1;Promise.all([Promise.resolve().then(function(){return OUe}),Promise.resolve().then(function(){return MUe}),Promise.resolve().then(function(){return DUe}),Promise.resolve().then(function(){return VUe}),Promise.resolve().then(function(){return zUe}),Promise.resolve().then(function(){return YUe}),Promise.resolve().then(function(){return KUe}),Promise.resolve().then(function(){return XUe}),Promise.resolve().then(function(){return sWe}),Promise.resolve().then(function(){return vWe}),Promise.resolve().then(function(){return nGe}),Promise.resolve().then(function(){return sGe}),Promise.resolve().then(function(){return uGe}),Promise.resolve().then(function(){return pGe}),Promise.resolve().then(function(){return gGe}),Promise.resolve().then(function(){return bGe}),Promise.resolve().then(function(){return SGe}),Promise.resolve().then(function(){return xGe}),Promise.resolve().then(function(){return TGe}),Promise.resolve().then(function(){return PGe}),Promise.resolve().then(function(){return RGe}),Promise.resolve().then(function(){return IGe}),Promise.resolve().then(function(){return MGe}),Promise.resolve().then(function(){return LGe}),Promise.resolve().then(function(){return BGe}),Promise.resolve().then(function(){return jGe}),Promise.resolve().then(function(){return HGe}),Promise.resolve().then(function(){return WGe}),Promise.resolve().then(function(){return YGe}),Promise.resolve().then(function(){return ZGe}),Promise.resolve().then(function(){return tYe}),Promise.resolve().then(function(){return iYe}),Promise.resolve().then(function(){return lYe}),Promise.resolve().then(function(){return fYe}),Promise.resolve().then(function(){return pYe}),Promise.resolve().then(function(){return gYe}),Promise.resolve().then(function(){return yYe}),Promise.resolve().then(function(){return SYe}),Promise.resolve().then(function(){return EYe}),Promise.resolve().then(function(){return kYe}),Promise.resolve().then(function(){return IYe})]).then(e=>{e.forEach(t=>{let r=Object.keys(t)[0];lpe[r]=t[r]}),cpe=!0});function iUe(e,t,r){let o=t.tag.replace(/[^\w\d]/g,""),n=lpe[o];return n?new n(t,r,e):(console.warn(`lib-font has no definition for ${o}. The table was skipped.`),{})}function sUe(){let e=0;function t(r,o){if(!cpe)return e>10?o(new Error("loading took too long")):(e++,setTimeout(()=>t(r),250));r(iUe)}return new Promise((r,o)=>t(r))}function aUe(e,t){let r=e.lastIndexOf("."),o=(e.substring(r+1)||"").toLowerCase(),n={ttf:"truetype",otf:"opentype",woff:"woff",woff2:"woff2"}[o];if(n)return n;let i={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."}[o];if(i||(i=`${e} is not a known webfont format.`),t)throw new Error(i);console.warn(`Could not load font: ${i}`)}async function lUe(e,t,r={}){if(!globalThis.document)return;let o=aUe(t,r.errorOnStyle);if(!o)return;let n=document.createElement("style");n.className="injected-by-Font-js";let i=[];return r.styleRules&&(i=Object.entries(r.styleRules).map(([s,l])=>`${s}: ${l};`)),n.textContent=`
51 @font-face {
52 font-family: "${e}";
53 ${i.join(`
54 `)}
55 src: url("${t}") format("${o}");
56 }`,globalThis.document.head.appendChild(n),n}var cUe=[0,1,0,0],uUe=[79,84,84,79],dUe=[119,79,70,70],fUe=[119,79,70,50];function V5(e,t){if(e.length===t.length){for(let r=0;r<e.length;r++)if(e[r]!==t[r])return;return!0}}function mUe(e){let t=[e.getUint8(0),e.getUint8(1),e.getUint8(2),e.getUint8(3)];if(V5(t,cUe)||V5(t,uUe))return"SFNT";if(V5(t,dUe))return"WOFF";if(V5(t,fUe))return"WOFF2"}function pUe(e){if(!e.ok)throw new Error(`HTTP ${e.status} - ${e.statusText}`);return e}var z5=class extends YHe{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 lUe(this.name,e,this.options),this.loadFont(e)))()}async loadFont(e,t){fetch(e).then(r=>pUe(r)&&r.arrayBuffer()).then(r=>this.fromDataBuffer(r,t||e)).catch(r=>{let o=new B5("error",r,`Failed to load font at ${t||e}`);this.dispatch(o),this.onerror&&this.onerror(o)})}async fromDataBuffer(e,t){this.fontData=new DataView(e);let r=mUe(this.fontData);if(!r)throw new Error(`${t} is either an unsupported font format, or not a font at all.`);await this.parseBasicData(r);let o=new B5("load",{font:this});this.dispatch(o),this.onload&&this.onload(o)}async parseBasicData(e){return sUe().then(t=>(e==="SFNT"&&(this.opentype=new XHe(this,this.fontData,t)),e==="WOFF"&&(this.opentype=new JHe(this,this.fontData,t)),e==="WOFF2"&&(this.opentype=new tUe(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 this.getGlyphId(e)!==0}supportsVariation(e){return this.opentype.tables.cmap.supportsVariation(e)!==!1}measureText(e,t=16){if(this.__unloaded)throw new Error("Cannot measure text: font was unloaded. Please reload before calling measureText()");let r=document.createElement("div");r.textContent=e,r.style.fontFamily=this.name,r.style.fontSize=`${t}px`,r.style.color="transparent",r.style.background="transparent",r.style.top="0",r.style.left="0",r.style.position="absolute",document.body.appendChild(r);let o=r.getBoundingClientRect();document.body.removeChild(r);let n=this.opentype.tables["OS/2"];return o.fontSize=t,o.ascender=n.sTypoAscender,o.descender=n.sTypoDescender,o}unload(){if(this.styleElement.parentNode){this.styleElement.parentNode.removeElement(this.styleElement);let e=new B5("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);let e=new B5("load",{font:this});this.dispatch(e),this.onload&&this.onload(e)}}};globalThis.Font=z5;var Gf=class extends yo{constructor(e,t,r){super(e),this.plaformID=t,this.encodingID=r}},hUe=class extends Gf{constructor(e,t,r){super(e,t,r),this.format=0,this.length=e.uint16,this.language=e.uint16,this.glyphIdArray=[...new Array(256)].map(o=>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}]}},gUe=class extends Gf{constructor(e,t,r){super(e,t,r),this.format=2,this.length=e.uint16,this.language=e.uint16,this.subHeaderKeys=[...new Array(256)].map(s=>e.uint16);let o=Math.max(...this.subHeaderKeys),n=e.currentPosition;Ve(this,"subHeaders",()=>(e.currentPosition=n,[...new Array(o)].map(s=>new vUe(e))));let i=n+o*8;Ve(this,"glyphIndexArray",()=>(e.currentPosition=i,[...new Array(o)].map(s=>e.uint16)))}supports(e){e.charCodeAt&&(e=-1,console.warn("supports(character) not implemented for cmap subtable format 2. only supports(id) is implemented."));let t=e&&255,r=e&&65280,o=this.subHeaders[r],n=this.subHeaders[o],i=n.firstCode,s=i+n.entryCount;return i<=t&&t<=s}reverse(e){return console.warn("reverse not implemented for cmap subtable format 2"),{}}getSupportedCharCodes(e=!1){return e?this.subHeaders.map(t=>({firstCode:t.firstCode,lastCode:t.lastCode})):this.subHeaders.map(t=>({start:t.firstCode,end:t.lastCode}))}},vUe=class{constructor(e){this.firstCode=e.uint16,this.entryCount=e.uint16,this.lastCode=this.first+this.entryCount,this.idDelta=e.int16,this.idRangeOffset=e.uint16}},bUe=class extends Gf{constructor(e,t,r){super(e,t,r),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;let o=e.currentPosition;Ve(this,"endCode",()=>e.readBytes(this.segCount,o,16));let n=o+2+this.segCountX2;Ve(this,"startCode",()=>e.readBytes(this.segCount,n,16));let i=n+this.segCountX2;Ve(this,"idDelta",()=>e.readBytes(this.segCount,i,16,!0));let s=i+this.segCountX2;Ve(this,"idRangeOffset",()=>e.readBytes(this.segCount,s,16));let l=s+this.segCountX2,c=this.length-(l-this.tableStart);Ve(this,"glyphIdArray",()=>e.readBytes(c,l,16)),Ve(this,"segments",()=>this.buildSegments(s,l,e))}buildSegments(e,t,r){let o=(n,i)=>{let s=this.startCode[i],l=this.endCode[i],c=this.idDelta[i],u=this.idRangeOffset[i],d=e+2*i,f=[];if(u===0)for(let m=s+c,h=l+c;m<=h;m++)f.push(m);else for(let m=0,h=l-s;m<=h;m++)r.currentPosition=d+u+m*2,f.push(r.uint16);return{startCode:s,endCode:l,idDelta:c,idRangeOffset:u,glyphIDs:f}};return[...new Array(this.segCount)].map(o)}reverse(e){let t=this.segments.find(o=>o.glyphIDs.includes(e));if(!t)return{};let r=t.startCode+t.glyphIDs.indexOf(e);return{code:r,unicode:String.fromCodePoint(r)}}getGlyphId(e){if(e.charCodeAt&&(e=e.charCodeAt(0)),55296<=e&&e<=57343||(e&65534)===65534||(e&65535)===65535)return 0;let t=this.segments.find(r=>r.startCode<=e&&e<=r.endCode);return t?t.glyphIDs[e-t.startCode]:0}supports(e){return this.getGlyphId(e)!==0}getSupportedCharCodes(e=!1){return e?this.segments:this.segments.map(t=>({start:t.startCode,end:t.endCode}))}},yUe=class extends Gf{constructor(e,t,r){super(e,t,r),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,Ve(this,"glyphIdArray",()=>[...new Array(this.entryCount)].map(n=>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{};let 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}]}},wUe=class extends Gf{constructor(e,t,r){super(e,t,r),this.format=8,e.uint16,this.length=e.uint32,this.language=e.uint32,this.is32=[...new Array(8192)].map(n=>e.uint8),this.numGroups=e.uint32,Ve(this,"groups",()=>[...new Array(this.numGroups)].map(n=>new SUe(e)))}supports(e){return e.charCodeAt&&(e=-1,console.warn("supports(character) not implemented for cmap subtable format 8. only supports(id) is implemented.")),this.groups.findIndex(t=>t.startcharCode<=e&&e<=t.endcharCode)!==-1}reverse(e){return console.warn("reverse not implemented for cmap subtable format 8"),{}}getSupportedCharCodes(e=!1){return e?this.groups:this.groups.map(t=>({start:t.startcharCode,end:t.endcharCode}))}},SUe=class{constructor(e){this.startcharCode=e.uint32,this.endcharCode=e.uint32,this.startGlyphID=e.uint32}},_Ue=class extends Gf{constructor(e,t,r){super(e,t,r),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,Ve(this,"glyphs",()=>[...new Array(this.numChars)].map(n=>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?!1: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}]}},xUe=class extends Gf{constructor(e,t,r){super(e,t,r),this.format=12,e.uint16,this.length=e.uint32,this.language=e.uint32,this.numGroups=e.uint32,Ve(this,"groups",()=>[...new Array(this.numGroups)].map(n=>new CUe(e)))}supports(e){return e.charCodeAt&&(e=e.charCodeAt(0)),55296<=e&&e<=57343||(e&65534)===65534||(e&65535)===65535?0:this.groups.findIndex(t=>t.startCharCode<=e&&e<=t.endCharCode)!==-1}reverse(e){for(let t of this.groups){let r=t.startGlyphID;if(r>e)continue;if(r===e)return t.startCharCode;if(r+(t.endCharCode-t.startCharCode)<e)continue;let n=t.startCharCode+(e-r);return{code:n,unicode:String.fromCodePoint(n)}}return{}}getSupportedCharCodes(e=!1){return e?this.groups:this.groups.map(t=>({start:t.startCharCode,end:t.endCharCode}))}},CUe=class{constructor(e){this.startCharCode=e.uint32,this.endCharCode=e.uint32,this.startGlyphID=e.uint32}},TUe=class extends Gf{constructor(e,t,r){super(e,t,r),this.format=13,e.uint16,this.length=e.uint32,this.language=e.uint32,this.numGroups=e.uint32;let o=[...new Array(this.numGroups)].map(n=>new EUe(e));Ve(this,"groups",o)}supports(e){return e.charCodeAt&&(e=e.charCodeAt(0)),this.groups.findIndex(t=>t.startCharCode<=e&&e<=t.endCharCode)!==-1}reverse(e){return console.warn("reverse not implemented for cmap subtable format 13"),{}}getSupportedCharCodes(e=!1){return e?this.groups:this.groups.map(t=>({start:t.startCharCode,end:t.endCharCode}))}},EUe=class{constructor(e){this.startCharCode=e.uint32,this.endCharCode=e.uint32,this.glyphID=e.uint32}},PUe=class extends Gf{constructor(e,t,r){super(e,t,r),this.subTableStart=e.currentPosition,this.format=14,this.length=e.uint32,this.numVarSelectorRecords=e.uint32,Ve(this,"varSelectors",()=>[...new Array(this.numVarSelectorRecords)].map(o=>new kUe(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){let t=this.varSelector.find(r=>r.varSelector===e);return t||!1}getSupportedVariations(){return this.varSelectors.map(e=>e.varSelector)}},kUe=class{constructor(e){this.varSelector=e.uint24,this.defaultUVSOffset=e.Offset32,this.nonDefaultUVSOffset=e.Offset32}};function RUe(e,t,r){let o=e.uint16;return o===0?new hUe(e,t,r):o===2?new gUe(e,t,r):o===4?new bUe(e,t,r):o===6?new yUe(e,t,r):o===8?new wUe(e,t,r):o===10?new _Ue(e,t,r):o===12?new xUe(e,t,r):o===13?new TUe(e,t,r):o===14?new PUe(e,t,r):{}}var AUe=class extends vt{constructor(e,t){let{p:r}=super(e,t);this.version=r.uint16,this.numTables=r.uint16,this.encodingRecords=[...new Array(this.numTables)].map(o=>new IUe(r,this.tableStart))}getSubTable(e){return this.encodingRecords[e].table}getSupportedEncodings(){return this.encodingRecords.map(e=>({platformID:e.platformID,encodingId:e.encodingID}))}getSupportedCharCodes(e,t){let r=this.encodingRecords.findIndex(n=>n.platformID===e&&n.encodingID===t);return r===-1?!1:this.getSubTable(r).getSupportedCharCodes()}reverse(e){for(let t=0;t<this.numTables;t++){let r=this.getSubTable(t).reverse(e);if(r)return r}}getGlyphId(e){let t=0;return this.encodingRecords.some((r,o)=>{let n=this.getSubTable(o);return n.getGlyphId?(t=n.getGlyphId(e),t!==0):!1}),t}supports(e){return this.encodingRecords.some((t,r)=>{let o=this.getSubTable(r);return o.supports&&o.supports(e)!==!1})}supportsVariation(e){return this.encodingRecords.some((t,r)=>{let o=this.getSubTable(r);return o.supportsVariation&&o.supportsVariation(e)!==!1})}},IUe=class{constructor(e,t){let r=this.platformID=e.uint16,o=this.encodingID=e.uint16,n=this.offset=e.Offset32;Ve(this,"table",()=>(e.currentPosition=t+n,RUe(e,r,o)))}},OUe=Object.freeze({__proto__:null,cmap:AUe}),NUe=class extends vt{constructor(e,t){let{p:r}=super(e,t);this.load({majorVersion:r.uint16,minorVersion:r.uint16,fontRevision:r.fixed,checkSumAdjustment:r.uint32,magicNumber:r.uint32,flags:r.flags(16),unitsPerEm:r.uint16,created:r.longdatetime,modified:r.longdatetime,xMin:r.int16,yMin:r.int16,xMax:r.int16,yMax:r.int16,macStyle:r.flags(16),lowestRecPPEM:r.uint16,fontDirectionHint:r.uint16,indexToLocFormat:r.uint16,glyphDataFormat:r.uint16})}},MUe=Object.freeze({__proto__:null,head:NUe}),FUe=class extends vt{constructor(e,t){let{p:r}=super(e,t);this.majorVersion=r.uint16,this.minorVersion=r.uint16,this.ascender=r.fword,this.descender=r.fword,this.lineGap=r.fword,this.advanceWidthMax=r.ufword,this.minLeftSideBearing=r.fword,this.minRightSideBearing=r.fword,this.xMaxExtent=r.fword,this.caretSlopeRise=r.int16,this.caretSlopeRun=r.int16,this.caretOffset=r.int16,r.int16,r.int16,r.int16,r.int16,this.metricDataFormat=r.int16,this.numberOfHMetrics=r.uint16,r.verifyLength()}},DUe=Object.freeze({__proto__:null,hhea:FUe}),LUe=class extends vt{constructor(e,t,r){let{p:o}=super(e,t),n=r.hhea.numberOfHMetrics,i=r.maxp.numGlyphs,s=o.currentPosition;if(Ve(this,"hMetrics",()=>(o.currentPosition=s,[...new Array(n)].map(l=>new BUe(o.uint16,o.int16)))),n<i){let l=s+n*4;Ve(this,"leftSideBearings",()=>(o.currentPosition=l,[...new Array(i-n)].map(c=>o.int16)))}}},BUe=class{constructor(e,t){this.advanceWidth=e,this.lsb=t}},VUe=Object.freeze({__proto__:null,hmtx:LUe}),jUe=class extends vt{constructor(e,t){let{p:r}=super(e,t);this.version=r.legacyFixed,this.numGlyphs=r.uint16,this.version===1&&(this.maxPoints=r.uint16,this.maxContours=r.uint16,this.maxCompositePoints=r.uint16,this.maxCompositeContours=r.uint16,this.maxZones=r.uint16,this.maxTwilightPoints=r.uint16,this.maxStorage=r.uint16,this.maxFunctionDefs=r.uint16,this.maxInstructionDefs=r.uint16,this.maxStackElements=r.uint16,this.maxSizeOfInstructions=r.uint16,this.maxComponentElements=r.uint16,this.maxComponentDepth=r.uint16),r.verifyLength()}},zUe=Object.freeze({__proto__:null,maxp:jUe}),HUe=class extends vt{constructor(e,t){let{p:r}=super(e,t);this.format=r.uint16,this.count=r.uint16,this.stringOffset=r.Offset16,this.nameRecords=[...new Array(this.count)].map(o=>new WUe(r,this)),this.format===1&&(this.langTagCount=r.uint16,this.langTagRecords=[...new Array(this.langTagCount)].map(o=>new UUe(r.uint16,r.Offset16))),this.stringStart=this.tableStart+this.stringOffset}get(e){let t=this.nameRecords.find(r=>r.nameID===e);if(t)return t.string}},UUe=class{constructor(e,t){this.length=e,this.offset=t}},WUe=class{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,Ve(this,"string",()=>(e.currentPosition=t.stringStart+this.offset,GUe(e,this)))}};function GUe(e,t){let{platformID:r,length:o}=t;if(o===0)return"";if(r===0||r===3){let s=[];for(let l=0,c=o/2;l<c;l++)s[l]=String.fromCharCode(e.uint16);return s.join("")}let n=e.readBytes(o),i=[];return n.forEach(function(s,l){i[l]=String.fromCharCode(s)}),i.join("")}var YUe=Object.freeze({__proto__:null,name:HUe}),qUe=class extends vt{constructor(e,t){let{p:r}=super(e,t);if(this.version=r.uint16,this.xAvgCharWidth=r.int16,this.usWeightClass=r.uint16,this.usWidthClass=r.uint16,this.fsType=r.uint16,this.ySubscriptXSize=r.int16,this.ySubscriptYSize=r.int16,this.ySubscriptXOffset=r.int16,this.ySubscriptYOffset=r.int16,this.ySuperscriptXSize=r.int16,this.ySuperscriptYSize=r.int16,this.ySuperscriptXOffset=r.int16,this.ySuperscriptYOffset=r.int16,this.yStrikeoutSize=r.int16,this.yStrikeoutPosition=r.int16,this.sFamilyClass=r.int16,this.panose=[...new Array(10)].map(o=>r.uint8),this.ulUnicodeRange1=r.flags(32),this.ulUnicodeRange2=r.flags(32),this.ulUnicodeRange3=r.flags(32),this.ulUnicodeRange4=r.flags(32),this.achVendID=r.tag,this.fsSelection=r.uint16,this.usFirstCharIndex=r.uint16,this.usLastCharIndex=r.uint16,this.sTypoAscender=r.int16,this.sTypoDescender=r.int16,this.sTypoLineGap=r.int16,this.usWinAscent=r.uint16,this.usWinDescent=r.uint16,this.version===0||(this.ulCodePageRange1=r.flags(32),this.ulCodePageRange2=r.flags(32),this.version===1)||(this.sxHeight=r.int16,this.sCapHeight=r.int16,this.usDefaultChar=r.uint16,this.usBreakChar=r.uint16,this.usMaxContext=r.uint16,this.version<=4)||(this.usLowerOpticalPointSize=r.uint16,this.usUpperOpticalPointSize=r.uint16,this.version===5))return r.verifyLength()}},KUe=Object.freeze({__proto__:null,OS2:qUe}),ZUe=class extends vt{constructor(e,t){let{p:r}=super(e,t);if(this.version=r.legacyFixed,this.italicAngle=r.fixed,this.underlinePosition=r.fword,this.underlineThickness=r.fword,this.isFixedPitch=r.uint32,this.minMemType42=r.uint32,this.maxMemType42=r.uint32,this.minMemType1=r.uint32,this.maxMemType1=r.uint32,this.version===1||this.version===3)return r.verifyLength();if(this.numGlyphs=r.uint16,this.version===2){this.glyphNameIndex=[...new Array(this.numGlyphs)].map(o=>r.uint16),this.namesOffset=r.currentPosition,this.glyphNameOffsets=[1];for(let o=0;o<this.numGlyphs;o++){if(this.glyphNameIndex[o]<rpe.length){this.glyphNameOffsets.push(this.glyphNameOffsets[o]);continue}let i=r.int8;r.skip(i),this.glyphNameOffsets.push(this.glyphNameOffsets[o]+i+1)}}this.version===2.5&&(this.offset=[...new Array(this.numGlyphs)].map(o=>r.int8))}getGlyphName(e){if(this.version!==2)return console.warn(`post table version ${this.version} does not support glyph name lookups`),"";let t=this.glyphNameIndex[e];if(t<258)return rpe[t];let r=this.glyphNameOffsets[e],n=this.glyphNameOffsets[e+1]-r-1;return n===0?".notdef.":(this.parser.currentPosition=this.namesOffset+r,this.parser.readBytes(n,this.namesOffset+r,8,!0).map(s=>String.fromCharCode(s)).join(""))}},rpe=[".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"],XUe=Object.freeze({__proto__:null,post:ZUe}),QUe=class extends vt{constructor(e,t){let{p:r}=super(e,t);this.majorVersion=r.uint16,this.minorVersion=r.uint16,this.horizAxisOffset=r.Offset16,this.vertAxisOffset=r.Offset16,Ve(this,"horizAxis",()=>new fH({offset:e.offset+this.horizAxisOffset},t)),Ve(this,"vertAxis",()=>new fH({offset:e.offset+this.vertAxisOffset},t)),this.majorVersion===1&&this.minorVersion===1&&(this.itemVarStoreOffset=r.Offset32,Ve(this,"itemVarStore",()=>new fH({offset:e.offset+this.itemVarStoreOffset},t)))}},fH=class extends vt{constructor(e,t){let{p:r}=super(e,t,"AxisTable");this.baseTagListOffset=r.Offset16,this.baseScriptListOffset=r.Offset16,Ve(this,"baseTagList",()=>new JUe({offset:e.offset+this.baseTagListOffset},t)),Ve(this,"baseScriptList",()=>new $Ue({offset:e.offset+this.baseScriptListOffset},t))}},JUe=class extends vt{constructor(e,t){let{p:r}=super(e,t,"BaseTagListTable");this.baseTagCount=r.uint16,this.baselineTags=[...new Array(this.baseTagCount)].map(o=>r.tag)}},$Ue=class extends vt{constructor(e,t){let{p:r}=super(e,t,"BaseScriptListTable");this.baseScriptCount=r.uint16;let o=r.currentPosition;Ve(this,"baseScriptRecords",()=>(r.currentPosition=o,[...new Array(this.baseScriptCount)].map(n=>new eWe(this.start,r))))}},eWe=class{constructor(e,t){this.baseScriptTag=t.tag,this.baseScriptOffset=t.Offset16,Ve(this,"baseScriptTable",()=>(t.currentPosition=e+this.baseScriptOffset,new tWe(t)))}},tWe=class{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 rWe(this.start,e)),Ve(this,"baseValues",()=>(e.currentPosition=this.start+this.baseValuesOffset,new oWe(e))),Ve(this,"defaultMinMax",()=>(e.currentPosition=this.start+this.defaultMinMaxOffset,new upe(e)))}},rWe=class{constructor(e,t){this.baseLangSysTag=t.tag,this.minMaxOffset=t.Offset16,Ve(this,"minMax",()=>(t.currentPosition=e+this.minMaxOffset,new upe(t)))}},oWe=class{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 iWe(this.parser)}},upe=class{constructor(e){this.minCoord=e.Offset16,this.maxCoord=e.Offset16,this.featMinMaxCount=e.uint16;let t=e.currentPosition;Ve(this,"featMinMaxRecords",()=>(e.currentPosition=t,[...new Array(this.featMinMaxCount)].map(r=>new nWe(e))))}},nWe=class{constructor(e){this.featureTableTag=e.tag,this.minCoord=e.Offset16,this.maxCoord=e.Offset16}},iWe=class{constructor(e){this.baseCoordFormat=e.uint16,this.coordinate=e.int16,this.baseCoordFormat===2&&(this.referenceGlyph=e.uint16,this.baseCoordPoint=e.uint16),this.baseCoordFormat===3&&(this.deviceTable=e.Offset16)}},sWe=Object.freeze({__proto__:null,BASE:QUe}),ope=class{constructor(e){this.classFormat=e.uint16,this.classFormat===1&&(this.startGlyphID=e.uint16,this.glyphCount=e.uint16,this.classValueArray=[...new Array(this.glyphCount)].map(t=>e.uint16)),this.classFormat===2&&(this.classRangeCount=e.uint16,this.classRangeRecords=[...new Array(this.classRangeCount)].map(t=>new aWe(e)))}},aWe=class{constructor(e){this.startGlyphID=e.uint16,this.endGlyphID=e.uint16,this.class=e.uint16}},cT=class extends yo{constructor(e){super(e),this.coverageFormat=e.uint16,this.coverageFormat===1&&(this.glyphCount=e.uint16,this.glyphArray=[...new Array(this.glyphCount)].map(t=>e.uint16)),this.coverageFormat===2&&(this.rangeCount=e.uint16,this.rangeRecords=[...new Array(this.rangeCount)].map(t=>new lWe(e)))}},lWe=class{constructor(e){this.startGlyphID=e.uint16,this.endGlyphID=e.uint16,this.startCoverageIndex=e.uint16}},cWe=class{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(r=>t.Offset32)}},uWe=class extends vt{constructor(e,t){let{p:r}=super(e,t);this.majorVersion=r.uint16,this.minorVersion=r.uint16,this.glyphClassDefOffset=r.Offset16,Ve(this,"glyphClassDefs",()=>{if(this.glyphClassDefOffset!==0)return r.currentPosition=this.tableStart+this.glyphClassDefOffset,new ope(r)}),this.attachListOffset=r.Offset16,Ve(this,"attachList",()=>{if(this.attachListOffset!==0)return r.currentPosition=this.tableStart+this.attachListOffset,new dWe(r)}),this.ligCaretListOffset=r.Offset16,Ve(this,"ligCaretList",()=>{if(this.ligCaretListOffset!==0)return r.currentPosition=this.tableStart+this.ligCaretListOffset,new mWe(r)}),this.markAttachClassDefOffset=r.Offset16,Ve(this,"markAttachClassDef",()=>{if(this.markAttachClassDefOffset!==0)return r.currentPosition=this.tableStart+this.markAttachClassDefOffset,new ope(r)}),this.minorVersion>=2&&(this.markGlyphSetsDefOffset=r.Offset16,Ve(this,"markGlyphSetsDef",()=>{if(this.markGlyphSetsDefOffset!==0)return r.currentPosition=this.tableStart+this.markGlyphSetsDefOffset,new gWe(r)})),this.minorVersion===3&&(this.itemVarStoreOffset=r.Offset32,Ve(this,"itemVarStore",()=>{if(this.itemVarStoreOffset!==0)return r.currentPosition=this.tableStart+this.itemVarStoreOffset,new cWe(r)}))}},dWe=class extends yo{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 fWe(this.parser)}},fWe=class{constructor(e){this.pointCount=e.uint16,this.pointIndices=[...new Array(this.pointCount)].map(t=>e.uint16)}},mWe=class extends yo{constructor(e){super(e),this.coverageOffset=e.Offset16,Ve(this,"coverage",()=>(e.currentPosition=this.start+this.coverageOffset,new cT(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 pWe(this.parser)}},pWe=class extends yo{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 hWe(this.parser)}},hWe=class{constructor(e){this.caretValueFormat=e.uint16,this.caretValueFormat===1&&(this.coordinate=e.int16),this.caretValueFormat===2&&(this.caretValuePointIndex=e.uint16),this.caretValueFormat===3&&(this.coordinate=e.int16,this.deviceOffset=e.Offset16)}},gWe=class extends yo{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 cT(this.parser)}},vWe=Object.freeze({__proto__:null,GDEF:uWe}),npe=class extends yo{static EMPTY={scriptCount:0,scriptRecords:[]};constructor(e){super(e),this.scriptCount=e.uint16,this.scriptRecords=[...new Array(this.scriptCount)].map(t=>new bWe(e))}},bWe=class{constructor(e){this.scriptTag=e.tag,this.scriptOffset=e.Offset16}},yWe=class extends yo{constructor(e){super(e),this.defaultLangSys=e.Offset16,this.langSysCount=e.uint16,this.langSysRecords=[...new Array(this.langSysCount)].map(t=>new wWe(e))}},wWe=class{constructor(e){this.langSysTag=e.tag,this.langSysOffset=e.Offset16}},ipe=class{constructor(e){this.lookupOrder=e.Offset16,this.requiredFeatureIndex=e.uint16,this.featureIndexCount=e.uint16,this.featureIndices=[...new Array(this.featureIndexCount)].map(t=>e.uint16)}},spe=class extends yo{static EMPTY={featureCount:0,featureRecords:[]};constructor(e){super(e),this.featureCount=e.uint16,this.featureRecords=[...new Array(this.featureCount)].map(t=>new SWe(e))}},SWe=class{constructor(e){this.featureTag=e.tag,this.featureOffset=e.Offset16}},_We=class extends yo{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){let e=this.parser;e.currentPosition=this.start+this.featureParams;let t=this.featureTag;if(t==="size")return new CWe(e);if(t.startsWith("cc"))return new xWe(e);if(t.startsWith("ss"))return new TWe(e)}}},xWe=class{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)}},CWe=class{constructor(e){this.designSize=e.uint16,this.subfamilyIdentifier=e.uint16,this.subfamilyNameID=e.uint16,this.smallEnd=e.uint16,this.largeEnd=e.uint16}},TWe=class{constructor(e){this.version=e.uint16,this.UINameID=e.uint16}};function dpe(e){e.parser.currentPosition-=2,delete e.coverageOffset,delete e.getCoverageTable}var sb=class extends yo{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 cT(e)}},pH=class{constructor(e){this.glyphSequenceIndex=e.uint16,this.lookupListIndex=e.uint16}},EWe=class extends sb{constructor(e){super(e),this.deltaGlyphID=e.int16}},PWe=class extends sb{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 kWe(t)}},kWe=class{constructor(e){this.glyphCount=e.uint16,this.substituteGlyphIDs=[...new Array(this.glyphCount)].map(t=>e.uint16)}},RWe=class extends sb{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 AWe(t)}},AWe=class{constructor(e){this.glyphCount=e.uint16,this.alternateGlyphIDs=[...new Array(this.glyphCount)].map(t=>e.uint16)}},IWe=class extends sb{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 OWe(t)}},OWe=class extends yo{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 NWe(t)}},NWe=class{constructor(e){this.ligatureGlyph=e.uint16,this.componentCount=e.uint16,this.componentGlyphIDs=[...new Array(this.componentCount-1)].map(t=>e.uint16)}},MWe=class extends sb{constructor(e){super(e),this.substFormat===1&&(this.subRuleSetCount=e.uint16,this.subRuleSetOffsets=[...new Array(this.subRuleSetCount)].map(t=>e.Offset16)),this.substFormat===2&&(this.classDefOffset=e.Offset16,this.subClassSetCount=e.uint16,this.subClassSetOffsets=[...new Array(this.subClassSetCount)].map(t=>e.Offset16)),this.substFormat===3&&(dpe(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 pH(e)))}getSubRuleSet(e){if(this.substFormat!==1)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 FWe(t)}getSubClassSet(e){if(this.substFormat!==2)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 DWe(t)}getCoverageTable(e){if(this.substFormat!==3&&!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 cT(t)}},FWe=class extends yo{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 fpe(t)}},fpe=class{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 pH(e))}},DWe=class extends yo{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 LWe(t)}},LWe=class extends fpe{constructor(e){super(e)}},BWe=class extends sb{constructor(e){super(e),this.substFormat===1&&(this.chainSubRuleSetCount=e.uint16,this.chainSubRuleSetOffsets=[...new Array(this.chainSubRuleSetCount)].map(t=>e.Offset16)),this.substFormat===2&&(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)),this.substFormat===3&&(dpe(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 mpe(e)))}getChainSubRuleSet(e){if(this.substFormat!==1)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 VWe(t)}getChainSubClassSet(e){if(this.substFormat!==2)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 zWe(t)}getCoverageFromOffset(e){if(this.substFormat!==3)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 cT(t)}},VWe=class extends yo{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 jWe(t)}},jWe=class{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 pH(e))}},zWe=class extends yo{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 HWe(t)}},HWe=class{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 mpe(e))}},mpe=class extends yo{constructor(e){super(e),this.sequenceIndex=e.uint16,this.lookupListIndex=e.uint16}},UWe=class extends yo{constructor(e){super(e),this.substFormat=e.uint16,this.extensionLookupType=e.uint16,this.extensionOffset=e.Offset32}},WWe=class extends sb{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)}},GWe={buildSubtable:function(e,t){let r=new[void 0,EWe,PWe,RWe,IWe,MWe,BWe,UWe,WWe][e](t);return r.type=e,r}},Yf=class extends yo{constructor(e){super(e)}},YWe=class extends Yf{constructor(e){super(e),console.log("lookup type 1")}},qWe=class extends Yf{constructor(e){super(e),console.log("lookup type 2")}},KWe=class extends Yf{constructor(e){super(e),console.log("lookup type 3")}},ZWe=class extends Yf{constructor(e){super(e),console.log("lookup type 4")}},XWe=class extends Yf{constructor(e){super(e),console.log("lookup type 5")}},QWe=class extends Yf{constructor(e){super(e),console.log("lookup type 6")}},JWe=class extends Yf{constructor(e){super(e),console.log("lookup type 7")}},$We=class extends Yf{constructor(e){super(e),console.log("lookup type 8")}},eGe=class extends Yf{constructor(e){super(e),console.log("lookup type 9")}},tGe={buildSubtable:function(e,t){let r=new[void 0,YWe,qWe,KWe,ZWe,XWe,QWe,JWe,$We,eGe][e](t);return r.type=e,r}},ape=class extends yo{static EMPTY={lookupCount:0,lookups:[]};constructor(e){super(e),this.lookupCount=e.uint16,this.lookups=[...new Array(this.lookupCount)].map(t=>e.Offset16)}},rGe=class extends yo{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(r=>e.Offset16),this.markFilteringSet=e.uint16}get rightToLeft(){return this.lookupFlag&!0}get ignoreBaseGlyphs(){return this.lookupFlag&!0}get ignoreLigatures(){return this.lookupFlag&!0}get ignoreMarks(){return this.lookupFlag&!0}get useMarkFilteringSet(){return this.lookupFlag&!0}get markAttachmentType(){return this.lookupFlag&!0}getSubTable(e){let t=this.ctType==="GSUB"?GWe:tGe;return this.parser.currentPosition=this.start+this.subtableOffsets[e],t.buildSubtable(this.lookupType,this.parser)}},ppe=class extends vt{constructor(e,t,r){let{p:o,tableStart:n}=super(e,t,r);this.majorVersion=o.uint16,this.minorVersion=o.uint16,this.scriptListOffset=o.Offset16,this.featureListOffset=o.Offset16,this.lookupListOffset=o.Offset16,this.majorVersion===1&&this.minorVersion===1&&(this.featureVariationsOffset=o.Offset32);let i=!(this.scriptListOffset||this.featureListOffset||this.lookupListOffset);Ve(this,"scriptList",()=>i?npe.EMPTY:(o.currentPosition=n+this.scriptListOffset,new npe(o))),Ve(this,"featureList",()=>i?spe.EMPTY:(o.currentPosition=n+this.featureListOffset,new spe(o))),Ve(this,"lookupList",()=>i?ape.EMPTY:(o.currentPosition=n+this.lookupListOffset,new ape(o))),this.featureVariationsOffset&&Ve(this,"featureVariations",()=>i?FeatureVariations.EMPTY:(o.currentPosition=n+this.featureVariationsOffset,new FeatureVariations(o)))}getSupportedScripts(){return this.scriptList.scriptRecords.map(e=>e.scriptTag)}getScriptTable(e){let t=this.scriptList.scriptRecords.find(o=>o.scriptTag===e);this.parser.currentPosition=this.scriptList.start+t.scriptOffset;let r=new yWe(this.parser);return r.scriptTag=e,r}ensureScriptTable(e){return typeof e=="string"?this.getScriptTable(e):e}getSupportedLangSys(e){e=this.ensureScriptTable(e);let t=e.defaultLangSys!==0,r=e.langSysRecords.map(o=>o.langSysTag);return t&&r.unshift("dflt"),r}getDefaultLangSysTable(e){e=this.ensureScriptTable(e);let t=e.defaultLangSys;if(t!==0){this.parser.currentPosition=e.start+t;let r=new ipe(this.parser);return r.langSysTag="",r.defaultForScript=e.scriptTag,r}}getLangSysTable(e,t="dflt"){if(t==="dflt")return this.getDefaultLangSysTable(e);e=this.ensureScriptTable(e);let r=e.langSysRecords.find(n=>n.langSysTag===t);this.parser.currentPosition=e.start+r.langSysOffset;let o=new ipe(this.parser);return o.langSysTag=t,o}getFeatures(e){return e.featureIndices.map(t=>this.getFeature(t))}getFeature(e){let t;if(parseInt(e)==e?t=this.featureList.featureRecords[e]:t=this.featureList.featureRecords.find(o=>o.featureTag===e),!t)return;this.parser.currentPosition=this.featureList.start+t.featureOffset;let r=new _We(this.parser);return r.featureTag=t.featureTag,r}getLookups(e){return e.lookupListIndices.map(t=>this.getLookup(t))}getLookup(e,t){let r=this.lookupList.lookups[e];return this.parser.currentPosition=this.lookupList.start+r,new rGe(this.parser,t)}},oGe=class extends ppe{constructor(e,t){super(e,t,"GSUB")}getLookup(e){return super.getLookup(e,"GSUB")}},nGe=Object.freeze({__proto__:null,GSUB:oGe}),iGe=class extends ppe{constructor(e,t){super(e,t,"GPOS")}getLookup(e){return super.getLookup(e,"GPOS")}},sGe=Object.freeze({__proto__:null,GPOS:iGe}),aGe=class extends vt{constructor(e,t){let{p:r}=super(e,t);this.version=r.uint16,this.offsetToSVGDocumentList=r.Offset32,r.currentPosition=this.tableStart+this.offsetToSVGDocumentList,this.documentList=new lGe(r)}},lGe=class extends yo{constructor(e){super(e),this.numEntries=e.uint16,this.documentRecords=[...new Array(this.numEntries)].map(t=>new cGe(e))}getDocument(e){let t=this.documentRecords[e];if(!t)return"";let r=this.start+t.svgDocOffset;return this.parser.currentPosition=r,this.parser.readBytes(t.svgDocLength)}getDocumentForGlyph(e){let t=this.documentRecords.findIndex(r=>r.startGlyphID<=e&&e<=r.endGlyphID);return t===-1?"":this.getDocument(t)}},cGe=class{constructor(e){this.startGlyphID=e.uint16,this.endGlyphID=e.uint16,this.svgDocOffset=e.Offset32,this.svgDocLength=e.uint32}},uGe=Object.freeze({__proto__:null,SVG:aGe}),dGe=class extends vt{constructor(e,t){let{p:r}=super(e,t);this.majorVersion=r.uint16,this.minorVersion=r.uint16,this.axesArrayOffset=r.Offset16,r.uint16,this.axisCount=r.uint16,this.axisSize=r.uint16,this.instanceCount=r.uint16,this.instanceSize=r.uint16;let o=this.tableStart+this.axesArrayOffset;Ve(this,"axes",()=>(r.currentPosition=o,[...new Array(this.axisCount)].map(i=>new fGe(r))));let n=o+this.axisCount*this.axisSize;Ve(this,"instances",()=>{let i=[];for(let s=0;s<this.instanceCount;s++)r.currentPosition=n+s*this.instanceSize,i.push(new mGe(r,this.axisCount,this.instanceSize));return i})}getSupportedAxes(){return this.axes.map(e=>e.tag)}getAxis(e){return this.axes.find(t=>t.tag===e)}},fGe=class{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}},mGe=class{constructor(e,t,r){let o=e.currentPosition;this.subfamilyNameID=e.uint16,e.uint16,this.coordinates=[...new Array(t)].map(n=>e.fixed),e.currentPosition-o<r&&(this.postScriptNameID=e.uint16)}},pGe=Object.freeze({__proto__:null,fvar:dGe}),hGe=class extends vt{constructor(e,t){let{p:r}=super(e,t),o=e.length/2;Ve(this,"items",()=>[...new Array(o)].map(n=>r.fword))}},gGe=Object.freeze({__proto__:null,cvt:hGe}),vGe=class extends vt{constructor(e,t){let{p:r}=super(e,t);Ve(this,"instructions",()=>[...new Array(e.length)].map(o=>r.uint8))}},bGe=Object.freeze({__proto__:null,fpgm:vGe}),yGe=class extends vt{constructor(e,t){let{p:r}=super(e,t);this.version=r.uint16,this.numRanges=r.uint16,Ve(this,"gaspRanges",()=>[...new Array(this.numRanges)].map(n=>new wGe(r)))}},wGe=class{constructor(e){this.rangeMaxPPEM=e.uint16,this.rangeGaspBehavior=e.uint16}},SGe=Object.freeze({__proto__:null,gasp:yGe}),_Ge=class extends vt{constructor(e,t){super(e,t)}getGlyphData(e,t){return this.parser.currentPosition=this.tableStart+e,this.parser.readBytes(t)}},xGe=Object.freeze({__proto__:null,glyf:_Ge}),CGe=class extends vt{constructor(e,t,r){let{p:o}=super(e,t),n=r.maxp.numGlyphs+1;r.head.indexToLocFormat===0?(this.x2=!0,Ve(this,"offsets",()=>[...new Array(n)].map(i=>o.Offset16))):Ve(this,"offsets",()=>[...new Array(n)].map(i=>o.Offset32))}getGlyphDataOffsetAndLength(e){let t=this.offsets[e]*this.x2?2:1,r=this.offsets[e+1]*this.x2?2:1;return{offset:t,length:r-t}}},TGe=Object.freeze({__proto__:null,loca:CGe}),EGe=class extends vt{constructor(e,t){let{p:r}=super(e,t);Ve(this,"instructions",()=>[...new Array(e.length)].map(o=>r.uint8))}},PGe=Object.freeze({__proto__:null,prep:EGe}),kGe=class extends vt{constructor(e,t){let{p:r}=super(e,t);Ve(this,"data",()=>r.readBytes())}},RGe=Object.freeze({__proto__:null,CFF:kGe}),AGe=class extends vt{constructor(e,t){let{p:r}=super(e,t);Ve(this,"data",()=>r.readBytes())}},IGe=Object.freeze({__proto__:null,CFF2:AGe}),OGe=class extends vt{constructor(e,t){let{p:r}=super(e,t);this.majorVersion=r.uint16,this.minorVersion=r.uint16,this.defaultVertOriginY=r.int16,this.numVertOriginYMetrics=r.uint16,Ve(this,"vertORiginYMetrics",()=>[...new Array(this.numVertOriginYMetrics)].map(o=>new NGe(r)))}},NGe=class{constructor(e){this.glyphIndex=e.uint16,this.vertOriginY=e.int16}},MGe=Object.freeze({__proto__:null,VORG:OGe}),FGe=class{constructor(e){this.indexSubTableArrayOffset=e.Offset32,this.indexTablesSize=e.uint32,this.numberofIndexSubTables=e.uint32,this.colorRef=e.uint32,this.hori=new j5(e),this.vert=new j5(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}},DGe=class{constructor(e){this.hori=new j5(e),this.vert=new j5(e),this.ppemX=e.uint8,this.ppemY=e.uint8,this.substitutePpemX=e.uint8,this.substitutePpemY=e.uint8}},j5=class{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}},hpe=class extends vt{constructor(e,t,r){let{p:o}=super(e,t,r);this.majorVersion=o.uint16,this.minorVersion=o.uint16,this.numSizes=o.uint32,Ve(this,"bitMapSizes",()=>[...new Array(this.numSizes)].map(n=>new FGe(o)))}},LGe=Object.freeze({__proto__:null,EBLC:hpe}),gpe=class extends vt{constructor(e,t,r){let{p:o}=super(e,t,r);this.majorVersion=o.uint16,this.minorVersion=o.uint16}},BGe=Object.freeze({__proto__:null,EBDT:gpe}),VGe=class extends vt{constructor(e,t){let{p:r}=super(e,t);this.majorVersion=r.uint16,this.minorVersion=r.uint16,this.numSizes=r.uint32,Ve(this,"bitmapScales",()=>[...new Array(this.numSizes)].map(o=>new DGe(r)))}},jGe=Object.freeze({__proto__:null,EBSC:VGe}),zGe=class extends hpe{constructor(e,t){super(e,t,"CBLC")}},HGe=Object.freeze({__proto__:null,CBLC:zGe}),UGe=class extends gpe{constructor(e,t){super(e,t,"CBDT")}},WGe=Object.freeze({__proto__:null,CBDT:UGe}),GGe=class extends vt{constructor(e,t){let{p:r}=super(e,t);this.version=r.uint16,this.flags=r.flags(16),this.numStrikes=r.uint32,Ve(this,"strikeOffsets",()=>[...new Array(this.numStrikes)].map(o=>r.Offset32))}},YGe=Object.freeze({__proto__:null,sbix:GGe}),qGe=class extends vt{constructor(e,t){let{p:r}=super(e,t);this.version=r.uint16,this.numBaseGlyphRecords=r.uint16,this.baseGlyphRecordsOffset=r.Offset32,this.layerRecordsOffset=r.Offset32,this.numLayerRecords=r.uint16}getBaseGlyphRecord(e){let t=this.tableStart+this.baseGlyphRecordsOffset;this.parser.currentPosition=t;let r=new mH(this.parser),o=r.gID,n=this.tableStart+this.layerRecordsOffset-6;this.parser.currentPosition=n;let i=new mH(this.parser),s=i.gID;if(o===e)return r;if(s===e)return i;for(;t!==n;){let l=t+(n-t)/12;this.parser.currentPosition=l;let c=new mH(this.parser),u=c.gID;if(u===e)return c;u>e?n=l:u<e&&(t=l)}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(r=>new KGe(p))}},mH=class{constructor(e){this.gID=e.uint16,this.firstLayerIndex=e.uint16,this.numLayers=e.uint16}},KGe=class{constructor(e){this.gID=e.uint16,this.paletteIndex=e.uint16}},ZGe=Object.freeze({__proto__:null,COLR:qGe}),XGe=class extends vt{constructor(e,t){let{p:r}=super(e,t);this.version=r.uint16,this.numPaletteEntries=r.uint16;let o=this.numPalettes=r.uint16;this.numColorRecords=r.uint16,this.offsetFirstColorRecord=r.Offset32,this.colorRecordIndices=[...new Array(this.numPalettes)].map(n=>r.uint16),Ve(this,"colorRecords",()=>(r.currentPosition=this.tableStart+this.offsetFirstColorRecord,[...new Array(this.numColorRecords)].map(n=>new QGe(r)))),this.version===1&&(this.offsetPaletteTypeArray=r.Offset32,this.offsetPaletteLabelArray=r.Offset32,this.offsetPaletteEntryLabelArray=r.Offset32,Ve(this,"paletteTypeArray",()=>(r.currentPosition=this.tableStart+this.offsetPaletteTypeArray,new JGe(r,o))),Ve(this,"paletteLabelArray",()=>(r.currentPosition=this.tableStart+this.offsetPaletteLabelArray,new $Ge(r,o))),Ve(this,"paletteEntryLabelArray",()=>(r.currentPosition=this.tableStart+this.offsetPaletteEntryLabelArray,new eYe(r,o))))}},QGe=class{constructor(e){this.blue=e.uint8,this.green=e.uint8,this.red=e.uint8,this.alpha=e.uint8}},JGe=class{constructor(e,t){this.paletteTypes=[...new Array(t)].map(r=>e.uint32)}},$Ge=class{constructor(e,t){this.paletteLabels=[...new Array(t)].map(r=>e.uint16)}},eYe=class{constructor(e,t){this.paletteEntryLabels=[...new Array(t)].map(r=>e.uint16)}},tYe=Object.freeze({__proto__:null,CPAL:XGe}),rYe=class extends vt{constructor(e,t){let{p:r}=super(e,t);this.version=r.uint32,this.numSignatures=r.uint16,this.flags=r.uint16,this.signatureRecords=[...new Array(this.numSignatures)].map(o=>new oYe(r))}getData(e){let t=this.signatureRecords[e];return this.parser.currentPosition=this.tableStart+t.offset,new nYe(this.parser)}},oYe=class{constructor(e){this.format=e.uint32,this.length=e.uint32,this.offset=e.Offset32}},nYe=class{constructor(e){e.uint16,e.uint16,this.signatureLength=e.uint32,this.signature=e.readBytes(this.signatureLength)}},iYe=Object.freeze({__proto__:null,DSIG:rYe}),sYe=class extends vt{constructor(e,t,r){let{p:o}=super(e,t),n=r.hmtx.numGlyphs;this.version=o.uint16,this.numRecords=o.int16,this.sizeDeviceRecord=o.int32,this.records=[...new Array(numRecords)].map(i=>new aYe(o,n))}},aYe=class{constructor(e,t){this.pixelSize=e.uint8,this.maxWidth=e.uint8,this.widths=e.readBytes(t)}},lYe=Object.freeze({__proto__:null,hdmx:sYe}),cYe=class extends vt{constructor(e,t){let{p:r}=super(e,t);this.version=r.uint16,this.nTables=r.uint16,Ve(this,"tables",()=>{let o=this.tableStart+4,n=[];for(let i=0;i<this.nTables;i++){r.currentPosition=o;let s=new uYe(r);n.push(s),o+=s}return n})}},uYe=class{constructor(e){this.version=e.uint16,this.length=e.uint16,this.coverage=e.flags(8),this.format=e.uint8,this.format===0&&(this.nPairs=e.uint16,this.searchRange=e.uint16,this.entrySelector=e.uint16,this.rangeShift=e.uint16,Ve(this,"pairs",()=>[...new Array(this.nPairs)].map(t=>new dYe(e)))),this.format===2&&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]}},dYe=class{constructor(e){this.left=e.uint16,this.right=e.uint16,this.value=e.fword}},fYe=Object.freeze({__proto__:null,kern:cYe}),mYe=class extends vt{constructor(e,t){let{p:r}=super(e,t);this.version=r.uint16,this.numGlyphs=r.uint16,this.yPels=r.readBytes(this.numGlyphs)}},pYe=Object.freeze({__proto__:null,LTSH:mYe}),hYe=class extends vt{constructor(e,t){let{p:r}=super(e,t);this.version=r.uint16,this.mergeClassCount=r.uint16,this.mergeDataOffset=r.Offset16,this.classDefCount=r.uint16,this.offsetToClassDefOffsets=r.Offset16,Ve(this,"mergeEntryMatrix",()=>[...new Array(this.mergeClassCount)].map(o=>r.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.")}},gYe=Object.freeze({__proto__:null,MERG:hYe}),vYe=class extends vt{constructor(e,t){let{p:r}=super(e,t);this.version=r.uint32,this.flags=r.uint32,r.uint32,this.dataMapsCount=r.uint32,this.dataMaps=[...new Array(this.dataMapsCount)].map(o=>new bYe(this.tableStart,r))}},bYe=class{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)}},yYe=Object.freeze({__proto__:null,meta:vYe}),wYe=class extends vt{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.")}},SYe=Object.freeze({__proto__:null,PCLT:wYe}),_Ye=class extends vt{constructor(e,t){let{p:r}=super(e,t);this.version=r.uint16,this.numRecs=r.uint16,this.numRatios=r.uint16,this.ratRanges=[...new Array(this.numRatios)].map(o=>new xYe(r)),this.offsets=[...new Array(this.numRatios)].map(o=>r.Offset16),this.VDMXGroups=[...new Array(this.numRecs)].map(o=>new CYe(r))}},xYe=class{constructor(e){this.bCharSet=e.uint8,this.xRatio=e.uint8,this.yStartRatio=e.uint8,this.yEndRatio=e.uint8}},CYe=class{constructor(e){this.recs=e.uint16,this.startsz=e.uint8,this.endsz=e.uint8,this.records=[...new Array(this.recs)].map(t=>new TYe(e))}},TYe=class{constructor(e){this.yPelHeight=e.uint16,this.yMax=e.int16,this.yMin=e.int16}},EYe=Object.freeze({__proto__:null,VDMX:_Ye}),PYe=class extends vt{constructor(e,t){let{p:r}=super(e,t);this.version=r.fixed,this.ascent=this.vertTypoAscender=r.int16,this.descent=this.vertTypoDescender=r.int16,this.lineGap=this.vertTypoLineGap=r.int16,this.advanceHeightMax=r.int16,this.minTopSideBearing=r.int16,this.minBottomSideBearing=r.int16,this.yMaxExtent=r.int16,this.caretSlopeRise=r.int16,this.caretSlopeRun=r.int16,this.caretOffset=r.int16,this.reserved=r.int16,this.reserved=r.int16,this.reserved=r.int16,this.reserved=r.int16,this.metricDataFormat=r.int16,this.numOfLongVerMetrics=r.uint16,r.verifyLength()}},kYe=Object.freeze({__proto__:null,vhea:PYe}),RYe=class extends vt{constructor(e,t,r){super(e,t);let o=r.vhea.numOfLongVerMetrics,n=r.maxp.numGlyphs,i=p.currentPosition;if(lazy(this,"vMetrics",()=>(p.currentPosition=i,[...new Array(o)].map(s=>new AYe(p.uint16,p.int16)))),o<n){let s=i+o*4;lazy(this,"topSideBearings",()=>(p.currentPosition=s,[...new Array(n-o)].map(l=>p.int16)))}}},AYe=class{constructor(e,t){this.advanceHeight=e,this.topSideBearing=t}},IYe=Object.freeze({__proto__:null,vmtx:RYe});var vpe=a(W(),1);var{kebabCase:OYe}=Tt(vpe.privateApis);function bpe(e){let t=e.reduce((r,o)=>(r[o.fontFamily]||(r[o.fontFamily]={name:o.fontFamily,fontFamily:o.fontFamily,slug:OYe(o.fontFamily.toLowerCase()),fontFace:[]}),r[o.fontFamily].fontFace.push(o),r),{});return Object.values(t)}var ya=a(T(),1);function NYe(){let{installFonts:e}=(0,uT.useContext)(mi),[t,r]=(0,uT.useState)(!1),[o,n]=(0,uT.useState)(null),i=h=>{l(h)},s=h=>{l(h.target.files)},l=async h=>{if(!h)return;n(null),r(!0);let g=new Set,v=[...h],b=!1,S=v.map(async w=>{if(!await u(w))return b=!0,null;if(g.has(w.name))return null;let x=(((w.name??"").split(".")??[]).pop()??"").toLowerCase();return lH.includes(x)?(g.add(w.name),w):null}),y=(await Promise.all(S)).filter(w=>w!==null);if(y.length>0)c(y);else{let w=b?(0,Iw.__)("Sorry, you are not allowed to upload this file type."):(0,Iw.__)("No fonts found to install.");n({type:"error",message:w}),r(!1)}},c=async h=>{let g=await Promise.all(h.map(async v=>{let b=await f(v);return await gh(b,b.file,"all"),b}));m(g)};async function u(h){let g=new z5("Uploaded Font");try{let v=await d(h);return await g.fromDataBuffer(v,"font"),!0}catch{return!1}}async function d(h){return new Promise((g,v)=>{let b=new window.FileReader;b.readAsArrayBuffer(h),b.onload=()=>g(b.result),b.onerror=v})}let f=async h=>{let g=await d(h),v=new z5("Uploaded Font");v.fromDataBuffer(g,h.name);let S=(await new Promise(C=>v.onload=C)).detail.font,{name:y}=S.opentype.tables,w=y.get(16)||y.get(1),_=y.get(2).toLowerCase().includes("italic"),x=S.opentype.tables["OS/2"].usWeightClass||"normal",O=!!S.opentype.tables.fvar&&S.opentype.tables.fvar.axes.find(({tag:C})=>C==="wght"),A=O?`${O.minValue} ${O.maxValue}`:null;return{file:h,fontFamily:w,fontStyle:_?"italic":"normal",fontWeight:A||x}},m=async h=>{let g=bpe(h);try{await e(g),n({type:"success",message:(0,Iw.__)("Fonts were installed successfully.")})}catch(v){let b=v;n({type:"error",message:b.message,errors:b?.installationErrors})}r(!1)};return(0,ya.jsxs)("div",{className:"font-library__tabpanel-layout",children:[(0,ya.jsx)(Gi.DropZone,{onFilesDrop:i}),(0,ya.jsxs)(Gi.__experimentalVStack,{className:"font-library__local-fonts",justify:"start",children:[o&&(0,ya.jsxs)(Gi.Notice,{status:o.type,__unstableHTML:!0,onRemove:()=>n(null),children:[o.message,o.errors&&(0,ya.jsx)("ul",{children:o.errors.map((h,g)=>(0,ya.jsx)("li",{children:h},g))})]}),t&&(0,ya.jsx)(Gi.FlexItem,{children:(0,ya.jsx)("div",{className:"font-library__upload-area",children:(0,ya.jsx)(Gi.ProgressBar,{})})}),!t&&(0,ya.jsx)(Gi.FormFileUpload,{accept:lH.map(h=>`.${h}`).join(","),multiple:!0,onChange:s,render:({openFileDialog:h})=>(0,ya.jsx)(Gi.Button,{__next40pxDefaultSize:!0,className:"font-library__upload-area",onClick:h,children:(0,Iw.__)("Upload font")})}),(0,ya.jsx)(Gi.__experimentalText,{className:"font-library__upload-area__text",children:(0,Iw.__)("Uploaded fonts appear in your library and can be used in your theme. Supported formats: .ttf, .otf, .woff, and .woff2.")})]})]})}var H5=NYe;var Vc=a(T(),1),{Tabs:U5}=Tt(W5.privateApis),MYe={id:"installed-fonts",title:(0,Ow._x)("Library","Font library")},FYe={id:"upload-fonts",title:(0,Ow._x)("Upload","noun")},DYe=e=>e.map(({slug:t,name:r})=>({id:t,title:e.length===1&&t==="google-fonts"?(0,Ow.__)("Install Fonts"):r}));function LYe({onRequestClose:e,defaultTabId:t="installed-fonts"}){let{records:r=[]}=(0,G5.useEntityRecords)("root","fontCollection",{_fields:"slug,name,description"}),o=(0,ype.useSelect)(i=>i(G5.store).canUser("create",{kind:"postType",name:"wp_font_family"}),[]),n=[MYe];return o&&(n.push(FYe),n.push(...DYe(r||[]))),(0,Vc.jsx)(W5.Modal,{title:(0,Ow.__)("Fonts"),onRequestClose:e,isFullScreen:!0,className:"font-library-modal",children:(0,Vc.jsxs)(U5,{defaultTabId:t,children:[(0,Vc.jsx)("div",{className:"font-library-modal__tablist-container",children:(0,Vc.jsx)(U5.TabList,{children:n.map(({id:i,title:s})=>(0,Vc.jsx)(U5.Tab,{tabId:i,children:s},i))})}),n.map(({id:i})=>{let s;switch(i){case"upload-fonts":s=(0,Vc.jsx)(H5,{});break;case"installed-fonts":s=(0,Vc.jsx)(N5,{});break;default:s=(0,Vc.jsx)(F5,{slug:i})}return(0,Vc.jsx)(U5.TabPanel,{tabId:i,focusable:!1,className:"font-library-modal__tab-panel",children:s},i)})]})})}var wpe=LYe;var Y5=a(V(),1),ab=a(W(),1),Spe=a(H(),1);var Nw=a(T(),1);function BYe({font:e}){let{handleSetLibraryFontSelected:t,setModalTabOpen:r}=(0,Spe.useContext)(mi),o=e?.fontFace?.length||1,n=()=>{t?.(e),r?.("installed-fonts")},i=Jv(e);return(0,Nw.jsx)(ab.__experimentalItem,{onClick:n,children:(0,Nw.jsxs)(ab.__experimentalHStack,{justify:"space-between",children:[(0,Nw.jsx)(ab.FlexItem,{style:i,children:e.name}),(0,Nw.jsx)(ab.FlexItem,{className:"global-styles-ui-screen-typography__font-variants-count",children:(0,Y5.sprintf)((0,Y5._n)("%d variant","%d variants",o),o)})]})})}var _pe=BYe;var cn=a(T(),1);function xpe(e,t){return e?e.map(r=>Uf(r,{source:t})):[]}function VYe(){let{baseCustomFonts:e,modalTabOpen:t,setModalTabOpen:r}=(0,Cpe.useContext)(mi),[o]=Oe("typography.fontFamilies"),[n]=Oe("typography.fontFamilies",void 0,"base"),i=xpe(o?.theme,"theme"),s=xpe(o?.custom,"custom"),l=[...i,...s].sort((d,f)=>d.name.localeCompare(f.name)),c=0<l.length,u=c||n?.theme?.length>0||(e?.length??0)>0;return(0,cn.jsxs)(cn.Fragment,{children:[!!t&&(0,cn.jsx)(wpe,{onRequestClose:()=>r?.(""),defaultTabId:t}),(0,cn.jsxs)(jc.__experimentalVStack,{spacing:2,children:[(0,cn.jsxs)(jc.__experimentalHStack,{justify:"space-between",children:[(0,cn.jsx)(Do,{level:3,children:(0,lb.__)("Fonts")}),(0,cn.jsx)(jc.Button,{onClick:()=>r?.("installed-fonts"),label:(0,lb.__)("Manage fonts"),icon:UL,size:"small"})]}),l.length>0&&(0,cn.jsx)(cn.Fragment,{children:(0,cn.jsx)(jc.__experimentalItemGroup,{size:"large",isBordered:!0,isSeparated:!0,children:l.map(d=>(0,cn.jsx)(_pe,{font:d},d.slug))})}),!c&&(0,cn.jsxs)(cn.Fragment,{children:[(0,cn.jsx)(jc.__experimentalText,{as:"p",children:u?(0,lb.__)("No fonts activated."):(0,lb.__)("No fonts installed.")}),(0,cn.jsx)(jc.Button,{className:"global-styles-ui-font-families__manage-fonts",variant:"secondary",__next40pxDefaultSize:!0,onClick:()=>{r?.(u?"installed-fonts":"upload-fonts")},children:u?(0,lb.__)("Manage fonts"):(0,lb.__)("Add fonts")})]})]})]})}function Tpe({...e}){return(0,cn.jsx)(P5,{children:(0,cn.jsx)(VYe,{...e})})}var dT=a(V(),1),qf=a(W(),1);var pd=a(T(),1);function jYe(){return(0,pd.jsxs)(qf.__experimentalVStack,{spacing:2,children:[(0,pd.jsx)(qf.__experimentalHStack,{justify:"space-between",children:(0,pd.jsx)(Do,{level:3,children:(0,dT.__)("Font Sizes")})}),(0,pd.jsx)(qf.__experimentalItemGroup,{isBordered:!0,isSeparated:!0,children:(0,pd.jsx)(vo,{path:"/typography/font-sizes",children:(0,pd.jsxs)(qf.__experimentalHStack,{direction:"row",children:[(0,pd.jsx)(qf.FlexItem,{children:(0,dT.__)("Font size presets")}),(0,pd.jsx)(hn,{icon:(0,dT.isRTL)()?xr:Cr})]})})})]})}var Epe=jYe;var zl=a(T(),1);function zYe(){let{fontLibraryEnabled:e}=(0,kpe.useContext)(Qo);return(0,zl.jsxs)(zl.Fragment,{children:[(0,zl.jsx)(ir,{title:(0,q5.__)("Typography"),description:(0,q5.__)("Available fonts, typographic styles, and the application of those styles.")}),(0,zl.jsx)(mh,{children:(0,zl.jsxs)(Ppe.__experimentalVStack,{spacing:7,children:[(0,zl.jsx)(Pw,{title:(0,q5.__)("Typesets")}),e&&(0,zl.jsx)(Tpe,{}),(0,zl.jsx)(gme,{}),(0,zl.jsx)(Epe,{})]})})]})}var Rpe=zYe;var kr=a(V(),1),ol=a(W(),1),Dpe=a(H(),1);var Ape=a(pe(),1);var Ipe=a(T(),1),{useSettingsForBlockElement:HYe,TypographyPanel:UYe}=Tt(Ape.privateApis);function Ope({element:e,headingLevel:t}){let r=[];e==="heading"?r=r.concat(["elements",t]):e&&e!=="text"&&(r=r.concat(["elements",e]));let o=r.join("."),[n]=Ue(o,"","user",!1),[i,s]=Ue(o,"","merged",!1),[l]=Oe(""),u=HYe(l,void 0,e==="heading"?t:e);return(0,Ipe.jsx)(UYe,{inheritedValue:i,value:n,onChange:s,settings:u})}var Npe=a(T(),1);function Mpe({name:e,element:t,headingLevel:r}){let o="";t==="heading"?o=`elements.${r}.`:t&&t!=="text"&&(o=`elements.${t}.`);let[n]=Ue(o+"typography.fontFamily",e),[i]=Ue(o+"color.gradient",e),[s]=Ue(o+"color.background",e),[l]=Ue("color.background"),[c]=Ue(o+"color.text",e),[u]=Ue(o+"typography.fontSize",e),[d]=Ue(o+"typography.fontStyle",e),[f]=Ue(o+"typography.fontWeight",e),[m]=Ue(o+"typography.letterSpacing",e);return(0,Npe.jsx)("div",{className:"global-styles-ui-typography-preview",style:{fontFamily:n??"serif",background:i??s??l,color:c,fontSize:u,fontStyle:d,fontWeight:f,letterSpacing:m,...t==="link"?{textDecoration:"underline"}:{}},children:"Aa"})}var Kn=a(T(),1),Fpe={text:{description:(0,kr.__)("Manage the fonts used on the site."),title:(0,kr.__)("Text")},link:{description:(0,kr.__)("Manage the fonts and typography used on the links."),title:(0,kr.__)("Links")},heading:{description:(0,kr.__)("Manage the fonts and typography used on headings."),title:(0,kr.__)("Headings")},caption:{description:(0,kr.__)("Manage the fonts and typography used on captions."),title:(0,kr.__)("Captions")},button:{description:(0,kr.__)("Manage the fonts and typography used on buttons."),title:(0,kr.__)("Buttons")}};function WYe({element:e}){let[t,r]=(0,Dpe.useState)("heading");return(0,Kn.jsxs)(Kn.Fragment,{children:[(0,Kn.jsx)(ir,{title:Fpe[e].title,description:Fpe[e].description}),(0,Kn.jsx)(ol.__experimentalSpacer,{marginX:4,children:(0,Kn.jsx)(Mpe,{element:e,headingLevel:t})}),e==="heading"&&(0,Kn.jsx)(ol.__experimentalSpacer,{marginX:4,marginBottom:"1em",children:(0,Kn.jsxs)(ol.__experimentalToggleGroupControl,{label:(0,kr.__)("Select heading level"),hideLabelFromVision:!0,value:t,onChange:o=>r(o),isBlock:!0,size:"__unstable-large",children:[(0,Kn.jsx)(ol.__experimentalToggleGroupControlOption,{value:"heading",showTooltip:!0,"aria-label":(0,kr.__)("All headings"),label:(0,kr._x)("All","heading levels")}),(0,Kn.jsx)(ol.__experimentalToggleGroupControlOption,{value:"h1",showTooltip:!0,"aria-label":(0,kr.__)("Heading 1"),label:(0,kr.__)("H1")}),(0,Kn.jsx)(ol.__experimentalToggleGroupControlOption,{value:"h2",showTooltip:!0,"aria-label":(0,kr.__)("Heading 2"),label:(0,kr.__)("H2")}),(0,Kn.jsx)(ol.__experimentalToggleGroupControlOption,{value:"h3",showTooltip:!0,"aria-label":(0,kr.__)("Heading 3"),label:(0,kr.__)("H3")}),(0,Kn.jsx)(ol.__experimentalToggleGroupControlOption,{value:"h4",showTooltip:!0,"aria-label":(0,kr.__)("Heading 4"),label:(0,kr.__)("H4")}),(0,Kn.jsx)(ol.__experimentalToggleGroupControlOption,{value:"h5",showTooltip:!0,"aria-label":(0,kr.__)("Heading 5"),label:(0,kr.__)("H5")}),(0,Kn.jsx)(ol.__experimentalToggleGroupControlOption,{value:"h6",showTooltip:!0,"aria-label":(0,kr.__)("Heading 6"),label:(0,kr.__)("H6")})]})}),(0,Kn.jsx)(Ope,{element:e,headingLevel:t})]})}var Mw=WYe;var hH=a(V(),1),Hpe=a(W(),1),Upe=a(pe(),1);var nl=a(W(),1),Fw=a(V(),1);var jpe=a(H(),1);var Lpe=a(W(),1),Bpe=a(T(),1);function GYe({className:e,children:t,...r}){return(0,Bpe.jsx)(Lpe.Flex,{className:Q("global-styles-ui__color-indicator-wrapper",e),...r,children:t})}var Vpe=GYe;var Yi=a(T(),1),K5=[];function YYe({name:e}){let[t]=Oe("color.palette.custom"),[r]=Oe("color.palette.theme"),[o]=Oe("color.palette.default"),[n]=Oe("color.defaultPalette",e),i=t||K5,s=r||K5,l=o||K5,c=n??!0,u=(0,jpe.useMemo)(()=>[...i,...s,...l&&c?l:K5],[i,s,l,c]),d=e?"/blocks/"+encodeURIComponent(e)+"/colors/palette":"/colors/palette";return(0,Yi.jsxs)(nl.__experimentalVStack,{spacing:3,children:[(0,Yi.jsx)(Do,{level:3,children:(0,Fw.__)("Palette")}),(0,Yi.jsx)(nl.__experimentalItemGroup,{isBordered:!0,isSeparated:!0,children:(0,Yi.jsx)(vo,{path:d,children:(0,Yi.jsxs)(nl.__experimentalHStack,{direction:"row",children:[u.length>0?(0,Yi.jsxs)(Yi.Fragment,{children:[(0,Yi.jsx)(nl.__experimentalZStack,{isLayered:!1,offset:-8,children:u.slice(0,5).map(({color:f},m)=>(0,Yi.jsx)(Vpe,{children:(0,Yi.jsx)(nl.ColorIndicator,{colorValue:f})},`${f}-${m}`))}),(0,Yi.jsx)(nl.FlexItem,{isBlock:!0,children:(0,Fw.__)("Edit palette")})]}):(0,Yi.jsx)(nl.FlexItem,{children:(0,Fw.__)("Add colors")}),(0,Yi.jsx)(hn,{icon:(0,Fw.isRTL)()?xr:Cr})]})})})]})}var zpe=YYe;var hd=a(T(),1),{useSettingsForBlockElement:qYe,ColorPanel:KYe}=Tt(Upe.privateApis);function ZYe(){let[e,t]=Ue("",void 0,"user",!1),[r]=Ue("",void 0,"merged",!1),[o]=Oe(""),n=qYe(o);return(0,hd.jsxs)(hd.Fragment,{children:[(0,hd.jsx)(ir,{title:(0,hH.__)("Colors"),description:(0,hH.__)("Palette colors and the application of those colors on site elements.")}),(0,hd.jsx)(mh,{children:(0,hd.jsx)(Hpe.__experimentalVStack,{spacing:7,children:(0,hd.jsx)(zpe,{})})}),(0,hd.jsx)(KYe,{inheritedValue:r,value:e,onChange:t,settings:n})]})}var Wpe=ZYe;var pT=a(V(),1),$pe=a(W(),1);var Zpe=a(ke(),1),Zf=a(W(),1),Lw=a(V(),1);var X5=a(W(),1);var Z5=a(W(),1);var Gpe=a(T(),1);function Ype(){let{paletteColors:e}=_w();return e.slice(0,4).map(({slug:t,color:r},o)=>(0,Gpe.jsx)("div",{style:{flexGrow:1,height:"100%",background:r}},`${t}-${o}`))}var fT=a(T(),1),XYe={start:{scale:1,opacity:1},hover:{scale:0,opacity:0}},QYe=({label:e,isFocused:t,withHoverView:r})=>(0,fT.jsx)(Cw,{label:e,isFocused:t,withHoverView:r,children:({key:o})=>(0,fT.jsx)(Z5.__unstableMotion.div,{variants:XYe,style:{height:"100%",overflow:"hidden"},children:(0,fT.jsx)(Z5.__experimentalHStack,{spacing:0,justify:"center",style:{height:"100%",overflow:"hidden"},children:(0,fT.jsx)(Ype,{})})},o)}),qpe=QYe;var cb=a(T(),1),Kpe=["color"];function Dw({title:e,gap:t=2}){let r=h5(Kpe);return r?.length<=1?null:(0,cb.jsxs)(X5.__experimentalVStack,{spacing:3,children:[e&&(0,cb.jsx)(Do,{level:3,children:e}),(0,cb.jsx)(X5.__experimentalGrid,{gap:t,children:r.map((o,n)=>(0,cb.jsx)(Ew,{variation:o,isPill:!0,properties:Kpe,showTooltip:!0,children:()=>(0,cb.jsx)(qpe,{})},n))})]})}var Kf=a(T(),1),JYe={placement:"bottom-start",offset:8};function Xpe({name:e}){let[t,r]=Oe("color.palette.theme",e),[o]=Oe("color.palette.theme",e,"base"),[n,i]=Oe("color.palette.default",e),[s]=Oe("color.palette.default",e,"base"),[l,c]=Oe("color.palette.custom",e),[u]=Oe("color.defaultPalette",e),f=(0,Zpe.useViewportMatch)("small","<")?JYe:void 0,[m]=Nfe(e);return(0,Kf.jsxs)(Zf.__experimentalVStack,{className:"global-styles-ui-color-palette-panel",spacing:8,children:[(0,Kf.jsxs)(Zf.__experimentalVStack,{spacing:4,children:[!!t&&!!t.length&&(0,Kf.jsx)(Zf.__experimentalPaletteEdit,{canReset:t!==o,canOnlyChangeValues:!0,colors:t,onChange:r,paletteLabel:(0,Lw.__)("Theme"),paletteLabelHeadingLevel:3,popoverProps:f}),window.__experimentalEnableColorRandomizer&&t?.length>0&&m&&(0,Kf.jsx)(Zf.Button,{__next40pxDefaultSize:!0,variant:"secondary",icon:YL,onClick:m,children:(0,Lw.__)("Randomize colors")})]}),!!n&&!!n.length&&!!u&&(0,Kf.jsx)(Zf.__experimentalPaletteEdit,{canReset:n!==s,canOnlyChangeValues:!0,colors:n,onChange:i,paletteLabel:(0,Lw.__)("Default"),paletteLabelHeadingLevel:3,popoverProps:f}),(0,Kf.jsx)(Zf.__experimentalPaletteEdit,{colors:l,onChange:c,paletteLabel:(0,Lw.__)("Custom"),paletteLabelHeadingLevel:3,slugPrefix:"custom-",popoverProps:f}),(0,Kf.jsx)(Dw,{title:(0,Lw.__)("Palettes")})]})}var Qpe=a(ke(),1),vd=a(W(),1),mT=a(V(),1);var gd=a(T(),1),$Ye={placement:"bottom-start",offset:8},eqe=()=>{};function Jpe({name:e}){let[t,r]=Oe("color.gradients.theme",e),[o]=Oe("color.gradients.theme",e,"base"),[n,i]=Oe("color.gradients.default",e),[s]=Oe("color.gradients.default",e,"base"),[l,c]=Oe("color.gradients.custom",e),[u]=Oe("color.defaultGradients",e),[d]=Oe("color.duotone.custom")||[],[f]=Oe("color.duotone.default")||[],[m]=Oe("color.duotone.theme")||[],[h]=Oe("color.defaultDuotone"),g=[...d||[],...m||[],...f&&h?f:[]],b=(0,Qpe.useViewportMatch)("small","<")?$Ye:void 0;return(0,gd.jsxs)(vd.__experimentalVStack,{className:"global-styles-ui-gradient-palette-panel",spacing:8,children:[!!t&&!!t.length&&(0,gd.jsx)(vd.__experimentalPaletteEdit,{canReset:t!==o,canOnlyChangeValues:!0,gradients:t,onChange:r,paletteLabel:(0,mT.__)("Theme"),paletteLabelHeadingLevel:3,popoverProps:b}),!!n&&!!n.length&&!!u&&(0,gd.jsx)(vd.__experimentalPaletteEdit,{canReset:n!==s,canOnlyChangeValues:!0,gradients:n,onChange:i,paletteLabel:(0,mT.__)("Default"),paletteLabelHeadingLevel:3,popoverProps:b}),(0,gd.jsx)(vd.__experimentalPaletteEdit,{gradients:l,onChange:c,paletteLabel:(0,mT.__)("Custom"),paletteLabelHeadingLevel:3,slugPrefix:"custom-",popoverProps:b}),!!g&&!!g.length&&(0,gd.jsxs)("div",{children:[(0,gd.jsx)(Do,{level:3,children:(0,mT.__)("Duotone")}),(0,gd.jsx)(vd.__experimentalSpacer,{margin:3}),(0,gd.jsx)(vd.DuotonePicker,{duotonePalette:g,disableCustomDuotone:!0,disableCustomColors:!0,clearable:!1,onChange:eqe,colorPalette:[]})]})]})}var wa=a(T(),1),{Tabs:Bw}=Tt($pe.privateApis);function tqe({name:e}){return(0,wa.jsxs)(wa.Fragment,{children:[(0,wa.jsx)(ir,{title:(0,pT.__)("Edit palette"),description:(0,pT.__)("The combination of colors used across the site and in color pickers.")}),(0,wa.jsxs)(Bw,{children:[(0,wa.jsxs)(Bw.TabList,{children:[(0,wa.jsx)(Bw.Tab,{tabId:"color",children:(0,pT.__)("Color")}),(0,wa.jsx)(Bw.Tab,{tabId:"gradient",children:(0,pT.__)("Gradient")})]}),(0,wa.jsx)(Bw.TabPanel,{tabId:"color",focusable:!1,children:(0,wa.jsx)(Xpe,{name:e})}),(0,wa.jsx)(Bw.TabPanel,{tabId:"gradient",focusable:!1,children:(0,wa.jsx)(Jpe,{name:e})})]})]})}var ehe=tqe;var gH=a(V(),1),nhe=a(pe(),1),ihe=a(W(),1);var the=a(pe(),1);var rhe=a(T(),1),rqe={backgroundSize:"auto"},{BackgroundPanel:oqe}=Tt(the.privateApis);function ohe(){let[e]=Ue("",void 0,"user",!1),[t,r]=Ue("",void 0,"merged",!1),[o]=Oe("");return(0,rhe.jsx)(oqe,{inheritedValue:t,value:e,onChange:r,settings:o,defaultValues:rqe})}var yh=a(T(),1),{useHasBackgroundPanel:nqe}=Tt(nhe.privateApis);function iqe(){let[e]=Oe(""),t=nqe(e);return(0,yh.jsxs)(yh.Fragment,{children:[(0,yh.jsx)(ir,{title:(0,gH.__)("Background"),description:(0,yh.jsx)(ihe.__experimentalText,{children:(0,gH.__)("Set styles for the site's background.")})}),t&&(0,yh.jsx)(ohe,{})]})}var she=iqe;var Ki=a(W(),1),qi=a(V(),1);var dhe=a(H(),1);var ahe=a(W(),1),lhe=a(V(),1),che=a(T(),1);function sqe({text:e,confirmButtonText:t,isOpen:r,toggleOpen:o,onConfirm:n}){let i=async()=>{o(),n()},s=()=>{o()};return(0,che.jsx)(ahe.__experimentalConfirmDialog,{isOpen:r,cancelButtonText:(0,lhe.__)("Cancel"),confirmButtonText:t,onCancel:s,onConfirm:i,size:"medium",children:e})}var uhe=sqe;var br=a(T(),1),{Menu:hT}=Tt(Ki.privateApis),bH="6px 6px 9px rgba(0, 0, 0, 0.2)";function fhe(){let[e]=Oe("shadow.presets.default"),[t]=Oe("shadow.defaultPresets"),[r]=Oe("shadow.presets.theme"),[o,n]=Oe("shadow.presets.custom"),i=d=>{n([...o||[],d])},s=()=>{n([])},[l,c]=(0,dhe.useState)(!1),u=()=>c(!l);return(0,br.jsxs)(br.Fragment,{children:[l&&(0,br.jsx)(uhe,{text:(0,qi.__)("Are you sure you want to remove all custom shadows?"),confirmButtonText:(0,qi.__)("Remove"),isOpen:l,toggleOpen:u,onConfirm:s}),(0,br.jsx)(ir,{title:(0,qi.__)("Shadows"),description:(0,qi.__)("Manage and create shadow styles for use across the site.")}),(0,br.jsx)(mh,{children:(0,br.jsxs)(Ki.__experimentalVStack,{className:"global-styles-ui__shadows-panel",spacing:7,children:[t&&(0,br.jsx)(vH,{label:(0,qi.__)("Default"),shadows:e||[],category:"default"}),r&&r.length>0&&(0,br.jsx)(vH,{label:(0,qi.__)("Theme"),shadows:r||[],category:"theme"}),(0,br.jsx)(vH,{label:(0,qi.__)("Custom"),shadows:o||[],category:"custom",canCreate:!0,onCreate:i,onReset:u})]})})]})}function vH({label:e,shadows:t,category:r,canCreate:o,onCreate:n,onReset:i}){let s=()=>{let l=p5(t,"shadow-");n?.({name:(0,qi.sprintf)((0,qi.__)("Shadow %d"),l),shadow:bH,slug:`shadow-${l}`})};return(0,br.jsxs)(Ki.__experimentalVStack,{spacing:2,children:[(0,br.jsxs)(Ki.__experimentalHStack,{justify:"space-between",children:[(0,br.jsx)(Do,{level:3,children:e}),(0,br.jsxs)(Ki.FlexItem,{className:"global-styles-ui__shadows-panel__options-container",children:[o&&(0,br.jsx)(Ki.Button,{size:"small",icon:fc,label:(0,qi.__)("Add shadow"),onClick:()=>{s()}}),!!t?.length&&r==="custom"&&(0,br.jsxs)(hT,{children:[(0,br.jsx)(hT.TriggerButton,{render:(0,br.jsx)(Ki.Button,{size:"small",icon:fo,label:(0,qi.__)("Shadow options")})}),(0,br.jsx)(hT.Popover,{children:(0,br.jsx)(hT.Item,{onClick:i,children:(0,br.jsx)(hT.ItemLabel,{children:(0,qi.__)("Remove all custom shadows")})})})]})]})]}),t.length>0&&(0,br.jsx)(Ki.__experimentalItemGroup,{isBordered:!0,isSeparated:!0,children:t.map(l=>(0,br.jsx)(aqe,{shadow:l,category:r},l.slug))})]})}function aqe({shadow:e,category:t}){return(0,br.jsx)(vo,{path:`/shadows/edit/${t}/${e.slug}`,children:(0,br.jsxs)(Ki.__experimentalHStack,{children:[(0,br.jsx)(Ki.FlexItem,{children:e.name}),(0,br.jsx)(hn,{icon:(0,qi.isRTL)()?xr:Cr})]})})}var it=a(W(),1),Dr=a(V(),1);var il=a(H(),1);function mhe(e){return(e.match(/(?:[^,(]|\([^)]*\))+/g)||[]).map(r=>r.trim())}function phe(e){let t={x:"0",y:"0",blur:"0",spread:"0",color:"#000",inset:!1};if(!e||e.includes("none"))return t;let r=/((?:^|\s+)(-?\d*\.?\d+(?:px|%|in|cm|mm|em|rem|ex|pt|pc|vh|vw|vmin|vmax|ch|lh)?)(?=\s|$)(?![^(]*\))){1,4}/g,o=e.match(r)||[];if(o.length!==1)return t;let n=o[0].split(" ").map(g=>g.trim()).filter(g=>g);if(n.length<2)return t;let i=e.match(/inset/gi)||[];if(i.length>1)return t;let s=i.length===1,l=e.replace(r,"").trim();s&&(l=l.replace("inset","").replace("INSET","").trim());let c=/^#([0-9a-f]{3}){1,2}$|^#([0-9a-f]{4}){1,2}$|^(?:rgb|hsl)a?\(?[\d*\.?\d+%?,?\/?\s]*\)$/gi,u=(l.match(c)||[]).map(g=>g?.trim()).filter(g=>g);if(u.length>1)return t;if(u.length===0&&(u=l.trim().split(" ").filter(g=>g),u.length>1))return t;let[d,f,m,h]=n;return{x:d,y:f,blur:m||t.blur,spread:h||t.spread,inset:s,color:l||t.color}}function hhe(e){let t=`${e.x||"0px"} ${e.y||"0px"} ${e.blur||"0px"} ${e.spread||"0px"}`;return`${e.inset?"inset":""} ${t} ${e.color||""}`.trim()}var He=a(T(),1),{Menu:gT}=Tt(it.privateApis),lqe=[{label:(0,Dr.__)("Rename"),action:"rename"},{label:(0,Dr.__)("Delete"),action:"delete"}],cqe=[{label:(0,Dr.__)("Reset"),action:"reset"}];function ghe(){let{goBack:e,params:t}=(0,it.useNavigator)(),{category:r,slug:o}=t,[n,i]=Oe(`shadow.presets.${r}`);(0,il.useEffect)(()=>{let _=n?.some(x=>x.slug===o);o&&!_&&e()},[n,o,e]);let[s]=Oe(`shadow.presets.${r}`,void 0,"base"),[l,c]=(0,il.useState)(()=>(n||[]).find(_=>_.slug===o)),u=(0,il.useMemo)(()=>(s||[]).find(_=>_.slug===o),[s,o]),[d,f]=(0,il.useState)(!1),[m,h]=(0,il.useState)(!1),[g,v]=(0,il.useState)(l?.name);if(!r||!o)return null;let b=_=>{c({...l,shadow:_});let x=n.map(E=>E.slug===o?{...l,shadow:_}:E);i(x)},S=_=>{if(_==="reset"){let x=n.map(E=>E.slug===o?u:E);c(u),i(x)}else _==="delete"?f(!0):_==="rename"&&h(!0)},y=()=>{i(n.filter(_=>_.slug!==o))},w=_=>{if(!_)return;let x=n.map(E=>E.slug===o?{...l,name:_}:E);c({...l,name:_}),i(x)};return l?(0,He.jsxs)(He.Fragment,{children:[(0,He.jsxs)(it.__experimentalHStack,{justify:"space-between",children:[(0,He.jsx)(ir,{title:l.name}),(0,He.jsx)(it.FlexItem,{children:(0,He.jsx)(it.__experimentalSpacer,{marginTop:2,marginBottom:0,paddingX:4,children:(0,He.jsxs)(gT,{children:[(0,He.jsx)(gT.TriggerButton,{render:(0,He.jsx)(it.Button,{size:"small",icon:fo,label:(0,Dr.__)("Menu")})}),(0,He.jsx)(gT.Popover,{children:(r==="custom"?lqe:cqe).map(_=>(0,He.jsx)(gT.Item,{onClick:()=>S(_.action),disabled:_.action==="reset"&&l.shadow===u?.shadow,children:(0,He.jsx)(gT.ItemLabel,{children:_.label})},_.action))})]})})})]}),(0,He.jsxs)(mh,{children:[(0,He.jsx)(uqe,{shadow:l.shadow}),(0,He.jsx)(dqe,{shadow:l.shadow,onChange:b})]}),d&&(0,He.jsx)(it.__experimentalConfirmDialog,{isOpen:!0,onConfirm:()=>{y(),f(!1)},onCancel:()=>{f(!1)},confirmButtonText:(0,Dr.__)("Delete"),size:"medium",children:(0,Dr.sprintf)((0,Dr.__)('Are you sure you want to delete "%s" shadow preset?'),l.name)}),m&&(0,He.jsx)(it.Modal,{title:(0,Dr.__)("Rename"),onRequestClose:()=>h(!1),size:"small",children:(0,He.jsxs)("form",{onSubmit:_=>{_.preventDefault(),w(g),h(!1)},children:[(0,He.jsx)(it.__experimentalInputControl,{__next40pxDefaultSize:!0,autoComplete:"off",label:(0,Dr.__)("Name"),placeholder:(0,Dr.__)("Shadow name"),value:g??"",onChange:v}),(0,He.jsx)(it.__experimentalSpacer,{marginBottom:6}),(0,He.jsxs)(it.Flex,{className:"block-editor-shadow-edit-modal__actions",justify:"flex-end",expanded:!1,children:[(0,He.jsx)(it.FlexItem,{children:(0,He.jsx)(it.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:()=>h(!1),children:(0,Dr.__)("Cancel")})}),(0,He.jsx)(it.FlexItem,{children:(0,He.jsx)(it.Button,{__next40pxDefaultSize:!0,variant:"primary",type:"submit",children:(0,Dr.__)("Save")})})]})]})})]}):(0,He.jsx)(ir,{title:""})}function uqe({shadow:e}){return(0,He.jsx)(it.__experimentalSpacer,{marginBottom:4,marginTop:-2,children:(0,He.jsx)(it.__experimentalHStack,{alignment:"center",justify:"center",className:"global-styles-ui__shadow-preview-panel",children:(0,He.jsx)("div",{className:"global-styles-ui__shadow-preview-block",style:{boxShadow:e}})})})}function dqe({shadow:e,onChange:t}){let r=(0,il.useRef)(null),o=(0,il.useMemo)(()=>mhe(e),[e]),n=(l,c)=>{let u=[...o];u[l]=c,t(u.join(", "))},i=()=>{t([...o,bH].join(", "))},s=l=>{t(o.filter((c,u)=>u!==l).join(", ")),r.current?.focus()};return(0,He.jsxs)(He.Fragment,{children:[(0,He.jsx)(it.__experimentalVStack,{spacing:2,children:(0,He.jsxs)(it.__experimentalHStack,{justify:"space-between",children:[(0,He.jsx)(Do,{level:3,children:(0,Dr.__)("Shadows")}),(0,He.jsx)(it.FlexItem,{className:"global-styles-ui__shadows-panel__options-container",children:(0,He.jsx)(it.Button,{size:"small",icon:fc,label:(0,Dr.__)("Add shadow"),onClick:()=>{i()},ref:r})})]})}),(0,He.jsx)(it.__experimentalSpacer,{}),(0,He.jsx)(it.__experimentalItemGroup,{isBordered:!0,isSeparated:!0,children:o.map((l,c)=>(0,He.jsx)(fqe,{shadow:l,onChange:u=>n(c,u),canRemove:o.length>1,onRemove:()=>s(c)},c))})]})}function fqe({shadow:e,onChange:t,canRemove:r,onRemove:o}){let n={placement:"left-start",offset:36,shift:!0},i=(0,il.useMemo)(()=>phe(e),[e]),s=l=>{t(hhe(l))};return(0,He.jsx)(it.Dropdown,{popoverProps:n,className:"global-styles-ui__shadow-editor__dropdown",renderToggle:({onToggle:l,isOpen:c})=>{let u={onClick:l,className:Q("global-styles-ui__shadow-editor__dropdown-toggle",{"is-open":c}),"aria-expanded":c},d={onClick:()=>{c&&l(),o()},className:Q("global-styles-ui__shadow-editor__remove-button",{"is-open":c}),label:(0,Dr.__)("Remove shadow")};return(0,He.jsxs)(He.Fragment,{children:[(0,He.jsx)(it.Button,{__next40pxDefaultSize:!0,icon:yx,...u,children:i.inset?(0,Dr.__)("Inner shadow"):(0,Dr.__)("Drop shadow")}),r&&(0,He.jsx)(it.Button,{size:"small",icon:DL,...d})]})},renderContent:()=>(0,He.jsx)(it.__experimentalDropdownContentWrapper,{paddingSize:"medium",className:"global-styles-ui__shadow-editor__dropdown-content",children:(0,He.jsx)(mqe,{shadowObj:i,onChange:s})})})}function mqe({shadowObj:e,onChange:t}){let n=(i,s)=>{let l={...e,[i]:s};t(l)};return(0,He.jsxs)(it.__experimentalVStack,{spacing:4,className:"global-styles-ui__shadow-editor-panel",children:[(0,He.jsx)(it.ColorPalette,{clearable:!1,enableAlpha:!0,__experimentalIsRenderedInSidebar:!0,value:e.color,onChange:i=>n("color",i)}),(0,He.jsxs)(it.__experimentalToggleGroupControl,{label:(0,Dr.__)("Shadow Type"),value:e.inset?"inset":"outset",isBlock:!0,onChange:i=>n("inset",i==="inset"),hideLabelFromVision:!0,__next40pxDefaultSize:!0,children:[(0,He.jsx)(it.__experimentalToggleGroupControlOption,{value:"outset",label:(0,Dr.__)("Outset")}),(0,He.jsx)(it.__experimentalToggleGroupControlOption,{value:"inset",label:(0,Dr.__)("Inset")})]}),(0,He.jsxs)(it.__experimentalGrid,{columns:2,gap:4,children:[(0,He.jsx)(Q5,{label:(0,Dr.__)("X Position"),value:e.x,onChange:i=>n("x",i)}),(0,He.jsx)(Q5,{label:(0,Dr.__)("Y Position"),value:e.y,onChange:i=>n("y",i)}),(0,He.jsx)(Q5,{label:(0,Dr.__)("Blur"),value:e.blur,onChange:i=>n("blur",i)}),(0,He.jsx)(Q5,{label:(0,Dr.__)("Spread"),value:e.spread,onChange:i=>n("spread",i)})]})]})}function Q5({label:e,value:t,onChange:r}){return(0,He.jsx)(it.__experimentalUnitControl,{label:e,__next40pxDefaultSize:!0,value:t,onChange:n=>{let s=n!==void 0&&!isNaN(parseFloat(n))?n:"0px";r(s)}})}var yH=a(T(),1);function vhe(){return(0,yH.jsx)(fhe,{})}function bhe(){return(0,yH.jsx)(ghe,{})}var _he=a(V(),1),xhe=a(pe(),1);var yhe=a(pe(),1),wH=a(H(),1);var whe=a(T(),1),{useSettingsForBlockElement:pqe,DimensionsPanel:hqe}=Tt(yhe.privateApis),gqe={contentSize:!0,wideSize:!0,padding:!0,margin:!0,blockGap:!0,height:!0,minHeight:!0,minWidth:!0,width:!0,childLayout:!1};function She(){let[e]=Ue("",void 0,"user",!1),[t,r]=Ue("",void 0,"merged",!1),[o]=Oe("",void 0,"user"),[n,i]=Oe(""),s=pqe(n),l=(0,wH.useMemo)(()=>({...t,layout:s.layout}),[t,s.layout]),c=(0,wH.useMemo)(()=>({...e,layout:o.layout}),[e,o.layout]);return(0,whe.jsx)(hqe,{inheritedValue:l,value:c,onChange:d=>{let f={...d};if(delete f.layout,r(f),d.layout!==o.layout){let m={...o,layout:d.layout};m.layout?.definitions&&delete m.layout.definitions,i(m)}},settings:s,includeLayoutControls:!0,defaultControls:gqe})}var ub=a(T(),1),{useHasDimensionsPanel:vqe,useSettingsForBlockElement:bqe}=Tt(xhe.privateApis);function yqe(){let[e]=Oe(""),t=bqe(e),r=vqe(t);return(0,ub.jsxs)(ub.Fragment,{children:[(0,ub.jsx)(ir,{title:(0,_he.__)("Layout")}),r&&(0,ub.jsx)(She,{})]})}var Che=yqe;var tN=a(W(),1),_H=a(V(),1);var SH=a(V(),1),Rhe=a(W(),1);var The=a(oe(),1),Ehe=a(G(),1),$5=a(H(),1),Phe=a(W(),1),khe=a(V(),1);var J5=a(T(),1);function wqe({gap:e=2}){let{user:t}=(0,$5.useContext)(Qo),r=t?.styles,n=(0,Ehe.useSelect)(s=>{let l=s(The.store).__experimentalGetCurrentThemeGlobalStylesVariations();return Array.isArray(l)?l:void 0},[])?.filter(s=>!eT(s,["color"])&&!eT(s,["typography","spacing"])),i=(0,$5.useMemo)(()=>[...[{title:(0,khe.__)("Default"),settings:{},styles:{}},...n??[]].map(l=>{let c=l?.styles?.blocks?{...l.styles.blocks}:{};r?.blocks&&Object.keys(r.blocks).forEach(m=>{if(r.blocks?.[m]?.css){let h=c[m]||{},g={css:`${c[m]?.css||""} ${r.blocks?.[m]?.css?.trim()||""}`};c[m]={...h,...g}}});let u=r?.css||l.styles?.css?{css:`${l.styles?.css||""} ${r?.css||""}`}:{},d=Object.keys(c).length>0?{blocks:c}:{},f={...l.styles,...u,...d};return{...l,settings:l.settings??{},styles:f}})],[n,r?.blocks,r?.css]);return!n||n.length<1?null:(0,J5.jsx)(Phe.__experimentalGrid,{columns:2,className:"global-styles-ui-style-variations-container",gap:e,children:i.map((s,l)=>(0,J5.jsx)(Ew,{variation:s,children:c=>(0,J5.jsx)(v5,{label:s?.title,withHoverView:!0,isFocused:c,variation:s})},l))})}var eN=wqe;var Vw=a(T(),1);function Ahe(){return(0,Vw.jsxs)(Rhe.__experimentalVStack,{spacing:10,className:"global-styles-ui-variation-container",children:[(0,Vw.jsx)(eN,{gap:3}),(0,Vw.jsx)(Dw,{title:(0,SH.__)("Color Variations"),gap:3}),(0,Vw.jsx)(Pw,{title:(0,SH.__)("Typography"),gap:3})]})}var Xf=a(T(),1);function Sqe(){return(0,Xf.jsxs)(Xf.Fragment,{children:[(0,Xf.jsx)(ir,{title:(0,_H.__)("Browse styles"),description:(0,_H.__)("Choose a variation to change the look of the site.")}),(0,Xf.jsx)(tN.Card,{size:"small",isBorderless:!0,className:"global-styles-ui-screen-style-variations",children:(0,Xf.jsx)(tN.CardBody,{children:(0,Xf.jsx)(Ahe,{})})})]})}var Ihe=Sqe;var vT=a(V(),1),Ohe=a(W(),1),Nhe=a(pe(),1);var Hl=a(T(),1),{AdvancedPanel:_qe}=Tt(Nhe.privateApis);function xqe(){let[e]=Ue("",void 0,"user",!1),[t,r]=Ue("",void 0,"merged",!1);return(0,Hl.jsxs)(Hl.Fragment,{children:[(0,Hl.jsx)(ir,{title:(0,vT.__)("Additional CSS"),description:(0,Hl.jsxs)(Hl.Fragment,{children:[(0,vT.__)("You can add custom CSS to further customize the appearance and layout of your site."),(0,Hl.jsx)("br",{}),(0,Hl.jsx)(Ohe.ExternalLink,{href:(0,vT.__)("https://developer.wordpress.org/advanced-administration/wordpress/css/"),className:"global-styles-ui-screen-css-help-link",children:(0,vT.__)("Learn more about CSS")})]})}),(0,Hl.jsx)("div",{className:"global-styles-ui-screen-css",children:(0,Hl.jsx)(_qe,{value:e,onChange:r,inheritedValue:t})})]})}var Mhe=xqe;var Qf=a(V(),1),jw=a(W(),1),mb=a(H(),1);var Fhe=a(G(),1),Dhe=a(oe(),1),bT=a(H(),1);var Cqe={per_page:-1,_fields:"id,name,avatar_urls",context:"view",capabilities:["edit_theme_options"]},Tqe={per_page:100,page:1},rN=[];function db({query:e}={}){let{user:t}=(0,bT.useContext)(Qo),r=(0,bT.useMemo)(()=>({...Tqe,...e}),[e]),{authors:o,currentUser:n,isDirty:i,revisions:s,isLoadingGlobalStylesRevisions:l,revisionsCount:c}=(0,Fhe.useSelect)(u=>{let{__experimentalGetDirtyEntityRecords:d,getCurrentUser:f,getUsers:m,getRevisions:h,__experimentalGetCurrentGlobalStylesId:g,getEntityRecord:v,isResolving:b}=u(Dhe.store),S=d()||[],y=f(),w=S.length>0,_=g(),E=(_?v("root","globalStyles",_):void 0)?._links?.["version-history"]?.[0]?.count??0,O=_&&h("root","globalStyles",_,r)||rN,A=m(Cqe)||rN,C=_?b("getRevisions",["root","globalStyles",_,r]):!1;return{authors:A,currentUser:y,isDirty:w,revisions:O,isLoadingGlobalStylesRevisions:C,revisionsCount:E}},[r]);return(0,bT.useMemo)(()=>{if(!o.length||l)return{revisions:rN,hasUnsavedChanges:i,isLoading:!0,revisionsCount:c};let u=s.map(f=>({...f,author:o.find(m=>m.id===f.author)}));if(s.length){if(u[0].id!=="unsaved"&&r.page===1&&(u[0].isLatest=!0),i&&t&&Object.keys(t).length>0&&n&&r.page===1){let f={id:"unsaved",styles:t?.styles,settings:t?.settings,_links:t?._links,author:{name:n?.name||"",avatar_urls:n?.avatar_urls||{}},modified:new Date};u.unshift(f)}r.per_page&&r.page===Math.ceil(c/r.per_page)&&u.push({id:"parent",styles:{},settings:{}})}return{revisions:u,hasUnsavedChanges:i,isLoading:!1,revisionsCount:c}},[i,s,n,o,t,l,c,r.page,r.per_page])}var pi=a(V(),1),fb=a(W(),1),bd=a(en(),1),Lhe=a(oe(),1),Bhe=a(G(),1);var oN=a(go(),1);var Zn=a(T(),1),{Badge:Eqe}=Tt(fb.privateApis),Pqe=3600*1e3*24;function kqe({revision:e,previousRevision:t}){let r=XC(e,t,{maxResults:7});return r.length?(0,Zn.jsx)("ul",{"data-testid":"global-styles-revision-changes",className:"global-styles-ui-screen-revisions__changes",children:r.map(o=>(0,Zn.jsx)("li",{children:o},o))}):null}function Rqe(e,t,r,o){return e==="parent"?(0,pi.__)("Reset the styles to the theme defaults"):e==="unsaved"?(0,pi.sprintf)((0,pi.__)("Unsaved changes by %s"),t):o?(0,pi.sprintf)((0,pi.__)("Changes saved by %1$s on %2$s. This revision matches current editor styles."),t,r):(0,pi.sprintf)((0,pi.__)("Changes saved by %1$s on %2$s"),t,r)}function Aqe({userRevisions:e,selectedRevisionId:t,onChange:r,canApplyRevision:o,onApplyRevision:n}){let{currentThemeName:i,currentUser:s}=(0,Bhe.useSelect)(u=>{let{getCurrentTheme:d,getCurrentUser:f}=u(Lhe.store),m=d();return{currentThemeName:m?.name?.rendered||m?.stylesheet,currentUser:f()}},[]),l=(0,bd.getDate)(null).getTime(),{datetimeAbbreviated:c}=(0,bd.getSettings)().formats;return(0,Zn.jsx)(fb.Composite,{orientation:"vertical",className:"global-styles-ui-screen-revisions__revisions-list","aria-label":(0,pi.__)("Global styles revisions list"),role:"listbox",children:e.map((u,d)=>{let{id:f,author:m,modified:h}=u,g=f==="unsaved",v=g?s:m,b=v?.name||(0,pi.__)("User"),S=v?.avatar_urls?.["48"],w=t?t===f:d===0,_=!o&&w,x=f==="parent",E=h instanceof Date?h.toISOString():h,O=(0,bd.getDate)(E??null),A=E&&l-O.getTime()>Pqe?(0,bd.dateI18n)(c,O):(0,bd.humanTimeDiff)(E??O,void 0),C=Rqe(f,b,(0,bd.dateI18n)(c,O),_);return(0,Zn.jsxs)(fb.Composite.Item,{className:"global-styles-ui-screen-revisions__revision-item","aria-current":w,role:"option",onKeyDown:I=>{let{keyCode:k}=I;(k===oN.ENTER||k===oN.SPACE)&&r(u)},onClick:I=>{I.preventDefault(),r(u)},"aria-selected":w,"aria-label":C,render:(0,Zn.jsx)("div",{}),children:[(0,Zn.jsx)("span",{className:"global-styles-ui-screen-revisions__revision-item-wrapper",children:x?(0,Zn.jsxs)("span",{className:"global-styles-ui-screen-revisions__description",children:[(0,pi.__)("Default styles"),(0,Zn.jsx)("span",{className:"global-styles-ui-screen-revisions__meta",children:i})]}):(0,Zn.jsxs)("span",{className:"global-styles-ui-screen-revisions__description",children:[g?(0,Zn.jsx)("span",{className:"global-styles-ui-screen-revisions__date",children:(0,pi.__)("(Unsaved)")}):(0,Zn.jsx)("time",{className:"global-styles-ui-screen-revisions__date",dateTime:E,children:A}),(0,Zn.jsxs)("span",{className:"global-styles-ui-screen-revisions__meta",children:[(0,Zn.jsx)("img",{alt:b,src:S}),b]}),w&&(0,Zn.jsx)(kqe,{revision:u,previousRevision:d<e.length?e[d+1]:void 0})]})}),w&&(_?(0,Zn.jsx)(Eqe,{className:"global-styles-ui-screen-revisions__active-badge",intent:"info",children:(0,pi.__)("Active")}):(0,Zn.jsx)(fb.Button,{size:"compact",variant:"primary",className:"global-styles-ui-screen-revisions__apply-button",onClick:n,"aria-label":(0,pi.__)("Apply the selected revision to your site."),children:x?(0,pi.__)("Reset to defaults"):(0,pi.__)("Apply")}))]},f)})})}var Vhe=Aqe;var Ul=a(W(),1),Xn=a(V(),1);var zc=a(T(),1);function jhe({currentPage:e,numPages:t,changePage:r,totalItems:o,className:n,disabled:i=!1,buttonVariant:s="tertiary",label:l=(0,Xn.__)("Pagination")}){return(0,zc.jsxs)(Ul.__experimentalHStack,{expanded:!1,as:"nav","aria-label":l,spacing:3,justify:"flex-start",className:Q("global-styles-ui-pagination",n),children:[(0,zc.jsx)(Ul.__experimentalText,{variant:"muted",className:"global-styles-ui-pagination__total",children:(0,Xn.sprintf)((0,Xn._n)("%d item","%d items",o),o)}),(0,zc.jsxs)(Ul.__experimentalHStack,{expanded:!1,spacing:1,children:[(0,zc.jsx)(Ul.Button,{variant:s,onClick:()=>r(1),accessibleWhenDisabled:!0,disabled:i||e===1,label:(0,Xn.__)("First page"),icon:(0,Xn.isRTL)()?hl:gl,size:"compact"}),(0,zc.jsx)(Ul.Button,{variant:s,onClick:()=>r(e-1),accessibleWhenDisabled:!0,disabled:i||e===1,label:(0,Xn.__)("Previous page"),icon:(0,Xn.isRTL)()?Cr:xr,size:"compact"})]}),(0,zc.jsx)(Ul.__experimentalText,{variant:"muted",children:(0,Xn.sprintf)((0,Xn._x)("%1$d of %2$d","paging"),e,t)}),(0,zc.jsxs)(Ul.__experimentalHStack,{expanded:!1,spacing:1,children:[(0,zc.jsx)(Ul.Button,{variant:s,onClick:()=>r(e+1),accessibleWhenDisabled:!0,disabled:i||e===t,label:(0,Xn.__)("Next page"),icon:(0,Xn.isRTL)()?xr:Cr,size:"compact"}),(0,zc.jsx)(Ul.Button,{variant:s,onClick:()=>r(t),accessibleWhenDisabled:!0,disabled:i||e===t,label:(0,Xn.__)("Last page"),icon:(0,Xn.isRTL)()?gl:hl,size:"compact"})]})]})}var Hc=a(T(),1),zhe=10;function Iqe({onClose:e}={}){let{user:t,onChange:r}=(0,mb.useContext)(Qo),{params:o,goTo:n}=(0,jw.useNavigator)(),{revisionId:i}=o,[s,l]=(0,mb.useState)(1),{revisions:c,isLoading:u,hasUnsavedChanges:d,revisionsCount:f}=db({query:{per_page:zhe,page:s}}),m=Math.ceil(f/zhe),[h,g]=(0,mb.useState)(!1),v=(0,mb.useMemo)(()=>i&&c.find(A=>String(A.id)===String(i))||t,[i,c,t]),b=Kv(v,t),S=()=>{e&&e()},y=O=>{r(O),g(!1),S()},w=O=>{n(`/revisions/${O.id}`)},_=v?.id??c[0]?.id,x=!!_&&_!=="unsaved"&&!b,E=!!c.length;return(0,Hc.jsxs)(Hc.Fragment,{children:[(0,Hc.jsx)(ir,{title:f?(0,Qf.sprintf)((0,Qf.__)("Revisions (%d)"),f):(0,Qf.__)("Revisions"),description:(0,Qf.__)(`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:S}),!E&&(0,Hc.jsx)(jw.Spinner,{className:"global-styles-ui-screen-revisions__loading"}),(0,Hc.jsx)(Vhe,{onChange:w,selectedRevisionId:_,userRevisions:c,canApplyRevision:x,onApplyRevision:()=>d?g(!0):y(v)}),m>1&&(0,Hc.jsx)("div",{className:"global-styles-ui-screen-revisions__footer",children:(0,Hc.jsx)(jhe,{className:"global-styles-ui-screen-revisions__pagination",currentPage:s,numPages:m,changePage:l,totalItems:f,disabled:u,label:(0,Qf.__)("Global Styles pagination")})}),h&&(0,Hc.jsx)(jw.__experimentalConfirmDialog,{isOpen:h,confirmButtonText:(0,Qf.__)("Apply"),onConfirm:()=>y(v),onCancel:()=>g(!1),size:"medium",children:(0,Qf.__)("Are you sure you want to apply this revision? Any unsaved changes will be lost.")})]})}var Hhe=Iqe;var xn=a(V(),1),Lo=a(W(),1);var qhe=a(H(),1);var Uhe=a(W(),1),Whe=a(V(),1),Ghe=a(T(),1);function Oqe({text:e,confirmButtonText:t,isOpen:r,toggleOpen:o,onConfirm:n}){let i=async()=>{o(),n()},s=()=>{o()};return(0,Ghe.jsx)(Uhe.__experimentalConfirmDialog,{isOpen:r,cancelButtonText:(0,Whe.__)("Cancel"),confirmButtonText:t,onCancel:s,onConfirm:i,size:"medium",children:e})}var Yhe=Oqe;var sr=a(T(),1),{Menu:yT}=Tt(Lo.privateApis);function xH({label:e,origin:t,sizes:r,handleAddFontSize:o,handleResetFontSizes:n}){let[i,s]=(0,qhe.useState)(!1),l=()=>s(!i),c=t==="custom"?(0,xn.__)("Are you sure you want to remove all custom font size presets?"):(0,xn.__)("Are you sure you want to reset all font size presets to their default values?");return(0,sr.jsxs)(sr.Fragment,{children:[n&&i&&(0,sr.jsx)(Yhe,{text:c,confirmButtonText:t==="custom"?(0,xn.__)("Remove"):(0,xn.__)("Reset"),isOpen:i,toggleOpen:l,onConfirm:n}),(0,sr.jsxs)(Lo.__experimentalVStack,{spacing:4,children:[(0,sr.jsxs)(Lo.__experimentalHStack,{children:[(0,sr.jsx)(Do,{level:3,children:e}),(0,sr.jsxs)(Lo.FlexItem,{className:"global-styles-ui__typography-panel__options-container",children:[t==="custom"&&(0,sr.jsx)(Lo.Button,{label:(0,xn.__)("Add font size"),icon:fc,size:"small",onClick:o}),!!n&&(0,sr.jsxs)(yT,{children:[(0,sr.jsx)(yT.TriggerButton,{render:(0,sr.jsx)(Lo.Button,{size:"small",icon:fo,label:(0,xn.__)("Font size presets options")})}),(0,sr.jsx)(yT.Popover,{children:(0,sr.jsx)(yT.Item,{onClick:l,children:(0,sr.jsx)(yT.ItemLabel,{children:t==="custom"?(0,xn.__)("Remove font size presets"):(0,xn.__)("Reset font size presets")})})})]})]})]}),!!r.length&&(0,sr.jsx)(Lo.__experimentalItemGroup,{isBordered:!0,isSeparated:!0,children:r.map(u=>(0,sr.jsx)(vo,{path:`/typography/font-sizes/${t}/${u.slug}`,children:(0,sr.jsxs)(Lo.__experimentalHStack,{children:[(0,sr.jsx)(Lo.FlexItem,{className:"global-styles-ui-font-size__item",children:u.name}),(0,sr.jsx)(Lo.FlexItem,{display:"flex",children:(0,sr.jsx)(hn,{icon:(0,xn.isRTL)()?xr:Cr})})]})},u.slug))})]})]})}function Nqe(){let[e,t]=Oe("typography.fontSizes.theme"),[r]=Oe("typography.fontSizes.theme","base"),[o,n]=Oe("typography.fontSizes.default"),[i]=Oe("typography.fontSizes.default","base"),[s=[],l]=Oe("typography.fontSizes.custom"),[c]=Oe("typography.defaultFontSizes"),u=()=>{let f=p5(s,"custom-"),m={name:(0,xn.sprintf)((0,xn.__)("New Font Size %d"),f),size:"16px",slug:`custom-${f}`};l([...s,m])},d=(f,m)=>f.map(h=>h.size).join("")===m.map(h=>h.size).join("");return(0,sr.jsxs)(Lo.__experimentalVStack,{spacing:2,children:[(0,sr.jsx)(ir,{title:(0,xn.__)("Font size presets"),description:(0,xn.__)("Create and edit the presets used for font sizes across the site.")}),(0,sr.jsx)(Lo.__experimentalView,{children:(0,sr.jsx)(Lo.__experimentalSpacer,{paddingX:4,children:(0,sr.jsxs)(Lo.__experimentalVStack,{spacing:8,children:[!!e?.length&&(0,sr.jsx)(xH,{label:(0,xn.__)("Theme"),origin:"theme",sizes:e,handleAddFontSize:u,handleResetFontSizes:d(e,r)?void 0:()=>t(r)}),c&&!!o?.length&&(0,sr.jsx)(xH,{label:(0,xn.__)("Default"),origin:"default",sizes:o,handleAddFontSize:u,handleResetFontSizes:d(o,i)?void 0:()=>n(i)}),(0,sr.jsx)(xH,{label:(0,xn.__)("Custom"),origin:"custom",sizes:s,handleAddFontSize:u,handleResetFontSizes:s.length>0?()=>l([]):void 0})]})})})]})}var Khe=Nqe;var Sa=a(V(),1),Bo=a(W(),1);var wT=a(H(),1);var Zhe=a(pe(),1),Xhe=a(V(),1);var Qhe=a(T(),1);function Mqe({fontSize:e}){let[t]=Ue("typography"),r=typeof e?.fluid=="object"&&e?.fluid?.min&&e?.fluid?.max?{minimumFontSize:e.fluid.min,maximumFontSize:e.fluid.max}:{fontSize:e.size},o=(0,Zhe.getComputedFluidTypographyValue)(r);return(0,Qhe.jsx)("div",{className:"global-styles-ui-typography-preview",style:{fontSize:o,fontFamily:t?.fontFamily??"serif"},children:(0,Xhe.__)("Aa")})}var Jhe=Mqe;var $he=a(W(),1),zw=a(V(),1),ege=a(T(),1);function Fqe({fontSize:e,isOpen:t,toggleOpen:r,handleRemoveFontSize:o}){let n=async()=>{r(),o(e)},i=()=>{r()};return(0,ege.jsx)($he.__experimentalConfirmDialog,{isOpen:t,cancelButtonText:(0,zw.__)("Cancel"),confirmButtonText:(0,zw.__)("Delete"),onCancel:i,onConfirm:n,size:"medium",children:e&&(0,zw.sprintf)((0,zw.__)('Are you sure you want to delete "%s" font size preset?'),e.name)})}var tge=Fqe;var Uc=a(W(),1),Hw=a(V(),1),rge=a(H(),1),Jf=a(T(),1);function Dqe({fontSize:e,toggleOpen:t,handleRename:r}){let[o,n]=(0,rge.useState)(e.name),i=()=>{o&&o.trim()&&r(o),t()};return(0,Jf.jsx)(Uc.Modal,{onRequestClose:t,focusOnMount:"firstContentElement",title:(0,Hw.__)("Rename"),size:"small",children:(0,Jf.jsx)("form",{onSubmit:s=>{s.preventDefault(),i(),t()},children:(0,Jf.jsxs)(Uc.__experimentalVStack,{spacing:"3",children:[(0,Jf.jsx)(Uc.__experimentalInputControl,{__next40pxDefaultSize:!0,autoComplete:"off",value:o,onChange:n,label:(0,Hw.__)("Name"),placeholder:(0,Hw.__)("Font size preset name")}),(0,Jf.jsxs)(Uc.__experimentalHStack,{justify:"right",children:[(0,Jf.jsx)(Uc.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:t,children:(0,Hw.__)("Cancel")}),(0,Jf.jsx)(Uc.Button,{__next40pxDefaultSize:!0,variant:"primary",type:"submit",children:(0,Hw.__)("Save")})]})]})})})}var oge=Dqe;var Cn=a(W(),1),$f=a(T(),1),Lqe=["px","em","rem","vw","vh"];function nN(e){let{baseControlProps:t}=(0,Cn.useBaseControlProps)(e),{value:r,onChange:o,fallbackValue:n,disabled:i,label:s}=e,l=(0,Cn.__experimentalUseCustomUnits)({availableUnits:Lqe}),[c,u="px"]=(0,Cn.__experimentalParseQuantityAndUnitFromRawValue)(r,l),d=!!u&&["em","rem","vw","vh"].includes(u);return(0,$f.jsx)(Cn.BaseControl,{...t,children:(0,$f.jsxs)(Cn.Flex,{children:[(0,$f.jsx)(Cn.FlexItem,{isBlock:!0,children:(0,$f.jsx)(Cn.__experimentalUnitControl,{__next40pxDefaultSize:!0,label:s,hideLabelFromVision:!0,value:r,onChange:h=>{o?.(h)},units:l,min:0,disabled:i})}),(0,$f.jsx)(Cn.FlexItem,{isBlock:!0,children:(0,$f.jsx)(Cn.__experimentalSpacer,{marginX:2,marginBottom:0,children:(0,$f.jsx)(Cn.RangeControl,{__next40pxDefaultSize:!0,label:s,hideLabelFromVision:!0,value:c,initialPosition:n,withInputField:!1,onChange:h=>{o?.(h!==void 0?h+u:void 0)},min:0,max:d?10:100,step:d?.1:1,disabled:i})})})]})})}var $t=a(T(),1),{Menu:pb}=Tt(Bo.privateApis);function Bqe(){let[e,t]=(0,wT.useState)(!1),[r,o]=(0,wT.useState)(!1),{params:{origin:n,slug:i},goBack:s}=(0,Bo.useNavigator)(),[l,c]=Oe("typography.fontSizes"),[u]=Oe("typography.fluid"),d=l?.[n]??[],f=d.find(A=>A.slug===i);if((0,wT.useEffect)(()=>{i&&!f&&s()},[i,f,s]),!n||!i||!f)return null;let m=f?.fluid!==void 0?!!f.fluid:!!u,h=typeof f?.fluid=="object",g=A=>{_("name",A)},v=A=>{_("size",A)},b=A=>{_("fluid",A)},S=A=>{A?_("fluid",{min:f.size,max:f.size}):_("fluid",!0)},y=A=>{let C=typeof f.fluid=="object"?f.fluid:{};_("fluid",{...C,min:A})},w=A=>{let C=typeof f.fluid=="object"?f.fluid:{};_("fluid",{...C,max:A})},_=(A,C)=>{let I=d.map(k=>k.slug===i?{...k,[A]:C}:k);c({...l,[n]:I})},x=()=>{let A=d.filter(C=>C.slug!==i);c({...l,[n]:A})},E=()=>{t(!e)},O=()=>{o(!r)};return(0,$t.jsxs)($t.Fragment,{children:[(0,$t.jsx)(tge,{fontSize:f,isOpen:e,toggleOpen:E,handleRemoveFontSize:x}),r&&(0,$t.jsx)(oge,{fontSize:f,toggleOpen:O,handleRename:g}),(0,$t.jsxs)(Bo.__experimentalVStack,{spacing:4,children:[(0,$t.jsxs)(Bo.__experimentalHStack,{justify:"space-between",alignment:"flex-start",children:[(0,$t.jsx)(ir,{title:f.name,description:(0,Sa.sprintf)((0,Sa.__)("Manage the font size %s."),f.name)}),n==="custom"&&(0,$t.jsx)(Bo.FlexItem,{children:(0,$t.jsx)(Bo.__experimentalSpacer,{marginTop:3,marginBottom:0,paddingX:4,children:(0,$t.jsxs)(pb,{children:[(0,$t.jsx)(pb.TriggerButton,{render:(0,$t.jsx)(Bo.Button,{size:"small",icon:fo,label:(0,Sa.__)("Font size options")})}),(0,$t.jsxs)(pb.Popover,{children:[(0,$t.jsx)(pb.Item,{onClick:O,children:(0,$t.jsx)(pb.ItemLabel,{children:(0,Sa.__)("Rename")})}),(0,$t.jsx)(pb.Item,{onClick:E,children:(0,$t.jsx)(pb.ItemLabel,{children:(0,Sa.__)("Delete")})})]})]})})})]}),(0,$t.jsx)(Bo.__experimentalView,{children:(0,$t.jsx)(Bo.__experimentalSpacer,{paddingX:4,marginBottom:0,paddingBottom:6,children:(0,$t.jsxs)(Bo.__experimentalVStack,{spacing:4,children:[(0,$t.jsx)(Bo.FlexItem,{children:(0,$t.jsx)(Jhe,{fontSize:f})}),(0,$t.jsx)(nN,{label:(0,Sa.__)("Size"),value:!h&&f.size?String(f.size):"",onChange:v,disabled:h}),(0,$t.jsx)(Bo.ToggleControl,{label:(0,Sa.__)("Fluid typography"),help:(0,Sa.__)("Scale the font size dynamically to fit the screen or viewport."),checked:m,onChange:b}),m&&(0,$t.jsx)(Bo.ToggleControl,{label:(0,Sa.__)("Custom fluid values"),help:(0,Sa.__)("Set custom min and max values for the fluid font size."),checked:h,onChange:S}),h&&(0,$t.jsxs)($t.Fragment,{children:[(0,$t.jsx)(nN,{label:(0,Sa.__)("Minimum"),value:typeof f?.fluid=="object"?f.fluid?.min:void 0,onChange:y}),(0,$t.jsx)(nN,{label:(0,Sa.__)("Maximum"),value:typeof f?.fluid=="object"?f.fluid?.max:void 0,onChange:w})]})]})})})]})]})}var nge=Bqe;var $e=a(T(),1);function Vqe({parentMenu:e,blockStyles:t,blockName:r}){return(0,$e.jsx)($e.Fragment,{children:t.map((o,n)=>(0,$e.jsx)(Uw.Navigator.Screen,{path:e+"/variations/"+o.name,children:(0,$e.jsx)(sH,{name:r,variation:o.name})},n))})}function jqe({name:e,parentMenu:t=""}){let r=(0,ige.useSelect)(o=>{if(!e)return[];let{getBlockStyles:n}=o(iN.store);return n(e)},[e]);return r?.length?(0,$e.jsx)(Vqe,{parentMenu:t,blockStyles:r,blockName:e||""}):null}function TH({value:e,baseValue:t,onChange:r,path:o,onPathChange:n,fontLibraryEnabled:i=!1,serverCSS:s,serverSettings:l}){let c=(0,iN.getBlockTypes)(),u=(0,wh.useMemo)(()=>Ui(t,e),[t,e]),[d,f]=Zv(u,[],{styleOptions:{variationStyles:!0}}),m=(0,wh.useMemo)(()=>[...s??[],...d??[]],[s,d]),h=(0,wh.useMemo)(()=>({...l,__experimentalFeatures:f,styles:m}),[f,l,m]);return(0,$e.jsx)(JC,{value:e,baseValue:t,onChange:r,fontLibraryEnabled:i,children:(0,$e.jsx)(sge.BlockEditorProvider,{settings:h,children:(0,$e.jsxs)(Uw.Navigator,{className:"global-styles-ui-sidebar__navigator-provider",initialPath:o||"/",children:[(o||n)&&(0,$e.jsx)(zqe,{path:o,onPathChange:n}),(0,$e.jsx)(un,{path:"/",children:(0,$e.jsx)(Xfe,{})}),(0,$e.jsx)(un,{path:"/colors",children:(0,$e.jsx)(Wpe,{})}),(0,$e.jsx)(un,{path:"/typography",children:(0,$e.jsx)(Rpe,{})}),(0,$e.jsx)(un,{path:"/typography/font-sizes",children:(0,$e.jsx)(Khe,{})}),(0,$e.jsx)(un,{path:"/typography/font-sizes/:origin/:slug",children:(0,$e.jsx)(nge,{})}),(0,$e.jsx)(un,{path:"/layout",children:(0,$e.jsx)(Che,{})}),(0,$e.jsx)(un,{path:"/colors/palette",children:(0,$e.jsx)(ehe,{})}),(0,$e.jsx)(un,{path:"/variations",children:(0,$e.jsx)(Ihe,{})}),(0,$e.jsx)(un,{path:"/css",children:(0,$e.jsx)(Mhe,{})}),(0,$e.jsx)(un,{path:"/revisions/:revisionId?",children:(0,$e.jsx)(Hhe,{})}),(0,$e.jsx)(un,{path:"/shadows",children:(0,$e.jsx)(vhe,{})}),(0,$e.jsx)(un,{path:"/shadows/edit/:category/:slug",children:(0,$e.jsx)(bhe,{})}),(0,$e.jsx)(un,{path:"/background",children:(0,$e.jsx)(she,{})}),(0,$e.jsx)(un,{path:"/typography/text",children:(0,$e.jsx)(Mw,{element:"text"})}),(0,$e.jsx)(un,{path:"/typography/link",children:(0,$e.jsx)(Mw,{element:"link"})}),(0,$e.jsx)(un,{path:"/typography/heading",children:(0,$e.jsx)(Mw,{element:"heading"})}),(0,$e.jsx)(un,{path:"/typography/caption",children:(0,$e.jsx)(Mw,{element:"caption"})}),(0,$e.jsx)(un,{path:"/typography/button",children:(0,$e.jsx)(Mw,{element:"button"})}),(0,$e.jsx)(un,{path:"/blocks",children:(0,$e.jsx)(nme,{})}),c.map(g=>(0,$e.jsxs)(wh.Fragment,{children:[(0,$e.jsx)(un,{path:"/blocks/"+encodeURIComponent(g.name),children:(0,$e.jsx)(sH,{name:g.name})}),(0,$e.jsx)(jqe,{name:g.name,parentMenu:"/blocks/"+encodeURIComponent(g.name)})]},g.name))]})})})}function un({path:e,children:t}){return(0,$e.jsx)(Uw.Navigator.Screen,{className:"global-styles-ui-sidebar__navigator-screen",path:e,children:t})}function zqe({path:e,onPathChange:t}){let r=(0,Uw.useNavigator)(),{path:o}=r.location,n=(0,CH.usePrevious)(e),i=(0,CH.usePrevious)(o);return(0,wh.useEffect)(()=>{e&&e!==o&&(e!==n?r.goTo(e):o!==i&&t&&t(o??"/"))},[t,e,i,n,o,r]),null}var EH=a(T(),1);function Ww(e){return function({value:r,baseValue:o,onChange:n,...i}){return(0,EH.jsx)(JC,{value:r,baseValue:o,onChange:n,children:(0,EH.jsx)(e,{...i})})}}var Hqe=Ww(eN);var Uqe=Ww(Dw);var Wqe=Ww(Pw);var Gqe=a(T(),1);var hge=a(Wm(),1);var age=a(G(),1),lge=a(H(),1),cge=a(pe(),1),uge=a(ke(),1);function dge({path:e,onPathChange:t}){let{selectedBlockName:r,selectedBlockClientId:o}=(0,age.useSelect)(s=>{let{getSelectedBlockClientId:l,getBlockName:c}=s(cge.store),u=l();return{selectedBlockName:c(u),selectedBlockClientId:u}},[]),n=!0,i=(0,uge.usePrevious)(o);return(0,lge.useEffect)(()=>{if(o===i||!o||!n||!e||e!=="/blocks"&&!e.startsWith("/blocks/"))return;let s="/blocks/"+encodeURIComponent(r);s!==e&&t?.(s)},[o,i,r,n,e,t]),null}var hb=a(H(),1);var Gw=a(oe(),1),Yw=a(G(),1),fge=a(pe(),1);var{cleanEmptyObject:PH}=Y(fge.privateApis);function Yqe(){let{globalStylesId:e,isReady:t,settings:r,styles:o,_links:n}=(0,Yw.useSelect)(u=>{let{getEntityRecord:d,getEditedEntityRecord:f,hasFinishedResolution:m,canUser:h}=u(Gw.store),g=u(Gw.store).__experimentalGetCurrentGlobalStylesId(),v,b=g?h("update",{kind:"root",name:"globalStyles",id:g}):null;g&&typeof b=="boolean"&&(b?v=f("root","globalStyles",g):v=d("root","globalStyles",g,{context:"view"}));let S=!1;return m("__experimentalGetCurrentGlobalStylesId")&&(g?S=b?m("getEditedEntityRecord",["root","globalStyles",g]):m("getEntityRecord",["root","globalStyles",g,{context:"view"}]):S=!0),{globalStylesId:g,isReady:S,settings:v?.settings,styles:v?.styles,_links:v?._links}},[]),{getEditedEntityRecord:i}=(0,Yw.useSelect)(Gw.store),{editEntityRecord:s}=(0,Yw.useDispatch)(Gw.store),l=(0,hb.useMemo)(()=>({settings:r??{},styles:o??{},_links:n??{}}),[r,o,n]),c=(0,hb.useCallback)((u,d={})=>{let f=i("root","globalStyles",e),m={styles:f?.styles??{},settings:f?.settings??{},_links:f?._links??{}},h=typeof u=="function"?u(m):u;s("root","globalStyles",e,{styles:PH(h.styles)||{},settings:PH(h.settings)||{},_links:PH(h._links)||{}},d)},[e,s,i]);return[t,l,c]}function qqe(){let e=(0,Yw.useSelect)(t=>t(Gw.store).__experimentalGetCurrentThemeBaseGlobalStyles(),[]);return[!!e,e]}function ro(){let[e,t,r]=Yqe(),[o,n]=qqe();return{merged:(0,hb.useMemo)(()=>!e||!o?{}:Ui(n||{},t),[e,o,n,t]),base:n||{},user:t,setUser:r,isReady:e&&o}}function Sh(e,t){let{merged:r}=ro();return(0,hb.useMemo)(()=>ww(r,e,t),[r,e,t])}function kH(e,t){let{merged:r}=ro();return(0,hb.useMemo)(()=>Yv(r,e,t),[r,e,t])}var gb=a(T(),1);function Kqe(e){let t=e?.styles,r=e?.__unstableResolvedAssets,o=e?.colors,n=e?.gradients,i=e?.__experimentalDiscussionSettings,s=e?.fontLibraryEnabled??!0,l=(0,pge.useSelect)(d=>{let{canUser:f}=d(mge.store);return f("create",{kind:"postType",name:"attachment"})?hge.uploadMedia:void 0},[]),c=(0,RH.useMemo)(()=>t?t.filter(d=>!d.isGlobalStyles):[],[t]),u=(0,RH.useMemo)(()=>({__unstableResolvedAssets:r,settings:{color:{palette:{theme:o??[]},gradients:{theme:n??[]},duotone:{theme:[]}}},__experimentalDiscussionSettings:i,mediaUpload:l}),[r,o,n,i,l]);return{serverCSS:c,serverSettings:u,fontLibraryEnabled:s}}function sN({path:e,onPathChange:t,settings:r}){let{user:o,base:n,setUser:i,isReady:s}=ro(),{serverCSS:l,serverSettings:c,fontLibraryEnabled:u}=Kqe(r);return s?(0,gb.jsxs)(gb.Fragment,{children:[(0,gb.jsx)(TH,{value:o,baseValue:n||{},onChange:i,path:e,onPathChange:t,fontLibraryEnabled:u,serverCSS:l,serverSettings:c}),(0,gb.jsx)(dge,{path:e,onPathChange:t})]}):null}var{store:Zqe}=Y(bw),gge={};function Xqe(e){let{RECEIVE_INTERMEDIATE_RESULTS:t}=Y(_a.privateApis),{getEntityRecords:r}=e(_a.store);return r("postType","wp_block",{per_page:-1,[t]:!0})}function Qqe(e){return e(_a.store).getUserPatternCategories()}var Jqe=["__experimentalBlockBindingsSupportedAttributes","__experimentalBlockDirectory","__experimentalDiscussionSettings","__experimentalFeatures","__experimentalGlobalStylesBaseStyles","allImageSizes","alignWide","blockInspectorTabs","maxUploadFileSize","allowedMimeTypes","bodyPlaceholder","canEditCSS","canLockBlocks","canUpdateBlockBindings","capabilities","clearBlockSelection","codeEditingEnabled","colors","disableContentOnlyForTemplateParts","disableContentOnlyForUnsyncedPatterns","disableCustomColors","disableCustomFontSizes","disableCustomSpacingSizes","disableCustomGradients","disableLayoutStyles","enableCustomLineHeight","enableCustomSpacing","enableCustomUnits","enableOpenverseMediaCategory","fontSizes","gradients","generateAnchors","onNavigateToEntityRecord","imageDefaultSize","imageDimensions","imageEditing","imageSizes","isPreviewMode","isRTL","locale","maxWidth","postContentAttributes","postsPerPage","readOnly","styles","titlePlaceholder","supportsLayout","widgetTypesToHideFromLegacyWidgetBlock","__unstableHasCustomAppender","__unstableResolvedAssets","__unstableIsBlockBasedTheme"],{globalStylesDataKey:$qe,globalStylesLinksDataKey:eKe,selectBlockPatternsKey:tKe,reusableBlocksSelectKey:rKe,userPatternCategoriesSelectKey:oKe,sectionRootClientIdKey:nKe,mediaEditKey:iKe,getMediaSelectKey:sKe,isIsolatedEditorKey:aKe,deviceTypeKey:lKe,isNavigationOverlayContextKey:cKe,isNavigationPostEditorKey:uKe,mediaUploadOnSuccessKey:dKe,openMediaEditorModalKey:fKe}=Y(aN.privateApis);function mKe(e,t,r,o){let n=(0,yge.useViewportMatch)("medium"),{allImageSizes:i,bigImageSizeThreshold:s,allowRightClickOverrides:l,blockTypes:c,focusMode:u,hasFixedToolbar:d,isDistractionFree:f,keepCaretInsideBlock:m,hasUploadPermissions:h,hiddenBlockTypes:g,canUseUnfilteredHTML:v,userCanCreatePages:b,pageOnFront:S,pageForPosts:y,restBlockPatternCategories:w,sectionRootClientId:_,deviceType:x,isNavigationOverlayContext:E,isRevisionsMode:O}=(0,bb.useSelect)(q=>{let{canUser:X,getRawEntityRecord:ie,getEntityRecord:$,getBlockPatternCategories:le}=q(_a.store),{get:ae}=q(bge.store),{getBlockTypes:re}=q(wge.store),{getDeviceType:ve,isRevisionsMode:Ce}=Y(q(R)),{getBlocksByName:_e,getBlockAttributes:Me}=q(aN.store),ue=X("read",{kind:"root",name:"site"})?$("root","site"):void 0,te=$("root","__unstableBase");function de(){return o==="template-locked"?_e("core/post-content")?.[0]??"":_e("core/group").find(se=>Me(se)?.tagName==="main")??""}return{allImageSizes:te?.image_sizes,bigImageSizeThreshold:te?.image_size_threshold,allowRightClickOverrides:ae("core","allowRightClickOverrides"),blockTypes:re(),canUseUnfilteredHTML:ie("postType",t,r)?._links?.hasOwnProperty("wp:action-unfiltered-html"),focusMode:ae("core","focusMode"),hasFixedToolbar:ae("core","fixedToolbar")||!n,hiddenBlockTypes:ae("core","hiddenBlockTypes"),isDistractionFree:ae("core","distractionFree"),keepCaretInsideBlock:ae("core","keepCaretInsideBlock"),hasUploadPermissions:X("create",{kind:"postType",name:"attachment"})??!0,userCanCreatePages:X("create",{kind:"postType",name:"page"}),pageOnFront:ue?.page_on_front,pageForPosts:ue?.page_for_posts,restBlockPatternCategories:le(),sectionRootClientId:de(),deviceType:ve(),isNavigationOverlayContext:t==="wp_template_part"&&r?$("postType","wp_template_part",r)?.area==="navigation-overlay":!1,isRevisionsMode:Ce()}},[t,r,n,o]),{merged:A}=ro(),C=A.styles??gge,I=A._links??gge,k=e.__experimentalAdditionalBlockPatterns??e.__experimentalBlockPatterns,P=e.__experimentalAdditionalBlockPatternCategories??e.__experimentalBlockPatternCategories,N=(0,vb.useMemo)(()=>[...k||[]].filter(({postTypes:q})=>!q||Array.isArray(q)&&q.includes(t)),[k,t]),U=(0,vb.useMemo)(()=>[...P||[],...w||[]].filter((q,X,ie)=>X===ie.findIndex($=>q.name===$.name)),[P,w]),{undo:F,setIsInserterOpened:D}=(0,bb.useDispatch)(R),{editMediaEntity:B}=Y((0,bb.useDispatch)(_a.store)),{saveEntityRecord:L}=(0,bb.useDispatch)(_a.store),{openMediaEditorModal:M}=(0,bb.useDispatch)(Zqe),z=(0,vb.useCallback)(q=>b?L("postType","page",q):Promise.reject({message:(0,vge.__)("You do not have permission to create Pages.")}),[L,b]),K=(0,vb.useMemo)(()=>g&&g.length>0?(e.allowedBlockTypes===!0?c.map(({name:X})=>X):e.allowedBlockTypes||[]).filter(X=>!g.includes(X)):e.allowedBlockTypes,[e.allowedBlockTypes,g,c]),Z=e.focusMode===!1;return(0,vb.useMemo)(()=>{let q={...Object.fromEntries(Object.entries(e).filter(([X])=>Jqe.includes(X))),[$qe]:C,[eKe]:I,allImageSizes:i,bigImageSizeThreshold:s,allowedBlockTypes:K,allowRightClickOverrides:l,focusMode:u&&!Z,hasFixedToolbar:d,isDistractionFree:f,keepCaretInsideBlock:m,[sKe]:(X,ie)=>X(_a.store).getEntityRecord("postType","attachment",ie),[iKe]:h?B:void 0,[fKe]:({id:X,onUpdate:ie,onClose:$})=>M({id:X,onUpdate:ie,onClose:$}),mediaUpload:h?l2:void 0,[dKe]:h?zde:void 0,mediaSideload:h?Ude:void 0,mediaFinalize:h?Yde:void 0,mediaDelete:h?Kde:void 0,__experimentalBlockPatterns:N,[tKe]:X=>{let{hasFinishedResolution:ie,getBlockPatternsForPostType:$}=Y(X(_a.store)),le=$(t);return ie("getBlockPatterns")?le:void 0},[rKe]:Xqe,[oKe]:Qqe,__experimentalBlockPatternCategories:U,__experimentalFetchLinkSuggestions:(X,ie)=>(0,_a.__experimentalFetchLinkSuggestions)(X,ie,e),inserterMediaCategories:Bde,__experimentalFetchRichUrlData:_a.__experimentalFetchUrlData,__experimentalCanUserUseUnfilteredHTML:v,__experimentalUndo:F,outlineMode:!f&&t==="wp_template",__experimentalCreatePageEntity:z,__experimentalUserCanCreatePages:b,pageOnFront:S,pageForPosts:y,__experimentalPreferPatternsOnRoot:t==="wp_template",templateLock:t==="wp_navigation"?"insert":e.templateLock,template:t==="wp_navigation"?[["core/navigation",{},[]]]:e.template,__experimentalSetIsInserterOpened:D,[nKe]:_,editorTool:o==="post-only"&&t!=="wp_template"?"edit":void 0,[aKe]:["wp_template_part","wp_block","wp_navigation"].includes(t),[uKe]:t==="wp_navigation",disableContentOnlyForTemplateParts:o==="template-locked"||e.disableContentOnlyForTemplateParts,...x?{[lKe]:x}:{},[cKe]:E};return O&&(q.isPreviewMode=!0),q},[O,K,l,u,Z,d,f,m,e,h,N,U,v,F,z,b,S,y,t,D,_,C,I,o,B,M,x,i,s,E])}var Sge=mKe;var ST=a(G(),1),qw=a(pe(),1),cN=a(H(),1);var _ge=a(H(),1),xge=a(An(),1),pKe=["core/post-title","core/post-featured-image","core/post-content"];function lN(){return(0,_ge.useMemo)(()=>[...(0,xge.applyFilters)("editor.postContentBlockTypes",pKe)],[])}function Cge(){let e=lN(),{contentOnlyIds:t,templateParts:r}=(0,ST.useSelect)(i=>{let{getPostBlocksByName:s}=Y(i(R)),{getBlocksByName:l}=i(qw.store);return{contentOnlyIds:s(e),templateParts:l("core/template-part")}},[e]),o=(0,ST.useSelect)(i=>{let{getBlockOrder:s}=i(qw.store);return r.flatMap(l=>s(l))},[r]),n=(0,ST.useRegistry)();return(0,cN.useEffect)(()=>{let{setBlockEditingMode:i,unsetBlockEditingMode:s,__unstableMarkNextChangeAsNotPersistent:l}=n.dispatch(qw.store);return l(),i("","disabled"),()=>{l(),s("")}},[n]),(0,cN.useEffect)(()=>{let{setBlockEditingMode:i,unsetBlockEditingMode:s,__unstableMarkNextChangeAsNotPersistent:l}=n.dispatch(qw.store);return n.batch(()=>{for(let c of r)l(),i(c,"contentOnly")}),()=>{n.batch(()=>{for(let c of r)l(),s(c)})}},[r,n]),(0,cN.useEffect)(()=>{let{setBlockEditingMode:i,unsetBlockEditingMode:s,__unstableMarkNextChangeAsNotPersistent:l}=n.dispatch(qw.store),c=new Set(t);return n.batch(()=>{for(let u of t)l(),i(u,"contentOnly");for(let u of o)c.has(u)||(l(),i(u,"disabled"))}),()=>{n.batch(()=>{for(let u of t)l(),s(u);for(let u of o)c.has(u)||(l(),s(u))})}},[t,o,n]),null}var Tge=a(H(),1),uN=a(G(),1),AH=a(pe(),1);function Ege(){let e=(0,uN.useRegistry)(),t=(0,uN.useSelect)(r=>r(AH.store).getBlockOrder()?.[0],[]);(0,Tge.useEffect)(()=>{if(!t)return;let{setBlockEditingMode:r,unsetBlockEditingMode:o,__unstableMarkNextChangeAsNotPersistent:n}=e.dispatch(AH.store);return n(),r(t,"contentOnly"),()=>{n(),o(t)}},[e,t])}var kge=a(H(),1),Kw=a(An(),1),Pge=["wp_block","wp_template","wp_template_part"];function Rge(e,t){(0,kge.useEffect)(()=>((0,Kw.addFilter)("blockEditor.__unstableCanInsertBlockType","removeTemplatePartsFromInserter",(r,o)=>!Pge.includes(e)&&o.name==="core/template-part"&&t==="post-only"?!1:r),(0,Kw.addFilter)("blockEditor.__unstableCanInsertBlockType","removePostContentFromInserter",(r,o,n,{getBlockParentsByBlockName:i})=>!Pge.includes(e)&&o.name==="core/post-content"?i(n,"core/query").length>0:r),()=>{(0,Kw.removeFilter)("blockEditor.__unstableCanInsertBlockType","removeTemplatePartsFromInserter"),(0,Kw.removeFilter)("blockEditor.__unstableCanInsertBlockType","removePostContentFromInserter")}),[e,t])}var Uge=a(G(),1),gN=a(H(),1),vN=a(kt(),1);var Wl=class{diff(t,r,o={}){let n;typeof o=="function"?(n=o,o={}):"callback"in o&&(n=o.callback);let i=this.castInput(t,o),s=this.castInput(r,o),l=this.removeEmpty(this.tokenize(i,o)),c=this.removeEmpty(this.tokenize(s,o));return this.diffWithOptionsObj(l,c,o,n)}diffWithOptionsObj(t,r,o,n){var i;let s=y=>{if(y=this.postProcess(y,o),n){setTimeout(function(){n(y)},0);return}else return y},l=r.length,c=t.length,u=1,d=l+c;o.maxEditLength!=null&&(d=Math.min(d,o.maxEditLength));let f=(i=o.timeout)!==null&&i!==void 0?i:1/0,m=Date.now()+f,h=[{oldPos:-1,lastComponent:void 0}],g=this.extractCommon(h[0],r,t,0,o);if(h[0].oldPos+1>=c&&g+1>=l)return s(this.buildValues(h[0].lastComponent,r,t));let v=-1/0,b=1/0,S=()=>{for(let y=Math.max(v,-u);y<=Math.min(b,u);y+=2){let w,_=h[y-1],x=h[y+1];_&&(h[y-1]=void 0);let E=!1;if(x){let A=x.oldPos-y;E=x&&0<=A&&A<l}let O=_&&_.oldPos+1<c;if(!E&&!O){h[y]=void 0;continue}if(!O||E&&_.oldPos<x.oldPos?w=this.addToPath(x,!0,!1,0,o):w=this.addToPath(_,!1,!0,1,o),g=this.extractCommon(w,r,t,y,o),w.oldPos+1>=c&&g+1>=l)return s(this.buildValues(w.lastComponent,r,t))||!0;h[y]=w,w.oldPos+1>=c&&(b=Math.min(b,y-1)),g+1>=l&&(v=Math.max(v,y+1))}u++};if(n)(function y(){setTimeout(function(){if(u>d||Date.now()>m)return n(void 0);S()||y()},0)})();else for(;u<=d&&Date.now()<=m;){let y=S();if(y)return y}}addToPath(t,r,o,n,i){let s=t.lastComponent;return s&&!i.oneChangePerToken&&s.added===r&&s.removed===o?{oldPos:t.oldPos+n,lastComponent:{count:s.count+1,added:r,removed:o,previousComponent:s.previousComponent}}:{oldPos:t.oldPos+n,lastComponent:{count:1,added:r,removed:o,previousComponent:s}}}extractCommon(t,r,o,n,i){let s=r.length,l=o.length,c=t.oldPos,u=c-n,d=0;for(;u+1<s&&c+1<l&&this.equals(o[c+1],r[u+1],i);)u++,c++,d++,i.oneChangePerToken&&(t.lastComponent={count:1,previousComponent:t.lastComponent,added:!1,removed:!1});return d&&!i.oneChangePerToken&&(t.lastComponent={count:d,previousComponent:t.lastComponent,added:!1,removed:!1}),t.oldPos=c,u}equals(t,r,o){return o.comparator?o.comparator(t,r):t===r||!!o.ignoreCase&&t.toLowerCase()===r.toLowerCase()}removeEmpty(t){let r=[];for(let o=0;o<t.length;o++)t[o]&&r.push(t[o]);return r}castInput(t,r){return t}tokenize(t,r){return Array.from(t)}join(t){return t.join("")}postProcess(t,r){return t}get useLongestToken(){return!1}buildValues(t,r,o){let n=[],i;for(;t;)n.push(t),i=t.previousComponent,delete t.previousComponent,t=i;n.reverse();let s=n.length,l=0,c=0,u=0;for(;l<s;l++){let d=n[l];if(d.removed)d.value=this.join(o.slice(u,u+d.count)),u+=d.count;else{if(!d.added&&this.useLongestToken){let f=r.slice(c,c+d.count);f=f.map(function(m,h){let g=o[u+h];return g.length>m.length?g:m}),d.value=this.join(f)}else d.value=this.join(r.slice(c,c+d.count));c+=d.count,d.added||(u+=d.count)}}return n}};var IH=class extends Wl{},hKe=new IH;function OH(e,t,r){return hKe.diff(e,t,r)}function NH(e,t){let r;for(r=0;r<e.length&&r<t.length;r++)if(e[r]!=t[r])return e.slice(0,r);return e.slice(0,r)}function MH(e,t){let r;if(!e||!t||e[e.length-1]!=t[t.length-1])return"";for(r=0;r<e.length&&r<t.length;r++)if(e[e.length-(r+1)]!=t[t.length-(r+1)])return e.slice(-r);return e.slice(-r)}function dN(e,t,r){if(e.slice(0,t.length)!=t)throw Error(`string ${JSON.stringify(e)} doesn't start with prefix ${JSON.stringify(t)}; this is a bug`);return r+e.slice(t.length)}function fN(e,t,r){if(!t)return e+r;if(e.slice(-t.length)!=t)throw Error(`string ${JSON.stringify(e)} doesn't end with suffix ${JSON.stringify(t)}; this is a bug`);return e.slice(0,-t.length)+r}function Zw(e,t){return dN(e,t,"")}function _T(e,t){return fN(e,t,"")}function FH(e,t){return t.slice(0,gKe(e,t))}function gKe(e,t){let r=0;e.length>t.length&&(r=e.length-t.length);let o=t.length;e.length<t.length&&(o=e.length);let n=Array(o),i=0;n[0]=0;for(let s=1;s<o;s++){for(t[s]==t[i]?n[s]=n[i]:n[s]=i;i>0&&t[s]!=t[i];)i=n[i];t[s]==t[i]&&i++}i=0;for(let s=r;s<e.length;s++){for(;i>0&&e[s]!=t[i];)i=n[i];e[s]==t[i]&&i++}return i}function DH(e,t){let r=[];for(let o of Array.from(t.segment(e))){let n=o.segment;r.length&&/\s/.test(r[r.length-1])&&/\s/.test(n)?r[r.length-1]+=n:r.push(n)}return r}function mN(e,t){if(t)return Xw(e,t)[1];let r;for(r=e.length-1;r>=0&&e[r].match(/\s/);r--);return e.substring(r+1)}function yb(e,t){if(t)return Xw(e,t)[0];let r=e.match(/^\s*/);return r?r[0]:""}function Xw(e,t){if(!t)return[yb(e),mN(e)];if(t.resolvedOptions().granularity!="word")throw new Error('The segmenter passed must have a granularity of "word"');let r=DH(e,t),o=r[0],n=r[r.length-1],i=/\s/.test(o)?o:"",s=/\s/.test(n)?n:"";return[i,s]}var pN="a-zA-Z0-9_\\u{AD}\\u{C0}-\\u{D6}\\u{D8}-\\u{F6}\\u{F8}-\\u{2C6}\\u{2C8}-\\u{2D7}\\u{2DE}-\\u{2FF}\\u{1E00}-\\u{1EFF}",vKe=new RegExp(`[${pN}]+|\\s+|[^${pN}]`,"ug"),LH=class extends Wl{equals(t,r,o){return o.ignoreCase&&(t=t.toLowerCase(),r=r.toLowerCase()),t.trim()===r.trim()}tokenize(t,r={}){let o;if(r.intlSegmenter){let s=r.intlSegmenter;if(s.resolvedOptions().granularity!="word")throw new Error('The segmenter passed must have a granularity of "word"');o=DH(t,s)}else o=t.match(vKe)||[];let n=[],i=null;return o.forEach(s=>{/\s/.test(s)?i==null?n.push(s):n.push(n.pop()+s):i!=null&&/\s/.test(i)?n[n.length-1]==i?n.push(n.pop()+s):n.push(i+s):n.push(s),i=s}),n}join(t){return t.map((r,o)=>o==0?r:r.replace(/^\s+/,"")).join("")}postProcess(t,r){if(!t||r.oneChangePerToken)return t;let o=null,n=null,i=null;return t.forEach(s=>{s.added?n=s:s.removed?i=s:((n||i)&&Age(o,i,n,s,r.intlSegmenter),o=s,n=null,i=null)}),(n||i)&&Age(o,i,n,null,r.intlSegmenter),t}},bKe=new LH;function Age(e,t,r,o,n){if(t&&r){let[i,s]=Xw(t.value,n),[l,c]=Xw(r.value,n);if(e){let u=NH(i,l);e.value=fN(e.value,l,u),t.value=Zw(t.value,u),r.value=Zw(r.value,u)}if(o){let u=MH(s,c);o.value=dN(o.value,c,u),t.value=_T(t.value,u),r.value=_T(r.value,u)}}else if(r){if(e){let i=yb(r.value,n);r.value=r.value.substring(i.length)}if(o){let i=yb(o.value,n);o.value=o.value.substring(i.length)}}else if(e&&o){let i=yb(o.value,n),[s,l]=Xw(t.value,n),c=NH(i,s);t.value=Zw(t.value,c);let u=MH(Zw(i,c),l);t.value=_T(t.value,u),o.value=dN(o.value,i,u),e.value=fN(e.value,i,i.slice(0,i.length-u.length))}else if(o){let i=yb(o.value,n),s=mN(t.value,n),l=FH(s,i);t.value=_T(t.value,l)}else if(e){let i=mN(e.value,n),s=yb(t.value,n),l=FH(i,s);t.value=Zw(t.value,l)}}var BH=class extends Wl{tokenize(t){let r=new RegExp(`(\\r?\\n)|[${pN}]+|[^\\S\\n\\r]+|[^${pN}]`,"ug");return t.match(r)||[]}},Ige=new BH;function Qw(e,t,r){return Ige.diff(e,t,r)}var VH=class extends Wl{constructor(){super(...arguments),this.tokenize=wKe}equals(t,r,o){return o.ignoreWhitespace?((!o.newlineIsToken||!t.includes(`
57 `))&&(t=t.trim()),(!o.newlineIsToken||!r.includes(`
58 `))&&(r=r.trim())):o.ignoreNewlineAtEof&&!o.newlineIsToken&&(t.endsWith(`
59 `)&&(t=t.slice(0,-1)),r.endsWith(`
60 `)&&(r=r.slice(0,-1))),super.equals(t,r,o)}},yKe=new VH;function Oge(e,t,r){return yKe.diff(e,t,r)}function wKe(e,t){t.stripTrailingCr&&(e=e.replace(/\r\n/g,`
61 `));let r=[],o=e.split(/(\n|\r\n)/);o[o.length-1]||o.pop();for(let n=0;n<o.length;n++){let i=o[n];n%2&&!t.newlineIsToken?r[r.length-1]+=i:r.push(i)}return r}var jH=class extends Wl{tokenize(t){return t.slice()}join(t){return t}removeEmpty(t){return t}},Nge=new jH;function xT(e,t,r){return Nge.diff(e,t,r)}var zH=a(Fge(),1),hN=a(kt(),1),Tn=a(CT(),1),Zi=a(V(),1);var{parseRawBlock:Vge}=Y(hN.privateApis);function Lge(e){return e.blockName===null&&(!e.innerHTML||!e.innerHTML.trim())}function Bge(e){return e==null?"":typeof e=="object"?JSON.stringify(e,null,2):String(e)}function SKe(e,t){if(!e&&!t)return 1;if(!e||!t)return 0;let r=new Intl.Segmenter(void 0,{granularity:"word"}),o=/[\p{L}\p{N}]/u,n=d=>{let f=[];for(let{segment:m,isWordLike:h}of r.segment(d))(h||o.test(m))&&f.push(m);return f},i=n(e),s=n(t);if(i.length===0&&s.length===0)return 1;let l=new Set(i),c=0;for(let d of s)l.has(d)&&c++;let u=Math.max(i.length,s.length);return u>0?c/u:0}function _Ke(e){let t=[],r=[];if(e.forEach((d,f)=>{let m=d.__revisionDiffStatus?.status;m==="removed"?t.push({block:d,index:f}):m==="added"&&r.push({block:d,index:f})}),t.length===0||r.length===0)return e;let o=new Set,n=new Set,i=new Map,s=.5,l=new Map;for(let d of r){let f=d.block.blockName;l.has(f)||l.set(f,[]),l.get(f).push(d)}let c=new Map;for(let d of t){let f=d.block.blockName;c.has(f)||c.set(f,[]),c.get(f).push(d)}let u=-1;for(let d of t){let f=l.get(d.block.blockName)||[],m=c.get(d.block.blockName)||[],h=f.filter(v=>!i.has(v.index)&&v.index>u);if(h.length===0)continue;let g=null;if(m.length===1&&h.length===1){let v=h[0],b=JSON.stringify(d.block.attrs)===JSON.stringify(v.block.attrs);(!((d.block.innerHTML||"")===(v.block.innerHTML||""))||!b)&&(g=v)}else{let v=0;for(let b of h){let S=SKe(d.block.innerHTML||"",b.block.innerHTML||""),y=JSON.stringify(d.block.attrs)===JSON.stringify(b.block.attrs);S>v&&S>s&&(S<1||!y)&&(v=S,g=b)}}if(g){u=g.index;let v={...g.block,__revisionDiffStatus:{status:"modified"},__previousRawBlock:d.block},b=Math.min(d.index,g.index),S=Math.max(d.index,g.index),y=!1;for(let w=b+1;w<S;w++){let _=e[w].__revisionDiffStatus?.status;if(_===void 0){y=!0;break}if(_==="added"&&!n.has(w)){y=!0;break}}y?(i.set(g.index,v),o.add(d.index)):(i.set(d.index,v),n.add(g.index))}}return e.map((d,f)=>o.has(f)||n.has(f)?null:i.has(f)?i.get(f):d).filter(Boolean)}function jge(e,t){e=e.filter(u=>!Lge(u)),t=t.filter(u=>!Lge(u));let r=u=>JSON.stringify({name:u.blockName,attrs:u.attrs,html:(u.innerContent||[]).filter(d=>d!==null&&d.trim()!=="")}),o=e.map(r),n=t.map(r),i=xT(n,o),s=[],l=0,c=0;for(let u of i)if(u.added)for(let d=0;d<u.count;d++)s.push({...e[l++],__revisionDiffStatus:{status:"added"}});else if(u.removed)for(let d=0;d<u.count;d++)s.push({...t[c++],__revisionDiffStatus:{status:"removed"}});else for(let d=0;d<u.count;d++){let f=e[l++],m=t[c++],h=jge(f.innerBlocks||[],m.innerBlocks||[]);s.push({...f,innerBlocks:h})}return _Ke(s)}function xKe(e,t,r,o){let n=e[r]||[],i=t[o]||[];if(n.length!==i.length)return!0;for(let s of n)if(!i.find(c=>c.type===s.type&&JSON.stringify(c.attributes)===JSON.stringify(s.attributes)))return!0;return!1}function CKe(e,t,r,o){let n=e[r]||[],i=t[o]||[],s=0,l=0,c=0;for(let d of n){let f=i.find(m=>m.type===d.type);f?JSON.stringify(d.attributes)!==JSON.stringify(f.attributes)&&c++:s++}for(let d of i)n.find(m=>m.type===d.type)||l++;if(s>0&&l===0&&c===0)return{type:"added",description:(0,Zi.sprintf)((0,Zi._n)("%d format added","%d formats added",s),s)};if(l>0&&s===0&&c===0)return{type:"removed",description:(0,Zi.sprintf)((0,Zi._n)("%d format removed","%d formats removed",l),l)};let u=[];return s>0&&u.push((0,Zi.sprintf)((0,Zi._n)("%d format added","%d formats added",s),s)),l>0&&u.push((0,Zi.sprintf)((0,Zi._n)("%d format removed","%d formats removed",l),l)),c>0&&u.push((0,Zi.sprintf)((0,Zi._n)("%d format changed","%d formats changed",c),c)),{type:"changed",description:u.join(", ")||(0,Zi.__)("Formatting changed")}}function TKe(e,t){let r=e.toPlainText(),o=t.toPlainText(),n=Qw(o,r),i=(0,Tn.create)({text:""}),s=0,l=0;for(let c of n)if(c.removed){let u=(0,Tn.slice)(t,l,l+c.value.length),d=(0,Tn.applyFormat)(u,{type:"revision/diff-removed",attributes:{title:(0,Zi.__)("Removed")}},0,c.value.length);i=(0,Tn.concat)(i,d),l+=c.value.length}else if(c.added){let u=(0,Tn.slice)(e,s,s+c.value.length),d=(0,Tn.applyFormat)(u,{type:"revision/diff-added",attributes:{title:(0,Zi.__)("Added")}},0,c.value.length);i=(0,Tn.concat)(i,d),s+=c.value.length}else{let u=e.formats||[],d=t.formats||[],f=c.value.length,m=v=>xKe(u,d,s+v,l+v),h=0,g=m(0);for(let v=1;v<=f;v++){let b=v<f&&m(v);if(v===f||b!==g){let S=(0,Tn.slice)(e,s+h,s+v);if(g){let{type:y,description:w}=CKe(u,d,s+h,l+h),_={added:"revision/diff-format-added",removed:"revision/diff-format-removed",changed:"revision/diff-format-changed"}[y],x=(0,Tn.applyFormat)(S,{type:_,attributes:{title:w}},0,v-h);i=(0,Tn.concat)(i,x)}else i=(0,Tn.concat)(i,S);h=v,g=b}}s+=c.value.length,l+=c.value.length}return new Tn.RichTextData(i)}function EKe(e,t,r){let o=(0,hN.getBlockType)(e.name);if(!o)return;let n={};for(let[i,s]of Object.entries(o.attributes))if(s.source==="rich-text"){let l=e.attributes[i],c=t.attributes[i];l instanceof Tn.RichTextData&&c instanceof Tn.RichTextData&&(e.attributes[i]=TKe(l,c))}else{let l=Bge(e.attributes[i]),c=Bge(t.attributes[i]);l!==c&&(n[i]=Qw(c,l))}Object.keys(n).length>0&&(r.changedAttributes=n)}function zge(e,t){if(t.__revisionDiffStatus){if(t.__revisionDiffStatus.status==="modified"&&t.__previousRawBlock){let r=Vge(t.__previousRawBlock);r&&EKe(e,r,t.__revisionDiffStatus)}e.__revisionDiffStatus=t.__revisionDiffStatus,e.attributes.__revisionDiffStatus=t.__revisionDiffStatus}if(e.innerBlocks&&t.innerBlocks)for(let r=0;r<e.innerBlocks.length;r++){let o=e.innerBlocks[r],n=t.innerBlocks[r];o&&n&&zge(o,n)}}function Hge(e,t){let r=(0,zH.parse)(e||""),o=(0,zH.parse)(t||"");return jge(r,o).map(i=>{let s=Vge(i);return s&&zge(s,i),s}).filter(Boolean)}function HH(e,t){if(!t?.length||!e?.length)return e;let r=e.map(c=>c.name),o=t.map(c=>c.name),n=xT(o,r),i=0,s=0,l=[];for(let c of n)if(c.removed)s+=c.count;else if(c.added)for(let u=0;u<c.count;u++)l.push(e[i++]);else for(let u=0;u<c.count;u++){let d=e[i++],f=t[s++];l.push({...d,clientId:f.clientId,innerBlocks:HH(d.innerBlocks,f.innerBlocks)})}return l}function Wge(){let{isInRevisionsMode:e,showDiff:t,revision:r,previousRevision:o,postType:n}=(0,Uge.useSelect)(l=>{let{isRevisionsMode:c,isShowingRevisionDiff:u,getCurrentRevision:d,getPreviousRevision:f}=Y(l(R)),{getCurrentPostType:m}=l(R),h=c();return{isInRevisionsMode:h,showDiff:u(),revision:h?d():void 0,previousRevision:h?f():void 0,postType:m()}},[]),i=(0,gN.useRef)([]);return(0,gN.useMemo)(()=>{if(!e)return i.current=[],null;if(!r)return[];let l=r?.content?.raw??"",c;if(t){let d=o?.content?.raw||"";c=Hge(l,d)}else c=(0,vN.parse)(l);n==="wp_navigation"&&(c=[(0,vN.createBlock)("core/navigation",{templateLock:!1},c)]);let u=HH(c,i.current);return i.current=u,u},[e,r,r?.content?.raw,o?.content?.raw,n,t])}var xa=a(G(),1),Ot=a(V(),1);var PT=a(UH(),1),YH=a(Nt(),1),eve=a(Rt(),1),tve=a(pe(),1),Jw=a(oe(),1);var bN=a(Lt(),1);var TT=a(G(),1),Yge=a(mc(),1),qge=a(oe(),1);var Kge=a(T(),1),{RenamePatternModal:PKe}=Y(Yge.privateApis),WH="editor/pattern-rename";function Zge(){let e=(0,TT.useSelect)(n=>n(ze).isModalActive(WH)),{record:t,postType:r}=(0,TT.useSelect)(n=>{if(!e)return{};let{getCurrentPostType:i,getCurrentPostId:s}=n(R),{getEditedEntityRecord:l}=n(qge.store),c=i();return{record:l("postType",c,s()),postType:c}},[e]),{closeModal:o}=(0,TT.useDispatch)(ze);return!e||r!==yu?null:(0,Kge.jsx)(PKe,{onClose:o,pattern:t})}var ET=a(G(),1),Xge=a(mc(),1),Qge=a(oe(),1);var Jge=a(T(),1),{DuplicatePatternModal:kKe}=Y(Xge.privateApis),GH="editor/pattern-duplicate";function $ge(){let e=(0,ET.useSelect)(n=>n(ze).isModalActive(GH)),{record:t,postType:r}=(0,ET.useSelect)(n=>{if(!e)return{};let{getCurrentPostType:i,getCurrentPostId:s}=n(R),{getEditedEntityRecord:l}=n(Qge.store),c=i();return{record:l("postType",c,s()),postType:c}},[e]),{closeModal:o}=(0,ET.useDispatch)(ze);return!e||r!==yu?null:(0,Jge.jsx)(kKe,{onClose:o,onSuccess:()=>o(),pattern:t})}var RKe=()=>function(){let{editorMode:t,isListViewOpen:r,showBlockBreadcrumbs:o,isDistractionFree:n,isFocusMode:i,isPreviewMode:s,isViewable:l,isCodeEditingEnabled:c,isRichEditingEnabled:u,isPublishSidebarEnabled:d}=(0,xa.useSelect)(I=>{let{get:k}=I(YH.store),{isListViewOpened:P,getCurrentPostType:N,getEditorSettings:U}=I(R),{getSettings:F}=I(tve.store),{getPostType:D}=I(Jw.store);return{editorMode:k("core","editorMode")??"visual",isListViewOpen:P(),showBlockBreadcrumbs:k("core","showBlockBreadcrumbs"),isDistractionFree:k("core","distractionFree"),isFocusMode:k("core","focusMode"),isPreviewMode:F().isPreviewMode,isViewable:D(N())?.viewable??!1,isCodeEditingEnabled:U().codeEditingEnabled,isRichEditingEnabled:U().richEditingEnabled,isPublishSidebarEnabled:I(R).isPublishSidebarEnabled()}},[]),{getActiveComplementaryArea:f}=(0,xa.useSelect)(ze),{toggle:m}=(0,xa.useDispatch)(YH.store),{createInfoNotice:h}=(0,xa.useDispatch)(eve.store),{__unstableSaveForPreview:g,setIsListViewOpened:v,switchEditorMode:b,toggleDistractionFree:S,toggleSpotlightMode:y,toggleTopToolbar:w}=(0,xa.useDispatch)(R),{openModal:_,enableComplementaryArea:x,disableComplementaryArea:E}=(0,xa.useDispatch)(ze),{getCurrentPostId:O}=(0,xa.useSelect)(R),A=c&&u;if(s)return{commands:[],isLoading:!1};let C=[];return C.push({name:"core/open-shortcut-help",label:(0,Ot.__)("Keyboard shortcuts"),icon:ax,category:"view",callback:({close:I})=>{I(),_("editor/keyboard-shortcut-help")}}),C.push({name:"core/toggle-distraction-free",label:n?(0,Ot.__)("Exit Distraction free"):(0,Ot.__)("Enter Distraction free"),category:"command",callback:({close:I})=>{S(),I()}}),C.push({name:"core/open-preferences",label:(0,Ot.__)("Editor preferences"),category:"view",callback:({close:I})=>{I(),_("editor/preferences")}}),C.push({name:"core/toggle-spotlight-mode",label:i?(0,Ot.__)("Exit Spotlight mode"):(0,Ot.__)("Enter Spotlight mode"),category:"command",callback:({close:I})=>{y(),I()}}),C.push({name:"core/toggle-list-view",label:r?(0,Ot.__)("Close List View"):(0,Ot.__)("Open List View"),icon:lx,category:"command",callback:({close:I})=>{v(!r),I(),h(r?(0,Ot.__)("List View off."):(0,Ot.__)("List View on."),{id:"core/editor/toggle-list-view/notice",type:"snackbar"})}}),C.push({name:"core/toggle-top-toolbar",label:(0,Ot.__)("Top toolbar"),category:"command",callback:({close:I})=>{w(),I()}}),A&&C.push({name:"core/toggle-code-editor",label:t==="visual"?(0,Ot.__)("Open code editor"):(0,Ot.__)("Exit code editor"),icon:R4,category:"command",callback:({close:I})=>{b(t==="visual"?"text":"visual"),I()}}),C.push({name:"core/toggle-breadcrumbs",label:o?(0,Ot.__)("Hide block breadcrumbs"):(0,Ot.__)("Show block breadcrumbs"),category:"command",callback:({close:I})=>{m("core","showBlockBreadcrumbs"),I(),h(o?(0,Ot.__)("Breadcrumbs hidden."):(0,Ot.__)("Breadcrumbs visible."),{id:"core/editor/toggle-breadcrumbs/notice",type:"snackbar"})}}),C.push({name:"core/open-settings-sidebar",label:(0,Ot.__)("Show or hide the Settings panel"),icon:(0,Ot.isRTL)()?_g:Yd,category:"command",callback:({close:I})=>{let k=f("core");I(),k==="edit-post/document"?E("core"):x("core","edit-post/document")}}),C.push({name:"core/open-block-inspector",label:(0,Ot.__)("Show or hide the Block settings panel"),icon:c4,category:"command",callback:({close:I})=>{let k=f("core");I(),k==="edit-post/block"?E("core"):x("core","edit-post/block")}}),C.push({name:"core/toggle-publish-sidebar",label:d?(0,Ot.__)("Disable pre-publish checks"):(0,Ot.__)("Enable pre-publish checks"),icon:rx,category:"command",callback:({close:I})=>{I(),m("core","isPublishSidebarEnabled"),h(d?(0,Ot.__)("Pre-publish checks disabled."):(0,Ot.__)("Pre-publish checks enabled."),{id:"core/editor/publish-sidebar/notice",type:"snackbar"})}}),l&&C.push({name:"core/preview-link",label:(0,Ot.__)("Preview in a new tab"),icon:Gs,category:"view",callback:async({close:I})=>{I();let k=O(),P=await g();window.open(P,`wp-preview-${k}`)}}),{commands:C,isLoading:!1}},AKe=()=>function(){let{postType:t}=(0,xa.useSelect)(n=>{let{getCurrentPostType:i}=n(R);return{postType:i()}},[]),{openModal:r}=(0,xa.useDispatch)(ze),o=[];return t===yu&&(o.push({name:"core/rename-pattern",label:(0,Ot.__)("Rename pattern"),icon:mx,category:"edit",callback:({close:n})=>{r(WH),n()}}),o.push({name:"core/duplicate-pattern",label:(0,Ot.__)("Duplicate pattern"),icon:Sx,category:"command",callback:({close:n})=>{r(GH),n()}})),{isLoading:!1,commands:o}},IKe=()=>function(){let{onNavigateToEntityRecord:t,goBack:r,templateId:o,isPreviewMode:n,canEditTemplate:i}=(0,xa.useSelect)(u=>{let{getRenderingMode:d,getEditorSettings:f,getCurrentTemplateId:m}=Y(u(R)),h=f(),g=m();return{isTemplateHidden:d()==="post-only",onNavigateToEntityRecord:h.onNavigateToEntityRecord,getEditorSettings:f,goBack:h.onNavigateToPreviousEntityRecord,templateId:g,isPreviewMode:h.isPreviewMode,canEditTemplate:!!g&&u(Jw.store).canUser("update",{kind:"postType",name:"wp_template",id:g})}},[]),{editedRecord:s,hasResolved:l}=(0,Jw.useEntityRecord)("postType","wp_template",o);if(n)return{isLoading:!1,commands:[]};let c=[];return o&&l&&i&&c.push({name:"core/switch-to-template-focus",label:(0,Ot.sprintf)((0,Ot.__)("Edit template: %s"),(0,bN.decodeEntities)(s.title)),icon:ja,category:"edit",callback:({close:u})=>{t({postId:o,postType:"wp_template"}),u()}}),r&&c.push({name:"core/switch-to-previous-entity",label:(0,Ot.__)("Go back"),icon:Bm,category:"view",callback:({close:u})=>{r(),u()}}),{isLoading:!1,commands:c}},OKe=()=>function(){let{postType:t,postId:r}=(0,xa.useSelect)(l=>{let{getCurrentPostId:c,getCurrentPostType:u}=l(R);return{postType:u(),postId:c()}},[]),{editedRecord:o,hasResolved:n}=(0,Jw.useEntityRecord)("postType",t,r),{revertTemplate:i}=Y((0,xa.useDispatch)(R));if(!n||![In,lr].includes(t))return{isLoading:!0,commands:[]};let s=[];if(a2(o)){let l=o.type===lr?(0,Ot.sprintf)((0,Ot.__)("Reset template: %s"),(0,bN.decodeEntities)(o.title)):(0,Ot.sprintf)((0,Ot.__)("Reset template part: %s"),(0,bN.decodeEntities)(o.title));s.push({name:"core/reset-template",label:l,icon:(0,Ot.isRTL)()?gx:hx,category:"command",callback:({close:c})=>{i(o),c()}})}return{isLoading:!n,commands:s}};function rve(){(0,PT.useCommandLoader)({name:"core/editor/edit-ui",hook:RKe()}),(0,PT.useCommandLoader)({name:"core/editor/contextual-commands",hook:AKe(),context:"entity-edit"}),(0,PT.useCommandLoader)({name:"core/editor/page-content-focus",hook:IKe(),context:"entity-edit"}),(0,PT.useCommandLoader)({name:"core/edit-site/manipulate-document",hook:OKe()})}var yN=a(G(),1),ove=a(H(),1),nve=a(Rx(),1);var $w="upload-in-progress";function ive(){let e=(0,yN.useSelect)(i=>i(nve.store).isUploading(),[]),{lockPostSaving:t,unlockPostSaving:r,lockPostAutosaving:o,unlockPostAutosaving:n}=(0,yN.useDispatch)(R);(0,ove.useEffect)(()=>(e?(t($w),o($w)):(r($w),n($w)),()=>{r($w),n($w)}),[e,t,r,o,n])}var sve=a(H(),1),ave=a(G(),1),qH=a(Rx(),1);function lve(){let e=window.__clientSideMediaProcessing,t=(0,ave.useRegistry)();(0,sve.useEffect)(()=>{if(!e)return;let r=()=>{Y(t.dispatch(qH.store)).pauseQueue()},o=()=>{Y(t.dispatch(qH.store)).resumeQueue()};return window.addEventListener("offline",r),window.addEventListener("online",o),()=>{window.removeEventListener("offline",r),window.removeEventListener("online",o)}},[e,t])}var wb=a(V(),1),cve=a(pe(),1),uve=a(G(),1),dve=a(H(),1);var fve=a(T(),1),{BlockRemovalWarningModal:NKe}=Y(cve.privateApis),MKe=["core/post-content","core/post-template","core/query"],FKe=[{postTypes:["wp_template","wp_template_part"],callback(e){if(e.filter(({name:o})=>o==="core/post-content").length)return{description:(0,wb.__)("This block displays the content of posts and pages using this template."),warning:(0,wb.__)("If you delete it, posts or pages using this template will not display any content."),subtext:(0,wb.__)("Visitors will see blank pages."),requireConfirmation:!0};if(e.filter(({name:o})=>MKe.includes(o)).length)return(0,wb._n)("Deleting this block will stop your post or page content from displaying on this template. It is not recommended.","Some of the deleted blocks will stop your post or page content from displaying on this template. It is not recommended.",e.length)}},{postTypes:["wp_block"],callback(e){if(e.filter(({attributes:r})=>r?.metadata?.bindings&&Object.values(r.metadata.bindings).some(o=>o.source==="core/pattern-overrides")).length)return(0,wb._n)("The deleted block allows instance overrides. Removing it may result in content not displaying where this pattern is used. Are you sure you want to proceed?","Some of the deleted blocks allow instance overrides. Removing them may result in content not displaying where this pattern is used. Are you sure you want to proceed?",e.length)}}];function mve(){let e=(0,uve.useSelect)(r=>r(R).getCurrentPostType(),[]),t=(0,dve.useMemo)(()=>FKe.filter(r=>r.postTypes.includes(e)),[e]);return t?(0,fve.jsx)(NKe,{rules:t}):null}var _h=a(W(),1),KH=a(V(),1),Sb=a(H(),1),wN=a(pe(),1),wd=a(G(),1),ZH=a(oe(),1),pve=a(kt(),1),XH=a(Nt(),1);var yd=a(T(),1);function DKe(){let{blockPatternsWithPostContentBlockType:e,postType:t}=(0,wd.useSelect)(r=>{let{getPatternsByBlockTypes:o,getBlocksByName:n}=r(wN.store),{getCurrentPostType:i,getRenderingMode:s}=r(R),l=s()==="post-only"?"":n("core/post-content")?.[0];return{blockPatternsWithPostContentBlockType:o("core/post-content",l),postType:i()}},[]);return(0,Sb.useMemo)(()=>e?.length?e.filter(r=>t==="page"&&!r.postTypes||Array.isArray(r.postTypes)&&r.postTypes.includes(t)):[],[t,e])}function LKe({blockPatterns:e,onChoosePattern:t}){let{editEntityRecord:r}=(0,wd.useDispatch)(ZH.store),{postType:o,postId:n}=(0,wd.useSelect)(i=>{let{getCurrentPostType:s,getCurrentPostId:l}=i(R);return{postType:s(),postId:l()}},[]);return(0,yd.jsx)(wN.__experimentalBlockPatternsList,{blockPatterns:e,onClickPattern:(i,s)=>{r("postType",o,n,{blocks:s,content:({blocks:l=[]})=>(0,pve.__unstableSerializeAndClean)(l)}),t()}})}function BKe({onClose:e}){let[t,r]=(0,Sb.useState)(!0),{set:o}=(0,wd.useDispatch)(XH.store),n=DKe();if(!(n.length>0))return null;function s(){e(),o("core","enableChoosePatternModal",t)}return(0,yd.jsxs)(_h.Modal,{className:"editor-start-page-options__modal",title:(0,KH.__)("Choose a pattern"),isFullScreen:!0,onRequestClose:s,children:[(0,yd.jsx)("div",{className:"editor-start-page-options__modal-content",children:(0,yd.jsx)(LKe,{blockPatterns:n,onChoosePattern:s})}),(0,yd.jsx)(_h.Flex,{className:"editor-start-page-options__modal__actions",justify:"flex-start",expanded:!1,children:(0,yd.jsx)(_h.FlexItem,{children:(0,yd.jsx)(_h.CheckboxControl,{checked:t,label:(0,KH.__)("Always show starter patterns for new pages"),onChange:l=>{r(l)}})})})]})}function hve(){let[e,t]=(0,Sb.useState)(!1),{isEditedPostEmpty:r}=(0,wd.useSelect)(R),{getEntityRecordNonTransientEdits:o}=(0,wd.useSelect)(ZH.store),{isModalActive:n}=(0,wd.useSelect)(ze),{enabled:i,postType:s,postId:l}=(0,wd.useSelect)(c=>{let{getCurrentPostId:u,getCurrentPostType:d}=c(R),f=c(XH.store).get("core","enableChoosePatternModal"),m=d();return{postType:m,postId:u(),enabled:f&&vl!==m&&lr!==m&&In!==m}},[]);return(0,Sb.useEffect)(()=>{let u=!(Object.keys(o("postType",s,l)??{}).length>0)&&r(),d=n("editor/preferences");!i||!u||d||t(!0)},[i,s,l,o,r,n]),e?(0,yd.jsx)(BKe,{onClose:()=>t(!1)}):null}var Cve=a(W(),1),Sd=a(V(),1),CN=a(fa(),1),kT=a(G(),1);var Gl=a(V(),1),gve=[{keyCombination:{modifier:"primary",character:"b"},description:(0,Gl.__)("Make the selected text bold.")},{keyCombination:{modifier:"primary",character:"i"},description:(0,Gl.__)("Make the selected text italic.")},{keyCombination:{modifier:"primary",character:"k"},description:(0,Gl.__)("Convert the selected text into a link.")},{keyCombination:{modifier:"primaryShift",character:"k"},description:(0,Gl.__)("Remove a link.")},{keyCombination:{character:"[["},description:(0,Gl.__)("Insert a link to a post or page.")},{keyCombination:{modifier:"primary",character:"u"},description:(0,Gl.__)("Underline the selected text.")},{keyCombination:{modifier:"access",character:"d"},description:(0,Gl.__)("Strikethrough the selected text.")},{keyCombination:{modifier:"access",character:"x"},description:(0,Gl.__)("Make the selected text inline code.")},{keyCombination:{modifier:"access",character:"0"},aliases:[{modifier:"access",character:"7"}],description:(0,Gl.__)("Convert the current heading to a paragraph.")},{keyCombination:{modifier:"access",character:"1-6"},description:(0,Gl.__)("Convert the current paragraph or heading to a heading of level 1 to 6.")},{keyCombination:{modifier:"primaryShift",character:"SPACE"},description:(0,Gl.__)("Add non breaking space.")}];var bve=a(H(),1),SN=a(go(),1),Yl=a(T(),1);function vve({keyCombination:e,forceAriaLabel:t}){let r=e.modifier?SN.displayShortcutList[e.modifier](e.character):e.character,o=e.modifier?SN.shortcutAriaLabel[e.modifier](e.character):e.character;return(0,Yl.jsx)("kbd",{className:"editor-keyboard-shortcut-help-modal__shortcut-key-combination","aria-label":t||o,children:(Array.isArray(r)?r:[r]).map((n,i)=>n==="+"?(0,Yl.jsx)(bve.Fragment,{children:n},i):(0,Yl.jsx)("kbd",{className:"editor-keyboard-shortcut-help-modal__shortcut-key",children:n},i))})}function VKe({description:e,keyCombination:t,aliases:r=[],ariaLabel:o}){return(0,Yl.jsxs)(Yl.Fragment,{children:[(0,Yl.jsx)("div",{className:"editor-keyboard-shortcut-help-modal__shortcut-description",children:e}),(0,Yl.jsxs)("div",{className:"editor-keyboard-shortcut-help-modal__shortcut-term",children:[(0,Yl.jsx)(vve,{keyCombination:t,forceAriaLabel:o}),r.map((n,i)=>(0,Yl.jsx)(vve,{keyCombination:n,forceAriaLabel:o},i))]})]})}var _N=VKe;var yve=a(G(),1),wve=a(fa(),1);var Sve=a(T(),1);function jKe({name:e}){let{keyCombination:t,description:r,aliases:o}=(0,yve.useSelect)(n=>{let{getShortcutKeyCombination:i,getShortcutDescription:s,getShortcutAliases:l}=n(wve.store);return{keyCombination:i(e),aliases:l(e),description:s(e)}},[e]);return t?(0,Sve.jsx)(_N,{keyCombination:t,description:r,aliases:o}):null}var _ve=jKe;var hi=a(T(),1),xve="editor/keyboard-shortcut-help",zKe=({shortcuts:e})=>(0,hi.jsx)("ul",{className:"editor-keyboard-shortcut-help-modal__shortcut-list",role:"list",children:e.map((t,r)=>(0,hi.jsx)("li",{className:"editor-keyboard-shortcut-help-modal__shortcut",children:typeof t=="string"?(0,hi.jsx)(_ve,{name:t}):(0,hi.jsx)(_N,{...t})},r))}),QH=({title:e,shortcuts:t,className:r})=>(0,hi.jsxs)("section",{className:Q("editor-keyboard-shortcut-help-modal__section",r),children:[!!e&&(0,hi.jsx)("h2",{className:"editor-keyboard-shortcut-help-modal__section-title",children:e}),(0,hi.jsx)(zKe,{shortcuts:t})]}),xN=({title:e,categoryName:t,additionalShortcuts:r=[]})=>{let o=(0,kT.useSelect)(n=>n(CN.store).getCategoryShortcuts(t),[t]);return(0,hi.jsx)(QH,{title:e,shortcuts:o.concat(r)})};function HKe(){let e=(0,kT.useSelect)(n=>n(ze).isModalActive(xve),[]),{openModal:t,closeModal:r}=(0,kT.useDispatch)(ze),o=()=>{e?r():t(xve)};return(0,CN.useShortcut)("core/editor/keyboard-shortcuts",o),e?(0,hi.jsxs)(Cve.Modal,{className:"editor-keyboard-shortcut-help-modal",title:(0,Sd.__)("Keyboard shortcuts"),closeButtonLabel:(0,Sd.__)("Close"),onRequestClose:o,children:[(0,hi.jsx)(QH,{className:"editor-keyboard-shortcut-help-modal__main-shortcuts",shortcuts:["core/editor/keyboard-shortcuts"]}),(0,hi.jsx)(xN,{title:(0,Sd.__)("Global shortcuts"),categoryName:"global"}),(0,hi.jsx)(xN,{title:(0,Sd.__)("Selection shortcuts"),categoryName:"selection"}),(0,hi.jsx)(xN,{title:(0,Sd.__)("Block shortcuts"),categoryName:"block",additionalShortcuts:[{keyCombination:{character:"/"},description:(0,Sd.__)("Change the block type after adding a new paragraph."),ariaLabel:(0,Sd.__)("Forward-slash")}]}),(0,hi.jsx)(QH,{title:(0,Sd.__)("Text formatting"),shortcuts:gve}),(0,hi.jsx)(xN,{title:(0,Sd.__)("List View shortcuts"),categoryName:"list-view"})]}):null}var Tve=HKe;var xh=a(W(),1),RT=a(V(),1),eS=a(H(),1),Eve=a(pe(),1),AT=a(G(),1),JH=a(kt(),1),_b=a(oe(),1);var _d=a(T(),1);function UKe(e,t=!1){return(0,AT.useSelect)(r=>{let{getEntityRecord:o,getDefaultTemplateId:n}=r(_b.store),i=n({slug:e,is_custom:t,ignore_empty:!0});return i?o("postType",lr,i)?.content?.raw:void 0},[e,t])}function WKe(e){let{slug:t,patterns:r}=(0,AT.useSelect)(i=>{let{getCurrentPostType:s,getCurrentPostId:l}=i(R),{getEntityRecord:c,getBlockPatterns:u}=i(_b.store),d=l(),f=s();return{slug:c("postType",f,d).slug,patterns:u()}},[]),o=(0,AT.useSelect)(i=>i(_b.store).getCurrentTheme().stylesheet);function n(i){return i.innerBlocks.find(s=>s.name==="core/template-part")&&(i.innerBlocks=i.innerBlocks.map(s=>(s.name==="core/template-part"&&s.attributes.theme===void 0&&(s.attributes.theme=o),s))),i.name==="core/template-part"&&i.attributes.theme===void 0&&(i.attributes.theme=o),i}return(0,eS.useMemo)(()=>[{name:"fallback",blocks:(0,JH.parse)(e),title:(0,RT.__)("Fallback content")},...r.filter(i=>Array.isArray(i.templateTypes)&&i.templateTypes.some(s=>t.startsWith(s))).map(i=>({...i,blocks:(0,JH.parse)(i.content).map(s=>n(s))}))],[e,t,r])}function GKe({fallbackContent:e,onChoosePattern:t,postType:r}){let[,,o]=(0,_b.useEntityBlockEditor)("postType",r),n=WKe(e);return(0,_d.jsx)(Eve.__experimentalBlockPatternsList,{blockPatterns:n,onClickPattern:(i,s)=>{o(s,{selection:void 0}),t()}})}function YKe({slug:e,isCustom:t,onClose:r,postType:o}){let n=UKe(e,t);return n?(0,_d.jsxs)(xh.Modal,{className:"editor-start-template-options__modal",title:(0,RT.__)("Choose a pattern"),closeLabel:(0,RT.__)("Cancel"),focusOnMount:"firstElement",onRequestClose:r,isFullScreen:!0,children:[(0,_d.jsx)("div",{className:"editor-start-template-options__modal-content",children:(0,_d.jsx)(GKe,{fallbackContent:n,slug:e,isCustom:t,postType:o,onChoosePattern:()=>{r()}})}),(0,_d.jsx)(xh.Flex,{className:"editor-start-template-options__modal__actions",justify:"flex-end",expanded:!1,children:(0,_d.jsx)(xh.FlexItem,{children:(0,_d.jsx)(xh.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:r,children:(0,RT.__)("Skip")})})})]}):null}function Pve(){let[e,t]=(0,eS.useState)(!1),{shouldOpenModal:r,slug:o,isCustom:n,postType:i,postId:s}=(0,AT.useSelect)(l=>{let{getCurrentPostType:c,getCurrentPostId:u}=l(R),d=c(),f=u(),{getEditedEntityRecord:m,getEntityRecordNonTransientEdits:h}=l(_b.store),g=m("postType",d,f);return{shouldOpenModal:!(Object.keys(h("postType",d,f)??{}).length>0)&&g.content===""&&lr===d,slug:g.slug,isCustom:g.is_custom,postType:d,postId:f}},[]);return(0,eS.useEffect)(()=>{t(!1)},[i,s]),!r||e?null:(0,_d.jsx)(YKe,{slug:o,isCustom:n,postType:i,onClose:()=>t(!0)})}var Ch=a(fa(),1),Th=a(G(),1);var kve=a(pe(),1);function tS(){let e=(0,Th.useSelect)(b=>{let{richEditingEnabled:S,codeEditingEnabled:y}=b(R).getEditorSettings();return!S||!y},[]),{getBlockSelectionStart:t}=(0,Th.useSelect)(kve.store),{getActiveComplementaryArea:r}=(0,Th.useSelect)(ze),{enableComplementaryArea:o,disableComplementaryArea:n}=(0,Th.useDispatch)(ze),{redo:i,undo:s,savePost:l,setIsListViewOpened:c,switchEditorMode:u,toggleDistractionFree:d}=(0,Th.useDispatch)(R),{isEditedPostDirty:f,isPostSavingLocked:m,isListViewOpened:h,getEditorMode:g,isSavingNonPostEntityChanges:v}=(0,Th.useSelect)(R);return(0,Ch.useShortcut)("core/editor/toggle-mode",()=>{u(g()==="visual"?"text":"visual")},{isDisabled:e}),(0,Ch.useShortcut)("core/editor/toggle-distraction-free",()=>{d()}),(0,Ch.useShortcut)("core/editor/undo",b=>{s(),b.preventDefault()}),(0,Ch.useShortcut)("core/editor/redo",b=>{i(),b.preventDefault()}),(0,Ch.useShortcut)("core/editor/save",b=>{b.preventDefault(),!(m()||v())&&f()&&l()}),(0,Ch.useShortcut)("core/editor/toggle-list-view",b=>{h()||(b.preventDefault(),c(!0))}),(0,Ch.useShortcut)("core/editor/toggle-sidebar",b=>{if(b.preventDefault(),["edit-post/document","edit-post/block"].includes(r("core")))n("core");else{let y=t()?"edit-post/block":"edit-post/document";o("core",y)}}),null}var Vve=a(G(),1),PN=a(pe(),1);var IT=a(G(),1),TN=a(pe(),1),Rve=a(oe(),1),EN=a(W(),1),xd=a(V(),1),Ave=a(Lt(),1),Ive=a(H(),1),xb=a(T(),1);function Ove({clientId:e,onClose:t}){let[r,o]=(0,Ive.useState)(!1),{getBlocks:n}=(0,IT.useSelect)(TN.store),{replaceBlocks:i}=(0,IT.useDispatch)(TN.store),{canRemove:s,templatePartTitle:l}=(0,IT.useSelect)(d=>{let{canRemoveBlock:f,getBlock:m}=d(TN.store),{getEntityRecord:h,getCurrentTheme:g}=d(Rve.store),v=m(e),{slug:b,theme:S}=v?.attributes??{},y=S||g()?.stylesheet,w=y&&b?`${y}//${b}`:null,_=w?h("postType","wp_template_part",w):null;return{canRemove:f(e),templatePartTitle:_?.title?.rendered?(0,Ave.decodeEntities)(_.title.rendered):null}},[e]);if(!s)return null;let c=l?(0,xd.sprintf)((0,xd.__)("Detach %s?"),l):(0,xd.__)("Detach template part?"),u=l?(0,xd.sprintf)((0,xd.__)("The blocks will be separated from the original template part and will be fully editable. Future changes to the %s template part will not apply here."),l):(0,xd.__)("The blocks will be separated from the original template part and will be fully editable. Future changes to the template part will not apply here.");return(0,xb.jsxs)(xb.Fragment,{children:[(0,xb.jsx)(EN.MenuItem,{onClick:()=>o(!0),children:(0,xd.__)("Detach")}),(0,xb.jsx)(EN.__experimentalConfirmDialog,{isOpen:r,onConfirm:()=>{i(e,n(e)),t()},onCancel:()=>o(!1),confirmButtonText:(0,xd.__)("Detach"),size:"medium",title:c,__experimentalHideHeader:!1,children:u})]})}var OT=a(G(),1),$H=a(pe(),1),Nve=a(W(),1),Mve=a(kt(),1),eU=a(V(),1),Fve=a(H(),1),Dve=a(Rt(),1);var Lve=a(oe(),1);var Cb=a(T(),1);function Bve({clientIds:e,blocks:t}){let[r,o]=(0,Fve.useState)(!1),{replaceBlocks:n}=(0,OT.useDispatch)($H.store),{createSuccessNotice:i}=(0,OT.useDispatch)(Dve.store),{isBlockBasedTheme:s,canCreate:l}=(0,OT.useSelect)(u=>({isBlockBasedTheme:u(Lve.store).getCurrentTheme()?.is_block_theme,canCreate:u($H.store).canInsertBlockType("core/template-part")}),[]);if(!s||!l)return null;let c=async u=>{n(e,(0,Mve.createBlock)("core/template-part",{slug:u.slug,theme:u.theme})),i((0,eU.__)("Template part created."),{type:"snackbar"})};return(0,Cb.jsxs)(Cb.Fragment,{children:[(0,Cb.jsx)(Nve.MenuItem,{icon:Eg,onClick:()=>{o(!0)},"aria-expanded":r,"aria-haspopup":"dialog",children:(0,eU.__)("Create template part")}),r&&(0,Cb.jsx)(_0,{closeModal:()=>{o(!1)},blocks:t,onCreate:c})]})}var NT=a(T(),1);function jve(){return(0,NT.jsx)(PN.BlockSettingsMenuControls,{children:({selectedClientIds:e,onClose:t})=>(0,NT.jsx)(qKe,{clientIds:e,onClose:t})})}function qKe({clientIds:e,onClose:t}){let{blocks:r}=(0,Vve.useSelect)(o=>{let{getBlocksByClientId:n}=o(PN.store);return{blocks:n(e)}},[e]);return r.length===1&&r[0]?.name==="core/template-part"?(0,NT.jsx)(Ove,{clientId:e[0],onClose:t}):(0,NT.jsx)(Bve,{clientIds:e,blocks:r})}var Hve=a(pe(),1),Uve=a(G(),1),Wve=a(H(),1);var zve=a(H(),1),kN=a(G(),1);function KKe({postType:e}){let{registerPostTypeSchema:t}=Y((0,kN.useDispatch)(R));(0,zve.useEffect)(()=>{t(e)},[t,e]);let{fields:r}=(0,kN.useSelect)(o=>{let{getEntityFields:n}=Y(o(R));return{fields:n("postType",e)}},[e]);return r}var rS=KKe;var tU=a(T(),1),{MediaEditorModal:ZKe,store:XKe}=Y(bw);function QKe(e){if(e==null)return NaN;let[t,r,...o]=String(e).split("/").map(Number);return t<=0||r<=0||Number.isNaN(t)||Number.isNaN(r)||o.length?NaN:r?t/r:t}function JKe({name:e,ratio:t}={}){let r=QKe(t);return!e||!Number.isFinite(r)||r<=0?null:{label:e,value:r}}function Gve(){return(0,Uve.useSelect)(t=>t(XKe).isOpen(),[])?(0,tU.jsx)($Ke,{}):null}function $Ke(){let e=rS({postType:"attachment"}),[t,r,o]=(0,Hve.useSettings)("dimensions.aspectRatios.default","dimensions.aspectRatios.theme","dimensions.defaultAspectRatios"),n=(0,Wve.useMemo)(()=>{if(!(Array.isArray(t)||Array.isArray(r)||typeof o=="boolean"))return;let l=[...o&&Array.isArray(t)?t:[],...Array.isArray(r)?r:[]].map(JKe).filter(Boolean);if(l.length||o===!1)return l},[t,r,o]);return(0,tU.jsx)(ZKe,{fields:e,aspectRatioPresets:n})}var Vo=a(T(),1),{ExperimentalBlockEditorProvider:eZe}=Y(oS.privateApis),{PatternsMenuItems:tZe}=Y(qve.privateApis),MT=()=>{},rZe=["wp_block","wp_navigation","wp_template_part"];function oZe(e,t,r){let o=Wge(),n=r==="template-locked"?"template":"post",[i,s,l]=(0,em.useEntityBlockEditor)("postType",e.type,{id:e.id}),[c,u,d]=(0,em.useEntityBlockEditor)("postType",t?.type,{id:t?.id}),f=(0,sl.useMemo)(()=>{if(e.type==="wp_navigation")return[(0,Kve.createBlock)("core/navigation",{ref:e.id,templateLock:!1})]},[e.type,e.id]),m=(0,sl.useMemo)(()=>f||(n==="template"?c:i),[f,n,c,i]);return o!==null?[o,MT,MT]:!!t&&r==="template-locked"||e.type==="wp_navigation"?[m,MT,MT]:[m,n==="post"?s:u,n==="post"?l:d]}var oU=Bre(({post:e,settings:t,recovery:r,initialEdits:o,children:n,BlockEditorProviderComponent:i=eZe,__unstableTemplate:s})=>{let l=!!s,{editorSettings:c,selection:u,isReady:d,mode:f,defaultMode:m,postTypeEntities:h,isInRevisionsMode:g,currentRevisionId:v}=(0,Eh.useSelect)(z=>{let{getEditorSettings:K,getRenderingMode:Z,__unstableIsEditorReady:q,getDefaultRenderingMode:X,isRevisionsMode:ie,getCurrentRevisionId:$}=Y(z(R)),{getEntitiesConfig:le,getEntityRecordEdits:ae}=z(em.store),re=Z(),ve=X(e.type),Ce=ve==="template-locked"?l:ve!==void 0,_e=ve!==void 0,Me=ae("postType",e.type,e.id);return{editorSettings:K(),isReady:q(),mode:_e?re:void 0,defaultMode:Ce?ve:void 0,selection:Me?.selection,postTypeEntities:e.type==="wp_template"?le("postType"):null,isInRevisionsMode:ie(),currentRevisionId:$()}},[e.type,e.id,l]),b=l&&f!=="post-only",S=b?s:e,y=(0,sl.useMemo)(()=>{let z={};if(e.type==="wp_template"){if(e.slug==="page")z.postType="page";else if(e.slug==="single")z.postType="post";else if(e.slug.split("-")[0]==="single"){let K=h?.map(q=>q.name)||[],Z=e.slug.match(`^single-(${K.join("|")})(?:-.+)?$`);Z&&(z.postType=Z[1])}}else(!rZe.includes(S.type)||b)&&(z.postId=e.id,z.postType=e.type);return{...z,templateSlug:S.type==="wp_template"?S.slug:void 0}},[b,e.id,e.type,e.slug,S.type,S.slug,h]),{id:w,type:_}=S,x=Sge(c,_,w,f),[E,O,A]=oZe(e,s,f),{updatePostLock:C,setupEditor:I,updateEditorSettings:k,setCurrentTemplateId:P,setEditedPost:N,setRenderingMode:U}=Y((0,Eh.useDispatch)(R)),{editEntityRecord:F}=(0,Eh.useDispatch)(em.store),D=(0,Eh.useRegistry)(),B=(0,sl.useCallback)(z=>{F("postType",e.type,e.id,{selection:z},{undoIgnore:!0})},[F,e.type,e.id]),{createWarningNotice:L,removeNotice:M}=(0,Eh.useDispatch)(Yve.store);return(0,sl.useLayoutEffect)(()=>{r||(C(t.postLock),D.select(R).__unstableIsEditorReady()||I(e,o,t.template),t.autosave&&L((0,rU.__)("There is an autosave of this post that is more recent than the version below."),{id:"autosave-exists",actions:[{label:(0,rU.__)("View the autosave"),url:t.autosave.editLink}]}))},[]),(0,sl.useEffect)(()=>(N(e.type,e.id),typeof window<"u"&&window.__experimentalTemplateActivate&&M("template-activate-notice"),()=>N(null,null)),[e.type,e.id,N,M]),(0,sl.useLayoutEffect)(()=>{k(t)},[t,k]),(0,sl.useEffect)(()=>{P(s?.id)},[s?.id,P]),(0,sl.useEffect)(()=>{m&&U(m)},[m,U]),Rge(e.type,f),rve(),ive(),lve(),!d||!f?null:(0,Vo.jsx)(em.EntityProvider,{kind:"root",type:"site",children:(0,Vo.jsx)(em.EntityProvider,{kind:"postType",type:e.type,id:e.id,revisionId:v??void 0,children:(0,Vo.jsx)(oS.BlockContextProvider,{value:y,children:(0,Vo.jsxs)(i,{value:E,onChange:A,onInput:O,selection:g?void 0:u,onChangeSelection:g?MT:B,settings:x,useSubRegistry:!1,children:[n,!t.isPreviewMode&&(0,Vo.jsxs)(Vo.Fragment,{children:[(0,Vo.jsx)(tZe,{}),(0,Vo.jsx)(jve,{}),f==="template-locked"&&(0,Vo.jsx)(Cge,{}),_==="wp_navigation"&&(0,Vo.jsx)(Ege,{}),(0,Vo.jsx)(tS,{}),(0,Vo.jsx)(Tve,{}),(0,Vo.jsx)(mve,{}),(0,Vo.jsx)(hve,{}),(0,Vo.jsx)(Pve,{}),(0,Vo.jsx)(Zge,{}),(0,Vo.jsx)($ge,{}),(0,Vo.jsx)(Gve,{})]})]})})})})});function nU(e){return(0,Vo.jsx)(oU,{...e,BlockEditorProviderComponent:oS.BlockEditorProvider,children:e.children})}var Zve=nU;var Ph=a(T(),1);function nZe({template:e,post:t}){let[r="white"]=Sh("color.background"),[o]=(0,FT.useEntityBlockEditor)("postType",t.type,{id:t.id}),[n]=(0,FT.useEntityBlockEditor)("postType",e?.type,{id:e?.id}),i=e&&n?n:o,s=!i?.length;return(0,Ph.jsxs)("div",{className:"editor-fields-content-preview",style:{backgroundColor:r},children:[s&&(0,Ph.jsx)("span",{className:"editor-fields-content-preview__empty",children:(0,Xve.__)("Empty content")}),!s&&(0,Ph.jsx)(iU.BlockPreview.Async,{children:(0,Ph.jsx)(iU.BlockPreview,{blocks:i})})]})}function Jve({item:e}){let{settings:t,template:r}=(0,Qve.useSelect)(o=>{let{canUser:n,getPostType:i,getTemplateId:s,getEntityRecord:l}=Y(o(FT.store)),c=n("read",{kind:"postType",name:"wp_template"}),u=o(R).getEditorSettings(),d=u.supportsTemplateMode,f=i(e.type)?.viewable??!1,m=d&&f&&c?s(e.type,e.id):null;return{settings:u,template:m?l("postType","wp_template",m):void 0}},[e.type,e.id]);return(0,Ph.jsx)(nU,{post:e,settings:t,__unstableTemplate:r,children:(0,Ph.jsx)(nZe,{template:r,post:e})})}var iZe={type:"media",id:"content-preview",label:(0,$ve.__)("Content preview"),render:Jve,enableSorting:!1},ebe=iZe;function sZe(e){let t=e?.editor;return Array.isArray(t)?!!t[0]?.notes:!1}function aZe(e,t,r){return{type:"REGISTER_ENTITY_ACTION",kind:e,name:t,config:r}}function lZe(e,t,r){return{type:"UNREGISTER_ENTITY_ACTION",kind:e,name:t,actionId:r}}function cZe(e,t,r){return{type:"REGISTER_ENTITY_FIELD",kind:e,name:t,config:r}}function uZe(e,t,r){return{type:"UNREGISTER_ENTITY_FIELD",kind:e,name:t,fieldId:r}}function dZe(e,t){return{type:"SET_IS_READY",kind:e,name:t}}var fZe=[N9,I9,D9,V9,L9,B9,A9,h2,E9,O9,F9],mZe=e=>async({registry:t})=>{if(Y(t.select(R)).isEntityReady("postType",e))return;Y(t.dispatch(R)).setIsReady("postType",e);let o=await t.resolveSelect(RN.store).getPostType(e),n=await t.resolveSelect(RN.store).canUser("create",{kind:"postType",name:e}),i=await t.resolveSelect(RN.store).getCurrentTheme(),{disablePostFormats:s}=t.select(R).getEditorSettings(),l=!["wp_block","wp_template_part"].includes(o.slug)&&n&&s9;o.slug==="wp_template"&&!window?.__experimentalTemplateActivate&&(l=void 0);let c=[o.viewable?t9:void 0,o.supports?.revisions?h9:void 0,l,o.slug==="wp_template_part"&&n&&i?.is_block_theme?T9:void 0,n&&o.slug==="wp_block"?u9:void 0,o.supports?.title?l9:void 0,o.supports?.["page-attributes"]?o9:void 0,o.slug==="wp_block"?p9:void 0,b9,c9,x9,w9,v9].filter(Boolean),u;if(e===vl)u=fZe;else if(u=[o.supports?.thumbnail&&i?.theme_supports?.["post-thumbnails"]&&g7,!xi.includes(o.slug)&&o.supports?.author&&N1,o.slug==="wp_template"&&L7,o.slug==="wp_template_part"&&B7,!xi.includes(o.slug)&&P7,!xi.includes(o.slug)&&O7,!xi.includes(o.slug)&&N7,M7,!xi.includes(o.slug)&&IB,!xi.includes(o.slug)&&o.supports?.excerpt&&H7,o.supports?.["page-attributes"]&&T7,o.supports?.comments&&k7,o.supports?.trackbacks&&A7,(o.supports?.comments||o.supports?.trackbacks)&&I7,!xi.includes(o.slug)&&S7,o.supports?.["post-formats"]&&!s&&Y7,!xi.includes(o.slug)&&o.supports?.editor&&q7,!xi.includes(o.slug)&&E7,o.slug==="post"&&Z7,o.slug==="wp_template"&&G7,o.slug==="wp_template"&&W7,o.slug==="wp_template"&&e9,o.slug==="wp_template"&&Q7,o.slug==="wp_template"&&J7,o.supports?.editor&&o.viewable&&ebe,sZe(o.supports)&&V7].filter(Boolean),o.supports?.title){let d;e==="page"?d=DB:e==="wp_template"?d=Mx:e==="wp_block"?d=a1:d=h2,u.push(d)}t.batch(()=>{c.forEach(d=>{Y(t.dispatch(R)).registerEntityAction("postType",e,d)}),u.forEach(d=>{Y(t.dispatch(R)).registerEntityField("postType",e,d)})}),(0,tbe.doAction)("core.registerPostTypeSchema",e)};function pZe(e){return{type:"SET_CURRENT_TEMPLATE_ID",id:e}}var hZe=e=>async({select:t,dispatch:r,registry:o})=>{let n=await o.dispatch(Qn.store).saveEntityRecord("postType","wp_template",e);return o.dispatch(Qn.store).editEntityRecord("postType",t.getCurrentPostType(),t.getCurrentPostId(),{template:n.slug}),o.dispatch(Ns.store).createSuccessNotice((0,Gt.__)("Custom template created. You're in template mode now."),{type:"snackbar",actions:[{label:(0,Gt.__)("Go back"),onClick:()=>r.setRenderingMode(t.getEditorSettings().defaultRenderingMode)}]}),n},gZe=e=>({registry:t})=>{let o=(t.select(Tb.store).get("core","hiddenBlockTypes")??[]).filter(n=>!(Array.isArray(e)?e:[e]).includes(n));t.dispatch(Tb.store).set("core","hiddenBlockTypes",o)},vZe=e=>({registry:t})=>{let r=t.select(Tb.store).get("core","hiddenBlockTypes")??[],o=new Set([...r,...Array.isArray(e)?e:[e]]);t.dispatch(Tb.store).set("core","hiddenBlockTypes",[...o])},bZe=({onSave:e,dirtyEntityRecords:t=[],entitiesToSkip:r=[],close:o,successNoticeContent:n}={})=>({registry:i})=>{let s=[{kind:"postType",name:"wp_navigation"}],l="site-editor-save-success",c=i.select(Qn.store).getEntityRecord("root","__unstableBase")?.home;i.dispatch(Ns.store).removeNotice(l);let u=t.filter(({kind:m,name:h,key:g,property:v})=>!r.some(b=>b.kind===m&&b.name===h&&b.key===g&&b.property===v));o?.(u);let d=[],f=[];u.forEach(({kind:m,name:h,key:g,property:v})=>{m==="root"&&h==="site"?d.push(v):(s.some(b=>b.kind===m&&b.name===h)&&i.dispatch(Qn.store).editEntityRecord(m,h,g,{status:"publish"}),f.push(i.dispatch(Qn.store).saveEditedEntityRecord(m,h,g)))}),d.length&&f.push(i.dispatch(Qn.store).__experimentalSaveSpecifiedEntityEdits("root","site",void 0,d)),i.dispatch(AN.store).__unstableMarkLastChangeAsPersistent(),Promise.all(f).then(m=>e?e(m):m).then(m=>{m.some(h=>typeof h>"u")?i.dispatch(Ns.store).createErrorNotice((0,Gt.__)("Saving failed.")):i.dispatch(Ns.store).createSuccessNotice(n||(0,Gt.__)("Site updated."),{type:"snackbar",id:l,actions:[{label:(0,Gt.__)("View site"),url:c,openInNewTab:!0}]})}).catch(m=>i.dispatch(Ns.store).createErrorNotice(`${(0,Gt.__)("Saving failed.")} ${m}`))},yZe=(e,{allowUndo:t=!0}={})=>async({registry:r})=>{let o="edit-site-template-reverted";if(r.dispatch(Ns.store).removeNotice(o),!a2(e)){r.dispatch(Ns.store).createErrorNotice((0,Gt.__)("This template is not revertable."),{type:"snackbar"});return}try{let n=r.select(Qn.store).getEntityConfig("postType",e.type);if(!n){r.dispatch(Ns.store).createErrorNotice((0,Gt.__)("The editor has encountered an unexpected error. Please reload."),{type:"snackbar"});return}let i=(0,rbe.addQueryArgs)(`${n.baseURL}/${e.id}`,{context:"edit",source:e.origin}),s=await(0,obe.default)({path:i});if(!s){r.dispatch(Ns.store).createErrorNotice((0,Gt.__)("The editor has encountered an unexpected error. Please reload."),{type:"snackbar"});return}let l=({blocks:d=[]})=>(0,IN.__unstableSerializeAndClean)(d),c=r.select(Qn.store).getEditedEntityRecord("postType",e.type,e.id);r.dispatch(Qn.store).editEntityRecord("postType",e.type,e.id,{content:l,blocks:c.blocks,source:"custom"},{undoIgnore:!0});let u=(0,IN.parse)(s?.content?.raw);if(r.dispatch(Qn.store).editEntityRecord("postType",e.type,s.id,{content:l,blocks:u,source:"theme"}),t){let d=()=>{r.dispatch(Qn.store).editEntityRecord("postType",e.type,c.id,{content:l,blocks:c.blocks,source:"custom"})};r.dispatch(Ns.store).createSuccessNotice((0,Gt.__)("Template reset."),{type:"snackbar",id:o,actions:[{label:(0,Gt.__)("Undo"),onClick:d}]})}}catch(n){let i=n.message&&n.code!=="unknown_error"?n.message:(0,Gt.__)("Template revert failed. Please reload.");r.dispatch(Ns.store).createErrorNotice(i,{type:"snackbar"})}},wZe=e=>async({registry:t})=>{let r=e.every(n=>n?.has_theme_file),o=await Promise.allSettled(e.map(n=>t.dispatch(Qn.store).deleteEntityRecord("postType",n.type,n.id,{force:!0},{throwOnError:!0})));if(o.every(({status:n})=>n==="fulfilled")){let n;if(e.length===1){let i;typeof e[0].title=="string"?i=e[0].title:typeof e[0].title?.rendered=="string"?i=e[0].title?.rendered:typeof e[0].title?.raw=="string"&&(i=e[0].title?.raw),n=r?(0,Gt.sprintf)((0,Gt.__)('"%s" reset.'),(0,sU.decodeEntities)(i)):(0,Gt.sprintf)((0,Gt._x)('"%s" deleted.',"template part"),(0,sU.decodeEntities)(i))}else n=r?(0,Gt.__)("Items reset."):(0,Gt.__)("Items deleted.");t.dispatch(Ns.store).createSuccessNotice(n,{type:"snackbar",id:"editor-template-deleted-success"})}else{let n;if(o.length===1)o[0].reason?.message?n=o[0].reason.message:n=r?(0,Gt.__)("An error occurred while reverting the item."):(0,Gt.__)("An error occurred while deleting the item.");else{let i=new Set,s=o.filter(({status:l})=>l==="rejected");for(let l of s)l.reason?.message&&i.add(l.reason.message);i.size===0?n=(0,Gt.__)("An error occurred while deleting the items."):i.size===1?n=r?(0,Gt.sprintf)((0,Gt.__)("An error occurred while reverting the items: %s"),[...i][0]):(0,Gt.sprintf)((0,Gt.__)("An error occurred while deleting the items: %s"),[...i][0]):n=r?(0,Gt.sprintf)((0,Gt.__)("Some errors occurred while reverting the items: %s"),[...i].join(",")):(0,Gt.sprintf)((0,Gt.__)("Some errors occurred while deleting the items: %s"),[...i].join(","))}t.dispatch(Ns.store).createErrorNotice(n,{type:"snackbar"})}},SZe=e=>({select:t,registry:r})=>{let o=t.getCurrentPostType(),n=r.select(Qn.store).getCurrentTheme()?.stylesheet,i=r.select(Tb.store).get("core","renderingModes")?.[n]??{};if(i[o]===e)return;let s={[n]:{...i,[o]:e}};r.dispatch(Tb.store).set("core","renderingModes",s)};function _Ze(e){return{type:"SET_STYLES_PATH",path:e}}function xZe(e){return{type:"SET_SHOW_STYLEBOOK",show:e}}function CZe(){return{type:"RESET_STYLES_NAVIGATION"}}function aU(e){return({dispatch:t,registry:r})=>{if(t({type:"SET_CANVAS_WIDTH",width:e}),Y(r.select(AN.store)).isResponsiveEditing()){let o=r2(e);Y(r.dispatch(AN.store)).setStyleStateViewport(t2[o]??"default")}}}function TZe(e){return{type:"SET_CURRENT_REVISION_ID",revisionId:e}}var EZe=e=>async({dispatch:t,select:r,registry:o})=>{let n=r.getCurrentPostType(),i=r.getCurrentPostId(),l=o.select(Qn.store).getEntityConfig("postType",n)?.revisionKey||"id",c=await o.resolveSelect(Qn.store).getRevisions("postType",n,i,Rg(l,e));o.batch(()=>{t({type:"SET_REVISION_PAGE",page:e}),c?.length&&t.setCurrentRevisionId(c[0][l])})};function PZe(e){return{type:"SET_SHOW_REVISION_DIFF",showDiff:e}}var kZe=e=>async({select:t,dispatch:r,registry:o})=>{let n=t.getCurrentPostType(),i=t.getCurrentPostId(),l=o.select(Qn.store).getEntityConfig("postType",n)?.revisionKey||"id",c=await o.resolveSelect(Qn.store).getRevision("postType",n,i,e,{context:"edit",_fields:[...new Set(["id","date","modified","author","meta","title.raw","excerpt.raw","content.raw",l])].join()});if(!c)return;let u={blocks:void 0,content:c.content.raw};c.title?.raw!==void 0&&(u.title=c.title.raw),c.excerpt?.raw!==void 0&&(u.excerpt=c.excerpt.raw),c.meta!==void 0&&(u.meta=c.meta),r.editPost(u),r.setCurrentRevisionId(null),await r.savePost(),o.dispatch(Ns.store).createSuccessNotice((0,Gt.sprintf)((0,Gt.__)("Restored to revision from %s."),(0,ON.dateI18n)((0,ON.getSettings)().formats.datetime,c.date)),{type:"snackbar",id:"editor-revision-restored"})};function RZe(e,t={focus:!1}){return{type:"SELECT_NOTE",noteId:e,options:t}}var AZe=(e,t,r)=>({dispatch:o})=>{if(o.setEditedPost(e.type,e.id),e.status==="auto-draft"&&r){let i;"content"in t?i=t.content:i=e.content.raw;let s=(0,nS.parse)(i);s=(0,nS.synchronizeBlocksWithTemplate)(s,r),o.resetEditorBlocks(s,{__unstableShouldCreateUndoLevel:!1})}t&&Object.entries(t).some(([i,s])=>s!==(e[i]?.raw??e[i]))&&o.editPost(t)};function IZe(){return(0,Rh.default)("wp.data.dispatch( 'core/editor' ).__experimentalTearDownEditor",{since:"6.5"}),{type:"DO_NOTHING"}}function OZe(){return(0,Rh.default)("wp.data.dispatch( 'core/editor' ).resetPost",{since:"6.0",version:"6.3",alternative:"Initialize the editor with the setupEditorState action"}),{type:"DO_NOTHING"}}function NZe(){return(0,Rh.default)("wp.data.dispatch( 'core/editor' ).updatePost",{since:"5.7",alternative:"Use the core entities store instead"}),{type:"DO_NOTHING"}}function MZe(e){return(0,Rh.default)("wp.data.dispatch( 'core/editor' ).setupEditorState",{since:"6.5",alternative:"wp.data.dispatch( 'core/editor' ).setEditedPost"}),ibe(e.type,e.id)}function ibe(e,t){return{type:"SET_EDITED_POST",postType:e,postId:t}}var FZe=(e,t)=>({select:r,registry:o})=>{let{id:n,type:i}=r.getCurrentPost();o.dispatch(Ms.store).editEntityRecord("postType",i,n,e,t)},DZe=(e={})=>async({select:t,dispatch:r,registry:o})=>{if(!t.isEditedPostSaveable())return;let n=t.getEditedPostContent();r.editPost({content:n},{undoIgnore:!0});let i=t.getCurrentPost(),s={id:i.id,...o.select(Ms.store).getEntityRecordNonTransientEdits("postType",i.type,i.id),content:n};r({type:"REQUEST_POST_UPDATE_START",options:e});let l=!1;try{s=await(0,iS.applyFiltersAsync)("editor.preSavePost",s,e)}catch(c){l=c}if(!l)try{await o.dispatch(Ms.store).saveEntityRecord("postType",i.type,s,e)}catch(c){l=c.message&&c.code!=="unknown_error"?c.message:(0,dn.__)("An error occurred while updating.")}if(l||(l=o.select(Ms.store).getLastEntitySaveError("postType",i.type,i.id)),!l)try{await(0,iS.applyFilters)("editor.__unstableSavePost",Promise.resolve(),e)}catch(c){l=c}if(!l)try{await(0,iS.doActionAsync)("editor.savePost",{id:i.id,type:i.type},e)}catch(c){l=c}if(r({type:"REQUEST_POST_UPDATE_FINISH",options:e}),typeof window<"u"&&window.__experimentalTemplateActivate&&!e.isAutosave&&i.type==="wp_template"&&(typeof i.id=="number"||/^\d+$/.test(i.id))&&LZe({select:t,dispatch:r,registry:o}),l){let c=rq({post:i,edits:s,error:l});c.length&&o.dispatch(Wc.store).createErrorNotice(...c)}else{let c=t.getCurrentPost(),u=tq({previousPost:i,post:c,postType:await o.resolveSelect(Ms.store).getPostType(c.type),options:e});u.length&&o.dispatch(Wc.store).createSuccessNotice(...u),e.isAutosave||o.dispatch(kh.store).__unstableMarkLastChangeAsPersistent()}};async function LZe({select:e,registry:t}){if(e.getEditorSettings().onNavigateToPreviousEntityRecord)return;let{id:o,slug:n}=e.getCurrentPost();if((await t.select(Ms.store).getEntityRecord("root","site")).active_templates[n]===o)return;let l=(await t.resolveSelect(Ms.store).getCurrentTheme())?.default_template_types.find(c=>c.slug===n);await t.dispatch(Wc.store).createNotice("info",(0,dn.sprintf)((0,dn.__)('Do you want to activate this "%s" template?'),l?.title??n),{id:"template-activate-notice",actions:[{label:(0,dn.__)("Activate"),onClick:async()=>{await t.dispatch(Wc.store).createNotice("info",(0,dn.__)("Activating template\u2026"),{id:"template-activate-notice"});try{let c=await t.select(Ms.store).getEntityRecord("root","site");await t.dispatch(Ms.store).saveEntityRecord("root","site",{active_templates:{...c.active_templates,[n]:o}},{throwOnError:!0}),await t.dispatch(Wc.store).createSuccessNotice((0,dn.__)("Template activated."),{id:"template-activate-notice"})}catch(c){throw await t.dispatch(Wc.store).createErrorNotice((0,dn.__)("Template activation failed."),{id:"template-activate-notice"}),c}}}]})}function BZe(){return(0,Rh.default)("wp.data.dispatch( 'core/editor' ).refreshPost",{since:"6.0",version:"6.3",alternative:"Use the core entities store instead"}),{type:"DO_NOTHING"}}var VZe=()=>async({select:e,dispatch:t,registry:r})=>{let o=e.getCurrentPostType(),n=await r.resolveSelect(Ms.store).getPostType(o),{rest_base:i,rest_namespace:s="wp/v2"}=n;t({type:"REQUEST_POST_DELETE_START"});try{let l=e.getCurrentPost();await(0,nbe.default)({path:`/${s}/${i}/${l.id}`,method:"DELETE"}),await t.savePost()}catch(l){r.dispatch(Wc.store).createErrorNotice(...oq({error:l}))}t({type:"REQUEST_POST_DELETE_FINISH"})},jZe=({local:e=!1,...t}={})=>async({select:r,dispatch:o})=>{let n=r.getCurrentPost();if(e){let i=r.isEditedPostNew(),s=r.getEditedPostAttribute("title"),l=r.getEditedPostAttribute("content"),c=r.getEditedPostAttribute("excerpt");eq(n.id,i,s,l,c)}else await o.savePost({isAutosave:!0,...t})},zZe=({forceIsAutosaveable:e}={})=>async({select:t,dispatch:r})=>((e||t.isEditedPostAutosaveable())&&!t.isPostLocked()&&(["draft","auto-draft"].includes(t.getEditedPostAttribute("status"))?await r.savePost({isPreview:!0}):await r.autosave({isPreview:!0})),t.getEditedPostPreviewLink()),HZe=()=>({registry:e})=>{e.dispatch(Ms.store).redo()},UZe=()=>({registry:e})=>{e.dispatch(Ms.store).undo()};function WZe(){return(0,Rh.default)("wp.data.dispatch( 'core/editor' ).createUndoLevel",{since:"6.0",version:"6.3",alternative:"Use the core entities store instead"}),{type:"DO_NOTHING"}}function GZe(e){return{type:"UPDATE_POST_LOCK",lock:e}}var YZe=()=>({registry:e})=>{e.dispatch($o.store).set("core","isPublishSidebarEnabled",!0)},qZe=()=>({registry:e})=>{e.dispatch($o.store).set("core","isPublishSidebarEnabled",!1)};function KZe(e){return{type:"LOCK_POST_SAVING",lockName:e}}function ZZe(e){return{type:"UNLOCK_POST_SAVING",lockName:e}}function XZe(e){return{type:"LOCK_POST_AUTOSAVING",lockName:e}}function QZe(e){return{type:"UNLOCK_POST_AUTOSAVING",lockName:e}}var JZe=(e,t={})=>({select:r,dispatch:o,registry:n})=>{let{__unstableShouldCreateUndoLevel:i,selection:s}=t,l={blocks:e,selection:s};if(i!==!1){let{id:c,type:u}=r.getCurrentPost();if(n.select(Ms.store).getEditedEntityRecord("postType",u,c).blocks===l.blocks){n.dispatch(Ms.store).__unstableCreateUndoLevel("postType",u,c);return}l.content=({blocks:f=[]})=>(0,nS.__unstableSerializeAndClean)(f)}o.editPost(l)};function $Ze(e){return{type:"UPDATE_EDITOR_SETTINGS",settings:e}}var eXe=e=>({dispatch:t,registry:r,select:o})=>{o.__unstableIsEditorReady()&&!o.getEditorSettings().isPreviewMode&&r.dispatch(kh.store).clearSelectedBlock(),t({type:"SET_RENDERING_MODE",mode:e})};function tXe(e){return({dispatch:t})=>{let r=jY(e);t(aU(r))}}var rXe=e=>({registry:t})=>{let r=t.select($o.store).get("core","inactivePanels")??[],o=!!r?.includes(e),n;o?n=r.filter(i=>i!==e):n=[...r,e],t.dispatch($o.store).set("core","inactivePanels",n)},oXe=e=>({registry:t})=>{let r=t.select($o.store).get("core","openPanels")??[],o=!!r?.includes(e),n;o?n=r.filter(i=>i!==e):n=[...r,e],t.dispatch($o.store).set("core","openPanels",n)};function nXe(e){return{type:"REMOVE_PANEL",panelName:e}}var iXe=e=>({dispatch:t,registry:r})=>{typeof e=="object"&&e.hasOwnProperty("rootClientId")&&e.hasOwnProperty("insertionIndex")&&Y(r.dispatch(kh.store)).setInsertionPoint({rootClientId:e.rootClientId,index:e.insertionIndex}),t({type:"SET_IS_INSERTER_OPENED",value:e})};function sXe(e){return{type:"SET_IS_LIST_VIEW_OPENED",isOpen:e}}var aXe=({createNotice:e=!0}={})=>({dispatch:t,registry:r})=>{let o=r.select($o.store).get("core","distractionFree");o&&r.dispatch($o.store).set("core","fixedToolbar",!1),o||r.batch(()=>{r.dispatch($o.store).set("core","fixedToolbar",!0),t.setIsInserterOpened(!1),t.setIsListViewOpened(!1),Y(r.dispatch(kh.store)).resetZoomLevel()}),r.batch(()=>{r.dispatch($o.store).set("core","distractionFree",!o),e&&r.dispatch(Wc.store).createInfoNotice(o?(0,dn.__)("Distraction free mode deactivated."):(0,dn.__)("Distraction free mode activated."),{id:"core/editor/distraction-free-mode/notice",type:"snackbar",actions:[{label:(0,dn.__)("Undo"),onClick:()=>{r.batch(()=>{r.dispatch($o.store).set("core","fixedToolbar",o),r.dispatch($o.store).toggle("core","distractionFree")})}}]})})},lXe=()=>({registry:e})=>{e.dispatch($o.store).toggle("core","focusMode");let t=e.select($o.store).get("core","focusMode");e.dispatch(Wc.store).createInfoNotice(t?(0,dn.__)("Spotlight mode activated."):(0,dn.__)("Spotlight mode deactivated."),{id:"core/editor/toggle-spotlight-mode/notice",type:"snackbar",actions:[{label:(0,dn.__)("Undo"),onClick:()=>{e.dispatch($o.store).toggle("core","focusMode")}}]})},cXe=()=>({registry:e})=>{e.dispatch($o.store).toggle("core","fixedToolbar");let t=e.select($o.store).get("core","fixedToolbar");e.dispatch(Wc.store).createInfoNotice(t?(0,dn.__)("Top toolbar activated."):(0,dn.__)("Top toolbar deactivated."),{id:"core/editor/toggle-top-toolbar/notice",type:"snackbar",actions:[{label:(0,dn.__)("Undo"),onClick:()=>{e.dispatch($o.store).toggle("core","fixedToolbar")}}]})},uXe=e=>({dispatch:t,registry:r})=>{r.dispatch($o.store).set("core","editorMode",e),e!=="visual"&&(r.dispatch(kh.store).clearSelectedBlock(),Y(r.dispatch(kh.store)).resetZoomLevel()),e==="visual"?(0,cU.speak)((0,dn.__)("Visual editor selected"),"assertive"):e==="text"&&(r.select($o.store).get("core","distractionFree")&&t.toggleDistractionFree(),(0,cU.speak)((0,dn.__)("Code editor selected"),"assertive"))};function dXe(){return{type:"OPEN_PUBLISH_SIDEBAR"}}function fXe(){return{type:"CLOSE_PUBLISH_SIDEBAR"}}function mXe(){return{type:"TOGGLE_PUBLISH_SIDEBAR"}}var ar=e=>(...t)=>({registry:r})=>{(0,Rh.default)("`wp.data.dispatch( 'core/editor' )."+e+"`",{since:"5.3",alternative:"`wp.data.dispatch( 'core/block-editor' )."+e+"`",version:"6.2"}),r.dispatch(kh.store)[e](...t)},pXe=ar("resetBlocks"),hXe=ar("receiveBlocks"),gXe=ar("updateBlock"),vXe=ar("updateBlockAttributes"),bXe=ar("selectBlock"),yXe=ar("startMultiSelect"),wXe=ar("stopMultiSelect"),SXe=ar("multiSelect"),_Xe=ar("clearSelectedBlock"),xXe=ar("toggleSelection"),CXe=ar("replaceBlocks"),TXe=ar("replaceBlock"),EXe=ar("moveBlocksDown"),PXe=ar("moveBlocksUp"),kXe=ar("moveBlockToPosition"),RXe=ar("insertBlock"),AXe=ar("insertBlocks"),IXe=ar("showInsertionPoint"),OXe=ar("hideInsertionPoint"),NXe=ar("setTemplateValidity"),MXe=ar("synchronizeTemplate"),FXe=ar("mergeBlocks"),DXe=ar("removeBlocks"),LXe=ar("removeBlock"),BXe=ar("toggleBlockMode"),VXe=ar("startTyping"),jXe=ar("stopTyping"),zXe=ar("enterFormattedText"),HXe=ar("exitFormattedText"),UXe=ar("insertDefaultBlock"),WXe=ar("updateBlockListSettings");var D1={reducer:xY,selectors:_B,actions:uU},R=(0,NN.createReduxStore)(NY,{...D1});(0,NN.register)(R);Y(R).registerPrivateActions(lU);Y(R).registerPrivateSelectors(AB);var dbe=a(T(),1),GXe=e=>(0,cbe.createHigherOrderComponent)(t=>({attributes:r,setAttributes:o,...n})=>{let i=(0,sbe.useSelect)(u=>u(R).getCurrentPostType(),[]),[s,l]=(0,abe.useEntityProp)("postType",i,"meta"),c=(0,lbe.useMemo)(()=>({...r,...Object.fromEntries(Object.entries(e).map(([u,d])=>[u,s[d]]))}),[r,s]);return(0,dbe.jsx)(t,{attributes:c,setAttributes:u=>{let d=Object.fromEntries(Object.entries(u??{}).filter(([f])=>f in e).map(([f,m])=>[e[f],m]));Object.entries(d).length&&l(d),o(u)},...n})},"withMetaAttributeSource");function YXe(e){let t=Object.fromEntries(Object.entries(e.attributes??{}).filter(([,{source:r}])=>r==="meta").map(([r,{meta:o}])=>[r,o]));return Object.entries(t).length&&(e.edit=GXe(t)(e.edit)),e}(0,ube.addFilter)("blocks.registerBlockType","core/editor/custom-sources-backwards-compatibility/shim-attribute-source",YXe);var w1e=a(An(),1);var fbe=a(Zd(),1),mbe=a(uo(),1);var pbe=a(Lt(),1),Eb=a(T(),1),qXe=10,MN={name:"links",className:"editor-autocompleters__link",triggerPrefix:"[[",isDebounced:!0,async options(e){return(await(0,fbe.default)({path:(0,mbe.addQueryArgs)("/wp/v2/search",{per_page:qXe,search:e,type:"post"})})).filter(r=>r.title!=="")},getOptionKeywords(e){return[...e.title.split(/\s+/)]},getOptionLabel(e){return(0,Eb.jsxs)(Eb.Fragment,{children:[(0,Eb.jsx)(hn,{icon:e.subtype==="page"?Bm:IL}),(0,pbe.decodeEntities)(e.title)]})},getOptionCompletion(e){return(0,Eb.jsx)("a",{href:e.url,children:e.title})}};var hbe=a(H(),1),gbe=a(G(),1),vbe=a(oe(),1),tm=a(T(),1);function KXe(e){let t=e.avatar_urls&&e.avatar_urls[24]?(0,tm.jsx)("img",{className:"editor-autocompleters__user-avatar",alt:"",src:e.avatar_urls[24]}):(0,tm.jsx)("span",{className:"editor-autocompleters__no-avatar"});return(0,tm.jsxs)(tm.Fragment,{children:[t,(0,tm.jsx)("span",{className:"editor-autocompleters__user-name",children:e.name}),(0,tm.jsx)("span",{className:"editor-autocompleters__user-slug",children:e.slug})]})}var FN={name:"users",className:"editor-autocompleters__user",triggerPrefix:"@",useItems(e){let t=(0,gbe.useSelect)(o=>{let{getUsers:n}=o(vbe.store);return n({context:"view",search:encodeURIComponent(e)})},[e]);return[(0,hbe.useMemo)(()=>t?t.map(o=>({key:`user-${o.slug}`,value:o,label:KXe(o)})):[],[t])]},getOptionCompletion(e){return`@${e.slug}`}};var aS=a(H(),1),sS=a(G(),1),bbe=a(oe(),1);function ZXe(e,t){let r=(0,aS.useRef)(e);(0,aS.useEffect)(()=>{r.current=e},[e]),(0,aS.useEffect)(()=>{if(!t)return;let o=setInterval(()=>r.current(),t*1e3);return()=>clearInterval(o)},[t])}function DN({interval:e,autosave:t}){let{autosave:r}=(0,sS.useDispatch)(R),o=t??r,{getReferenceByDistinctEdits:n}=(0,sS.useSelect)(bbe.store),{isEditedPostDirty:i,isEditedPostAutosaveable:s,isAutosavingPost:l}=(0,sS.useSelect)(R),c=(0,sS.useSelect)(d=>e!==void 0?e:d(R).getEditorSettings().autosaveInterval,[e]),u=(0,aS.useRef)();return ZXe(()=>{if(!s())return;let d=n();d!==u.current&&i()&&!l()&&(u.current=d,o())},c),null}var Mh=a(V(),1),jT=a(G(),1),qc=a(W(),1),zT=a(pe(),1);var tye=a(go(),1),rye=a(oe(),1),oye=a(UH(),1),JN=a(H(),1),nye=a(ke(),1),iye=a(Lt(),1),sye=a(Pb(),1);var dU=a(V(),1),wbe=a(G(),1),Sbe=a(oe(),1);function LN(e){let{isFrontPage:t,isPostsPage:r}=(0,wbe.useSelect)(o=>{let{canUser:n,getEditedEntityRecord:i}=o(Sbe.store),s=n("read",{kind:"root",name:"site"})?i("root","site"):void 0,l=parseInt(e,10);return{isFrontPage:s?.page_on_front===l,isPostsPage:s?.page_for_posts===l}});return t?(0,dU.__)("Homepage"):r?(0,dU.__)("Posts Page"):!1}var Kbe=a(W(),1),Zbe=a(go(),1),XN=a(V(),1),VT=a(G(),1);var QN=a(ke(),1),Xbe=a(Nt(),1);var LT=a(H(),1);var rm=a(W(),1),Gc=a(V(),1),En=a(pe(),1),Rb=a(G(),1);var Br=a(H(),1),GN=a(go(),1),Ibe=a(Wm(),1),Obe=a(oe(),1);var Lr=a(V(),1),lS=[{slug:"theme-colors",title:(0,Lr.__)("Theme Colors"),origin:"theme",type:"colors"},{slug:"theme-gradients",title:(0,Lr.__)("Theme Gradients"),origin:"theme",type:"gradients"},{slug:"custom-colors",title:(0,Lr.__)("Custom Colors"),origin:"custom",type:"colors"},{slug:"custom-gradients",title:(0,Lr.__)("Custom Gradients"),origin:"custom",type:"gradients"},{slug:"duotones",title:(0,Lr.__)("Duotones"),origin:"theme",type:"duotones"},{slug:"default-colors",title:(0,Lr.__)("Default Colors"),origin:"default",type:"colors"},{slug:"default-gradients",title:(0,Lr.__)("Default Gradients"),origin:"default",type:"gradients"}],BN=[{slug:"site-identity",title:(0,Lr.__)("Site Identity"),blocks:["core/site-logo","core/site-title","core/site-tagline"]},{slug:"design",title:(0,Lr.__)("Design"),blocks:["core/navigation","core/avatar","core/post-time-to-read"],exclude:["core/home-link","core/navigation-link"]},{slug:"posts",title:(0,Lr.__)("Posts"),blocks:["core/post-title","core/post-excerpt","core/post-author","core/post-author-name","core/post-author-biography","core/post-date","core/post-terms","core/term-description","core/query-title","core/query-no-results","core/query-pagination","core/query-numbers"]},{slug:"comments",title:(0,Lr.__)("Comments"),blocks:["core/comments-title","core/comments-pagination","core/comments-pagination-numbers","core/comments","core/comments-author-name","core/comment-content","core/comment-date","core/comment-edit-link","core/comment-reply-link","core/comment-template","core/post-comments-count","core/post-comments-link"]}],fU=[{slug:"overview",title:(0,Lr.__)("Overview"),blocks:[]},{slug:"text",title:(0,Lr.__)("Text"),blocks:["core/post-content","core/home-link","core/navigation-link"]},{slug:"colors",title:(0,Lr.__)("Colors"),blocks:[]},{slug:"theme",title:(0,Lr.__)("Theme"),subcategories:BN},{slug:"media",title:(0,Lr.__)("Media"),blocks:["core/post-featured-image"]},{slug:"widgets",title:(0,Lr.__)("Widgets"),blocks:[]},{slug:"embed",title:(0,Lr.__)("Embeds"),include:[]}],XXe=[...BN,{slug:"media",title:(0,Lr.__)("Media"),blocks:["core/post-featured-image"]},{slug:"widgets",title:(0,Lr.__)("Widgets"),blocks:[]},{slug:"embed",title:(0,Lr.__)("Embeds"),include:[]}],_be=[{slug:"overview",title:(0,Lr.__)("Overview"),blocks:[]},{slug:"text",title:(0,Lr.__)("Text"),blocks:["core/post-content","core/home-link","core/navigation-link"]},{slug:"colors",title:(0,Lr.__)("Colors"),blocks:[]},{slug:"blocks",title:(0,Lr.__)("All Blocks"),blocks:[],subcategories:XXe}],QXe=`
62 .is-root-container {
63 display: flow-root;
64 }
65 `,xbe=`
66 body {
67 position: relative;
68 padding: 32px !important;
69 }
70
71 ${QXe}
72
73 .editor-style-book__examples {
74 max-width: 1200px;
75 margin: 0 auto;
76 }
77
78 .editor-style-book__example {
79 max-width: 900px;
80 border-radius: 2px;
81 cursor: var(--wpds-cursor-control, pointer);
82 display: flex;
83 flex-direction: column;
84 gap: 40px;
85 padding: 16px;
86 width: 100%;
87 box-sizing: border-box;
88 scroll-margin-top: 32px;
89 scroll-margin-bottom: 32px;
90 margin: 0 auto 40px auto;
91 }
92
93 .editor-style-book__example.is-selected {
94 box-shadow: 0 0 0 1px var(--wp-components-color-accent, var(--wp-admin-theme-color, #007cba));
95 }
96
97 .editor-style-book__example.is-disabled-example {
98 pointer-events: none;
99 }
100
101 .editor-style-book__example:focus:not(:disabled) {
102 box-shadow: 0 0 0 var(--wp-admin-border-width-focus) var(--wp-components-color-accent, var(--wp-admin-theme-color, #007cba));
103 outline: 3px solid transparent;
104 }
105
106 .editor-style-book__duotone-example > div:first-child {
107 display: flex;
108 aspect-ratio: 16 / 9;
109 grid-row: span 1;
110 grid-column: span 2;
111 }
112 .editor-style-book__duotone-example img {
113 width: 100%;
114 height: 100%;
115 object-fit: cover;
116 }
117 .editor-style-book__duotone-example > div:not(:first-child) {
118 height: 20px;
119 border: 1px solid color-mix( in srgb, currentColor 10%, transparent );
120 }
121
122 .editor-style-book__color-example {
123 border: 1px solid color-mix( in srgb, currentColor 10%, transparent );
124 }
125
126 .editor-style-book__subcategory-title,
127 .editor-style-book__example-title {
128 font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
129 font-size: 13px;
130 font-weight: normal;
131 line-height: normal;
132 margin: 0;
133 text-align: left;
134 padding-top: 8px;
135 border-top: 1px solid color-mix( in srgb, currentColor 10%, transparent );
136 color: color-mix( in srgb, currentColor 60%, transparent );
137 }
138
139 .editor-style-book__subcategory-title {
140 font-size: 16px;
141 margin-bottom: 40px;
142 padding-bottom: 8px;
143 }
144
145 .editor-style-book__example-preview {
146 width: 100%;
147 }
148
149 .editor-style-book__example-preview .block-editor-block-list__insertion-point,
150 .editor-style-book__example-preview .block-list-appender {
151 display: none;
152 }
153 :where(.is-root-container > .wp-block:first-child) {
154 margin-top: 0;
155 }
156 :where(.is-root-container > .wp-block:last-child) {
157 margin-bottom: 0;
158 }
159 `;var Cbe=a(kt(),1);function DT(e,t){if(!e?.slug||!t?.length)return;let r=e?.subcategories??[];if(r.length)return r.reduce((s,l)=>{let c=DT(l,t);return c&&(s.subcategories||(s.subcategories=[]),s.subcategories=[...s.subcategories,c]),s},{title:e.title,slug:e.slug});let o=e?.blocks||[],n=e?.exclude||[],i=t.filter(s=>!n.includes(s.name)&&(s.category===e.slug||o.includes(s.name)));if(i.length)return{title:e.title,slug:e.slug,examples:i}}function mU(){let e=[...BN,...fU].map(({slug:o})=>o),r=(0,Cbe.getCategories)().filter(({slug:o})=>!e.includes(o));return[...fU,...r]}var Cd=a(V(),1),gi=a(kt(),1);var Tbe=a(W(),1),VN=a(pe(),1),pU=a(T(),1),JXe=({colors:e,type:t,templateColumns:r="1fr 1fr",itemHeight:o="52px"})=>e?(0,pU.jsx)(Tbe.__experimentalGrid,{templateColumns:r,rowGap:8,columnGap:16,children:e.map(n=>{let i=t==="gradients"?(0,VN.__experimentalGetGradientClass)(n.slug):(0,VN.getColorClassName)("background-color",n.slug),s=Q("editor-style-book__color-example",i);return(0,pU.jsx)("div",{className:s,style:{height:o}},n.slug)})}):null,hU=JXe;var gU=a(W(),1),kb=a(T(),1),$Xe=({duotones:e})=>e?(0,kb.jsx)(gU.__experimentalGrid,{columns:2,rowGap:16,columnGap:16,children:e.map(t=>(0,kb.jsxs)(gU.__experimentalGrid,{className:"editor-style-book__duotone-example",columns:2,rowGap:8,columnGap:8,children:[(0,kb.jsx)("div",{children:(0,kb.jsx)("img",{alt:`Duotone example: ${t.slug}`,src:"https://s.w.org/images/core/5.3/MtBlanc1.jpg",style:{filter:`url(#wp-duotone-${t.slug})`}})}),t.colors.map(r=>(0,kb.jsx)("div",{className:"editor-style-book__color-example",style:{backgroundColor:r}},r))]},t.slug))}):null,Ebe=$Xe;var jN=a(T(),1);function eQe(e){if(!e)return[];let t=[];return lS.forEach(r=>{let o=e[r.type],n=Array.isArray(o)?o.find(i=>i.slug===r.origin):void 0;if(n?.[r.type]){let i={name:r.slug,title:r.title,category:"colors"};r.type==="duotones"?(i.content=(0,jN.jsx)(Ebe,{duotones:n[r.type]}),t.push(i)):(i.content=(0,jN.jsx)(hU,{colors:n[r.type],type:r.type}),t.push(i))}}),t}function tQe(e){let t=[],r=Array.isArray(e?.colors)?e.colors.find(i=>i.slug==="theme"):void 0;if(r){let i={name:"theme-colors",title:(0,Cd.__)("Colors"),category:"overview",content:(0,jN.jsx)(hU,{colors:r.colors,type:"colors",templateColumns:"repeat(auto-fill, minmax( 200px, 1fr ))",itemHeight:"32px"})};t.push(i)}let o=[];if((0,gi.getBlockType)("core/heading")){let i=(0,gi.createBlock)("core/heading",{content:(0,Cd.__)("AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz0123456789X{(\u2026)},.-<>?!*&:/A@HELFO\u2122\xA9"),level:1});o.push(i)}if((0,gi.getBlockType)("core/paragraph")){let i=(0,gi.createBlock)("core/paragraph",{content:(0,Cd.__)("A paragraph in a website refers to a distinct block of text that is used to present and organize information. It is a fundamental unit of content in web design and is typically composed of a group of related sentences or thoughts focused on a particular topic or idea. Paragraphs play a crucial role in improving the readability and user experience of a website. They break down the text into smaller, manageable chunks, allowing readers to scan the content more easily.")}),s=(0,gi.createBlock)("core/paragraph",{content:(0,Cd.__)("Additionally, paragraphs help structure the flow of information and provide logical breaks between different concepts or pieces of information. In terms of formatting, paragraphs in websites are commonly denoted by a vertical gap or indentation between each block of text. This visual separation helps visually distinguish one paragraph from another, creating a clear and organized layout that guides the reader through the content smoothly.")});if((0,gi.getBlockType)("core/group")){let l=(0,gi.createBlock)("core/group",{layout:{type:"grid",columnCount:2,minimumColumnWidth:"12rem"},style:{spacing:{blockGap:"1.5rem"}}},[i,s]);o.push(l)}else o.push(i)}return o.length&&t.push({name:"typography",title:(0,Cd.__)("Typography"),category:"overview",blocks:o}),["core/image","core/separator","core/buttons","core/pullquote","core/search"].forEach(i=>{let s=(0,gi.getBlockType)(i);if(s&&s.example){let l={name:i,title:s.title,category:"overview",blocks:(0,gi.getBlockFromExample)(i,{...s.example,attributes:{...s.example.attributes,style:void 0}})};t.push(l)}}),t}function vU(e){let t=(0,gi.getBlockTypes)().filter(s=>{let{name:l,example:c,supports:u}=s;return l!=="core/heading"&&!!c&&u?.inserter!==!1}).map(s=>({name:s.name,title:s.title,category:s.category,blocks:(0,gi.getBlockFromExample)(s.name,{...s.example,attributes:{...s.example?.attributes,style:void 0}})}));if(!!!(0,gi.getBlockType)("core/heading"))return t;let o={name:"core/heading",title:(0,Cd.__)("Headings"),category:"text",blocks:[1,2,3,4,5,6].map(s=>(0,gi.createBlock)("core/heading",{content:(0,Cd.sprintf)((0,Cd.__)("Heading %d"),s),level:s}))},n=eQe(e),i=tQe(e);return[o,...n,...t,...i]}var Abe=a(H(),1),HN=a(G(),1);var zN=a(kt(),1),Pbe=a(G(),1),kbe=a(H(),1);function cS(e={},t=!1){let o=kH("spacing.blockGap")!==null,n=!o,{disableLayoutStyles:i,getBlockStyles:s}=(0,Pbe.useSelect)(l=>{let{getEditorSettings:c}=l(R),{getBlockStyles:u}=l(zN.store);return{disableLayoutStyles:!!c()?.disableLayoutStyles,getBlockStyles:u}},[]);return(0,kbe.useMemo)(()=>{if(!e?.styles||!e?.settings)return[[],{}];let l=(0,zN.getBlockTypes)();return Zv(e,l,{hasBlockGapSupport:o,hasFallbackGapSupport:n,disableLayoutStyles:i,disableRootPadding:t,getBlockStyles:s})},[o,n,e,i,t,s])}function Rbe(e=!1){let{merged:t}=ro();return cS(t,e)}function rQe(e){let[t,r]=Rbe(e),{getEditorSettings:o}=(0,HN.useSelect)(R),{updateEditorSettings:n}=(0,HN.useDispatch)(R);(0,Abe.useEffect)(()=>{if(!t||!r)return;let i=o(),s=Object.values(i.styles??[]).filter(l=>!l.isGlobalStyles);n({...i,styles:[...s,...t],__experimentalFeatures:r})},[t,r,n,o])}function UN({disableRootPadding:e}){return rQe(e),null}var zt=a(T(),1),{ExperimentalBlockEditorProvider:oQe}=Y(En.privateApis),{Tabs:WN}=Y(rm.privateApis);function Ah(e){return!e||Object.keys(e).length===0}var nQe=(e,t)=>{if(!e||!t||!t?.contentDocument)return;let r=e==="top"?t.contentDocument.body:t.contentDocument.getElementById(e);r&&r.scrollIntoView({behavior:"smooth"})},Nbe=e=>e&&typeof e=="string"&&(e==="/"||e.startsWith("/typography")||e.startsWith("/colors")||e.startsWith("/blocks"))?{top:!0}:null;function Mbe(){let{colors:e,gradients:t}=(0,En.__experimentalUseMultipleOriginColorsAndGradients)(),[r,o,n,i]=(0,En.useSettings)("color.defaultDuotone","color.duotone.custom","color.duotone.theme","color.duotone.default");return(0,Br.useMemo)(()=>{let l={colors:e,gradients:t,duotones:[]};return n&&n.length&&l.duotones.push({name:(0,Gc._x)("Theme","Indicates these duotone filters come from the theme."),slug:"theme",duotones:n}),r&&i&&i.length&&l.duotones.push({name:(0,Gc._x)("Default","Indicates these duotone filters come from WordPress."),slug:"default",duotones:i}),o&&o.length&&l.duotones.push({name:(0,Gc._x)("Custom","Indicates these doutone filters are created by the user."),slug:"custom",duotones:o}),l},[e,t,o,n,i,r])}function Fbe(e){let t=[],r=DT({slug:"overview"},e);t.push(...r.examples);let o=e.filter(n=>n.category!=="overview"&&!r.examples.find(i=>i.name===n.name));return t.push(...o),t}function iQe(e,t){return t?e.map(r=>({...r,variation:t,blocks:Array.isArray(r.blocks)?r.blocks.map(o=>({...o,attributes:{...o.attributes,style:void 0,className:`is-style-${t}`}})):{...r.blocks,attributes:{...r.blocks.attributes,style:void 0,className:`is-style-${t}`}}})):e}function sQe({isSelected:e,onClick:t,onSelect:r,showTabs:o=!0,userConfig:n={},path:i=""},s){let l=Sh("color.text"),c=Sh("color.background"),u=Mbe(),d=(0,Br.useMemo)(()=>vU(u),[u]),f=(0,Br.useMemo)(()=>mU().filter(w=>d.some(_=>_.category===w.slug)),[d]),m=Fbe(d),{base:h}=ro(),g=Nbe(i),v=(0,Br.useMemo)(()=>!Ah(n)&&!Ah(h)?Ui(h,n):{},[h,n]),b=(0,Rb.useSelect)(w=>w(En.store).getSettings(),[]),[S]=cS(v),y=(0,Br.useMemo)(()=>({...b,styles:!Ah(S)&&!Ah(n)?S:b.styles,isPreviewMode:!0}),[S,b,n]);return(0,zt.jsx)("div",{ref:s,className:Q("editor-style-book",{"is-button":!!t}),style:{color:l,background:c},children:o?(0,zt.jsxs)(WN,{children:[(0,zt.jsx)("div",{className:"editor-style-book__tablist-container",children:(0,zt.jsx)(WN.TabList,{children:f.map(w=>(0,zt.jsx)(WN.Tab,{tabId:w.slug,children:w.title},w.slug))})}),f.map(w=>{let _=w.slug?mU().find(E=>E.slug===w.slug):null,x=_?DT(_,d):{examples:d};return(0,zt.jsx)(WN.TabPanel,{tabId:w.slug,focusable:!1,className:"editor-style-book__tabpanel",children:(0,zt.jsx)(bU,{category:w.slug,examples:x,isSelected:e,onSelect:r,settings:y,title:w.title,goTo:g})},w.slug)})]}):(0,zt.jsx)(bU,{examples:{examples:m},isSelected:e,onClick:t,onSelect:r,settings:y,goTo:g})})}var Dbe=({userConfig:e={},isStatic:t=!1,path:r,onPathChange:o,settings:n})=>{let i=(0,Rb.useSelect)(I=>n??I(R).getEditorSettings(),[n]),s=(0,Rb.useSelect)(I=>I(Obe.store).canUser("create",{kind:"postType",name:"attachment"}),[]);(0,Br.useEffect)(()=>{(0,Rb.dispatch)(En.store).updateSettings({...i,mediaUpload:s?Ibe.uploadMedia:void 0})},[i,s]);let[l,c]=(0,Br.useState)("/"),u=r??l,d=o??c,f=I=>u===`/blocks/${encodeURIComponent(I)}`||u.startsWith(`/blocks/${encodeURIComponent(I)}/`),m=(I,k=!1)=>{if(lS.find(P=>P.slug===I)){d("/colors/palette");return}if(I==="typography"){d("/typography");return}k||d(`/blocks/${encodeURIComponent(I)}`)},h=Mbe(),g=vU(h),v=Fbe(g),b=null,S=null;if(u.includes("/colors"))b="colors";else if(u.includes("/typography"))b="text";else if(u.includes("/blocks")){b="blocks";let I=decodeURIComponent(u).split("/blocks/")[1];I?.includes("/variations")&&([I,S]=I.split("/variations/")),I&&g.find(k=>k.name===I)&&(b=I)}else t||(b="overview");let y=_be.find(I=>I.slug===b),w=(0,Br.useMemo)(()=>y?DT(y,g):{examples:[g.find(I=>I.name===b)]},[y,g,b]),_=(0,Br.useMemo)(()=>b?S&&w?.examples?.length?{examples:iQe(w.examples,S)}:w:{examples:v},[b,v,S,w]),{base:x}=ro(),E=Nbe(u),O=(0,Br.useMemo)(()=>!Ah(e)&&!Ah(x)?Ui(x,e):{},[x,e]),[A]=cS(O),C=(0,Br.useMemo)(()=>({...i,styles:!Ah(A)&&!Ah(e)?A:i.styles,isPreviewMode:!0}),[A,i,e]);return(0,zt.jsx)("div",{className:"editor-style-book",children:(0,zt.jsxs)(En.BlockEditorProvider,{settings:C,children:[(0,zt.jsx)(UN,{disableRootPadding:!0}),(0,zt.jsx)(bU,{examples:_,settings:C,goTo:E,isSelected:t?null:f,onSelect:t?null:m})]})})},bU=({examples:e,isSelected:t,onClick:r,onSelect:o,settings:n,title:i,goTo:s})=>{let[l,c]=(0,Br.useState)(!1),[u,d]=(0,Br.useState)(!1),f=(0,Br.useRef)(null),m={role:"button",onFocus:()=>c(!0),onBlur:()=>c(!1),onKeyDown:g=>{if(g.defaultPrevented)return;let{keyCode:v}=g;r&&(v===GN.ENTER||v===GN.SPACE)&&(g.preventDefault(),r(g))},onClick:g=>{g.defaultPrevented||r&&(g.preventDefault(),r(g))},readonly:!0},h=()=>d(!0);return(0,Br.useLayoutEffect)(()=>{u&&f.current&&s?.top&&nQe("top",f.current)},[s?.top,u]),(0,zt.jsxs)(En.__unstableIframe,{onLoad:h,ref:f,className:Q("editor-style-book__iframe",{"is-focused":l&&!!r,"is-button":!!r}),name:"style-book-canvas",tabIndex:0,...r?m:{},children:[(0,zt.jsx)(En.__unstableEditorStyles,{styles:n.styles}),(0,zt.jsxs)("style",{children:[xbe,!!r&&"body { cursor: var(--wpds-cursor-control, pointer); } body * { pointer-events: none; }"]}),(0,zt.jsx)(aQe,{className:"editor-style-book__examples",filteredExamples:e,label:i?(0,Gc.sprintf)((0,Gc.__)("Examples of blocks in the %s category"),i):(0,Gc.__)("Examples of blocks"),isSelected:t,onSelect:o},i)]})},aQe=(0,Br.memo)(({className:e,filteredExamples:t,label:r,isSelected:o,onSelect:n})=>(0,zt.jsxs)(rm.Composite,{orientation:"vertical",className:e,"aria-label":r,role:"grid",children:[!!t?.examples?.length&&t.examples.map(i=>(0,zt.jsx)(Lbe,{id:`example-${i.name}`,title:i.title,content:i.content,blocks:i.blocks,isSelected:o?.(i.name),onClick:n?()=>n(i.name,!!i.variation):null},i.name)),!!t?.subcategories?.length&&t.subcategories.map(i=>(0,zt.jsxs)(rm.Composite.Group,{className:"editor-style-book__subcategory",children:[(0,zt.jsx)(rm.Composite.GroupLabel,{children:(0,zt.jsx)("h2",{className:"editor-style-book__subcategory-title",children:i.title})}),(0,zt.jsx)(lQe,{examples:i.examples,isSelected:o,onSelect:n})]},`subcategory-${i.slug}`))]})),lQe=({examples:e,isSelected:t,onSelect:r})=>!!e?.length&&e.map(o=>(0,zt.jsx)(Lbe,{id:`example-${o.name}`,title:o.title,content:o.content,blocks:o.blocks,isSelected:t?.(o.name),onClick:r?()=>r(o.name):null},o.name)),cQe=["example-duotones"],Lbe=({id:e,title:t,blocks:r,isSelected:o,onClick:n,content:i})=>{let s=(0,Rb.useSelect)(d=>d(En.store).getSettings(),[]),l=(0,Br.useMemo)(()=>({...s,focusMode:!1,isPreviewMode:!0}),[s]),c=(0,Br.useMemo)(()=>Array.isArray(r)?r:[r],[r]),u=cQe.includes(e)||!n?{disabled:!0,accessibleWhenDisabled:!!n}:{};return(0,zt.jsx)("div",{role:"row",children:(0,zt.jsx)("div",{role:"gridcell",children:(0,zt.jsxs)(rm.Composite.Item,{className:Q("editor-style-book__example",{"is-selected":o,"is-disabled-example":!!u?.disabled}),id:e,"aria-label":n?(0,Gc.sprintf)((0,Gc.__)("Open %s styles in Styles panel"),t):void 0,render:(0,zt.jsx)("div",{}),role:n?"button":null,onClick:n,...u,children:[(0,zt.jsx)("span",{className:"editor-style-book__example-title",children:t}),(0,zt.jsx)("div",{className:"editor-style-book__example-preview","aria-hidden":!0,children:(0,zt.jsx)(rm.Disabled,{className:"editor-style-book__example-preview__content",children:i||(0,zt.jsxs)(oQe,{value:c,settings:l,children:[(0,zt.jsx)(En.__unstableEditorStyles,{}),(0,zt.jsx)(En.BlockList,{renderAppender:!1})]})})})]})})})},Bbe=(0,Br.forwardRef)(sQe);var BT=a(T(),1);function Vbe({path:e,onPathChange:t,userConfig:r,forwardedRef:o}){return(0,BT.jsx)(Bbe,{ref:o,path:e,userConfig:r,isSelected:n=>e===`/blocks/${encodeURIComponent(n)}`||e?.startsWith(`/blocks/${encodeURIComponent(n)}/`),onSelect:n=>{if(lS.find(i=>i.slug===n)){t?.("/colors/palette");return}if(n==="typography"){t?.("/typography");return}t?.("/blocks/"+encodeURIComponent(n))}})}function uQe({path:e,onPathChange:t,forwardedRef:r}){let{user:o}=ro(),{revisions:n,isLoading:i}=db(),s=(0,LT.useMemo)(()=>{let c=e?.match(/^\/revisions\/(.+)$/);return c?c[1]:null},[e]),l=(0,LT.useMemo)(()=>!s||!n.length?null:n.find(c=>String(c.id)===String(s)),[s,n]);return i?null:(0,BT.jsx)(Vbe,{forwardedRef:r,path:e,onPathChange:t,userConfig:l||o})}function dQe({path:e,onPathChange:t},r){return e?.startsWith("/revisions")?(0,BT.jsx)(uQe,{forwardedRef:r,path:e,onPathChange:t}):(0,BT.jsx)(Vbe,{forwardedRef:r,path:e,onPathChange:t})}var jbe=(0,LT.forwardRef)(dQe);var zbe=a(W(),1),Yc=a(pe(),1),yU=a(G(),1),Ih=a(H(),1);var om=a(T(),1),{ExperimentalBlockEditorProvider:fQe,BlockStyleVariationOverridesWithConfig:mQe}=Y(Yc.privateApis);function YN(e){return!e||Object.keys(e).length===0}function pQe({path:e},t){let r=(0,yU.useSelect)(b=>b(Yc.store).getBlocks(),[]),{user:o,base:n}=ro(),{revisions:i,isLoading:s}=db(),l=(0,Ih.useMemo)(()=>{let b=e?.match(/^\/revisions\/(.+)$/);return b?b[1]:null},[e]),u=(0,Ih.useMemo)(()=>!l||!i.length?null:i.find(b=>String(b.id)===String(l)),[l,i])||o,d=(0,Ih.useMemo)(()=>!YN(u)&&!YN(n)?Ui(n,u):{},[n,u]),f=(0,Ih.useMemo)(()=>Array.isArray(r)?r:[r],[r]),m=(0,yU.useSelect)(b=>b(Yc.store).getSettings(),[]),h=(0,Ih.useMemo)(()=>({...m,isPreviewMode:!0}),[m]),[g]=cS(d),v=!YN(g)&&!YN(u)?g:h.styles;return s?null:(0,om.jsxs)(Yc.__unstableIframe,{ref:t,className:"editor-revisions__iframe",name:"revisions",tabIndex:0,children:[(0,om.jsx)("style",{children:".is-root-container { display: flow-root; }"}),(0,om.jsx)(zbe.Disabled,{className:"editor-revisions__example-preview__content",children:(0,om.jsxs)(fQe,{value:f,settings:h,children:[(0,om.jsx)(Yc.BlockList,{renderAppender:!1}),(0,om.jsx)(Yc.__unstableEditorStyles,{styles:v}),(0,om.jsx)(mQe,{config:d})]})})]})}var Hbe=(0,Ih.forwardRef)(pQe);var ZN=a(G(),1),Ab=a(H(),1),qbe=a(W(),1);var qN=a(V(),1),Oh=a(go(),1),Wbe=a(W(),1);var Td=a(T(),1),Ube=20;function wU({direction:e,resizeWidthBy:t}){function r(i){let{keyCode:s}=i;s!==Oh.LEFT&&s!==Oh.RIGHT||(i.preventDefault(),e==="left"&&s===Oh.LEFT||e==="right"&&s===Oh.RIGHT?t(Ube):(e==="left"&&s===Oh.RIGHT||e==="right"&&s===Oh.LEFT)&&t(-Ube))}let o={active:{opacity:1,scaleY:1.3}},n=`resizable-editor__resize-help-${e}`;return(0,Td.jsxs)(Td.Fragment,{children:[(0,Td.jsxs)(We.Root,{children:[(0,Td.jsx)(We.Trigger,{render:(0,Td.jsx)(Wbe.__unstableMotion.button,{className:`editor-resizable-editor__resize-handle is-${e}`,"aria-label":(0,qN.__)("Drag to resize"),"aria-describedby":n,onKeyDown:r,variants:o,whileFocus:"active",whileHover:"active",whileTap:"active",role:"separator","aria-orientation":"vertical"},"handle")}),(0,Td.jsx)(We.Popup,{children:(0,qN.__)("Drag to resize")})]}),(0,Td.jsx)(Ut,{id:n,children:(0,qN.__)("Use left and right arrow keys to resize the canvas.")})]})}var KN=a(T(),1),Gbe={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};function Ybe(e,t,r=0){return t>0&&e>=t-r}function hQe({className:e,enableResizing:t,height:r,children:o}){let[n,i]=(0,Ab.useState)(!1),{setCanvasWidth:s}=Y((0,ZN.useDispatch)(R)),l=(0,ZN.useSelect)(f=>{if(!t)return;let{getCanvasWidth:m}=Y(f(R));return m()},[t]),c=(0,Ab.useRef)(),u=(0,Ab.useCallback)(f=>{if(c.current){let m=Ybe(c.current.offsetWidth+f,c.current.parentElement?.offsetWidth??0,80);s(m?void 0:c.current.offsetWidth+f)}},[s]),d=(0,Ab.useCallback)(f=>{let m=f.offsetWidth,h=f.parentElement?.offsetWidth??0;s(Ybe(m,h,80)?void 0:m)},[s]);return(0,KN.jsx)(qbe.ResizableBox,{className:Q("editor-resizable-editor",e,{"is-resizable":t,"is-resizing":n}),ref:f=>{c.current=f?.resizable},size:{width:t&&l?l+"px":"100%",height:t&&r?r:"100%"},onResizeStart:()=>{i(!0)},onResize:(f,m,h)=>{d(h)},onResizeStop:(f,m,h)=>{i(!1),d(h)},minWidth:300,maxWidth:"100%",maxHeight:"100%",enable:{left:t,right:t},showHandle:t,resizeRatio:2,handleComponent:{left:(0,KN.jsx)(wU,{direction:"left",resizeWidthBy:u}),right:(0,KN.jsx)(wU,{direction:"right",resizeWidthBy:u})},handleClasses:void 0,handleStyles:{left:Gbe,right:Gbe},children:o})}var uS=hQe;var Nh=a(T(),1);function SU(e,t){return t?(0,XN.__)("Style Book"):e?.startsWith("/revisions")?(0,XN.__)("Style Revisions"):""}function Qbe(){let{stylesPath:e,showStylebook:t,showListViewByDefault:r}=(0,VT.useSelect)(m=>{let{getStylesPath:h,getShowStylebook:g}=Y(m(R)),v=m(Xbe.store).get("core","showListViewByDefault");return{stylesPath:h(),showStylebook:g(),showListViewByDefault:v}},[]),{resetStylesNavigation:o,setStylesPath:n}=Y((0,VT.useDispatch)(R)),{setIsListViewOpened:i}=(0,VT.useDispatch)(R),s=(0,QN.useFocusOnMount)("firstElement"),l=(0,QN.useFocusReturn)(),c=null;t?c=(0,Nh.jsx)(jbe,{path:e,onPathChange:n,ref:l}):e?.startsWith("/revisions")&&(c=(0,Nh.jsx)(Hbe,{path:e,ref:l}));let u=SU(e,t),d=()=>{i(r),o()};return(0,Nh.jsx)("div",{className:"editor-styles-canvas",children:(0,Nh.jsx)(uS,{enableResizing:!1,children:(0,Nh.jsxs)("section",{className:"editor-styles-canvas__section",ref:s,onKeyDown:m=>{m.keyCode===Zbe.ESCAPE&&!m.defaultPrevented&&(m.preventDefault(),d())},"aria-label":u,children:[(0,Nh.jsx)(Kbe.Button,{size:"compact",className:"editor-styles-canvas__close-button",icon:_i,label:(0,XN.__)("Close"),onClick:d}),c]})})})}var Jbe=a(G(),1),_U=a(Lt(),1),xU=a(pe(),1),$be=a(oe(),1);function eye(){return(0,Jbe.useSelect)(e=>{let{getBlockAttributes:t,getBlockName:r,__experimentalGetParsedPattern:o}=e(xU.store),{getEditedEntityRecord:n,getCurrentTheme:i}=e($be.store),{getEditedContentOnlySection:s}=Y(e(xU.store)),l=s();if(!l)return null;let c=t(l),u=c?.metadata?.patternName;if(u){let f=typeof o=="function"?o(u):null;return{patternName:u,patternTitle:f?.title||c?.metadata?.name,type:"pattern"}}let d=r(l);if(d==="core/block"&&c?.ref){let f=n("postType","wp_block",c.ref);if(f?.title)return{patternName:c.ref,patternTitle:(0,_U.decodeEntities)(f.title),type:"synced-pattern"}}if(d==="core/template-part"&&c?.slug){let f=c.theme||i()?.stylesheet,m=f?`${f}//${c.slug}`:null;if(m){let h=n("postType","wp_template_part",m);if(h?.title)return{patternName:c.slug,patternTitle:(0,_U.decodeEntities)(h.title),type:"template-part"}}}return null},[])}var Xi=a(T(),1),gQe=qc.__unstableMotion.create(qc.Button);function $N(e){let{stopEditingContentOnlySection:t}=Y((0,jT.useDispatch)(zT.store)),r=eye(),{postId:o,postType:n,postTypeLabel:i,documentTitle:s,isNotFound:l,templateTitle:c,onNavigateToPreviousEntityRecord:u,isTemplatePreview:d,stylesCanvasTitle:f}=(0,jT.useSelect)(O=>{let{getCurrentPostType:A,getCurrentPostId:C,getEditorSettings:I,getRenderingMode:k}=O(R),{getEditedEntityRecord:P,getPostType:N,getCurrentTheme:U,isResolving:F}=O(rye.store),D=A(),B=C(),L=P("postType",D,B),{default_template_types:M=[]}=U()??{},z=bl({templateTypes:M,template:L}),K=N(D)?.labels?.singular_name,{getStylesPath:Z,getShowStylebook:q}=Y(O(R)),X=Z(),ie=q(),$=SU(X,ie);return{postId:B,postType:D,postTypeLabel:K,documentTitle:L.title,isNotFound:!L&&!F("getEditedEntityRecord","postType",D,B),templateTitle:z.title,onNavigateToPreviousEntityRecord:I().onNavigateToPreviousEntityRecord,isTemplatePreview:k()==="template-locked",stylesCanvasTitle:$}},[]),{open:m}=(0,jT.useDispatch)(oye.store),h=(0,nye.useReducedMotion)(),g=!window.__experimentalAdminBarInEditor,v=bB.includes(n),b=!!u||!!r,S=v?c:s,y=r?.patternTitle||e.title||f||S,w=e.icon,_=O=>{O.stopPropagation(),r?t():u&&u()},x=LN(o),E=(0,JN.useRef)(!1);return(0,JN.useEffect)(()=>{E.current=!0},[]),(0,Xi.jsxs)("div",{className:Q("editor-document-bar",{"has-back-button":b,"has-shortcut":g}),children:[(0,Xi.jsx)(qc.__unstableAnimatePresence,{children:b&&(0,Xi.jsx)(gQe,{className:"editor-document-bar__back",icon:(0,Mh.isRTL)()?b4:h4,onClick:_,size:"compact",initial:E.current?{opacity:0,transform:"translateX(15%)"}:!1,animate:{opacity:1,transform:"translateX(0%)"},exit:{opacity:0,transform:"translateX(15%)"},transition:h?{duration:0}:void 0,children:(0,Mh.__)("Back")})}),!v&&d&&!b&&(0,Xi.jsx)(zT.BlockIcon,{icon:ja,className:"editor-document-bar__icon-layout"}),l?(0,Xi.jsx)(qc.__experimentalText,{children:(0,Mh.__)("Document not found")}):(0,Xi.jsxs)(qc.Button,{className:"editor-document-bar__command",onClick:()=>m(),size:"compact",children:[(0,Xi.jsxs)(qc.__unstableMotion.div,{className:"editor-document-bar__title",initial:E.current?{opacity:0,transform:b?"translateX(15%)":"translateX(-15%)"}:!1,animate:{opacity:1,transform:"translateX(0%)"},transition:h?{duration:0}:void 0,children:[w&&(0,Xi.jsx)(zT.BlockIcon,{icon:w}),(0,Xi.jsxs)(qc.__experimentalText,{size:"body",as:"h1",children:[(0,Xi.jsx)("span",{className:"editor-document-bar__post-title",children:y?(0,sye.__unstableStripHTML)(y):(0,Mh.__)("No title")}),r&&(0,Xi.jsx)("span",{className:"editor-document-bar__post-type-label",children:r.type==="template-part"?`\xB7 ${(0,Mh.__)("Template Part")}`:`\xB7 ${(0,Mh.__)("Pattern")}`}),!r&&x&&(0,Xi.jsx)("span",{className:"editor-document-bar__post-type-label",children:`\xB7 ${x}`}),!r&&i&&!e.title&&!x&&(0,Xi.jsx)("span",{className:"editor-document-bar__post-type-label",children:`\xB7 ${(0,iye.decodeEntities)(i)}`})]})]},b),g&&(0,Xi.jsx)("span",{className:"editor-document-bar__shortcut",children:tye.displayShortcut.primary("k")})]})]})}var Ob=a(V(),1),dS=a(G(),1),tM=a(H(),1),rM=a(CT(),1),eM=a(pe(),1),aye=a(oe(),1),Jn=a(W(),1);var Ib=a(T(),1),vQe=({children:e,isValid:t,isDisabled:r,level:o,href:n,onSelect:i})=>{function s(l){if(r){l.preventDefault();return}i()}return(0,Ib.jsx)("li",{className:Q("document-outline__item",`is-${o.toLowerCase()}`,{"is-invalid":!t,"is-disabled":r}),children:(0,Ib.jsxs)("a",{href:n,className:"document-outline__button","aria-disabled":r,onClick:s,children:[(0,Ib.jsx)("span",{className:"document-outline__emdash","aria-hidden":"true"}),(0,Ib.jsx)("strong",{className:"document-outline__level",children:o}),(0,Ib.jsx)("span",{className:"document-outline__item-content",children:e})]})})},CU=vQe;var dr=a(T(),1),bQe=(0,dr.jsx)("em",{children:(0,Ob.__)("(Empty heading)")}),yQe=[(0,dr.jsx)("br",{},"incorrect-break"),(0,dr.jsx)("em",{children:(0,Ob.__)("(Incorrect heading level)")},"incorrect-message")],wQe=[(0,dr.jsx)("br",{},"incorrect-break-h1"),(0,dr.jsx)("em",{children:(0,Ob.__)("(Your theme may already use a H1 for the post title)")},"incorrect-message-h1")],SQe=[(0,dr.jsx)("br",{},"incorrect-break-multiple-h1"),(0,dr.jsx)("em",{children:(0,Ob.__)("(Multiple H1 headings are not recommended)")},"incorrect-message-multiple-h1")];function _Qe(){return(0,dr.jsxs)(Jn.SVG,{width:"138",height:"148",viewBox:"0 0 138 148",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,dr.jsx)(Jn.Rect,{width:"138",height:"148",rx:"4",fill:"#F0F6FC"}),(0,dr.jsx)(Jn.Line,{x1:"44",y1:"28",x2:"24",y2:"28",stroke:"#DDDDDD"}),(0,dr.jsx)(Jn.Rect,{x:"48",y:"16",width:"27",height:"23",rx:"4",fill:"#DDDDDD"}),(0,dr.jsx)(Jn.Path,{d:"M54.7585 32V23.2727H56.6037V26.8736H60.3494V23.2727H62.1903V32H60.3494V28.3949H56.6037V32H54.7585ZM67.4574 23.2727V32H65.6122V25.0241H65.5611L63.5625 26.277V24.6406L65.723 23.2727H67.4574Z",fill:"black"}),(0,dr.jsx)(Jn.Line,{x1:"55",y1:"59",x2:"24",y2:"59",stroke:"#DDDDDD"}),(0,dr.jsx)(Jn.Rect,{x:"59",y:"47",width:"29",height:"23",rx:"4",fill:"#DDDDDD"}),(0,dr.jsx)(Jn.Path,{d:"M65.7585 63V54.2727H67.6037V57.8736H71.3494V54.2727H73.1903V63H71.3494V59.3949H67.6037V63H65.7585ZM74.6605 63V61.6705L77.767 58.794C78.0313 58.5384 78.2528 58.3082 78.4318 58.1037C78.6136 57.8991 78.7514 57.6989 78.8452 57.5028C78.9389 57.304 78.9858 57.0895 78.9858 56.8594C78.9858 56.6037 78.9276 56.3835 78.8111 56.1989C78.6946 56.0114 78.5355 55.8679 78.3338 55.7685C78.1321 55.6662 77.9034 55.6151 77.6477 55.6151C77.3807 55.6151 77.1477 55.669 76.9489 55.777C76.75 55.8849 76.5966 56.0398 76.4886 56.2415C76.3807 56.4432 76.3267 56.6832 76.3267 56.9616H74.5753C74.5753 56.3906 74.7045 55.8949 74.9631 55.4744C75.2216 55.054 75.5838 54.7287 76.0497 54.4986C76.5156 54.2685 77.0526 54.1534 77.6605 54.1534C78.2855 54.1534 78.8295 54.2642 79.2926 54.4858C79.7585 54.7045 80.1207 55.0085 80.3793 55.3977C80.6378 55.7869 80.767 56.233 80.767 56.7358C80.767 57.0653 80.7017 57.3906 80.571 57.7116C80.4432 58.0327 80.2145 58.3892 79.8849 58.7812C79.5554 59.1705 79.0909 59.6378 78.4915 60.1832L77.2173 61.4318V61.4915H80.8821V63H74.6605Z",fill:"black"}),(0,dr.jsx)(Jn.Line,{x1:"80",y1:"90",x2:"24",y2:"90",stroke:"#DDDDDD"}),(0,dr.jsx)(Jn.Rect,{x:"84",y:"78",width:"30",height:"23",rx:"4",fill:"#F0B849"}),(0,dr.jsx)(Jn.Path,{d:"M90.7585 94V85.2727H92.6037V88.8736H96.3494V85.2727H98.1903V94H96.3494V90.3949H92.6037V94H90.7585ZM99.5284 92.4659V91.0128L103.172 85.2727H104.425V87.2841H103.683L101.386 90.919V90.9872H106.564V92.4659H99.5284ZM103.717 94V92.0227L103.751 91.3793V85.2727H105.482V94H103.717Z",fill:"black"}),(0,dr.jsx)(Jn.Line,{x1:"66",y1:"121",x2:"24",y2:"121",stroke:"#DDDDDD"}),(0,dr.jsx)(Jn.Rect,{x:"70",y:"109",width:"29",height:"23",rx:"4",fill:"#DDDDDD"}),(0,dr.jsx)(Jn.Path,{d:"M76.7585 125V116.273H78.6037V119.874H82.3494V116.273H84.1903V125H82.3494V121.395H78.6037V125H76.7585ZM88.8864 125.119C88.25 125.119 87.6832 125.01 87.1861 124.791C86.6918 124.57 86.3011 124.266 86.0142 123.879C85.7301 123.49 85.5838 123.041 85.5753 122.533H87.4332C87.4446 122.746 87.5142 122.933 87.642 123.095C87.7727 123.254 87.946 123.378 88.1619 123.466C88.3778 123.554 88.6207 123.598 88.8906 123.598C89.1719 123.598 89.4205 123.548 89.6364 123.449C89.8523 123.349 90.0213 123.212 90.1435 123.036C90.2656 122.859 90.3267 122.656 90.3267 122.426C90.3267 122.193 90.2614 121.987 90.1307 121.808C90.0028 121.626 89.8182 121.484 89.5767 121.382C89.3381 121.28 89.054 121.229 88.7244 121.229H87.9105V119.874H88.7244C89.0028 119.874 89.2486 119.825 89.4616 119.729C89.6776 119.632 89.8452 119.499 89.9645 119.328C90.0838 119.155 90.1435 118.953 90.1435 118.723C90.1435 118.504 90.0909 118.312 89.9858 118.148C89.8835 117.98 89.7386 117.849 89.5511 117.756C89.3665 117.662 89.1506 117.615 88.9034 117.615C88.6534 117.615 88.4247 117.661 88.2173 117.751C88.0099 117.839 87.8438 117.966 87.7188 118.131C87.5938 118.295 87.527 118.489 87.5185 118.71H85.75C85.7585 118.207 85.902 117.764 86.1804 117.381C86.4588 116.997 86.8338 116.697 87.3054 116.482C87.7798 116.263 88.3153 116.153 88.9119 116.153C89.5142 116.153 90.0412 116.263 90.4929 116.482C90.9446 116.7 91.2955 116.996 91.5455 117.368C91.7983 117.737 91.9233 118.152 91.9205 118.612C91.9233 119.101 91.7713 119.509 91.4645 119.835C91.1605 120.162 90.7642 120.369 90.2756 120.457V120.526C90.9176 120.608 91.4063 120.831 91.7415 121.195C92.0795 121.555 92.2472 122.007 92.2443 122.55C92.2472 123.047 92.1037 123.489 91.8139 123.875C91.527 124.261 91.1307 124.565 90.625 124.787C90.1193 125.009 89.5398 125.119 88.8864 125.119Z",fill:"black"})]})}var xQe=(e=[])=>e.filter(t=>t.name==="core/heading").map(t=>({...t,level:t.attributes.level,isEmpty:CQe(t)})),CQe=e=>!e.attributes.content||e.attributes.content.trim().length===0;function fS({onSelect:e,hasOutlineItemsDisabled:t}){let{selectBlock:r}=(0,dS.useDispatch)(eM.store),{title:o,isTitleSupported:n}=(0,dS.useSelect)(g=>{let{getEditedPostAttribute:v}=g(R),{getPostType:b}=g(aye.store),S=b(v("type"));return{title:v("title"),isTitleSupported:S?.supports?.title??!1}}),i=(0,dS.useSelect)(g=>{let{getClientIdsWithDescendants:v,getBlock:b}=g(eM.store);return v().map(y=>b(y))}),s=(0,dS.useSelect)(g=>{if(g(R).getRenderingMode()==="post-only")return;let{getBlocksByName:v,getClientIdsOfDescendants:b}=g(eM.store),[S]=v("core/post-content");if(S)return b(S)},[]),l=(0,tM.useRef)(1),c=(0,tM.useMemo)(()=>xQe(i),[i]);if(c.length<1)return(0,dr.jsxs)("div",{className:"editor-document-outline has-no-headings",children:[(0,dr.jsx)(_Qe,{}),(0,dr.jsx)("p",{children:(0,Ob.__)("Navigate the structure of your document and address issues like empty or incorrect heading levels.")})]});let u=document.querySelector(".editor-post-title__input"),d=n&&o&&u,m=c.reduce((g,v)=>({...g,[v.level]:(g[v.level]||0)+1}),{})[1]>1;function h(g){return Array.isArray(s)?s.includes(g):!0}return(0,dr.jsx)("div",{className:"document-outline",children:(0,dr.jsxs)("ul",{children:[d&&(0,dr.jsx)(CU,{level:(0,Ob.__)("Title"),isValid:!0,onSelect:e,href:`#${u.id}`,isDisabled:t,children:o}),c.map(g=>{let v=g.level>l.current+1,b=!g.isEmpty&&!v&&!!g.level&&(g.level!==1||!m&&!d);return l.current=g.level,(0,dr.jsxs)(CU,{level:`H${g.level}`,isValid:b,isDisabled:t||!h(g.clientId),href:`#block-${g.clientId}`,onSelect:()=>{r(g.clientId),e?.()},children:[g.isEmpty?bQe:(0,rM.getTextContent)((0,rM.create)({html:g.attributes.content})),v&&yQe,g.level===1&&m&&SQe,d&&g.level===1&&!m&&wQe]},g.clientId)})]})})}var lye=a(G(),1),cye=a(pe(),1);function uye({children:e}){return(0,lye.useSelect)(r=>{let{getGlobalBlockCount:o}=r(cye.store);return o("core/heading")>0})?e:null}var dye=a(H(),1),fye=a(G(),1),ql=a(V(),1),mye=a(pe(),1),pye=a(fa(),1),hye=a(go(),1),gye=a(T(),1);function TQe(){let{registerShortcut:e}=(0,fye.useDispatch)(pye.store);return(0,dye.useEffect)(()=>{e({name:"core/editor/toggle-mode",category:"global",description:(0,ql.__)("Switch between visual editor and code editor."),keyCombination:{modifier:"secondary",character:"m"}}),e({name:"core/editor/save",category:"global",description:(0,ql.__)("Save your changes."),keyCombination:{modifier:"primary",character:"s"}}),e({name:"core/editor/undo",category:"global",description:(0,ql.__)("Undo your last changes."),keyCombination:{modifier:"primary",character:"z"}}),e({name:"core/editor/redo",category:"global",description:(0,ql.__)("Redo your last undo."),keyCombination:{modifier:"primaryShift",character:"z"},aliases:(0,hye.isAppleOS)()?[]:[{modifier:"primary",character:"y"}]}),e({name:"core/editor/toggle-list-view",category:"global",description:(0,ql.__)("Show or hide the List View."),keyCombination:{modifier:"access",character:"o"}}),e({name:"core/editor/toggle-distraction-free",category:"global",description:(0,ql.__)("Enter or exit distraction free mode."),keyCombination:{modifier:"primaryShift",character:"\\"}}),e({name:"core/editor/toggle-sidebar",category:"global",description:(0,ql.__)("Show or hide the Settings panel."),keyCombination:{modifier:"primaryShift",character:","}}),e({name:"core/editor/keyboard-shortcuts",category:"main",description:(0,ql.__)("Display these keyboard shortcuts."),keyCombination:{modifier:"access",character:"h"}}),e({name:"core/editor/new-note",category:"block",description:(0,ql.__)("Add a new note."),keyCombination:{modifier:"primaryAlt",character:"m"}}),e({name:"core/editor/next-region",category:"global",description:(0,ql.__)("Navigate to the next part of the editor."),keyCombination:{modifier:"ctrl",character:"`"},aliases:[{modifier:"access",character:"n"}]}),e({name:"core/editor/previous-region",category:"global",description:(0,ql.__)("Navigate to the previous part of the editor."),keyCombination:{modifier:"ctrlShift",character:"`"},aliases:[{modifier:"access",character:"p"},{modifier:"ctrlShift",character:"~"}]})},[e]),(0,gye.jsx)(mye.BlockEditorKeyboardShortcuts.Register,{})}var vye=TQe;var oM=a(V(),1),bye=a(W(),1),nM=a(G(),1),HT=a(go(),1);var yye=a(H(),1);var wye=a(T(),1);function EQe(e,t){let r=(0,HT.isAppleOS)()?HT.displayShortcut.primaryShift("z"):HT.displayShortcut.primary("y"),o=(0,nM.useSelect)(i=>i(R).hasEditorRedo(),[]),{redo:n}=(0,nM.useDispatch)(R);return(0,wye.jsx)(bye.Button,{__next40pxDefaultSize:!0,...e,ref:t,icon:(0,oM.isRTL)()?Pg:Cg,label:(0,oM.__)("Redo"),shortcut:r,"aria-disabled":!o,onClick:o?n:void 0,className:"editor-history__redo"})}var iM=(0,yye.forwardRef)(EQe);var sM=a(V(),1),Sye=a(W(),1),aM=a(G(),1),_ye=a(go(),1);var xye=a(H(),1);var Cye=a(T(),1);function PQe(e,t){let r=(0,aM.useSelect)(n=>n(R).hasEditorUndo(),[]),{undo:o}=(0,aM.useDispatch)(R);return(0,Cye.jsx)(Sye.Button,{__next40pxDefaultSize:!0,...e,ref:t,icon:(0,sM.isRTL)()?Cg:Pg,label:(0,sM.__)("Undo"),shortcut:_ye.displayShortcut.primary("z"),"aria-disabled":!r,onClick:r?o:void 0,className:"editor-history__undo"})}var lM=(0,xye.forwardRef)(PQe);var Eye=a(Va(),1),Pye=a(G(),1),kye=a(pe(),1),Rye=a(Rt(),1);var cM=a(W(),1),mS=a(V(),1),uM=a(G(),1),Tye=a(H(),1),TU=a(pe(),1),Nb=a(T(),1);function dM(){let[e,t]=(0,Tye.useState)(!1),r=(0,uM.useSelect)(i=>i(TU.store).isValidTemplate(),[]),{setTemplateValidity:o,synchronizeTemplate:n}=(0,uM.useDispatch)(TU.store);return r?null:(0,Nb.jsxs)(Nb.Fragment,{children:[(0,Nb.jsx)(cM.Notice,{className:"editor-template-validation-notice",isDismissible:!1,status:"warning",actions:[{label:(0,mS.__)("Keep it as is"),onClick:()=>o(!0)},{label:(0,mS.__)("Reset the template"),onClick:()=>t(!0)}],children:(0,mS.__)("The content of your post doesn\u2019t match the template assigned to your post type.")}),(0,Nb.jsx)(cM.__experimentalConfirmDialog,{isOpen:e,confirmButtonText:(0,mS.__)("Reset"),onConfirm:()=>{t(!1),n()},onCancel:()=>t(!1),size:"medium",children:(0,mS.__)("Resetting the template may result in loss of content, do you want to continue?")})]})}var EU=a(T(),1);function kQe(){(0,Eye.default)("wp.editor.EditorNotices",{since:"7.0",version:"7.2",alternative:"wp.notices.InlineNotices"});let e=(0,Pye.useSelect)(t=>t(kye.store).isValidTemplate(),[]);return(0,EU.jsx)(Rye.InlineNotices,{pinnedNoticesClassName:"components-editor-notices__pinned",dismissibleNoticesClassName:"components-editor-notices__dismissible",children:!e&&(0,EU.jsx)(dM,{})})}var Aye=kQe;var Iye=a(Va(),1),Oye=a(Rt(),1),Nye=a(T(),1);function Mye(){return(0,Iye.default)("wp.editor.EditorSnackbars",{since:"7.0",version:"7.2",alternative:"wp.notices.SnackbarNotices"}),(0,Nye.jsx)(Oye.SnackbarNotices,{className:"components-editor-notices__snackbar"})}var am=a(W(),1),sm=a(V(),1),pS=a(H(),1),UT=a(ke(),1),zye=a(G(),1);var Mb=a(V(),1),RU=a(G(),1),mM=a(W(),1),AU=a(oe(),1);var fM=a(W(),1),PU=a(V(),1),Fye=a(G(),1),kU=a(oe(),1),Dye=a(Lt(),1);var nm=a(T(),1);function Lye({record:e,checked:t,onChange:r}){let{name:o,kind:n,title:i,key:s}=e,{entityRecordTitle:l,hasPostMetaChanges:c}=(0,Fye.useSelect)(u=>{if(n!=="postType"||o!=="wp_template")return{entityRecordTitle:i,hasPostMetaChanges:Y(u(R)).hasPostMetaChanges(o,s)};let d=u(kU.store).getEditedEntityRecord(n,o,s),{default_template_types:f=[]}=u(kU.store).getCurrentTheme()??{};return{entityRecordTitle:bl({template:d,templateTypes:f}).title,hasPostMetaChanges:Y(u(R)).hasPostMetaChanges(o,s)}},[o,n,i,s]);return(0,nm.jsxs)(nm.Fragment,{children:[(0,nm.jsx)(fM.PanelRow,{children:(0,nm.jsx)(fM.CheckboxControl,{label:(0,Dye.decodeEntities)(l)||(0,PU.__)("Untitled"),checked:t,onChange:r,className:"entities-saved-states__change-control"})}),c&&(0,nm.jsx)("ul",{className:"entities-saved-states__changes",children:(0,nm.jsx)("li",{children:(0,PU.__)("Post Meta.")})})]})}var im=a(T(),1);function RQe(e,t){switch(e){case"site":return t===1?(0,Mb.__)("This change will affect your whole site."):(0,Mb.__)("These changes will affect your whole site.");case"wp_template":return(0,Mb.__)("This change will affect other parts of your site that use this template.");case"page":case"post":return(0,Mb.__)("The following has been modified.")}}function AQe({record:e}){let{editedRecord:t,savedRecord:r}=(0,RU.useSelect)(n=>{let{getEditedEntityRecord:i,getEntityRecord:s}=n(AU.store);return{editedRecord:i(e.kind,e.name,e.key),savedRecord:s(e.kind,e.name,e.key)}},[e.kind,e.name,e.key]),o=XC(t,r,{maxResults:10});return o.length?(0,im.jsx)("ul",{className:"entities-saved-states__changes",children:o.map(n=>(0,im.jsx)("li",{children:n},n))}):null}function IQe({record:e,count:t}){if(e?.name==="globalStyles")return null;let r=RQe(e?.name,t);return r?(0,im.jsx)(mM.PanelRow,{children:r}):null}function Bye({list:e,unselectedEntities:t,setUnselectedEntities:r}){let o=e.length,n=e[0],s=(0,RU.useSelect)(l=>l(AU.store).getEntityConfig(n.kind,n.name),[n.kind,n.name]).label;return n?.name==="wp_template_part"&&(s=o===1?(0,Mb.__)("Template Part"):(0,Mb.__)("Template Parts")),(0,im.jsxs)(mM.PanelBody,{title:s,initialOpen:!0,className:"entities-saved-states__panel-body",children:[(0,im.jsx)(IQe,{record:n,count:o}),e.map(l=>(0,im.jsx)(Lye,{record:l,checked:!t.some(c=>c.kind===l.kind&&c.name===l.name&&c.key===l.key&&c.property===l.property),onChange:c=>r(l,c)},l.key||l.property)),n?.name==="globalStyles"&&(0,im.jsx)(AQe,{record:n})]})}var Vye=a(G(),1),jye=a(oe(),1),pM=a(H(),1),hM=()=>{let{editedEntities:e,siteEdits:t,siteEntityConfig:r}=(0,Vye.useSelect)(c=>{let{__experimentalGetDirtyEntityRecords:u,getEntityRecordEdits:d,getEntityConfig:f}=c(jye.store);return{editedEntities:u(),siteEdits:d("root","site"),siteEntityConfig:f("root","site")}},[]),o=(0,pM.useMemo)(()=>{let c=e.filter(v=>!(v.kind==="root"&&v.name==="site")),u=r?.meta?.labels??{},{site_logo:d,site_icon:f,...m}=t??{},g=[d!==void 0&&"site_logo",f!==void 0&&"site_icon",...Object.keys(m)].filter(Boolean).map(v=>({kind:"root",name:"site",title:u[v]||v,property:v}));return[...c,...g]},[e,t,r]),[n,i]=(0,pM.useState)([]),s=({kind:c,name:u,key:d,property:f},m)=>{i(m?n.filter(h=>h.kind!==c||h.name!==u||h.key!==d||h.property!==f):[...n,{kind:c,name:u,key:d,property:f}])},l=o.length-n.length>0;return{dirtyEntityRecords:o,isDirty:l,setUnselectedEntities:s,unselectedEntities:n}};var $n=a(T(),1);function OQe(e){return e}function gM({close:e,renderDialog:t,variant:r}){let o=hM();return(0,$n.jsx)(WT,{close:e,renderDialog:t,variant:r,...o})}function WT({additionalPrompt:e=void 0,close:t,onSave:r=OQe,saveEnabled:o=void 0,saveLabel:n=(0,sm.__)("Save"),renderDialog:i,dirtyEntityRecords:s,isDirty:l,setUnselectedEntities:c,unselectedEntities:u,variant:d="default",successNoticeContent:f}){let m=(0,pS.useRef)(),{saveDirtyEntities:h}=Y((0,zye.useDispatch)(R)),g=s.reduce((N,U)=>{let{name:F}=U;return N[F]||(N[F]=[]),N[F].push(U),N},{}),{site:v,wp_template:b,wp_template_part:S,...y}=g,w=[v,b,S,...Object.values(y)].filter(Array.isArray),_=o??l,x=(0,pS.useCallback)(()=>t(),[t]),[E,O]=(0,UT.__experimentalUseDialog)({onClose:()=>x()}),A=(0,UT.useInstanceId)(WT,"entities-saved-states__panel-label"),C=(0,UT.useInstanceId)(WT,"entities-saved-states__panel-description"),I=s.length?(0,sm.__)("Select the items you want to save."):void 0,k=d==="inline",P=(0,$n.jsxs)($n.Fragment,{children:[(0,$n.jsx)(am.FlexItem,{isBlock:!k,as:am.Button,variant:k?"tertiary":"secondary",size:k?void 0:"compact",onClick:x,children:(0,sm.__)("Cancel")}),(0,$n.jsx)(am.FlexItem,{isBlock:!k,as:am.Button,ref:m,variant:"primary",size:k?void 0:"compact",disabled:!_,accessibleWhenDisabled:!0,onClick:()=>h({onSave:r,dirtyEntityRecords:s,entitiesToSkip:u,close:t,successNoticeContent:f}),className:"editor-entities-saved-states__save-button",children:n})]});return(0,$n.jsxs)("div",{ref:i?E:void 0,...i&&O,className:Q("entities-saved-states__panel",{"is-inline":k}),role:i?"dialog":void 0,"aria-labelledby":i?A:void 0,"aria-describedby":i?C:void 0,children:[!k&&(0,$n.jsx)(am.Flex,{className:"entities-saved-states__panel-header",gap:2,children:P}),(0,$n.jsxs)("div",{className:"entities-saved-states__text-prompt",children:[(0,$n.jsx)("div",{className:"entities-saved-states__text-prompt--header-wrapper",children:(0,$n.jsx)("strong",{id:i?A:void 0,className:"entities-saved-states__text-prompt--header",children:(0,sm.__)("Are you ready to save?")})}),(0,$n.jsxs)("div",{id:i?C:void 0,children:[e,(0,$n.jsx)("p",{className:"entities-saved-states__text-prompt--changes-count",children:l?(0,pS.createInterpolateElement)((0,sm.sprintf)((0,sm._n)("There is <strong>%d site change</strong> waiting to be saved.","There are <strong>%d site changes</strong> waiting to be saved.",s.length),s.length),{strong:(0,$n.jsx)("strong",{})}):I})]})]}),w.map(N=>(0,$n.jsx)(Bye,{list:N,unselectedEntities:u,setUnselectedEntities:c},N[0].name)),k&&(0,$n.jsx)(am.Flex,{direction:"row",justify:"flex-end",className:"entities-saved-states__panel-footer",children:P})]})}var Uye=a(H(),1),vM=a(V(),1),Fb=a(W(),1),Wye=a(G(),1),Gye=a(ke(),1),Yye=a(An(),1);var Fh=a(T(),1);function NQe(){try{return(0,Wye.select)(R).getEditedPostContent()}catch{}}function Hye({text:e,children:t,variant:r="secondary"}){let o=(0,Gye.useCopyToClipboard)(e);return(0,Fh.jsx)(Fb.Button,{__next40pxDefaultSize:!0,variant:r,ref:o,children:t})}var MQe=class extends Uye.Component{constructor(){super(...arguments),this.state={error:null}}componentDidCatch(e){(0,Yye.doAction)("editor.ErrorBoundary.errorLogged",e)}static getDerivedStateFromError(e){return{error:e}}render(){let{error:e}=this.state,{canCopyContent:t=!1}=this.props;return e?(0,Fh.jsxs)(Fb.__experimentalHStack,{className:"editor-error-boundary",alignment:"baseline",spacing:4,justify:"space-between",expanded:!1,wrap:!0,children:[(0,Fh.jsx)(Fb.__experimentalText,{as:"p",children:(0,vM.__)("The editor has encountered an unexpected error.")}),(0,Fh.jsxs)(Fb.__experimentalHStack,{expanded:!1,children:[t&&(0,Fh.jsx)(Hye,{text:NQe,children:(0,vM.__)("Copy contents")}),(0,Fh.jsx)(Hye,{variant:"primary",text:e?.stack,children:(0,vM.__)("Copy error")})]})]}):this.props.children}},qye=MQe;var lm=a(H(),1),YT=a(ke(),1),Dh=a(G(),1),IU=a(V(),1),Kye=a(kt(),1),Zye=a(Rt(),1);var Xye=a(T(),1),FQe=window.requestIdleCallback?window.requestIdleCallback:window.requestAnimationFrame,GT,DQe=()=>{if(GT!==void 0)return GT;try{window.sessionStorage.setItem("__wpEditorTestSessionStorage",""),window.sessionStorage.removeItem("__wpEditorTestSessionStorage"),GT=!0}catch{GT=!1}return GT};function LQe(){let e=(0,Dh.useRegistry)(),{postId:t,isEditedPostNew:r}=(0,Dh.useSelect)(o=>({postId:o(R).getCurrentPostId(),isEditedPostNew:o(R).isEditedPostNew()}),[]);(0,lm.useEffect)(()=>{let o=$Y(t,r);if(!o)return;try{o=JSON.parse(o)}catch{return}let{post_title:n,content:i,excerpt:s}=o,l={title:n,content:i,excerpt:s},{getEditedPostAttribute:c,getEditorSettings:u}=e.select(R);if(!Object.keys(l).some(S=>l[S]!==c(S))){s2(t,r);return}if(!!u().autosave)return;let{createWarningNotice:m,removeNotice:h}=e.dispatch(Zye.store),{editPost:g,resetEditorBlocks:v}=e.dispatch(R),b="wpEditorAutosaveRestore";m((0,IU.__)("The backup of this post in your browser is different from the version below."),{id:b,actions:[{label:(0,IU.__)("Restore the backup"),onClick(){let{content:S,...y}=l;g(y),v((0,Kye.parse)(l.content)),h(b)}}]})},[e,t,r])}function BQe(){let{postId:e,isEditedPostNew:t,isDirty:r,isAutosaving:o,didError:n}=(0,Dh.useSelect)(u=>({postId:u(R).getCurrentPostId(),isEditedPostNew:u(R).isEditedPostNew(),isDirty:u(R).isEditedPostDirty(),isAutosaving:u(R).isAutosavingPost(),didError:u(R).didPostSaveRequestFail()}),[]),i=(0,lm.useRef)(r),s=(0,lm.useRef)(o);(0,lm.useEffect)(()=>{!n&&(s.current&&!o||i.current&&!r)&&s2(e,t),i.current=r,s.current=o},[r,o,n]);let l=(0,YT.usePrevious)(t),c=(0,YT.usePrevious)(e);(0,lm.useEffect)(()=>{c===e&&l&&!t&&s2(e,!0)},[t,e])}function VQe(){let{autosave:e}=(0,Dh.useDispatch)(R),t=(0,lm.useCallback)(()=>{FQe(()=>e({local:!0}))},[]);LQe(),BQe();let r=(0,Dh.useSelect)(o=>o(R).getEditorSettings().localAutosaveInterval,[]);return(0,Xye.jsx)(DN,{interval:r,autosave:t})}var Qye=(0,YT.ifCondition)(DQe)(VQe);var Jye=a(G(),1),$ye=a(oe(),1);function jQe({children:e}){return(0,Jye.useSelect)(r=>{let{getEditedPostAttribute:o}=r(R),{getPostType:n}=r($ye.store);return!!n(o("type"))?.supports?.["page-attributes"]},[])?e:null}var hS=jQe;var OU=a(V(),1),vS=a(W(),1),bM=a(G(),1),r0e=a(H(),1);var e0e=a(G(),1),t0e=a(oe(),1);function zQe(e={},t){if(e[t]!==void 0)return!!e[t];let[r,o]=t.split("."),[n]=Array.isArray(e[r])?e[r]:[];return Array.isArray(n)?n.includes(o):!!n?.[o]}function HQe({children:e,supportKeys:t}){let r=(0,e0e.useSelect)(n=>{let{getEditedPostAttribute:i}=n(R),{getPostType:s}=n(t0e.store);return s(i("type"))},[]),o=!!r;return r&&(o=(Array.isArray(t)?t:[t]).some(n=>zQe(r.supports,n))),o?e:null}var oo=HQe;var gS=a(T(),1);function UQe(){let e=(0,bM.useSelect)(s=>s(R).getEditedPostAttribute("menu_order")??0,[]),{editPost:t}=(0,bM.useDispatch)(R),[r,o]=(0,r0e.useState)(null),n=s=>{o(s);let l=Number(s);Number.isInteger(l)&&s.trim?.()!==""&&t({menu_order:l})},i=r??e;return(0,gS.jsx)(vS.Flex,{children:(0,gS.jsx)(vS.FlexBlock,{children:(0,gS.jsx)(vS.__experimentalNumberControl,{__next40pxDefaultSize:!0,label:(0,OU.__)("Order"),help:(0,OU.__)("Set the page order."),value:i,onChange:n,hideLabelFromVision:!0,onBlur:()=>{o(null)}})})})}function o0e(){return(0,gS.jsx)(oo,{supportKeys:"page-attributes",children:(0,gS.jsx)(UQe,{})})}var h0e=a(G(),1),g0e=a(oe(),1);var MU=a(l0(),1),Ta=a(V(),1),Lh=a(W(),1),c0e=a(ke(),1),Ed=a(H(),1),yS=a(G(),1),DU=a(Lt(),1),wM=a(oe(),1),u0e=a(pe(),1),d0e=a(uo(),1);var n0e=a(W(),1),i0e=a(H(),1),qT=a(T(),1),WQe=(0,i0e.forwardRef)(({className:e,label:t,children:r},o)=>(0,qT.jsxs)(n0e.__experimentalHStack,{className:Q("editor-post-panel__row",e),ref:o,children:[t&&(0,qT.jsx)("div",{className:"editor-post-panel__row-label",children:t}),(0,qT.jsx)("div",{className:"editor-post-panel__row-control",children:r})]})),fr=WQe;var s0e=a(Lt(),1);function yM(e){let t=e.map(n=>({children:[],parent:void 0,...n}));if(t.some(({parent:n})=>n===void 0))return t;let r=t.reduce((n,i)=>{let{parent:s}=i;return n[s]||(n[s]=[]),n[s].push(i),n},{}),o=n=>n.map(i=>{let s=r[i.id];return{...i,children:s&&s.length?o(s):[]}});return o(r[0]||[])}var bS=e=>(0,s0e.decodeEntities)(e),NU=e=>({...e,name:bS(e.name)}),a0e=e=>(e??[]).map(NU);var Ca=a(T(),1);function FU(e){return e?.title?.rendered?(0,DU.decodeEntities)(e.title.rendered):`#${e.id} (${(0,Ta.__)("no title")})`}var l0e=(e,t)=>{let r=(0,MU.default)(e||"").toLowerCase(),o=(0,MU.default)(t||"").toLowerCase();return r===o?0:r.startsWith(o)?r.length:1/0};function f0e(){let{editPost:e}=(0,yS.useDispatch)(R),[t,r]=(0,Ed.useState)(""),{isHierarchical:o,parentPostId:n,parentPostTitle:i,pageItems:s,isLoading:l}=(0,yS.useSelect)(f=>{let{getPostType:m,getEntityRecords:h,getEntityRecord:g,isResolving:v}=f(wM.store),{getCurrentPostId:b,getEditedPostAttribute:S}=f(R),y=S("type"),w=S("parent"),_=m(y),x=b(),E=_?.hierarchical??!1,O={per_page:100,exclude:x,parent_exclude:x,orderby:"menu_order",order:"asc",_fields:"id,title,parent"};t&&(O.search=t,O.orderby="relevance",O.search_columns=["post_title"]);let A=w?g("postType",y,w):null;return{isHierarchical:E,parentPostId:w,parentPostTitle:A?FU(A):"",pageItems:E?h("postType",y,O):null,isLoading:E?v("getEntityRecords",["postType",y,O]):!1}},[t]),c=(0,Ed.useMemo)(()=>{let f=(v,b=0)=>v.map(w=>[{value:w.id,label:"\u2014 ".repeat(b)+(0,DU.decodeEntities)(w.name),rawName:w.name},...f(w.children||[],b+1)]).sort(([w],[_])=>{let x=l0e(w.rawName,t),E=l0e(_.rawName,t);return x>=E?1:-1}).flat();if(!s)return[];let m=s.map(v=>({id:v.id,parent:v.parent,name:FU(v)}));t||(m=yM(m));let h=f(m),g=h.find(v=>v.value===n);return i&&!g&&h.unshift({value:n,label:i}),h},[s,t,i,n]);if(!o)return null;let u=f=>{r(f)},d=f=>{e({parent:f})};return(0,Ca.jsx)(Lh.ComboboxControl,{__next40pxDefaultSize:!0,className:"editor-page-attributes__parent",label:(0,Ta.__)("Parent"),help:(0,Ta.__)("Choose a parent page."),value:n,options:c,onFilterValueChange:(0,c0e.debounce)(u,300),onChange:d,hideLabelFromVision:!0,isLoading:l})}function GQe({isOpen:e,onClick:t}){let r=(0,yS.useSelect)(n=>{let{getEditedPostAttribute:i}=n(R),s=i("parent");if(!s)return null;let{getEntityRecord:l}=n(wM.store),c=i("type");return l("postType",c,s)},[]),o=(0,Ed.useMemo)(()=>r?FU(r):(0,Ta.__)("None"),[r]);return(0,Ca.jsx)(Lh.Button,{size:"compact",className:"editor-post-parent__panel-toggle",variant:"tertiary","aria-expanded":e,"aria-label":(0,Ta.sprintf)((0,Ta.__)("Change parent: %s"),o),onClick:t,children:o})}function m0e(){let e=(0,yS.useSelect)(n=>n(wM.store).getEntityRecord("root","__unstableBase")?.home,[]),[t,r]=(0,Ed.useState)(null),o=(0,Ed.useMemo)(()=>({anchor:t,placement:"left-start",offset:36,shift:!0}),[t]);return(0,Ca.jsx)(fr,{label:(0,Ta.__)("Parent"),ref:r,children:(0,Ca.jsx)(Lh.Dropdown,{popoverProps:o,className:"editor-post-parent__panel-dropdown",contentClassName:"editor-post-parent__panel-dialog",focusOnMount:!0,renderToggle:({isOpen:n,onToggle:i})=>(0,Ca.jsx)(GQe,{isOpen:n,onClick:i}),renderContent:({onClose:n})=>(0,Ca.jsxs)("div",{className:"editor-post-parent",children:[(0,Ca.jsx)(u0e.__experimentalInspectorPopoverHeader,{title:(0,Ta.__)("Parent"),onClose:n}),(0,Ca.jsxs)("div",{children:[(0,Ed.createInterpolateElement)((0,Ta.sprintf)((0,Ta.__)('Child pages inherit characteristics from their parent, such as URL structure. For instance, if "Pricing" is a child of "Services", its URL would be %s<wbr />/services<wbr />/pricing.'),(0,d0e.filterURLForDisplay)(e).replace(/([/.])/g,"<wbr />$1")),{wbr:(0,Ca.jsx)("wbr",{})}),(0,Ca.jsx)("p",{children:(0,Ed.createInterpolateElement)((0,Ta.__)("They also show up as sub-items in the default navigation menu. <a>Learn more.</a>"),{a:(0,Ca.jsx)(Lh.ExternalLink,{href:(0,Ta.__)("https://wordpress.org/documentation/article/page-post-settings-sidebar/#page-attributes")})})})]}),(0,Ca.jsx)(f0e,{})]})})})}var p0e=f0e;var SM=a(T(),1),YQe="page-attributes";function qQe(){let{isEnabled:e,postType:t}=(0,h0e.useSelect)(r=>{let{getEditedPostAttribute:o,isEditorPanelEnabled:n}=r(R),{getPostType:i}=r(g0e.store);return{isEnabled:n(YQe),postType:i(o("type"))}},[]);return!e||!t?null:(0,SM.jsx)(m0e,{})}function _M(){return(0,SM.jsx)(hS,{children:(0,SM.jsx)(qQe,{})})}var Kl=a(V(),1),um=a(W(),1),SS=a(G(),1),jU=a(oe(),1),y0e=a(pe(),1),_S=a(H(),1);var w0e=a(Rt(),1);var xM=a(G(),1),BU=a(H(),1),Kc=a(kt(),1),Zc=a(W(),1),Db=a(V(),1);var cm=a(T(),1),LU=(0,Db.__)("Custom Template");function Bh({onClose:e}){let{defaultBlockTemplate:t,onNavigateToEntityRecord:r}=(0,xM.useSelect)(d=>{let{getEditorSettings:f,getCurrentTemplateId:m}=d(R);return{defaultBlockTemplate:f().defaultBlockTemplate,onNavigateToEntityRecord:f().onNavigateToEntityRecord,getTemplateId:m}}),{createTemplate:o}=Y((0,xM.useDispatch)(R)),[n,i]=(0,BU.useState)(""),[s,l]=(0,BU.useState)(!1),c=()=>{i(""),e()},u=async d=>{if(d.preventDefault(),s)return;l(!0);let f=t??(0,Kc.serialize)([(0,Kc.createBlock)("core/group",{tagName:"header",layout:{inherit:!0}},[(0,Kc.createBlock)("core/site-title"),(0,Kc.createBlock)("core/site-tagline")]),(0,Kc.createBlock)("core/separator"),(0,Kc.createBlock)("core/group",{tagName:"main"},[(0,Kc.createBlock)("core/group",{layout:{inherit:!0}},[(0,Kc.createBlock)("core/post-title")]),(0,Kc.createBlock)("core/post-content",{layout:{inherit:!0}})])]),m=await o({slug:tv(n||LU)||"wp-custom-template",content:f,title:n||LU,status:"publish"});l(!1),r({postId:m.id,postType:"wp_template"}),c()};return(0,cm.jsx)(Zc.Modal,{title:(0,Db.__)("Create custom template"),onRequestClose:c,focusOnMount:"firstContentElement",size:"small",overlayClassName:"editor-post-template__create-template-modal",children:(0,cm.jsx)("form",{onSubmit:u,children:(0,cm.jsxs)(Zc.__experimentalVStack,{spacing:"3",children:[(0,cm.jsx)(Zc.TextControl,{label:(0,Db.__)("Name"),value:n,onChange:i,placeholder:LU,disabled:s,help:(0,Db.__)('Describe the template, e.g. "Post with sidebar". A custom template can be manually applied to any post or page.')}),(0,cm.jsxs)(Zc.__experimentalHStack,{justify:"right",children:[(0,cm.jsx)(Zc.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:c,children:(0,Db.__)("Cancel")}),(0,cm.jsx)(Zc.Button,{__next40pxDefaultSize:!0,variant:"primary",type:"submit",isBusy:s,"aria-disabled":s,children:(0,Db.__)("Create")})]})]})})})}var Lb=a(G(),1),v0e=a(H(),1),Vh=a(oe(),1),CM=a(V(),1);function Bb(){return(0,Lb.useSelect)(e=>{let{getCurrentPostId:t,getCurrentPostType:r}=e(R);return{postId:t(),postType:r()}},[])}function Vb(){let{postType:e,postId:t}=Bb();return(0,Lb.useSelect)(r=>{let{canUser:o,getEntityRecord:n,getEntityRecords:i}=r(Vh.store),s=o("read",{kind:"root",name:"site"})?n("root","site"):void 0,l=+t===s?.page_for_posts,c=e==="page"&&+t===s?.page_on_front,u=c?i("postType","wp_template",{per_page:-1}):[],d=c&&!!u?.some(({slug:f})=>f==="front-page");return!l&&!d},[t,e])}function b0e(e){return(0,Lb.useSelect)(t=>t(Vh.store).getEntityRecords("postType","wp_template",{per_page:-1,post_type:e}),[e])}function KT(){let{postType:e,postId:t}=Bb(),[r]=(0,Vh.useEntityProp)("postType",e,"slug",t),o=VU(),n=Vb(),i=b0e(e),s=(0,Lb.useSelect)(l=>{if(!window?.__experimentalDataFormInspector||!o)return null;let{getDefaultTemplateId:c,getEntityRecord:u}=l(Vh.store),d;r?d=e==="page"?`${e}-${r}`:`single-${e}-${r}`:d=e==="page"?"page":`single-${e}`;let f=c({slug:d});return f?u("postType","wp_template",f):null},[o,r,e]);return(0,v0e.useMemo)(()=>n&&[...(i||[]).filter(l=>l.is_custom&&l.slug!==o&&!!l.content.raw),s&&{...s,title:{rendered:(0,CM.sprintf)((0,CM.__)("%s (default)"),s.title.rendered)},isDefault:!0}].filter(Boolean),[i,s,o,n])}function wS(){return(0,Lb.useSelect)(e=>{let{getEditorSettings:t,getCurrentTemplateId:r,getCurrentPostType:o}=e(R),{getPostType:n,canUser:i}=e(Vh.store),s=o(),l=n(s),c=t(),u=c.__unstableIsBlockBasedTheme,d=!!c.availableTemplates&&Object.keys(c.availableTemplates).length>0,f;l?.viewable?d?f=!0:c.supportsTemplateMode?f=i("create",{kind:"postType",name:"wp_template"})??!1:f=!1:f=!1;let m=f?!!i("read",{kind:"postType",name:"wp_template"}):!1;return(!u||!m)&&f?"classic":u&&r()?"block-theme":null},[])}function VU(){let{postType:e,postId:t}=Bb(),r=b0e(e),o=(0,Lb.useSelect)(n=>n(Vh.store).getEditedEntityRecord("postType",e,t)?.template,[e,t]);if(o)return r?.find(n=>n.slug===o)?.slug}var Ea=a(T(),1);function KQe({isOpen:e,onClick:t}){let r=(0,SS.useSelect)(o=>{let n=o(R).getEditedPostAttribute("template"),{supportsTemplateMode:i,availableTemplates:s}=o(R).getEditorSettings();if(!i&&s[n])return s[n];let l=o(jU.store).canUser("create",{kind:"postType",name:"wp_template"})&&o(R).getCurrentTemplateId();return l?.title||l?.slug||s?.[n]},[]);return(0,Ea.jsx)(um.Button,{__next40pxDefaultSize:!0,variant:"tertiary","aria-expanded":e,"aria-label":(0,Kl.__)("Template options"),onClick:t,children:r??(0,Kl.__)("Default template")})}function ZQe({onClose:e}){let t=Vb(),{availableTemplates:r,fetchedTemplates:o,selectedTemplateSlug:n,canCreate:i,canEdit:s,currentTemplateId:l,onNavigateToEntityRecord:c,getEditorSettings:u}=(0,SS.useSelect)(b=>{let{canUser:S,getEntityRecords:y}=b(jU.store),w=b(R).getEditorSettings(),_=S("create",{kind:"postType",name:"wp_template"}),x=b(R).getCurrentTemplateId();return{availableTemplates:w.availableTemplates,fetchedTemplates:_?y("postType","wp_template",{post_type:b(R).getCurrentPostType(),per_page:-1}):void 0,selectedTemplateSlug:b(R).getEditedPostAttribute("template"),canCreate:t&&_&&w.supportsTemplateMode,canEdit:t&&_&&w.supportsTemplateMode&&!!x,currentTemplateId:x,onNavigateToEntityRecord:w.onNavigateToEntityRecord,getEditorSettings:b(R).getEditorSettings}},[t]),d=(0,_S.useMemo)(()=>Object.entries({...r,...Object.fromEntries((o??[]).map(({slug:b,title:S})=>[b,S.rendered]))}).map(([b,S])=>({value:b,label:S})),[r,o]),f=d.find(b=>b.value===n)??d.find(b=>!b.value),{editPost:m}=(0,SS.useDispatch)(R),{createSuccessNotice:h}=(0,SS.useDispatch)(w0e.store),[g,v]=(0,_S.useState)(!1);return(0,Ea.jsxs)("div",{className:"editor-post-template__classic-theme-dropdown",children:[(0,Ea.jsx)(y0e.__experimentalInspectorPopoverHeader,{title:(0,Kl.__)("Template"),help:(0,Kl.__)("Templates define the way content is displayed when viewing your site."),actions:i?[{icon:WD,label:(0,Kl.__)("Add template"),onClick:()=>v(!0)}]:[],onClose:e}),t?(0,Ea.jsx)(um.SelectControl,{__next40pxDefaultSize:!0,hideLabelFromVision:!0,label:(0,Kl.__)("Template"),value:f?.value??"",options:d,onChange:b=>m({template:b||""})}):(0,Ea.jsx)(um.Notice,{status:"warning",isDismissible:!1,children:(0,Kl.__)("The posts page template cannot be changed.")}),s&&c&&(0,Ea.jsx)("p",{children:(0,Ea.jsx)(um.Button,{__next40pxDefaultSize:!0,variant:"link",onClick:()=>{c({postId:l,postType:"wp_template"}),e(),h((0,Kl.__)("Editing template. Changes made here affect all posts and pages that use the template."),{type:"snackbar",actions:[{label:(0,Kl.__)("Go back"),onClick:()=>u().onNavigateToPreviousEntityRecord()}]})},children:(0,Kl.__)("Edit template")})}),g&&(0,Ea.jsx)(Bh,{onClose:()=>v(!1)})]})}function XQe(){let[e,t]=(0,_S.useState)(null),r=(0,_S.useMemo)(()=>({anchor:e,className:"editor-post-template__dropdown",placement:"left-start",offset:36,shift:!0}),[e]);return(0,Ea.jsx)(fr,{label:(0,Kl.__)("Template"),ref:t,children:(0,Ea.jsx)(um.Dropdown,{popoverProps:r,focusOnMount:!0,renderToggle:({isOpen:o,onToggle:n})=>(0,Ea.jsx)(KQe,{isOpen:o,onClick:n}),renderContent:({onClose:o})=>(0,Ea.jsx)(ZQe,{onClose:o})})})}var TM=XQe;var kM=a(W(),1),T0e=a(Qp(),1),RM=a(G(),1),E0e=a(Uj(),1);var x0e=a(W(),1);var EM=a(G(),1),S0e=a(Nt(),1);var _0e=a(T(),1),{PreferenceBaseOption:QQe}=Y(S0e.privateApis);function jh(e){let{toggleEditorPanelEnabled:t}=(0,EM.useDispatch)(R),{isChecked:r,isRemoved:o}=(0,EM.useSelect)(n=>{let{isEditorPanelEnabled:i,isEditorPanelRemoved:s}=n(R);return{isChecked:i(e.panelName),isRemoved:s(e.panelName)}},[e.panelName]);return o?null:(0,_0e.jsx)(QQe,{isChecked:r,onChange:()=>t(e.panelName),...e})}var zU=a(T(),1),{Fill:JQe,Slot:$Qe}=(0,x0e.createSlotFill)("EnablePluginDocumentSettingPanelOption"),C0e=({label:e,panelName:t})=>(0,zU.jsx)(JQe,{children:(0,zU.jsx)(jh,{label:e,panelName:t})});C0e.Slot=$Qe;var PM=C0e;var zh=a(T(),1),{Fill:eJe,Slot:tJe}=(0,kM.createSlotFill)("PluginDocumentSettingPanel"),P0e=({name:e,className:t,title:r,icon:o,children:n})=>{let{name:i}=(0,T0e.usePluginContext)(),s=`${i}/${e}`,{opened:l,isEnabled:c}=(0,RM.useSelect)(d=>{let{isEditorPanelOpened:f,isEditorPanelEnabled:m}=d(R);return{opened:f(s),isEnabled:m(s)}},[s]),{toggleEditorPanelOpened:u}=(0,RM.useDispatch)(R);return e===void 0&&(0,E0e.default)("PluginDocumentSettingPanel requires a name property."),(0,zh.jsxs)(zh.Fragment,{children:[(0,zh.jsx)(PM,{label:r,panelName:s}),(0,zh.jsx)(eJe,{children:c&&(0,zh.jsx)(kM.PanelBody,{className:t,title:r,icon:o,opened:l,onToggle:()=>u(s),children:n})})]})};P0e.Slot=tJe;var AM=P0e;var k0e=a(pe(),1),R0e=a(W(),1),A0e=a(ke(),1),HU=a(T(),1),rJe=(e,t)=>e.filter(r=>!t.includes(r)).length===0,oJe=(e,t)=>!Array.isArray(t)||rJe(e,t),nJe=({allowedBlocks:e,icon:t,label:r,onClick:o,small:n,role:i})=>(0,HU.jsx)(k0e.BlockSettingsMenuControls,{children:({selectedBlocks:s,onClose:l})=>oJe(s,e)?(0,HU.jsx)(R0e.MenuItem,{onClick:(0,A0e.compose)(o,l),icon:t,label:n?r:void 0,role:i,children:!n&&r}):null}),I0e=nJe;var O0e=a(W(),1),N0e=a(Qp(),1);var M0e=a(T(),1);function F0e(e){let t=(0,N0e.usePluginContext)();return(0,M0e.jsx)(Ol,{name:"core/plugin-more-menu",as:e.as??O0e.MenuItem,icon:e.icon||t.icon,...e})}var D0e=a(Qp(),1),IM=a(W(),1),UU=a(T(),1),{Fill:iJe,Slot:sJe}=(0,IM.createSlotFill)("PluginPostPublishPanel"),L0e=({children:e,className:t,title:r,initialOpen:o=!1,icon:n})=>{let{icon:i}=(0,D0e.usePluginContext)();return(0,UU.jsx)(iJe,{children:(0,UU.jsx)(IM.PanelBody,{className:t,initialOpen:o||!r,title:r,icon:n??i,children:e})})};L0e.Slot=sJe;var OM=L0e;var NM=a(W(),1),WU=a(T(),1),{Fill:aJe,Slot:lJe}=(0,NM.createSlotFill)("PluginPostStatusInfo"),B0e=({children:e,className:t})=>(0,WU.jsx)(aJe,{children:(0,WU.jsx)(NM.PanelRow,{className:t,children:e})});B0e.Slot=lJe;var MM=B0e;var FM=a(W(),1),V0e=a(Qp(),1),GU=a(T(),1),{Fill:cJe,Slot:uJe}=(0,FM.createSlotFill)("PluginPrePublishPanel"),j0e=({children:e,className:t,title:r,initialOpen:o=!1,icon:n})=>{let{icon:i}=(0,V0e.usePluginContext)();return(0,GU.jsx)(cJe,{children:(0,GU.jsx)(FM.PanelBody,{className:t,initialOpen:o||!r,title:r,icon:n??i,children:e})})};j0e.Slot=uJe;var DM=j0e;var z0e=a(W(),1),H0e=a(Qp(),1);var U0e=a(T(),1);function W0e(e){let t=(0,H0e.usePluginContext)();return(0,U0e.jsx)(Ol,{name:"core/plugin-preview-menu",as:e.as??z0e.MenuItem,icon:e.icon||t.icon,...e})}var G0e=a(T(),1);function jb({className:e,...t}){return(0,G0e.jsx)(Ml,{panelClassName:e,className:"editor-sidebar",scope:"core",...t})}var Y0e=a(T(),1);function q0e(e){return(0,Y0e.jsx)($p,{__unstableExplicitMenuItem:!0,scope:"core",...e})}var dm=a(G(),1),hwe=a(Lt(),1),Hh=a(W(),1),LM=a(H(),1),Hb=a(V(),1),ES=a(oe(),1);var gwe=a(Rt(),1),vwe=a(Nt(),1);var CS=a(H(),1),Q0e=a(Lt(),1),J0e=a(pe(),1),TS=a(W(),1),xS=a(V(),1),$0e=a(G(),1),ewe=a(oe(),1),twe=a(kt(),1);var Z0e=a(l0(),1);function K0e(e=""){return e=(0,Z0e.default)(e),e=e.trim().toLowerCase(),e}function dJe(e,t){let r=K0e(t),o=K0e(e.title),n=0;return r===o?n+=30:o.startsWith(r)?n+=20:r.split(" ").every(l=>o.includes(l))&&(n+=10),n}function X0e(e=[],t=""){if(!t)return e;let r=e.map(o=>[o,dJe(o,t)]).filter(([,o])=>o>0);return r.sort(([,o],[,n])=>n-o),r.map(([o])=>o)}var Pa=a(T(),1);function YU({onRequestClose:e,onSelect:t}){let{postType:r,postId:o}=Bb(),{editEntityRecord:n}=(0,$0e.useDispatch)(ewe.store),i=async s=>{n("postType",r,o,{template:s.isDefault?"":s.name},{undoIgnore:!0}),e(),t?.()};return(0,Pa.jsx)(TS.Modal,{title:(0,xS.__)("Choose a template"),onRequestClose:e,overlayClassName:"editor-post-template__swap-template-modal",isFullScreen:!0,children:(0,Pa.jsx)("div",{className:"editor-post-template__swap-template-modal-content",children:(0,Pa.jsx)(fJe,{onSelect:i})})})}function rwe({onClick:e}){let[t,r]=(0,CS.useState)(!1),o=KT();return(0,Pa.jsxs)(Pa.Fragment,{children:[(0,Pa.jsx)(TS.MenuItem,{disabled:!o?.length,accessibleWhenDisabled:!0,onClick:()=>r(!0),children:(0,xS.__)("Change template")}),t&&(0,Pa.jsx)(YU,{onRequestClose:()=>r(!1),onSelect:e})]})}function fJe({onSelect:e}){let[t,r]=(0,CS.useState)(""),o=KT(),n=(0,CS.useMemo)(()=>o.map(s=>({name:s.slug,blocks:(0,twe.parse)(s.content.raw),title:(0,Q0e.decodeEntities)(s.title.rendered),id:s.id,isDefault:s.isDefault})),[o]),i=(0,CS.useMemo)(()=>X0e(n,t),[n,t]);return(0,Pa.jsxs)(Pa.Fragment,{children:[(0,Pa.jsx)(TS.SearchControl,{onChange:r,value:t,label:(0,xS.__)("Search"),placeholder:(0,xS.__)("Search"),className:"editor-post-template__swap-template-search"}),(0,Pa.jsx)(J0e.__experimentalBlockPatternsList,{label:(0,xS.__)("Templates"),blockPatterns:i,onClickPattern:e})]})}var owe=a(W(),1),nwe=a(V(),1),iwe=a(G(),1),swe=a(oe(),1);var awe=a(T(),1);function lwe({onClick:e}){let t=VU(),r=Vb(),{postType:o,postId:n}=Bb(),{editEntityRecord:i}=(0,iwe.useDispatch)(swe.store);return!t||!r?null:(0,awe.jsx)(owe.MenuItem,{onClick:()=>{i("postType",o,n,{template:""},{undoIgnore:!0}),e()},children:(0,nwe.__)("Use default template")})}var cwe=a(W(),1),uwe=a(V(),1),dwe=a(G(),1),fwe=a(oe(),1),mwe=a(H(),1);var zb=a(T(),1);function pwe(){let{canCreateTemplates:e}=(0,dwe.useSelect)(n=>{let{canUser:i}=n(fwe.store);return{canCreateTemplates:i("create",{kind:"postType",name:"wp_template"})}},[]),[t,r]=(0,mwe.useState)(!1),o=Vb();return!e||!o?null:(0,zb.jsxs)(zb.Fragment,{children:[(0,zb.jsx)(cwe.MenuItem,{onClick:()=>{r(!0)},children:(0,uwe.__)("Create new template")}),t&&(0,zb.jsx)(Bh,{onClose:()=>{r(!1)}})]})}var ka=a(T(),1);function bwe(){let{isTemplateHidden:e,onNavigateToEntityRecord:t,getEditorSettings:r,hasGoBack:o,hasSpecificTemplate:n,id:i}=(0,dm.useSelect)(_=>{let{getRenderingMode:x,getEditorSettings:E,getCurrentPost:O,getCurrentTemplateId:A}=Y(_(R)),C=E(),I=O();return{isTemplateHidden:x()==="post-only",onNavigateToEntityRecord:C.onNavigateToEntityRecord,getEditorSettings:E,hasGoBack:C.hasOwnProperty("onNavigateToPreviousEntityRecord"),hasSpecificTemplate:!!I.template,id:A()}},[]),{get:s}=(0,dm.useSelect)(vwe.store),{editedRecord:l,hasResolved:c}=(0,ES.useEntityRecord)("postType","wp_template",i),{getEntityRecord:u}=(0,dm.useSelect)(ES.store),{editEntityRecord:d}=(0,dm.useDispatch)(ES.store),{createSuccessNotice:f}=(0,dm.useDispatch)(gwe.store),{setRenderingMode:m,setDefaultRenderingMode:h}=Y((0,dm.useDispatch)(R)),g=(0,dm.useSelect)(_=>!!_(ES.store).canUser("create",{kind:"postType",name:"wp_template"}),[]),[v,b]=(0,LM.useState)(null),S=(0,LM.useMemo)(()=>({anchor:v,className:"editor-post-template__dropdown",placement:"left-start",offset:36,shift:!0}),[v]);if(!c)return null;let y=o?[{label:(0,Hb.__)("Go back"),onClick:()=>r().onNavigateToPreviousEntityRecord()}]:void 0,w=()=>{s("core/edit-site","welcomeGuideTemplate")||f((0,Hb.__)("Editing template. Changes made here affect all posts and pages that use the template."),{type:"snackbar",actions:y})};return(0,ka.jsx)(fr,{label:(0,Hb.__)("Template"),ref:b,children:(0,ka.jsx)(Hh.DropdownMenu,{popoverProps:S,focusOnMount:!0,toggleProps:{size:"compact",variant:"tertiary",tooltipPosition:"middle left"},label:(0,Hb.__)("Template options"),text:(0,hwe.decodeEntities)(l.title),icon:null,children:({onClose:_})=>(0,ka.jsxs)(ka.Fragment,{children:[(0,ka.jsxs)(Hh.MenuGroup,{children:[g&&(0,ka.jsx)(Hh.MenuItem,{onClick:async()=>{if(t({postId:l.id,postType:"wp_template"}),!n&&window?.__experimentalTemplateActivate){let x=await u("root","site").active_templates;x[l.slug]!==l.id&&d("root","site",void 0,{active_templates:{...x,[l.slug]:l.id}})}_(),w()},children:(0,Hb.__)("Edit template")}),(0,ka.jsx)(rwe,{onClick:_}),(0,ka.jsx)(lwe,{onClick:_}),g&&(0,ka.jsx)(pwe,{})]}),(0,ka.jsx)(Hh.MenuGroup,{children:(0,ka.jsx)(Hh.MenuItem,{icon:e?void 0:To,isSelected:!e,role:"menuitemcheckbox",onClick:()=>{let x=e?"template-locked":"post-only";m(x),h(x)},children:(0,Hb.__)("Show template")})})]})})})}var qU=a(T(),1);function BM(){let e=wS();return e==="classic"?(0,qU.jsx)(TM,{}):e==="block-theme"?(0,qU.jsx)(bwe,{}):null}var Fwe=a(G(),1),Dwe=a(oe(),1);var xwe=a(ke(),1),Cwe=a(H(),1),Twe=a(G(),1),Ewe=a(V(),1),Pwe=a(W(),1);var ywe=a(V(),1),wwe=a(H(),1),Swe=a(G(),1),KU=a(Lt(),1),_we=a(oe(),1);var ZT={_fields:"id,name",context:"view"},VM={who:"authors",per_page:100,...ZT};function jM(e){let{authorId:t,authors:r,postAuthor:o,isLoading:n}=(0,Swe.useSelect)(s=>{let{getUser:l,getUsers:c,isResolving:u}=s(_we.store),{getEditedPostAttribute:d}=s(R),f=d("author"),m={...VM};return e&&(m.search=e,m.search_columns=["name"]),{authorId:f,authors:c(m),postAuthor:l(f,ZT),isLoading:u("getUsers",[m])}},[e]),i=(0,wwe.useMemo)(()=>{let s=(r??[]).map(u=>({value:u.id,label:(0,KU.decodeEntities)(u.name)})),l=s.findIndex(({value:u})=>o?.id===u),c=[];return l<0&&o?c=[{value:o.id,label:(0,KU.decodeEntities)(o.name)}]:l<0&&!o&&(c=[{value:0,label:(0,ywe.__)("(No author)")}]),[...c,...s]},[r,o]);return{authorId:t,authorOptions:i,postAuthor:o,isLoading:n}}var kwe=a(T(),1);function Rwe(){let[e,t]=(0,Cwe.useState)(),{editPost:r}=(0,Twe.useDispatch)(R),{authorId:o,authorOptions:n,isLoading:i}=jM(e),s=l=>{l&&r({author:l})};return(0,kwe.jsx)(Pwe.ComboboxControl,{__next40pxDefaultSize:!0,label:(0,Ewe.__)("Author"),options:n,value:o,onFilterValueChange:(0,xwe.debounce)(t,300),onChange:s,allowReset:!1,hideLabelFromVision:!0,isLoading:i})}var Awe=a(V(),1),Iwe=a(G(),1),Owe=a(W(),1);var Nwe=a(T(),1);function Mwe(){let{editPost:e}=(0,Iwe.useDispatch)(R),{authorId:t,authorOptions:r}=jM(),o=n=>{let i=Number(n);e({author:i})};return(0,Nwe.jsx)(Owe.SelectControl,{__next40pxDefaultSize:!0,className:"post-author-selector",label:(0,Awe.__)("Author"),options:r,onChange:o,value:t,hideLabelFromVision:!0})}var ZU=a(T(),1),mJe=25;function pJe(){return(0,Fwe.useSelect)(t=>t(Dwe.store).getUsers(VM)?.length>=mJe,[])?(0,ZU.jsx)(Rwe,{}):(0,ZU.jsx)(Mwe,{})}var zM=pJe;var Lwe=a(G(),1);var Bwe=a(T(),1);function HM({children:e}){let{hasAssignAuthorAction:t}=(0,Lwe.useSelect)(r=>({hasAssignAuthorAction:!!r(R).getCurrentPost()?._links?.["wp:action-assign-author"]}),[]);return t?(0,Bwe.jsx)(oo,{supportKeys:"author",children:e}):null}var Ub=a(V(),1),UM=a(W(),1),WM=a(H(),1),Vwe=a(Lt(),1),jwe=a(pe(),1),zwe=a(G(),1),Hwe=a(oe(),1);var Pd=a(T(),1);function hJe({isOpen:e,onClick:t}){let{postAuthor:r}=(0,zwe.useSelect)(n=>{let i=n(R).getEditedPostAttribute("author");return{postAuthor:n(Hwe.store).getUser(i,ZT)}},[]),o=(0,Vwe.decodeEntities)(r?.name)||(0,Ub.__)("(No author)");return(0,Pd.jsx)(UM.Button,{size:"compact",variant:"tertiary","aria-expanded":e,"aria-label":(0,Ub.sprintf)((0,Ub.__)("Change author: %s"),o),onClick:t,children:o})}function gJe(){let[e,t]=(0,WM.useState)(null),r=(0,WM.useMemo)(()=>({anchor:e,placement:"left-start",offset:36,shift:!0}),[e]);return(0,Pd.jsx)(HM,{children:(0,Pd.jsx)(fr,{label:(0,Ub.__)("Author"),ref:t,children:(0,Pd.jsx)(UM.Dropdown,{popoverProps:r,contentClassName:"editor-post-author__panel-dialog",focusOnMount:!0,renderToggle:({isOpen:o,onToggle:n})=>(0,Pd.jsx)(hJe,{isOpen:o,onClick:n}),renderContent:({onClose:o})=>(0,Pd.jsxs)("div",{className:"editor-post-author",children:[(0,Pd.jsx)(jwe.__experimentalInspectorPopoverHeader,{title:(0,Ub.__)("Author"),onClose:o}),(0,Pd.jsx)(zM,{onClose:o})]})})})})}var GM=gJe;var Uh=a(V(),1),qM=a(W(),1),KM=a(G(),1);var YM=a(T(),1),vJe=[{label:(0,Uh._x)("Open",'Adjective: e.g. "Comments are open"'),value:"open",description:(0,Uh.__)("Visitors can add new comments and replies.")},{label:(0,Uh.__)("Closed"),value:"closed",description:[(0,Uh.__)("Visitors cannot add new comments or replies."),(0,Uh.__)("Existing comments remain visible.")].join(" ")}];function bJe(){let e=(0,KM.useSelect)(o=>o(R).getEditedPostAttribute("comment_status")??"open",[]),{editPost:t}=(0,KM.useDispatch)(R),r=o=>t({comment_status:o});return(0,YM.jsx)("form",{children:(0,YM.jsx)(qM.__experimentalVStack,{spacing:4,children:(0,YM.jsx)(qM.RadioControl,{className:"editor-change-status__options",hideLabelFromVision:!0,label:(0,Uh.__)("Comment status"),options:vJe,onChange:r,selected:e})})})}var ZM=bJe;var Xc=a(V(),1),PS=a(W(),1),QU=a(G(),1),e3=a(H(),1),Uwe=a(pe(),1),Wwe=a(oe(),1);var XM=a(V(),1),QM=a(W(),1),JM=a(G(),1);var XU=a(T(),1);function yJe(){let e=(0,JM.useSelect)(o=>o(R).getEditedPostAttribute("ping_status")??"open",[]),{editPost:t}=(0,JM.useDispatch)(R),r=()=>t({ping_status:e==="open"?"closed":"open"});return(0,XU.jsx)(QM.CheckboxControl,{label:(0,XM.__)("Enable pingbacks & trackbacks"),checked:e==="open",onChange:r,help:(0,XU.jsx)(QM.ExternalLink,{href:(0,XM.__)("https://wordpress.org/documentation/article/trackbacks-and-pingbacks/"),children:(0,XM.__)("Learn more about pingbacks & trackbacks")})})}var $M=yJe;var Fs=a(T(),1),wJe="discussion-panel";function SJe({onClose:e}){return(0,Fs.jsxs)("div",{className:"editor-post-discussion",children:[(0,Fs.jsx)(Uwe.__experimentalInspectorPopoverHeader,{title:(0,Xc.__)("Discussion"),onClose:e}),(0,Fs.jsxs)(PS.__experimentalVStack,{spacing:4,children:[(0,Fs.jsx)(oo,{supportKeys:"comments",children:(0,Fs.jsx)(ZM,{})}),(0,Fs.jsx)(oo,{supportKeys:"trackbacks",children:(0,Fs.jsx)($M,{})})]})]})}function _Je({isOpen:e,onClick:t}){let{commentStatus:r,pingStatus:o,commentsSupported:n,trackbacksSupported:i}=(0,QU.useSelect)(l=>{let{getEditedPostAttribute:c}=l(R),{getPostType:u}=l(Wwe.store),d=u(c("type"));return{commentStatus:c("comment_status")??"open",pingStatus:c("ping_status")??"open",commentsSupported:!!d.supports.comments,trackbacksSupported:!!d.supports.trackbacks}},[]),s;return r==="open"?o==="open"?s=(0,Xc._x)("Open",'Adjective: e.g. "Comments are open"'):s=i?(0,Xc.__)("Comments only"):(0,Xc._x)("Open",'Adjective: e.g. "Comments are open"'):o==="open"?s=n?(0,Xc.__)("Pings only"):(0,Xc.__)("Pings enabled"):s=(0,Xc.__)("Closed"),(0,Fs.jsx)(PS.Button,{size:"compact",className:"editor-post-discussion__panel-toggle",variant:"tertiary","aria-label":(0,Xc.__)("Change discussion options"),"aria-expanded":e,onClick:t,children:s})}function t3(){let{isEnabled:e}=(0,QU.useSelect)(n=>{let{isEditorPanelEnabled:i}=n(R);return{isEnabled:i(wJe)}},[]),[t,r]=(0,e3.useState)(null),o=(0,e3.useMemo)(()=>({anchor:t,placement:"left-start",offset:36,shift:!0}),[t]);return e?(0,Fs.jsx)(oo,{supportKeys:["comments","trackbacks"],children:(0,Fs.jsx)(fr,{label:(0,Xc.__)("Discussion"),ref:r,children:(0,Fs.jsx)(PS.Dropdown,{popoverProps:o,className:"editor-post-discussion__panel-dropdown",contentClassName:"editor-post-discussion__panel-dialog",focusOnMount:!0,renderToggle:({isOpen:n,onToggle:i})=>(0,Fs.jsx)(_Je,{isOpen:n,onClick:i}),renderContent:({onClose:n})=>(0,Fs.jsx)(SJe,{onClose:n})})})}):null}var kS=a(V(),1),o3=a(W(),1),n3=a(G(),1),Gwe=a(H(),1),Ywe=a(Lt(),1);var r3=a(T(),1);function XT({hideLabelFromVision:e=!1,updateOnBlur:t=!1}){let{excerpt:r,shouldUseDescriptionLabel:o,usedAttribute:n}=(0,n3.useSelect)(d=>{let{getCurrentPostType:f,getEditedPostAttribute:m}=d(R),h=f(),g=["wp_template","wp_template_part"].includes(h)?"description":"excerpt";return{excerpt:m(g),shouldUseDescriptionLabel:["wp_template","wp_template_part","wp_block"].includes(h),usedAttribute:g}},[]),{editPost:i}=(0,n3.useDispatch)(R),[s,l]=(0,Gwe.useState)((0,Ywe.decodeEntities)(r)),c=d=>{i({[n]:d})},u=o?(0,kS.__)("Write a description (optional)"):(0,kS.__)("Write an excerpt (optional)");return(0,r3.jsx)("div",{className:"editor-post-excerpt",children:(0,r3.jsx)(o3.TextareaControl,{label:u,hideLabelFromVision:e,className:"editor-post-excerpt__textarea",onChange:t?l:c,onBlur:t?()=>c(s):void 0,value:t?s:r,help:o?(0,kS.__)("Write a description"):(0,r3.jsx)(o3.ExternalLink,{href:(0,kS.__)("https://wordpress.org/documentation/article/page-post-settings-sidebar/#excerpt"),children:(0,kS.__)("Learn more about manual excerpts")})})})}var qwe=a(T(),1);function xJe({children:e}){return(0,qwe.jsx)(oo,{supportKeys:"excerpt",children:e})}var Wb=xJe;var fm=a(V(),1),Qc=a(W(),1),JT=a(G(),1),a3=a(H(),1),Zwe=a(pe(),1),$U=a(oe(),1),Xwe=a(Lt(),1);var i3=a(W(),1),JU=a(T(),1),{Fill:CJe,Slot:TJe}=(0,i3.createSlotFill)("PluginPostExcerpt"),Kwe=({children:e,className:t})=>(0,JU.jsx)(CJe,{children:(0,JU.jsx)(i3.PanelRow,{className:t,children:e})});Kwe.Slot=TJe;var QT=Kwe;var no=a(T(),1),s3="post-excerpt";function EJe(){let{isOpened:e,isEnabled:t,postType:r}=(0,JT.useSelect)(s=>{let{isEditorPanelOpened:l,isEditorPanelEnabled:c,getCurrentPostType:u}=s(R);return{isOpened:l(s3),isEnabled:c(s3),postType:u()}},[]),{toggleEditorPanelOpened:o}=(0,JT.useDispatch)(R),n=()=>o(s3);if(!t)return null;let i=["wp_template","wp_template_part","wp_block"].includes(r);return(0,no.jsx)(Qc.PanelBody,{title:i?(0,fm.__)("Description"):(0,fm.__)("Excerpt"),opened:e,onToggle:n,children:(0,no.jsx)(QT.Slot,{children:s=>(0,no.jsxs)(no.Fragment,{children:[(0,no.jsx)(XT,{}),s]})})})}function Qwe(){return(0,no.jsx)(Wb,{children:(0,no.jsx)(EJe,{})})}function Jwe(){return(0,no.jsx)(Wb,{children:(0,no.jsx)(PJe,{})})}function PJe(){let{shouldRender:e,excerpt:t,shouldBeUsedAsDescription:r,allowEditing:o}=(0,JT.useSelect)(f=>{let{getCurrentPostType:m,getCurrentPostId:h,getEditedPostAttribute:g,isEditorPanelEnabled:v}=f(R),b=m(),S=["wp_template","wp_template_part"].includes(b),y=b==="wp_block",w=S||y,x=g(S?"description":"excerpt"),E=S&&f($U.store).getEntityRecord("postType",b,h()),O=!x&&S?bl({template:E,templateTypes:f($U.store).getCurrentTheme()?.default_template_types})?.description:void 0,A=v(s3)||w;return{excerpt:x??O,shouldRender:A,shouldBeUsedAsDescription:w,allowEditing:A&&(!w||y||E&&E.source===e2.custom&&!E.has_theme_file&&E.is_custom)}},[]),[n,i]=(0,a3.useState)(null),s=r?(0,fm.__)("Description"):(0,fm.__)("Excerpt"),l=(0,a3.useMemo)(()=>({anchor:n,"aria-label":s,headerTitle:s,placement:"left-start",offset:36,shift:!0}),[n,s]);if(!e)return!1;let c=!!t&&(0,no.jsx)(Qc.__experimentalText,{align:"left",numberOfLines:4,truncate:o,children:(0,Xwe.decodeEntities)(t)});if(!o)return c;let u=r?(0,fm.__)("Add a description\u2026"):(0,fm.__)("Add an excerpt\u2026"),d=r?(0,fm.__)("Edit description"):(0,fm.__)("Edit excerpt");return(0,no.jsxs)(Qc.__experimentalVStack,{children:[c,(0,no.jsx)(Qc.Dropdown,{className:"editor-post-excerpt__dropdown",contentClassName:"editor-post-excerpt__dropdown__content",popoverProps:l,focusOnMount:!0,ref:i,renderToggle:({onToggle:f})=>(0,no.jsx)(Qc.Button,{__next40pxDefaultSize:!0,onClick:f,variant:"link",children:c?d:u}),renderContent:({onClose:f})=>(0,no.jsxs)(no.Fragment,{children:[(0,no.jsx)(Zwe.__experimentalInspectorPopoverHeader,{title:s,onClose:f}),(0,no.jsx)(Qc.__experimentalVStack,{spacing:4,children:(0,no.jsx)(QT.Slot,{children:m=>(0,no.jsxs)(no.Fragment,{children:[(0,no.jsx)(XT,{hideLabelFromVision:!0,updateOnBlur:!0}),m]})})})]})})]})}var al=a(V(),1),tW=a(An(),1),Qi=a(W(),1),rSe=a(l1(),1),c3=a(H(),1),oSe=a(ke(),1),RS=a(G(),1),Gb=a(pe(),1),nSe=a(oe(),1);var $we=a(G(),1),eSe=a(oe(),1);function l3({children:e,supportKeys:t}){let{postType:r,themeSupports:o}=(0,$we.useSelect)(i=>({postType:i(R).getEditedPostAttribute("type"),themeSupports:i(eSe.store).getThemeSupports()}),[]);return(Array.isArray(t)?t:[t]).some(i=>{let s=o?.[i]??!1;return i==="post-thumbnails"&&Array.isArray(s)?s.includes(r):s})?e:null}var eW=a(T(),1);function kJe({children:e}){return(0,eW.jsx)(l3,{supportKeys:"post-thumbnails",children:(0,eW.jsx)(oo,{supportKeys:"thumbnail",children:e})})}var mm=kJe;var vi=a(T(),1),tSe=["image"],RJe=(0,al.__)("Featured image"),AJe=(0,al.__)("Add a featured image"),IJe=(0,vi.jsx)("p",{children:(0,al.__)("To edit the featured image, you need permission to upload media.")});function OJe(e,t){if(!e)return{};let r=(0,tW.applyFilters)("editor.PostFeaturedImage.imageSize","large",e.id,t);if(r in(e?.media_details?.sizes??{}))return{mediaWidth:e.media_details.sizes[r].width,mediaHeight:e.media_details.sizes[r].height,mediaSourceUrl:e.media_details.sizes[r].source_url};let o=(0,tW.applyFilters)("editor.PostFeaturedImage.imageSize","thumbnail",e.id,t);return o in(e?.media_details?.sizes??{})?{mediaWidth:e.media_details.sizes[o].width,mediaHeight:e.media_details.sizes[o].height,mediaSourceUrl:e.media_details.sizes[o].source_url}:{mediaWidth:e.media_details.width,mediaHeight:e.media_details.height,mediaSourceUrl:e.source_url}}function NJe({currentPostId:e,featuredImageId:t,onUpdateImage:r,onRemoveImage:o,media:n,postType:i,noticeUI:s,noticeOperations:l,isRequestingFeaturedImageMedia:c}){let u=(0,c3.useRef)(!1),[d,f]=(0,c3.useState)(!1),{getSettings:m}=(0,RS.useSelect)(Gb.store),{mediaSourceUrl:h}=OJe(n,e);function g(y){m().mediaUpload({allowedTypes:tSe,filesList:y,onFileChange([w]){if((0,rSe.isBlobURL)(w?.url)){f(!0);return}w&&r(w),f(!1)},onError(w){l.removeAllNotices(),l.createErrorNotice(w)},multiple:!1})}function v(y){return y.alt_text?(0,al.sprintf)((0,al.__)("Current image: %s"),y.alt_text):(0,al.sprintf)((0,al.__)("The current image has no alternative text. The file name is: %s"),y.media_details.sizes?.full?.file||y.slug)}function b(y){u.current&&y&&(y.focus(),u.current=!1)}let S=!c&&!!t&&!n;return(0,vi.jsxs)(mm,{children:[s,(0,vi.jsxs)("div",{className:"editor-post-featured-image",children:[n&&(0,vi.jsx)("div",{id:`editor-post-featured-image-${t}-describedby`,className:"hidden",children:v(n)}),(0,vi.jsx)(Gb.MediaUploadCheck,{fallback:IJe,children:(0,vi.jsx)(Gb.MediaUpload,{title:i?.labels?.featured_image||RJe,onSelect:r,unstableFeaturedImageFlow:!0,allowedTypes:tSe,modalClass:"editor-post-featured-image__media-modal",render:({open:y})=>(0,vi.jsxs)("div",{className:"editor-post-featured-image__container",children:[S?(0,vi.jsx)(Qi.Notice,{status:"warning",isDismissible:!1,children:(0,al.__)("Could not retrieve the featured image data.")}):(0,vi.jsxs)(Qi.Button,{__next40pxDefaultSize:!0,ref:b,className:t?"editor-post-featured-image__preview":"editor-post-featured-image__toggle",onClick:y,"aria-label":t?(0,al.__)("Edit or replace the featured image"):null,"aria-describedby":t?`editor-post-featured-image-${t}-describedby`:null,"aria-haspopup":"dialog",disabled:d,accessibleWhenDisabled:!0,children:[!!t&&n&&(0,vi.jsx)("img",{className:"editor-post-featured-image__preview-image",src:h,alt:v(n)}),(d||c)&&(0,vi.jsx)(Qi.Spinner,{}),!t&&!d&&(i?.labels?.set_featured_image||AJe)]}),!!t&&(0,vi.jsxs)(Qi.__experimentalHStack,{className:Q("editor-post-featured-image__actions",{"editor-post-featured-image__actions-missing-image":S,"editor-post-featured-image__actions-is-requesting-image":c}),children:[(0,vi.jsx)(Qi.Button,{__next40pxDefaultSize:!0,className:"editor-post-featured-image__action",onClick:y,"aria-haspopup":"dialog",variant:S?"secondary":void 0,children:(0,al.__)("Replace")}),(0,vi.jsx)(Qi.Button,{__next40pxDefaultSize:!0,className:"editor-post-featured-image__action",onClick:()=>{o(),u.current=!0},variant:S?"secondary":void 0,isDestructive:S,children:(0,al.__)("Remove")})]}),(0,vi.jsx)(Qi.DropZone,{onFilesDrop:g})]}),value:t})})]})]})}var MJe=(0,RS.withSelect)(e=>{let{getEntityRecord:t,getPostType:r,hasFinishedResolution:o}=e(nSe.store),{getCurrentPostId:n,getEditedPostAttribute:i}=e(R),s=i("featured_media");return{media:s?t("postType","attachment",s,{context:"view"}):null,currentPostId:n(),postType:r(i("type")),featuredImageId:s,isRequestingFeaturedImageMedia:!!s&&!o("getEntityRecord",["postType","attachment",s,{context:"view"}])}}),FJe=(0,RS.withDispatch)((e,{noticeOperations:t},{select:r})=>{let{editPost:o}=e(R);return{onUpdateImage(n){o({featured_media:n.id})},onDropImage(n){r(Gb.store).getSettings().mediaUpload({allowedTypes:["image"],filesList:n,onFileChange([i]){o({featured_media:i.id})},onError(i){t.removeAllNotices(),t.createErrorNotice(i)},multiple:!1})},onRemoveImage(){o({featured_media:0})}}}),$T=(0,oSe.compose)(Qi.withNotices,MJe,FJe,(0,Qi.withFilters)("editor.PostFeaturedImage"))(NJe);var iSe=a(V(),1),sSe=a(W(),1),u3=a(G(),1),aSe=a(oe(),1);var AS=a(T(),1),rW="featured-image";function d3({withPanelBody:e=!0}){let{postType:t,isEnabled:r,isOpened:o}=(0,u3.useSelect)(i=>{let{getEditedPostAttribute:s,isEditorPanelEnabled:l,isEditorPanelOpened:c}=i(R),{getPostType:u}=i(aSe.store);return{postType:u(s("type")),isEnabled:l(rW),isOpened:c(rW)}},[]),{toggleEditorPanelOpened:n}=(0,u3.useDispatch)(R);return r?e?(0,AS.jsx)(mm,{children:(0,AS.jsx)(sSe.PanelBody,{title:t?.labels?.featured_image??(0,iSe.__)("Featured image"),opened:o,onToggle:()=>n(rW),children:(0,AS.jsx)($T,{})})}):(0,AS.jsx)(mm,{children:(0,AS.jsx)($T,{})}):null}var Ds=a(V(),1),f3=a(W(),1),m3=a(G(),1),uSe=a(ke(),1),dSe=a(oe(),1);var lSe=a(G(),1);var cSe=a(T(),1);function IS({children:e}){return(0,lSe.useSelect)(r=>r(R).getEditorSettings().disablePostFormats,[])?null:(0,cSe.jsx)(oo,{supportKeys:"post-formats",children:e})}var Yb=a(T(),1),eE=[{id:"aside",caption:(0,Ds.__)("Aside")},{id:"audio",caption:(0,Ds.__)("Audio")},{id:"chat",caption:(0,Ds.__)("Chat")},{id:"gallery",caption:(0,Ds.__)("Gallery")},{id:"image",caption:(0,Ds.__)("Image")},{id:"link",caption:(0,Ds.__)("Link")},{id:"quote",caption:(0,Ds.__)("Quote")},{id:"standard",caption:(0,Ds.__)("Standard")},{id:"status",caption:(0,Ds.__)("Status")},{id:"video",caption:(0,Ds.__)("Video")}].sort((e,t)=>{let r=e.caption.toUpperCase(),o=t.caption.toUpperCase();return r<o?-1:r>o?1:0});function tE(){let t=`post-format-selector-${(0,uSe.useInstanceId)(tE)}`,{postFormat:r,suggestedFormat:o,supportedFormats:n}=(0,m3.useSelect)(u=>{let{getEditedPostAttribute:d,getSuggestedPostFormat:f}=u(R),m=d("format"),h=u(dSe.store).getThemeSupports();return{postFormat:m??"standard",suggestedFormat:f(),supportedFormats:h.formats}},[]),i=eE.filter(u=>n?.includes(u.id)||r===u.id),s=i.find(u=>u.id===o),{editPost:l}=(0,m3.useDispatch)(R),c=u=>l({format:u});return(0,Yb.jsx)(IS,{children:(0,Yb.jsxs)("div",{className:"editor-post-format",children:[(0,Yb.jsx)(f3.RadioControl,{className:"editor-post-format__options",label:(0,Ds.__)("Post Format"),selected:r,onChange:u=>c(u),id:t,options:i.map(u=>({label:u.caption,value:u.id})),hideLabelFromVision:!0}),s&&s.id!==r&&(0,Yb.jsx)("p",{className:"editor-post-format__suggestion",children:(0,Yb.jsx)(f3.Button,{__next40pxDefaultSize:!0,variant:"link",onClick:()=>c(s.id),children:(0,Ds.sprintf)((0,Ds.__)("Apply suggested format: %s"),s.caption)})})]})})}var Wh=a(V(),1),oW=a(W(),1),rE=a(G(),1);var nW=a(uo(),1);var fSe=a(G(),1);var mSe=a(T(),1);function DJe({children:e}){let{lastRevisionId:t,revisionsCount:r}=(0,fSe.useSelect)(o=>{let{getCurrentPostLastRevisionId:n,getCurrentPostRevisionsCount:i}=o(R);return{lastRevisionId:n(),revisionsCount:i()}},[]);return!t||r<2?null:(0,mSe.jsx)(oo,{supportKeys:"revisions",children:e})}var qb=DJe;var OS=a(T(),1);function pSe(){return(0,rE.useSelect)(e=>{let{getCurrentPostLastRevisionId:t,getCurrentPostRevisionsCount:r,getEditorSettings:o}=e(R);return{lastRevisionId:t(),revisionsCount:r(),disableVisualRevisions:!!o().disableVisualRevisions}},[])}function LJe(){let{lastRevisionId:e,revisionsCount:t,disableVisualRevisions:r}=pSe(),{setCurrentRevisionId:o}=Y((0,rE.useDispatch)(R)),n=r?{href:(0,nW.addQueryArgs)("revision.php",{revision:e})}:{onClick:()=>o(e)};return(0,OS.jsx)(qb,{children:(0,OS.jsx)(oW.Button,{__next40pxDefaultSize:!0,...n,className:"editor-post-last-revision__title",icon:Gd,iconPosition:"right",text:(0,Wh.sprintf)((0,Wh.__)("Revisions (%s)"),t)})})}function hSe(){let{lastRevisionId:e,revisionsCount:t,disableVisualRevisions:r}=pSe(),{setCurrentRevisionId:o}=Y((0,rE.useDispatch)(R)),n=r?{href:(0,nW.addQueryArgs)("revision.php",{revision:e})}:{onClick:()=>o(e)};return(0,OS.jsx)(qb,{children:(0,OS.jsx)(fr,{label:(0,Wh.__)("Revisions"),children:(0,OS.jsx)(oW.Button,{...n,className:"editor-private-post-last-revision__button",text:t,"aria-label":(0,Wh.sprintf)((0,Wh._n)("Open revisions screen: %d revision","Open revisions screen: %d revisions",t),t),variant:"tertiary",size:"compact"})})})}var p3=LJe;var gSe=a(W(),1);var h3=a(T(),1);function BJe(){return(0,h3.jsx)(qb,{children:(0,h3.jsx)(gSe.PanelBody,{className:"editor-post-last-revision__panel",children:(0,h3.jsx)(p3,{})})})}var vSe=BJe;var ei=a(V(),1),ll=a(W(),1),nE=a(G(),1),aW=a(uo(),1),oE=a(H(),1),NS=a(An(),1),_Se=a(ke(),1),lW=a(oe(),1);var Jc=a(V(),1),VJe="authentication-failed",jJe="connection-expired",zJe="connection-limit-exceeded",bSe="document-size-limit-exceeded",sW="protocol-mismatch",ySe="unknown-error",iW={[VJe]:{title:(0,Jc.__)("Unable to connect"),description:(0,Jc.__)("Real-time collaboration couldn't verify your permissions. Check that you have access to edit this post or contact your site administrator.")},[jJe]:{title:(0,Jc.__)("Connection expired"),description:(0,Jc.__)("Your connection to real-time collaboration has timed out. Editing is paused to prevent conflicts with other editors.")},[zJe]:{title:(0,Jc.__)("Too many editors connected"),description:(0,Jc.__)("Real-time collaboration has reached its connection limit. Try again later or contact your site administrator.")},[sW]:{title:(0,Jc.__)("Protocol update"),description:(0,Jc.__)("Real-time collaboration has been updated. Please refresh the page to continue editing.")},[ySe]:{title:(0,Jc.__)("Connection lost"),description:(0,Jc.__)("The connection to real-time collaboration was interrupted. Editing is paused to prevent conflicts with other editors.")}};function wSe(e){return e?.code&&iW[e?.code]?iW[e.code]:iW[ySe]}var Gr=a(T(),1);function SSe(){let{isCollaborationSupported:e,syncConnectionStatus:t}=(0,nE.useSelect)(r=>{let{isCollaborationSupported:o,getSyncConnectionStatus:n}=Y(r(lW.store));return{isCollaborationSupported:o(),syncConnectionStatus:n()}},[]);return e?null:bSe===t?.error?.code?(0,Gr.jsx)("p",{children:(0,ei.__)("Because this post is too large for real-time collaboration, only one person can edit at a time.")}):(0,Gr.jsx)("p",{children:(0,ei.__)("Because this post uses plugins that aren\u2019t compatible with real-time collaboration, only one person can edit at a time.")})}function xSe(){let t="core/editor/post-locked-modal-"+(0,_Se.useInstanceId)(xSe),{autosave:r,updatePostLock:o}=(0,nE.useDispatch)(R),{isCollaborationEnabled:n,isLocked:i,isTakeover:s,user:l,postId:c,postLockUtils:u,activePostLock:d,postType:f,previewLink:m}=(0,nE.useSelect)(y=>{let{isPostLocked:w,isPostLockTakeover:_,getPostLockUser:x,getCurrentPostId:E,getActivePostLock:O,getEditedPostAttribute:A,getEditedPostPreviewLink:C,getEditorSettings:I,isCollaborationEnabledForCurrentPost:k}=Y(y(R)),{getPostType:P}=y(lW.store);return{isCollaborationEnabled:k(),isLocked:w(),isTakeover:_(),user:x(),postId:E(),postLockUtils:I().postLockUtils,activePostLock:O(),postType:P(A("type")),previewLink:C()}},[]);if((0,oE.useEffect)(()=>{function y(x){i||(x["wp-refresh-post-lock"]={lock:d,post_id:c})}function w(x){if(!x["wp-refresh-post-lock"])return;let E=x["wp-refresh-post-lock"];E.lock_error?(r(),o({isLocked:!0,isTakeover:!0,user:{name:E.lock_error.name,avatar:E.lock_error.avatar_src_2x}})):E.new_lock&&o({isLocked:!1,activePostLock:E.new_lock})}function _(){if(i||!d)return;let x=new window.FormData;if(x.append("action","wp-remove-post-lock"),x.append("_wpnonce",u.unlockNonce),x.append("post_ID",c),x.append("active_post_lock",d),window.navigator.sendBeacon)window.navigator.sendBeacon(u.ajaxUrl,x);else{let E=new window.XMLHttpRequest;E.open("POST",u.ajaxUrl,!1),E.send(x)}}return(0,NS.addAction)("heartbeat.send",t,y),(0,NS.addAction)("heartbeat.tick",t,w),window.addEventListener("beforeunload",_),()=>{(0,NS.removeAction)("heartbeat.send",t),(0,NS.removeAction)("heartbeat.tick",t),window.removeEventListener("beforeunload",_)}},[]),!i||n)return null;let h=l.name,g=l.avatar,v=(0,aW.addQueryArgs)("post.php",{"get-post-lock":"1",lockKey:!0,post:c,action:"edit",_wpnonce:u.nonce}),b=(0,aW.addQueryArgs)("edit.php",{post_type:f?.slug}),S=(0,ei.__)("Exit editor");return(0,Gr.jsx)(ll.Modal,{title:s?(0,ei.__)("Someone else has taken over this post"):(0,ei.__)("This post is already being edited"),focusOnMount:!0,shouldCloseOnClickOutside:!1,shouldCloseOnEsc:!1,isDismissible:!1,className:"editor-post-locked-modal",size:"medium",children:(0,Gr.jsxs)(ll.__experimentalHStack,{alignment:"top",spacing:6,children:[!!g&&(0,Gr.jsx)("img",{src:g,alt:(0,ei.__)("Avatar"),className:"editor-post-locked-modal__avatar",width:64,height:64}),(0,Gr.jsxs)("div",{children:[!!s&&(0,Gr.jsxs)(Gr.Fragment,{children:[(0,Gr.jsx)("p",{children:(0,oE.createInterpolateElement)(h?(0,ei.sprintf)((0,ei.__)("<strong>%s</strong> now has editing control of this post (<PreviewLink />). Don\u2019t worry, your changes up to this moment have been saved."),h):(0,ei.__)("Another user now has editing control of this post (<PreviewLink />). Don\u2019t worry, your changes up to this moment have been saved."),{strong:(0,Gr.jsx)("strong",{}),PreviewLink:(0,Gr.jsx)(ll.ExternalLink,{href:m,children:(0,ei.__)("preview")})})}),(0,Gr.jsx)(SSe,{})]}),!s&&(0,Gr.jsxs)(Gr.Fragment,{children:[(0,Gr.jsx)("p",{children:(0,oE.createInterpolateElement)(h?(0,ei.sprintf)((0,ei.__)("<strong>%s</strong> is currently working on this post (<PreviewLink />), which means you cannot make changes, unless you take over."),h):(0,ei.__)("Another user is currently working on this post (<PreviewLink />), which means you cannot make changes, unless you take over."),{strong:(0,Gr.jsx)("strong",{}),PreviewLink:(0,Gr.jsx)(ll.ExternalLink,{href:m,children:(0,ei.__)("preview")})})}),(0,Gr.jsx)(SSe,{}),(0,Gr.jsx)("p",{children:(0,ei.__)("If you take over, the other user will lose editing control to the post, but their changes will be saved.")})]}),(0,Gr.jsxs)(ll.__experimentalHStack,{className:"editor-post-locked-modal__buttons",justify:"flex-end",children:[!s&&(0,Gr.jsx)(ll.Button,{__next40pxDefaultSize:!0,variant:"tertiary",href:v,children:(0,ei.__)("Take over")}),(0,Gr.jsx)(ll.Button,{__next40pxDefaultSize:!0,variant:"primary",href:b,children:S})]})]})]})})}var CSe=(0,ll.withFilters)("editor.PostLockedModal")(xSe);var ESe=a(V(),1),PSe=a(W(),1),v3=a(G(),1);var TSe=a(G(),1);function HJe({children:e}){let{hasPublishAction:t,isPublished:r}=(0,TSe.useSelect)(o=>{let{isCurrentPostPublished:n,getCurrentPost:i}=o(R);return{hasPublishAction:i()._links?.["wp:action-publish"]??!1,isPublished:n()}},[]);return r||!t?null:e}var g3=HJe;var cW=a(T(),1);function UJe(){let e=(0,v3.useSelect)(o=>o(R).getEditedPostAttribute("status"),[]),{editPost:t}=(0,v3.useDispatch)(R),r=()=>{t({status:e==="pending"?"draft":"pending"})};return(0,cW.jsx)(g3,{children:(0,cW.jsx)(PSe.CheckboxControl,{label:(0,ESe.__)("Pending review"),checked:e==="pending",onChange:r})})}var kSe=UJe;var RSe=a(H(),1),Kb=a(W(),1),MS=a(V(),1),b3=a(G(),1),ASe=a(An(),1),ISe=a(oe(),1);var cl=a(T(),1);function WJe(e){let t=(0,RSe.renderToString)((0,cl.jsxs)("div",{className:"editor-post-preview-button__interstitial-message",children:[(0,cl.jsxs)(Kb.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 96 96",children:[(0,cl.jsx)(Kb.Path,{className:"outer",d:"M48 12c19.9 0 36 16.1 36 36S67.9 84 48 84 12 67.9 12 48s16.1-36 36-36",fill:"none"}),(0,cl.jsx)(Kb.Path,{className:"inner",d:"M69.5 46.4c0-3.9-1.4-6.7-2.6-8.8-1.6-2.6-3.1-4.9-3.1-7.5 0-2.9 2.2-5.7 5.4-5.7h.4C63.9 19.2 56.4 16 48 16c-11.2 0-21 5.7-26.7 14.4h2.1c3.3 0 8.5-.4 8.5-.4 1.7-.1 1.9 2.4.2 2.6 0 0-1.7.2-3.7.3L40 67.5l7-20.9L42 33c-1.7-.1-3.3-.3-3.3-.3-1.7-.1-1.5-2.7.2-2.6 0 0 5.3.4 8.4.4 3.3 0 8.5-.4 8.5-.4 1.7-.1 1.9 2.4.2 2.6 0 0-1.7.2-3.7.3l11.5 34.3 3.3-10.4c1.6-4.5 2.4-7.8 2.4-10.5zM16.1 48c0 12.6 7.3 23.5 18 28.7L18.8 35c-1.7 4-2.7 8.4-2.7 13zm32.5 2.8L39 78.6c2.9.8 5.9 1.3 9 1.3 3.7 0 7.3-.6 10.6-1.8-.1-.1-.2-.3-.2-.4l-9.8-26.9zM76.2 36c0 3.2-.6 6.9-2.4 11.4L64 75.6c9.5-5.5 15.9-15.8 15.9-27.6 0-5.5-1.4-10.8-3.9-15.3.1 1 .2 2.1.2 3.3z",fill:"none"})]}),(0,cl.jsx)("p",{children:(0,MS.__)("Generating preview\u2026")})]}));t+=`
160 <style>
161 body {
162 margin: 0;
163 }
164 .editor-post-preview-button__interstitial-message {
165 display: flex;
166 flex-direction: column;
167 align-items: center;
168 justify-content: center;
169 height: 100vh;
170 width: 100vw;
171 }
172 @-webkit-keyframes paint {
173 0% {
174 stroke-dashoffset: 0;
175 }
176 }
177 @-moz-keyframes paint {
178 0% {
179 stroke-dashoffset: 0;
180 }
181 }
182 @-o-keyframes paint {
183 0% {
184 stroke-dashoffset: 0;
185 }
186 }
187 @keyframes paint {
188 0% {
189 stroke-dashoffset: 0;
190 }
191 }
192 .editor-post-preview-button__interstitial-message svg {
193 width: 192px;
194 height: 192px;
195 stroke: #555d66;
196 stroke-width: 0.75;
197 }
198 .editor-post-preview-button__interstitial-message svg .outer,
199 .editor-post-preview-button__interstitial-message svg .inner {
200 stroke-dasharray: 280;
201 stroke-dashoffset: 280;
202 -webkit-animation: paint 1.5s ease infinite alternate;
203 -moz-animation: paint 1.5s ease infinite alternate;
204 -o-animation: paint 1.5s ease infinite alternate;
205 animation: paint 1.5s ease infinite alternate;
206 }
207 p {
208 text-align: center;
209 font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
210 }
211 </style>
212 `,t=(0,ASe.applyFilters)("editor.PostPreview.interstitialMarkup",t),e.write(t),e.title=(0,MS.__)("Generating preview\u2026"),e.close()}function Gh({className:e,textContent:t,forceIsAutosaveable:r,role:o,onPreview:n}){let{postId:i,currentPostLink:s,previewLink:l,isSaveable:c,isViewable:u}=(0,b3.useSelect)(g=>{let v=g(R),y=g(ISe.store).getPostType(v.getCurrentPostType("type"))?.viewable??!1;return y?{postId:v.getCurrentPostId(),currentPostLink:v.getCurrentPostAttribute("link"),previewLink:v.getEditedPostPreviewLink(),isSaveable:v.isEditedPostSaveable(),isViewable:y}:{isViewable:y}},[]),{__unstableSaveForPreview:d}=(0,b3.useDispatch)(R);if(!u)return null;let f=`wp-preview-${i}`;return(0,cl.jsx)(Kb.Button,{variant:e?void 0:"tertiary",className:e||"editor-post-preview",href:l||s,target:f,accessibleWhenDisabled:!0,disabled:!c,onClick:async g=>{g.preventDefault();let v=window.open("",f);v.focus(),WJe(v.document);let b=await d({forceIsAutosaveable:r});v.location=b,n?.()},role:o,size:"compact",children:t||(0,cl.jsxs)(cl.Fragment,{children:[(0,MS._x)("Preview","imperative verb"),(0,cl.jsx)(Ut,{render:(0,cl.jsx)("span",{}),children:(0,MS.__)("(opens in a new tab)")})]})})}var FSe=a(W(),1),w3=a(G(),1);var Yh=a(V(),1),OSe=a(G(),1),NSe=a(ke(),1);function y3(){let e=(0,NSe.useViewportMatch)("medium","<"),{isPublished:t,isBeingScheduled:r,isSaving:o,isPublishing:n,hasPublishAction:i,isAutosaving:s,hasNonPostEntityChanges:l,postStatusHasChanged:c,postStatus:u,isPostSavingLocked:d}=(0,OSe.useSelect)(f=>{let{isCurrentPostPublished:m,isEditedPostBeingScheduled:h,isSavingPost:g,isPublishingPost:v,getCurrentPost:b,isAutosavingPost:S,getPostEdits:y,getEditedPostAttribute:w}=f(R);return{isPublished:m(),isBeingScheduled:h(),isSaving:g(),isPublishing:v(),hasPublishAction:b()._links?.["wp:action-publish"]??!1,isAutosaving:S(),hasNonPostEntityChanges:f(R).hasNonPostEntityChanges(),isPostSavingLocked:f(R).isPostSavingLocked(),postStatusHasChanged:!!y()?.status,postStatus:w("status")}},[]);return n?(0,Yh.__)("Publishing\u2026"):(t||r)&&o&&!s?(0,Yh.__)("Saving\u2026"):i?l&&!d||t||c&&!["future","publish"].includes(u)||!c&&u==="future"?(0,Yh.__)("Save"):r?(0,Yh.__)("Schedule"):(0,Yh.__)("Publish"):e?(0,Yh.__)("Publish"):(0,Yh.__)("Submit for Review")}var uW=a(T(),1),MSe=()=>{};function GJe({forceIsDirty:e,isOpen:t,isToggle:r,onSubmit:o=MSe,onToggle:n,setEntitiesSavedStatesCallback:i}){let{hasPublishAction:s,isBeingScheduled:l,isPostSavingLocked:c,isPublishable:u,isPublished:d,isSaveable:f,isSaving:m,isAutoSaving:h,visibility:g,hasNonPostEntityChanges:v,isSavingNonPostEntityChanges:b,postStatus:S,postStatusHasChanged:y,postType:w,postId:_}=(0,w3.useSelect)(B=>{let L=B(R);return{isSaving:L.isSavingPost(),isAutoSaving:L.isAutosavingPost(),isBeingScheduled:L.isEditedPostBeingScheduled(),visibility:L.getEditedPostVisibility(),isSaveable:L.isEditedPostSaveable(),isPostSavingLocked:L.isPostSavingLocked(),isPublishable:L.isEditedPostPublishable(),isPublished:L.isCurrentPostPublished(),hasPublishAction:!!L.getCurrentPost()?._links?.["wp:action-publish"],postType:L.getCurrentPostType(),postId:L.getCurrentPostId(),postStatus:L.getEditedPostAttribute("status"),postStatusHasChanged:L.getPostEdits()?.status,hasNonPostEntityChanges:L.hasNonPostEntityChanges(),isSavingNonPostEntityChanges:L.isSavingNonPostEntityChanges()}},[]),{editPost:x,savePost:E}=(0,w3.useDispatch)(R),O=B=>{x({status:B},{undoIgnore:!0}),E()},A=B=>(...L)=>{if(v&&i){let M=z=>{z&&z.some(K=>K.kind==="postType"&&K.name===w&&K.key===_)&&B(...L)};return i(()=>M),MSe}return B(...L)},C=c||b||(m||!f||!u&&!e)&&!v,I=c||b||(d||m||!f||!u&&!e)&&!v,k="publish";y?k=S:s?g==="private"?k="private":l&&(k="future"):k="pending";let P=()=>{C||(o(),O(k))},N=()=>{I||n()},U={"aria-disabled":C,className:"editor-post-publish-button",isBusy:!h&&m,variant:"primary",onClick:A(P),"aria-haspopup":v?"dialog":void 0},F={"aria-disabled":I,"aria-expanded":t,className:"editor-post-publish-panel__toggle",isBusy:m&&d,variant:"primary",size:"compact",onClick:A(N),"aria-haspopup":v?"dialog":void 0},D=r?F:U;return(0,uW.jsx)(FSe.Button,{...D,className:`${D.className} editor-post-publish-button__button`,size:"compact",children:(0,uW.jsx)(y3,{})})}var FS=GJe;var L3=a(V(),1),US=a(H(),1),oy=a(W(),1),B3=a(G(),1),Xh=a(ke(),1);var N_e=a(oe(),1);var $c=a(V(),1),dE=a(W(),1),S_e=a(G(),1);var __e=a(uo(),1),x_e=a(oe(),1),C_e=a(Lt(),1);var DS=a(V(),1),DSe=a(H(),1),LS=a(W(),1),LSe=a(ke(),1),_3=a(G(),1),BSe=a(pe(),1);var Zb=a(V(),1),S3=[{label:(0,Zb.__)("Public"),value:"public",description:(0,Zb.__)("Visible to everyone.")},{label:(0,Zb.__)("Private"),value:"private",description:(0,Zb.__)("Only visible to site admins and editors.")},{label:(0,Zb.__)("Password protected"),value:"password",description:(0,Zb.__)("Only visible to those who know the password.")}];var Xb=a(T(),1);function iE({onClose:e}){let t=(0,LSe.useInstanceId)(iE),{status:r,visibility:o,password:n}=(0,_3.useSelect)(d=>({status:d(R).getEditedPostAttribute("status"),visibility:d(R).getEditedPostVisibility(),password:d(R).getEditedPostAttribute("password")})),{editPost:i}=(0,_3.useDispatch)(R),[s,l]=(0,DSe.useState)(!!n);function c(d){i({public:{status:o==="private"?"draft":r,password:""},private:{status:"private",password:""},password:{status:o==="private"?"draft":r,password:n||""}}[d]),l(d==="password")}let u=d=>{i({password:d})};return(0,Xb.jsxs)("div",{className:"editor-post-visibility",children:[(0,Xb.jsx)(BSe.__experimentalInspectorPopoverHeader,{title:(0,DS.__)("Visibility"),help:(0,DS.__)("Control how this post is viewed."),onClose:e}),(0,Xb.jsxs)(LS.__experimentalVStack,{spacing:4,children:[(0,Xb.jsx)(LS.RadioControl,{label:(0,DS.__)("Visibility"),hideLabelFromVision:!0,options:S3,selected:s?"password":o,onChange:c}),s&&(0,Xb.jsx)(LS.TextControl,{label:(0,DS.__)("Password"),onChange:u,value:n,placeholder:(0,DS.__)("Use a secure password"),type:"text",id:`editor-post-visibility__password-input-${t}`,maxLength:255})]})]})}var VSe=a(G(),1);function x3(){return dW()}function dW(){let e=(0,VSe.useSelect)(t=>t(R).getEditedPostVisibility(),[]);return S3.find(t=>t.value===e)?.label}var jSe=a(en(),1),zSe=a(V(),1),sE=a(G(),1),HSe=a(pe(),1),C3=a(H(),1),USe=a(oe(),1);var fW=a(T(),1),{PrivatePublishDateTimePicker:YJe}=Y(HSe.privateApis);function BS(e){return(0,fW.jsx)(mW,{...e,showPopoverHeaderActions:!0,isCompact:!1})}function mW({onClose:e,showPopoverHeaderActions:t,isCompact:r}){let{postDate:o,postType:n}=(0,sE.useSelect)(h=>({postDate:h(R).getEditedPostAttribute("date"),postType:h(R).getCurrentPostType()}),[]),{editPost:i}=(0,sE.useDispatch)(R),s=h=>i({date:h}),[l,c]=(0,C3.useState)(lC(new Date(o))),u=(0,sE.useSelect)(h=>h(USe.store).getEntityRecords("postType",n,{status:"publish,future",after:lC(l).toISOString(),before:tse(l).toISOString(),exclude:[h(R).getCurrentPostId()],per_page:100,_fields:"id,date"}),[l,n]),d=(0,C3.useMemo)(()=>(u||[]).map(({date:h})=>({date:new Date(h)})),[u]),f=(0,jSe.getSettings)(),m=/a(?!\\)/i.test(f.formats.time.toLowerCase().replace(/\\\\/g,"").split("").reverse().join(""));return(0,fW.jsx)(YJe,{currentDate:o,onChange:s,is12Hour:m,dateOrder:(0,zSe._x)("dmy","date order"),events:d,onMonthPreviewed:h=>c(wse(h)),onClose:e,isCompact:r,showPopoverHeaderActions:t})}var Ls=a(V(),1),Zl=a(en(),1),GSe=a(G(),1);function VS(e){return jS(e)}function jS({full:e=!1}={}){let{date:t,isFloating:r}=(0,GSe.useSelect)(o=>({date:o(R).getEditedPostAttribute("date"),isFloating:o(R).isEditedPostDateFloating()}),[]);return e?YSe(t):qJe(t,{isFloating:r})}function YSe(e){let t=(0,Zl.getDate)(e),r=KJe(),o=(0,Zl.dateI18n)((0,Ls._x)("F j, Y g:i\xA0a","post schedule full date format"),t);return(0,Ls.isRTL)()?`${r} ${o}`:`${o} ${r}`}function qJe(e,{isFloating:t=!1,now:r=new Date}={}){if(!e||t)return(0,Ls.__)("Immediately");if(!ZJe(r))return YSe(e);let o=(0,Zl.getDate)(e);if(WSe(o,r))return(0,Ls.sprintf)((0,Ls.__)("Today at %s"),(0,Zl.dateI18n)((0,Ls._x)("g:i\xA0a","post schedule time format"),o));let n=new Date(r);return n.setDate(n.getDate()+1),WSe(o,n)?(0,Ls.sprintf)((0,Ls.__)("Tomorrow at %s"),(0,Zl.dateI18n)((0,Ls._x)("g:i\xA0a","post schedule time format"),o)):o.getFullYear()===r.getFullYear()?(0,Zl.dateI18n)((0,Ls._x)("F j g:i\xA0a","post schedule date format without year"),o):(0,Zl.dateI18n)((0,Ls._x)("F j, Y g:i\xA0a","post schedule full date format"),o)}function KJe(){let{timezone:e}=(0,Zl.getSettings)();return e.abbr&&isNaN(Number(e.abbr))?e.abbr:`UTC${e.offset<0?"":"+"}${e.offsetFormatted}`}function ZJe(e){let{timezone:t}=(0,Zl.getSettings)(),r=Number(t.offset),o=-1*(e.getTimezoneOffset()/60);return r===o}function WSe(e,t){return e.getDate()===t.getDate()&&e.getMonth()===t.getMonth()&&e.getFullYear()===t.getFullYear()}var ey=a(V(),1),r_e=a(H(),1),vW=a(G(),1),o_e=a(W(),1),R3=a(oe(),1);var bi=a(V(),1),$b=a(H(),1),P3=a(W(),1);var Jb=a(G(),1),E3=a(oe(),1),QSe=a(ke(),1),JSe=a(Um(),1),$Se=a(Rt(),1);var T3=a(W(),1),qSe=a(G(),1),KSe=a(oe(),1);var Qb=a(T(),1),XJe=3,QJe={per_page:10,orderby:"count",order:"desc",hide_empty:!0,_fields:"id,name,count",context:"view"};function ZSe({onSelect:e,taxonomy:t}){let{_terms:r,showTerms:o}=(0,qSe.useSelect)(i=>{let s=i(KSe.store).getEntityRecords("taxonomy",t.slug,QJe);return{_terms:s,showTerms:s?.length>=XJe}},[t.slug]);if(!o)return null;let n=a0e(r);return(0,Qb.jsxs)("div",{className:"editor-post-taxonomies__flat-term-most-used",children:[(0,Qb.jsx)(T3.BaseControl.VisualLabel,{as:"h3",className:"editor-post-taxonomies__flat-term-most-used-label",children:t.labels.most_used}),(0,Qb.jsx)("ul",{role:"list",className:"editor-post-taxonomies__flat-term-most-used-list",children:n.map(i=>(0,Qb.jsx)("li",{children:(0,Qb.jsx)(T3.Button,{__next40pxDefaultSize:!0,variant:"link",onClick:()=>e(i),children:i.name})},i.id))})]})}var aE=a(T(),1),pW=[],e_e=100,XSe={per_page:e_e,_fields:"id,name",context:"view"},t_e=(e,t)=>bS(e).toLowerCase()===bS(t).toLowerCase(),hW=(e,t)=>e.map(r=>t.find(o=>t_e(o.name,r))?.id).filter(r=>r!==void 0);function gW({slug:e}){let[t,r]=(0,$b.useState)([]),[o,n]=(0,$b.useState)(""),i=(0,QSe.useDebounce)(n,500),{terms:s,termIds:l,taxonomy:c,hasAssignAction:u,hasCreateAction:d,hasResolvedTerms:f}=(0,Jb.useSelect)(I=>{let{getCurrentPost:k,getEditedPostAttribute:P}=I(R),{getEntityRecords:N,getEntityRecord:U,hasFinishedResolution:F}=I(E3.store),D=k(),B=U("root","taxonomy",e),L=B?P(B.rest_base):pW,M={...XSe,include:L?.join(","),per_page:-1};return{hasCreateAction:B?D._links?.["wp:action-create-"+B.rest_base]??!1:!1,hasAssignAction:B?D._links?.["wp:action-assign-"+B.rest_base]??!1:!1,taxonomy:B,termIds:L,terms:L?.length?N("taxonomy",e,M):pW,hasResolvedTerms:F("getEntityRecords",["taxonomy",e,M])}},[e]),{searchResults:m}=(0,Jb.useSelect)(I=>{let{getEntityRecords:k}=I(E3.store);return{searchResults:o?k("taxonomy",e,{...XSe,search:o}):pW}},[o,e]);(0,$b.useEffect)(()=>{if(f){let I=(s??[]).map(k=>bS(k.name));r(I)}},[s,f]);let h=(0,$b.useMemo)(()=>(m??[]).map(I=>bS(I.name)),[m]),{editPost:g}=(0,Jb.useDispatch)(R),{saveEntityRecord:v}=(0,Jb.useDispatch)(E3.store),{createErrorNotice:b}=(0,Jb.useDispatch)($Se.store);if(!u)return null;async function S(I){try{let k=await v("taxonomy",e,I,{throwOnError:!0});return NU(k)}catch(k){if(k.code!=="term_exists")throw k;return{id:k.data.term_id,name:I.name}}}function y(I){g({[c.rest_base]:I})}function w(I){let k=[...s??[],...m??[]],P=I.reduce((U,F)=>(U.some(D=>D.toLowerCase()===F.toLowerCase())||U.push(F),U),[]),N=P.filter(U=>!k.find(F=>t_e(F.name,U)));if(r(P),N.length===0){y(hW(P,k));return}d&&Promise.all(N.map(U=>S({name:U}))).then(U=>{let F=k.concat(U);y(hW(P,F))}).catch(U=>{b(U.message,{type:"snackbar"}),y(hW(P,k))})}function _(I){if(l.includes(I.id))return;let k=[...l,I.id],P=e==="post_tag"?(0,bi.__)("Tag"):(0,bi.__)("Term"),N=(0,bi.sprintf)((0,bi._x)("%s added","term"),c?.labels?.singular_name??P);(0,JSe.speak)(N,"assertive"),y(k)}let x=c?.labels?.add_new_item??(e==="post_tag"?(0,bi.__)("Add Tag"):(0,bi.__)("Add Term")),E=c?.labels?.singular_name??(e==="post_tag"?(0,bi.__)("Tag"):(0,bi.__)("Term")),O=(0,bi.sprintf)((0,bi._x)("%s added","term"),E),A=(0,bi.sprintf)((0,bi._x)("%s removed","term"),E),C=(0,bi.sprintf)((0,bi._x)("Remove %s","term"),E);return(0,aE.jsxs)(ne,{direction:"column",gap:"lg",children:[(0,aE.jsx)(P3.FormTokenField,{__next40pxDefaultSize:!0,value:t,suggestions:h,onChange:w,onInputChange:i,maxSuggestions:e_e,label:x,messages:{added:O,removed:A,remove:C}}),(0,aE.jsx)(ZSe,{taxonomy:c,onSelect:_})]})}var k3=(0,P3.withFilters)("editor.PostTaxonomyType")(gW);var ty=a(T(),1),JJe=()=>{let e=(0,vW.useSelect)(n=>n(R3.store).getTaxonomy("post_tag")?.labels,[]),t=e?.add_new_item??(0,ey.__)("Add tag"),r=e?.name??(0,ey.__)("Tags"),o=[(0,ey.__)("Suggestion:"),(0,ty.jsx)("span",{className:"editor-post-publish-panel__link",children:t},"label")];return(0,ty.jsxs)(o_e.PanelBody,{initialOpen:!1,title:o,children:[(0,ty.jsx)("p",{children:(0,ey.sprintf)((0,ey.__)("%s help users and search engines navigate your site and find your content. Add a few keywords to describe your post."),r)}),(0,ty.jsx)(k3,{slug:"post_tag"})]})},$Je=()=>{let{postHasTags:e,siteHasTags:t,isPostTypeSupported:r}=(0,vW.useSelect)(n=>{let i=n(R).getCurrentPostType(),s=n(R3.store).getEntityRecord("root","taxonomy","post_tag"),l=s?.types?.includes(i),c=s!==void 0,u=s&&n(R).getEditedPostAttribute(s.rest_base),d=l?!!n(R3.store).getEntityRecords("taxonomy","post_tag",{per_page:1})?.length:!1;return{postHasTags:!!u?.length,siteHasTags:d,isPostTypeSupported:c&&l}},[]),[o]=(0,r_e.useState)(e);return!r||!t||o?null:(0,ty.jsx)(JJe,{})},n_e=$Je;var A3=a(W(),1),I3=a(G(),1),ry=a(V(),1),i_e=a(oe(),1);var qh=a(T(),1),e$e=(e,t)=>eE.filter(o=>e?.includes(o.id)).find(o=>o.id===t),t$e=({suggestedPostFormat:e,suggestionText:t,onUpdatePostFormat:r})=>(0,qh.jsx)(A3.Button,{__next40pxDefaultSize:!0,variant:"link",onClick:()=>r(e),children:t});function s_e(){let{currentPostFormat:e,suggestion:t}=(0,I3.useSelect)(i=>{let{getEditedPostAttribute:s,getSuggestedPostFormat:l}=i(R),c=i(i_e.store).getThemeSupports().formats??[];return{currentPostFormat:s("format"),suggestion:e$e(c,l())}},[]),{editPost:r}=(0,I3.useDispatch)(R),o=i=>r({format:i}),n=[(0,ry.__)("Suggestion:"),(0,qh.jsx)("span",{className:"editor-post-publish-panel__link",children:(0,ry.__)("Use a post format")},"label")];return!t||t.id===e?null:(0,qh.jsxs)(A3.PanelBody,{initialOpen:!1,title:n,children:[(0,qh.jsx)("p",{children:(0,ry.__)("Your theme uses post formats to highlight different kinds of content, like images or videos. Apply a post format to see this special styling.")}),(0,qh.jsx)("p",{children:(0,qh.jsx)(t$e,{onUpdatePostFormat:o,suggestedPostFormat:t.id,suggestionText:(0,ry.sprintf)((0,ry.__)('Apply the "%1$s" format.'),t.caption)})})]})}var N3=a(V(),1),m_e=a(G(),1),p_e=a(W(),1),wW=a(oe(),1),M3=a(H(),1);var ri=a(V(),1),pm=a(H(),1),u_e=a(Rt(),1),io=a(W(),1),zS=a(G(),1),d_e=a(ke(),1),lE=a(oe(),1),bW=a(Um(),1),f_e=a(Lt(),1);var ti=a(T(),1),{normalizeTextString:a_e}=Y(io.privateApis),{RECEIVE_INTERMEDIATE_RESULTS:r$e}=Y(lE.privateApis),l_e={per_page:-1,orderby:"name",order:"asc",_fields:"id,name,parent",context:"view",[r$e]:!0},o$e=8,c_e=[];function n$e(e,t){let r=i=>t.indexOf(i.id)!==-1?!0:i.children===void 0?!1:i.children.map(r).filter(s=>s).length>0,o=(i,s)=>{let l=r(i),c=r(s);return l===c?0:l&&!c?-1:!l&&c?1:0},n=[...e];return n.sort(o),n}function i$e(e,t,r){return e.find(o=>(!o.parent&&!t||parseInt(o.parent)===parseInt(t))&&o.name.toLowerCase()===r.toLowerCase())}function s$e(e){let t=r=>{if(e==="")return r;let o={...r};return o.children.length>0&&(o.children=o.children.map(t).filter(n=>n)),a_e(o.name).indexOf(a_e(e))!==-1||o.children.length>0?o:!1};return t}function yW({slug:e}){let[t,r]=(0,pm.useState)(!1),[o,n]=(0,pm.useState)(""),[i,s]=(0,pm.useState)(""),[l,c]=(0,pm.useState)(!1),[u,d]=(0,pm.useState)(""),[f,m]=(0,pm.useState)([]),h=(0,d_e.useDebounce)(bW.speak,500),{hasCreateAction:g,hasAssignAction:v,terms:b,loading:S,availableTerms:y,taxonomy:w}=(0,zS.useSelect)($=>{let{getCurrentPost:le,getEditedPostAttribute:ae}=$(R),{getEntityRecord:re,getEntityRecords:ve,isResolving:Ce}=$(lE.store),_e=re("root","taxonomy",e),Me=le();return{hasCreateAction:_e?!!Me._links?.["wp:action-create-"+_e.rest_base]:!1,hasAssignAction:_e?!!Me._links?.["wp:action-assign-"+_e.rest_base]:!1,terms:_e?ae(_e.rest_base):c_e,loading:Ce("getEntityRecords",["taxonomy",e,l_e]),availableTerms:ve("taxonomy",e,l_e)||c_e,taxonomy:_e}},[e]),{editPost:_}=(0,zS.useDispatch)(R),{saveEntityRecord:x}=(0,zS.useDispatch)(lE.store),E=(0,pm.useMemo)(()=>n$e(yM(y),b),[y]),{createErrorNotice:O}=(0,zS.useDispatch)(u_e.store);if(!v)return null;let A=$=>x("taxonomy",e,$,{throwOnError:!0}),C=$=>{_({[w.rest_base]:$})},I=$=>{let ae=b.includes($)?b.filter(re=>re!==$):[...b,$];C(ae)},k=$=>{n($)},P=$=>{s($)},N=()=>{c(!l)},U=async $=>{if($.preventDefault(),o===""||t)return;let le=i$e(y,i,o);if(le){b.some(Ce=>Ce===le.id)||C([...b,le.id]),n(""),s("");return}r(!0);let ae;try{ae=await A({name:o,parent:i||void 0})}catch(Ce){O(Ce.message,{type:"snackbar"});return}let re=e==="category"?(0,ri.__)("Category"):(0,ri.__)("Term"),ve=(0,ri.sprintf)((0,ri._x)("%s added","term"),w?.labels?.singular_name??re);(0,bW.speak)(ve,"assertive"),r(!1),n(""),s(""),C([...b,ae.id])},F=$=>{let le=E.map(s$e($)).filter(Ce=>Ce),ae=Ce=>{let _e=0;for(let Me=0;Me<Ce.length;Me++)_e++,Ce[Me].children!==void 0&&(_e+=ae(Ce[Me].children));return _e};d($),m(le);let re=ae(le),ve=(0,ri.sprintf)((0,ri._n)("%d result found.","%d results found.",re),re);h(ve,"assertive")},D=$=>$.map(le=>(0,ti.jsxs)("div",{className:"editor-post-taxonomies__hierarchical-terms-choice",children:[(0,ti.jsx)(io.CheckboxControl,{checked:b.indexOf(le.id)!==-1,onChange:()=>{let ae=parseInt(le.id,10);I(ae)},label:(0,f_e.decodeEntities)(le.name)}),!!le.children.length&&(0,ti.jsx)("div",{className:"editor-post-taxonomies__hierarchical-terms-subchoices",children:D(le.children)})]},le.id)),B=($,le,ae)=>w?.labels?.[$]??(e==="category"?le:ae),L=B("add_new_item",(0,ri.__)("Add Category"),(0,ri.__)("Add Term")),M=B("new_item_name",(0,ri.__)("Add Category"),(0,ri.__)("Add Term")),z=B("parent_item",(0,ri.__)("Parent Category"),(0,ri.__)("Parent Term")),K=`\u2014 ${z} \u2014`,Z=L,q=w?.labels?.search_items??(0,ri.__)("Search Terms"),X=w?.name??(0,ri.__)("Terms"),ie=y.length>=o$e;return(0,ti.jsxs)(io.Flex,{direction:"column",gap:"4",children:[ie&&!S&&(0,ti.jsx)(io.SearchControl,{__next40pxDefaultSize:!0,label:q,placeholder:q,value:u,onChange:F}),S&&(0,ti.jsx)(io.Flex,{justify:"center",style:{height:"40px"},children:(0,ti.jsx)(io.Spinner,{})}),(0,ti.jsx)("div",{className:"editor-post-taxonomies__hierarchical-terms-list",tabIndex:"0",role:"group","aria-label":X,children:D(u!==""?f:E)}),!S&&g&&(0,ti.jsx)(io.FlexItem,{children:(0,ti.jsx)(io.Button,{__next40pxDefaultSize:!0,onClick:N,className:"editor-post-taxonomies__hierarchical-terms-add","aria-expanded":l,variant:"link",children:L})}),l&&(0,ti.jsx)("form",{onSubmit:U,children:(0,ti.jsxs)(io.Flex,{direction:"column",gap:"4",children:[(0,ti.jsx)(io.TextControl,{className:"editor-post-taxonomies__hierarchical-terms-input",label:M,value:o,onChange:k,required:!0}),!!y.length&&(0,ti.jsx)(io.TreeSelect,{__next40pxDefaultSize:!0,label:z,noOptionLabel:K,onChange:P,selectedId:i,tree:E}),(0,ti.jsx)(io.FlexItem,{children:(0,ti.jsx)(io.Button,{__next40pxDefaultSize:!0,variant:"secondary",type:"submit",className:"editor-post-taxonomies__hierarchical-terms-submit",children:Z})})]})})]})}var O3=(0,io.withFilters)("editor.PostTaxonomyType")(yW);var HS=a(T(),1);function a$e(){let{hasNoCategory:e,hasSiteCategories:t}=(0,m_e.useSelect)(i=>{let s=i(R).getCurrentPostType(),{canUser:l,getEntityRecord:c}=i(wW.store),u=c("root","taxonomy","category"),d=l("read",{kind:"root",name:"site"})?c("root","site")?.default_category:void 0,f=d?c("taxonomy","category",d):void 0,m=u&&u.types.some(b=>b===s),h=u&&i(R).getEditedPostAttribute(u.rest_base),g=m?!!i(wW.store).getEntityRecords("taxonomy","category",{exclude:[d],per_page:1})?.length:!1;return{hasNoCategory:!!u&&!!f&&m&&(h?.length===0||h?.length===1&&f?.id===h[0]),hasSiteCategories:g}},[]),[r,o]=(0,M3.useState)(!1);if((0,M3.useEffect)(()=>{e&&o(!0)},[e]),!r||!t)return null;let n=[(0,N3.__)("Suggestion:"),(0,HS.jsx)("span",{className:"editor-post-publish-panel__link",children:(0,N3.__)("Assign a category")},"label")];return(0,HS.jsxs)(p_e.PanelBody,{initialOpen:!1,title:n,children:[(0,HS.jsx)("p",{children:(0,N3.__)("Categories provide a helpful way to group related posts together and to quickly tell readers what a post is about.")}),(0,HS.jsx)(O3,{slug:"category"})]})}var h_e=a$e;var kd=a(W(),1),uE=a(G(),1),Kh=a(V(),1),cE=a(pe(),1),F3=a(H(),1),b_e=a(l1(),1);var g_e=a(uo(),1);function l$e(e){let t=new Set;return Object.fromEntries(e.map(r=>{let o=(0,g_e.getFilename)(r),n="";if(o){let i=o.split(".");i.length>1&&i.pop(),n=i.join(".")}return n||(n=Cy()),t.has(n)&&(n=`${n}-${Cy()}`),t.add(n),[r,n]}))}function v_e(e){return Object.fromEntries(Object.entries(l$e(e)).map(([t,r])=>{let o=window.fetch(t.includes("?")?t:t+"?").then(n=>n.blob()).then(n=>new File([n],`${r}.png`,{type:n.type}));return[t,o]}))}var Xl=a(T(),1);function y_e(e){let t=[];return e.forEach(r=>{t.push(r),t.push(...y_e(r.innerBlocks))}),t}function c$e(e){if(e.name==="core/image"||e.name==="core/cover")return e.attributes.url&&!e.attributes.id;if(e.name==="core/media-text")return e.attributes.mediaUrl&&!e.attributes.mediaId}function SW(e){if(e.name==="core/image"||e.name==="core/cover"){let{url:t,alt:r,id:o}=e.attributes;return{url:t,alt:r,id:o}}if(e.name==="core/media-text"){let{mediaUrl:t,mediaAlt:r,mediaId:o}=e.attributes;return{url:t,alt:r,id:o}}return{}}function u$e({clientId:e,alt:t,url:r}){let{selectBlock:o}=(0,uE.useDispatch)(cE.store);return(0,Xl.jsx)(kd.__unstableMotion.img,{tabIndex:0,role:"button","aria-label":(0,Kh.__)("Select image block."),onClick:()=>{o(e)},onKeyDown:n=>{(n.key==="Enter"||n.key===" ")&&(o(e),n.preventDefault())},alt:t,src:r,animate:{opacity:1},exit:{opacity:0,scale:0},style:{width:"32px",height:"32px",objectFit:"cover",borderRadius:"2px",cursor:"var(--wpds-cursor-control, pointer)"},whileHover:{scale:1.08}},e)}function w_e(){let[e,t]=(0,F3.useState)(!1),[r,o]=(0,F3.useState)(!1),[n,i]=(0,F3.useState)(!1),{editorBlocks:s,mediaUpload:l}=(0,uE.useSelect)(h=>({editorBlocks:h(cE.store).getBlocks(),mediaUpload:h(cE.store).getSettings().mediaUpload}),[]),c=y_e(s).filter(h=>c$e(h)),{updateBlockAttributes:u}=(0,uE.useDispatch)(cE.store);if(!l||!c.length)return null;let d=[(0,Kh.__)("Suggestion:"),(0,Xl.jsx)("span",{className:"editor-post-publish-panel__link",children:(0,Kh.__)("External media")},"label")];function f(h,g){(h.name==="core/image"||h.name==="core/cover")&&u(h.clientId,{id:g.id,url:g.url}),h.name==="core/media-text"&&u(h.clientId,{mediaId:g.id,mediaUrl:g.url})}function m(){t(!0),i(!1);let h=new Set(c.map(v=>{let{url:b}=SW(v);return b})),g=Object.fromEntries(Object.entries(v_e([...h])).map(([v,b])=>{let S=b.then(y=>new Promise((w,_)=>{l({filesList:[y],onFileChange:([x])=>{(0,b_e.isBlobURL)(x.url)||w(x)},onError(){_()}})}));return[v,S]}));Promise.allSettled(c.map(v=>{let{url:b}=SW(v);return g[b].then(S=>f(v,S)).then(()=>o(!0)).catch(()=>i(!0))})).finally(()=>{t(!1)})}return(0,Xl.jsxs)(kd.PanelBody,{initialOpen:!0,title:d,children:[(0,Xl.jsx)("p",{children:(0,Kh.__)("Upload external images to the Media Library. Images from different domains may load slowly, display incorrectly, or be removed unexpectedly.")}),(0,Xl.jsxs)("div",{style:{display:"inline-flex",flexWrap:"wrap",gap:"8px"},children:[(0,Xl.jsx)(kd.__unstableAnimatePresence,{onExitComplete:()=>o(!1),children:c.map(h=>{let{url:g,alt:v}=SW(h);return(0,Xl.jsx)(u$e,{clientId:h.clientId,url:g,alt:v},h.clientId)})}),e||r?(0,Xl.jsx)(kd.Spinner,{}):(0,Xl.jsx)(kd.Button,{size:"compact",variant:"primary",onClick:m,children:(0,Kh._x)("Upload","verb")})]}),n&&(0,Xl.jsx)("p",{children:(0,Kh.__)("Upload failed, try again.")})]})}var Rr=a(T(),1);function d$e({children:e}){let{isBeingScheduled:t,isRequestingSiteIcon:r,hasPublishAction:o,siteIconUrl:n,siteTitle:i,siteHome:s}=(0,S_e.useSelect)(d=>{let{getCurrentPost:f,isEditedPostBeingScheduled:m}=d(R),{getEntityRecord:h,isResolving:g}=d(x_e.store),v=h("root","__unstableBase",void 0)||{};return{hasPublishAction:f()._links?.["wp:action-publish"]??!1,isBeingScheduled:m(),isRequestingSiteIcon:g("getEntityRecord",["root","__unstableBase",void 0]),siteIconUrl:v.site_icon_url,siteTitle:v.name,siteHome:v.home&&(0,__e.filterURLForDisplay)(v.home)}},[]),l=(0,Rr.jsx)(dE.Icon,{className:"components-site-icon",size:"36px",icon:hB});n&&(l=(0,Rr.jsx)("img",{alt:(0,$c.__)("Site Icon"),className:"components-site-icon",src:n})),r&&(l=null);let c,u;return o?t?(c=(0,$c.__)("Are you ready to schedule?"),u=(0,$c.__)("Your work will be published at the specified date and time.")):(c=(0,$c.__)("Are you ready to publish?"),u=(0,$c.__)("Double-check your settings before publishing.")):(c=(0,$c.__)("Are you ready to submit for review?"),u=(0,$c.__)("Your work will be reviewed and then approved.")),(0,Rr.jsxs)("div",{className:"editor-post-publish-panel__prepublish",children:[(0,Rr.jsx)("div",{children:(0,Rr.jsx)("strong",{children:c})}),(0,Rr.jsx)("p",{children:u}),(0,Rr.jsxs)("div",{className:"components-site-card",children:[l,(0,Rr.jsxs)("div",{className:"components-site-info",children:[(0,Rr.jsx)("span",{className:"components-site-name",children:(0,C_e.decodeEntities)(i)||(0,$c.__)("(Untitled)")}),(0,Rr.jsx)("span",{className:"components-site-home",children:s})]})]}),(0,Rr.jsx)(w_e,{}),o&&(0,Rr.jsxs)(Rr.Fragment,{children:[(0,Rr.jsx)(dE.PanelBody,{initialOpen:!1,title:[(0,$c.__)("Visibility:"),(0,Rr.jsx)("span",{className:"editor-post-publish-panel__link",children:(0,Rr.jsx)(x3,{})},"label")],children:(0,Rr.jsx)(iE,{})}),(0,Rr.jsx)(dE.PanelBody,{initialOpen:!1,title:[(0,$c.__)("Publish:"),(0,Rr.jsx)("span",{className:"editor-post-publish-panel__link",children:(0,Rr.jsx)(VS,{})},"label")],children:(0,Rr.jsx)(BS,{})})]}),(0,Rr.jsx)(s_e,{}),(0,Rr.jsx)(n_e,{}),(0,Rr.jsx)(h_e,{}),e]})}var T_e=d$e;var tu=a(W(),1),eu=a(V(),1),Zh=a(H(),1),k_e=a(G(),1),D3=a(uo(),1),R_e=a(Lt(),1),A_e=a(ke(),1),I_e=a(oe(),1);var jo=a(T(),1),E_e="%postname%",P_e="%pagename%",f$e=e=>{let{slug:t}=e;return e.permalink_template.includes(E_e)?e.permalink_template.replace(E_e,t):e.permalink_template.includes(P_e)?e.permalink_template.replace(P_e,t):e.permalink_template};function m$e({text:e}){let[t,r]=(0,Zh.useState)(!1),o=(0,Zh.useRef)(),n=(0,A_e.useCopyToClipboard)(e,()=>{r(!0),o.current&&clearTimeout(o.current),o.current=setTimeout(()=>{r(!1)},4e3)});return(0,Zh.useEffect)(()=>()=>{o.current&&clearTimeout(o.current)},[]),(0,jo.jsx)(tu.Button,{__next40pxDefaultSize:!0,variant:"secondary",ref:n,children:t?(0,eu.__)("Copied!"):(0,eu.__)("Copy")})}function O_e({focusOnMount:e,children:t}){let{post:r,postType:o,isScheduled:n}=(0,k_e.useSelect)(m=>{let{getEditedPostAttribute:h,getCurrentPost:g,isCurrentPostScheduled:v}=m(R),{getPostType:b}=m(I_e.store);return{post:g(),postType:b(h("type")),isScheduled:v()}},[]),i=o?.labels?.singular_name,s=o?.labels?.view_item,l=o?.labels?.add_new_item,c=r.status==="future"?f$e(r):r.link,u=(0,D3.addQueryArgs)("post-new.php",{post_type:r.type}),d=(0,Zh.useCallback)(m=>{e&&m&&m.focus()},[e]),f=n?(0,jo.jsxs)(jo.Fragment,{children:[(0,eu.__)("is now scheduled. It will go live on")," ",(0,jo.jsx)(VS,{}),"."]}):(0,eu.__)("is now live.");return(0,jo.jsxs)("div",{className:"post-publish-panel__postpublish",children:[(0,jo.jsxs)(tu.PanelBody,{className:"post-publish-panel__postpublish-header",children:[(0,jo.jsx)(tu.ExternalLink,{ref:d,href:c,children:(0,R_e.decodeEntities)(r.title)||(0,eu.__)("(no title)")})," ",f]}),(0,jo.jsxs)(tu.PanelBody,{children:[(0,jo.jsx)("p",{className:"post-publish-panel__postpublish-subheader",children:(0,jo.jsx)("strong",{children:(0,eu.__)("What\u2019s next?")})}),(0,jo.jsxs)("div",{className:"post-publish-panel__postpublish-post-address-container",children:[(0,jo.jsx)(tu.TextControl,{className:"post-publish-panel__postpublish-post-address",readOnly:!0,label:(0,eu.sprintf)((0,eu.__)("%s address"),i),value:(0,D3.safeDecodeURIComponent)(c),onFocus:m=>m.target.select()}),(0,jo.jsx)("div",{className:"post-publish-panel__postpublish-post-address__copy-button-wrap",children:(0,jo.jsx)(m$e,{text:c})})]}),(0,jo.jsxs)("div",{className:"post-publish-panel__postpublish-buttons",children:[!n&&(0,jo.jsxs)(tu.Button,{variant:"primary",href:c,__next40pxDefaultSize:!0,icon:Gs,iconPosition:"right",target:"_blank",children:[s,(0,jo.jsx)(Ut,{render:(0,jo.jsx)("span",{}),children:(0,eu.__)("(opens in a new tab)")})]}),(0,jo.jsx)(tu.Button,{variant:n?"primary":"secondary",__next40pxDefaultSize:!0,href:u,children:l})]})]}),t]})}var fn=a(T(),1);function V3({forceIsDirty:e,onClose:t,PostPublishExtension:r,PrePublishExtension:o,...n}){let{hasPublishAction:i,isPostTypeViewable:s,isBeingScheduled:l,isDirty:c,isPublished:u,isPublishSidebarEnabled:d,isSaving:f,isSavingNonPostEntityChanges:m,isScheduled:h,currentPostId:g}=(0,B3.useSelect)(I=>{let{getPostType:k}=I(N_e.store),{getCurrentPost:P,getCurrentPostId:N,getEditedPostAttribute:U,isCurrentPostPublished:F,isCurrentPostScheduled:D,isEditedPostBeingScheduled:B,isEditedPostDirty:L,isAutosavingPost:M,isSavingPost:z,isSavingNonPostEntityChanges:K,isPublishSidebarEnabled:Z}=I(R),q=k(U("type"));return{hasPublishAction:P()._links?.["wp:action-publish"]??!1,isPostTypeViewable:q?.viewable,isBeingScheduled:B(),isDirty:L(),isPublished:F(),isPublishSidebarEnabled:Z(),isSaving:z()&&!M(),isSavingNonPostEntityChanges:K(),isScheduled:D(),currentPostId:N()}},[]),{disablePublishSidebar:v,enablePublishSidebar:b}=(0,B3.useDispatch)(R),S=(0,US.useRef)(null),y=(0,Xh.useMergeRefs)([(0,Xh.useFocusReturn)(),(0,Xh.useConstrainedTabbing)()]);(0,US.useEffect)(()=>{S.current?.focus()},[]);let w=(0,US.useRef)(g),_=(0,Xh.useEvent)(t);(0,US.useEffect)(()=>{let I=g!==w.current;w.current=g,(I||u&&!f&&c)&&_()},[u,f,c,g,_]);function x(){d?v():b()}function E(){(!i||!s)&&t()}let O=u||h&&l,A=!O&&!f,C=O&&!f;return(0,fn.jsxs)("div",{ref:y,tabIndex:-1,className:"editor-post-publish-panel",...n,children:[(0,fn.jsx)("div",{className:"editor-post-publish-panel__header",children:C?(0,fn.jsx)(oy.Button,{size:"compact",onClick:t,icon:_i,label:(0,L3.__)("Close panel")}):(0,fn.jsxs)(fn.Fragment,{children:[(0,fn.jsx)("div",{className:"editor-post-publish-panel__header-cancel-button",children:(0,fn.jsx)(oy.Button,{ref:S,accessibleWhenDisabled:!0,disabled:m,onClick:t,variant:"secondary",size:"compact",children:(0,L3.__)("Cancel")})}),(0,fn.jsx)("div",{className:"editor-post-publish-panel__header-publish-button",children:(0,fn.jsx)(FS,{onSubmit:E,forceIsDirty:e})})]})}),(0,fn.jsxs)("div",{className:"editor-post-publish-panel__content",children:[A&&(0,fn.jsx)(T_e,{children:o&&(0,fn.jsx)(o,{})}),C&&(0,fn.jsx)(O_e,{focusOnMount:!0,children:r&&(0,fn.jsx)(r,{})}),f&&(0,fn.jsx)(oy.Spinner,{})]}),(0,fn.jsx)("div",{className:"editor-post-publish-panel__footer",children:(0,fn.jsx)(oy.CheckboxControl,{label:(0,L3.__)("Always show pre-publish checks."),checked:d,onChange:x})})]})}var G3=a(W(),1),Y3=a(ke(),1),q3=a(G(),1),K3=a(H(),1),ny=a(V(),1);var V_e=a(go(),1),j_e=a(Nt(),1);var ul=a(W(),1),yr=a(V(),1),W3=a(G(),1),fE=a(H(),1),D_e=a(oe(),1),L_e=a(pe(),1),B_e=a(ke(),1);var _W=a(V(),1),F_e=a(W(),1),z3=a(G(),1);var M_e=a(G(),1);function j3({children:e}){let{hasStickyAction:t,postType:r}=(0,M_e.useSelect)(o=>({hasStickyAction:o(R).getCurrentPost()._links?.["wp:action-sticky"]??!1,postType:o(R).getCurrentPostType()}),[]);return r!=="post"||!t?null:e}var xW=a(T(),1);function H3(){let e=(0,z3.useSelect)(r=>r(R).getEditedPostAttribute("sticky")??!1,[]),{editPost:t}=(0,z3.useDispatch)(R);return(0,xW.jsx)(j3,{children:(0,xW.jsx)(F_e.CheckboxControl,{className:"editor-post-sticky__checkbox-control",label:(0,_W.__)("Sticky"),help:(0,_W.__)("Pin this post to the top of the blog."),checked:e,onChange:()=>t({sticky:!e})})})}var mn=a(T(),1),U3={"auto-draft":{label:(0,yr.__)("Draft"),icon:yy},draft:{label:(0,yr.__)("Draft"),icon:yy},pending:{label:(0,yr.__)("Pending"),icon:px},private:{label:(0,yr.__)("Private"),icon:ux},future:{label:(0,yr.__)("Scheduled"),icon:Vm},publish:{label:(0,yr.__)("Published"),icon:xg}},CW=[{label:(0,yr.__)("Draft"),value:"draft",description:(0,yr.__)("Not ready to publish.")},{label:(0,yr.__)("Pending"),value:"pending",description:(0,yr.__)("Waiting for review before publishing.")},{label:(0,yr.__)("Private"),value:"private",description:(0,yr.__)("Only visible to site admins and editors.")},{label:(0,yr.__)("Scheduled"),value:"future",description:(0,yr.__)("Publish automatically on a chosen date.")},{label:(0,yr.__)("Published"),value:"publish",description:(0,yr.__)("Visible to everyone.")}];function TW(){let{status:e,date:t,password:r,postId:o,postType:n,canEdit:i}=(0,W3.useSelect)(b=>{let{getEditedPostAttribute:S,getCurrentPostId:y,getCurrentPostType:w,getCurrentPost:_}=b(R);return{status:S("status"),date:S("date"),password:S("password"),postId:y(),postType:w(),canEdit:_()._links?.["wp:action-publish"]??!1}},[]),[s,l]=(0,fE.useState)(!!r),c=(0,B_e.useInstanceId)(TW,"editor-change-status__password-input"),{editEntityRecord:u}=(0,W3.useDispatch)(D_e.store),[d,f]=(0,fE.useState)(null),m=(0,fE.useMemo)(()=>({anchor:d,"aria-label":(0,yr.__)("Status & visibility"),headerTitle:(0,yr.__)("Status & visibility"),placement:"left-start",offset:36,shift:!0}),[d]);if(xi.includes(n))return null;let h=({status:b=e,password:S=r,date:y=t})=>{u("postType",n,o,{status:b,date:y,password:S})},g=b=>{l(b),b||h({password:""})},v=b=>{let S=t,y=r;e==="future"&&new Date(t)>new Date&&(S=null),b==="private"&&r&&(y=""),h({status:b,date:S,password:y})};return(0,mn.jsx)(fr,{label:(0,yr.__)("Status"),ref:f,children:i?(0,mn.jsx)(ul.Dropdown,{className:"editor-post-status",contentClassName:"editor-change-status__content",popoverProps:m,focusOnMount:!0,renderToggle:({onToggle:b,isOpen:S})=>(0,mn.jsx)(ul.Button,{className:"editor-post-status__toggle",variant:"tertiary",size:"compact",onClick:b,icon:U3[e]?.icon,"aria-label":(0,yr.sprintf)((0,yr.__)("Change status: %s"),U3[e]?.label),"aria-expanded":S,children:U3[e]?.label}),renderContent:({onClose:b})=>(0,mn.jsxs)(mn.Fragment,{children:[(0,mn.jsx)(L_e.__experimentalInspectorPopoverHeader,{title:(0,yr.__)("Status & visibility"),onClose:b}),(0,mn.jsx)("form",{onSubmit:S=>{S.preventDefault(),b()},children:(0,mn.jsxs)(ul.__experimentalVStack,{spacing:4,children:[(0,mn.jsx)(ul.RadioControl,{className:"editor-change-status__options",hideLabelFromVision:!0,label:(0,yr.__)("Status"),options:CW,onChange:v,selected:e==="auto-draft"?"draft":e}),e==="future"&&(0,mn.jsx)("div",{className:"editor-change-status__publish-date-wrapper",children:(0,mn.jsx)(mW,{showPopoverHeaderActions:!1,isCompact:!0})}),e!=="private"&&(0,mn.jsxs)(ul.__experimentalVStack,{as:"fieldset",spacing:4,className:"editor-change-status__password-fieldset",children:[(0,mn.jsx)(ul.CheckboxControl,{label:(0,yr.__)("Password protected"),help:(0,yr.__)("Only visible to those who know the password."),checked:s,onChange:g}),s&&(0,mn.jsx)("div",{className:"editor-change-status__password-input",children:(0,mn.jsx)(ul.TextControl,{label:(0,yr.__)("Password"),onChange:S=>h({password:S}),value:r,placeholder:(0,yr.__)("Use a secure password"),type:"text",id:c,maxLength:255})})]}),(0,mn.jsx)(H3,{})]})})]})}):(0,mn.jsx)("div",{className:"editor-post-status is-read-only",children:U3[e]?.label})})}var Z3=a(T(),1);function X3({forceIsDirty:e}){let[t,r]=(0,K3.useState)(!1),o=(0,Y3.useViewportMatch)("small"),{isAutosaving:n,isDirty:i,isNew:s,isPublished:l,isSaveable:c,isSaving:u,isSavingLocked:d,isSavingNonPostEntityChanges:f,isScheduled:m,hasPublishAction:h,showIconLabels:g,postStatus:v,postStatusHasChanged:b,postType:S}=(0,q3.useSelect)(P=>{let N=P(R),{get:U}=P(j_e.store);return{isAutosaving:N.isAutosavingPost(),isDirty:e||N.isEditedPostDirty(),isNew:N.isEditedPostNew(),isPublished:N.isCurrentPostPublished(),isSaving:N.isSavingPost(),isSaveable:N.isEditedPostSaveable(),isSavingLocked:N.isPostSavingLocked(),isSavingNonPostEntityChanges:N.isSavingNonPostEntityChanges(),isScheduled:N.isCurrentPostScheduled(),hasPublishAction:!!N.getCurrentPost()?._links?.["wp:action-publish"],showIconLabels:U("core","showIconLabels"),postStatus:N.getEditedPostAttribute("status"),postStatusHasChanged:!!N.getPostEdits()?.status,postType:N.getCurrentPostType()}},[e]),y=v==="pending",{savePost:w}=(0,q3.useDispatch)(R),_=(0,Y3.usePrevious)(u);if((0,K3.useEffect)(()=>{let P;return _&&!u&&(r(!0),P=setTimeout(()=>{r(!1)},1e3)),()=>clearTimeout(P)},[u]),S===vl||!h&&y)return null;let x=!["pending","draft","auto-draft"].includes(v)&&CW.map(({value:P})=>P).includes(v);if(l||m||x||b&&["pending","draft"].includes(v))return null;let E=y?(0,ny.__)("Save as pending"):(0,ny.__)("Save draft"),O=(0,ny.__)("Save"),A=t||!s&&!i,C=u||A,I=u||A||!c||d||f,k;return u?k=n?(0,ny.__)("Autosaving"):(0,ny.__)("Saving"):A?k=(0,ny.__)("Saved"):o?k=E:g&&(k=O),(0,Z3.jsxs)(G3.Button,{className:c||u?Q({"editor-post-save-draft":!C,"editor-post-saved-state":C,"is-saving":u,"is-autosaving":n,"is-saved":A,[(0,G3.__unstableGetAnimateClassName)({type:"loading"})]:u}):void 0,onClick:I?void 0:()=>w(),shortcut:I?void 0:V_e.displayShortcut.primary("s"),variant:"tertiary",size:"compact",icon:o?void 0:T4,label:k||E,"aria-disabled":I,children:[C&&(0,Z3.jsx)(hn,{icon:A?To:P4}),k]})}var z_e=a(G(),1);function Q3({children:e}){return(0,z_e.useSelect)(r=>r(R).getCurrentPost()._links?.["wp:action-publish"]??!1,[])?e:null}var J3=a(W(),1),GS=a(V(),1),$3=a(H(),1),H_e=a(G(),1);var WS=a(T(),1);function e6(){let[e,t]=(0,$3.useState)(null),r=(0,H_e.useSelect)(s=>s(R).getCurrentPostType(),[]),o=(0,$3.useMemo)(()=>({anchor:e,"aria-label":(0,GS.__)("Change publish date"),placement:"left-start",offset:36,shift:!0}),[e]),n=jS(),i=jS({full:!0});return xi.includes(r)?null:(0,WS.jsx)(Q3,{children:(0,WS.jsx)(fr,{label:(0,GS.__)("Publish"),ref:t,children:(0,WS.jsx)(J3.Dropdown,{popoverProps:o,focusOnMount:!0,className:"editor-post-schedule__panel-dropdown",contentClassName:"editor-post-schedule__dialog",renderToggle:({onToggle:s,isOpen:l})=>(0,WS.jsx)(J3.Button,{size:"compact",className:"editor-post-schedule__dialog-toggle",variant:"tertiary",tooltipPosition:"middle left",onClick:s,"aria-label":(0,GS.sprintf)((0,GS.__)("Change date: %s"),n),label:i,showTooltip:n!==i,"aria-expanded":l,children:n}),renderContent:({onClose:s})=>(0,WS.jsx)(BS,{onClose:s})})})})}var t6=a(W(),1),YS=a(V(),1),r6=a(G(),1),U_e=a(H(),1),W_e=a(Va(),1);var iy=a(T(),1);function G_e(){(0,W_e.default)("wp.editor.PostSwitchToDraftButton",{since:"6.7",version:"6.9"});let[e,t]=(0,U_e.useState)(!1),{editPost:r,savePost:o}=(0,r6.useDispatch)(R),{isSaving:n,isPublished:i,isScheduled:s}=(0,r6.useSelect)(f=>{let{isSavingPost:m,isCurrentPostPublished:h,isCurrentPostScheduled:g}=f(R);return{isSaving:m(),isPublished:h(),isScheduled:g()}},[]),l=n||!i&&!s,c,u;i?(c=(0,YS.__)("Are you sure you want to unpublish this post?"),u=(0,YS.__)("Unpublish")):s&&(c=(0,YS.__)("Are you sure you want to unschedule this post?"),u=(0,YS.__)("Unschedule"));let d=()=>{t(!1),r({status:"draft"}),o()};return(0,iy.jsxs)(iy.Fragment,{children:[(0,iy.jsx)(t6.Button,{__next40pxDefaultSize:!0,className:"editor-post-switch-to-draft",onClick:()=>{l||t(!0)},"aria-disabled":l,variant:"secondary",style:{flexGrow:"1",justifyContent:"center"},children:(0,YS.__)("Switch to draft")}),(0,iy.jsx)(t6.__experimentalConfirmDialog,{isOpen:e,onConfirm:d,onCancel:()=>t(!1),confirmButtonText:u,children:c})]})}var Y_e=a(G(),1),mE=a(V(),1);var EW=a(T(),1);function o6(){let{syncStatus:e,postType:t}=(0,Y_e.useSelect)(r=>{let{getEditedPostAttribute:o}=r(R);return{syncStatus:o("meta")?.wp_pattern_sync_status==="unsynced"?"unsynced":o("wp_pattern_sync_status"),postType:o("type")}});return t!=="wp_block"?null:(0,EW.jsx)(fr,{label:(0,mE.__)("Sync status"),children:(0,EW.jsx)("div",{className:"editor-post-sync-status__value",children:e==="unsynced"?(0,mE._x)("Not synced","pattern (singular)"):(0,mE._x)("Synced","pattern (singular)")})})}var q_e=a(H(),1),K_e=a(G(),1),Z_e=a(oe(),1);var PW=a(T(),1),p$e=e=>e;function h$e({taxonomyWrapper:e=p$e}){let{postType:t,taxonomies:r}=(0,K_e.useSelect)(n=>({postType:n(R).getCurrentPostType(),taxonomies:n(Z_e.store).getEntityRecords("root","taxonomy")}),[]);return(r??[]).filter(n=>n.types.includes(t)&&n.visibility?.show_ui).map(n=>{let i=n.hierarchical?O3:k3;return(0,PW.jsx)(q_e.Fragment,{children:e((0,PW.jsx)(i,{slug:n.slug}),n)},`taxonomy-${n.slug}`)})}var qS=h$e;var X_e=a(G(),1),Q_e=a(oe(),1);function n6({children:e}){return(0,X_e.useSelect)(r=>{let o=r(R).getCurrentPostType();return r(Q_e.store).getEntityRecords("root","taxonomy")?.some(i=>i.types.includes(o))},[])?e:null}var J_e=a(W(),1),i6=a(G(),1);var pE=a(T(),1);function g$e({taxonomy:e,children:t}){let r=e?.slug,o=r?`taxonomy-panel-${r}`:"",{isEnabled:n,isOpened:i}=(0,i6.useSelect)(c=>{let{isEditorPanelEnabled:u,isEditorPanelOpened:d}=c(R);return{isEnabled:r?u(o):!1,isOpened:r?d(o):!1}},[o,r]),{toggleEditorPanelOpened:s}=(0,i6.useDispatch)(R);if(!n)return null;let l=e?.labels?.menu_name;return l?(0,pE.jsx)(J_e.PanelBody,{title:l,opened:i,onToggle:()=>s(o),children:t}):null}function s6(){return(0,pE.jsx)(n6,{children:(0,pE.jsx)(qS,{taxonomyWrapper:(e,t)=>(0,pE.jsx)(g$e,{taxonomy:t,children:e})})})}var bxe=a(AW(),1),KS=a(H(),1),OW=a(V(),1),yxe=a(oe(),1),u6=a(G(),1),wxe=a(ke(),1);var gxe=1e3;function vxe(e,t){if(Math.max(e.length,t.length)<=gxe)return OH(e,t);let o=0,n=Math.min(e.length,t.length);for(;o<n&&e[o]===t[o];)o++;let i=e.length,s=t.length;for(;i>o&&s>o&&e[i-1]===t[s-1];)i--,s--;let l=e.slice(o,i),c=t.slice(o,s),u=Math.max(l.length,c.length),d;return u<=gxe?d=OH(l,c):d=Oge(l,c),o>0&&d.unshift({value:e.slice(0,o)}),i<e.length&&d.push({value:e.slice(i)}),d}function P$e(e,t){return Math.max(0,Math.min(t.length,e))}function k$e(e,t,r){let o=e.slice(0,r),n=1,i=o.length,s;for(;n<=i;){let l=Math.floor((n+i)/2),c=t.indexOf(o.slice(o.length-l));c===-1?i=l-1:(s=c+l,n=l+1)}return s}function IW(e,t,r,o){let n=0,i=0,s=e;for(let l=0;l<t.length;l++){let c=t[l];if(!c.added&&!c.removed){n+=c.value.length,i+=c.value.length;continue}let u=n,d=i,f=0,m=0;for(;l<t.length&&(t[l].added||t[l].removed);)t[l].removed?f+=t[l].value.length:m+=t[l].value.length,l++;l--;let h=u+f,g=d+m;if(e<u)break;if(f===0)s+=m;else if(e<=h){let v=k$e(r.slice(u,h),o.slice(d,g),e-u);s=v===void 0?g:d+v;break}else s+=m-f;n+=f,i+=m}return P$e(s,o)}var Qh=a(T(),1);function gE(){let e=(0,wxe.useInstanceId)(gE),t=(0,KS.useRef)(),r=(0,KS.useRef)(),o=(0,KS.useRef)(),{value:n,type:i,id:s}=(0,u6.useSelect)(u=>{let{getCurrentPostType:d,getCurrentPostId:f,getEditedPostContent:m}=u(R);return{value:m(),type:d(),id:f()}},[]),{editEntityRecord:l}=(0,u6.useDispatch)(yxe.store);(0,KS.useLayoutEffect)(()=>{let u=t.current,d=r.current;if(r.current=n,!u||d===void 0||d===n||!o.current)return;let{selectionStart:f,selectionEnd:m,selectionDirection:h}=o.current,g=vxe(d,n),v=IW(f,g,d,n),b=IW(m,g,d,n);u.setSelectionRange(v,b,h),o.current={selectionStart:v,selectionEnd:b,selectionDirection:h}},[n]);let c=u=>{let{selectionStart:d,selectionEnd:f,selectionDirection:m}=u.target;o.current={selectionStart:d,selectionEnd:f,selectionDirection:m}};return(0,Qh.jsxs)(Qh.Fragment,{children:[(0,Qh.jsx)(Ut,{render:(0,Qh.jsx)("label",{htmlFor:`post-content-${e}`}),children:(0,OW.__)("Type text or HTML")}),(0,Qh.jsx)(bxe.default,{autoComplete:"off",dir:"auto",ref:t,value:n,onChange:u=>{c(u),r.current=u.target.value,l("postType",i,s,{content:u.target.value,blocks:void 0,selection:void 0})},onFocus:c,onMouseUp:c,onKeyUp:c,className:"editor-post-text-editor",id:`post-content-${e}`,placeholder:(0,OW.__)("Start writing with text or HTML")})]})}var _xe=a(V(),1),XS=a(H(),1),xxe=a(Lt(),1),v6=a(G(),1),NW=a(pe(),1),Cxe=a(go(),1),Txe=a(kt(),1),QS=a(CT(),1),Exe=a(ke(),1),MW=a(Pb(),1);var d6="wp-block wp-block-post-title block-editor-block-list__block editor-post-title editor-post-title__input rich-text",f6=/[\r\n]+/g;var ZS=a(H(),1),Sxe=a(G(),1);function m6(e){let t=(0,ZS.useRef)(),{isCleanNewPost:r}=(0,Sxe.useSelect)(o=>{let{isCleanNewPost:n}=o(R);return{isCleanNewPost:n()}},[]);return(0,ZS.useImperativeHandle)(e,()=>({focus:()=>{t?.current?.focus()}})),(0,ZS.useEffect)(()=>{if(!t.current)return;let{defaultView:o}=t.current.ownerDocument,{name:n,parent:i}=o,s=n==="editor-canvas"?i.document:o.document,{activeElement:l,body:c}=s;r&&(!l||c===l)&&t.current.focus()},[r]),{ref:t}}var p6=a(G(),1);function h6(){let{editPost:e}=(0,p6.useDispatch)(R),{title:t}=(0,p6.useSelect)(o=>{let{getEditedPostAttribute:n}=o(R);return{title:n("title")}},[]);function r(o){e({title:o})}return{title:t,setTitle:r}}var g6=a(T(),1),{useRichText:R$e}=Y(QS.privateApis),A$e=(0,XS.forwardRef)((e,t)=>{let{placeholder:r,isEditingContentOnlySection:o,isPreview:n}=(0,v6.useSelect)(k=>{let{getSettings:P,getEditedContentOnlySection:N}=Y(k(NW.store)),{titlePlaceholder:U,isPreviewMode:F}=P();return{placeholder:U,isEditingContentOnlySection:!!N(),isPreview:F}},[]),[i,s]=(0,XS.useState)(!1),{ref:l}=m6(t),{title:c,setTitle:u}=h6(),[d,f]=(0,XS.useState)({}),{clearSelectedBlock:m,insertBlocks:h,insertDefaultBlock:g}=(0,v6.useDispatch)(NW.store),v=(0,xxe.decodeEntities)(r)||(0,_xe.__)("Add title"),{value:b,onChange:S,ref:y}=R$e({value:c,onChange(k){u(k.replace(f6," "))},placeholder:v,selectionStart:d.start,selectionEnd:d.end,onSelectionChange(k,P){f(N=>{let{start:U,end:F}=N;return U===k&&F===P?N:{start:k,end:P}})},__unstableDisableFormats:!1});function w(k){h(k,0)}function _(){s(!0),m()}function x(){s(!1),f({})}function E(){g(void 0,void 0,0)}function O(k){k.keyCode===Cxe.ENTER&&(k.preventDefault(),E())}function A(k){let P=k.clipboardData,N="",U="";try{N=P.getData("text/plain"),U=P.getData("text/html")}catch{return}let F=(0,Txe.pasteHandler)({HTML:U,plainText:N});if(k.preventDefault(),!!F.length)if(typeof F!="string"){let[D]=F;if(!c&&(D.name==="core/heading"||D.name==="core/paragraph")){let B=(0,MW.__unstableStripHTML)(D.attributes.content);u(B),w(F.slice(1))}else w(F)}else{let D=(0,MW.__unstableStripHTML)(F);S((0,QS.insert)(b,(0,QS.create)({html:D})))}}let C=Q(d6,{"is-selected":i}),I=o?{opacity:.2}:void 0;return(0,g6.jsx)("h1",{ref:(0,Exe.useMergeRefs)([y,l]),contentEditable:!o&&!n,className:C,"aria-label":v,role:"textbox","aria-multiline":"true",onFocus:_,onBlur:x,onKeyDown:O,onPaste:A,style:I})}),b6=(0,XS.forwardRef)((e,t)=>(0,g6.jsx)(oo,{supportKeys:"title",children:(0,g6.jsx)(A$e,{ref:t})}));var Pxe=a(W(),1),kxe=a(V(),1),Rxe=a(Lt(),1),Axe=a(G(),1),Ixe=a(pe(),1),y6=a(H(),1);var Oxe=a(T(),1);function I$e(e,t){let{placeholder:r}=(0,Axe.useSelect)(h=>{let{getSettings:g}=h(Ixe.store),{titlePlaceholder:v}=g();return{placeholder:v}},[]),[o,n]=(0,y6.useState)(!1),{title:i,setTitle:s}=h6(),{ref:l}=m6(t);function c(h){s(h.replace(f6," "))}function u(){n(!0)}function d(){n(!1)}let f=Q(d6,{"is-selected":o,"is-raw-text":!0}),m=(0,Rxe.decodeEntities)(r)||(0,kxe.__)("Add title");return(0,Oxe.jsx)(Pxe.TextareaControl,{ref:l,value:i,onChange:c,onFocus:u,onBlur:d,label:r,className:f,placeholder:m,hideLabelFromVision:!0,autoComplete:"off",dir:"auto",rows:1})}var w6=(0,y6.forwardRef)(I$e);var JS=a(V(),1),_6=a(W(),1),$S=a(G(),1),Fxe=a(H(),1);var Nxe=a(G(),1),Mxe=a(oe(),1);function S6({children:e}){let{canTrashPost:t}=(0,Nxe.useSelect)(r=>{let{isEditedPostNew:o,getCurrentPostId:n,getCurrentPostType:i}=r(R),{canUser:s}=r(Mxe.store),l=i(),c=n(),u=o(),d=c?s("delete",{kind:"postType",name:l,id:c}):!1;return{canTrashPost:(!u||c)&&d&&!FY.includes(l)}},[]);return t?e:null}var vE=a(T(),1);function e_({onActionPerformed:e}){let t=(0,$S.useRegistry)(),{isNew:r,isDeleting:o,postId:n,title:i}=(0,$S.useSelect)(d=>{let f=d(R);return{isNew:f.isEditedPostNew(),isDeleting:f.isDeletingPost(),postId:f.getCurrentPostId(),title:f.getCurrentPostAttribute("title")}},[]),{trashPost:s}=(0,$S.useDispatch)(R),[l,c]=(0,Fxe.useState)(!1);if(r||!n)return null;let u=async()=>{c(!1),await s();let d=await t.resolveSelect(R).getCurrentPost();e?.("move-to-trash",[d])};return(0,vE.jsxs)(S6,{children:[(0,vE.jsx)(_6.Button,{__next40pxDefaultSize:!0,className:"editor-post-trash",isDestructive:!0,variant:"secondary",isBusy:o,"aria-disabled":o,onClick:o?void 0:()=>c(!0),children:(0,JS.__)("Move to trash")}),(0,vE.jsx)(_6.__experimentalConfirmDialog,{isOpen:l,onConfirm:u,onCancel:()=>c(!1),confirmButtonText:(0,JS.__)("Move to trash"),size:"small",children:(0,JS.sprintf)((0,JS.__)('Are you sure you want to move "%s" to the trash?'),i)})]})}var bE=a(G(),1),yE=a(uo(),1),x6=a(H(),1),Dxe=a(pe(),1),sy=a(V(),1),Ra=a(W(),1),Lxe=a(Rt(),1);var Bxe=a(oe(),1),C6=a(ke(),1);var wo=a(T(),1);function wE({onClose:e}){let{isEditable:t,postSlug:r,postLink:o,permalinkPrefix:n,permalinkSuffix:i,permalink:s}=(0,bE.useSelect)(h=>{let g=h(R).getCurrentPost(),v=h(R).getCurrentPostType(),b=h(Bxe.store).getPostType(v),S=h(R).getPermalinkParts(),y=g?._links?.["wp:action-publish"]??!1;return{isEditable:h(R).isPermalinkEditable()&&y,postSlug:(0,yE.safeDecodeURIComponent)(h(R).getEditedPostSlug()),viewPostLabel:b?.labels?.view_item,postLink:g.link,permalinkPrefix:S?.prefix,permalinkSuffix:S?.suffix,permalink:(0,yE.safeDecodeURIComponent)(h(R).getPermalink())}},[]),{editPost:l}=(0,bE.useDispatch)(R),{createNotice:c}=(0,bE.useDispatch)(Lxe.store),[u,d]=(0,x6.useState)(!1),f=(0,C6.useCopyToClipboard)(s,()=>{c("info",(0,sy.__)("Copied Permalink to clipboard."),{isDismissible:!0,type:"snackbar"})}),m="editor-post-url__slug-description-"+(0,C6.useInstanceId)(wE);return(0,wo.jsxs)("div",{className:"editor-post-url",children:[(0,wo.jsx)(Dxe.__experimentalInspectorPopoverHeader,{title:(0,sy.__)("Slug"),onClose:e}),(0,wo.jsxs)(Ra.__experimentalVStack,{spacing:3,children:[t&&(0,wo.jsx)("p",{className:"editor-post-url__intro",children:(0,x6.createInterpolateElement)((0,sy.__)("<span>Customize the last part of the Permalink.</span> <a>Learn more.</a>"),{span:(0,wo.jsx)("span",{id:m}),a:(0,wo.jsx)(Ra.ExternalLink,{href:(0,sy.__)("https://wordpress.org/documentation/article/page-post-settings-sidebar/#permalink")})})}),(0,wo.jsxs)("div",{children:[t&&(0,wo.jsxs)(wo.Fragment,{children:[(0,wo.jsx)(Ra.__experimentalInputControl,{__next40pxDefaultSize:!0,prefix:(0,wo.jsx)(Ra.__experimentalInputControlPrefixWrapper,{children:"/"}),suffix:(0,wo.jsx)(Ra.__experimentalInputControlSuffixWrapper,{variant:"control",children:(0,wo.jsx)(Ra.Button,{icon:ex,ref:f,size:"small",label:"Copy"})}),label:(0,sy.__)("Slug"),hideLabelFromVision:!0,value:u?"":r,autoComplete:"off",spellCheck:"false",type:"text",className:"editor-post-url__input",onChange:h=>{if(l({slug:h}),!h){u||d(!0);return}u&&d(!1)},onBlur:h=>{l({slug:(0,yE.cleanForSlug)(h.target.value)}),u&&d(!1)},"aria-describedby":m}),(0,wo.jsxs)("p",{className:"editor-post-url__permalink",children:[(0,wo.jsx)("span",{className:"editor-post-url__permalink-visual-label",children:(0,sy.__)("Permalink:")}),(0,wo.jsxs)(Ra.ExternalLink,{className:"editor-post-url__link",href:o,target:"_blank",children:[(0,wo.jsx)("span",{className:"editor-post-url__link-prefix",children:n}),(0,wo.jsx)("span",{className:"editor-post-url__link-slug",children:r}),(0,wo.jsx)("span",{className:"editor-post-url__link-suffix",children:i})]})]})]}),!t&&(0,wo.jsx)(Ra.ExternalLink,{className:"editor-post-url__link",href:o,target:"_blank",children:o})]})]})]})}var Vxe=a(G(),1),jxe=a(oe(),1);function T6({children:e}){return(0,Vxe.useSelect)(r=>{let o=r(R).getCurrentPostType();return!(!r(jxe.store).getPostType(o)?.viewable||!r(R).getCurrentPost().link||!r(R).getPermalinkParts())},[])?e:null}var zxe=a(G(),1),E6=a(uo(),1);function Hxe(){return FW()}function FW(){let e=(0,zxe.useSelect)(t=>t(R).getPermalink(),[]);return(0,E6.filterURLForDisplay)((0,E6.safeDecodeURIComponent)(e))}var P6=a(H(),1),k6=a(G(),1),r_=a(W(),1),t_=a(V(),1),Uxe=a(uo(),1),Wxe=a(oe(),1);var dl=a(T(),1);function R6(){let{isFrontPage:e}=(0,k6.useSelect)(i=>{let{getCurrentPostId:s}=i(R),{getEditedEntityRecord:l,canUser:c}=i(Wxe.store),u=c("read",{kind:"root",name:"site"})?l("root","site"):void 0,d=s();return{isFrontPage:u?.page_on_front===d}},[]),[t,r]=(0,P6.useState)(null),o=(0,P6.useMemo)(()=>({anchor:t,placement:"left-start",offset:36,shift:!0}),[t]),n=e?(0,t_.__)("Link"):(0,t_.__)("Slug");return(0,dl.jsx)(T6,{children:(0,dl.jsxs)(fr,{label:n,ref:r,children:[!e&&(0,dl.jsx)(r_.Dropdown,{popoverProps:o,className:"editor-post-url__panel-dropdown",contentClassName:"editor-post-url__panel-dialog",focusOnMount:!0,renderToggle:({isOpen:i,onToggle:s})=>(0,dl.jsx)(O$e,{isOpen:i,onClick:s}),renderContent:({onClose:i})=>(0,dl.jsx)(wE,{onClose:i})}),e&&(0,dl.jsx)(N$e,{})]})})}function O$e({isOpen:e,onClick:t}){let{slug:r}=(0,k6.useSelect)(n=>({slug:n(R).getEditedPostSlug()}),[]),o=(0,Uxe.safeDecodeURIComponent)(r);return(0,dl.jsx)(r_.Button,{size:"compact",className:"editor-post-url__panel-toggle",variant:"tertiary","aria-expanded":e,"aria-label":(0,t_.sprintf)((0,t_.__)("Change link: %s"),o),onClick:t,children:(0,dl.jsx)(dl.Fragment,{children:o})})}function N$e(){let{postLink:e}=(0,k6.useSelect)(t=>{let{getCurrentPost:r}=t(R);return{postLink:r()?.link}},[]);return(0,dl.jsx)(r_.ExternalLink,{className:"editor-post-url__front-page-link",href:e,target:"_blank",children:e})}var Gxe=a(G(),1);function Yxe({render:e}){let t=(0,Gxe.useSelect)(r=>r(R).getCurrentPost()._links?.["wp:action-publish"]??!1);return e({canEdit:t})}var n1e=a(V(),1),O6=a(W(),1),i1e=a(G(),1);var s1e=a(H(),1),a1e=a(pe(),1);var gm=a(V(),1),t1e=a(G(),1),r1e=a(pe(),1);var qxe=a(G(),1),Kxe=a(V(),1),Zxe=a(g0(),1);var Xxe=a(T(),1);function o_(){let e=(0,qxe.useSelect)(r=>r(R).getEditedPostAttribute("content"),[]),t=(0,Kxe._x)("words","Word count type. Do not translate!");return(0,Xxe.jsx)("span",{className:"word-count",children:(0,Zxe.count)(e,t)})}var Qxe=a(G(),1),Jh=a(V(),1),Jxe=a(g0(),1),DW=a(H(),1);var A6=a(T(),1),M$e=189;function n_(){let e=(0,Qxe.useSelect)(n=>n(R).getEditedPostAttribute("content"),[]),t=(0,Jh._x)("words","Word count type. Do not translate!"),r=Math.round((0,Jxe.count)(e,t)/M$e),o=r===0?(0,DW.createInterpolateElement)((0,Jh.__)("<span>< 1</span> minute"),{span:(0,A6.jsx)("span",{})}):(0,DW.createInterpolateElement)((0,Jh.sprintf)((0,Jh._n)("<span>%s</span> minute","<span>%s</span> minutes",r),r),{span:(0,A6.jsx)("span",{})});return(0,A6.jsx)("span",{className:"time-to-read",children:o})}var $xe=a(G(),1),e1e=a(g0(),1);function i_(){let e=(0,$xe.useSelect)(t=>t(R).getEditedPostAttribute("content"),[]);return(0,e1e.count)(e,"characters_including_spaces")}var Yr=a(T(),1);function F$e({hasOutlineItemsDisabled:e,onRequestClose:t}){let{headingCount:r,paragraphCount:o,numberOfBlocks:n}=(0,t1e.useSelect)(i=>{let{getGlobalBlockCount:s}=i(r1e.store);return{headingCount:s("core/heading"),paragraphCount:s("core/paragraph"),numberOfBlocks:s()}},[]);return(0,Yr.jsxs)(Yr.Fragment,{children:[(0,Yr.jsx)("div",{className:"table-of-contents__wrapper",role:"note","aria-label":(0,gm.__)("Document Statistics"),tabIndex:"0",children:(0,Yr.jsxs)("ul",{role:"list",className:"table-of-contents__counts",children:[(0,Yr.jsxs)("li",{className:"table-of-contents__count",children:[(0,gm.__)("Words"),(0,Yr.jsx)(o_,{})]}),(0,Yr.jsxs)("li",{className:"table-of-contents__count",children:[(0,gm.__)("Characters"),(0,Yr.jsx)("span",{className:"table-of-contents__number",children:(0,Yr.jsx)(i_,{})})]}),(0,Yr.jsxs)("li",{className:"table-of-contents__count",children:[(0,gm.__)("Time to read"),(0,Yr.jsx)(n_,{})]}),(0,Yr.jsxs)("li",{className:"table-of-contents__count",children:[(0,gm.__)("Headings"),(0,Yr.jsx)("span",{className:"table-of-contents__number",children:r})]}),(0,Yr.jsxs)("li",{className:"table-of-contents__count",children:[(0,gm.__)("Paragraphs"),(0,Yr.jsx)("span",{className:"table-of-contents__number",children:o})]}),(0,Yr.jsxs)("li",{className:"table-of-contents__count",children:[(0,gm.__)("Blocks"),(0,Yr.jsx)("span",{className:"table-of-contents__number",children:n})]})]})}),r>0&&(0,Yr.jsxs)(Yr.Fragment,{children:[(0,Yr.jsx)("hr",{}),(0,Yr.jsx)("h2",{className:"table-of-contents__title",children:(0,gm.__)("Document Outline")}),(0,Yr.jsx)(fS,{onSelect:t,hasOutlineItemsDisabled:e})]})]})}var o1e=F$e;var I6=a(T(),1);function D$e({hasOutlineItemsDisabled:e,repositionDropdown:t,...r},o){let n=(0,i1e.useSelect)(i=>!!i(a1e.store).getBlockCount(),[]);return(0,I6.jsx)(O6.Dropdown,{popoverProps:{placement:t?"right":"bottom"},className:"table-of-contents",contentClassName:"table-of-contents__popover",renderToggle:({isOpen:i,onToggle:s})=>(0,I6.jsx)(O6.Button,{__next40pxDefaultSize:!0,...r,ref:o,onClick:n?s:void 0,icon:cL,"aria-expanded":i,"aria-haspopup":"true",label:(0,n1e.__)("Details"),tooltipPosition:"bottom","aria-disabled":!n}),renderContent:({onClose:i})=>(0,I6.jsx)(o1e,{onRequestClose:i,hasOutlineItemsDisabled:e})})}var l1e=(0,s1e.forwardRef)(D$e);var c1e=a(V(),1),u1e=a(H(),1),d1e=a(G(),1),f1e=a(oe(),1);function m1e(){let{__experimentalGetDirtyEntityRecords:e}=(0,d1e.useSelect)(f1e.store);return(0,u1e.useEffect)(()=>{let t=r=>{if(e().length>0)return r.returnValue=(0,c1e.__)("You have unsaved changes. If you proceed, they will be lost."),r.returnValue};return window.addEventListener("beforeunload",t),()=>{window.removeEventListener("beforeunload",t)}},[e]),null}var LW=a(Va(),1),g1e=a(H(),1),ge=a(pe(),1),v1e=a(h1e(),1),b1e=a(T(),1);function bt(e,t,r=[]){let o=(0,g1e.forwardRef)((n,i)=>((0,LW.default)("wp.editor."+e,{since:"5.3",alternative:"wp.blockEditor."+e,version:"6.2"}),(0,b1e.jsx)(t,{ref:i,...n})));return r.forEach(n=>{o[n]=bt(e+"."+n,t[n])}),o}function Rd(e,t){return(...r)=>((0,LW.default)("wp.editor."+e,{since:"5.3",alternative:"wp.blockEditor."+e,version:"6.2"}),t(...r))}var y1e=bt("RichText",ge.RichText,["Content"]);y1e.isEmpty=Rd("RichText.isEmpty",ge.RichText.isEmpty);var L$e=bt("Autocomplete",ge.Autocomplete),B$e=bt("AlignmentToolbar",ge.AlignmentToolbar),V$e=bt("BlockAlignmentToolbar",ge.BlockAlignmentToolbar),j$e=bt("BlockControls",ge.BlockControls,["Slot"]),z$e=bt("BlockEdit",ge.BlockEdit),H$e=bt("BlockEditorKeyboardShortcuts",ge.BlockEditorKeyboardShortcuts),U$e=bt("BlockFormatControls",ge.BlockFormatControls,["Slot"]),W$e=bt("BlockIcon",ge.BlockIcon),G$e=bt("BlockInspector",ge.BlockInspector),Y$e=bt("BlockList",ge.BlockList),q$e=bt("BlockMover",ge.BlockMover),K$e=bt("BlockNavigationDropdown",ge.BlockNavigationDropdown),Z$e=bt("BlockSelectionClearer",ge.BlockSelectionClearer),X$e=bt("BlockSettingsMenu",ge.BlockSettingsMenu),Q$e=bt("BlockTitle",ge.BlockTitle),J$e=bt("BlockToolbar",ge.BlockToolbar),$$e=bt("ColorPalette",ge.ColorPalette),eet=bt("ContrastChecker",ge.ContrastChecker),tet=bt("CopyHandler",ge.CopyHandler),ret=bt("DefaultBlockAppender",ge.DefaultBlockAppender),oet=bt("FontSizePicker",ge.FontSizePicker),net=bt("Inserter",ge.Inserter),iet=bt("InnerBlocks",ge.InnerBlocks,["ButtonBlockAppender","DefaultBlockAppender","Content"]),set=bt("InspectorAdvancedControls",ge.InspectorAdvancedControls,["Slot"]),aet=bt("InspectorControls",ge.InspectorControls,["Slot"]),cet=bt("PanelColorSettings",ge.PanelColorSettings),uet=bt("PlainText",ge.PlainText),det=bt("RichTextShortcut",ge.RichTextShortcut),fet=bt("RichTextToolbarButton",ge.RichTextToolbarButton),met=bt("__unstableRichTextInputEvent",ge.__unstableRichTextInputEvent),pet=bt("MediaPlaceholder",ge.MediaPlaceholder),het=bt("MediaUpload",ge.MediaUpload),get=bt("MediaUploadCheck",ge.MediaUploadCheck),vet=bt("MultiSelectScrollIntoView",ge.MultiSelectScrollIntoView),bet=bt("NavigableToolbar",ge.NavigableToolbar),yet=bt("ObserveTyping",ge.ObserveTyping),wet=bt("SkipToSelectedBlock",ge.SkipToSelectedBlock),_et=bt("URLInput",ge.URLInput),xet=bt("URLInputButton",ge.URLInputButton),Cet=bt("URLPopover",ge.URLPopover),Tet=bt("Warning",ge.Warning),Eet=bt("WritingFlow",ge.WritingFlow),Pet=Rd("createCustomColorsHOC",ge.createCustomColorsHOC),ket=Rd("getColorClassName",ge.getColorClassName),Ret=Rd("getColorObjectByAttributeValues",ge.getColorObjectByAttributeValues),Aet=Rd("getColorObjectByColorValue",ge.getColorObjectByColorValue),Iet=Rd("getFontSize",ge.getFontSize),Oet=Rd("getFontSizeClass",ge.getFontSizeClass),Net=Rd("withColorContext",ge.withColorContext),Met=Rd("withColors",ge.withColors),Fet=Rd("withFontSizes",ge.withFontSizes);var Det=tS,Let=tS;function Bet(e=[]){return e.push({...MN},{...FN}),e}(0,w1e.addFilter)("editor.Autocomplete.completers","editor/autocompleters/set-default-completers",Bet);var S1e=a(H(),1),BW=a(An(),1),_1e=a(Va(),1),N6=a(Wm(),1);var s_=a(T(),1),{MediaUploadModal:Vet}=Y(N6.privateApis),jet=class extends S1e.Component{constructor(e){super(e),this.state={isOpen:!1},this.openModal=this.openModal.bind(this),this.closeModal=this.closeModal.bind(this)}openModal(){this.setState({isOpen:!0})}closeModal(){this.setState({isOpen:!1}),this.props.onClose?.()}render(){let{allowedTypes:e,multiple:t,value:r,onSelect:o,title:n,modalClass:i,render:s}=this.props,{isOpen:l}=this.state;return(0,s_.jsxs)(s_.Fragment,{children:[s({open:this.openModal}),(0,s_.jsx)(Vet,{allowedTypes:e,multiple:t,value:r,onSelect:c=>{o(c),this.closeModal()},onClose:this.closeModal,title:n,isOpen:l,modalClass:i})]})}};window.__experimentalDataViewsMediaModal?(0,BW.addFilter)("editor.MediaUpload","core/editor/components/media-upload",()=>((0,_1e.default)("Extending MediaUpload as a class component",{since:"7.0",version:"7.2",hint:"MediaUpload will become a function component in WordPress 7.2 Please update any custom implementations to use function components instead."}),jet)):(0,BW.addFilter)("editor.MediaUpload","core/editor/components/media-upload",()=>N6.MediaUpload);var C1e=a(An(),1),T1e=a(mc(),1),E1e=a(ke(),1),M6=a(pe(),1),VW=a(G(),1),P1e=a(kt(),1);var ru=a(T(),1),{PatternOverridesControls:zet,ResetOverridesControl:Het,PATTERN_TYPES:Uet,PATTERN_SYNC_TYPES:x1e}=Y(T1e.privateApis),Wet=(0,E1e.createHigherOrderComponent)(e=>t=>{let r=(0,VW.useSelect)(o=>{let{__experimentalBlockBindingsSupportedAttributes:n}=o(M6.store).getSettings();return!!n?.[t.name]},[t.name]);return(0,ru.jsxs)(ru.Fragment,{children:[(0,ru.jsx)(e,{...t},"edit"),t.isSelected&&r&&(0,ru.jsx)(Get,{...t})]})},"withPatternOverrideControls");function Get(e){let t=(0,M6.useBlockEditingMode)(),{hasPatternOverridesSource:r,isEditingSyncedPattern:o}=(0,VW.useSelect)(c=>{let{getCurrentPostType:u,getEditedPostAttribute:d}=c(R);return{hasPatternOverridesSource:!!(0,P1e.getBlockBindingsSource)("core/pattern-overrides"),isEditingSyncedPattern:u()===Uet.user&&d("meta")?.wp_pattern_sync_status!==x1e.unsynced&&d("wp_pattern_sync_status")!==x1e.unsynced}},[]),n=e.attributes.metadata?.bindings,i=!!n&&Object.values(n).some(c=>c.source==="core/pattern-overrides"),s=o&&t==="default",l=!o&&!!e.attributes.metadata?.name&&t!=="disabled"&&i;return r?(0,ru.jsxs)(ru.Fragment,{children:[s&&(0,ru.jsx)(zet,{...e}),l&&(0,ru.jsx)(Het,{...e})]}):null}(0,C1e.addFilter)("editor.BlockEdit","core/editor/with-pattern-override-controls",Wet);var k1e=a(An(),1),R1e=a(ke(),1),A1e=a(H(),1),jW=a(V(),1),a_=a(pe(),1),F6=a(W(),1),I1e=a(G(),1),Ad=a(T(),1),Yet=["core/navigation-link","core/navigation-submenu"];function qet({attributes:e}){let{kind:t,id:r,type:o}=e,n=(0,a_.useBlockEditingMode)(),i=(0,I1e.useSelect)(l=>l(a_.store).getSettings().onNavigateToEntityRecord,[]),s=(0,A1e.useCallback)(()=>{t==="post-type"&&o==="page"&&r&&i&&i({postId:r,postType:o})},[t,r,o,i]);return t!=="post-type"||o!=="page"||!r||!i||n!=="contentOnly"?null:(0,Ad.jsx)(a_.__unstableBlockToolbarLastItem,{children:(0,Ad.jsx)(F6.ToolbarGroup,{children:(0,Ad.jsx)(F6.ToolbarButton,{name:"view",title:(0,jW.__)("View"),onClick:s,children:(0,jW.__)("View")})})})}var Ket=(0,R1e.createHigherOrderComponent)(e=>t=>{let r=Yet.includes(t.name);return(0,Ad.jsxs)(Ad.Fragment,{children:[(0,Ad.jsx)(e,{...t},"edit"),t.isSelected&&r&&(0,Ad.jsx)(qet,{...t})]})},"withNavigationViewButton");(0,k1e.addFilter)("editor.BlockEdit","core/editor/with-navigation-view-button",Ket);var O1e=a(An(),1),N1e=a(ke(),1),M1e=a(H(),1),zW=a(V(),1),l_=a(pe(),1),D6=a(W(),1),$h=a(G(),1);var Id=a(T(),1),Zet="core/navigation",Xet="core/template-part",Qet="edit-post/block";function Jet({clientId:e}){let t=(0,$h.useRegistry)(),{selectBlock:r,flashBlock:o}=(0,$h.useDispatch)(l_.store),{requestInspectorTab:n}=Y((0,$h.useDispatch)(l_.store)),{enableComplementaryArea:i}=(0,$h.useDispatch)(ze),{hasNavigationBlocks:s,firstNavigationBlockId:l,isNavigationEditable:c}=(0,$h.useSelect)(d=>{let{getClientIdsOfDescendants:f,getBlockName:m,getBlockEditingMode:h}=d(l_.store),v=f(e).filter(y=>m(y)===Zet),b=v.length>0,S=b?v[0]:null;return{hasNavigationBlocks:b,firstNavigationBlockId:S,isNavigationEditable:h(S)!=="disabled"}},[e]),u=(0,M1e.useCallback)(()=>{l&&t.batch(()=>{r(l),o(l,500),i("core",Qet),n("list",{openPanel:l})})},[l,t,r,o,i,n]);return!s||!c?null:(0,Id.jsx)(l_.__unstableBlockToolbarLastItem,{children:(0,Id.jsx)(D6.ToolbarGroup,{children:(0,Id.jsx)(D6.ToolbarButton,{label:(0,zW.__)("Edit navigation"),onClick:u,children:(0,zW.__)("Edit navigation")})})})}var $et=(0,N1e.createHigherOrderComponent)(e=>t=>{let r=t.name===Xet;return(0,Id.jsxs)(Id.Fragment,{children:[(0,Id.jsx)(e,{...t},"edit"),t.isSelected&&r&&(0,Id.jsx)(Jet,{clientId:t.clientId})]})},"withTemplatePartNavigationEditButton");(0,O1e.addFilter)("editor.BlockEdit","core/editor/with-template-part-navigation-edit-button",$et);var L1e=a(An(),1),B1e=a(ke(),1),eg=a(pe(),1),SE=a(W(),1),vm=a(V(),1),bm=a(kt(),1),B6=a(H(),1),c_=a(G(),1),V1e=a(Rt(),1),j1e=a(oe(),1);function HW(e,t,r){return!e||typeof e!="object"||t.reduce((o,n,i)=>(o[n]===void 0&&(Number.isInteger(t[i+1])?o[n]=[]:o[n]={}),i===t.length-1&&(o[n]=r),o[n]),e),e}var Ql=a(T(),1),{cleanEmptyObject:ett}=Y(eg.privateApis),F1e={...bm.__EXPERIMENTAL_STYLE_PROPERTY,blockGap:{value:["spacing","blockGap"]}},ttt={"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"},rtt={"border.color":"borderColor","color.background":"backgroundColor","color.text":"textColor","color.gradient":"gradient","typography.fontSize":"fontSize","typography.fontFamily":"fontFamily"},ott=["border","color","spacing","typography"],D1e=(e,t)=>{let r=e;return t.forEach(o=>{r=r?.[o]}),r},ntt=["borderColor","borderWidth","borderStyle"],z1e=["top","right","bottom","left"];function itt(e,t,r){if(!e&&!t)return[];let o=[...L6("top",e,r),...L6("right",e,r),...L6("bottom",e,r),...L6("left",e,r)],{color:n,style:i,width:s}=e||{};return(t||n||s)&&!i&&z1e.forEach(c=>{r?.[c]?.style||o.push({path:["border",c,"style"],value:"solid"})}),o}function L6(e,t,r){if(!t?.[e]||r?.[e]?.style)return[];let{color:o,style:n,width:i}=t[e];return!(o||i)||n?[]:[{path:["border",e,"style"],value:"solid"}]}function stt(e,t,r){let o=(0,c_.useSelect)(i=>Y(i(bm.store)).getSupportedStyles(e),[e]),n=r?.styles?.blocks?.[e];return(0,B6.useMemo)(()=>{let i=o.flatMap(s=>{if(!F1e[s])return[];let{value:l}=F1e[s],c=l.join("."),u=t[rtt[c]],d=u?`var:preset|${ttt[c]}|${u}`:D1e(t.style,l);if(s==="linkColor"){let f=d?[{path:l,value:d}]:[],m=["elements","link",":hover","color","text"],h=D1e(t.style,m);return h&&f.push({path:m,value:h}),f}if(ntt.includes(s)&&d){let f=[{path:l,value:d}];return z1e.forEach(m=>{let h=[...l];h.splice(-1,0,m),f.push({path:h,value:d})}),f}return d?[{path:l,value:d}]:[]});return itt(t.style?.border,t.borderColor,n?.border).forEach(s=>i.push(s)),i},[o,t,n])}function att({name:e,attributes:t,setAttributes:r}){let{user:o,setUser:n}=ro(),i=stt(e,t,o),{__unstableMarkNextChangeAsNotPersistent:s}=(0,c_.useDispatch)(eg.store),{createSuccessNotice:l}=(0,c_.useDispatch)(V1e.store),c=(0,B6.useCallback)(()=>{if(i.length!==0&&i.length>0){let{style:u}=t,d=structuredClone(u),f=structuredClone(o);for(let{path:h,value:g}of i)HW(d,h,void 0),HW(f,["styles","blocks",e,...h],g);let m={borderColor:void 0,backgroundColor:void 0,textColor:void 0,gradient:void 0,fontSize:void 0,fontFamily:void 0,style:ett(d)};s(),r(m),n(f,{undoIgnore:!0}),l((0,vm.sprintf)((0,vm.__)("%s styles applied."),(0,bm.getBlockType)(e).title),{type:"snackbar",actions:[{label:(0,vm.__)("Undo"),onClick(){s(),r(t),n(o,{undoIgnore:!0})}}]})}},[s,t,i,l,e,r,n,o]);return(0,Ql.jsxs)(SE.BaseControl,{className:"editor-push-changes-to-global-styles-control",help:(0,vm.sprintf)((0,vm.__)("Apply this block\u2019s typography, spacing, dimensions, and color styles to all %s blocks."),(0,bm.getBlockType)(e).title),children:[(0,Ql.jsx)(SE.BaseControl.VisualLabel,{children:(0,vm.__)("Styles")}),(0,Ql.jsx)(SE.Button,{__next40pxDefaultSize:!0,variant:"secondary",accessibleWhenDisabled:!0,disabled:i.length===0,onClick:c,children:(0,vm.__)("Apply globally")})]})}function ltt(e){let t=(0,eg.useBlockEditingMode)(),r=(0,c_.useSelect)(i=>i(j1e.store).getCurrentTheme()?.is_block_theme,[]),o=ott.some(i=>(0,bm.hasBlockSupport)(e.name,i));return t==="default"&&o&&r?(0,Ql.jsx)(eg.InspectorAdvancedControls,{children:(0,Ql.jsx)(att,{...e})}):null}var ctt=(0,B1e.createHigherOrderComponent)(e=>t=>(0,Ql.jsxs)(Ql.Fragment,{children:[(0,Ql.jsx)(e,{...t},"edit"),t.isSelected&&(0,Ql.jsx)(ltt,{...t})]}));(0,L1e.addFilter)("editor.BlockEdit","core/editor/push-changes-to-global-styles",ctt);var _E=a(W(),1),H1e=a(T(),1),UW="__experimentalMainDashboardButton",U1e=()=>{let e=(0,_E.__experimentalUseSlotFills)(UW);return!!(e&&e.length)},{Fill:utt,Slot:dtt}=(0,_E.createSlotFill)(UW),W1e=utt,ftt=()=>{let e=(0,_E.__experimentalUseSlotFills)(UW);return(0,H1e.jsx)(dtt,{bubblesVirtually:!0,fillProps:{length:e?e.length:0}})};W1e.Slot=ftt;var V6=W1e;var R2e=a(G(),1),A2e=a(oe(),1),I2e=a(W(),1),O2e=a(V(),1);var jE=a(G(),1),cg=a(V(),1),EEe=a(Nt(),1),w_=a(pe(),1),PEe=a(ke(),1),VF=a(H(),1),kEe=a(Lt(),1),REe=a(Rt(),1);var bTe=a(pe(),1),yTe=a(G(),1),IE=a(ke(),1),wTe=a(Nt(),1),STe=a(H(),1);var u_=a(pe(),1),G1e=a(H(),1),j6=a(W(),1),WW=a(V(),1);var Y1e=a(G(),1);var ym=a(T(),1),{useHasBlockToolbar:mtt}=Y(u_.privateApis);function q1e({isCollapsed:e,onToggle:t}){let{blockSelectionStart:r}=(0,Y1e.useSelect)(i=>({blockSelectionStart:i(u_.store).getBlockSelectionStart()}),[]),o=mtt(),n=!!r;return(0,G1e.useEffect)(()=>{r&&t(!1)},[r,t]),o?(0,ym.jsxs)(ym.Fragment,{children:[(0,ym.jsx)("div",{className:Q("editor-collapsible-block-toolbar",{"is-collapsed":e||!n}),children:(0,ym.jsx)(u_.BlockToolbar,{hideDragHandle:!0})}),(0,ym.jsx)(j6.Popover.Slot,{name:"block-toolbar"}),(0,ym.jsx)(j6.Button,{className:"editor-collapsible-block-toolbar__toggle",icon:e?hl:gl,onClick:()=>{t(!e)},label:e?(0,WW.__)("Show block tools"):(0,WW.__)("Hide block tools"),size:"compact"})]}):null}var K1e=a(ke(),1),z6=a(G(),1),ay=a(V(),1),Z1e=a(pe(),1),d_=a(W(),1);var GW=a(H(),1),X1e=a(fa(),1),Q1e=a(Nt(),1);var ou=a(T(),1);function ptt({className:e,disableBlockTools:t=!1}){let{setIsInserterOpened:r,setIsListViewOpened:o}=(0,z6.useDispatch)(R),{isDistractionFree:n,isInserterOpened:i,isListViewOpen:s,listViewShortcut:l,inserterSidebarToggleRef:c,listViewToggleRef:u,showIconLabels:d}=(0,z6.useSelect)(y=>{let{get:w}=y(Q1e.store),{isListViewOpened:_,getEditorMode:x,getInserterSidebarToggleRef:E,getListViewToggleRef:O}=Y(y(R)),{getShortcutRepresentation:A}=y(X1e.store);return{isInserterOpened:y(R).isInserterOpened(),isListViewOpen:_(),listViewShortcut:A("core/editor/toggle-list-view"),inserterSidebarToggleRef:E(),listViewToggleRef:O(),showIconLabels:w("core","showIconLabels"),isDistractionFree:w("core","distractionFree"),isVisualMode:x()==="visual"}},[]),f=y=>{i&&y.preventDefault()},m=(0,K1e.useViewportMatch)("wide"),h=(0,ay.__)("Document tools"),g=(0,GW.useCallback)(()=>o(!s),[o,s]),v=(0,GW.useCallback)(()=>r(!i),[i,r]),b=(0,ay._x)("Block Inserter","Generic label for block inserter button"),S=i?(0,ay.__)("Close"):(0,ay.__)("Add");return(0,ou.jsx)(Z1e.NavigableToolbar,{className:Q("editor-document-tools","edit-post-header-toolbar",e),"aria-label":h,variant:"unstyled",children:(0,ou.jsxs)("div",{className:"editor-document-tools__left",children:[!n&&(0,ou.jsx)(d_.ToolbarButton,{ref:c,className:"editor-document-tools__inserter-toggle",variant:"primary",isPressed:i,onMouseDown:f,onClick:v,disabled:t,icon:fc,label:d?S:b,showTooltip:!d,"aria-expanded":i}),(m||!d)&&(0,ou.jsxs)(ou.Fragment,{children:[(0,ou.jsx)(d_.ToolbarItem,{as:lM,showTooltip:!d,variant:d?"tertiary":void 0,size:"compact"}),(0,ou.jsx)(d_.ToolbarItem,{as:iM,showTooltip:!d,variant:d?"tertiary":void 0,size:"compact"}),!n&&(0,ou.jsx)(d_.ToolbarButton,{className:"editor-document-tools__document-overview-toggle",icon:lx,disabled:t,isPressed:s,label:(0,ay.__)("Document Overview"),onClick:g,shortcut:l,showTooltip:!d,variant:d?"tertiary":void 0,"aria-expanded":s,ref:u})]})]})})}var J1e=ptt;var xE=a(W(),1);var tg=a(T(),1),YW={distractionFreeDisabled:{y:"-50px"},distractionFreeHover:{y:0},distractionFreeHidden:{y:"-50px"},visible:{y:0},hidden:{y:0}},htt={distractionFreeDisabled:{x:"-100%"},distractionFreeHover:{x:0},distractionFreeHidden:{x:"-100%"},visible:{x:0},hidden:{x:0}};function H6({className:e,toolbar:t,center:r,settings:o}){let n=U1e();return(0,tg.jsxs)("div",{className:Q("editor-header edit-post-header",e),children:[n&&(0,tg.jsx)(xE.__unstableMotion.div,{className:"editor-header__back-button",variants:htt,transition:{type:"tween"},children:(0,tg.jsx)(V6.Slot,{})}),(0,tg.jsx)(xE.__unstableMotion.div,{variants:YW,className:"editor-header__toolbar",transition:{type:"tween"},children:t}),r&&(0,tg.jsx)(xE.__unstableMotion.div,{variants:YW,className:"editor-header__center",transition:{type:"tween"},children:r}),(0,tg.jsx)(xE.__unstableMotion.div,{variants:YW,transition:{type:"tween"},className:"editor-header__settings",children:o})]})}var So=a(V(),1),f_=a(G(),1),ZW=a(go(),1);var Od=a(W(),1),ly=a(Nt(),1);var $1e=a(W(),1),U6=a(G(),1),qW=a(V(),1),eCe=a(ke(),1),tCe=a(Rt(),1);var rCe=a(T(),1);function oCe(){let{createNotice:e}=(0,U6.useDispatch)(tCe.store),{getEditedPostContent:t}=(0,U6.useSelect)(R);function r(){return t()}function o(){e("info",(0,qW.__)("All content copied."),{isDismissible:!0,type:"snackbar"})}let n=(0,eCe.useCopyToClipboard)(r,o);return(0,rCe.jsx)($1e.MenuItem,{ref:n,children:(0,qW.__)("Copy all blocks")})}var CE=a(V(),1),W6=a(W(),1),G6=a(G(),1),nCe=a(fa(),1);var KW=a(T(),1),gtt=[{value:"visual",label:(0,CE.__)("Visual editor")},{value:"text",label:(0,CE.__)("Code editor")}];function vtt(){let{shortcut:e,isRichEditingEnabled:t,isCodeEditingEnabled:r,mode:o}=(0,G6.useSelect)(l=>({shortcut:l(nCe.store).getShortcutRepresentation("core/editor/toggle-mode"),isRichEditingEnabled:l(R).getEditorSettings().richEditingEnabled,isCodeEditingEnabled:l(R).getEditorSettings().codeEditingEnabled,mode:l(R).getEditorMode()}),[]),{switchEditorMode:n}=(0,G6.useDispatch)(R),i=o;!t&&o==="visual"&&(i="text"),!r&&o==="text"&&(i="visual");let s=gtt.map(l=>(!r&&l.value==="text"&&(l={...l,disabled:!0}),!t&&l.value==="visual"&&(l={...l,disabled:!0,info:(0,CE.__)("You can enable the visual editor in your profile settings.")}),l.value!==i&&!l.disabled?{...l,shortcut:e}:l));return(0,KW.jsx)(W6.MenuGroup,{label:(0,CE.__)("Editor"),children:(0,KW.jsx)(W6.MenuItemsChoice,{choices:s,value:i,onSelect:n})})}var iCe=vtt;var sCe=a(W(),1),aCe=a(T(),1),{Fill:lCe,Slot:btt}=(0,sCe.createSlotFill)("ToolsMoreMenuGroup");lCe.Slot=({fillProps:e})=>(0,aCe.jsx)(btt,{fillProps:e});var Y6=lCe;var cCe=a(W(),1),uCe=a(T(),1),{Fill:dCe,Slot:ytt}=(0,cCe.createSlotFill)(Symbol("ViewMoreMenuGroup"));dCe.Slot=({fillProps:e})=>(0,uCe.jsx)(ytt,{fillProps:e});var q6=dCe;var so=a(T(),1);function K6({disabled:e=!1}){let{openModal:t}=(0,f_.useDispatch)(ze),{set:r}=(0,f_.useDispatch)(ly.store),{toggleDistractionFree:o}=(0,f_.useDispatch)(R),n=(0,f_.useSelect)(s=>s(ly.store).get("core","showIconLabels"),[]),i=()=>{r("core","distractionFree",!1)};return(0,so.jsx)(so.Fragment,{children:(0,so.jsx)(Od.DropdownMenu,{icon:fo,label:(0,So.__)("Options"),popoverProps:{placement:"bottom-end",className:"more-menu-dropdown__content"},toggleProps:{showTooltip:!n,...n&&{variant:"tertiary"},tooltipPosition:"bottom",size:"compact",disabled:e},children:({onClose:s})=>(0,so.jsxs)(so.Fragment,{children:[(0,so.jsxs)(Od.MenuGroup,{label:(0,So._x)("View","noun"),children:[(0,so.jsx)(ly.PreferenceToggleMenuItem,{scope:"core",name:"fixedToolbar",onToggle:i,label:(0,So.__)("Top toolbar"),info:(0,So.__)("Access all block and document tools in a single place"),messageActivated:(0,So.__)("Top toolbar activated."),messageDeactivated:(0,So.__)("Top toolbar deactivated.")}),(0,so.jsx)(ly.PreferenceToggleMenuItem,{scope:"core",name:"distractionFree",label:(0,So.__)("Distraction free"),info:(0,So.__)("Write with calmness"),handleToggling:!1,onToggle:()=>o({createNotice:!1}),messageActivated:(0,So.__)("Distraction free mode activated."),messageDeactivated:(0,So.__)("Distraction free mode deactivated."),shortcut:ZW.displayShortcut.primaryShift("\\")}),(0,so.jsx)(ly.PreferenceToggleMenuItem,{scope:"core",name:"focusMode",label:(0,So.__)("Spotlight mode"),info:(0,So.__)("Focus on one block at a time"),messageActivated:(0,So.__)("Spotlight mode activated."),messageDeactivated:(0,So.__)("Spotlight mode deactivated.")}),(0,so.jsx)(q6.Slot,{fillProps:{onClose:s}})]}),(0,so.jsx)(iCe,{}),(0,so.jsx)(Ol.Slot,{name:"core/plugin-more-menu",label:(0,So.__)("Panels"),fillProps:{onClick:s}}),(0,so.jsxs)(Od.MenuGroup,{label:(0,So.__)("Tools"),children:[(0,so.jsx)(Od.MenuItem,{onClick:()=>t("editor/keyboard-shortcut-help"),shortcut:ZW.displayShortcut.access("h"),children:(0,So.__)("Keyboard shortcuts")}),(0,so.jsx)(oCe,{}),(0,so.jsxs)(Od.MenuItem,{icon:Gs,href:(0,So.__)("https://wordpress.org/documentation/article/wordpress-block-editor/"),target:"_blank",rel:"noopener",children:[(0,So.__)("Help"),(0,so.jsx)(Ut,{render:(0,so.jsx)("span",{}),children:(0,So.__)("(opens in a new tab)")})]}),(0,so.jsx)(Y6.Slot,{fillProps:{onClose:s}})]}),(0,so.jsx)(Od.MenuGroup,{children:(0,so.jsx)(Od.MenuItem,{onClick:()=>t("editor/preferences"),children:(0,So.__)("Preferences")})})]})})})}var mCe=a(ke(),1),Z6=a(G(),1);var pCe=a(T(),1),fCe="toggle",XW="button";function hCe({forceIsDirty:e,setEntitiesSavedStatesCallback:t}){let r,o=(0,mCe.useViewportMatch)("medium","<"),{togglePublishSidebar:n}=(0,Z6.useDispatch)(R),{hasPublishAction:i,isBeingScheduled:s,isPending:l,isPublished:c,isPublishSidebarEnabled:u,isPublishSidebarOpened:d,isScheduled:f,postStatus:m,postStatusHasChanged:h,postType:g}=(0,Z6.useSelect)(v=>({hasPublishAction:!!v(R).getCurrentPost()?._links?.["wp:action-publish"],isBeingScheduled:v(R).isEditedPostBeingScheduled(),isPending:v(R).isCurrentPostPending(),isPublished:v(R).isCurrentPostPublished(),isPublishSidebarEnabled:v(R).isPublishSidebarEnabled(),isPublishSidebarOpened:v(R).isPublishSidebarOpened(),isScheduled:v(R).isCurrentPostScheduled(),postStatus:v(R).getEditedPostAttribute("status"),postStatusHasChanged:v(R).getPostEdits()?.status,postType:v(R).getCurrentPostType()}),[]);return g===vl||c||h&&!["future","publish"].includes(m)||f&&s||l&&!i&&!o?r=XW:o||u?r=fCe:r=XW,(0,pCe.jsx)(FS,{forceIsDirty:e,isOpen:d,isToggle:r===fCe,onToggle:n,setEntitiesSavedStatesCallback:t})}var gCe=a(V(),1),vCe=a(W(),1);var bCe=a(oe(),1),yCe=a(G(),1),wCe=a(Nt(),1);var SCe=a(T(),1);function _Ce(){let{hasLoaded:e,permalink:t,isPublished:r,label:o,showIconLabels:n}=(0,yCe.useSelect)(i=>{let s=i(R).getCurrentPostType(),l=i(bCe.store).getPostType(s),{get:c}=i(wCe.store);return{permalink:i(R).getPermalink(),isPublished:i(R).isCurrentPostPublished(),label:l?.labels?.view_item,hasLoaded:!!l,showIconLabels:c("core","showIconLabels")}},[]);return!r||!t||!e?null:(0,SCe.jsx)(vCe.Button,{icon:Gs,label:o||(0,gCe.__)("View post"),href:t,target:"_blank",showTooltip:!n,size:"compact"})}var xCe=a(ke(),1),Ji=a(W(),1),Pn=a(V(),1);var TE=a(G(),1),CCe=a(oe(),1),TCe=a(Nt(),1);var QW=a(pe(),1);var zo=a(T(),1);function ECe({forceIsAutosaveable:e,disabled:t}){let{deviceType:r,homeUrl:o,isTemplate:n,isViewable:i,showIconLabels:s,isTemplateHidden:l,templateId:c,isResponsiveEditing:u}=(0,TE.useSelect)(A=>{let{getCurrentPostType:C,getCurrentTemplateId:I,getRenderingMode:k,getDeviceType:P}=Y(A(R)),{isResponsiveEditing:N}=Y(A(QW.store)),{getEntityRecord:U,getPostType:F}=A(CCe.store),{get:D}=A(TCe.store),B=C();return{deviceType:P(),homeUrl:U("root","__unstableBase")?.home,isTemplate:B==="wp_template",isViewable:F(B)?.viewable??!1,showIconLabels:D("core","showIconLabels"),isTemplateHidden:k()==="post-only",templateId:I(),isResponsiveEditing:N()}},[]),{setDeviceType:d,setRenderingMode:f,setDefaultRenderingMode:m}=Y((0,TE.useDispatch)(R)),{resetZoomLevel:h,setStyleStateViewport:g,setResponsiveEditing:v}=Y((0,TE.useDispatch)(QW.store)),b=A=>{d(A),h()},S=()=>{let A=!u;v(A),g(A?t2[r]??"default":"default")};if((0,xCe.useViewportMatch)("medium","<"))return null;let w={placement:"bottom-end"},_={className:"editor-preview-dropdown__toggle",iconPosition:"right",size:"compact",showTooltip:!s,disabled:t,accessibleWhenDisabled:t},x={"aria-label":(0,Pn.__)("View options")},E={desktop:by,mobile:Lm,tablet:wy},O=[{value:"Desktop",label:(0,Pn.__)("Desktop"),icon:by,info:u?(0,Pn.__)("Edit across all breakpoints."):(0,Pn.__)("Preview desktop viewport.")},{value:"Tablet",label:(0,Pn.__)("Tablet"),icon:wy,info:u?(0,Pn.__)("Make tablet exclusive changes."):(0,Pn.__)("Preview tablet viewport.")},{value:"Mobile",label:(0,Pn.__)("Mobile"),icon:Lm,info:u?(0,Pn.__)("Make mobile exclusive changes."):(0,Pn.__)("Preview mobile viewport.")}];return(0,zo.jsx)(Ji.DropdownMenu,{className:Q("editor-preview-dropdown",`editor-preview-dropdown--${r.toLowerCase()}`),popoverProps:w,toggleProps:_,menuProps:x,icon:E[r.toLowerCase()],label:(0,Pn.__)("View"),disableOpenOnArrowDown:t,children:({onClose:A})=>(0,zo.jsxs)(zo.Fragment,{children:[(0,zo.jsx)(Ji.MenuGroup,{children:(0,zo.jsx)(Ji.MenuItemsChoice,{choices:O,value:r,onSelect:b})}),(0,zo.jsx)(Ji.MenuGroup,{children:(0,zo.jsx)(Ji.MenuItem,{icon:u?To:void 0,isSelected:u,role:"menuitemcheckbox",onClick:S,info:(0,Pn.__)("Edits apply only to the current state."),children:(0,Pn.__)("Responsive editing")})}),n&&(0,zo.jsx)(Ji.MenuGroup,{children:(0,zo.jsxs)(Ji.MenuItem,{href:o,target:"_blank",icon:Gs,onClick:A,children:[(0,Pn.__)("View site"),(0,zo.jsx)(Ut,{render:(0,zo.jsx)("span",{}),children:(0,Pn.__)("(opens in a new tab)")})]})}),!n&&!!c&&(0,zo.jsx)(Ji.MenuGroup,{children:(0,zo.jsx)(Ji.MenuItem,{icon:l?void 0:To,isSelected:!l,role:"menuitemcheckbox",onClick:()=>{let C=l?"template-locked":"post-only";f(C),m(C),h()},children:(0,Pn.__)("Show template")})}),i&&(0,zo.jsx)(Ji.MenuGroup,{children:(0,zo.jsx)(Gh,{className:"editor-preview-dropdown__button-external",role:"menuitem",forceIsAutosaveable:e,"aria-label":(0,Pn.__)("Preview in new tab"),textContent:(0,zo.jsxs)(zo.Fragment,{children:[(0,Pn.__)("Preview in new tab"),(0,zo.jsx)(Ji.Icon,{icon:Gs})]}),onPreview:A})}),(0,zo.jsx)(Ol.Slot,{name:"core/plugin-preview-menu",fillProps:{onClick:A}})]})})}var PCe=a(W(),1),JW=a(V(),1),kCe=a(H(),1),EE=a(G(),1),$W=a(pe(),1);var eG=a(Nt(),1),X6=a(fa(),1),RCe=a(go(),1);var ACe=a(T(),1),wtt=({disabled:e})=>{let{isZoomOut:t,showIconLabels:r,isDistractionFree:o}=(0,EE.useSelect)(u=>({isZoomOut:Y(u($W.store)).isZoomOut(),showIconLabels:u(eG.store).get("core","showIconLabels"),isDistractionFree:u(eG.store).get("core","distractionFree")})),{resetZoomLevel:n,setZoomLevel:i}=Y((0,EE.useDispatch)($W.store)),{registerShortcut:s,unregisterShortcut:l}=(0,EE.useDispatch)(X6.store);return(0,kCe.useEffect)(()=>(s({name:"core/editor/zoom",category:"global",description:(0,JW.__)("Enter or exit zoom out."),keyCombination:{modifier:(0,RCe.isAppleOS)()?"primaryShift":"secondary",character:"0"}}),()=>{l("core/editor/zoom")}),[s,l]),(0,X6.useShortcut)("core/editor/zoom",()=>{t?n():i("auto-scaled")},{isDisabled:o}),(0,ACe.jsx)(PCe.Button,{accessibleWhenDisabled:!0,disabled:e,onClick:()=>{t?n():i("auto-scaled")},icon:ZL,label:(0,JW.__)("Zoom Out"),isPressed:t,size:"compact",showTooltip:!r,className:"editor-zoom-out-toggle"})},ICe=wtt;var gTe=a(W(),1),v_=a(H(),1),vTe=a(oe(),1),uF=a(V(),1);var MCe=a(W(),1),FCe=a(H(),1);var m_=a(H(),1);function OCe(e){let[t,r]=(0,m_.useState)(e),[o,n]=(0,m_.useState)(e?"loading":"idle");t!==e&&(r(e),n(e?"loading":"idle"));let i=(0,m_.useCallback)(()=>n("loaded"),[]),s=(0,m_.useCallback)(()=>n("error"),[]);return{status:o,handleLoad:i,handleError:s}}var nu=a(T(),1);JI([f5]);var NCe="#1e1e1e",Stt="#fff";function _tt({className:e,src:t,name:r,label:o,variant:n,size:i="default",borderColor:s,dimmed:l=!1,statusIndicator:c,style:u,...d}){let{status:f,handleLoad:m,handleError:h}=OCe(t),g=f==="loaded",v=n==="badge"&&!!r,b=r?r.split(/\s+/).slice(0,2).map(_=>_[0]).join("").toUpperCase():void 0,S=(0,FCe.useMemo)(()=>s&&Io(s).isReadable(NCe,{level:"AA",size:"normal"})?NCe:Stt,[s]),y={...u,...s?{"--editor-avatar-outline-color":s,"--editor-avatar-name-color":S}:{}},w=(0,nu.jsxs)("div",{className:Q("editor-avatar",e,{"has-avatar-border-color":!!s,"has-src":g,"is-badge":v,"is-small":i==="small","is-dimmed":l}),style:y,role:r?"img":void 0,"aria-label":r||void 0,...d,children:[(0,nu.jsxs)("span",{className:"editor-avatar__image",children:[t&&(0,nu.jsx)("img",{src:t,alt:"",crossOrigin:"anonymous",className:"editor-avatar__img",onLoad:m,onError:h}),!g&&b]}),l&&!!c&&(0,nu.jsx)("span",{className:"editor-avatar__status-indicator",children:(0,nu.jsx)(MCe.Icon,{icon:c})}),v&&(0,nu.jsx)("span",{className:"editor-avatar__name",children:o||r})]});return r&&(!v||o)?(0,nu.jsxs)(We.Root,{children:[(0,nu.jsx)(We.Trigger,{render:w}),(0,nu.jsx)(We.Popup,{children:r})]}):w}var wm=_tt;var DCe=a(H(),1),Q6=a(V(),1),J6=a(T(),1);function xtt({className:e,max:t=3,children:r,...o}){let n=DCe.Children.toArray(r),i=n.slice(0,t),s=n.length-t;return(0,J6.jsxs)("div",{role:"group",className:Q("editor-avatar-group",e),...o,children:[i,s>0&&(0,J6.jsx)("span",{className:"editor-avatar-group__overflow","aria-label":(0,Q6.sprintf)((0,Q6._n)("%d more collaborator","%d more collaborators",s),s),children:`+${s}`})]})}var tG=xtt;var RE=a(V(),1),$6=a(W(),1);var qCe=a(Um(),1);function Sm(e){return e?.["48"]||e?.["96"]||e?.["24"]}var VCe=a(V(),1);function jCe(e){return e.trim()}var PE=-16,Ctt=16,LCe=20,BCe=["#C36EFF","#D94145","#E4780A","#FF35EE","#879F11","#46A494","#00A2C3"];function Jl(e){return BCe[e%BCe.length]}function zCe(e,t=10){if(!e)return"";let r=(0,VCe._x)("words","Word count type. Do not translate!"),o=e.trim(),n="";if(r==="words")n=o.split(" ",t).join(" ");else if(r==="characters_excluding_spaces"){let s=o.split("",t).join(""),l=s.length-s.replaceAll(" ","").length;n=o.split("",t+l).join("")}else r==="characters_including_spaces"&&(n=o.split("",t).join(""));return n!==o?n+"\u2026":n}function rg(e){let t=e?.noteId,r=Array.isArray(t)?t:[t],o=new Set;for(let n of r){let i=Number(n);Number.isFinite(i)&&i>0&&o.add(i)}return[...o]}function HCe(e,t){let r=new Set(rg(e)),o=Number(t);return r.has(o)?e:(r.add(o),{...e,noteId:[...r]})}function kE(e){return e.find(t=>t.status==="hold")??e[0]??null}function UCe(e,t){let r=new Set(rg(e));return r.delete(Number(t)),{...e,noteId:r.size>0?[...r]:void 0}}function WCe({threads:e,selectedNoteId:t,blockRects:r,heights:o,scrollTop:n=0}){let i={},s=Math.max(0,e.findIndex(v=>v.id===t)),l=e[s];if(!l||!r[l.id])return{positions:{}};let u=r[l.id].top||0,d=o[l.id]||0;i[l.id]=PE;let f=u+PE,m=d;for(let v=s+1;v<e.length;v++){let b=e[v],S=r[b.id];if(!S)continue;let y=S.top||0,w=o[b.id]||0,_=PE,x=f+m;y<x+Ctt&&(_=x-y+LCe),i[b.id]=_,f=y+_,m=w}let h=u+PE;for(let v=s-1;v>=0;v--){let b=e[v],S=r[b.id];if(!S)continue;let y=S.top||0,w=o[b.id]||0,_=PE;y+w>h&&(_=h-y-w-LCe),i[b.id]=_,h=y+_}let g={};for(let v of e){let b=r[v.id];b&&i[v.id]!==void 0&&(g[v.id]=b.top+n+i[v.id])}return{positions:g}}function GCe(e,t,r){if(!t)return Promise.resolve(null);let o=e&&e!=="new"?`[role=treeitem][id="note-thread-${e}"]`:"[role=treeitem]:not([id])",n=r?`${o} ${r}`:o;return new Promise(i=>{if(t.querySelector(n))return i(t.querySelector(n));let s=null,l=new window.MutationObserver(()=>{t.querySelector(n)&&(clearTimeout(s),l.disconnect(),i(t.querySelector(n)))});l.observe(t,{childList:!0,subtree:!0}),s=setTimeout(()=>{l.disconnect(),i(null)},3e3)})}function $i(e,t,r){return GCe(e,t,r).then(o=>{o&&(o.focus(),o.scrollIntoView({block:"nearest"}))})}function YCe(e,t){return GCe(e,t).then(r=>{r?.scrollIntoView({block:"nearest"})})}var Aa=a(T(),1);function KCe({activeCollaborators:e,popoverAnchor:t,setIsPopoverVisible:r,cursorRegistry:o}){let n=i=>{o.scrollToCursor(i,{behavior:"smooth",block:"center",highlightDuration:2e3})&&((0,qCe.speak)((0,RE.__)("Scrolled to cursor"),"polite"),r(!1))};return(0,Aa.jsx)($6.Popover,{anchor:t,placement:"bottom",offset:8,className:"editor-collaborators-presence__list",onClose:()=>r(!1),children:(0,Aa.jsxs)("div",{className:"editor-collaborators-presence__list-content",children:[(0,Aa.jsxs)("div",{className:"editor-collaborators-presence__list-header",children:[(0,Aa.jsxs)("div",{className:"editor-collaborators-presence__list-header-title",children:[(0,RE.__)("Collaborators"),(0,Aa.jsx)("span",{children:e.length})]}),(0,Aa.jsx)("div",{className:"editor-collaborators-presence__list-header-action",children:(0,Aa.jsx)($6.Button,{__next40pxDefaultSize:!0,icon:_i,iconSize:24,label:(0,RE.__)("Close Collaborators List"),onClick:()=>r(!1)})})]}),(0,Aa.jsx)("div",{className:"editor-collaborators-presence__list-items",children:e.map(i=>{let s=i.isMe;return(0,Aa.jsxs)("button",{className:"editor-collaborators-presence__list-item",disabled:s,onClick:()=>n(i.clientId),children:[(0,Aa.jsx)(wm,{src:Sm(i.collaboratorInfo.avatar_urls),name:i.collaboratorInfo.name,borderColor:s?"var(--wp-admin-theme-color)":Jl(i.collaboratorInfo.id),dimmed:!i.isConnected}),(0,Aa.jsx)("div",{className:"editor-collaborators-presence__list-item-info",children:(0,Aa.jsx)("div",{className:"editor-collaborators-presence__list-item-name",children:s?(0,RE.__)("You"):i.collaboratorInfo.name})})]},i.clientId)})})]})})}function Ttt(e,t){e.classList.add("collaborators-overlay-cursor-highlighted"),setTimeout(()=>{e.classList.remove("collaborators-overlay-cursor-highlighted")},t)}function ZCe(){let e=new Map;return{registerCursor(t,r){e.set(t,r)},unregisterCursor(t){e.delete(t)},scrollToCursor(t,r){let o=e.get(t);return o?(o.scrollIntoView({behavior:r?.behavior??"smooth",block:r?.block??"center",inline:r?.inline??"nearest"}),r?.highlightDuration&&Ttt(o,r.highlightDuration),!0):!1},removeAll(){e.clear()}}}var hTe=a(pe(),1);var lF=a(ke(),1),iu=a(H(),1),mTe=a(V(),1);var eF="0 1px 1px rgba(0, 0, 0, 0.03), 0 1px 2px rgba(0, 0, 0, 0.02), 0 3px 3px rgba(0, 0, 0, 0.02), 0 4px 4px rgba(0, 0, 0, 0.01)",rG="9999px",oG="32px",nG="24px",tF="4px",rF="8px",iG="1px",XCe="2px",og="#fff",QCe="11px",JCe="13px",sG="499",$Ce="20px";var eTe=`
213 .editor-avatar {
214 position: relative;
215 display: inline-flex;
216 align-items: center;
217 border-radius: ${rG};
218 flex-shrink: 0;
219 box-shadow: 0 0 0 var(--wp-admin-border-width-focus, 2px) ${og}, ${eF};
220 }
221 .editor-avatar__image {
222 box-sizing: border-box;
223 position: relative;
224 width: ${oG};
225 height: ${oG};
226 border-radius: ${rG};
227 border: 0;
228 background-color: var(--wp-admin-theme-color, #3858e9);
229 overflow: hidden;
230 overflow: clip;
231 flex-shrink: 0;
232 font-size: 0;
233 color: ${og};
234 }
235 .is-small > .editor-avatar__image {
236 width: ${nG};
237 height: ${nG};
238 }
239 .has-avatar-border-color > .editor-avatar__image {
240 border: var(--wp-admin-border-width-focus, 2px) solid var(--editor-avatar-outline-color);
241 background-clip: padding-box;
242 }
243 .has-avatar-border-color > .editor-avatar__image::after {
244 content: "";
245 position: absolute;
246 inset: 0;
247 border-radius: inherit;
248 box-shadow: inset 0 0 0 var(--wp-admin-border-width-focus, 2px) ${og};
249 pointer-events: none;
250 z-index: 1;
251 }
252 .editor-avatar__img {
253 position: absolute;
254 inset: 0;
255 width: 100%;
256 height: 100%;
257 object-fit: cover;
258 border-radius: inherit;
259 opacity: 0;
260 }
261 .has-src > .editor-avatar__image > .editor-avatar__img {
262 opacity: 1;
263 }
264 .editor-avatar:not(.has-src) > .editor-avatar__image {
265 display: flex;
266 align-items: center;
267 justify-content: center;
268 font-size: ${QCe};
269 font-weight: ${sG};
270 border: 0;
271 background-clip: border-box;
272 }
273 .editor-avatar:not(.has-src) > .editor-avatar__image::after {
274 content: none;
275 }
276 .editor-avatar:not(.has-src).has-avatar-border-color > .editor-avatar__image {
277 background-color: var(--editor-avatar-outline-color);
278 }
279 .editor-avatar__name {
280 font-size: ${JCe};
281 font-weight: ${sG};
282 line-height: ${$Ce};
283 color: var(--editor-avatar-name-color, ${og});
284 min-width: 0;
285 padding-bottom: 2px; /* $grid-unit-05 / 2 */
286 overflow: hidden;
287 opacity: 0;
288 white-space: nowrap;
289 transition: opacity 0.15s cubic-bezier(0.15, 0, 0.15, 1);
290 }
291 .editor-avatar.is-badge {
292 display: inline-grid;
293 grid-template-columns: min-content 0fr;
294 column-gap: 0;
295 padding-inline-end: 0;
296 background-color: var(--wp-admin-theme-color, #3858e9);
297 transition:
298 grid-template-columns 0.3s cubic-bezier(0.15, 0, 0.15, 1),
299 column-gap 0.3s cubic-bezier(0.15, 0, 0.15, 1),
300 padding-inline-end 0.3s cubic-bezier(0.15, 0, 0.15, 1);
301 }
302 .editor-avatar.is-badge:hover {
303 grid-template-columns: min-content 1fr;
304 column-gap: ${tF};
305 padding-inline-end: ${rF};
306 transition-timing-function: cubic-bezier(0.85, 0, 0.85, 1);
307 }
308 .editor-avatar.is-badge:hover .editor-avatar__name {
309 opacity: 1;
310 transition-timing-function: cubic-bezier(0.85, 0, 0.85, 1);
311 }
312 .editor-avatar.is-badge.has-avatar-border-color {
313 background-color: var(--editor-avatar-outline-color);
314 }
315 @media (prefers-reduced-motion: reduce) {
316 .editor-avatar.is-badge,
317 .editor-avatar__name {
318 transition: none;
319 }
320 }
321 `;var tTe=`
322 .block-canvas-cover {
323 position: absolute;
324 top: 0;
325 left: 0;
326 width: 100%;
327 height: 100%;
328 pointer-events: none;
329 z-index: 20000;
330 }
331 .block-canvas-cover .collaborators-overlay-full {
332 position: absolute;
333 top: 0;
334 left: 0;
335 width: 100%;
336 height: 100%;
337 }
338 .block-canvas-cover .collaborators-overlay-fixed {
339 position: fixed;
340 width: 100%;
341 height: 100%;
342 }
343 .collaborators-overlay-user {
344 position: absolute;
345 }
346 /* Cursor lines render below avatar labels across all users. The parent
347 .collaborators-overlay-user has no z-index so it does not create a
348 stacking context \u2014 children participate in the shared overlay context. */
349 .collaborators-overlay-user-cursor {
350 position: absolute;
351 z-index: 0;
352 width: ${XCe};
353 border-radius: ${iG};
354 outline: ${iG} solid ${og};
355 box-shadow: ${eF};
356 animation: collaborators-overlay-cursor-blink 1s infinite;
357 }
358 .collaborators-overlay-selection-rect {
359 position: absolute;
360 opacity: 0.15;
361 pointer-events: none;
362 border-radius: 2px;
363 }
364
365 /* Overlay-specific positioning applied to the Avatar cursor label. */
366 .collaborators-overlay-user-label.editor-avatar {
367 position: absolute;
368 z-index: 1;
369 transform: translate(-11px, -100%);
370 margin-top: -${tF};
371 pointer-events: auto;
372 overflow: visible;
373 width: max-content;
374 }
375 /* Avatar positioned above a highlighted block as a label. */
376 .collaborators-overlay-block-label.editor-avatar {
377 position: absolute;
378 z-index: 1;
379 transform: translateY(calc(-100% - ${rF}));
380 pointer-events: auto;
381 overflow: visible;
382 width: max-content;
383 }
384
385 @keyframes collaborators-overlay-cursor-blink {
386 0%, 45% { opacity: 1; }
387 55%, 95% { opacity: 0; }
388 100% { opacity: 1; }
389 }
390 .collaborators-overlay-cursor-highlighted .collaborators-overlay-user-cursor {
391 animation: collaborators-overlay-cursor-highlight 0.6s ease-in-out 3;
392 }
393 .collaborators-overlay-cursor-highlighted .collaborators-overlay-user-label {
394 animation: collaborators-overlay-label-highlight 0.6s ease-in-out 3;
395 }
396 @keyframes collaborators-overlay-cursor-highlight {
397 0%, 100% {
398 transform: scale(1);
399 filter: drop-shadow(0 0 0 transparent);
400 }
401 50% {
402 transform: scale(1.2);
403 filter: drop-shadow(0 0 8px currentColor);
404 }
405 }
406 @keyframes collaborators-overlay-label-highlight {
407 0%, 100% {
408 transform: translate(-11px, -100%) scale(1);
409 filter: drop-shadow(0 0 0 transparent);
410 }
411 50% {
412 transform: translate(-11px, -100%) scale(1.1);
413 filter: drop-shadow(0 0 6px currentColor);
414 }
415 }
416 .block-editor-block-list__block.is-collaborator-selected:not(:focus)::after {
417 content: "";
418 position: absolute;
419 pointer-events: none;
420 top: 0;
421 right: 0;
422 bottom: 0;
423 left: 0;
424 outline-color: var(--collaborator-outline-color);
425 outline-style: solid;
426 outline-width: calc(var(--wp-admin-border-width-focus) / var(--wp-block-editor-iframe-zoom-out-scale, 1));
427 outline-offset: calc(-1 * var(--wp-admin-border-width-focus) / var(--wp-block-editor-iframe-zoom-out-scale, 1));
428 box-shadow: inset 0 0 0 calc((var(--wp-admin-border-width-focus) / var(--wp-block-editor-iframe-zoom-out-scale, 1)) + 0.5px) rgba(${og}, 0.7);
429 z-index: 1;
430 }
431 @media (prefers-reduced-motion: reduce) {
432 .collaborators-overlay-user-label,
433 .collaborators-overlay-user-cursor {
434 animation: none;
435 }
436 }
437 `;function rTe(e,t){let r=null,o=()=>{try{e()}catch{}r=setTimeout(o,t)};return r=setTimeout(o,t),()=>{r&&clearTimeout(r)}}var lG=a(oe(),1),h_=a(H(),1);var p_=a(H(),1);function oF(e){let[t,r]=(0,p_.useState)(0),o=(0,p_.useRef)(null),n=(0,p_.useCallback)(()=>(o.current&&clearTimeout(o.current),o.current=setTimeout(()=>{r(i=>i+1)},e),()=>{o.current&&clearTimeout(o.current)}),[e]);return[t,n]}var{useActiveCollaborators:Ett,useResolvedSelection:Ptt}=Y(lG.privateApis),{SelectionType:ktt}=Y(lG.privateApis);function oTe(e,t,r,o,n){let i=(0,h_.useRef)(new Set),s=Ett(r??null,o??null),l=Ptt(r??null,o??null),[c,u]=(0,h_.useState)([]),[d,f]=oF(n);return(0,h_.useEffect)(()=>{if(!t){u([]);return}let m=i.current,h=new Set,g=s.filter(y=>{let w=y.editorState?.selection?.type===ktt.WholeBlock;return!y.isMe&&w}).map(y=>{let w;try{({localClientId:w}=l(y.editorState?.selection))}catch{return null}return w?{blockId:w,color:y.isMe?"var(--wp-admin-theme-color)":Jl(y.collaboratorInfo.id),userName:y.collaboratorInfo.name,avatarUrl:Sm(y.collaboratorInfo.avatar_urls)}:null}).filter(y=>!y||h.has(y.blockId)?!1:(h.add(y.blockId),!0)),v=new Set(g.map(y=>y.blockId));for(let y of m)if(!v.has(y)){let w=aG(t,y);w&&(w.classList.remove("is-collaborator-selected"),w.style.removeProperty("--collaborator-outline-color")),m.delete(y)}let b=[],S=e?.getBoundingClientRect()??null;return g.forEach(y=>{let{color:w,blockId:_,userName:x,avatarUrl:E}=y,O=aG(t,_);if(O&&(O.classList.add("is-collaborator-selected"),O.style.setProperty("--collaborator-outline-color",w),m.add(_),S)){let A=O.getBoundingClientRect();b.push({blockId:_,userName:x,avatarUrl:E,color:w,x:A.left-S.left,y:A.top-S.top})}}),u(b),()=>{for(let y of m){let w=aG(t,y);w&&(w.classList.remove("is-collaborator-selected"),w.style.removeProperty("--collaborator-outline-color"))}m.clear()}},[s,t,e,d,l]),{highlights:c,rerenderHighlightsAfterDelay:f}}var aG=(e,t)=>e.querySelector(`[data-block="${t}"]`);var uG=a(oe(),1),cTe=a(G(),1),aF=a(H(),1),uTe=a(Nt(),1);var aTe=a(oe(),1);var Rtt=500,nF=(e,t,r,o)=>e===null||!t?null:Att(t,e,r,o)??null,Att=(e,t,r,o)=>{let{node:n,offset:i}=cG(e,t,r),s=r.createRange();try{s.setStart(n,i)}catch{return null}s.collapse(!0);let l=s.getBoundingClientRect(),c=e.getBoundingClientRect(),u=0,d=0;l.x===0&&l.y===0&&l.width===0&&l.height===0?(u=c.left-o.left,d=c.top-o.top):(u=l.left-o.left,d=l.top-o.top);let f=l.height;if(f===0){let m=r.defaultView??window;f=parseInt(m.getComputedStyle(e).lineHeight,10)||c.height}return{x:u,y:d,height:f}},iF=(e,t,r,o,n)=>{let i=t,s=r;i>s&&([i,s]=[s,i]);let l=cG(e,i,o),c=cG(e,s,o),u=o.createRange();try{u.setStart(l.node,l.offset),u.setEnd(c.node,c.offset)}catch{return null}let d=u.getClientRects(),f=[];for(let m of d){if(m.width===0&&m.height===0)continue;let h=m.left-n.left,g=m.top-n.top;f.some(b=>b.x===h&&b.y===g&&b.width===m.width&&b.height===m.height)||f.push({x:h,y:g,width:m.width,height:m.height})}return f.length>0?f:null},nTe=(e,t,r)=>{let o=t.createRange();o.selectNodeContents(e);let n=o.getClientRects(),i=[];for(let s of n)s.width===0&&s.height===0||i.push({x:s.left-r.left,y:s.top-r.top,width:s.width,height:s.height});if(i.length===0){let s=e.getBoundingClientRect();s.width>0&&s.height>0&&i.push({x:s.left-r.left,y:s.top-r.top,width:s.width,height:s.height})}return i},iTe=(e,t,r)=>{let o=r.querySelectorAll("[data-block]"),n=-1,i=-1;for(let l=0;l<o.length;l++){let c=o[l].getAttribute("data-block");c===e&&(n=l),c===t&&(i=l)}if(n===-1||i===-1)return[];n>i&&([n,i]=[i,n]);let s=[];for(let l=n+1;l<i;l++)s.push(o[l]);return s},cG=(e,t,r)=>{let o=r.createTreeWalker(e,NodeFilter.SHOW_TEXT|NodeFilter.SHOW_ELEMENT),n=0,i=null,s=null,l=1;for(;s=o.nextNode();){if(l++,l>Rtt)return i?{node:i,offset:0}:{node:e,offset:0};let c=s.nodeValue?.length??0;if(s.nodeType===Node.ELEMENT_NODE)if(s.nodeName==="BR"){if(n+1>=t){let u=o.nextNode();return u?.nodeType===Node.TEXT_NODE?{node:u,offset:0}:i?{node:i,offset:i.nodeValue?.length??0}:{node:e,offset:0}}n+=1;continue}else continue;if(c!==0){if(n+c>=t)return{node:s,offset:t-n};n+=c,s.nodeType===Node.TEXT_NODE&&(i=s)}}return i&&i.nodeValue?.length?{node:i,offset:i.nodeValue.length}:{node:e,offset:0}},sTe=(e,t)=>e.compareDocumentPosition(t)===Node.DOCUMENT_POSITION_FOLLOWING;var{SelectionDirection:Itt,SelectionType:sF}=Y(aTe.privateApis);function AE(e,t){if(!t.localClientId)return null;let r=e.querySelector(`[data-block="${t.localClientId}"]`);if(!r||!t.attributeKey)return r;let o=CSS.escape(t.attributeKey);return r.querySelector(`[data-wp-block-attribute-key="${o}"]`)??r}function lTe(e,t,r,o){return e.type===sF.None||e.type===sF.WholeBlock?{}:e.type===sF.Cursor?Ott(t,o):r?Ntt(e,t,r,o):{}}function Ott(e,t){if(!e.localClientId)return{};let r=AE(t.editorDocument,e);return{coords:nF(e.richTextOffset,r,t.editorDocument,t.overlayRect)}}function Ntt(e,t,r,o){if(!t.localClientId||!r.localClientId||t.richTextOffset===null||r.richTextOffset===null)return{};let i=e.selectionDirection===Itt.Backward?t:r,s,l=null;if(e.type===sF.SelectionInOneBlock){let u=Mtt(t,r,o);s=u.rects,l=u.blockElement}else{let u=Ftt(t,r,o);s=u.rects,l=i.localClientId===u.firstBlockClientId?u.firstBlock:u.lastBlock}if(s.length>0)return{coords:nF(i.richTextOffset,l,o.editorDocument,o.overlayRect),selectionRects:s};let c=AE(o.editorDocument,t);return{coords:nF(t.richTextOffset,c,o.editorDocument,o.overlayRect)}}function Mtt(e,t,r){let o=AE(r.editorDocument,e);return!o||e.richTextOffset===null||t.richTextOffset===null?{rects:[],blockElement:null}:{rects:iF(o,e.richTextOffset,t.richTextOffset,r.editorDocument,r.overlayRect)??[],blockElement:o}}function Ftt(e,t,r){let o=e,n=t,i=AE(r.editorDocument,o),s=AE(r.editorDocument,n);if(i&&s&&sTe(s,i)&&(o=t,n=e,[i,s]=[s,i]),!i||!s||o.richTextOffset===null||n.richTextOffset===null||!o.localClientId||!n.localClientId)return{rects:[],firstBlock:null,lastBlock:null,firstBlockClientId:null};let l=[],c=iF(i,o.richTextOffset,Number.MAX_SAFE_INTEGER,r.editorDocument,r.overlayRect);c&&l.push(...c);let u=iTe(o.localClientId,n.localClientId,r.editorDocument);for(let f of u){let m=nTe(f,r.editorDocument,r.overlayRect);l.push(...m)}let d=iF(s,0,n.richTextOffset,r.editorDocument,r.overlayRect);return d&&l.push(...d),{rects:l,firstBlock:i,lastBlock:s,firstBlockClientId:o.localClientId}}var{useActiveCollaborators:Dtt,useResolvedSelection:Ltt}=Y(uG.privateApis),{SelectionType:g_}=Y(uG.privateApis);function dTe(e,t,r,o,n){let i=Dtt(r??null,o??null),s=Ltt(r??null,o??null),l=(0,cTe.useSelect)(m=>m(uTe.store).get("core","showCollaborationCursor"),[]),[c,u]=(0,aF.useState)([]),[d,f]=oF(n);return(0,aF.useEffect)(()=>{if(!e||!t){u([]);return}let m=e.getBoundingClientRect(),h={editorDocument:t,overlayRect:m},g=[],v=i.some(b=>!b.isMe);i.forEach(b=>{if(b.isMe&&(!l||!v))return;let S=b.editorState?.selection??{type:g_.None},y={richTextOffset:null,localClientId:null,attributeKey:null},w;if(S.type===g_.Cursor)try{y=s(S)}catch{return}else if(S.type===g_.SelectionInOneBlock||S.type===g_.SelectionInMultipleBlocks)try{y=s({type:g_.Cursor,cursorPosition:S.cursorStartPosition}),w=s({type:g_.Cursor,cursorPosition:S.cursorEndPosition})}catch{return}let _=b.collaboratorInfo.name,x=b.clientId,E=b.isMe?"var(--wp-admin-theme-color)":Jl(b.collaboratorInfo.id),O=Sm(b.collaboratorInfo.avatar_urls),A=lTe(S,y,w,h);if(A.coords){let C={userName:_,clientId:x,color:E,avatarUrl:O,isMe:b.isMe,...A.coords};A.selectionRects&&(C.selectionRects=A.selectionRects),g.push(C)}}),u(g)},[t,s,e,i,l,d]),{cursors:c,rerenderCursorsAfterDelay:f}}var Nd=a(T(),1),fTe=500,Btt=1e4;function pTe({blockEditorDocument:e,postId:t,postType:r,cursorRegistry:o}){let[n,i]=(0,iu.useState)(null),{cursors:s,rerenderCursorsAfterDelay:l}=dTe(n,e??null,t??null,r??null,fTe),{highlights:c,rerenderHighlightsAfterDelay:u}=oTe(n,e??null,t??null,r??null,fTe),d=(0,iu.useCallback)(()=>{l(),u()},[l,u]),f=(0,lF.useResizeObserver)(d);(0,iu.useEffect)(()=>{let v=l(),b=u();return()=>{v(),b()}},[l,u]),(0,iu.useEffect)(()=>{if(s.length!==0)return rTe(l,Btt)},[s.length,l]);let m=(0,lF.useMergeRefs)([i,f]),h=(0,iu.useRef)(new Map);(0,iu.useEffect)(()=>{if(!o)return;let v=h.current,b=new Set(s.map(S=>S.clientId));for(let S of v.keys())b.has(S)||(o.unregisterCursor(S),v.delete(S));for(let[S,y]of v.entries())o.registerCursor(S,y);return()=>o.removeAll()},[s,o]);let g=(0,iu.useCallback)(v=>b=>{b?h.current.set(v,b):h.current.delete(v)},[]);return(0,Nd.jsxs)("div",{className:"collaborators-overlay-full",ref:m,children:[(0,Nd.jsx)("style",{children:eTe+tTe}),s.map(v=>(0,Nd.jsxs)("div",{children:[!v.isMe&&v.selectionRects?.map((b,S)=>(0,Nd.jsx)("div",{className:"collaborators-overlay-selection-rect",style:{left:`${b.x}px`,top:`${b.y}px`,width:`${b.width}px`,height:`${b.height}px`,backgroundColor:v.color}},`${v.clientId}-sel-${S}`)),(0,Nd.jsxs)("div",{ref:g(v.clientId),className:"collaborators-overlay-user",style:{left:`${v.x}px`,top:`${v.y}px`},children:[!v.isMe&&(0,Nd.jsx)("div",{className:"collaborators-overlay-user-cursor",style:{backgroundColor:v.color,height:`${v.height}px`}}),(0,Nd.jsx)(wm,{className:"collaborators-overlay-user-label",variant:"badge",size:"small",src:v.avatarUrl,name:v.userName,label:v.isMe?(0,mTe.__)("You"):void 0,borderColor:v.color})]})]},v.clientId)),c.map(v=>(0,Nd.jsx)(wm,{className:"collaborators-overlay-block-label",variant:"badge",size:"small",src:v.avatarUrl,name:v.userName,borderColor:v.color,style:{left:`${v.x}px`,top:`${v.y}px`}},v.blockId))]})}var dG=a(T(),1),{BlockCanvasCover:Vtt}=Y(hTe.privateApis);function cF({postId:e,postType:t,cursorRegistry:r}){return(0,dG.jsx)(Vtt.Fill,{children:({containerRef:o})=>(0,dG.jsx)(pTe,{blockEditorDocument:o.current?.ownerDocument,postId:e,postType:t,cursorRegistry:r})})}var $l=a(T(),1),{useActiveCollaborators:jtt}=Y(vTe.privateApis);function fG({postId:e,postType:t}){let r=jtt(e,t),o=r.filter(f=>!f.isMe),n=(0,v_.useMemo)(()=>[...r].sort((f,m)=>f.isMe&&!m.isMe?-1:!f.isMe&&m.isMe?1:0),[r]),[i]=(0,v_.useState)(ZCe),[s,l]=(0,v_.useState)(!1),[c,u]=(0,v_.useState)(null);if(o.length===0)return null;let d=r.find(f=>f.isMe);return(0,$l.jsxs)($l.Fragment,{children:[(0,$l.jsxs)("div",{className:"editor-collaborators-presence",children:[(0,$l.jsx)(gTe.Button,{__next40pxDefaultSize:!0,className:"editor-collaborators-presence__button",onClick:()=>l(!s),isPressed:s,ref:u,"aria-label":(0,uF.sprintf)((0,uF.__)("Collaborators list, %d online"),n.length),children:(0,$l.jsxs)(tG,{max:4,children:[d&&(0,$l.jsx)(wm,{src:Sm(d.collaboratorInfo.avatar_urls),name:d.collaboratorInfo.name,borderColor:"var(--wp-admin-theme-color)",size:"small"},d.clientId),o.map(f=>(0,$l.jsx)(wm,{src:Sm(f.collaboratorInfo.avatar_urls),name:f.collaboratorInfo.name,borderColor:Jl(f.collaboratorInfo.id),size:"small"},f.clientId))]})}),s&&(0,$l.jsx)(KCe,{activeCollaborators:n,popoverAnchor:c,setIsPopoverVisible:l,cursorRegistry:i})]}),(0,$l.jsx)(cF,{postId:e,postType:t,cursorRegistry:i})]})}var _o=a(T(),1);function ztt({customSaveButton:e,forceIsDirty:t,setEntitiesSavedStatesCallback:r}){let o=(0,IE.useViewportMatch)("large"),n=(0,IE.useViewportMatch)("medium"),i=(0,IE.useMediaQuery)("(max-width: 403px)"),{postId:s,postType:l,isTextEditor:c,isPublishSidebarOpened:u,showIconLabels:d,hasFixedToolbar:f,hasBlockSelection:m,hasSectionRootClientId:h,isStylesCanvasActive:g}=(0,yTe.useSelect)(w=>{let{get:_}=w(wTe.store),{getEditorMode:x,getCurrentPostType:E,getCurrentPostId:O,isPublishSidebarOpened:A}=w(R),{getStylesPath:C,getShowStylebook:I}=Y(w(R)),{getBlockSelectionStart:k,getSectionRootClientId:P}=Y(w(bTe.store));return{postId:O(),postType:E(),isTextEditor:x()==="text",isPublishSidebarOpened:A(),showIconLabels:_("core","showIconLabels"),hasFixedToolbar:_("core","fixedToolbar"),hasBlockSelection:!!k(),hasSectionRootClientId:!!P(),isStylesCanvasActive:!!C()?.startsWith("/revisions")||I()}},[]),v=["post","page","wp_template"].includes(l)&&h,[b,S]=(0,STe.useState)(!0),y=!i&&(!f||f&&(!m||b));return(0,_o.jsx)(H6,{toolbar:(0,_o.jsxs)(_o.Fragment,{children:[(0,_o.jsx)(J1e,{disableBlockTools:g||c}),f&&n&&(0,_o.jsx)(q1e,{isCollapsed:b,onToggle:S})]}),center:y?(0,_o.jsxs)(_o.Fragment,{children:[(0,_o.jsx)(fG,{postType:l,postId:s}),(0,_o.jsx)($N,{})]}):void 0,settings:(0,_o.jsxs)(_o.Fragment,{children:[!y&&!i&&(0,_o.jsx)(fG,{postType:l,postId:s}),!e&&!u&&(0,_o.jsx)(X3,{forceIsDirty:t}),(0,_o.jsx)(_Ce,{}),(0,_o.jsx)(ECe,{forceIsAutosaveable:t,disabled:g}),(0,_o.jsx)(Gh,{className:"editor-header__post-preview-button",forceIsAutosaveable:t}),o&&v&&(0,_o.jsx)(ICe,{disabled:g}),(o||!d)&&(0,_o.jsx)(eh.Slot,{scope:"core"}),!e&&(0,_o.jsx)(hCe,{forceIsDirty:t,setEntitiesSavedStatesCallback:r}),e,(0,_o.jsx)(K6,{})]})})}var _Te=ztt;var OE=a(G(),1),fF=a(pe(),1),xTe=a(ke(),1),NE=a(H(),1),CTe=a(Nt(),1),TTe=a(go(),1);var dF=a(T(),1),{PrivateInserterLibrary:Htt}=Y(fF.privateApis);function ETe(){let{blockSectionRootClientId:e,inserterSidebarToggleRef:t,inserter:r,showMostUsedBlocks:o,sidebarIsOpened:n}=(0,OE.useSelect)(m=>{let{getInserterSidebarToggleRef:h,getInserter:g,isPublishSidebarOpened:v}=Y(m(R)),{getBlockRootClientId:b,isZoomOut:S,getSectionRootClientId:y}=Y(m(fF.store)),{get:w}=m(CTe.store),{getActiveComplementaryArea:_}=m(ze),x=()=>{if(S()){let E=y();if(E)return E}return b()};return{inserterSidebarToggleRef:h(),inserter:g(),showMostUsedBlocks:w("core","mostUsedBlocks"),blockSectionRootClientId:x(),sidebarIsOpened:!!(_("core")||v())}},[]),{setIsInserterOpened:i}=(0,OE.useDispatch)(R),{disableComplementaryArea:s}=(0,OE.useDispatch)(ze),l=(0,xTe.useViewportMatch)("medium","<"),c=(0,NE.useRef)(),u=(0,NE.useCallback)(()=>{i(!1),t.current?.focus()},[t,i]),d=(0,NE.useCallback)(m=>{m.keyCode===TTe.ESCAPE&&!m.defaultPrevented&&(m.preventDefault(),u())},[u]),f=(0,dF.jsx)("div",{className:"editor-inserter-sidebar__content",children:(0,dF.jsx)(Htt,{showMostUsedBlocks:o,showInserterHelpPanel:!0,shouldFocusBlock:l,rootClientId:e??r.rootClientId,__experimentalInsertionIndex:r.insertionIndex,onSelect:r.onSelect,__experimentalInitialTab:r.tab,__experimentalInitialCategory:r.category,__experimentalFilterValue:r.filterValue,onPatternCategorySelection:n?()=>s("core"):void 0,ref:c,onClose:u})});return(0,dF.jsx)("div",{onKeyDown:d,className:"editor-inserter-sidebar",children:f})}var pF=a(pe(),1),hF=a(ke(),1),gF=a(G(),1),mG=a(Pb(),1),su=a(H(),1),FE=a(V(),1),kTe=a(fa(),1),RTe=a(go(),1);var ME=a(W(),1),mF=a(V(),1);var yi=a(T(),1);function PTe(){return(0,yi.jsxs)(yi.Fragment,{children:[(0,yi.jsxs)("div",{className:"editor-list-view-sidebar__outline",children:[(0,yi.jsxs)("div",{children:[(0,yi.jsx)(ME.__experimentalText,{children:(0,mF.__)("Characters:")}),(0,yi.jsx)(ME.__experimentalText,{children:(0,yi.jsx)(i_,{})})]}),(0,yi.jsxs)("div",{children:[(0,yi.jsx)(ME.__experimentalText,{children:(0,mF.__)("Words:")}),(0,yi.jsx)(o_,{})]}),(0,yi.jsxs)("div",{children:[(0,yi.jsx)(ME.__experimentalText,{children:(0,mF.__)("Time to read:")}),(0,yi.jsx)(n_,{})]})]}),(0,yi.jsx)(fS,{})]})}var ng=a(T(),1),{TabbedSidebar:Utt}=Y(pF.privateApis);function ATe(){let{setIsListViewOpened:e}=(0,gF.useDispatch)(R),{getListViewToggleRef:t}=Y((0,gF.useSelect)(R)),r=(0,hF.useFocusOnMount)("firstElement"),o=(0,su.useCallback)(()=>{e(!1),t().current?.focus()},[t,e]),n=(0,su.useCallback)(v=>{v.keyCode===RTe.ESCAPE&&!v.defaultPrevented&&(v.preventDefault(),o())},[o]),[i,s]=(0,su.useState)(null),[l,c]=(0,su.useState)("list-view"),u=(0,su.useRef)(),d=(0,su.useRef)(),f=(0,su.useRef)(),m=(0,hF.useMergeRefs)([r,f,s]);function h(v){let b=mG.focus.tabbable.find(d.current)[0];if(v==="list-view"){let S=mG.focus.tabbable.find(f.current)[0];(u.current.contains(S)?S:b).focus()}else b.focus()}let g=(0,su.useCallback)(()=>{u.current.contains(u.current.ownerDocument.activeElement)?o():h(l)},[o,l]);return(0,kTe.useShortcut)("core/editor/toggle-list-view",g),(0,ng.jsx)("div",{className:"editor-list-view-sidebar",onKeyDown:n,ref:u,children:(0,ng.jsx)(Utt,{tabs:[{name:"list-view",title:(0,FE._x)("List View","Post overview"),panel:(0,ng.jsx)("div",{className:"editor-list-view-sidebar__list-view-container",children:(0,ng.jsx)("div",{className:"editor-list-view-sidebar__list-view-panel-content",children:(0,ng.jsx)(pF.__experimentalListView,{dropZoneElement:i})})}),panelRef:m},{name:"outline",title:(0,FE._x)("Outline","Post overview"),panel:(0,ng.jsx)("div",{className:"editor-list-view-sidebar__list-view-container",children:(0,ng.jsx)(PTe,{})})}],onClose:o,onSelect:v=>c(v),defaultTabId:"list-view",ref:d,closeButtonLabel:(0,FE.__)("Close")})})}var LE=a(G(),1),DE=a(W(),1);var sg=a(V(),1);var vF=a(G(),1),ig=a(W(),1),ITe=a(oe(),1),_m=a(V(),1),bF=a(en(),1),OTe=a(H(),1);var au=a(T(),1);function Wtt(){let{revisions:e,perPage:t,currentRevisionId:r,revisionKey:o,revisionPage:n,totalRevisions:i}=(0,vF.useSelect)(y=>{let{getCurrentRevisionId:w,getRevisionPage:_,getPageRevisions:x,getRevisionsPerPage:E}=Y(y(R)),O=y(R).getCurrentPostType();if(!O)return{};let C=y(ITe.store).getEntityConfig("postType",O)?.revisionKey||"id",I=_();return{revisions:x(I),perPage:E(),currentRevisionId:w(),revisionKey:C,revisionPage:I,totalRevisions:y(R).getCurrentPostRevisionsCount()}},[]),{setCurrentRevisionId:s,setRevisionPage:l}=Y((0,vF.useDispatch)(R)),c=!e,u=Math.ceil(i/t)||1,d=(0,OTe.useMemo)(()=>e&&[...e].reverse(),[e]),f=d?.findIndex(y=>y[o]===r),m=y=>{let w=d?.[y];w&&s(w[o])},h=(0,bF.getSettings)(),g=y=>{let w=d?.[y];return w?(0,bF.dateI18n)(h.formats.datetime,w.date):y},v=u>1;if(c&&!v)return(0,au.jsx)(ig.Spinner,{});if(!c&&!d?.length)return(0,au.jsx)("span",{className:"editor-revisions-header__no-revisions",children:(0,_m.__)("No revisions found.")});if(i<=1)return(0,au.jsx)("span",{className:"editor-revisions-header__no-revisions",children:(0,_m.__)("Only one revision found.")});let b=y=>{let w=i-(y-1)*t,_=Math.max(1,w-t+1);return(0,_m.sprintf)((0,_m.__)("Revisions %1$s\u2013%2$s"),_,w)},S=c||f===-1?(0,au.jsx)(ig.Spinner,{}):(0,au.jsx)(ig.RangeControl,{__next40pxDefaultSize:!0,"aria-valuetext":g(f),className:"editor-revisions-header__slider",hideLabelFromVision:!0,label:(0,_m.__)("Revision"),max:d?.length-1,min:0,marks:!0,onChange:m,renderTooltipContent:g,value:f,withInputField:!1});return v?(0,au.jsxs)(ne,{direction:"row",gap:"sm",align:"center",style:{flex:1},children:[(0,au.jsx)(ig.Button,{icon:xr,label:n<u?b(n+1):(0,_m.__)("No older revisions"),onClick:()=>l(n+1),disabled:c||n>=u,size:"compact",accessibleWhenDisabled:!0}),(0,au.jsx)("div",{style:{flex:1,minWidth:0,display:"flex",justifyContent:"center"},children:S}),(0,au.jsx)(ig.Button,{icon:Cr,label:n>1?b(n-1):(0,_m.__)("No newer revisions"),onClick:()=>l(n-1),disabled:c||n<=1,size:"compact",accessibleWhenDisabled:!0})]}):S}var NTe=Wtt;var Ia={document:"edit-post/document",block:"edit-post/block"};var fl=a(T(),1);function Gtt({showDiff:e,onToggleDiff:t}){let{currentRevisionId:r,sidebarIsOpened:o}=(0,LE.useSelect)(d=>({currentRevisionId:Y(d(R)).getCurrentRevisionId(),sidebarIsOpened:!!d(ze).getActiveComplementaryArea("core")}),[]),{setCurrentRevisionId:n,restoreRevision:i}=Y((0,LE.useDispatch)(R)),{enableComplementaryArea:s,disableComplementaryArea:l}=(0,LE.useDispatch)(ze),c=!!r,u=()=>{r&&i(r)};return(0,fl.jsx)(H6,{className:"editor-revisions-header",toolbar:(0,fl.jsx)(DE.Button,{__next40pxDefaultSize:!0,size:"compact",icon:Tg,label:(0,sg._x)("Show changes","revisions"),isPressed:e,onClick:t}),center:(0,fl.jsx)(NTe,{}),settings:(0,fl.jsxs)(fl.Fragment,{children:[(0,fl.jsx)(Gh,{className:"editor-header__post-preview-button"}),(0,fl.jsx)(DE.Button,{__next40pxDefaultSize:!0,icon:(0,sg.isRTL)()?_g:Yd,label:(0,sg._x)("Settings","panel button label"),isPressed:o,"aria-expanded":o,onClick:()=>{o?l("core"):s("core",Ia.document)},size:"compact"}),(0,fl.jsx)(DE.Button,{__next40pxDefaultSize:!0,variant:"secondary",size:"compact",onClick:()=>n(null),children:(0,sg.__)("Exit")}),(0,fl.jsx)(DE.Button,{__next40pxDefaultSize:!0,accessibleWhenDisabled:!0,variant:"primary",size:"compact",className:"editor-revisions-header__restore-button",disabled:!c,onClick:u,children:(0,sg.__)("Restore")}),(0,fl.jsx)(K6,{disabled:!0})]})})}var pG=Gtt;var uEe=a(W(),1),dEe=a(pe(),1),fEe=a(G(),1),mEe=a(H(),1),pEe=a(An(),1);var Oa=a(pe(),1),uu=a(H(),1),kF=a(G(),1),wG=a(kt(),1),tEe=a(oe(),1),RF=a(ke(),1);var hG=a(G(),1),MTe=a(oe(),1),yF=a(H(),1),gG=a(V(),1),FTe=a(W(),1);var DTe=a(T(),1);function LTe({contentRef:e}){let{onNavigateToEntityRecord:t,templateId:r}=(0,hG.useSelect)(s=>{let{getEditorSettings:l,getCurrentTemplateId:c}=s(R);return{onNavigateToEntityRecord:l().onNavigateToEntityRecord,templateId:c()}},[]),o=(0,hG.useSelect)(s=>!!s(MTe.store).canUser("create",{kind:"postType",name:"wp_template"}),[]),[n,i]=(0,yF.useState)(!1);return(0,yF.useEffect)(()=>{let s=c=>{o&&(!c.target.classList.contains("is-root-container")||c.target.dataset?.type==="core/template-part"||c.defaultPrevented||(c.preventDefault(),i(!0)))},l=e.current;return l?.addEventListener("dblclick",s),()=>{l?.removeEventListener("dblclick",s)}},[e,o]),o?(0,DTe.jsx)(FTe.__experimentalConfirmDialog,{isOpen:n,confirmButtonText:(0,gG.__)("Edit template"),onConfirm:()=>{i(!1),t({postId:r,postType:"wp_template"})},onCancel:()=>i(!1),size:"medium",children:(0,gG.__)("You\u2019ve tried to select a block that is part of a template that may be used elsewhere on your site. Would you like to edit the template?")}):null}var VTe=a(ke(),1),wF=a(G(),1),vG=a(pe(),1);var Ytt=500;function BTe(e,t,r){return Math.min(Math.max(e,t),r)}function qtt(e,t,r){let o=e-BTe(e,r.left,r.right),n=t-BTe(t,r.top,r.bottom);return Math.sqrt(o*o+n*n)}function jTe({isEnabled:e=!0}={}){let{getEnabledClientIdsTree:t,getBlockName:r,getBlockOrder:o}=Y((0,wF.useSelect)(vG.store)),{selectBlock:n}=(0,wF.useDispatch)(vG.store);return(0,VTe.useRefEffect)(i=>{if(!e)return;let s=(c,u)=>{let d=t().flatMap(({clientId:h})=>{let g=r(h);if(g==="core/template-part")return[];if(g==="core/post-content"){let v=o(h);if(v.length)return v}return[h]}),f=1/0,m=null;for(let h of d){let g=i.querySelector(`[data-block="${h}"]`);if(!g)continue;let v=g.getBoundingClientRect(),b=qtt(c,u,v);b<f&&b<Ytt&&(f=b,m=h)}m&&n(m)},l=c=>{(c.target===i||c.target.classList.contains("is-root-container"))&&s(c.clientX,c.clientY)};return i.addEventListener("click",l),()=>i.removeEventListener("click",l)},[e])}var SF=a(G(),1),zTe=a(ke(),1),bG=a(pe(),1);function HTe(){let{getSettings:e,isZoomOut:t}=Y((0,SF.useSelect)(bG.store)),{resetZoomLevel:r}=Y((0,SF.useDispatch)(bG.store));return(0,zTe.useRefEffect)(o=>{function n(i){if(t()&&!i.defaultPrevented){i.preventDefault();let{__experimentalSetIsInserterOpened:s}=e();typeof s=="function"&&s(!1),r()}}return o.addEventListener("dblclick",n),()=>{o.removeEventListener("dblclick",n)}},[e,t,r])}var UTe=a(G(),1),WTe=a(ke(),1),_F=a(pe(),1),GTe=a(kt(),1),Ktt=':root :where(.editor-styles-wrapper)::after {content: ""; display: block; height: 40vh;}';function YTe(e){let t=(0,UTe.useRegistry)(),r=(0,WTe.useRefEffect)(o=>{function n(s){if(s.target!==o&&s.target!==o.parentElement)return;let l=o.lastElementChild;if(!l)return;let c=l.getBoundingClientRect();if(s.clientY<c.bottom)return;s.preventDefault();let u=t.select(_F.store).getBlockOrder(""),d=u[u.length-1],f=t.select(_F.store).getBlock(d),{selectBlock:m,insertDefaultBlock:h}=t.dispatch(_F.store);f&&(0,GTe.isUnmodifiedDefaultBlock)(f)?m(d):h()}let{ownerDocument:i}=o;return i.addEventListener("pointerdown",n),()=>{i.removeEventListener("pointerdown",n)}},[t]);return e?[r,Ktt]:[]}var xF=a(G(),1),qTe=a(ke(),1),yG=a(pe(),1);function KTe(){let{getEditedContentOnlySection:e}=Y((0,xF.useSelect)(yG.store)),{stopEditingContentOnlySection:t}=Y((0,xF.useDispatch)(yG.store));return(0,qTe.useRefEffect)(r=>{function o(n){let i=e();if(!i)return;!n.target.closest(`[data-block="${i}"]`)&&!n.defaultPrevented&&(n.preventDefault(),t())}return r.addEventListener("click",o),()=>{r.removeEventListener("click",o)}},[e,t])}var CF=a(G(),1),XTe=a(ke(),1),QTe=a(kt(),1),TF=a(oe(),1),EF=a(pe(),1),Md=a(W(),1),JTe=a(An(),1),ag=a(H(),1),cu=a(V(),1);var b_=a(H(),1);function ZTe(e){let[t,r]=(0,b_.useState)(),o=(0,b_.useRef)(!1);return(0,b_.useEffect)(()=>{if(!e)return;if(e.status==="connected"){r(void 0),o.current=!1;return}if(e.status!=="disconnected"||!e.willAutoRetryInMs)return;let{willAutoRetryInMs:n}=e,i=Date.now()+n,s=o.current;o.current=!0,s&&r(0);let l=null,c=()=>{r(Math.ceil((i-Date.now())/1e3)),l=setInterval(()=>{let d=Math.ceil((i-Date.now())/1e3);r(Math.max(0,d)),d<=0&&l&&clearInterval(l)},1e3)},u=s?setTimeout(c,500):null;return u||c(),()=>{u&&clearTimeout(u),l&&clearInterval(l)}},[e]),{onManualRetry:()=>{r(0)},secondsRemaining:t}}var lu=a(T(),1),{BlockCanvasCover:Ztt}=Y(EF.privateApis),{retrySyncConnection:Xtt}=Y(TF.privateApis),Qtt=2e4;function $Te(){let[e,t]=(0,ag.useState)(!1),[r,o]=(0,ag.useState)(!1),[n,i]=(0,ag.useState)(!1),{connectionStatus:s,isCollaborationEnabled:l,postType:c}=(0,CF.useSelect)(_=>{let{getSyncConnectionStatus:x,getPostType:E}=Y(_(TF.store)),{getCurrentPostType:O,isCollaborationEnabledForCurrentPost:A}=Y(_(R)),C=O();return{connectionStatus:x()||null,isCollaborationEnabled:A(),postType:C?E(C):null}},[]),{onManualRetry:u,secondsRemaining:d}=ZTe(s),f=(0,XTe.useCopyToClipboard)(()=>{let _=(0,CF.select)(EF.store).getBlocks();return(0,QTe.serialize)(_)});(0,ag.useEffect)(()=>{let _=setTimeout(()=>{t(!0)},Qtt);return()=>clearTimeout(_)},[]),(0,ag.useEffect)(()=>{s?.status!=="connecting"&&i(s!==null&&"canManuallyRetry"in s&&s.canManuallyRetry===!0)},[s]);let m=s&&s.status==="disconnected"&&(s.canManuallyRetry||s.willAutoRetryInMs);(0,ag.useEffect)(()=>{if(s?.status==="connected"){o(!1);return}s?.status&&s.status!=="connecting"&&(!m||s.backgroundRetriesFailed)&&o(!0)},[s,m]);let h=s?.status==="disconnected"&&"error"in s&&s.error?.code===sW;if(!l||!e&&!h||!r)return null;let g=s&&"error"in s?s?.error:void 0;if(!m&&(0,JTe.applyFilters)("editor.isSyncConnectionErrorHandled",!1,g?.code)!==!1)return null;let v=n?()=>{u(),Xtt()}:void 0,b=wSe(g),S="",y=!1;d&&d>0?S=(0,cu.sprintf)((0,cu._n)("Retrying connection in %d second\u2026","Retrying connection in %d seconds\u2026",d),d):d===0&&(y=!0,S=(0,cu.__)("Retrying\u2026"));let w="edit.php";return c?.slug&&(w=`edit.php?post_type=${c.slug}`),(0,lu.jsx)(Ztt.Fill,{children:(0,lu.jsx)(Md.Modal,{overlayClassName:"editor-sync-connection-error-modal",isDismissible:!1,onRequestClose:()=>{},shouldCloseOnClickOutside:!1,shouldCloseOnEsc:!1,size:"medium",title:b.title,children:(0,lu.jsxs)(Md.__experimentalVStack,{spacing:6,children:[(0,lu.jsx)("p",{children:b.description}),S&&(0,lu.jsx)("p",{className:"editor-sync-connection-error-modal__retry-countdown",children:S}),(0,lu.jsxs)(Md.__experimentalHStack,{justify:"right",children:[(0,lu.jsx)(Md.Button,{__next40pxDefaultSize:!0,href:w,isDestructive:!0,variant:"tertiary",children:(0,cu.sprintf)((0,cu.__)("Back to %s"),c?.labels?.name??(0,cu.__)("Posts"))}),(0,lu.jsx)(Md.Button,{__next40pxDefaultSize:!0,ref:f,variant:v?"secondary":"primary",children:(0,cu.__)("Copy Post Content")}),v&&(0,lu.jsx)(Md.Button,{__next40pxDefaultSize:!0,accessibleWhenDisabled:!0,"aria-disabled":y,disabled:y,isBusy:y,variant:"primary",onClick:v,children:(0,cu.__)("Retry")})]})]})})})}var oi=a(T(),1),{LayoutStyle:PF,useLayoutClasses:Jtt,useLayoutStyles:$tt,ExperimentalBlockCanvas:ert,useFlashEditableBlocks:trt}=Y(Oa.privateApis);function SG(e){for(let t=0;t<e.length;t++){if(e[t].name==="core/post-content")return e[t].attributes;if(e[t].innerBlocks.length){let r=SG(e[t].innerBlocks);if(r)return r}}}function eEe(e){for(let t=0;t<e.length;t++)if(e[t].name==="core/post-content")return!0;return!1}function rrt({autoFocus:e,disableIframe:t=!1,iframeProps:r,contentRef:o,className:n}){let i=(0,RF.useViewportMatch)("small","<"),{renderingMode:s,postContentAttributes:l,editedPostTemplate:c={},wrapperBlockName:u,wrapperUniqueId:d,deviceType:f,isFocusedEntity:m,isDesignPostType:h,postType:g,isPreview:v,styles:b,hasCanvasWidth:S}=(0,kF.useSelect)(ve=>{let{getCurrentPostId:Ce,getCurrentPostType:_e,getCurrentTemplateId:Me,getEditorSettings:ue,getRenderingMode:te,getDeviceType:de,getCanvasWidth:se}=Y(ve(R)),{getPostType:fe,getEditedEntityRecord:Ne}=ve(tEe.store),Ie=_e(),je=te(),Ge;Ie===yu?Ge="core/block":je==="post-only"&&(Ge="core/post-content");let Se=ue(),Te=Se.supportsTemplateMode,J=fe(Ie),he=Me(),ct=he?Ne("postType",lr,he):void 0;return{renderingMode:je,postContentAttributes:Se.postContentAttributes,isDesignPostType:xi.includes(Ie),editedPostTemplate:J?.viewable&&Te?ct:void 0,wrapperBlockName:Ge,wrapperUniqueId:Ce(),deviceType:de(),isFocusedEntity:!!Se.onNavigateToPreviousEntityRecord,postType:Ie,isPreview:Se.isPreviewMode,styles:Se.styles,hasCanvasWidth:se()!==void 0}},[]),{isCleanNewPost:y}=(0,kF.useSelect)(R),{hasRootPaddingAwareAlignments:w,themeHasDisabledLayoutStyles:_,themeSupportsLayout:x,isZoomedOut:E}=(0,kF.useSelect)(ve=>{let{getSettings:Ce,isZoomOut:_e}=Y(ve(Oa.store)),Me=Ce();return{themeHasDisabledLayoutStyles:Me.disableLayoutStyles,themeSupportsLayout:Me.supportsLayout,hasRootPaddingAwareAlignments:Me.__experimentalFeatures?.useRootPaddingAwareAlignments,isZoomedOut:_e()}},[]),O=(0,uu.useRef)(),[A]=(0,Oa.useSettings)("layout"),C=(0,uu.useMemo)(()=>s!=="post-only"||h?{type:"default"}:x?{...A,type:"constrained"}:{type:"default"},[s,x,A,h]),I=(0,uu.useMemo)(()=>{if(!c?.content&&!c?.blocks&&l)return l;if(c?.blocks)return SG(c?.blocks);let ve=typeof c?.content=="string"?c?.content:"";return SG((0,wG.parse)(ve))||{}},[c?.content,c?.blocks,l]),k=(0,uu.useMemo)(()=>{if(!c?.content&&!c?.blocks)return!1;if(c?.blocks)return eEe(c?.blocks);let ve=typeof c?.content=="string"?c?.content:"";return eEe((0,wG.parse)(ve))||!1},[c?.content,c?.blocks]),{layout:P={},align:N=""}=I||{},U=Jtt(I,"core/post-content"),F=Q({"is-layout-flow":!x},x&&U,N&&`align${N}`),D=$tt(I,"core/post-content",".block-editor-block-list__layout.is-root-container"),B=(0,uu.useMemo)(()=>P&&(P?.type==="constrained"||P?.inherit||P?.contentSize||P?.wideSize)?{...A,...P,type:"constrained"}:{...A,...P,type:"default"},[P?.type,P?.inherit,P?.contentSize,P?.wideSize,A]),L=l?B:C,M=L?.type==="default"&&!k?C:L,z=(0,Oa.__unstableUseTypingObserver)(),K=(0,uu.useRef)();(0,uu.useEffect)(()=>{!e||!y()||K?.current?.focus()},[e,y]);let Z=`.is-root-container.alignwide { max-width: var(--wp--style--global--wide-size); margin-left: auto; margin-right: auto;}
438 .is-root-container.alignwide:where(.is-layout-flow) > :not(.alignleft):not(.alignright) { max-width: var(--wp--style--global--wide-size);}
439 .is-root-container.alignfull { max-width: none; margin-left: auto; margin-right: auto;}
440 .is-root-container.alignfull:where(.is-layout-flow) > :not(.alignleft):not(.alignright) { max-width: none;}`,q=[Sy,In,yu].includes(g)&&!v&&!i&&!E||S,X=g===Sy&&v,[ie,$]=YTe(!v&&s==="post-only"&&!h),le="display:flex;align-items:center;justify-content:center;",ae=(0,uu.useMemo)(()=>[...b??[],{css:`:where(.block-editor-iframe__body){display:flow-root;}.is-root-container{display:flow-root;${q||X?"min-height:0!important;":""}}
441 ${$||""}
442 ${q?`.block-editor-iframe__html{background:var(--wp-editor-canvas-background);min-height:100vh;${le}}.block-editor-iframe__body{width:100%;}`:""}${X?`.block-editor-iframe__body{${le}padding:var(--wp--style--block-gap,2em);}`:""}`}],[b,q,X,$]),re=(0,Oa.__unstableUseTypewriter)();return o=(0,RF.useMergeRefs)([O,o,s==="post-only"?re:null,trt({isEnabled:s==="template-locked"}),jTe({isEnabled:s==="template-locked"}),HTe(),ie,KTe()]),(0,oi.jsxs)("div",{className:Q("editor-visual-editor","edit-post-visual-editor",n,{"has-vertical-padding":m||S,"has-horizontal-padding":m||q,"is-iframed":!t}),children:[(0,oi.jsx)($Te,{}),(0,oi.jsx)(uS,{enableResizing:q,height:"100%",children:(0,oi.jsxs)(ert,{shouldIframe:!t,contentRef:o,styles:ae,height:"100%",iframeProps:{...r,style:r?.style},children:[x&&!_&&s==="post-only"&&!h&&(0,oi.jsxs)(oi.Fragment,{children:[(0,oi.jsx)(PF,{selector:".editor-visual-editor__post-title-wrapper",layout:C}),(0,oi.jsx)(PF,{selector:".block-editor-block-list__layout.is-root-container",layout:M}),N&&(0,oi.jsx)(PF,{css:Z}),D&&(0,oi.jsx)(PF,{layout:B,css:D})]}),s==="post-only"&&!h&&(0,oi.jsx)("div",{className:Q("editor-visual-editor__post-title-wrapper","edit-post-visual-editor__post-title-wrapper",{"has-global-padding":w}),contentEditable:!1,ref:z,style:{marginTop:"4rem"},children:(0,oi.jsx)(b6,{ref:K})}),(0,oi.jsxs)(Oa.RecursionProvider,{blockName:u,uniqueId:d,children:[(0,oi.jsx)(Oa.BlockList,{className:Q("is-"+f.toLowerCase()+"-preview",s!=="post-only"||h?"wp-site-blocks":`${F} wp-block-post-content`,{"has-global-padding":s==="post-only"&&!h&&w}),layout:L,dropZoneElement:t?O.current:O.current?.parentNode,__unstableDisableDropZone:s==="template-locked"}),s==="template-locked"&&(0,oi.jsx)(LTe,{contentRef:O})]})]})})]})}var AF=rrt;var y_=a(V(),1),IF=a(CT(),1),rEe=[{name:"revision/diff-removed",title:(0,y_.__)("Removed"),tagName:"del",className:"revision-diff-removed"},{name:"revision/diff-added",title:(0,y_.__)("Added"),tagName:"ins",className:"revision-diff-added"},{name:"revision/diff-format-added",title:(0,y_.__)("Format added"),tagName:"span",className:"revision-diff-format-added"},{name:"revision/diff-format-removed",title:(0,y_.__)("Format removed"),tagName:"span",className:"revision-diff-format-removed"},{name:"revision/diff-format-changed",title:(0,y_.__)("Format changed"),tagName:"span",className:"revision-diff-format-changed"}];function oEe(){for(let e of rEe)(0,IF.registerFormatType)(e.name,{...e,attributes:{title:"title"},edit:()=>null})}function nEe(){for(let e of rEe)(0,IF.unregisterFormatType)(e.name)}var ml=a(H(),1),OF=a(ke(),1),sEe=a(G(),1),NF=a(pe(),1),BE=a(V(),1);var lg=a(T(),1),{useBlockElementRef:ort}=Y(NF.privateApis);function aEe(e){let t=[];for(let r of e)r.__revisionDiffStatus?.status&&t.push({clientId:r.clientId,status:r.__revisionDiffStatus.status}),r.innerBlocks?.length&&t.push(...aEe(r.innerBlocks));return t}var iEe={added:(0,BE.__)("Go to added block"),removed:(0,BE.__)("Go to removed block"),modified:(0,BE.__)("Go to modified block")};function _G(e){if(!e)return null;let t=e.ownerDocument,r=t.documentElement.scrollHeight,o=e.getBoundingClientRect(),n=t.documentElement.scrollTop;return{top:(o.top+n)/r*100,height:o.height/r*100}}function nrt({clientId:e,status:t,subscribe:r}){let o=(0,ml.useRef)();ort(e,o);let[n,i]=(0,ml.useState)(()=>_G(o.current));return(0,ml.useEffect)(()=>r(()=>{i(_G(o.current))}),[r]),(0,ml.useEffect)(()=>{i(_G(o.current))},[t]),n?(0,lg.jsxs)(We.Root,{children:[(0,lg.jsx)(We.Trigger,{render:(0,lg.jsx)("button",{className:`revision-diff-marker is-${t}`,style:{top:`${n.top}%`,height:`${Math.max(n.height,.5)}%`},onClick:()=>o.current?.focus(),"aria-label":iEe[t]})}),(0,lg.jsx)(We.Popup,{children:iEe[t]})]}):null}function lEe(){let[e,t]=(0,ml.useState)(!1),r=(0,ml.useRef)(new Set),o=(0,sEe.useSelect)(l=>l(NF.store).getBlocks(),[]),n=(0,ml.useMemo)(()=>aEe(o),[o]),i=(0,ml.useCallback)(l=>(r.current.add(l),()=>r.current.delete(l)),[]),s=(0,OF.useRefEffect)(l=>{let{ownerDocument:c}=l,{defaultView:u}=c,d=new u.ResizeObserver(()=>{r.current.forEach(f=>f())});return d.observe(c.body),()=>{d.disconnect()}},[]);return[(0,OF.useMergeRefs)([s,t]),(0,lg.jsx)("div",{className:"revision-diff-markers",role:"navigation","aria-label":(0,BE.__)("Document changes"),children:e&&n.map(({clientId:l,status:c})=>(0,lg.jsx)(nrt,{clientId:l,status:c,subscribe:i},l))},"diff-markers")]}var Na=a(T(),1),{usePrivateStyleOverride:cEe}=Y(dEe.privateApis),irt=`
443 <svg
444 xmlns="http://www.w3.org/2000/svg"
445 viewBox="0 0 0 0"
446 width="0"
447 height="0"
448 focusable="false"
449 role="none"
450 aria-hidden="true"
451 style="visibility: hidden; position: absolute; left: -9999px; overflow: hidden;"
452 >
453 <defs>
454 <filter id="revision-removed-filter" x="0" y="0" width="100%" height="100%">
455 <!-- Desaturate and add red tint -->
456 <feColorMatrix type="matrix"
457 values="0.5 0.3 0.2 0 0.15
458 0.2 0.2 0.1 0 0
459 0.2 0.2 0.1 0 0
460 0 0 0 0.8 0"/>
461 </filter>
462 </defs>
463 </svg>
464 `,srt=`
465 .is-revision-added {
466 box-shadow: inset 0 0 0 9999px color-mix(in srgb, currentColor 5%, #00a32a 15%), 0 0 0 4px color-mix(in srgb, currentColor 5%, #00a32a 15%);
467 outline: 3px solid #00a32a;
468 outline-offset: 2px;
469 }
470 .is-revision-removed,
471 .revision-diff-removed {
472 text-decoration: line-through;
473 filter: url(#revision-removed-filter);
474 }
475 .is-revision-removed {
476 outline: 3px dashed #d63638;
477 outline-offset: 2px;
478 }
479 .is-revision-modified {
480 outline: 3px dotted #9a7000 !important;
481 outline-offset: 2px;
482 }
483 .revision-diff-added {
484 background-color: color-mix(in srgb, currentColor 5%, #00a32a 15%);
485 text-decoration: none;
486 }
487 .revision-diff-format-added {
488 text-decoration: underline wavy color-mix(in srgb, currentColor 30%, #00a32a 70%);
489 text-decoration-thickness: 2px;
490 }
491 .revision-diff-format-removed {
492 text-decoration: underline wavy color-mix(in srgb, currentColor 20%, #d63638 80%);
493 text-decoration-thickness: 2px;
494 }
495 .revision-diff-format-changed {
496 text-decoration: underline wavy color-mix(in srgb, currentColor 30%, #dba617 70%);
497 text-decoration-thickness: 2px;
498 }
499 `;function art(e){return t=>{let{block:r,className:o}=t,n=r?.__revisionDiffStatus?.status,i=Q(o,{"is-revision-added":n==="added","is-revision-removed":n==="removed","is-revision-modified":n==="modified"});return(0,Na.jsx)(e,{...t,className:i})}}var lrt="editor/revisions-canvas/withRevisionDiffClasses";(0,pEe.addFilter)("editor.BlockListBlock",lrt,art);function crt({showDiff:e}){return cEe({css:e?srt:""}),cEe({assets:e?irt:"",__unstableType:"svgs"}),null}function urt({showDiff:e}){let[t,r]=lEe();return(0,Na.jsxs)(Na.Fragment,{children:[(0,Na.jsx)(AF,{contentRef:t}),e&&r]})}function xG(){(0,mEe.useEffect)(()=>(oEe(),()=>{nEe()}),[]);let{revision:e,showDiff:t}=(0,fEe.useSelect)(r=>{let{getCurrentRevision:o,isShowingRevisionDiff:n}=Y(r(R));return{revision:o(),showDiff:n()}},[]);return e?(0,Na.jsxs)(Na.Fragment,{children:[(0,Na.jsx)(crt,{showDiff:t}),(0,Na.jsx)("div",{className:"editor-revisions-canvas__content",children:(0,Na.jsx)(urt,{showDiff:t})})]}):(0,Na.jsx)("div",{className:"editor-revisions-canvas__loading",children:(0,Na.jsx)(uEe.Spinner,{})})}var FF=a(G(),1),MF=a(H(),1),ec=a(V(),1),hEe=a(Rt(),1),gEe=a(oe(),1),vEe=a(Nt(),1);var{useOnCollaboratorJoin:drt,useOnCollaboratorLeave:frt,useOnPostSave:mrt}=Y(gEe.privateApis),CG={COLLAB_POST_UPDATED:"collab-post-updated",COLLAB_USER_ENTERED:"collab-user-entered",COLLAB_USER_EXITED:"collab-user-exited"},TG=["publish","private","future"];function prt(e,t,r){return r?(0,ec.sprintf)((0,ec.__)("Post published by %s."),e):TG.includes(t)?(0,ec.sprintf)((0,ec.__)("Post updated by %s."),e):(0,ec.sprintf)((0,ec.__)("Draft saved by %s."),e)}function bEe(e,t){let{postStatus:r,isCollaborationEnabled:o,showNotifications:n}=(0,FF.useSelect)(u=>{let{getCurrentPostAttribute:d,isCollaborationEnabledForCurrentPost:f}=Y(u(R));return{postStatus:d("status"),isCollaborationEnabled:f(),showNotifications:u(vEe.store).get("core","showCollaborationNotifications")??!0}},[]),{createNotice:i}=(0,FF.useDispatch)(hEe.store),s=o&&n,l=s?e:null,c=s?t:null;drt(l,c,(0,MF.useCallback)((u,d)=>{d&&u.collaboratorInfo.enteredAt<d.collaboratorInfo.enteredAt||i("info",(0,ec.sprintf)((0,ec.__)("%s has joined the post."),u.collaboratorInfo.name),{id:`${CG.COLLAB_USER_ENTERED}-${u.collaboratorInfo.id}`,type:"snackbar",isDismissible:!1})},[i])),frt(l,c,(0,MF.useCallback)(u=>{i("info",(0,ec.sprintf)((0,ec.__)("%s has left the post."),u.collaboratorInfo.name),{id:`${CG.COLLAB_USER_EXITED}-${u.collaboratorInfo.id}`,type:"snackbar",isDismissible:!1})},[i])),mrt(l,c,(0,MF.useCallback)((u,d,f)=>{if(!r)return;let m=u.postStatus??r??"draft",h=f?.postStatus??r,g=!(h&&TG.includes(h))&&TG.includes(m),v=prt(d.collaboratorInfo.name,m,g);i("info",v,{id:`${CG.COLLAB_POST_UPDATED}-${d.collaboratorInfo.id}`,type:"snackbar",isDismissible:!1})},[i,r]))}var DF=a(G(),1),VE=a(W(),1),EG=a(V(),1),yEe=a(H(),1);var tc=a(T(),1),{Fill:rdr,Slot:hrt}=(0,VE.createSlotFill)("ActionsPanel");function wEe({setEntitiesSavedStatesCallback:e,closeEntitiesSavedStates:t,isEntitiesSavedStatesOpen:r,forceIsDirtyPublishPanel:o}){let{closePublishSidebar:n,togglePublishSidebar:i}=(0,DF.useDispatch)(R),{publishSidebarOpened:s,isPublishable:l,isDirty:c,hasOtherEntitiesChanges:u}=(0,DF.useSelect)(m=>{let{isPublishSidebarOpened:h,isEditedPostPublishable:g,isCurrentPostPublished:v,isEditedPostDirty:b,hasNonPostEntityChanges:S}=m(R),y=S();return{publishSidebarOpened:h(),isPublishable:!v()&&g(),isDirty:y||b(),hasOtherEntitiesChanges:y}},[]),d=(0,yEe.useCallback)(()=>e(!0),[]),f;return s?f=(0,tc.jsx)(V3,{onClose:n,forceIsDirty:o,PrePublishExtension:DM.Slot,PostPublishExtension:OM.Slot}):l&&!u?f=(0,tc.jsx)("div",{className:"editor-layout__toggle-publish-panel",children:(0,tc.jsx)(VE.Button,{__next40pxDefaultSize:!0,variant:"secondary",onClick:i,"aria-expanded":!1,children:(0,EG.__)("Open publish panel")})}):f=(0,tc.jsx)("div",{className:"editor-layout__toggle-entities-saved-states-panel",children:(0,tc.jsx)(VE.Button,{__next40pxDefaultSize:!0,variant:"secondary",onClick:d,"aria-expanded":!1,"aria-haspopup":"dialog",disabled:!c,accessibleWhenDisabled:!0,children:(0,EG.__)("Open save panel")})}),(0,tc.jsxs)(tc.Fragment,{children:[r&&(0,tc.jsx)(gM,{close:t,renderDialog:!0}),(0,tc.jsx)(hrt,{bubblesVirtually:!0}),!r&&f]})}var SEe=a(W(),1),LF=a(G(),1),PG=a(V(),1),_Ee=a(fa(),1),BF=a(H(),1);var xm=a(T(),1);function xEe({autoFocus:e=!1}){let{switchEditorMode:t}=(0,LF.useDispatch)(R),{shortcut:r,isRichEditingEnabled:o}=(0,LF.useSelect)(i=>{let{getEditorSettings:s}=i(R),{getShortcutRepresentation:l}=i(_Ee.store);return{shortcut:l("core/editor/toggle-mode"),isRichEditingEnabled:s().richEditingEnabled}},[]),n=(0,BF.useRef)();return(0,BF.useEffect)(()=>{e||n?.current?.focus()},[e]),(0,xm.jsxs)("div",{className:"editor-text-editor",children:[o&&(0,xm.jsxs)("div",{className:"editor-text-editor__toolbar",children:[(0,xm.jsx)("h2",{children:(0,PG.__)("Editing code")}),(0,xm.jsx)(SEe.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:()=>t("visual"),shortcut:r,children:(0,PG.__)("Exit code editor")})]}),(0,xm.jsxs)("div",{className:"editor-text-editor__body",children:[(0,xm.jsx)(w6,{ref:n}),(0,xm.jsx)(gE,{})]})]})}var Ar=a(T(),1),CEe={header:(0,cg.__)("Editor top bar"),body:(0,cg.__)("Editor content"),sidebar:(0,cg.__)("Editor settings"),actions:(0,cg.__)("Editor publish"),footer:(0,cg.__)("Editor footer")};function TEe(){let e=(0,jE.useSelect)(t=>t(w_.store).isValidTemplate(),[]);return(0,Ar.jsx)(REe.InlineNotices,{className:"editor-notices",pinnedNoticesClassName:"editor-notices__pinned",dismissibleNoticesClassName:"editor-notices__dismissible",children:!e&&(0,Ar.jsx)(dM,{})})}function AEe({className:e,children:t,forceIsDirty:r,contentRef:o,disableIframe:n,autoFocus:i,customSaveButton:s,customSavePanel:l,forceDisableBlockTools:c,iframeProps:u}){let{mode:d,postId:f,postType:m,isInserterOpened:h,isListViewOpened:g,isDistractionFree:v,isPreviewMode:b,showBlockBreadcrumbs:S,postTypeLabel:y,stylesPath:w,showStylebook:_,isRevisionsMode:x,showDiff:E}=(0,jE.useSelect)(F=>{let{get:D}=F(EEe.store),{getEditorSettings:B,getPostTypeLabel:L,getCurrentPostType:M,getCurrentPostId:z}=F(R),{getStylesPath:K,getShowStylebook:Z,isRevisionsMode:q,isShowingRevisionDiff:X}=Y(F(R)),ie=B(),$=F(R).getEditorMode();return!ie.richEditingEnabled&&$==="visual"&&($="text"),!ie.codeEditingEnabled&&$==="text"&&($="visual"),{mode:$,postId:z(),postType:M(),isInserterOpened:F(R).isInserterOpened(),isListViewOpened:F(R).isListViewOpened(),isDistractionFree:D("core","distractionFree"),isPreviewMode:ie.isPreviewMode,showBlockBreadcrumbs:D("core","showBlockBreadcrumbs"),postTypeLabel:L(),stylesPath:K(),showStylebook:Z(),isRevisionsMode:q(),showDiff:X()}},[]),{setShowRevisionDiff:O}=Y((0,jE.useDispatch)(R));bEe(f,m);let A=(0,PEe.useViewportMatch)("medium"),C=g?(0,cg.__)("Document Overview"):(0,cg.__)("Block Library"),I=_||w?.startsWith("/revisions"),k=!I,[P,N]=(0,VF.useState)(!1),U=(0,VF.useCallback)(F=>{typeof P=="function"&&P(F),N(!1)},[P]);return x?(0,Ar.jsx)(Bv,{className:Q("editor-editor-interface",e),labels:CEe,header:(0,Ar.jsx)(pG,{showDiff:E,onToggleDiff:()=>O(!E)}),content:(0,Ar.jsx)(xG,{}),sidebar:(0,Ar.jsx)(Ml.Slot,{scope:"core"})}):(0,Ar.jsx)(Bv,{isDistractionFree:v,className:Q("editor-editor-interface",e,{"is-entity-save-view-open":!!P,"is-distraction-free":v&&!b}),labels:{...CEe,secondarySidebar:C},header:!b&&(0,Ar.jsx)(_Te,{forceIsDirty:r,setEntitiesSavedStatesCallback:N,customSaveButton:s,forceDisableBlockTools:c}),editorNotices:(0,Ar.jsx)(TEe,{}),secondarySidebar:!b&&d==="visual"&&(h&&(0,Ar.jsx)(ETe,{})||g&&(0,Ar.jsx)(ATe,{})),sidebar:!b&&!v&&(0,Ar.jsx)(Ml.Slot,{scope:"core"}),content:(0,Ar.jsxs)(Ar.Fragment,{children:[!v&&!b&&(0,Ar.jsx)(TEe,{}),I&&(0,Ar.jsx)(Qbe,{}),k&&(0,Ar.jsxs)(Ar.Fragment,{children:[!b&&d==="text"&&(0,Ar.jsx)(xEe,{autoFocus:i}),!b&&!A&&d==="visual"&&(0,Ar.jsx)(w_.BlockToolbar,{hideDragHandle:!0}),(b||d==="visual")&&(0,Ar.jsx)(AF,{contentRef:o,disableIframe:n,autoFocus:i,iframeProps:u}),t,(0,Ar.jsx)(cF,{postId:f,postType:m})]})]}),footer:!b&&!v&&A&&S&&d==="visual"&&(0,Ar.jsx)(w_.BlockBreadcrumb,{rootLabelText:y?(0,kEe.decodeEntities)(y):void 0}),actions:b?void 0:l||(0,Ar.jsx)(wEe,{closeEntitiesSavedStates:U,isEntitiesSavedStatesOpen:P,setEntitiesSavedStatesCallback:N,forceIsDirtyPublishPanel:r})})}var mD=a(pe(),1),ZE=a(G(),1),hg=a(H(),1),B_=a(V(),1);var Bke=a(fa(),1),Vke=a(W(),1);var IEe=a(G(),1),OEe=a(mc(),1);var NEe=a(T(),1),{OverridesPanel:grt}=Y(OEe.privateApis);function MEe(){return(0,IEe.useSelect)(t=>t(R).getCurrentPostType()==="wp_block",[])?(0,NEe.jsx)(grt,{}):null}var FG=a(G(),1);var uPe=a(V(),1),Em=a(G(),1),P_=a(oe(),1);var UE=a(H(),1);var FEe=a(H(),1),DEe=a(G(),1),yrt=a(Nt(),1);var wrt=a(G(),1),Srt=a(Nt(),1);var VEe=a(G(),1),jEe=a(oe(),1);var LEe=a(zm(),1),{lock:Vdr,unlock:BEe}=(0,LEe.__dangerousOptInToUnstableAPIsOnlyForCoreModules)("I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.","@wordpress/views");function kG({kind:e,name:t,fields:r}){let o=Array.isArray(r)?r:r?.split(","),n=o?[...o].sort().join(","):void 0;return(0,VEe.useSelect)(i=>BEe(i(jEe.store)).getViewConfig(e,t,{fields:n}),[e,t,n])}var pl=a(W(),1);var JEe=a(oe(),1),$Ee=a(G(),1),ePe=a(H(),1),fg=a(V(),1),tPe=a(Pb(),1);var GF=a(G(),1),HE=a(H(),1),ZEe=a(V(),1),T_=a(W(),1);var XEe=a(oe(),1);var zE=a(G(),1),UF=a(H(),1),qEe=a(oe(),1);var rc=a(V(),1),zEe=a(H(),1),Cm=a(W(),1),__=a(G(),1),zF=a(oe(),1),HEe=a(Rt(),1);var jF=a(Lt(),1);function S_(e){return typeof e.title=="string"?(0,jF.decodeEntities)(e.title):e.title&&"rendered"in e.title?(0,jF.decodeEntities)(e.title.rendered):e.title&&"raw"in e.title?(0,jF.decodeEntities)(e.title.raw):""}var ug=a(T(),1),_rt=({items:e,closeModal:t})=>{let[r]=e,o=S_(r),{showOnFront:n,currentHomePage:i,isSaving:s}=(0,__.useSelect)(g=>{let{getEntityRecord:v,isSavingEntityRecord:b}=g(zF.store),S=v("root","site"),y=v("postType","page",S?.page_on_front);return{showOnFront:S?.show_on_front,currentHomePage:y,isSaving:b("root","site")}}),{saveEntityRecord:l}=(0,__.useDispatch)(zF.store),{createSuccessNotice:c,createErrorNotice:u}=(0,__.useDispatch)(HEe.store);async function d(g){g.preventDefault();try{await l("root","site",{page_on_front:r.id,show_on_front:"page"}),c((0,rc.__)("Homepage updated."),{type:"snackbar"})}catch(v){let b=v.message&&v.code!=="unknown_error"?v.message:(0,rc.__)("An error occurred while setting the homepage.");u(b,{type:"snackbar"})}finally{t?.()}}let f="";n==="posts"?f=(0,rc.__)("This will replace the current homepage which is set to display latest posts."):i&&(f=(0,rc.sprintf)((0,rc.__)('This will replace the current homepage: "%s"'),S_(i)));let m=(0,rc.sprintf)((0,rc.__)('Set "%1$s" as the site homepage? %2$s'),o,f).trim(),h=(0,rc.__)("Set homepage");return(0,ug.jsx)("form",{onSubmit:d,children:(0,ug.jsxs)(Cm.__experimentalVStack,{spacing:"5",children:[(0,ug.jsx)(Cm.__experimentalText,{children:m}),(0,ug.jsxs)(Cm.__experimentalHStack,{justify:"right",children:[(0,ug.jsx)(Cm.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:()=>{t?.()},disabled:s,accessibleWhenDisabled:!0,children:(0,rc.__)("Cancel")}),(0,ug.jsx)(Cm.Button,{__next40pxDefaultSize:!0,variant:"primary",type:"submit",disabled:s,accessibleWhenDisabled:!0,children:h})]})]})})},UEe=()=>{let{pageOnFront:e,pageForPosts:t}=(0,__.useSelect)(r=>{let{getEntityRecord:o,canUser:n}=r(zF.store),i=n("read",{kind:"root",name:"site"})?o("root","site"):void 0;return{pageOnFront:i?.page_on_front,pageForPosts:i?.page_for_posts}});return(0,zEe.useMemo)(()=>({id:"set-as-homepage",label:(0,rc.__)("Set as homepage"),isEligible(r){return!(r.status!=="publish"||r.type!=="page"||e===r.id||t===r.id)},modalFocusOnMount:"firstContentElement",RenderModal:_rt}),[t,e])};var oc=a(V(),1),WEe=a(H(),1),Tm=a(W(),1),x_=a(G(),1),HF=a(oe(),1),GEe=a(Rt(),1);var dg=a(T(),1),xrt=({items:e,closeModal:t})=>{let[r]=e,o=S_(r),{currentPostsPage:n,isPageForPostsSet:i,isSaving:s}=(0,x_.useSelect)(g=>{let{getEntityRecord:v,isSavingEntityRecord:b}=g(HF.store),S=v("root","site");return{currentPostsPage:v("postType","page",S?.page_for_posts),isPageForPostsSet:S?.page_for_posts!==0,isSaving:b("root","site")}}),{saveEntityRecord:l}=(0,x_.useDispatch)(HF.store),{createSuccessNotice:c,createErrorNotice:u}=(0,x_.useDispatch)(GEe.store);async function d(g){g.preventDefault();try{await l("root","site",{page_for_posts:r.id,show_on_front:"page"}),c((0,oc.__)("Posts page updated."),{type:"snackbar"})}catch(v){let b=v.message&&v.code!=="unknown_error"?v.message:(0,oc.__)("An error occurred while setting the posts page.");u(b,{type:"snackbar"})}finally{t?.()}}let f=i&&n?(0,oc.sprintf)((0,oc.__)('This will replace the current posts page: "%s"'),S_(n)):(0,oc.__)("This page will show the latest posts."),m=(0,oc.sprintf)((0,oc.__)('Set "%1$s" as the posts page? %2$s'),o,f),h=(0,oc.__)("Set posts page");return(0,dg.jsx)("form",{onSubmit:d,children:(0,dg.jsxs)(Tm.__experimentalVStack,{spacing:"5",children:[(0,dg.jsx)(Tm.__experimentalText,{children:m}),(0,dg.jsxs)(Tm.__experimentalHStack,{justify:"right",children:[(0,dg.jsx)(Tm.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:()=>{t?.()},disabled:s,accessibleWhenDisabled:!0,children:(0,oc.__)("Cancel")}),(0,dg.jsx)(Tm.Button,{__next40pxDefaultSize:!0,variant:"primary",type:"submit",disabled:s,accessibleWhenDisabled:!0,children:h})]})]})})},YEe=()=>{let{pageOnFront:e,pageForPosts:t}=(0,x_.useSelect)(r=>{let{getEntityRecord:o,canUser:n}=r(HF.store),i=n("read",{kind:"root",name:"site"})?o("root","site"):void 0;return{pageOnFront:i?.page_on_front,pageForPosts:i?.page_for_posts}});return(0,WEe.useMemo)(()=>({id:"set-as-posts-page",label:(0,oc.__)("Set as posts page"),isEligible(r){return!(r.status!=="publish"||r.type!=="page"||e===r.id||t===r.id)},modalFocusOnMount:"firstContentElement",RenderModal:xrt}),[t,e])};var KEe=a(T(),1);function WF({postType:e,onActionPerformed:t,context:r}){let{defaultActions:o}=(0,zE.useSelect)(c=>{let{getEntityActions:u}=Y(c(R));return{defaultActions:u("postType",e)}},[e]),n=(0,zE.useSelect)(c=>{if(e!=="page")return!1;let{getDefaultTemplateId:u,getEntityRecord:d,canUser:f}=c(qEe.store);if(!f("update",{kind:"root",name:"site"}))return!1;let h=u({slug:"front-page"});if(!h)return!0;let g=d("postType","wp_template",h);return g?g.slug!=="front-page":!0},[e]),i=UEe(),s=YEe(),{registerPostTypeSchema:l}=Y((0,zE.useDispatch)(R));return(0,UF.useEffect)(()=>{l(e)},[l,e]),(0,UF.useMemo)(()=>{let c=[...o];if(n&&c.push(i,s),c=c.sort((u,d)=>d.id==="move-to-trash"?-1:0),c=c.filter(u=>u.context?u.context===r:!0),t)for(let u=0;u<c.length;++u){if(c[u].callback){let d=c[u].callback;c[u]={...c[u],callback:(f,m)=>{d(f,{...m,onActionPerformed:h=>{m?.onActionPerformed&&m.onActionPerformed(h),t(c[u].id,h)}})}}}if(c[u].RenderModal){let d=c[u].RenderModal;c[u]={...c[u],RenderModal:f=>(0,KEe.jsx)(d,{...f,onActionPerformed:m=>{f.onActionPerformed&&f.onActionPerformed(m),t(c[u].id,m)}})}}}return c},[r,o,t,i,s,n])}var wi=a(T(),1),{Menu:C_,kebabCase:Crt}=Y(T_.privateApis);function QEe({postType:e,postId:t,onActionPerformed:r}){let[o,n]=(0,HE.useState)(null),{item:i,permissions:s}=(0,GF.useSelect)(d=>{let{getEditedEntityRecord:f,getEntityRecordPermissions:m}=Y(d(XEe.store));return{item:f("postType",e,t),permissions:m("postType",e,t)}},[t,e]),l=(0,HE.useMemo)(()=>({...i,permissions:s}),[i,s]),c=WF({postType:e,onActionPerformed:r}),u=(0,HE.useMemo)(()=>c.filter(d=>!d.isEligible||d.isEligible(l)),[c,l]);return(0,wi.jsxs)(wi.Fragment,{children:[(0,wi.jsxs)(C_,{placement:"bottom-end",children:[(0,wi.jsx)(C_.TriggerButton,{render:(0,wi.jsx)(T_.Button,{size:"small",icon:fo,label:(0,ZEe.__)("Actions"),disabled:!u.length,accessibleWhenDisabled:!0,className:"editor-all-actions-button"})}),(0,wi.jsx)(C_.Popover,{children:(0,wi.jsx)(Prt,{actions:u,items:[l],setActiveModalAction:n})})]}),!!o&&(0,wi.jsx)(Ert,{action:o,items:[l],closeModal:()=>n(null)})]})}function Trt({action:e,onClick:t,items:r}){let o=typeof e.label=="string"?e.label:e.label(r);return(0,wi.jsx)(C_.Item,{onClick:t,children:(0,wi.jsx)(C_.ItemLabel,{children:o})})}function Ert({action:e,items:t,closeModal:r}){let o=typeof e.label=="string"?e.label:e.label(t);return(0,wi.jsx)(T_.Modal,{title:e.modalHeader||o,__experimentalHideHeader:!!e.hideModalHeader,onRequestClose:r??(()=>{}),focusOnMount:"firstContentElement",size:"medium",overlayClassName:`editor-action-modal editor-action-modal__${Crt(e.id)}`,children:(0,wi.jsx)(e.RenderModal,{items:t,closeModal:r})})}function Prt({actions:e,items:t,setActiveModalAction:r}){let o=(0,GF.useRegistry)();return(0,wi.jsx)(C_.Group,{children:e.map(n=>(0,wi.jsx)(Trt,{action:n,onClick:()=>{if("RenderModal"in n){r(n);return}n.callback(t,{registry:o})},items:t},n.id))})}var du=a(T(),1),{Badge:krt}=Y(pl.privateApis);function mg({postType:e,postId:t,hideActions:r=!1,onActionPerformed:o,onClose:n}){let i=(0,ePe.useMemo)(()=>Array.isArray(t)?t:[t],[t]),{postTitle:s,icon:l,labels:c}=(0,$Ee.useSelect)(f=>{let{getEditedEntityRecord:m,getCurrentTheme:h,getPostType:g}=f(JEe.store),{getPostIcon:v,getCurrentPostType:b,isRevisionsMode:S,getCurrentRevision:y}=Y(f(R)),w="";if(S()){let x=b(),E=y();return w=E?.title?.rendered||E?.title?.raw||"",{postTitle:w,icon:v(x,{area:E?.area}),labels:g(x)?.labels}}let _=m("postType",e,i[0]);if(i.length===1){let{default_template_types:x=[]}=h()??{};w=([lr,In].includes(e)?bl({template:_,templateTypes:x}):{})?.title||_?.title}return{postTitle:w,icon:v(e,{area:_?.area}),labels:g(e)?.labels}},[i,e]),u=LN(t),d=(0,fg.__)("No title");return c?.name&&i.length>1?d=(0,fg.sprintf)((0,fg.__)("%1$d %2$s"),i.length,c?.name):s&&(d=(0,tPe.__unstableStripHTML)(s)),(0,du.jsxs)(pl.__experimentalVStack,{spacing:1,className:"editor-post-card-panel",children:[(0,du.jsxs)(pl.__experimentalHStack,{spacing:2,className:"editor-post-card-panel__header",alignment:"flex-start",children:[(0,du.jsx)(pl.Icon,{className:"editor-post-card-panel__icon",icon:l}),(0,du.jsxs)(pl.__experimentalText,{numberOfLines:2,truncate:!0,className:"editor-post-card-panel__title",as:"h2",children:[(0,du.jsx)("span",{className:"editor-post-card-panel__title-name",children:d}),u&&i.length===1&&(0,du.jsx)(krt,{children:u})]}),!r&&i.length===1&&(0,du.jsx)(QEe,{postType:e,postId:i[0],onActionPerformed:o}),n&&(0,du.jsx)(pl.Button,{size:"small",icon:$_,label:(0,fg.__)("Close"),onClick:n})]}),i.length>1&&(0,du.jsx)(pl.__experimentalText,{className:"editor-post-card-panel__description",children:(0,fg.sprintf)((0,fg.__)("Changes will be applied to all selected %s."),c?.name?.toLowerCase())})]})}var rPe=a(W(),1),oPe=a(T(),1);function Rrt({className:e,children:t}){return(0,oPe.jsx)(rPe.__experimentalVStack,{className:Q("editor-post-panel__section",e),children:t})}var E_=Rrt;var lPe=a(V(),1);var nPe=a(W(),1),YF=a(G(),1),qF=a(V(),1),iPe=a(uo(),1);var sPe=a(T(),1);function aPe(){let{lastRevisionId:e,revisionsCount:t,disableVisualRevisions:r}=(0,YF.useSelect)(i=>{let{getCurrentPostLastRevisionId:s,getCurrentPostRevisionsCount:l,getEditorSettings:c}=i(R);return{lastRevisionId:s(),revisionsCount:l(),disableVisualRevisions:!!c().disableVisualRevisions}},[]),{setCurrentRevisionId:o}=Y((0,YF.useDispatch)(R)),n=r?{href:(0,iPe.addQueryArgs)("revision.php",{revision:e})}:{onClick:()=>o(e)};return(0,sPe.jsx)(nPe.Button,{...n,variant:"link",text:String(t),"aria-label":(0,qF.sprintf)((0,qF._n)("Open revisions screen: %d revision","Open revisions screen: %d revisions",t),t)})}var Art={id:"revisions",label:(0,lPe.__)("Revisions"),readOnly:!0,enableSorting:!1,render:aPe,isVisible:e=>{let t=e._links?.["version-history"]?.[0]?.count??0;return!!(e._links?.["predecessor-version"]?.[0]?.id??null)&&t>=2}},cPe=Art;var cy=a(T(),1),Irt={layout:{type:"panel"},fields:[]},Ort=["form"];function Nrt(e){let{isPostStatusRemoved:t,featuredImageEnabled:r,excerptEnabled:o,discussionEnabled:n,pageAttributesEnabled:i}=(0,Em.useSelect)(l=>{let{isEditorPanelRemoved:c,isEditorPanelEnabled:u}=l(R);return{isPostStatusRemoved:c("post-status"),featuredImageEnabled:u("featured-image"),excerptEnabled:u("post-excerpt"),discussionEnabled:u("discussion-panel"),pageAttributesEnabled:u("page-attributes")}},[]);return(0,UE.useMemo)(()=>{if(!e.fields?.length)return e;let l={featured_media:r,excerpt:o,"post-content-info":!0,discussion:n&&!t,parent:i&&!t},c=d=>d in l?l[d]:!t,u=d=>d.reduce((f,m)=>{let h=typeof m=="string"?m:m.id;if(!c(h))return f;if(typeof m!="string"&&Array.isArray(m.children)){let g=u(m.children);return g.length&&f.push({...m,children:g}),f}return f.push(m),f},[]);return{...e,fields:u(e.fields)}},[e,t,r,o,n,i])}var KF={wp_template:{root_site:{kind:"root",name:"site",fields:["posts_per_page","default_comment_status"],isVisible:e=>["home","index"].includes(e.slug??"")},posttype_page:{kind:"postType",name:"page",getId:e=>e(P_.store).getEditedEntityRecord("root","site")?.page_for_posts,fields:["posts_page_title"],isVisible:e=>["home","index"].includes(e.slug??"")}}};function Mrt(e,t,r=()=>!0){let o=n=>n?.[t]??{};return{...e,getValue:({item:n})=>e.getValue?e.getValue({item:o(n)}):o(n)[e.id],setValue:({item:n,value:i})=>({[t]:e.setValue({item:o(n),value:i})}),render:e.render?n=>e.render({...n,item:o(n.item)}):void 0,isVisible:n=>r(n)&&!!n[t]}}function dPe({onActionPerformed:e}){let{postType:t,postId:r,isPostStatusRemoved:o,availableTemplates:n}=(0,Em.useSelect)(S=>{let{getCurrentPostType:y,getCurrentPostId:w,isEditorPanelRemoved:_,getEditorSettings:x}=S(R),E=S(P_.store).getCurrentTheme()?.is_block_theme?null:x().availableTemplates??null;return{postType:y(),postId:w(),isPostStatusRemoved:_("post-status"),availableTemplates:E}},[]),{form:i}=kG({kind:"postType",name:t,fields:Ort}),s=Nrt(i??Irt),l=(0,Em.useSelect)(S=>!t||!r?null:S(P_.store).getEditedEntityRecord("postType",t,r),[t,r]),c=wS(),u=(0,Em.useSelect)(S=>{let{getEditedEntityRecord:y,canUser:w}=S(P_.store),_={};for(let[x,E]of Object.entries(KF[t]??{})){if(!w("read",{kind:E.kind,name:E.name}))continue;let O=E.getId?E.getId(S):void 0;E.getId&&!O||(_[x]=y(E.kind,E.name,O))}return _},[t]),d=(0,UE.useMemo)(()=>{if(!l)return l;let S={...u};return n&&Object.keys(n).length&&(S.available_templates=n),{...l,...S}},[l,u,n]),{editEntityRecord:f}=(0,Em.useDispatch)(P_.store),m=(0,Em.useRegistry)(),h=(0,UE.useMemo)(()=>{let S={};for(let[y,w]of Object.entries(KF[t]??{}))for(let _ of w.fields??[])S[_]=y;return S},[t]),g=rS({postType:t}),v=(0,UE.useMemo)(()=>g?.map(S=>{let y=h[S.id];return y?Mrt(S,y,KF[t]?.[y]?.isVisible):S.id==="status"?{...S,elements:S.elements.filter(w=>w.value!=="trash")}:S.id==="template"?c?c==="classic"&&Object.keys(n??{}).length===0?{...S,readOnly:!0,render:()=>(0,uPe.__)("Default template")}:S:null:S}).filter(Boolean).concat(cPe),[g,c,n,h,t]);return(0,cy.jsx)(E_,{className:"editor-post-summary",children:(0,cy.jsxs)(ne,{direction:"column",gap:"lg",children:[(0,cy.jsx)(mg,{postType:t,postId:r,onActionPerformed:e}),(0,cy.jsx)(TC,{data:d,fields:v,form:s,onChange:S=>{let y=KF[t]??{},w={};for(let[_,x]of Object.entries(S)){let E=y[_];if(E){let O=E.getId?E.getId(m.select):void 0;f(E.kind,E.name,O,x)}else w[_]=x}Object.keys(w).length&&(w.status&&w.status!=="future"&&l?.status==="future"&&new Date(l.date)>new Date&&(w.date=null),w.status&&w.status==="private"&&l?.password&&(w.password=""),f("postType",t,r,w))}}),!o&&(0,cy.jsx)(e_,{onActionPerformed:e})]})})}var fPe=a(W(),1),mPe=a(G(),1),nc=a(V(),1),pPe=a(g0(),1),hPe=a(H(),1),RG=a(oe(),1);var ZF=a(T(),1),Frt=189;function gPe(){let e=(0,mPe.useSelect)(t=>{let{getEditedPostAttribute:r,getCurrentPostType:o,getCurrentPostId:n}=t(R),{canUser:i}=t(RG.store),{getEntityRecord:s}=t(RG.store),l=i("read",{kind:"root",name:"site"})?s("root","site"):void 0,c=o();return!(+n()===l?.page_for_posts)&&![lr,In].includes(c)&&r("content")},[]);return(0,ZF.jsx)(AG,{postContent:e})}function AG({postContent:e}){let t=(0,nc._x)("words","Word count type. Do not translate!"),r=(0,hPe.useMemo)(()=>e?(0,pPe.count)(e,t):0,[e,t]);if(!r)return null;let o=Math.round(r/Frt),n=(0,nc.sprintf)((0,nc._n)("%s word","%s words",r),r.toLocaleString()),i=o<=1?(0,nc.__)("1 minute"):(0,nc.sprintf)((0,nc._n)("%s minute","%s minutes",o),o.toLocaleString());return(0,ZF.jsx)("div",{className:"editor-post-content-information",children:(0,ZF.jsx)(fPe.__experimentalText,{children:(0,nc.sprintf)((0,nc.__)("%1$s, %2$s read time."),n,i)})})}var XF=a(W(),1),k_=a(V(),1),vPe=a(G(),1),QF=a(H(),1),bPe=a(pe(),1);var Pm=a(T(),1);function Drt(){let{postFormat:e}=(0,vPe.useSelect)(i=>{let{getEditedPostAttribute:s}=i(R);return{postFormat:s("format")??"standard"}},[]),t=eE.find(i=>i.id===e),[r,o]=(0,QF.useState)(null),n=(0,QF.useMemo)(()=>({anchor:r,placement:"left-start",offset:36,shift:!0}),[r]);return(0,Pm.jsx)(IS,{children:(0,Pm.jsx)(fr,{label:(0,k_.__)("Format"),ref:o,children:(0,Pm.jsx)(XF.Dropdown,{popoverProps:n,contentClassName:"editor-post-format__dialog",focusOnMount:!0,renderToggle:({isOpen:i,onToggle:s})=>(0,Pm.jsx)(XF.Button,{size:"compact",variant:"tertiary","aria-expanded":i,"aria-label":(0,k_.sprintf)((0,k_.__)("Change format: %s"),t?.caption),onClick:s,children:t?.caption}),renderContent:({onClose:i})=>(0,Pm.jsxs)("div",{className:"editor-post-format__dialog-content",children:[(0,Pm.jsx)(bPe.__experimentalInspectorPopoverHeader,{title:(0,k_.__)("Format"),onClose:i}),(0,Pm.jsx)(tE,{})]})})})})}var yPe=Drt;var wPe=a(W(),1),SPe=a(G(),1),JF=a(V(),1),_Pe=a(en(),1);var IG=a(T(),1);function xPe(){let e=(0,SPe.useSelect)(t=>t(R).getEditedPostAttribute("modified"),[]);return e?(0,IG.jsx)("div",{className:"editor-post-last-edited-panel",children:(0,IG.jsx)(wPe.__experimentalText,{children:(0,JF.sprintf)((0,JF.__)("Last edited %s."),(0,_Pe.humanTimeDiff)(e))})}):null}var km=a(V(),1),CPe=a(ke(),1),$F=a(G(),1),OG=a(oe(),1),TPe=a(Lt(),1),R_=a(W(),1),eD=a(H(),1),EPe=a(pe(),1);var Fd=a(T(),1),Lrt={};function PPe(){let{editEntityRecord:e}=(0,$F.useDispatch)(OG.store),{postsPageTitle:t,postsPageId:r,isTemplate:o,postSlug:n}=(0,$F.useSelect)(d=>{let{getEntityRecord:f,getEditedEntityRecord:m,canUser:h}=d(OG.store),g=h("read",{kind:"root",name:"site"})?f("root","site"):void 0,v=g?.page_for_posts?m("postType","page",g?.page_for_posts):Lrt,{getEditedPostAttribute:b,getCurrentPostType:S}=d(R);return{postsPageId:v?.id,postsPageTitle:v?.title,isTemplate:S()===lr,postSlug:b("slug")}},[]),[i,s]=(0,eD.useState)(null),l=(0,eD.useMemo)(()=>({anchor:i,placement:"left-start",offset:36,shift:!0}),[i]);if(!o||!["home","index"].includes(n)||!r)return null;let c=d=>{e("postType","page",r,{title:d})},u=(0,TPe.decodeEntities)(t);return(0,Fd.jsx)(fr,{label:(0,km.__)("Blog title"),ref:s,children:(0,Fd.jsx)(R_.Dropdown,{popoverProps:l,contentClassName:"editor-blog-title-dropdown__content",focusOnMount:!0,renderToggle:({isOpen:d,onToggle:f})=>(0,Fd.jsx)(R_.Button,{size:"compact",variant:"tertiary","aria-expanded":d,"aria-label":(0,km.sprintf)((0,km.__)("Change blog title: %s"),u),onClick:f,children:u}),renderContent:({onClose:d})=>(0,Fd.jsxs)(Fd.Fragment,{children:[(0,Fd.jsx)(EPe.__experimentalInspectorPopoverHeader,{title:(0,km.__)("Blog title"),onClose:d}),(0,Fd.jsx)(R_.__experimentalInputControl,{placeholder:(0,km.__)("No title"),size:"__unstable-large",value:t,onChange:(0,CPe.debounce)(c,300),label:(0,km.__)("Blog title"),help:(0,km.__)("Set the Posts Page title. Appears in search results, and when the page is shared on social media."),hideLabelFromVision:!0})]})})})}var A_=a(V(),1),tD=a(G(),1),NG=a(oe(),1),I_=a(W(),1),rD=a(H(),1),kPe=a(pe(),1);var Dd=a(T(),1);function RPe(){let{editEntityRecord:e}=(0,tD.useDispatch)(NG.store),{postsPerPage:t,isTemplate:r,postSlug:o}=(0,tD.useSelect)(c=>{let{getEditedPostAttribute:u,getCurrentPostType:d}=c(R),{getEditedEntityRecord:f,canUser:m}=c(NG.store),h=m("read",{kind:"root",name:"site"})?f("root","site"):void 0;return{isTemplate:d()===lr,postSlug:u("slug"),postsPerPage:h?.posts_per_page||1}},[]),[n,i]=(0,rD.useState)(null),s=(0,rD.useMemo)(()=>({anchor:n,placement:"left-start",offset:36,shift:!0}),[n]);if(!r||!["home","index"].includes(o))return null;let l=c=>{e("root","site",void 0,{posts_per_page:c})};return(0,Dd.jsx)(fr,{label:(0,A_.__)("Posts per page"),ref:i,children:(0,Dd.jsx)(I_.Dropdown,{popoverProps:s,contentClassName:"editor-posts-per-page-dropdown__content",focusOnMount:!0,renderToggle:({isOpen:c,onToggle:u})=>(0,Dd.jsx)(I_.Button,{size:"compact",variant:"tertiary","aria-expanded":c,"aria-label":(0,A_.__)("Change posts per page"),onClick:u,children:t}),renderContent:({onClose:c})=>(0,Dd.jsxs)(Dd.Fragment,{children:[(0,Dd.jsx)(kPe.__experimentalInspectorPopoverHeader,{title:(0,A_.__)("Posts per page"),onClose:c}),(0,Dd.jsx)(I_.__experimentalNumberControl,{placeholder:0,value:t,size:"__unstable-large",spinControls:"custom",step:"1",min:"1",onChange:l,label:(0,A_.__)("Posts per page"),help:(0,A_.__)("Set the default number of posts to display on blog pages, including categories and tags. Some templates may override this setting."),hideLabelFromVision:!0})]})})})}var Ma=a(V(),1),oD=a(G(),1),MG=a(oe(),1),Ld=a(W(),1),nD=a(H(),1),APe=a(pe(),1);var ic=a(T(),1),Brt=[{label:(0,Ma._x)("Open",'Adjective: e.g. "Comments are open"'),value:"open",description:(0,Ma.__)("Visitors can add new comments and replies.")},{label:(0,Ma.__)("Closed"),value:"",description:[(0,Ma.__)("Visitors cannot add new comments or replies."),(0,Ma.__)("Existing comments remain visible.")].join(" ")}];function IPe(){let{editEntityRecord:e}=(0,oD.useDispatch)(MG.store),{allowCommentsOnNewPosts:t,isTemplate:r,postSlug:o}=(0,oD.useSelect)(c=>{let{getEditedPostAttribute:u,getCurrentPostType:d}=c(R),{getEditedEntityRecord:f,canUser:m}=c(MG.store),h=m("read",{kind:"root",name:"site"})?f("root","site"):void 0;return{isTemplate:d()===lr,postSlug:u("slug"),allowCommentsOnNewPosts:h?.default_comment_status||""}},[]),[n,i]=(0,nD.useState)(null),s=(0,nD.useMemo)(()=>({anchor:n,placement:"left-start",offset:36,shift:!0}),[n]);if(!r||!["home","index"].includes(o))return null;let l=c=>{e("root","site",void 0,{default_comment_status:c?"open":null})};return(0,ic.jsx)(fr,{label:(0,Ma.__)("Discussion"),ref:i,children:(0,ic.jsx)(Ld.Dropdown,{popoverProps:s,contentClassName:"editor-site-discussion-dropdown__content",focusOnMount:!0,renderToggle:({isOpen:c,onToggle:u})=>(0,ic.jsx)(Ld.Button,{size:"compact",variant:"tertiary","aria-expanded":c,"aria-label":(0,Ma.__)("Change discussion settings"),onClick:u,children:t?(0,Ma.__)("Comments open"):(0,Ma.__)("Comments closed")}),renderContent:({onClose:c})=>(0,ic.jsxs)(ic.Fragment,{children:[(0,ic.jsx)(APe.__experimentalInspectorPopoverHeader,{title:(0,Ma.__)("Discussion"),onClose:c}),(0,ic.jsxs)(Ld.__experimentalVStack,{spacing:3,children:[(0,ic.jsx)(Ld.__experimentalText,{children:(0,Ma.__)("Changes will apply to new posts only. Individual posts may override these settings.")}),(0,ic.jsx)(Ld.RadioControl,{className:"editor-site-discussion__options",hideLabelFromVision:!0,label:(0,Ma.__)("Comment status"),options:Brt,onChange:l,selected:t})]})]})})})}var er=a(T(),1),Vrt="post-status";function OPe({onActionPerformed:e}){let t=(0,FG.useSelect)(r=>r(R).getCurrentPostType(),[]);return window?.__experimentalDataFormInspector&&["page","post","wp_template","wp_template_part"].includes(t)?(0,er.jsx)(dPe,{onActionPerformed:e}):(0,er.jsx)(jrt,{onActionPerformed:e})}function jrt({onActionPerformed:e}){let{isRemovedPostStatusPanel:t,postType:r,postId:o}=(0,FG.useSelect)(n=>{let{isEditorPanelRemoved:i,getCurrentPostType:s,getCurrentPostId:l}=n(R);return{isRemovedPostStatusPanel:i(Vrt),postType:s(),postId:l()}},[]);return(0,er.jsx)(E_,{className:"editor-post-summary",children:(0,er.jsx)(MM.Slot,{children:n=>(0,er.jsx)(er.Fragment,{children:(0,er.jsxs)(ne,{direction:"column",gap:"lg",children:[(0,er.jsx)(mg,{postType:r,postId:o,onActionPerformed:e}),(0,er.jsx)(d3,{withPanelBody:!1}),(0,er.jsx)(Jwe,{}),(0,er.jsxs)(ne,{direction:"column",gap:"xs",children:[(0,er.jsx)(gPe,{}),(0,er.jsx)(xPe,{})]}),!t&&(0,er.jsxs)(ne,{direction:"column",gap:"lg",children:[(0,er.jsxs)(ne,{direction:"column",gap:"xs",children:[(0,er.jsx)(TW,{}),(0,er.jsx)(e6,{}),(0,er.jsx)(R6,{}),(0,er.jsx)(GM,{}),(0,er.jsx)(BM,{}),(0,er.jsx)(t3,{}),(0,er.jsx)(hSe,{}),(0,er.jsx)(_M,{}),(0,er.jsx)(o6,{}),(0,er.jsx)(PPe,{}),(0,er.jsx)(RPe,{}),(0,er.jsx)(IPe,{}),(0,er.jsx)(yPe,{}),n]}),(0,er.jsx)(e_,{onActionPerformed:e})]})]})})})})}var GPe=a(G(),1),aD=a(W(),1),YPe=a(V(),1),qPe=a(uo(),1);var iD=a(G(),1),FPe=a(oe(),1);var Am=a(en(),1),fu=a(H(),1),DG=a(V(),1);var Rm=a(T(),1),zrt=10,NPe=[],Hrt={pickerActivity:!0},Urt={type:"pickerActivity",titleField:"date",descriptionField:"details",fields:["author"],layout:{density:"compact"},page:1,perPage:zrt},Wrt=864e5;function MPe(e){let t=(0,Am.getDate)(null).getTime(),r=(0,Am.getDate)(e??null);return t-r.getTime()>Wrt?(0,Am.dateI18n)((0,Am.getSettings)().formats.datetimeAbbreviated,r):(0,Am.humanTimeDiff)(r)}function DPe(){let{setCurrentRevisionId:e}=Y((0,iD.useDispatch)(R)),[t,r]=(0,fu.useState)(Urt),{revisions:o,revisionKey:n,currentRevisionId:i,currentRevision:s}=(0,iD.useSelect)(v=>{let{getCurrentPostType:b}=v(R),{getCurrentRevisionId:S,getCurrentRevision:y,getRevisionPage:w,getPageRevisions:_}=Y(v(R)),{getEntityConfig:x}=v(FPe.store),E=b(),A=x("postType",E)?.revisionKey||"id",C=S();return{revisions:_(w()),revisionKey:A,currentRevisionId:C,currentRevision:C?y():void 0}},[]),l=s?.content?.raw,c=!o,u=(0,fu.useMemo)(()=>[{id:"date",label:(0,DG.__)("Date"),getValue:({item:v})=>MPe(v.date),render:({item:v})=>(0,Rm.jsx)(_c,{variant:"heading-sm",render:(0,Rm.jsx)("time",{dateTime:v.date}),children:MPe(v.date)}),enableSorting:!1,enableHiding:!1},N1,{id:"details",label:(0,DG.__)("Details"),render:({item:v})=>String(v[n])!==String(i)?null:(0,Rm.jsx)(AG,{postContent:l}),enableSorting:!1,enableHiding:!1}],[n,i,l]),{data:d,paginationInfo:f}=(0,fu.useMemo)(()=>gz(o||NPe,t,u),[o,t,u]);(0,fu.useEffect)(()=>{if(!i||!o)return;let v=o.findIndex(S=>String(S[n])===String(i));if(v<0)return;let b=Math.floor(v/t.perPage)+1;r(S=>S.page===b?S:{...S,page:b})},[i,o,n,t.perPage]);let m=(0,fu.useMemo)(()=>i?[String(i)]:NPe,[i]),h=(0,fu.useCallback)(v=>{if(v.length===0)return;let b=v[v.length-1];e(Number(b))},[e]),g=(0,fu.useCallback)(v=>String(v[n]),[n]);return(0,Rm.jsx)("div",{className:"editor-post-revisions-timeline",children:(0,Rm.jsxs)(wC,{view:t,onChangeView:r,fields:u,data:d,isLoading:c,paginationInfo:f,defaultLayouts:Hrt,getItemId:g,selection:m,onChangeSelection:h,children:[(0,Rm.jsx)(wC.Layout,{}),(0,Rm.jsx)(wC.Footer,{})]})})}var jPe=a(G(),1),zPe=a(H(),1),HPe=a(V(),1);var LPe=a(W(),1);var pg=a(T(),1);function sD({title:e,entries:t,initialOpen:r,className:o}){if(!t)return null;let n=Object.entries(t).map(([i,s])=>(0,pg.jsx)(fr,{label:i,children:(0,pg.jsx)("span",{className:"editor-revision-fields-diff__value",children:s.map((l,c)=>l.added?(0,pg.jsx)("ins",{className:"editor-revision-fields-diff__added",children:l.value},c):l.removed?(0,pg.jsx)("del",{className:"editor-revision-fields-diff__removed",children:l.value},c):(0,pg.jsx)("span",{children:l.value},c))})},i));return(0,pg.jsx)(LPe.PanelBody,{title:e,initialOpen:r,children:(0,pg.jsx)("div",{className:o,children:n})})}var UPe=a(T(),1);function BPe(e){return e==null?"":typeof e=="object"?JSON.stringify(e,null,2):String(e)}function VPe(e){return!e||e==="[]"||e==="{}"}function WPe(){let{revision:e,previousRevision:t}=(0,jPe.useSelect)(o=>{let{getCurrentRevision:n,getPreviousRevision:i}=Y(o(R));return{revision:n(),previousRevision:i()}},[]),r=(0,zPe.useMemo)(()=>{if(!e)return null;let o=e.meta??{},n=t?.meta??{},i=new Set([...Object.keys(o),...Object.keys(n)]),s={};for(let l of i){let c=BPe(o[l]),u=BPe(n[l]);VPe(c)&&VPe(u)||(s[l]=Qw(u,c))}return Object.keys(s).length===0?null:s},[e,t]);return(0,UPe.jsx)(sD,{title:(0,HPe.__)("Meta"),entries:r,initialOpen:!1,className:"editor-revision-meta-diff__content"})}var mu=a(T(),1);function KPe(){let{revisionId:e,postId:t}=(0,GPe.useSelect)(r=>{let{getCurrentRevisionId:o,getCurrentPostId:n}=Y(r(R));return{revisionId:o(),postId:n()}},[]);return e?(0,mu.jsxs)(mu.Fragment,{children:[(0,mu.jsx)(E_,{className:"editor-post-summary",children:(0,mu.jsxs)(aD.__experimentalVStack,{spacing:4,children:[(0,mu.jsx)(mg,{postId:t,hideActions:!0}),(0,mu.jsx)(aD.ExternalLink,{href:(0,qPe.addQueryArgs)("revision.php",{revision:e}),children:(0,YPe.__)("Open classic revisions screen")})]})}),(0,mu.jsx)(WPe,{}),(0,mu.jsx)(DPe,{})]}):null}var GE=a(G(),1),BG=a(oe(),1),tke=a(W(),1),VG=a(V(),1),rke=a(pe(),1),oke=a(kt(),1);var ZPe=a(G(),1),XPe=a(H(),1),LG=a(oe(),1),QPe=a(kt(),1),JPe=a(mc(),1);var{EXCLUDED_PATTERN_SOURCES:Grt,PATTERN_TYPES:Yrt}=Y(JPe.privateApis);function $Pe(e,t){return e.innerBlocks=e.innerBlocks.map(r=>$Pe(r,t)),e.name==="core/template-part"&&e.attributes.theme===void 0&&(e.attributes.theme=t),e}function qrt(e,t){let r=(i,s,l)=>s===l.findIndex(c=>i.name===c.name),o=i=>t.area==="navigation-overlay"&&i.blockTypes?.includes("core/template-part/navigation-overlay")?!0:!Grt.includes(i.source),n=i=>i.templateTypes?.includes(t.slug)||i.blockTypes?.includes("core/template-part/"+t.area);return e.filter((i,s,l)=>r(i,s,l)&&o(i)&&n(i))}function Krt(e,t){return e.map(r=>({...r,keywords:r.keywords||[],type:Yrt.theme,blocks:(0,QPe.parse)(r.content,{__unstableSkipMigrationLogs:!0}).map(o=>$Pe(o,t))}))}function eke({area:e,name:t,slug:r}){let{blockPatterns:o,restBlockPatterns:n,currentThemeStylesheet:i}=(0,ZPe.useSelect)(s=>{let{getEditorSettings:l}=s(R),c=l();return{blockPatterns:c.__experimentalAdditionalBlockPatterns??c.__experimentalBlockPatterns,restBlockPatterns:s(LG.store).getBlockPatterns(),currentThemeStylesheet:s(LG.store).getCurrentTheme().stylesheet}},[]);return(0,XPe.useMemo)(()=>{let s=[...o||[],...n||[]],l=qrt(s,{area:e,name:t,slug:r});return Krt(l,i)},[e,t,r,o,n,i])}var WE=a(T(),1);function Zrt({availableTemplates:e,onSelect:t}){return!e||e?.length===0?null:(0,WE.jsx)(rke.__experimentalBlockPatternsList,{label:(0,VG.__)("Templates"),blockPatterns:e,onClickPattern:t,showTitlesAsTooltip:!0})}function Xrt(){let{area:e,name:t,slug:r,postType:o,postId:n}=(0,GE.useSelect)(c=>{let{getCurrentPostType:u,getCurrentPostId:d}=c(R),{getEditedEntityRecord:f}=c(BG.store),m=u(),h=d(),g=f("postType",m,h);return{area:g?.area,name:g?.name,slug:g?.slug,postType:m,postId:h}},[]),{editEntityRecord:i}=(0,GE.useDispatch)(BG.store),s=eke({area:e,name:t,slug:r}),l=async c=>{await i("postType",o,n,{blocks:c.blocks,content:(0,oke.serialize)(c.blocks)})};return s?.length?(0,WE.jsx)(tke.PanelBody,{title:(0,VG.__)("Design"),initialOpen:o===In,children:(0,WE.jsx)(Zrt,{availableTemplates:s,onSelect:l})}):null}function nke(){let{postType:e}=(0,GE.useSelect)(t=>{let{getCurrentPostType:r}=t(R);return{postType:r()}},[]);return[In,lr].includes(e)?(0,WE.jsx)(Xrt,{}):null}var ike=a(W(),1),YE=a(V(),1),ske=a(G(),1),ake=a(H(),1),lke=a(Lt(),1);var qE=a(T(),1),{Tabs:jG}=Y(ike.privateApis),Qrt=(e,t)=>{let{postTypeLabel:r,isRevisionsMode:o}=(0,ske.useSelect)(i=>{let{getPostTypeLabel:s}=i(R),{isRevisionsMode:l}=Y(i(R));return{postTypeLabel:s(),isRevisionsMode:l()}},[]),n;return o?n=(0,YE.__)("Revision"):r?n=(0,lke.decodeEntities)(r):n=(0,YE._x)("Document","noun, panel"),(0,qE.jsxs)(jG.TabList,{ref:t,children:[(0,qE.jsx)(jG.Tab,{tabId:Ia.document,"data-tab-id":Ia.document,children:n}),(0,qE.jsx)(jG.Tab,{tabId:Ia.block,"data-tab-id":Ia.block,children:(0,YE.__)("Block")})]})},cke=(0,ake.forwardRef)(Qrt);var O_=a(G(),1),N_=a(oe(),1),zG=a(pe(),1),Om=a(W(),1),HG=a(H(),1),Im=a(V(),1),uke=a(Lt(),1),lD=a(go(),1),dke=a(Rt(),1),fke=a(Nt(),1);var kn=a(T(),1);function mke(){let e=(0,O_.useSelect)(x=>x(R).getCurrentTemplateId(),[]),[t,r]=(0,HG.useState)(!1),[o,n]=(0,HG.useState)(!1),s=!!KT()?.length,{onNavigateToEntityRecord:l,canCreateTemplate:c,hasGoBack:u,getEditorSettings:d}=(0,O_.useSelect)(x=>{let{getEditorSettings:E}=x(R),O=E();return{onNavigateToEntityRecord:O.onNavigateToEntityRecord,canCreateTemplate:!!x(N_.store).canUser("create",{kind:"postType",name:"wp_template"}),hasGoBack:O.hasOwnProperty("onNavigateToPreviousEntityRecord"),getEditorSettings:E}},[]),{get:f}=(0,O_.useSelect)(fke.store),{createSuccessNotice:m}=(0,O_.useDispatch)(dke.store),{editedRecord:h,hasResolved:g}=(0,N_.useEntityRecord)("postType","wp_template",e),[v]=(0,N_.useEntityBlockEditor)("postType","wp_template",{id:e});if(!g)return null;let b=u?[{label:(0,Im.__)("Go back"),onClick:()=>d().onNavigateToPreviousEntityRecord()}]:void 0,S=()=>{f("core/edit-site","welcomeGuideTemplate")||m((0,Im.__)("Editing template. Changes made here affect all posts and pages that use the template."),{type:"snackbar",actions:b})},y=(0,uke.decodeEntities)(h.title),w=!!v?.length&&(0,kn.jsx)(zG.BlockPreview.Async,{children:(0,kn.jsx)(zG.BlockPreview,{blocks:v})}),_=()=>{if(!w)return null;if(s){let x=(0,Im.__)("Change template");return(0,kn.jsxs)(We.Root,{children:[(0,kn.jsx)(We.Trigger,{render:(0,kn.jsx)("div",{className:"editor-template-actions-panel__preview",role:"button",tabIndex:0,"aria-label":x,onClick:()=>n(!0),onKeyDown:E=>{(E.keyCode===lD.ENTER||E.keyCode===lD.SPACE)&&(E.preventDefault(),n(!0))},children:w})}),(0,kn.jsx)(We.Popup,{children:x})]})}return(0,kn.jsx)("div",{className:"editor-template-actions-panel__preview",children:w})};return(0,kn.jsxs)(kn.Fragment,{children:[(0,kn.jsx)(Om.PanelBody,{title:(0,Im.sprintf)((0,Im.__)("Template: %s"),y),initialOpen:!1,children:(0,kn.jsxs)(Om.__experimentalVStack,{children:[_(),(0,kn.jsxs)(Om.__experimentalHStack,{children:[l&&(0,kn.jsx)(Om.Button,{className:"editor-template-actions-panel__action",__next40pxDefaultSize:!0,variant:"secondary",onClick:()=>{l({postId:h.id,postType:"wp_template"}),S()},children:(0,Im.__)("Edit")}),c&&(0,kn.jsx)(Om.Button,{className:"editor-template-actions-panel__action",__next40pxDefaultSize:!0,variant:"secondary",onClick:()=>r(!0),children:(0,Im.__)("Create new")})]})]})}),t&&(0,kn.jsx)(Bh,{onClose:()=>r(!1)}),o&&(0,kn.jsx)(YU,{onRequestClose:()=>n(!1)})]})}var M_=a(G(),1),F_=a(oe(),1),UG=a(pe(),1),hu=a(W(),1),pke=a(H(),1),pu=a(V(),1),hke=a(Lt(),1),gke=a(Rt(),1),vke=a(Nt(),1);var Bs=a(T(),1);function bke(){let e=(0,M_.useSelect)(v=>v(R).getCurrentTemplateId(),[]),[t,r]=(0,pke.useState)(!1),{onNavigateToEntityRecord:o,canCreateTemplate:n,hasGoBack:i,getEditorSettings:s}=(0,M_.useSelect)(v=>{let{getEditorSettings:b}=v(R),S=b();return{onNavigateToEntityRecord:S.onNavigateToEntityRecord,canCreateTemplate:!!v(F_.store).canUser("create",{kind:"postType",name:"wp_template"})&&S.supportsTemplateMode,hasGoBack:S.hasOwnProperty("onNavigateToPreviousEntityRecord"),getEditorSettings:b}},[]),{get:l}=(0,M_.useSelect)(vke.store),{createSuccessNotice:c}=(0,M_.useDispatch)(gke.store),{editedRecord:u}=(0,F_.useEntityRecord)("postType","wp_template",e),[d]=(0,F_.useEntityBlockEditor)("postType","wp_template",{id:e});if(!e&&!n)return null;let f=i?[{label:(0,pu.__)("Go back"),onClick:()=>s().onNavigateToPreviousEntityRecord()}]:void 0,m=()=>{l("core/edit-site","welcomeGuideTemplate")||c((0,pu.__)("Editing template. Changes made here affect all posts and pages that use the template."),{type:"snackbar",actions:f})},h=u?(0,hke.decodeEntities)(u.title):void 0,g=!!d?.length&&(0,Bs.jsx)(UG.BlockPreview.Async,{children:(0,Bs.jsx)(UG.BlockPreview,{blocks:d})});return(0,Bs.jsxs)(Bs.Fragment,{children:[(0,Bs.jsx)(hu.PanelBody,{title:u?(0,pu.sprintf)((0,pu.__)("Template: %s"),h):(0,pu.__)("Template"),initialOpen:!1,children:(0,Bs.jsxs)(hu.__experimentalVStack,{children:[!e&&(0,Bs.jsx)(hu.__experimentalText,{children:(0,pu.__)("This page uses a classic template. To edit this template with blocks, create a block template.")}),u&&g&&(0,Bs.jsx)("div",{className:"editor-template-actions-panel__preview",children:g}),(0,Bs.jsxs)(hu.__experimentalHStack,{children:[u&&o&&(0,Bs.jsx)(hu.Button,{className:"editor-template-actions-panel__action",__next40pxDefaultSize:!0,variant:"secondary",onClick:()=>{o({postId:u.id,postType:"wp_template"}),m()},children:(0,pu.__)("Edit")}),n&&(0,Bs.jsx)(hu.Button,{className:"editor-template-actions-panel__action",__next40pxDefaultSize:!0,variant:"secondary",onClick:()=>r(!0),children:e?(0,pu.__)("Create new"):(0,pu.__)("Create block template")})]})]})}),t&&(0,Bs.jsx)(Bh,{onClose:()=>r(!1)})]})}var WG=a(T(),1);function yke(){let e=wS();return e==="classic"?(0,WG.jsx)(bke,{}):e==="block-theme"?(0,WG.jsx)(mke,{}):null}var KE=a(G(),1),wke=a(pe(),1),Ske=a(W(),1),_ke=a(V(),1);var cD=a(T(),1),{BlockQuickNavigation:Jrt}=Y(wke.privateApis),$rt="core/template-part";function eot({postType:e}){let t=lN(),r=(0,KE.useSelect)(n=>{let{getPostBlocksByName:i}=Y(n(R));return i(lr===e?$rt:t)},[e,t]),{enableComplementaryArea:o}=(0,KE.useDispatch)(ze);return r.length===0?null:(0,cD.jsx)(Ske.PanelBody,{title:(0,_ke.__)("Content"),children:(0,cD.jsx)(Jrt,{clientIds:r,onSelect:()=>{o("core","edit-post/document")}})})}function xke(){let{postType:e,renderingMode:t}=(0,KE.useSelect)(r=>{let{getCurrentPostType:o,getRenderingMode:n}=Y(r(R));return{postType:o(),renderingMode:n()}},[]);return t==="post-only"&&e!==lr?null:(0,cD.jsx)(eot,{postType:e})}var uD=a(G(),1),Cke=a(H(),1),Tke=a(kt(),1),fD=a(pe(),1),Eke=a(W(),1),Pke=a(V(),1);var dD=a(T(),1),{BlockQuickNavigation:tot}=Y(fD.privateApis);function rot(){let e=(0,uD.useSelect)(o=>{let{getBlockTypes:n}=o(Tke.store);return n()},[]),t=(0,Cke.useMemo)(()=>e.filter(o=>o.category==="theme").map(({name:o})=>o),[e]),r=(0,uD.useSelect)(o=>{let{getBlocksByName:n}=o(fD.store);return n(t)},[t]);return r.length===0?null:(0,dD.jsx)(Eke.PanelBody,{title:(0,Pke.__)("Content"),children:(0,dD.jsx)(tot,{clientIds:r})})}function kke(){return(0,uD.useSelect)(t=>{let{getCurrentPostType:r}=t(R);return r()},[])!==In?null:(0,dD.jsx)(rot,{})}var Rke=a(pe(),1),Ake=a(G(),1),Ike=a(V(),1);var Oke=a(T(),1);function Nke(){let{block:e}=(0,Ake.useSelect)(r=>{let{getSelectedBlock:o}=r(Rke.store);return{block:o()}},[]);if(!e)return null;let t=e.attributes?.__revisionDiffStatus?.changedAttributes;return(0,Oke.jsx)(sD,{title:(0,Ike.__)("Changed attributes"),entries:t,initialOpen:!0})}var D_=a(G(),1),Mke=a(H(),1),Fke=a(pe(),1),Dke=a(Nt(),1);function oot(){let{hasBlockSelection:e}=(0,D_.useSelect)(n=>({hasBlockSelection:!!n(Fke.store).getBlockSelectionStart()}),[]),{getActiveComplementaryArea:t}=(0,D_.useSelect)(ze),{enableComplementaryArea:r}=(0,D_.useDispatch)(ze),{get:o}=(0,D_.useSelect)(Dke.store);(0,Mke.useEffect)(()=>{let n=t("core"),i=["edit-post/document","edit-post/block"].includes(n),s=o("core","distractionFree");!i||s||(e?r("core","edit-post/block"):r("core","edit-post/document"))},[e,t,r,o])}var Lke=oot;var ao=a(T(),1),{Tabs:L_}=Y(Vke.privateApis),not=!0,iot=({tabName:e,keyboardShortcut:t,onActionPerformed:r,extraPanels:o,postType:n})=>{let i=(0,hg.useRef)(null),s=(0,hg.useContext)(L_.Context),l=(0,ZE.useSelect)(u=>Y(u(R)).isRevisionsMode());(0,hg.useEffect)(()=>{let u=Array.from(i.current?.querySelectorAll('[role="tab"]')||[]),d=u.find(h=>h.getAttribute("data-tab-id")===e),f=d?.ownerDocument.activeElement;u.some(h=>f&&f.id===h.id)&&d&&d.id!==f?.id&&d?.focus()},[e]);let c;return l?c=(0,ao.jsx)(KPe,{}):c=(0,ao.jsxs)(ao.Fragment,{children:[(0,ao.jsx)(OPe,{onActionPerformed:r}),(0,ao.jsx)(AM.Slot,{}),(0,ao.jsx)(xke,{}),window?.__experimentalDataFormInspector&&["page","post"].includes(n)&&(0,ao.jsx)(yke,{}),(0,ao.jsx)(kke,{}),(0,ao.jsx)(nke,{}),(0,ao.jsx)(s6,{}),(0,ao.jsx)(MEe,{}),o]}),(0,ao.jsx)(jb,{identifier:e,header:(0,ao.jsx)(L_.Context.Provider,{value:s,children:(0,ao.jsx)(cke,{ref:i})}),closeLabel:(0,B_.__)("Close Settings"),className:"editor-sidebar__panel",headerClassName:"editor-sidebar__panel-tabs",title:(0,B_._x)("Settings","panel button label"),toggleShortcut:t,icon:(0,B_.isRTL)()?_g:Yd,isActiveByDefault:not,children:(0,ao.jsxs)(L_.Context.Provider,{value:s,children:[(0,ao.jsx)(L_.TabPanel,{tabId:Ia.document,focusable:!1,children:c}),(0,ao.jsxs)(L_.TabPanel,{tabId:Ia.block,focusable:!1,children:[(0,ao.jsx)(mD.BlockInspector,{}),l&&(0,ao.jsx)(Nke,{})]})]})})},sot=({extraPanels:e,onActionPerformed:t})=>{Lke();let{tabName:r,keyboardShortcut:o,showSummary:n,postType:i}=(0,ZE.useSelect)(c=>{let u=c(Bke.store).getShortcutRepresentation("core/editor/toggle-sidebar"),d=c(ze).getActiveComplementaryArea("core"),f=[Ia.block,Ia.document].includes(d),m=d;f||(m=c(mD.store).getBlockSelectionStart()?Ia.block:Ia.document);let h=c(R).getCurrentPostType();return{tabName:m,keyboardShortcut:u,showSummary:![lr,In,Sy].includes(h),postType:h}},[]),{enableComplementaryArea:s}=(0,ZE.useDispatch)(ze),l=(0,hg.useCallback)(c=>{c&&s("core",c)},[s]);return(0,ao.jsx)(L_,{selectedTabId:r,onSelect:l,selectOnMove:!1,children:(0,ao.jsx)(iot,{tabName:r,keyboardShortcut:o,showSummary:n,onActionPerformed:t,extraPanels:e,postType:i})})},jke=sot;var ED=a(V(),1),zd=a(G(),1),v2e=a(H(),1),b2e=a(ke(),1),y2e=a(fa(),1);var JG=a(pe(),1);var w2e=a(Nt(),1);var V_="edit-post/collab-history-sidebar",gg="edit-post/collab-sidebar",GG=[V_,gg];var vg=a(H(),1),KG=a(V(),1),W_=a(G(),1);var $E=a(pe(),1);var U_=a(H(),1),yD=a(W(),1);var Jke=a(ke(),1),es=a(V(),1),qG=a(G(),1),$ke=a(Pb(),1),wD=a(pe(),1);var YG=a(V(),1),Qke=a(H(),1),H_=a(G(),1),XE=a(pe(),1);var Gke=a(W(),1);var pD=a(V(),1),Bd=a(en(),1),zke=a(oe(),1),Hke=a(G(),1),Uke=a(pe(),1);var sc=a(T(),1);function Wke({avatar:e,name:t,date:r,userId:o}){let n=!!e,i=(0,Bd.getSettings)(),{currentUserAvatar:s,currentUserName:l,currentUserId:c,dateFormat:u=i.formats.date}=(0,Hke.useSelect)(v=>{let{canUser:b,getCurrentUser:S,getEntityRecord:y}=v(zke.store),w=b("read",{kind:"root",name:"site"})?y("root","site"):void 0;if(n)return{dateFormat:w?.date_format};let{getSettings:_}=v(Uke.store),{__experimentalDiscussionSettings:x}=_(),E=x?.avatarURL,O=S();return{currentUserAvatar:O?.avatar_urls?.[48]??E,currentUserName:O?.name,currentUserId:O?.id,dateFormat:w?.date_format}},[n]),d=(0,Bd.getDate)(r),f=(0,Bd.dateI18n)("c",d),h=Math.floor((new Date-d)/(1e3*60*60*24))<30?(0,Bd.humanTimeDiff)(d):(0,Bd.dateI18n)(u,d),g=(0,Bd.dateI18n)((0,pD._x)("F j, Y g:i\xA0a","Note date full date format"),r);return(0,sc.jsxs)(sc.Fragment,{children:[(0,sc.jsx)("img",{src:e||s,className:"editor-collab-sidebar-panel__user-avatar",alt:(0,pD.__)("User avatar"),width:32,height:32,style:{borderColor:Jl(o??c)}}),(0,sc.jsxs)(ne,{direction:"column",children:[(0,sc.jsx)("span",{className:"editor-collab-sidebar-panel__user-name",children:t??l}),r&&(0,sc.jsxs)(We.Root,{children:[(0,sc.jsx)(We.Trigger,{render:(0,sc.jsx)("time",{dateTime:f,className:"editor-collab-sidebar-panel__user-time",children:h})}),(0,sc.jsx)(We.Popup,{children:g})]})]})]})}var uy=a(T(),1);function j_({note:e,actions:t,className:r,children:o,...n}){return(0,uy.jsxs)(ne,{direction:"column",gap:"sm",className:r,...n,children:[(0,uy.jsxs)(ne,{direction:"row",align:"center",justify:"flex-start",gap:"md",children:[(0,uy.jsx)(Wke,{avatar:e?.author_avatar_urls?.[48],name:e?.author_name,date:e?.date,userId:e?.author}),t&&(0,uy.jsx)(Gke.FlexItem,{className:"editor-collab-sidebar-panel__note-actions",onClick:i=>i.stopPropagation(),children:(0,uy.jsx)(ne,{direction:"row",align:"center",children:t})})]}),o]})}var Yke=a(AW(),1),qke=a(H(),1),z_=a(W(),1);var hD=a(V(),1),Kke=a(ke(),1),Zke=a(go(),1);var ac=a(T(),1);function dy({onSubmit:e,onCancel:t,note:r,labels:o}){let[n,i]=(0,qke.useState)(r?.content?.raw??""),s=(0,Kke.useInstanceId)(dy,"comment-input"),l=n===r?.content?.raw||!jCe(n).length;return(0,ac.jsxs)(ne,{className:"editor-collab-sidebar-panel__note-form",direction:"column",gap:"lg",render:(0,ac.jsx)("form",{}),onSubmit:c=>{c.preventDefault(),e(n),i("")},children:[(0,ac.jsx)(Ut,{render:(0,ac.jsx)("label",{htmlFor:s}),children:o?.input??(0,hD.__)("Note")}),(0,ac.jsx)(Yke.default,{id:s,value:n??"",onChange:c=>i(c.target.value),rows:1,maxRows:20,onKeyDown:c=>{Zke.isKeyboardEvent.primary(c,"Enter")&&!l&&c.target.parentNode.requestSubmit(),c.key==="Escape"&&(c.preventDefault(),t(c))}}),(0,ac.jsxs)(ne,{direction:"row",align:"center",justify:"flex-end",gap:"sm",wrap:"wrap",children:[(0,ac.jsx)(z_.Button,{size:"compact",variant:"tertiary",onClick:t,children:(0,ac.jsx)(z_.__experimentalTruncate,{children:(0,hD.__)("Cancel")})}),(0,ac.jsx)(z_.Button,{size:"compact",accessibleWhenDisabled:!0,variant:"primary",type:"submit",disabled:l,children:(0,ac.jsx)(z_.__experimentalTruncate,{children:o?.submit??(0,hD.__)("Add note")})})]})]})}var Xke=a(T(),1);function gD({floating:e,className:t,style:r,children:o,...n}){let i=!!e;return(0,Xke.jsx)(ne,{direction:"column",className:Q(t,{"is-floating":i}),ref:i?e.ref:void 0,style:i?{top:e.y,...r}:r,...n,children:o})}var vD=a(T(),1),{useBlockElement:aot}=Y(XE.privateApis);function QE({onSubmit:e,sidebarRef:t,floating:r}){let{clientId:o}=(0,H_.useSelect)(d=>{let{getSelectedBlockClientId:f}=d(XE.store);return{clientId:f()}},[]),n=(0,H_.useSelect)(d=>Y(d(R)).getSelectedNote(),[]),i=aot(o),{toggleBlockSpotlight:s}=Y((0,H_.useDispatch)(XE.store)),{selectNote:l}=Y((0,H_.useDispatch)(R)),c=(0,Qke.useRef)(!1),u=()=>{l(void 0),i?.focus(),s(o,!1)};return n!=="new"||!o?null:(0,vD.jsx)(gD,{floating:r,className:"editor-collab-sidebar-panel__thread is-selected",gap:"md",tabIndex:0,"aria-label":(0,YG.__)("New note"),role:"treeitem",style:r?{opacity:r.y?void 0:0}:void 0,onBlur:d=>{document.hasFocus()&&(c.current||d.currentTarget.contains(d.relatedTarget)||(s(o,!1),l(void 0)))},children:(0,vD.jsx)(j_,{children:(0,vD.jsx)(dy,{onSubmit:async d=>{c.current=!0;let{id:f}=await e({content:d});l(f),$i(f,t.current)},onCancel:u,labels:{input:(0,YG.__)("New note")}})})})}var Vd=a(H(),1),fy=a(W(),1);var pn=a(V(),1);var ni=a(T(),1),{Menu:JE}=Y(fy.privateApis);function lot({items:e,buttonRef:t}){return(0,ni.jsxs)(JE,{placement:"bottom-end",children:[(0,ni.jsx)(JE.TriggerButton,{render:(0,ni.jsx)(fy.Button,{ref:t,size:"small",icon:fo,label:(0,pn.__)("Actions"),disabled:!e.length,accessibleWhenDisabled:!0})}),(0,ni.jsx)(JE.Popover,{modal:!1,children:e.map(r=>(0,ni.jsx)(JE.Item,{onClick:r.onClick,children:(0,ni.jsx)(JE.ItemLabel,{children:r.title})},r.id))})]})}function bD({note:e,parentNote:t,isSelected:r,onEditNote:o,onDeleteNote:n,onResolve:i}){let[s,l]=(0,Vd.useState)(null),c=(0,Vd.useRef)(null),u=(0,Vd.useRef)(null),d=e?.content?.raw,[f,m]=(0,Vd.useState)(d),[h,g]=(0,Vd.useState)(!1),[v,b]=(0,Vd.useState)(!1);f!==d&&(m(d),g(!1)),(0,Vd.useLayoutEffect)(()=>{let C=u.current;C&&b(C.scrollHeight>C.clientHeight)},[d]);let S=e.parent===0,y=e.type==="note"&&e.meta&&(e.meta._wp_note_status==="resolved"||e.meta._wp_note_status==="reopen"),w=[{id:"edit",title:(0,pn.__)("Edit"),isEligible:({status:C})=>C!=="approved",onClick:()=>l("edit")},{id:"reopen",title:(0,pn._x)("Reopen","Reopen note"),isEligible:({status:C})=>C==="approved",onClick:()=>o({id:e.id,status:"hold"})},{id:"delete",title:(0,pn.__)("Delete"),isEligible:()=>!0,onClick:()=>l("delete")}],_=t?.status!=="approved"?w.filter(C=>C.isEligible(e)):[],x=e.parent===0?(0,pn.__)("Are you sure you want to delete this note? This will also delete all of this note's replies."):(0,pn.__)("Are you sure you want to delete this reply?"),E=()=>{l(null),c.current?.focus()},O;if(s==="edit")O=(0,ni.jsx)(dy,{onSubmit:C=>{o({id:e.id,content:C}),l(null),c.current?.focus()},onCancel:E,note:e,labels:{submit:(0,pn._x)("Update","verb"),input:(0,pn.sprintf)((0,pn.__)("Edit note %1$s by %2$s"),e.id,e.author_name)}});else{let C;if(y){let I=e.meta._wp_note_status==="resolved"?(0,pn.__)("Marked as resolved"):(0,pn.__)("Reopened"),k=e?.content?.raw;C=k&&typeof k=="string"&&k.trim()!==""?(0,pn.sprintf)((0,pn.__)("%1$s: %2$s"),I,k):I}else C=e?.content?.rendered;O=(0,ni.jsx)("div",{ref:u,className:Q("editor-collab-sidebar-panel__note-content",{"editor-collab-sidebar-panel__resolution-text":y,"is-collapsed":!h}),dangerouslySetInnerHTML:{__html:C??""}})}let A=r?(0,ni.jsxs)(ni.Fragment,{children:[S&&i&&(0,ni.jsx)(fy.Button,{label:(0,pn._x)("Resolve","Mark note as resolved"),size:"small",icon:xg,disabled:e.status==="approved",accessibleWhenDisabled:e.status==="approved",onClick:i}),(0,ni.jsx)(lot,{items:_,buttonRef:c})]}):null;return(0,ni.jsxs)(j_,{note:e,actions:A,role:e.parent!==0?"treeitem":void 0,children:[O,s==="delete"&&(0,ni.jsx)(fy.__experimentalConfirmDialog,{isOpen:!0,onConfirm:()=>{n(e),l(null)},onCancel:E,confirmButtonText:(0,pn.__)("Delete"),children:x}),v&&s!=="edit"&&(0,ni.jsx)(RQ,{className:"editor-collab-sidebar-panel__show-more-button",variant:"unstyled",size:"small",onClick:()=>g(!h),children:h?(0,pn.__)("Show less"):(0,pn.__)("Show more")})]})}var Fa=a(T(),1),{useBlockElement:cot}=Y(wD.privateApis);function e2e({note:e,onEditNote:t,onAddReply:r,onDeleteNote:o,isSelected:n,sidebarRef:i,floating:s,onKeyDown:l}){let c=!!s,{toggleBlockHighlight:u,selectBlock:d,toggleBlockSpotlight:f}=Y((0,qG.useDispatch)(wD.store)),{selectNote:m}=Y((0,qG.useDispatch)(R)),h=cot(e.blockClientId),g=(0,Jke.useDebounce)(u,50),v=(0,U_.useRef)(null),b=(0,U_.useRef)(!1),S=s?.registerThread,y=s?.unregisterThread;(0,U_.useEffect)(()=>{let F=v.current;return F&&S&&S(e.id,h,F),()=>y?.(e.id)},[h,e.id,S,y]),(0,U_.useEffect)(()=>{!n||e.id==="new"||YCe(e.id,i.current)},[n,s?.y,e.id,i]);let w=()=>{g(e.blockClientId,!0)},_=()=>{g(e.blockClientId,!1)},x=()=>{u(e.blockClientId,!0)},E=F=>{if(!document.hasFocus())return;let D=F.relatedTarget?.closest(".editor-collab-sidebar-panel__thread"),B=F.relatedTarget?.closest('[role="dialog"]'),L=b.current;D&&!L||B||L&&F.currentTarget.contains(F.relatedTarget)||(u(e.blockClientId,!1),A())},O=()=>{n||(m(e.id),$i(e.id,i.current),f(e.blockClientId,!0),e.blockClientId&&d(e.blockClientId,null))},A=()=>{m(void 0),f(e.blockClientId,!1)},C=()=>{t({id:e.id,status:"approved"}),A(),c?h?.focus():$i(e.id,i.current)},I=e?.reply||[],k=I.length>0?I[I.length-1]:void 0,P=I.length>0?I.slice(0,-1):[],N=zCe((0,$ke.__unstableStripHTML)(e.content?.rendered),10),U=e.blockClientId?(0,es.sprintf)((0,es.__)("Note: %s"),N):(0,es.sprintf)((0,es.__)("Original block deleted. Note: %s"),N);return c&&e.id==="new"?(0,Fa.jsx)(QE,{onSubmit:r,sidebarRef:i,floating:{y:s.y,ref:v}}):(0,Fa.jsxs)(gD,{floating:c?{y:s.y,ref:v}:void 0,className:Q("editor-collab-sidebar-panel__thread",{"is-selected":n}),id:`note-thread-${e.id}`,gap:"md",onClick:O,onMouseEnter:w,onMouseLeave:_,onFocus:x,onBlur:E,onKeyUp:F=>{F.key==="Tab"&&(b.current=!1)},onKeyDown:F=>{F.key==="Tab"?b.current=!0:l(F)},tabIndex:0,role:"treeitem","aria-label":U,"aria-expanded":n,children:[(0,Fa.jsx)(yD.Button,{className:"editor-collab-sidebar-panel__skip-to-note",variant:"secondary",size:"compact",onClick:()=>{$i(e.id,i.current,"textarea")},children:(0,es.__)("Add new reply")}),!e.blockClientId&&(0,Fa.jsx)("p",{className:"editor-collab-sidebar-panel__deleted-block-notice",children:(0,es.__)("Original block deleted.")}),(0,Fa.jsx)(bD,{note:e,isSelected:n,onEditNote:t,onDeleteNote:o,onResolve:C}),n&&I.map(F=>(0,Fa.jsx)(bD,{note:F,parentNote:e,isSelected:n,onEditNote:t,onDeleteNote:o},F.id)),!n&&P.length>0&&(0,Fa.jsx)(ne,{direction:"row",align:"center",justify:"space-between",className:"editor-collab-sidebar-panel__more-reply-separator",children:(0,Fa.jsx)(yD.Button,{size:"compact",variant:"tertiary",className:"editor-collab-sidebar-panel__more-reply-button",onClick:F=>{F.stopPropagation(),O()},children:(0,es.sprintf)((0,es._n)("%s more reply","%s more replies",P.length),P.length)})}),!n&&k&&(0,Fa.jsx)(bD,{note:k,parentNote:e,isSelected:!1,onEditNote:t,onDeleteNote:o}),n&&(0,Fa.jsx)(j_,{role:"treeitem",children:(0,Fa.jsx)(dy,{onSubmit:F=>{e.status==="approved"?t({id:e.id,status:"hold",content:F}):r({content:F,parent:e.id})},onCancel:F=>{F.stopPropagation(),A(),$i(e.id,i.current)},labels:{submit:e.status==="approved"?(0,es.__)("Reopen & Reply"):(0,es.__)("Reply"),input:(0,es.sprintf)((0,es.__)("Reply to note %1$s by %2$s"),e.id,e.author_name)}})}),!!e.blockClientId&&(0,Fa.jsx)(yD.Button,{className:"editor-collab-sidebar-panel__skip-to-block",variant:"secondary",size:"compact",onClick:F=>{F.stopPropagation(),h?.focus()},children:(0,es.__)("Back to block")})]})}var Nm=a(V(),1),jd=a(H(),1),SD=a(oe(),1),gu=a(G(),1),my=a(pe(),1),o2e=a(Rt(),1),n2e=a(Pb(),1),i2e=a(Lt(),1);function t2e(){let e=new Set,t=new Map,r=new Map,o=new WeakMap,n={},i={};function s(){i={...n};for(let c of e)c()}let l=new window.ResizeObserver(c=>{let u=!1;for(let d of c){let f=o.get(d.target),m=d.borderBoxSize[0].blockSize;n[f]!==m&&(n[f]=m,u=!0)}u&&s()});return{subscribe(c){return e.add(c),()=>{e.delete(c),e.size===0&&l.disconnect()}},getSnapshot(){return i},registerThread(c,u,d){t.set(c,u);let f=r.get(c);f&&f!==d&&(l.unobserve(f),o.delete(f)),d&&(r.set(c,d),o.set(d,c),l.observe(d)),s()},unregisterThread(c){t.delete(c);let u=r.get(c);u&&(l.unobserve(u),o.delete(u),r.delete(c)),delete n[c]},getBlockRects(){return Object.fromEntries(Array.from(t).flatMap(([c,u])=>u?[[c,u.getBoundingClientRect()]]:[]))},getFirstBlockElement(){return t.values().next().value??null}}}var{cleanEmptyObject:r2e}=Y(my.privateApis);function s2e(e){let t={post:e,type:"note",status:"all",per_page:-1},{records:r}=(0,SD.useEntityRecords)("root","comment",t,{enabled:!!e&&typeof e=="number"}),{getBlockAttributes:o}=(0,gu.useSelect)(my.store),{clientIds:n}=(0,gu.useSelect)(l=>{let{getClientIdsWithDescendants:c}=l(my.store);return{clientIds:c()}},[]),{notes:i,unresolvedNotes:s}=(0,jd.useMemo)(()=>{if(!r||r.length===0)return{notes:[],unresolvedNotes:[]};let l={},c=new Map;for(let g of n){let v=o(g)?.metadata,b=rg(v);if(b.length>0){l[g]=b;for(let S of b)c.set(S,g)}}let u=new Map,d=[];for(let g of r){let v={...g,reply:[],blockClientId:g.parent===0?c.get(g.id)??null:null};u.set(g.id,v),g.parent===0&&d.push(v)}for(let g of r)g.parent!==0&&u.get(g.parent)?.reply.unshift(u.get(g.id));if(d.length===0)return{notes:[],unresolvedNotes:[]};let f=[],m=[];for(let g of Object.values(l))for(let v of g){let b=u.get(v);b&&(b.status==="hold"?f.push(b):b.status==="approved"&&m.push(b))}let h=d.filter(g=>!g.blockClientId);return{notes:[...f,...m,...h],unresolvedNotes:f}},[n,r,o]);return{notes:i,unresolvedNotes:s}}function a2e(){let{createNotice:e}=(0,gu.useDispatch)(o2e.store),{saveEntityRecord:t,deleteEntityRecord:r}=(0,gu.useDispatch)(SD.store),{getCurrentPostId:o}=(0,gu.useSelect)(R),{getBlockAttributes:n,getSelectedBlockClientId:i}=(0,gu.useSelect)(my.store),{updateBlockAttributes:s}=(0,gu.useDispatch)(my.store),l=f=>{let m=f.message&&f.code!=="unknown_error"?(0,i2e.decodeEntities)(f.message):(0,Nm.__)("An error occurred while performing an update.");e("error",m,{type:"snackbar",isDismissible:!0})};return{onCreate:async({content:f,parent:m})=>{try{let h=await t("root","comment",{post:o(),content:f,status:"hold",type:"note",parent:m||0},{throwOnError:!0});if(!m&&h?.id){let g=i();if(!g)return h;let v=n(g)?.metadata,b=HCe(v,h.id);s(g,{metadata:r2e(b)})}return e("snackbar",m?(0,Nm.__)("Reply added."):(0,Nm.__)("Note added."),{type:"snackbar",isDismissible:!0}),h}catch(h){l(h)}},onEdit:async({id:f,content:m,status:h})=>{let g=h||"updated",v={approved:(0,Nm.__)("Note marked as resolved."),hold:(0,Nm.__)("Note reopened."),updated:(0,Nm.__)("Note updated.")};try{if(h==="approved"||h==="hold"){await t("root","comment",{id:f,status:h},{throwOnError:!0});let b={post:o(),content:m||"",type:"note",status:h,parent:f,meta:{_wp_note_status:h==="approved"?"resolved":"reopen"}};await t("root","comment",b,{throwOnError:!0})}else await t("root","comment",{id:f,content:m,status:h},{throwOnError:!0});e("snackbar",v[g]??(0,Nm.__)("Note updated."),{type:"snackbar",isDismissible:!0})}catch(b){l(b)}},onDelete:async f=>{try{if(await r("root","comment",f.id,void 0,{throwOnError:!0}),!f.parent){let m=f.blockClientId||i();if(!m)return;let h=n(m)?.metadata,g=UCe(h,f.id);s(m,{metadata:r2e(g)})}e("snackbar",(0,Nm.__)("Note deleted."),{type:"snackbar",isDismissible:!0})}catch(m){l(m)}}}}function l2e(e=!1){let t=(0,gu.useRegistry)();(0,jd.useEffect)(()=>{if(!e)return;let{getActiveComplementaryArea:r}=t.select(ze),{disableComplementaryArea:o,enableComplementaryArea:n}=t.dispatch(ze),i=t.subscribe(()=>{r("core")===null&&n("core",gg)});return()=>{i(),r("core")===gg&&o("core",gg)}},[e,t])}function c2e({threads:e,selectedNoteId:t,isFloating:r,sidebarRef:o}){let[n,i]=(0,jd.useState)({}),[s]=(0,jd.useState)(t2e),l=(0,jd.useSyncExternalStore)(s.subscribe,s.getSnapshot);return(0,jd.useEffect)(()=>{if(!r||!o?.current)return;let c=o.current,u=s.getFirstBlockElement(),d=u?.closest(".is-root-container")??u,f=d?(0,n2e.getScrollContainer)(d):null,m=()=>{c.style.setProperty("--canvas-scroll",`${-(f?.scrollTop??0)}px`)},h=window.requestAnimationFrame(()=>{let b=WCe({threads:e,selectedNoteId:t,blockRects:s.getBlockRects(),heights:l,scrollTop:f?.scrollTop??0});i(b.positions),m()}),g=f?.ownerDocument?.defaultView,v={passive:!0,capture:!0};return g?.addEventListener("scroll",m,v),()=>{window.cancelAnimationFrame(h),g?.removeEventListener("scroll",m,v)}},[o,l,r,t,s,e]),{notePositions:n,registerThread:s.registerThread,unregisterThread:s.unregisterThread}}var Mm=a(T(),1),{useBlockElement:uot}=Y($E.privateApis);function ZG({notes:e,sidebarRef:t,isFloating:r=!1,styles:o}){let{onCreate:n,onEdit:i,onDelete:s}=a2e(),{selectNote:l}=Y((0,W_.useDispatch)(R)),{selectBlock:c,toggleBlockSpotlight:u}=Y((0,W_.useDispatch)($E.store)),{noteId:d,selectedBlockClientId:f,orderedBlockIds:m}=(0,W_.useSelect)(C=>{let{getBlockAttributes:I,getSelectedBlockClientId:k,getClientIdsWithDescendants:P}=C($E.store),N=k();return{noteId:N?I(N)?.metadata?.noteId:null,selectedBlockClientId:N,orderedBlockIds:P()}},[]),{selectedNote:h,noteFocused:g}=(0,W_.useSelect)(C=>{let{getSelectedNote:I,isNoteFocused:k}=Y(C(R));return{selectedNote:I(),noteFocused:k()}},[]),v=uot(f),b=(0,vg.useMemo)(()=>{if(!r||h!=="new")return e;let C={id:"new",blockClientId:f,content:{rendered:""}},I=[];return m.forEach(k=>{let P=e.filter(N=>N.blockClientId===k);I.push(...P),k===f&&I.push(C)}),I},[e,r,h,f,m]),S=async C=>{let I=b.findIndex(U=>U.id===C.id),k=b[I+1],P=b[I-1];if(await s(C),C.parent!==0){l(C.parent),$i(C.parent,t.current);return}let N=k??P;N?(l(N.id),$i(N.id,t.current),N.blockClientId&&(u(N.blockClientId,!0),c(N.blockClientId,null))):(l(void 0),u(C.blockClientId,!1),v?.focus())},y=(0,vg.useMemo)(()=>{let C=rg({noteId:d}),I=e.filter(k=>C.includes(k.id));return kE(I)?.id},[d,e]),w=(0,vg.useRef)(f);(0,vg.useEffect)(()=>{w.current!==f&&(w.current=f,l(y))},[f,y,l]),(0,vg.useEffect)(()=>{g&&h&&($i(h,t.current,h==="new"?"textarea":void 0),l(h))},[g,h,l,t]);let{notePositions:_,registerThread:x,unregisterThread:E}=c2e({threads:b,selectedNoteId:h,isFloating:r,sidebarRef:t}),O=Array.isArray(b)&&b.length>0,A=(C,I,k)=>{if(C.defaultPrevented)return;let P=b.findIndex(U=>U.id===I.id),N=C.currentTarget===C.target;(C.key==="Enter"||C.key==="ArrowRight")&&N&&!k?(l(I.id),I.blockClientId&&(c(I.blockClientId,null),u(I.blockClientId,!0))):(C.key==="Enter"||C.key==="ArrowLeft")&&N&&k||C.key==="Escape"?(l(void 0),I.blockClientId&&u(I.blockClientId,!1),$i(I.id,t.current)):C.key==="ArrowDown"&&P<b.length-1&&N?$i(b[P+1].id,t.current):C.key==="ArrowUp"&&P>0&&N?$i(b[P-1].id,t.current):C.key==="Home"&&N?$i(b[0].id,t.current):C.key==="End"&&N&&$i(b[b.length-1].id,t.current)};return(0,Mm.jsx)(ne,{className:"editor-collab-sidebar-panel",style:o,role:"tree",direction:"column",gap:"md",justify:"flex-start",ref:C=>{C&&(t.current=C)},"aria-label":r?(0,KG.__)("Unresolved notes"):(0,KG.__)("All notes"),children:!O&&!r?(0,Mm.jsx)(QE,{onSubmit:n,sidebarRef:t}):(0,Mm.jsxs)(Mm.Fragment,{children:[!r&&h==="new"&&(0,Mm.jsx)(QE,{onSubmit:n,sidebarRef:t}),b.map(C=>(0,Mm.jsx)(e2e,{note:C,onAddReply:n,onDeleteNote:S,onEditNote:i,isSelected:h===C.id,sidebarRef:t,floating:r?{y:_[C.id],registerThread:x,unregisterThread:E}:void 0,onKeyDown:I=>A(I,C,h===C.id)},C.id))]})})}var u2e=a(W(),1),_D=a(V(),1),CD=a(pe(),1),XG=a(G(),1),d2e=a(kt(),1),f2e=a(fa(),1);var xD=a(T(),1),{NoteIconSlotFill:dot}=Y(CD.privateApis);function fot({clientId:e,onClick:t,isDistractionFree:r}){let o=(0,XG.useSelect)(l=>l(CD.store).getBlock(e),[e]),n=(0,XG.useSelect)(l=>l(f2e.store).getShortcutRepresentation("core/editor/new-note"),[]);if(!o?.isValid||o?.name===(0,d2e.getUnregisteredTypeHandlerName)())return null;let i=r||o?.name==="core/freeform",s;return r?s=(0,_D.__)("Notes are disabled in distraction free mode."):o?.name==="core/freeform"&&(s=(0,_D.__)("Convert to blocks to add notes.")),(0,xD.jsx)(u2e.MenuItem,{onClick:t,"aria-haspopup":"dialog",disabled:i,info:s,shortcut:n,children:(0,_D.__)("Add note")})}function QG({onClick:e,isDistractionFree:t}){return(0,xD.jsx)(dot.Fill,{children:({clientId:r,onClose:o})=>(0,xD.jsx)(fot,{clientId:r,isDistractionFree:t,onClick:()=>{e(r),o()}})})}var m2e=a(W(),1);var G_=a(V(),1),p2e=a(H(),1),TD=a(pe(),1),h2e=a(G(),1);var bg=a(T(),1),{NoteIconToolbarSlotFill:mot}=Y(TD.privateApis);function pot({participants:e}){let t=(0,h2e.useSelect)(c=>{let{getSettings:u}=c(TD.store),{__experimentalDiscussionSettings:d}=u();return d?.avatarURL},[]),r=3,n=e.length>r?e.slice(0,r-1):e,i=Math.max(0,e.length-n.length),l=e.length>100&&i>0?(0,G_.__)("100+"):(0,G_.sprintf)((0,G_.__)("+%s"),i);return(0,bg.jsxs)(ne,{direction:"row",align:"center",gap:"xs",children:[n.map(c=>(0,bg.jsx)("img",{src:c.avatar||t,alt:c.name,className:"editor-note-indicator__avatar",style:{borderColor:Jl(c.id)}},c.id)),i>0&&(0,bg.jsx)("span",{className:"editor-note-indicator__overflow",children:l})]})}function g2e({onClick:e,note:t}){let r=(0,p2e.useMemo)(()=>{if(!t)return[];let o=new Map,n=[t,...t.reply].sort((i,s)=>new Date(i.date)-new Date(s.date));for(let i of n)!i.author_name||o.has(i.author)||o.set(i.author,{id:i.author,name:i.author_name,avatar:i.author_avatar_urls?.["48"]||i.author_avatar_urls?.["96"]});return Array.from(o.values())},[t]);return r.length?(0,bg.jsx)(mot.Fill,{children:(0,bg.jsx)(m2e.ToolbarButton,{className:"editor-note-indicator",label:(0,G_.__)("View notes"),onClick:()=>e(),showTooltip:!0,children:(0,bg.jsx)(pot,{participants:r})})}):null}var Vs=a(T(),1);function hot({postId:e}){let{getActiveComplementaryArea:t}=(0,zd.useSelect)(ze),{enableComplementaryArea:r}=(0,zd.useDispatch)(ze),{toggleBlockSpotlight:o,selectBlock:n}=Y((0,zd.useDispatch)(JG.store)),{selectNote:i}=Y((0,zd.useDispatch)(R)),s=(0,b2e.useViewportMatch)("medium"),l=(0,v2e.useRef)(null),{clientId:c,noteId:u,isClassicBlock:d}=(0,zd.useSelect)(C=>{let{getBlockAttributes:I,getSelectedBlockClientId:k,getBlockName:P}=C(JG.store),N=k();return{clientId:N,noteId:N?I(N)?.metadata?.noteId:null,isClassicBlock:N?P(N)==="core/freeform":!1}},[]),f=rg({noteId:u}),{isDistractionFree:m}=(0,zd.useSelect)(C=>{let{get:I}=C(w2e.store);return{isDistractionFree:I("core","distractionFree")}},[]),h=(0,zd.useSelect)(C=>Y(C(R)).getSelectedNote(),[]),{notes:g,unresolvedNotes:v}=s2e(e),b=s,S=g.length>0||!b;l2e(b&&(v.length>0||h!==void 0));async function y({targetClientId:C,noteId:I,isApproved:k}){if(!C)return;let P=await t("core");k?r("core",V_):(!GG.includes(P)||!S)&&r("core",b?gg:V_);let N=await t("core");GG.includes(N)&&(n(C,null),o(C,!0),i(I,{focus:!0}))}function w(C){let I=g.filter(P=>P.blockClientId===C),k=kE(I);return y({targetClientId:C,noteId:k?.id??"new",isApproved:k?.status==="approved"})}function _(C){return y({targetClientId:C,noteId:"new",isApproved:!1})}(0,y2e.useShortcut)("core/editor/new-note",C=>{C.preventDefault(),_(c)},{isDisabled:m||d||!c});let{merged:x}=ro(),E=x?.styles?.color?.background,O=f.length>0?g.filter(C=>f.includes(C.id)):[],A=kE(O);return m?(0,Vs.jsx)(QG,{isDistractionFree:!0}):(0,Vs.jsxs)(Vs.Fragment,{children:[!!A&&(0,Vs.jsx)(g2e,{note:A,onClick:()=>w(c)}),(0,Vs.jsx)(QG,{onClick:C=>_(C)}),S&&(0,Vs.jsx)(jb,{identifier:V_,name:V_,title:(0,ED.__)("All notes"),header:(0,Vs.jsx)("h2",{className:"interface-complementary-area-header__title",children:(0,ED.__)("All notes")}),icon:D4,closeLabel:(0,ED.__)("Close Notes"),children:(0,Vs.jsx)(ZG,{notes:g,sidebarRef:l})}),s&&(0,Vs.jsx)(jb,{isPinnable:!1,header:!1,identifier:gg,className:"editor-collab-sidebar",headerClassName:"editor-collab-sidebar__header",backgroundColor:E,children:(0,Vs.jsx)(ZG,{notes:v,sidebarRef:l,styles:{backgroundColor:E},isFloating:!0})})]})}function S2e(){let{postId:e,editorMode:t,revisionsMode:r}=(0,zd.useSelect)(o=>{let{getCurrentPostId:n,getEditorMode:i,isRevisionsMode:s}=Y(o(R));return{postId:n(),editorMode:i(),revisionsMode:s()}},[]);return!e||typeof e!="number"||t==="text"||r?null:(0,Vs.jsx)(oo,{supportKeys:"editor.notes",children:(0,Vs.jsx)(hot,{postId:e})})}var Hd=a(W(),1),Y_=a(V(),1);var oP=a(G(),1),eY=a(H(),1),E2e=a(Nt(),1),ID=a(ke(),1),P2e=a(oe(),1);var Fm=a(W(),1),PD=a(G(),1),eP=a(V(),1),_2e=a(Nt(),1);var x2e=a(oe(),1);var vu=a(T(),1);function kD({hideWelcomeGuide:e=!1,onChangePath:t}){let{user:r,setUser:o}=ro(),n=!!r&&(Object.keys(r?.styles??{}).length>0||Object.keys(r?.settings??{}).length>0),i=()=>{o({styles:{},settings:{}})},{toggle:s}=(0,PD.useDispatch)(_2e.store),{canEditCSS:l}=(0,PD.useSelect)(u=>{let{getEntityRecord:d,__experimentalGetCurrentGlobalStylesId:f}=u(x2e.store),m=f();return{canEditCSS:!!(m?d("root","globalStyles",m):void 0)?._links?.["wp:action-edit-css"]}},[]),c=()=>{t("/css")};return(0,vu.jsx)(Fm.DropdownMenu,{icon:fo,label:(0,eP.__)("More"),toggleProps:{size:"compact"},children:({onClose:u})=>(0,vu.jsxs)(vu.Fragment,{children:[(0,vu.jsxs)(Fm.MenuGroup,{children:[l&&(0,vu.jsx)(Fm.MenuItem,{onClick:c,children:(0,eP.__)("Additional CSS")}),!e&&(0,vu.jsx)(Fm.MenuItem,{onClick:()=>{s("core/edit-site","welcomeGuideStyles"),u()},children:(0,eP.__)("Welcome Guide")})]}),(0,vu.jsx)(Fm.MenuGroup,{children:(0,vu.jsx)(Fm.MenuItem,{onClick:()=>{i(),u()},disabled:!n,children:(0,eP.__)("Reset styles")})})]})})}var py=a(T(),1);function C2e({className:e,identifier:t,title:r,icon:o,children:n,closeLabel:i,header:s,headerClassName:l,panelClassName:c,isActiveByDefault:u}){return(0,py.jsxs)(py.Fragment,{children:[(0,py.jsx)(Ml,{className:e,scope:"core",identifier:t,title:r,icon:o,closeLabel:i,header:s,headerClassName:l,panelClassName:c,isActiveByDefault:u,children:n}),(0,py.jsx)($p,{scope:"core",identifier:t,icon:o,children:r})]})}var RD=a(G(),1),AD=a(W(),1),lc=a(V(),1),$G=a(Nt(),1);var tP=a(T(),1);function rP({nonAnimatedSrc:e,animatedSrc:t}){return(0,tP.jsxs)("picture",{className:"editor-welcome-guide__image",children:[(0,tP.jsx)("source",{srcSet:e,media:"(prefers-reduced-motion: reduce)"}),(0,tP.jsx)("img",{src:t,width:"312",height:"240",alt:""})]})}var qr=a(T(),1);function T2e(){let{toggle:e}=(0,RD.useDispatch)($G.store),{isActive:t,isStylesOpen:r}=(0,RD.useSelect)(n=>{let i=n(ze).getActiveComplementaryArea("core");return{isActive:!!n($G.store).get("core/edit-site","welcomeGuideStyles"),isStylesOpen:i==="edit-site/global-styles"}},[]);if(!t||!r)return null;let o=(0,lc.__)("Welcome to Styles");return(0,qr.jsx)(AD.Guide,{className:"editor-welcome-guide guide-styles",contentLabel:o,finishButtonText:(0,lc.__)("Get started"),onFinish:()=>e("core/edit-site","welcomeGuideStyles"),pages:[{image:(0,qr.jsx)(rP,{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,qr.jsxs)(qr.Fragment,{children:[(0,qr.jsx)("h1",{className:"editor-welcome-guide__heading",children:o}),(0,qr.jsx)("p",{className:"editor-welcome-guide__text",children:(0,lc.__)("Tweak your site, or give it a whole new look! Get creative \u2014 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,qr.jsx)(rP,{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,qr.jsxs)(qr.Fragment,{children:[(0,qr.jsx)("h1",{className:"editor-welcome-guide__heading",children:(0,lc.__)("Set the design")}),(0,qr.jsx)("p",{className:"editor-welcome-guide__text",children:(0,lc.__)("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,qr.jsx)(rP,{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,qr.jsxs)(qr.Fragment,{children:[(0,qr.jsx)("h1",{className:"editor-welcome-guide__heading",children:(0,lc.__)("Personalize blocks")}),(0,qr.jsx)("p",{className:"editor-welcome-guide__text",children:(0,lc.__)("You can adjust your blocks to ensure a cohesive experience across your site \u2014 add your unique colors to a branded Button block, or adjust the Heading block to your preferred size.")})]})},{image:(0,qr.jsx)(rP,{nonAnimatedSrc:"https://s.w.org/images/block-editor/welcome-documentation.svg",animatedSrc:"https://s.w.org/images/block-editor/welcome-documentation.gif"}),content:(0,qr.jsxs)(qr.Fragment,{children:[(0,qr.jsx)("h1",{className:"editor-welcome-guide__heading",children:(0,lc.__)("Learn more")}),(0,qr.jsxs)("p",{className:"editor-welcome-guide__text",children:[(0,lc.__)("New to block themes and styling your site?")," ",(0,qr.jsx)(AD.ExternalLink,{href:(0,lc.__)("https://wordpress.org/documentation/article/styles-overview/"),children:(0,lc.__)("Here\u2019s a detailed guide to learn how to make the most of it.")})]})]})}]})}var Si=a(T(),1);function k2e(){let{shouldResetNavigation:e,stylesPath:t,showStylebook:r,showListViewByDefault:o,hasRevisions:n,activeComplementaryArea:i,editorSettings:s}=(0,oP.useSelect)(S=>{let{getActiveComplementaryArea:y}=S(ze),{getStylesPath:w,getShowStylebook:_}=Y(S(R)),x=S(R).getEditorMode()==="visual",E=S(E2e.store).get("core","showListViewByDefault"),{getEntityRecord:O,__experimentalGetCurrentGlobalStylesId:A}=S(P2e.store),C=A(),I=C?O("root","globalStyles",C):void 0;return{stylesPath:w(),showStylebook:_(),shouldResetNavigation:y("core")!=="edit-site/global-styles"||!x,showListViewByDefault:E,hasRevisions:!!I?._links?.["version-history"]?.[0]?.count,activeComplementaryArea:S(ze).getActiveComplementaryArea("core"),editorSettings:S(R).getEditorSettings()}},[]),{setStylesPath:l,setShowStylebook:c,resetStylesNavigation:u}=Y((0,oP.useDispatch)(R)),d=(0,ID.useViewportMatch)("medium","<"),f=t.startsWith("/revisions")&&!r,m=t.startsWith("/revisions")&&r,h=(0,ID.usePrevious)(i);(0,eY.useEffect)(()=>{i==="edit-site/global-styles"&&h!=="edit-site/global-styles"&&u()},[i,h,u]),(0,eY.useEffect)(()=>{e&&u()},[e,u]);let{setIsListViewOpened:g}=(0,oP.useDispatch)(R),v=()=>{g(!1),l(f||m?"/":"/revisions")},b=()=>{g(r&&o),c(!r)};return(0,Si.jsxs)(Si.Fragment,{children:[(0,Si.jsx)(C2e,{className:"editor-global-styles-sidebar",identifier:"edit-site/global-styles",title:(0,Y_.__)("Styles"),icon:tB,closeLabel:(0,Y_.__)("Close Styles"),panelClassName:"editor-global-styles-sidebar__panel",header:(0,Si.jsxs)(Hd.Flex,{className:"editor-global-styles-sidebar__header",gap:1,children:[(0,Si.jsx)(Hd.FlexItem,{children:(0,Si.jsx)("h2",{className:"editor-global-styles-sidebar__header-title",children:(0,Y_.__)("Styles")})}),(0,Si.jsxs)(Hd.Flex,{justify:"flex-end",gap:1,className:"editor-global-styles-sidebar__header-actions",children:[!d&&(0,Si.jsx)(Hd.FlexItem,{children:(0,Si.jsx)(Hd.Button,{icon:Tg,label:(0,Y_.__)("Style Book"),isPressed:r,accessibleWhenDisabled:!0,disabled:e,onClick:b,size:"compact"})}),(0,Si.jsx)(Hd.FlexItem,{children:(0,Si.jsx)(Hd.Button,{label:(0,Y_.__)("Revisions"),icon:Gd,onClick:v,accessibleWhenDisabled:!0,disabled:!n,isPressed:f||m,size:"compact"})}),(0,Si.jsx)(kD,{onChangePath:l})]})]}),children:(0,Si.jsx)(sN,{path:t,onPathChange:l,settings:s})}),(0,Si.jsx)(T2e,{})]})}var cc=a(T(),1);function got({postType:e,postId:t,templateId:r,settings:o,children:n,initialEdits:i,onActionPerformed:s,extraContent:l,extraSidebarPanels:c,...u}){let{post:d,template:f,hasLoadedPost:m,error:h,isBlockTheme:g,showGlobalStyles:v}=(0,R2e.useSelect)(b=>{let{getEntityRecord:S,getResolutionError:y,hasFinishedResolution:w,getCurrentTheme:_,__experimentalGetCurrentGlobalStylesId:x,canUser:E}=b(A2e.store),{getRenderingMode:O,getCurrentPostType:A}=b(R),C=["postType",e,t],I=O(),k=A(),P=_()?.is_block_theme,N=x(),U=N?E("update",{kind:"root",name:"globalStyles",id:N}):!1;return{post:S(...C),template:r?S("postType",lr,r):void 0,hasLoadedPost:w("getEntityRecord",C),error:y("getEntityRecord",C)?.message,isBlockTheme:P,showGlobalStyles:P&&U&&(k==="wp_template"||I==="template-locked")}},[e,t,r]);return(0,cc.jsxs)(cc.Fragment,{children:[m&&!d&&(0,cc.jsx)(I2e.Notice,{status:h?"error":"warning",isDismissible:!1,children:h||(0,O2e.__)("You attempted to edit an item that doesn't exist. Perhaps it was deleted?")}),!!d&&(0,cc.jsxs)(oU,{post:d,__unstableTemplate:f,settings:o,initialEdits:i,useSubRegistry:!1,children:[(0,cc.jsx)(AEe,{...u,children:l}),n,(0,cc.jsx)(jke,{onActionPerformed:s,extraPanels:c}),(0,cc.jsx)(S2e,{}),g&&(0,cc.jsx)(UN,{}),v&&(0,cc.jsx)(k2e,{})]})]})}var N2e=got;var ot=a(V(),1),H2e=a(ke(),1),hy=a(G(),1),U2e=a(H(),1),nP=a(Nt(),1);var OD=a(G(),1),M2e=a(Nt(),1);var F2e=a(T(),1),{PreferenceBaseOption:vot}=Y(M2e.privateApis);function D2e(e){let t=(0,OD.useSelect)(n=>n(R).isPublishSidebarEnabled(),[]),{enablePublishSidebar:r,disablePublishSidebar:o}=(0,OD.useDispatch)(R);return(0,F2e.jsx)(vot,{isChecked:t,onChange:n=>n?r():o(),...e})}var ND=a(G(),1),L2e=a(Nt(),1),MD=a(kt(),1),B2e=a(H(),1),V2e=a(W(),1),K_=a(V(),1),j2e=a(pe(),1);var q_=a(T(),1),{BlockManager:bot}=Y(j2e.privateApis),yot=[];function z2e(){let{showBlockTypes:e,hideBlockTypes:t}=Y((0,ND.useDispatch)(R)),{blockTypes:r,allowedBlockTypes:o,hiddenBlockTypes:n}=(0,ND.useSelect)(m=>({blockTypes:m(MD.store).getBlockTypes(),allowedBlockTypes:m(R).getEditorSettings().allowedBlockTypes,hiddenBlockTypes:m(L2e.store).get("core","hiddenBlockTypes")??yot}),[]),s=(0,B2e.useMemo)(()=>o===!0?r:r.filter(({name:m})=>o?.includes(m)),[o,r]).filter(m=>(0,MD.hasBlockSupport)(m,"inserter",!0)&&(!m.parent||m.parent.includes("core/post-content"))),l=n.filter(m=>s.some(h=>h.name===m)),c=s.filter(m=>!l.includes(m.name)),u=s.length-c.length;function d(){f(s)}let f=m=>{if(c.length>m.length){let h=c.filter(g=>!m.find(({name:v})=>v===g.name));t(h.map(({name:g})=>g))}else if(c.length<m.length){let h=m.filter(g=>!c.find(({name:v})=>v===g.name));e(h.map(({name:g})=>g))}};return(0,q_.jsxs)("div",{className:"editor-block-visibility",children:[!!u&&(0,q_.jsxs)("div",{className:"editor-block-visibility__disabled-blocks-count",children:[(0,K_.sprintf)((0,K_._n)("%d block is hidden.","%d blocks are hidden.",u),u),(0,q_.jsx)(V2e.Button,{__next40pxDefaultSize:!0,variant:"link",onClick:d,children:(0,K_.__)("Reset")})]}),(0,q_.jsx)(bot,{blockTypes:s,selectedBlockTypes:c,onChange:f,showSelectAll:!1})]})}var st=a(T(),1),{PreferencesModal:wot,PreferencesModalTabs:Sot,PreferencesModalSection:Dm,PreferenceToggleControl:Da}=Y(nP.privateApis);function W2e({extraSections:e={}}){let t=(0,hy.useSelect)(o=>o(ze).isModalActive("editor/preferences"),[]),{closeModal:r}=(0,hy.useDispatch)(ze);return t?(0,st.jsx)(wot,{closeModal:r,children:(0,st.jsx)(_ot,{extraSections:e})}):null}function _ot({extraSections:e={}}){let t=(0,H2e.useViewportMatch)("medium"),{showBlockBreadcrumbsOption:r,showCollaborationOptions:o}=(0,hy.useSelect)(c=>{let{getEditorSettings:u,isCollaborationEnabledForCurrentPost:d}=Y(c(R)),{get:f}=c(nP.store),m=u().richEditingEnabled;return{showBlockBreadcrumbsOption:!f("core","distractionFree")&&t&&m,showCollaborationOptions:d()}},[t]),{setIsListViewOpened:n,setIsInserterOpened:i}=(0,hy.useDispatch)(R),{set:s}=(0,hy.useDispatch)(nP.store),l=(0,U2e.useMemo)(()=>[{name:"general",tabLabel:(0,ot.__)("General"),content:(0,st.jsxs)(st.Fragment,{children:[(0,st.jsxs)(Dm,{title:(0,ot.__)("Interface"),children:[(0,st.jsx)(Da,{scope:"core",featureName:"showListViewByDefault",help:(0,ot.__)("Opens the List View panel by default."),label:(0,ot.__)("Always open List View")}),r&&(0,st.jsx)(Da,{scope:"core",featureName:"showBlockBreadcrumbs",help:(0,ot.__)("Display the block hierarchy trail at the bottom of the editor."),label:(0,ot.__)("Show block breadcrumbs")}),(0,st.jsx)(Da,{scope:"core",featureName:"allowRightClickOverrides",help:(0,ot.__)("Allows contextual List View menus via right-click, overriding browser defaults."),label:(0,ot.__)("Allow right-click contextual menus")}),(0,st.jsx)(Da,{scope:"core",featureName:"enableChoosePatternModal",help:(0,ot.__)("Pick from starter content when creating a new page."),label:(0,ot.__)("Show starter patterns")}),o&&(0,st.jsxs)(st.Fragment,{children:[(0,st.jsx)(Da,{scope:"core",featureName:"showCollaborationCursor",help:(0,ot.__)("Show your own avatar inside blocks during collaborative editing sessions."),label:(0,ot.__)("Show avatar in blocks")}),(0,st.jsx)(Da,{scope:"core",featureName:"showCollaborationNotifications",help:(0,ot.__)("Show notifications when collaborators join, leave, or save the post."),label:(0,ot.__)("Show collaboration notifications")})]})]}),(0,st.jsxs)(Dm,{title:(0,ot.__)("Document settings"),description:(0,ot.__)("Select what settings are shown in the document panel."),children:[(0,st.jsx)(PM.Slot,{}),(0,st.jsx)(qS,{taxonomyWrapper:(c,u)=>(0,st.jsx)(jh,{label:u.labels.menu_name,panelName:`taxonomy-panel-${u.slug}`})}),(0,st.jsx)(mm,{children:(0,st.jsx)(jh,{label:(0,ot.__)("Featured image"),panelName:"featured-image"})}),(0,st.jsx)(Wb,{children:(0,st.jsx)(jh,{label:(0,ot.__)("Excerpt"),panelName:"post-excerpt"})}),(0,st.jsx)(oo,{supportKeys:["comments","trackbacks"],children:(0,st.jsx)(jh,{label:(0,ot.__)("Discussion"),panelName:"discussion-panel"})}),(0,st.jsx)(hS,{children:(0,st.jsx)(jh,{label:(0,ot.__)("Page attributes"),panelName:"page-attributes"})})]}),t&&(0,st.jsx)(Dm,{title:(0,ot.__)("Publishing"),children:(0,st.jsx)(D2e,{help:(0,ot.__)("Review settings, such as visibility and tags."),label:(0,ot.__)("Enable pre-publish checks")})}),e?.general]})},{name:"appearance",tabLabel:(0,ot.__)("Appearance"),content:(0,st.jsxs)(Dm,{title:(0,ot.__)("Appearance"),description:(0,ot.__)("Customize the editor interface to suit your needs."),children:[(0,st.jsx)(Da,{scope:"core",featureName:"fixedToolbar",onToggle:()=>s("core","distractionFree",!1),help:(0,ot.__)("Access all block and document tools in a single place."),label:(0,ot.__)("Top toolbar")}),(0,st.jsx)(Da,{scope:"core",featureName:"distractionFree",onToggle:()=>{s("core","fixedToolbar",!0),i(!1),n(!1)},help:(0,ot.__)("Reduce visual distractions by hiding the toolbar and other elements to focus on writing."),label:(0,ot.__)("Distraction free")}),(0,st.jsx)(Da,{scope:"core",featureName:"focusMode",help:(0,ot.__)("Highlights the current block and fades other content."),label:(0,ot.__)("Spotlight mode")}),e?.appearance]})},{name:"accessibility",tabLabel:(0,ot.__)("Accessibility"),content:(0,st.jsxs)(st.Fragment,{children:[(0,st.jsx)(Dm,{title:(0,ot.__)("Navigation"),description:(0,ot.__)("Optimize the editing experience for enhanced control."),children:(0,st.jsx)(Da,{scope:"core",featureName:"keepCaretInsideBlock",help:(0,ot.__)("Keeps the text cursor within blocks while navigating with arrow keys, preventing it from moving to other blocks and enhancing accessibility for keyboard users."),label:(0,ot.__)("Contain text cursor inside block")})}),(0,st.jsx)(Dm,{title:(0,ot.__)("Interface"),children:(0,st.jsx)(Da,{scope:"core",featureName:"showIconLabels",label:(0,ot.__)("Show button text labels"),help:(0,ot.__)("Show text instead of icons on buttons across the interface.")})})]})},{name:"blocks",tabLabel:(0,ot.__)("Blocks"),content:(0,st.jsxs)(st.Fragment,{children:[(0,st.jsx)(Dm,{title:(0,ot.__)("Inserter"),children:(0,st.jsx)(Da,{scope:"core",featureName:"mostUsedBlocks",help:(0,ot.__)("Adds a category with the most frequently used blocks in the inserter."),label:(0,ot.__)("Show most used blocks")})}),(0,st.jsx)(Dm,{title:(0,ot.__)("Manage block visibility"),description:(0,ot.__)("Disable blocks that you don't want to appear in the inserter. They can always be toggled back on later."),children:(0,st.jsx)(z2e,{})})]})},window.__clientSideMediaProcessing&&{name:"media",tabLabel:(0,ot.__)("Media"),content:(0,st.jsx)(st.Fragment,{children:(0,st.jsxs)(Dm,{title:(0,ot.__)("General"),description:(0,ot.__)("Customize options related to the media upload flow."),children:[(0,st.jsx)(Da,{scope:"core/media",featureName:"optimizeOnUpload",help:(0,ot.__)("Compress media items before uploading to the server."),label:(0,ot.__)("Pre-upload compression")}),(0,st.jsx)(Da,{scope:"core/media",featureName:"requireApproval",help:(0,ot.__)("Require approval step when optimizing existing media."),label:(0,ot.__)("Approval step")})]})})}].filter(Boolean),[r,o,e,i,n,s,t]);return(0,st.jsx)(Sot,{sections:l})}var lP=a(kt(),1);var iP=a(pe(),1),G2e="content",Y2e={name:"core/pattern-overrides",getValues({select:e,clientId:t,context:r,bindings:o}){let n=r["pattern/overrides"],{getBlockAttributes:i}=e(iP.store),s=i(t),l={};for(let c of Object.keys(o)){let u=n?.[s?.metadata?.name]?.[c];if(u===void 0){l[c]=s?.[c];continue}else l[c]=u===""?void 0:u}return l},setValues({select:e,dispatch:t,clientId:r,bindings:o}){let{getBlockAttributes:n,getBlockParentsByBlockName:i,getBlocks:s}=e(iP.store),c=n(r)?.metadata?.name;if(!c)return;let[u]=i(r,"core/block",!0),d=Object.entries(o).reduce((m,[h,{newValue:g}])=>(m[h]=g,m),{});if(!u){let m=h=>{for(let g of h)g.attributes?.metadata?.name===c&&t(iP.store).updateBlockAttributes(g.clientId,d),m(g.innerBlocks)};m(s());return}let f=n(u)?.[G2e];t(iP.store).updateBlockAttributes(u,{[G2e]:{...f,[c]:{...f?.[c],...Object.entries(d).reduce((m,[h,g])=>(m[h]=g===void 0?"":g,m),{})}}})},canUserEditValue:()=>!0};var FD=a(V(),1),DD=a(oe(),1),sP=a(pe(),1),tY=["core/navigation-link","core/navigation-submenu"],q2e=[{label:(0,FD.__)("Post Date"),args:{field:"date"},type:"string"},{label:(0,FD.__)("Post Modified Date"),args:{field:"modified"},type:"string"},{label:(0,FD.__)("Post Link"),args:{field:"link"},type:"string"}],K2e={name:"core/post-data",getValues({select:e,context:t,bindings:r,clientId:o}){let{getBlockAttributes:n,getBlockName:i}=e(sP.store),s=i(o),l=tY.includes(s),c,u;if(l){let h=n(o);c=h?.id,u=h?.type}else c=t?.postId,u=t?.postType;let{getEditedEntityRecord:d}=e(DD.store),f=d("postType",u,c),m={};for(let[h,g]of Object.entries(r)){let v=q2e.find(b=>b.args.field===g.args.field);v?f?m[h]=f[g.args.field]:m[h]=v.label:m[h]=g.args.field}return m},setValues({dispatch:e,context:t,bindings:r,clientId:o,select:n}){let{getBlockName:i}=n(sP.store),s=i(o);if(tY.includes(s))return!1;let l={};Object.values(r).forEach(({args:c,newValue:u})=>{l[c.field]=u}),e(DD.store).editEntityRecord("postType",t?.postType,t?.postId,l)},canUserEditValue({select:e,context:t}){let{getBlockName:r,getSelectedBlockClientId:o}=e(sP.store),n=o(),i=r(n);return!(tY.includes(i)||t?.query||t?.queryId||!t?.postType||!e(DD.store).canUser("update",{kind:"postType",name:t?.postType,id:t?.postId}))},getFieldsList({context:e,select:t}){return t(sP.store).getSelectedBlock()?.name!=="core/post-date"?[]:!e||!e.postId||!e.postType?[]:q2e}};var aP=a(oe(),1);function rY(e,t){let{getRegisteredPostMeta:r}=Y(e(aP.store)),o=r(t?.postType),n=[];return Object.entries(o).forEach(([i,s])=>{i==="footnotes"||i.charAt(0)==="_"||n.push({label:s.title||i,args:{key:i},default:s.default,type:s.type})}),n}function xot({select:e,context:t,args:r}){let n=rY(e,t).find(l=>l.args.key===r.key);if(!n)return r.key;if(!t?.postId)return n.default||n.label||r.key;let{getEditedEntityRecord:i}=e(aP.store);return i("postType",t?.postType,t?.postId).meta?.[r.key]??n?.label??r.key}var Z2e={name:"core/post-meta",getValues({select:e,context:t,bindings:r}){let o={};for(let[n,i]of Object.entries(r))o[n]=xot({select:e,context:t,args:i.args});return o},setValues({dispatch:e,context:t,bindings:r}){let o={};Object.values(r).forEach(({args:n,newValue:i})=>{o[n.key]=i}),e(aP.store).editEntityRecord("postType",t?.postType,t?.postId,{meta:o})},canUserEditValue({select:e,context:t,args:r}){return!(t?.query||t?.queryId||!t?.postType||!rY(e,t).some(l=>l.args.key===r.key)||e(R).getEditorSettings().enableCustomFields||!e(aP.store).canUser("update",{kind:"postType",name:t?.postType,id:t?.postId}))},getFieldsList({select:e,context:t}){return rY(e,t).map(({default:o,...n})=>({...n}))}};var yg=a(V(),1),X2e=a(oe(),1),LD=a(pe(),1),oY=["core/navigation-link","core/navigation-submenu"],nY=[{label:(0,yg.__)("Term ID"),args:{field:"id"},type:"string"},{label:(0,yg.__)("Name"),args:{field:"name"},type:"string"},{label:(0,yg.__)("Slug"),args:{field:"slug"},type:"string"},{label:(0,yg.__)("Link"),args:{field:"link"},type:"string"},{label:(0,yg.__)("Description"),args:{field:"description"},type:"string"},{label:(0,yg.__)("Parent ID"),args:{field:"parent"},type:"string"},{label:(0,yg.__)("Count"),args:{field:"count"},type:"string"}],Q2e={name:"core/term-data",usesContext:["taxonomy","termId","termData"],getValues({select:e,context:t,bindings:r,clientId:o}){let{getEntityRecord:n}=e(X2e.store),{getBlockAttributes:i,getBlockName:s}=e(LD.store),l=s(o),c=oY.includes(l),u;if(c){let f=i(o),m=f?.type;u=n("taxonomy",m==="tag"?"post_tag":m,f?.id)}else t.termId&&t.taxonomy&&(u=n("taxonomy",t.taxonomy,t.termId));!u&&t?.termData&&!c&&(u=t.termData);let d={};for(let[f,m]of Object.entries(r)){let h=nY.find(g=>g.args.field===m.args.field);h?!u||u[m.args.field]===void 0?d[f]=h.label:m.args.field==="count"?d[f]="("+u[m.args.field]+")":d[f]=u[m.args.field]:d[f]=m.args.field}return d},setValues({dispatch:e,context:t,bindings:r}){return!1},canUserEditValue({select:e,context:t}){let{getBlockName:r,getSelectedBlockClientId:o}=e(LD.store),n=o(),i=r(n);return oY.includes(i)||t?.termQuery||!t?.taxonomy||!t?.termId,!1},getFieldsList({context:e,select:t}){let{getBlockAttributes:r,getBlockName:o,getSelectedBlockClientId:n}=t(LD.store),i=n(),s=o(i);if(oY.includes(s)){let l=r(i);return!l||!l.id||!l.type?[]:nY}return e?e.taxonomy&&e.termId||e.termData?nY:[]:[]}};function J2e(){(0,lP.registerBlockBindingsSource)(Y2e),(0,lP.registerBlockBindingsSource)(K2e),(0,lP.registerBlockBindingsSource)(Z2e),(0,lP.registerBlockBindingsSource)(Q2e)}var BD=a(G(),1),bu=a(H(),1),Ud=a(V(),1),sY=a(Um(),1),eRe=a(Rx(),1),tRe=a(Rt(),1),VD=a(W(),1);var cP=a(T(),1),iY="upload-progress",Cot=3e3,$2e=40;function Tot(e){if(e.length<=$2e)return e;let t="\u2026",r=$2e-t.length,o=Math.ceil(r/2),n=Math.floor(r/2);return e.slice(0,o)+t+e.slice(e.length-n)}var Eot=(0,cP.jsx)("span",{className:"editor-upload-progress-snackbar__spinner","aria-hidden":"true",children:(0,cP.jsx)(VD.Spinner,{})}),Pot=(0,cP.jsx)("span",{className:"editor-upload-progress-snackbar__check","aria-hidden":"true",children:(0,cP.jsx)(VD.Icon,{icon:To})});function rRe(){let e=(0,BD.useSelect)(g=>g(eRe.store).getItems(),[]),t=bq(),r=(0,bu.useMemo)(()=>e.filter(g=>!g.parentId),[e]),o=r.length,n=t?t.total-t.completed:0,i=o+n,[s,l]=(0,bu.useState)(0),c=o+(t?t.total:0);c>s&&l(c);let{createNotice:u,removeNotice:d}=(0,BD.useDispatch)(tRe.store),f=(0,bu.useRef)(!1),m=(0,bu.useRef)(!1),h=(0,bu.useRef)(null);return(0,bu.useEffect)(()=>()=>{h.current&&clearTimeout(h.current)},[]),(0,bu.useEffect)(()=>{let g=i>0;if(g&&!m.current?(f.current=!1,(0,sY.speak)((0,Ud.__)("Media upload started"),"polite"),h.current&&(clearTimeout(h.current),h.current=null,l(0))):!g&&m.current&&((0,sY.speak)((0,Ud.__)("Media upload complete"),"polite"),f.current?l(0):(u("info",(0,Ud.__)("Upload complete"),{id:iY,type:"snackbar",isDismissible:!1,explicitDismiss:!1,speak:!1,icon:Pot,onDismiss:()=>{f.current=!0}}),h.current=setTimeout(()=>{d(iY),h.current=null,l(0)},Cot))),m.current=g,!g||f.current)return;let v=s,b=v-i+1,S=Tot(r[0]?.sourceFile?.name||t?.pending[0]||(0,Ud.__)("Uploading")),y=v===1?(0,Ud.sprintf)((0,Ud.__)("Uploading \u2014 %s"),S):(0,Ud.sprintf)((0,Ud.__)("Uploading %1$d of %2$d \u2014 %3$s"),b,v,S);u("info",y,{id:iY,type:"snackbar",isDismissible:!1,explicitDismiss:!0,speak:!1,icon:Eot,onDismiss:()=>{f.current=!0}})},[i,s,r,t,u,d]),null}var{store:kot,...Rot}=xz,oRe={};BY(oRe,{CreateTemplatePartModal:_0,patternTitleField:a1,templateTitleField:Mx,BackButton:V6,EntitiesSavedStatesExtensible:WT,Editor:N2e,PluginPostExcerpt:QT,PostCardPanel:mg,PreferencesModal:W2e,usePostActions:WF,usePostFields:rS,ToolsMoreMenuGroup:Y6,ViewMoreMenuGroup:q6,ResizableEditor:uS,UploadProgressSnackbar:rRe,registerCoreBlockBindingsSources:J2e,getTemplateInfo:bl,GlobalStylesUIWrapper:sN,GlobalStylesActionMenu:kD,StyleBookPreview:Dbe,useGlobalStyles:ro,useStyle:Sh,interfaceStore:kot,...Rot});var uP=a(G(),1);function Aot(e,t,r){let{registerEntityAction:o}=Y((0,uP.dispatch)(R));o(e,t,r)}function Iot(e,t,r){let{unregisterEntityAction:o}=Y((0,uP.dispatch)(R));o(e,t,r)}function Oot(e,t,r){let{registerEntityField:o}=Y((0,uP.dispatch)(R));o(e,t,r)}function Not(e,t,r){let{unregisterEntityField:o}=Y((0,uP.dispatch)(R));o(e,t,r)}var nRe=a(pe(),1);return fRe(Mot);})();
500 /*! Bundled license information:
501
502 use-sync-external-store/cjs/use-sync-external-store-shim.production.js:
503 (**
504 * @license React
505 * use-sync-external-store-shim.production.js
506 *
507 * Copyright (c) Meta Platforms, Inc. and affiliates.
508 *
509 * This source code is licensed under the MIT license found in the
510 * LICENSE file in the root directory of this source tree.
511 *)
512
513 use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.js:
514 (**
515 * @license React
516 * use-sync-external-store-shim/with-selector.production.js
517 *
518 * Copyright (c) Meta Platforms, Inc. and affiliates.
519 *
520 * This source code is licensed under the MIT license found in the
521 * LICENSE file in the root directory of this source tree.
522 *)
523
524 autosize/dist/autosize.js:
525 (*!
526 autosize 4.0.2
527 license: MIT
528 http://www.jacklmoore.com/autosize
529 *)
530
531 is-plain-object/dist/is-plain-object.mjs:
532 (*!
533 * is-plain-object <https://github.com/jonschlinkert/is-plain-object>
534 *
535 * Copyright (c) 2014-2017, Jon Schlinkert.
536 * Released under the MIT License.
537 *)
538 */
539 //# sourceMappingURL=index.min.js.map
540