"use strict";var wp;(wp||={}).editor=(()=>{var nke=Object.create;var XE=Object.defineProperty;var ike=Object.getOwnPropertyDescriptor;var ske=Object.getOwnPropertyNames;var ake=Object.getPrototypeOf,lke=Object.prototype.hasOwnProperty;var Fs=(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 Ve=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Sn=(e,t)=>{for(var r in t)XE(e,r,{get:t[r],enumerable:!0})},rG=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of ske(t))!lke.call(e,n)&&n!==r&&XE(e,n,{get:()=>t[n],enumerable:!(o=ike(t,n))||o.enumerable});return e};var a=(e,t,r)=>(r=e!=null?nke(ake(e)):{},rG(t||!e||!e.__esModule?XE(r,"default",{value:e,enumerable:!0}):r,e)),cke=e=>rG(XE({},"__esModule",{value:!0}),e);var G=Ve((Uet,oG)=>{oG.exports=window.wp.data});var ee=Ve((Wet,nG)=>{nG.exports=window.wp.coreData});var U=Ve((Get,iG)=>{iG.exports=window.wp.element});var _e=Ve((Yet,sG)=>{sG.exports=window.wp.compose});var xn=Ve((qet,aG)=>{aG.exports=window.wp.hooks});var he=Ve((Ket,lG)=>{lG.exports=window.wp.blockEditor});var bt=Ve((ett,hG)=>{hG.exports=window.wp.blocks});var go=Ve((ttt,gG)=>{gG.exports=window.wp.date});var vo=Ve((rtt,vG)=>{vG.exports=window.wp.url});var rl=Ve((ott,yG)=>{yG.exports=window.wp.deprecated});var Rt=Ve((ntt,bG)=>{bG.exports=window.wp.preferences});var we=Ve((att,CG)=>{CG.exports=window.wp.primitives});var T=Ve((ltt,TG)=>{TG.exports=window.ReactJSXRuntime});var Pm=Ve((Int,EG)=>{EG.exports=window.wp.privateApis});var ub=Ve((znt,jG)=>{jG.exports=window.wp.a11y});var Fd=Ve((Hnt,zG)=>{zG.exports=window.wp.apiFetch});var xt=Ve((Unt,HG)=>{HG.exports=window.wp.notices});var j=Ve((Wnt,UG)=>{UG.exports=window.wp.i18n});var Ot=Ve((Qnt,QG)=>{QG.exports=window.wp.htmlEntities});var $G=Ve((eit,JG)=>{"use strict";JG.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 Im=Ve((cit,iY)=>{iY.exports=window.wp.mediaUtils});var kL=Ve((uit,sY)=>{sY.exports=window.wp.uploadMedia});var W=Ve((Cit,yY)=>{yY.exports=window.wp.components});var ic=Ve((est,BY)=>{BY.exports=window.wp.patterns});var v_=Ve((lst,UY)=>{UY.exports=window.wp.blob});var Se=Ve((cst,WY)=>{WY.exports=window.React});var uu=Ve((Kst,dq)=>{dq.exports=window.ReactDOM});var OK=Ve(IK=>{"use strict";var Eb=Se();function S5e(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var x5e=typeof Object.is=="function"?Object.is:S5e,_5e=Eb.useState,C5e=Eb.useEffect,T5e=Eb.useLayoutEffect,E5e=Eb.useDebugValue;function P5e(e,t){var r=t(),o=_5e({inst:{value:r,getSnapshot:t}}),n=o[0].inst,i=o[1];return T5e(function(){n.value=r,n.getSnapshot=t,xB(n)&&i({inst:n})},[e,r,t]),C5e(function(){return xB(n)&&i({inst:n}),e(function(){xB(n)&&i({inst:n})})},[e]),E5e(r),r}function xB(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!x5e(e,r)}catch{return!0}}function k5e(e,t){return t()}var R5e=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?k5e:P5e;IK.useSyncExternalStore=Eb.useSyncExternalStore!==void 0?Eb.useSyncExternalStore:R5e});var w2=Ve((Lct,NK)=>{"use strict";NK.exports=OK()});var DK=Ve(MK=>{"use strict";var S2=Se(),A5e=w2();function I5e(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var O5e=typeof Object.is=="function"?Object.is:I5e,N5e=A5e.useSyncExternalStore,M5e=S2.useRef,D5e=S2.useEffect,F5e=S2.useMemo,L5e=S2.useDebugValue;MK.useSyncExternalStoreWithSelector=function(e,t,r,o,n){var i=M5e(null);if(i.current===null){var s={hasValue:!1,value:null};i.current=s}else s=i.current;i=F5e(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,O5e(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=N5e(e,i[0],i[1]);return D5e(function(){s.hasValue=!0,s.value=l},[l]),L5e(l),l}});var LK=Ve((Vct,FK)=>{"use strict";FK.exports=DK()});var MX=Ve((fgt,NX)=>{NX.exports=window.wp.theme});var s1=Ve((eyt,xR)=>{var _J={\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"},CJ=Object.keys(_J).join("|"),EDe=new RegExp(CJ,"g"),PDe=new RegExp(CJ,"");function kDe(e){return _J[e]}var TJ=function(e){return e.replace(EDe,kDe)},RDe=function(e){return!!e.match(PDe)};xR.exports=TJ;xR.exports.has=RDe;xR.exports.remove=TJ});var $b=Ve((Myt,o$)=>{o$.exports=window.wp.wordcount});var yo=Ve((wwt,dte)=>{dte.exports=window.wp.keycodes});var DA=Ve((sPt,Qoe)=>{"use strict";Qoe.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 U9=Ve((PRt,oie)=>{oie.exports=window.wp.warning});var NI=Ve((JNt,rae)=>{"use strict";var zBe=function(t){return HBe(t)&&!UBe(t)};function HBe(e){return!!e&&typeof e=="object"}function UBe(e){var t=Object.prototype.toString.call(e);return t==="[object RegExp]"||t==="[object Date]"||YBe(e)}var WBe=typeof Symbol=="function"&&Symbol.for,GBe=WBe?Symbol.for("react.element"):60103;function YBe(e){return e.$$typeof===GBe}function qBe(e){return Array.isArray(e)?[]:{}}function rC(e,t){return t.clone!==!1&&t.isMergeableObject(e)?H0(qBe(e),e,t):e}function KBe(e,t,r){return e.concat(t).map(function(o){return rC(o,r)})}function ZBe(e,t){if(!t.customMerge)return H0;var r=t.customMerge(e);return typeof r=="function"?r:H0}function XBe(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[]}function eae(e){return Object.keys(e).concat(XBe(e))}function tae(e,t){try{return t in e}catch{return!1}}function QBe(e,t){return tae(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))}function JBe(e,t,r){var o={};return r.isMergeableObject(e)&&eae(e).forEach(function(n){o[n]=rC(e[n],r)}),eae(t).forEach(function(n){QBe(e,n)||(tae(e,n)&&r.isMergeableObject(t[n])?o[n]=ZBe(n,r)(e[n],t[n],r):o[n]=rC(t[n],r))}),o}function H0(e,t,r){r=r||{},r.arrayMerge=r.arrayMerge||KBe,r.isMergeableObject=r.isMergeableObject||zBe,r.cloneUnlessOtherwiseSpecified=rC;var o=Array.isArray(t),n=Array.isArray(e),i=o===n;return i?o?r.arrayMerge(e,t,r):JBe(e,t,r):rC(t,r)}H0.all=function(t,r){if(!Array.isArray(t))throw new Error("first argument should be an array");return t.reduce(function(o,n){return H0(o,n,r)},{})};var $Be=H0;rae.exports=$Be});var ta=Ve((jDt,zae)=>{zae.exports=window.wp.keyboardShortcuts});var Uae=Ve((zDt,Hae)=>{Hae.exports=window.wp.viewport});var zp=Ve((HDt,Wae)=>{Wae.exports=window.wp.plugins});var jj=Ve(($4t,Kce)=>{Kce.exports=window.wp.styleEngine});var Nz=Ve(Oz=>{"use strict";Object.defineProperty(Oz,"__esModule",{value:!0});Oz.default=Tpe;function Tpe(){}Tpe.prototype={diff:function(t,r){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=o.callback;typeof o=="function"&&(n=o,o={}),this.options=o;var i=this;function s(v){return n?(setTimeout(function(){n(void 0,v)},0),!0):v}t=this.castInput(t),r=this.castInput(r),t=this.removeEmpty(this.tokenize(t)),r=this.removeEmpty(this.tokenize(r));var l=r.length,c=t.length,u=1,d=l+c,f=[{newPos:-1,components:[]}],m=this.extractCommon(f[0],r,t,0);if(f[0].newPos+1>=l&&m+1>=c)return s([{value:this.join(r),count:r.length}]);function h(){for(var v=-1*u;v<=u;v+=2){var y=void 0,b=f[v-1],w=f[v+1],S=(w?w.newPos:0)-v;b&&(f[v-1]=void 0);var x=b&&b.newPos+1<l,_=w&&0<=S&&S<c;if(!x&&!_){f[v]=void 0;continue}if(!x||_&&b.newPos<w.newPos?(y=BYe(w),i.pushComponent(y.components,void 0,!0)):(y=b,y.newPos++,i.pushComponent(y.components,!0,void 0)),S=i.extractCommon(y,r,t,v),y.newPos+1>=l&&S+1>=c)return s(LYe(i,y.components,r,t,i.useLongestToken));f[v]=y}u++}if(n)(function v(){setTimeout(function(){if(u>d)return n();h()||v()},0)})();else for(;u<=d;){var g=h();if(g)return g}},pushComponent:function(t,r,o){var n=t[t.length-1];n&&n.added===r&&n.removed===o?t[t.length-1]={count:n.count+1,added:r,removed:o}:t.push({count:1,added:r,removed:o})},extractCommon:function(t,r,o,n){for(var i=r.length,s=o.length,l=t.newPos,c=l-n,u=0;l+1<i&&c+1<s&&this.equals(r[l+1],o[c+1]);)l++,c++,u++;return u&&t.components.push({count:u}),t.newPos=l,c},equals:function(t,r){return this.options.comparator?this.options.comparator(t,r):t===r||this.options.ignoreCase&&t.toLowerCase()===r.toLowerCase()},removeEmpty:function(t){for(var r=[],o=0;o<t.length;o++)t[o]&&r.push(t[o]);return r},castInput:function(t){return t},tokenize:function(t){return t.split("")},join:function(t){return t.join("")}};function LYe(e,t,r,o,n){for(var i=0,s=t.length,l=0,c=0;i<s;i++){var u=t[i];if(u.removed){if(u.value=e.join(o.slice(c,c+u.count)),c+=u.count,i&&t[i-1].added){var f=t[i-1];t[i-1]=t[i],t[i]=f}}else{if(!u.added&&n){var d=r.slice(l,l+u.count);d=d.map(function(h,g){var v=o[c+g];return v.length>h.length?v:h}),u.value=e.join(d)}else u.value=e.join(r.slice(l,l+u.count));l+=u.count,u.added||(c+=u.count)}}var m=t[s-1];return s>1&&typeof m.value=="string"&&(m.added||m.removed)&&e.equals("",m.value)&&(t[s-2].value+=m.value,t.pop()),t}function BYe(e){return{newPos:e.newPos,components:e.components.slice(0)}}});var Mz=Ve(iT=>{"use strict";Object.defineProperty(iT,"__esModule",{value:!0});iT.diffArrays=zYe;iT.arrayDiff=void 0;var VYe=jYe(Nz());function jYe(e){return e&&e.__esModule?e:{default:e}}var nT=new VYe.default;iT.arrayDiff=nT;nT.tokenize=function(e){return e.slice()};nT.join=nT.removeEmpty=function(e){return e};function zYe(e,t,r){return nT.diff(e,t,r)}});var Epe=Ve(Dz=>{"use strict";Object.defineProperty(Dz,"__esModule",{value:!0});Dz.generateOptions=HYe;function HYe(e,t){if(typeof e=="function")t.callback=e;else if(e)for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);return t}});var Fz=Ve(Mw=>{"use strict";Object.defineProperty(Mw,"__esModule",{value:!0});Mw.diffWords=YYe;Mw.diffWordsWithSpace=qYe;Mw.wordDiff=void 0;var UYe=GYe(Nz()),WYe=Epe();function GYe(e){return e&&e.__esModule?e:{default:e}}var Ppe=/^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/,kpe=/\S/,sT=new UYe.default;Mw.wordDiff=sT;sT.equals=function(e,t){return this.options.ignoreCase&&(e=e.toLowerCase(),t=t.toLowerCase()),e===t||this.options.ignoreWhitespace&&!kpe.test(e)&&!kpe.test(t)};sT.tokenize=function(e){for(var t=e.split(/(\s+|[()[\]{}'"]|\b)/),r=0;r<t.length-1;r++)!t[r+1]&&t[r+2]&&Ppe.test(t[r])&&Ppe.test(t[r+2])&&(t[r]+=t[r+2],t.splice(r+1,2),r--);return t};function YYe(e,t,r){return r=(0,WYe.generateOptions)(r,{ignoreWhitespace:!0}),sT.diff(e,t,r)}function qYe(e,t,r){return sT.diff(e,t,r)}});var Ape=Ve((OGt,Rpe)=>{Rpe.exports=window.wp.blockSerializationDefaultParser});var aT=Ve((NGt,Ipe)=>{Ipe.exports=window.wp.richText});var jz=Ve((HGt,zpe)=>{zpe.exports=window.wp.commands});var py=Ve((Gqt,mge)=>{mge.exports=window.wp.dom});var Zwe=Ve((Ler,Kwe)=>{"use strict";var AXe="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";Kwe.exports=AXe});var $we=Ve((Ber,Jwe)=>{"use strict";var IXe=Zwe();function Xwe(){}function Qwe(){}Qwe.resetWarningCache=Xwe;Jwe.exports=function(){function e(o,n,i,s,l,c){if(c!==IXe){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:Qwe,resetWarningCache:Xwe};return r.PropTypes=r,r}});var tSe=Ve((zer,eSe)=>{eSe.exports=$we()();var Ver,jer});var oSe=Ve((xD,rSe)=>{(function(e,t){if(typeof define=="function"&&define.amd)define(["module","exports"],t);else if(typeof xD<"u")t(rSe,xD);else{var r={exports:{}};t(r,r.exports),e.autosize=r.exports}})(xD,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 S=window.getComputedStyle(c,null);S.resize==="vertical"?c.style.resize="none":S.resize==="both"&&(c.style.resize="horizontal"),S.boxSizing==="content-box"?u=-(parseFloat(S.paddingTop)+parseFloat(S.paddingBottom)):u=parseFloat(S.borderTopWidth)+parseFloat(S.borderBottomWidth),isNaN(u)&&(u=0),y()}function h(S){{var x=c.style.width;c.style.width="0px",c.offsetWidth,c.style.width=x}c.style.overflowY=S}function g(S){for(var x=[];S&&S.parentNode&&S.parentNode instanceof Element;)S.parentNode.scrollTop&&x.push({node:S.parentNode,scrollTop:S.parentNode.scrollTop}),S=S.parentNode;return x}function v(){if(c.scrollHeight!==0){var S=g(c),x=document.documentElement&&document.documentElement.scrollTop;c.style.height="",c.style.height=c.scrollHeight+u+"px",d=c.clientWidth,S.forEach(function(_){_.node.scrollTop=_.scrollTop}),x&&(document.documentElement.scrollTop=x)}}function y(){v();var S=Math.round(parseFloat(c.style.height)),x=window.getComputedStyle(c,null),_=x.boxSizing==="content-box"?Math.round(parseFloat(x.height)):c.offsetHeight;if(_<S?x.overflowY==="hidden"&&(h("scroll"),v(),_=x.boxSizing==="content-box"?Math.round(parseFloat(window.getComputedStyle(c,null).height)):c.offsetHeight):x.overflowY!=="hidden"&&(h("hidden"),v(),_=x.boxSizing==="content-box"?Math.round(parseFloat(window.getComputedStyle(c,null).height)):c.offsetHeight),f!==_){f=_;var P=o("autosize:resized");try{c.dispatchEvent(P)}catch{}}}var b=function(){c.clientWidth!==d&&y()},w=function(S){window.removeEventListener("resize",b,!1),c.removeEventListener("input",y,!1),c.removeEventListener("keyup",y,!1),c.removeEventListener("autosize:destroy",w,!1),c.removeEventListener("autosize:update",y,!1),Object.keys(S).forEach(function(x){c.style[x]=S[x]}),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",w,!1),"onpropertychange"in c&&"oninput"in c&&c.addEventListener("keyup",y,!1),window.addEventListener("resize",b,!1),c.addEventListener("input",y,!1),c.addEventListener("autosize:update",y,!1),c.style.overflowX="hidden",c.style.wordWrap="break-word",r.set(c,{destroy:w,update:y}),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 iSe=Ve((Her,nSe)=>{var OXe=function(e,t,r){return r=window.getComputedStyle,(r?r(e):e.currentStyle)[t.replace(/-(\w)/gi,function(o,n){return n.toUpperCase()})]};nSe.exports=OXe});var aSe=Ve((Uer,sSe)=>{var SU=iSe();function NXe(e){var t=SU(e,"line-height"),r=parseFloat(t,10);if(t===r+""){var o=e.style.lineHeight;e.style.lineHeight=t+"em",t=SU(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=SU(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}sSe.exports=NXe});var cSe=Ve(nm=>{"use strict";var MXe=nm&&nm.__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)}})(),xU=nm&&nm.__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},DXe=nm&&nm.__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};nm.__esModule=!0;var CD=Se(),JT=tSe(),_D=oSe(),FXe=aSe(),LXe=FXe,lSe="autosize:resized",BXe=(function(e){MXe(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:LXe(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&&_D(r.textarea)}):this.textarea&&_D(this.textarea),this.textarea&&this.textarea.addEventListener(lSe,this.onResize)},t.prototype.componentWillUnmount=function(){this.textarea&&(this.textarea.removeEventListener(lSe,this.onResize),_D.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=DXe(n,["onResize","maxRows","onChange","style","innerRef","children"]),m=o.state.lineHeight,h=s&&m?m*s:null;return CD.createElement("textarea",xU({},f,{onChange:this.onChange,style:h?xU({},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&&_D.update(this.textarea)},t.defaultProps={rows:1,async:!1},t.propTypes={rows:JT.number,maxRows:JT.number,onResize:JT.func,innerRef:JT.any,async:JT.bool},t})(CD.Component);nm.TextareaAutosize=CD.forwardRef(function(e,t){return CD.createElement(BXe,xU({},e,{innerRef:t}))})});var _U=Ve((Ger,uSe)=>{"use strict";var VXe=cSe();uSe.exports=VXe.TextareaAutosize});var lxe=Ve((qtr,axe)=>{axe.exports=window.wp.serverSideRender});var zet={};Sn(zet,{AlignmentToolbar:()=>ZXe,Autocomplete:()=>KXe,AutosaveMonitor:()=>$5,BlockAlignmentToolbar:()=>XXe,BlockControls:()=>QXe,BlockEdit:()=>JXe,BlockEditorKeyboardShortcuts:()=>$Xe,BlockFormatControls:()=>eQe,BlockIcon:()=>tQe,BlockInspector:()=>rQe,BlockList:()=>oQe,BlockMover:()=>nQe,BlockNavigationDropdown:()=>iQe,BlockSelectionClearer:()=>sQe,BlockSettingsMenu:()=>aQe,BlockTitle:()=>lQe,BlockToolbar:()=>cQe,CharacterCount:()=>jS,ColorPalette:()=>uQe,ContrastChecker:()=>dQe,CopyHandler:()=>fQe,DefaultBlockAppender:()=>mQe,DocumentBar:()=>hN,DocumentOutline:()=>Yw,DocumentOutlineCheck:()=>ove,EditorHistoryRedo:()=>SN,EditorHistoryUndo:()=>CN,EditorKeyboardShortcuts:()=>Bw,EditorKeyboardShortcutsRegister:()=>uve,EditorNotices:()=>_ve,EditorProvider:()=>Uhe,EditorSnackbars:()=>Pve,EntitiesSavedStates:()=>ON,ErrorBoundary:()=>jve,FontSizePicker:()=>pQe,InnerBlocks:()=>gQe,Inserter:()=>hQe,InspectorAdvancedControls:()=>vQe,InspectorControls:()=>yQe,LocalAutosaveMonitor:()=>Wve,MediaPlaceholder:()=>CQe,MediaUpload:()=>TQe,MediaUploadCheck:()=>EQe,MultiSelectScrollIntoView:()=>PQe,NavigableToolbar:()=>kQe,ObserveTyping:()=>RQe,PageAttributesCheck:()=>Zw,PageAttributesOrder:()=>Xve,PageAttributesPanel:()=>BN,PageAttributesParent:()=>aye,PageTemplate:()=>zN,PanelColorSettings:()=>bQe,PlainText:()=>wQe,PluginBlockSettingsMenuItem:()=>Cye,PluginDocumentSettingPanel:()=>YN,PluginMoreMenuItem:()=>kye,PluginPostPublishPanel:()=>KN,PluginPostStatusInfo:()=>XN,PluginPrePublishPanel:()=>JN,PluginPreviewMenuItem:()=>Lye,PluginSidebar:()=>Ey,PluginSidebarMoreMenuItem:()=>jye,PostAuthor:()=>oM,PostAuthorCheck:()=>nM,PostAuthorPanel:()=>aM,PostComments:()=>dM,PostDiscussionPanel:()=>vM,PostExcerpt:()=>NT,PostExcerptCheck:()=>Ay,PostExcerptPanel:()=>Wbe,PostFeaturedImage:()=>FT,PostFeaturedImageCheck:()=>tm,PostFeaturedImagePanel:()=>PM,PostFormat:()=>BT,PostFormatCheck:()=>dS,PostLastRevision:()=>AM,PostLastRevisionCheck:()=>rm,PostLastRevisionPanel:()=>u0e,PostLockedModal:()=>v0e,PostPendingStatus:()=>S0e,PostPendingStatusCheck:()=>OM,PostPingbacks:()=>hM,PostPreviewButton:()=>Nh,PostPublishButton:()=>gS,PostPublishButtonLabel:()=>DM,PostPublishPanel:()=>eD,PostSavedState:()=>dD,PostSchedule:()=>bS,PostScheduleCheck:()=>fD,PostScheduleLabel:()=>wS,PostSchedulePanel:()=>hD,PostSticky:()=>oD,PostStickyCheck:()=>tD,PostSwitchToDraftButton:()=>jwe,PostSyncStatus:()=>yD,PostTaxonomies:()=>RS,PostTaxonomiesCheck:()=>bD,PostTaxonomiesFlatTermSelector:()=>cU,PostTaxonomiesHierarchicalTermSelector:()=>fU,PostTaxonomiesPanel:()=>SD,PostTemplatePanel:()=>eM,PostTextEditor:()=>$T,PostTitle:()=>ND,PostTitleRaw:()=>DD,PostTrash:()=>DS,PostTrashCheck:()=>FD,PostTypeSupportCheck:()=>Xr,PostURL:()=>oE,PostURLCheck:()=>jD,PostURLLabel:()=>DSe,PostURLPanel:()=>WD,PostVisibility:()=>HT,PostVisibilityCheck:()=>VSe,PostVisibilityLabel:()=>VM,RichText:()=>fxe,RichTextShortcut:()=>SQe,RichTextToolbarButton:()=>xQe,ServerSideRender:()=>uxe.default,SkipToSelectedBlock:()=>AQe,TableOfContents:()=>txe,TextEditorGlobalKeyboardShortcuts:()=>YQe,ThemeSupportCheck:()=>CM,TimeToRead:()=>VS,URLInput:()=>IQe,URLInputButton:()=>OQe,URLPopover:()=>NQe,UnsavedChangesWarning:()=>sxe,VisualEditorGlobalKeyboardShortcuts:()=>GQe,Warning:()=>MQe,WordCount:()=>BS,WritingFlow:()=>DQe,__unstableRichTextInputEvent:()=>_Qe,cleanForSlug:()=>fY,createCustomColorsHOC:()=>FQe,getColorClassName:()=>LQe,getColorObjectByAttributeValues:()=>BQe,getColorObjectByColorValue:()=>VQe,getFontSize:()=>jQe,getFontSizeClass:()=>zQe,getTemplatePartIcon:()=>Em,linkAutocompleter:()=>X5,mediaUpload:()=>zk,privateApis:()=>eke,registerEntityAction:()=>Let,registerEntityField:()=>Vet,store:()=>R,storeConfig:()=>p1,transformStyles:()=>tke.transformStyles,unregisterEntityAction:()=>Bet,unregisterEntityField:()=>jet,useEntitiesSavedStatesIsDirty:()=>IN,usePostScheduleLabel:()=>SS,usePostURLLabel:()=>PU,usePostVisibilityLabel:()=>nU,userAutocompleter:()=>Q5,withColorContext:()=>HQe,withColors:()=>UQe,withFontSizes:()=>WQe});var Jhe=a(G(),1),$he=a(ee(),1),ege=a(U(),1),tge=a(_e(),1),rge=a(xn(),1);var Z5=a(G(),1);var mG=a(G(),1);var cG=a(he(),1),uG={...cG.SETTINGS_DEFAULTS,richEditingEnabled:!0,codeEditingEnabled:!0,fontLibraryEnabled:!0,enableCustomFields:void 0,defaultRenderingMode:"post-only"};var dG=a(G(),1);function uke(e={},t){return t.type==="SET_IS_READY"?{...e,[t.kind]:{...e[t.kind],[t.name]:!0}}:e}function dke(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 fke(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 fG=(0,dG.combineReducers)({actions:dke,fields:fke,isReady:uke});function QE(e){return e&&typeof e=="object"&&"raw"in e?e.raw:e}function mke(e=null,t){return t.type==="SET_EDITED_POST"?t.postId:e}function pke(e=null,t){return t.type==="SET_CURRENT_TEMPLATE_ID"?t.id:e}function hke(e=null,t){return t.type==="SET_EDITED_POST"?t.postType:e}function gke(e={isValid:!0},t){return t.type==="SET_TEMPLATE_VALIDITY"?{...e,isValid:t.isValid}:e}function vke(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 yke(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 bke(e={isLocked:!1},t){return t.type==="UPDATE_POST_LOCK"?t.lock:e}function wke(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 Ske(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 xke(e=uG,t){return t.type==="UPDATE_EDITOR_SETTINGS"?{...e,...t.settings}:e}function _ke(e="post-only",t){return t.type==="SET_RENDERING_MODE"?t.mode:e}function Cke(e="Desktop",t){return t.type==="SET_DEVICE_TYPE"?t.deviceType:e}function Tke(e=[],t){switch(t.type){case"REMOVE_PANEL":if(!e.includes(t.panelName))return[...e,t.panelName]}return e}function Eke(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 Pke(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 kke(e={current:null}){return e}function Rke(e={current:null}){return e}function Ake(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 Ike(e="/",t){switch(t.type){case"SET_STYLES_PATH":return t.path;case"RESET_STYLES_NAVIGATION":return"/"}return e}function Oke(e=!1,t){switch(t.type){case"SET_SHOW_STYLEBOOK":return t.show;case"RESET_STYLES_NAVIGATION":return!1}return e}function Nke(e=null,t){return t.type==="SET_CURRENT_REVISION_ID"?t.revisionId:e}function Mke(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 Dke(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 Fke(e={},t){return t.type==="SELECT_NOTE"?{noteId:t.noteId,options:t.options}:e}var pG=(0,mG.combineReducers)({postId:mke,postType:hke,templateId:pke,saving:vke,deleting:yke,postLock:bke,template:gke,postSavingLock:wke,editorSettings:xke,postAutosavingLock:Ske,renderingMode:_ke,deviceType:Cke,removedPanels:Tke,blockInserterPanel:Eke,inserterSidebarToggleRef:Rke,listViewPanel:Pke,listViewToggleRef:kke,publishSidebarActive:Ake,stylesPath:Ike,showStylebook:Oke,revisionId:Nke,revisionPage:Mke,showRevisionDiff:Dke,selectedNote:Fke,dataviews:fG});var _L={};Sn(_L,{__experimentalGetDefaultTemplatePartAreas:()=>ERe,__experimentalGetDefaultTemplateType:()=>PRe,__experimentalGetDefaultTemplateTypes:()=>TRe,__experimentalGetTemplateInfo:()=>kRe,__unstableIsEditorReady:()=>S2e,canInsertBlockType:()=>SRe,canUserUseUnfilteredHTML:()=>m2e,didPostSaveRequestFail:()=>e2e,didPostSaveRequestSucceed:()=>$ke,getActivePostLock:()=>f2e,getAdjacentBlockClientId:()=>Y2e,getAutosaveAttribute:()=>NG,getBlock:()=>I2e,getBlockAttributes:()=>A2e,getBlockCount:()=>L2e,getBlockHierarchyRootClientId:()=>G2e,getBlockIndex:()=>sRe,getBlockInsertionPoint:()=>gRe,getBlockListSettings:()=>CRe,getBlockMode:()=>mRe,getBlockName:()=>k2e,getBlockOrder:()=>iRe,getBlockRootClientId:()=>W2e,getBlockSelectionEnd:()=>V2e,getBlockSelectionStart:()=>B2e,getBlocks:()=>O2e,getBlocksByClientId:()=>F2e,getClientIdsOfDescendants:()=>N2e,getClientIdsWithDescendants:()=>M2e,getCurrentPost:()=>un,getCurrentPostAttribute:()=>i_,getCurrentPostId:()=>al,getCurrentPostLastRevisionId:()=>Hke,getCurrentPostRevisionsCount:()=>wL,getCurrentPostType:()=>Vs,getCurrentTemplateId:()=>zke,getDeviceType:()=>x2e,getEditedPostAttribute:()=>Ur,getEditedPostContent:()=>c_,getEditedPostPreviewLink:()=>o2e,getEditedPostSlug:()=>a2e,getEditedPostVisibility:()=>Wke,getEditorBlocks:()=>h2e,getEditorMode:()=>T2e,getEditorSelection:()=>w2e,getEditorSelectionEnd:()=>b2e,getEditorSelectionStart:()=>y2e,getEditorSettings:()=>xL,getFirstMultiSelectedBlockClientId:()=>J2e,getGlobalBlockCount:()=>D2e,getInserterItems:()=>xRe,getLastMultiSelectedBlockClientId:()=>$2e,getMultiSelectedBlockClientIds:()=>X2e,getMultiSelectedBlocks:()=>Q2e,getMultiSelectedBlocksEndClientId:()=>nRe,getMultiSelectedBlocksStartClientId:()=>oRe,getNextBlockClientId:()=>K2e,getPermalink:()=>s2e,getPermalinkParts:()=>LG,getPostEdits:()=>l_,getPostLockUser:()=>d2e,getPostTypeLabel:()=>RRe,getPreviousBlockClientId:()=>q2e,getRenderingMode:()=>Bk,getSelectedBlock:()=>U2e,getSelectedBlockClientId:()=>H2e,getSelectedBlockCount:()=>j2e,getSelectedBlocksInitialCaretPosition:()=>Z2e,getStateBeforeOptimisticTransaction:()=>E2e,getSuggestedPostFormat:()=>n2e,getTemplate:()=>bRe,getTemplateLock:()=>wRe,hasChangedContent:()=>OG,hasEditorRedo:()=>Bke,hasEditorUndo:()=>Lke,hasInserterItems:()=>_Re,hasMultiSelection:()=>uRe,hasNonPostEntityChanges:()=>Vke,hasSelectedBlock:()=>z2e,hasSelectedInnerBlock:()=>lRe,inSomeHistory:()=>P2e,isAncestorMultiSelected:()=>rRe,isAutosavingPost:()=>t2e,isBlockInsertionPointVisible:()=>vRe,isBlockMultiSelected:()=>tRe,isBlockSelected:()=>aRe,isBlockValid:()=>R2e,isBlockWithinSelection:()=>cRe,isCaretWithinFormattedText:()=>hRe,isCleanNewPost:()=>jke,isCurrentPostPending:()=>Gke,isCurrentPostPublished:()=>SL,isCurrentPostScheduled:()=>Yke,isDeletingPost:()=>Qke,isEditedPostAutosaveable:()=>Kke,isEditedPostBeingScheduled:()=>Zke,isEditedPostDateFloating:()=>Xke,isEditedPostDirty:()=>Fk,isEditedPostEmpty:()=>DG,isEditedPostNew:()=>IG,isEditedPostPublishable:()=>qke,isEditedPostSaveable:()=>MG,isEditorPanelEnabled:()=>g2e,isEditorPanelOpened:()=>v2e,isEditorPanelRemoved:()=>VG,isFirstMultiSelectedBlock:()=>eRe,isInserterOpened:()=>C2e,isListViewOpened:()=>_2e,isMultiSelecting:()=>dRe,isPermalinkEditable:()=>FG,isPostAutosavingLocked:()=>BG,isPostLockTakeover:()=>u2e,isPostLocked:()=>l2e,isPostSavingLocked:()=>c2e,isPreviewingPost:()=>r2e,isPublishSidebarEnabled:()=>p2e,isPublishSidebarOpened:()=>ARe,isPublishingPost:()=>i2e,isSavingNonPostEntityChanges:()=>Jke,isSavingPost:()=>cb,isSelectionEnabled:()=>fRe,isTyping:()=>pRe,isValidTemplate:()=>yRe});var km=a(bt(),1),lb=a(go(),1),s_=a(vo(),1),jt=a(G(),1),cu=a(rl(),1),AG=a(U(),1),Lk=a(he(),1),ro=a(ee(),1),u_=a(Rt(),1);var wG=new Set(["meta"]),SG="core/editor",J6=/%(?:postname|pagename)%/,$6=60*1e3,xG=["title","excerpt","content"];var er="wp_template",Ko="wp_template_part",ol="wp_block",Cm="wp_navigation",Ls="attachment",JE={custom:"custom",theme:"theme",plugin:"plugin"},e3=["wp_template","wp_template_part"],_G=[...e3,"wp_block","wp_navigation"],rc=[er,Ko,ol,Cm];var $E=a(U(),1),cn=(0,$E.forwardRef)(({icon:e,size:t=24,...r},o)=>(0,$E.cloneElement)(e,{width:t,height:t,...r,ref:o}));var eP=a(we(),1),t3=a(T(),1),r3=(0,t3.jsx)(eP.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,t3.jsx)(eP.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 tP=a(we(),1),o3=a(T(),1),n3=(0,o3.jsx)(tP.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,o3.jsx)(tP.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 rP=a(we(),1),i3=a(T(),1),s3=(0,i3.jsx)(rP.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,i3.jsx)(rP.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 oP=a(we(),1),a3=a(T(),1),l3=(0,a3.jsx)(oP.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a3.jsx)(oP.Path,{d:"M20 11.2H6.8l3.7-3.7-1-1L3.9 12l5.6 5.5 1-1-3.7-3.7H20z"})});var nP=a(we(),1),c3=a(T(),1),u3=(0,c3.jsx)(nP.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,c3.jsx)(nP.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 iP=a(we(),1),d3=a(T(),1),f3=(0,d3.jsx)(iP.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d3.jsx)(iP.Path,{d:"M12 3.9 6.5 9.5l1 1 3.8-3.7V20h1.5V6.8l3.7 3.7 1-1z"})});var sP=a(we(),1),m3=a(T(),1),p3=(0,m3.jsx)(sP.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,m3.jsx)(sP.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 aP=a(we(),1),h3=a(T(),1),g3=(0,h3.jsx)(aP.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,h3.jsx)(aP.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 lP=a(we(),1),v3=a(T(),1),Id=(0,v3.jsx)(lP.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,v3.jsx)(lP.Path,{d:"M5.5 12h1.75l-2.5 3-2.5-3H4a8 8 0 113.134 6.35l.907-1.194A6.5 6.5 0 105.5 12zm9.53 1.97l-2.28-2.28V8.5a.75.75 0 00-1.5 0V12a.747.747 0 00.218.529l1.282-.84-1.28.842 2.5 2.5a.75.75 0 101.06-1.061z"})});var cP=a(we(),1),y3=a(T(),1),b3=(0,y3.jsx)(cP.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,y3.jsx)(cP.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 uP=a(we(),1),w3=a(T(),1),dP=(0,w3.jsx)(uP.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,w3.jsx)(uP.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 fP=a(we(),1),S3=a(T(),1),mP=(0,S3.jsx)(fP.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,S3.jsx)(fP.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 pP=a(we(),1),x3=a(T(),1),Qn=(0,x3.jsx)(pP.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,x3.jsx)(pP.Path,{d:"M16.5 7.5 10 13.9l-2.5-2.4-1 1 3.5 3.6 7.5-7.6z"})});var hP=a(we(),1),_3=a(T(),1),Nx=(0,_3.jsx)(hP.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,_3.jsx)(hP.Path,{d:"M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z"})});var gP=a(we(),1),C3=a(T(),1),T3=(0,C3.jsx)(gP.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,C3.jsx)(gP.Path,{d:"m13.1 16-3.4-4 3.4-4 1.1 1-2.6 3 2.6 3-1.1 1z"})});var vP=a(we(),1),E3=a(T(),1),pr=(0,E3.jsx)(vP.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,E3.jsx)(vP.Path,{d:"M14.6 7l-1.2-1L8 12l5.4 6 1.2-1-4.6-5z"})});var yP=a(we(),1),P3=a(T(),1),k3=(0,P3.jsx)(yP.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,P3.jsx)(yP.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 bP=a(we(),1),R3=a(T(),1),hr=(0,R3.jsx)(bP.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,R3.jsx)(bP.Path,{d:"M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z"})});var wP=a(we(),1),A3=a(T(),1),I3=(0,A3.jsx)(wP.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,A3.jsx)(wP.Path,{d:"M6.5 12.4L12 8l5.5 4.4-.9 1.2L12 10l-4.5 3.6-1-1.2z"})});var SP=a(we(),1),O3=a(T(),1),_n=(0,O3.jsx)(SP.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,O3.jsx)(SP.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 xP=a(we(),1),N3=a(T(),1),Mx=(0,N3.jsx)(xP.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,N3.jsx)(xP.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 _P=a(we(),1),M3=a(T(),1),D3=(0,M3.jsx)(_P.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,M3.jsx)(_P.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 CP=a(we(),1),F3=a(T(),1),L3=(0,F3.jsx)(CP.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,F3.jsx)(CP.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 TP=a(we(),1),B3=a(T(),1),V3=(0,B3.jsx)(TP.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,B3.jsx)(TP.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 EP=a(we(),1),j3=a(T(),1),z3=(0,j3.jsx)(EP.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,j3.jsx)(EP.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 PP=a(we(),1),H3=a(T(),1),U3=(0,H3.jsx)(PP.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,H3.jsx)(PP.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 kP=a(we(),1),W3=a(T(),1),Dx=(0,W3.jsx)(kP.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,W3.jsx)(kP.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 RP=a(we(),1),G3=a(T(),1),Y3=(0,G3.jsx)(RP.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,G3.jsx)(RP.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 AP=a(we(),1),q3=a(T(),1),Fx=(0,q3.jsx)(AP.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,q3.jsx)(AP.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 IP=a(we(),1),K3=a(T(),1),OP=(0,K3.jsx)(IP.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,K3.jsx)(IP.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 NP=a(we(),1),Z3=a(T(),1),X3=(0,Z3.jsx)(NP.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Z3.jsx)(NP.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 MP=a(we(),1),Q3=a(T(),1),sb=(0,Q3.jsx)(MP.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Q3.jsx)(MP.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 DP=a(we(),1),J3=a(T(),1),sg=(0,J3.jsx)(DP.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,J3.jsx)(DP.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 FP=a(we(),1),$3=a(T(),1),Od=(0,$3.jsx)(FP.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,$3.jsx)(FP.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 LP=a(we(),1),e4=a(T(),1),t4=(0,e4.jsx)(LP.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,e4.jsx)(LP.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 BP=a(we(),1),r4=a(T(),1),Nd=(0,r4.jsx)(BP.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,r4.jsx)(BP.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 VP=a(we(),1),o4=a(T(),1),Bs=(0,o4.jsx)(VP.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,o4.jsx)(VP.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 jP=a(we(),1),n4=a(T(),1),i4=(0,n4.jsx)(jP.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,n4.jsx)(jP.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 zP=a(we(),1),s4=a(T(),1),a4=(0,s4.jsx)(zP.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,s4.jsx)(zP.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 HP=a(we(),1),l4=a(T(),1),c4=(0,l4.jsx)(HP.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,l4.jsx)(HP.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 UP=a(we(),1),u4=a(T(),1),Lx=(0,u4.jsx)(UP.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,u4.jsx)(UP.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 WP=a(we(),1),d4=a(T(),1),f4=(0,d4.jsx)(WP.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d4.jsx)(WP.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 GP=a(we(),1),m4=a(T(),1),Bx=(0,m4.jsx)(GP.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,m4.jsx)(GP.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 YP=a(we(),1),p4=a(T(),1),Vx=(0,p4.jsx)(YP.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,p4.jsx)(YP.Path,{d:"M10 17.5H14V16H10V17.5ZM6 6V7.5H18V6H6ZM8 12.5H16V11H8V12.5Z"})});var qP=a(we(),1),h4=a(T(),1),jx=(0,h4.jsx)(qP.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,h4.jsx)(qP.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 KP=a(we(),1),g4=a(T(),1),v4=(0,g4.jsx)(KP.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,g4.jsx)(KP.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 zx=a(we(),1),Hx=a(T(),1),Ux=(0,Hx.jsxs)(zx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,Hx.jsx)(zx.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,Hx.jsx)(zx.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 ZP=a(we(),1),y4=a(T(),1),oc=(0,y4.jsx)(ZP.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,y4.jsx)(ZP.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 XP=a(we(),1),b4=a(T(),1),w4=(0,b4.jsx)(XP.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,b4.jsx)(XP.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 QP=a(we(),1),S4=a(T(),1),Wx=(0,S4.jsx)(QP.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,S4.jsx)(QP.Path,{d:"M3 6h11v1.5H3V6Zm3.5 5.5h11V13h-11v-1.5ZM21 17H10v1.5h11V17Z"})});var JP=a(we(),1),x4=a(T(),1),_4=(0,x4.jsx)(JP.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,x4.jsx)(JP.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 $P=a(we(),1),C4=a(T(),1),ab=(0,C4.jsx)($P.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,C4.jsx)($P.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 ek=a(we(),1),T4=a(T(),1),to=(0,T4.jsx)(ek.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,T4.jsx)(ek.Path,{d:"M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z"})});var tk=a(we(),1),E4=a(T(),1),Gx=(0,E4.jsx)(tk.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,E4.jsx)(tk.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 rk=a(we(),1),P4=a(T(),1),k4=(0,P4.jsx)(rk.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,P4.jsx)(rk.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 ok=a(we(),1),R4=a(T(),1),nl=(0,R4.jsx)(ok.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,R4.jsx)(ok.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 nk=a(we(),1),A4=a(T(),1),Yx=(0,A4.jsx)(nk.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,A4.jsx)(nk.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 qx=a(we(),1),Kx=a(T(),1),Tm=(0,Kx.jsxs)(qx.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,Kx.jsx)(qx.Path,{d:"M15.5 7.5h-7V9h7V7.5Zm-7 3.5h7v1.5h-7V11Zm7 3.5h-7V16h7v-1.5Z"}),(0,Kx.jsx)(qx.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 ik=a(we(),1),I4=a(T(),1),Zx=(0,I4.jsx)(ik.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,I4.jsx)(ik.Path,{d:"m19 7-3-3-8.5 8.5-1 4 4-1L19 7Zm-7 11.5H5V20h7v-1.5Z"})});var sk=a(we(),1),O4=a(T(),1),Xx=(0,O4.jsx)(sk.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,O4.jsx)(sk.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 ak=a(we(),1),N4=a(T(),1),Md=(0,N4.jsx)(ak.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,N4.jsx)(ak.Path,{d:"M11 12.5V17.5H12.5V12.5H17.5V11H12.5V6H11V11H6V12.5H11Z"})});var lk=a(we(),1),M4=a(T(),1),D4=(0,M4.jsx)(lk.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,M4.jsx)(lk.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 ck=a(we(),1),F4=a(T(),1),il=(0,F4.jsx)(ck.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,F4.jsx)(ck.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 uk=a(we(),1),L4=a(T(),1),ag=(0,L4.jsx)(uk.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,L4.jsx)(uk.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 dk=a(we(),1),B4=a(T(),1),lg=(0,B4.jsx)(dk.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,B4.jsx)(dk.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 fk=a(we(),1),V4=a(T(),1),j4=(0,V4.jsx)(fk.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,V4.jsx)(fk.Path,{d:"M7 11.5h10V13H7z"})});var mk=a(we(),1),z4=a(T(),1),Qx=(0,z4.jsx)(mk.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,z4.jsx)(mk.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 pk=a(we(),1),H4=a(T(),1),Jx=(0,H4.jsx)(pk.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,H4.jsx)(pk.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 hk=a(we(),1),U4=a(T(),1),cg=(0,U4.jsx)(hk.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,U4.jsx)(hk.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 gk=a(we(),1),W4=a(T(),1),G4=(0,W4.jsx)(gk.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,W4.jsx)(gk.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 vk=a(we(),1),Y4=a(T(),1),ug=(0,Y4.jsx)(vk.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Y4.jsx)(vk.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 $x=a(we(),1),e_=a(T(),1),q4=(0,e_.jsxs)($x.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,e_.jsx)($x.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,e_.jsx)($x.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 yk=a(we(),1),K4=a(T(),1),t_=(0,K4.jsx)(yk.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,K4.jsx)(yk.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 bk=a(we(),1),Z4=a(T(),1),X4=(0,Z4.jsx)(bk.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Z4.jsx)(bk.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 wk=a(we(),1),Q4=a(T(),1),r_=(0,Q4.jsx)(wk.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Q4.jsx)(wk.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 Sk=a(we(),1),J4=a(T(),1),$4=(0,J4.jsx)(Sk.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,J4.jsx)(Sk.Path,{fill:"none",d:"M5.75 12.75V18.25H11.25M12.75 5.75H18.25V11.25",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"square"})});var xk=a(we(),1),eL=a(T(),1),tL=(0,eL.jsx)(xk.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,eL.jsx)(xk.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 _k=a(we(),1),rL=a(T(),1),oL=(0,rL.jsx)(_k.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,rL.jsx)(_k.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 Ck=a(we(),1),nL=a(T(),1),iL=(0,nL.jsx)(Ck.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,nL.jsx)(Ck.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 Tk=a(we(),1),sL=a(T(),1),dg=(0,sL.jsx)(Tk.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,sL.jsx)(Tk.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 Ek=a(we(),1),aL=a(T(),1),o_=(0,aL.jsx)(Ek.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,aL.jsx)(Ek.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 Pk=a(we(),1),lL=a(T(),1),kk=(0,lL.jsx)(Pk.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,lL.jsx)(Pk.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 Rk=a(we(),1),cL=a(T(),1),Dd=(0,cL.jsx)(Rk.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,cL.jsx)(Rk.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 Ak=a(we(),1),uL=a(T(),1),dL=(0,uL.jsx)(Ak.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,uL.jsx)(Ak.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 Ik=a(we(),1),fL=a(T(),1),fg=(0,fL.jsx)(Ik.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,fL.jsx)(Ik.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 Ok=a(we(),1),mL=a(T(),1),n_=(0,mL.jsx)(Ok.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,mL.jsx)(Ok.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 Nk=a(we(),1),pL=a(T(),1),hL=(0,pL.jsx)(Nk.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,pL.jsx)(Nk.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 Mk=a(we(),1),gL=a(T(),1),vL=(0,gL.jsx)(Mk.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,gL.jsx)(Mk.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 Dk=a(we(),1),yL=a(T(),1),bL=(0,yL.jsx)(Dk.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24",children:(0,yL.jsx)(Dk.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"})});function Em(e){return e==="header"?jx:e==="footer"?Lx:e==="sidebar"?r_:e==="navigation-overlay"?Gx:dg}var PG=a(Pm(),1),{lock:kG,unlock:Y}=(0,PG.__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 RG={},sl=e=>{if(!e)return RG;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)??RG,d=typeof s=="string"?s:s?.rendered,f=typeof n=="string"?n:n?.raw,h=r?.map(g=>({...g,icon:Em(g.icon)}))?.find(g=>l===g.area)?.icon||oc;return{title:d&&d!==i?d:c||i,description:f||u,icon:h}};var a_={},Lke=(0,jt.createRegistrySelector)(e=>()=>e(ro.store).hasUndo()),Bke=(0,jt.createRegistrySelector)(e=>()=>e(ro.store).hasRedo());function IG(e){return un(e).status==="auto-draft"}function OG(e){return"content"in l_(e)}var Fk=(0,jt.createRegistrySelector)(e=>t=>{let r=Vs(t),o=al(t);return e(ro.store).hasEditsForEntityRecord("postType",r,o)}),Vke=(0,jt.createRegistrySelector)(e=>t=>{let r=e(ro.store).__experimentalGetDirtyEntityRecords(),{type:o,id:n}=un(t);return r.some(i=>i.kind!=="postType"||i.name!==o||i.key!==n)});function jke(e){return!Fk(e)&&IG(e)}var un=(0,jt.createRegistrySelector)(e=>t=>{let r=al(t),o=Vs(t),n=e(ro.store).getRawEntityRecord("postType",o,r);return n||a_});function Vs(e){return e.postType}function al(e){return e.postId}function zke(e){return e.templateId}function wL(e){return un(e)._links?.["version-history"]?.[0]?.count??0}function Hke(e){return un(e)._links?.["predecessor-version"]?.[0]?.id??null}var l_=(0,jt.createRegistrySelector)(e=>t=>{let r=Vs(t),o=al(t);return e(ro.store).getEntityRecordEdits("postType",r,o)||a_});function i_(e,t){switch(t){case"type":return Vs(e);case"id":return al(e);default:let r=un(e);if(!r.hasOwnProperty(t))break;return QE(r[t])}}var Uke=(0,jt.createSelector)((e,t)=>{let r=l_(e);return r.hasOwnProperty(t)?{...i_(e,t),...r[t]}:i_(e,t)},(e,t)=>[i_(e,t),l_(e)[t]]);function Ur(e,t){if(t==="content")return c_(e);let r=l_(e);return r.hasOwnProperty(t)?wG.has(t)?Uke(e,t):r[t]:i_(e,t)}var NG=(0,jt.createRegistrySelector)(e=>(t,r)=>{if(!xG.includes(r)&&r!=="preview_link")return;let o=Vs(t),n=al(t),i=e(ro.store).getCurrentUser()?.id,s=e(ro.store).getAutosave(o,n,i);if(s)return QE(s[r])});function Wke(e){return Ur(e,"status")==="private"?"private":Ur(e,"password")?"password":"public"}function Gke(e){return un(e).status==="pending"}function SL(e,t){let r=t||un(e);return["publish","private"].indexOf(r.status)!==-1||r.status==="future"&&!(0,lb.isInTheFuture)(new Date(Number((0,lb.getDate)(r.date))-$6))}function Yke(e){return un(e).status==="future"&&!SL(e)}function qke(e){let t=un(e);return t.type===Ls?Fk(e):Fk(e)||["publish","private","future"].indexOf(t.status)===-1}function MG(e){return cb(e)?!1:!!Ur(e,"title")||!!Ur(e,"excerpt")||!DG(e)||AG.Platform.OS==="native"}var DG=(0,jt.createRegistrySelector)(e=>t=>{let r=al(t),o=Vs(t),n=e(ro.store).getEditedEntityRecord("postType",o,r);if(typeof n.content!="function")return!n.content;let i=Ur(t,"blocks");if(i.length===0)return!0;if(i.length>1)return!1;let s=i[0].name;return s!==(0,km.getDefaultBlockName)()&&s!==(0,km.getFreeformContentHandlerName)()?!1:!c_(t)}),Kke=(0,jt.createRegistrySelector)(e=>t=>{if(!MG(t)||BG(t))return!1;let r=Vs(t);if(!e(ro.store).getPostType(r)?.supports?.autosave)return!1;let n=al(t),i=e(ro.store).hasFetchedAutosaves(r,n),s=e(ro.store).getCurrentUser()?.id,l=e(ro.store).getAutosave(r,n,s);return i?!l||OG(t)?!0:["title","excerpt","meta"].some(c=>QE(l[c])!==Ur(t,c)):!1});function Zke(e){let t=Ur(e,"date"),r=new Date(Number((0,lb.getDate)(t))-$6);return(0,lb.isInTheFuture)(r)}function Xke(e){let t=Ur(e,"date"),r=Ur(e,"modified"),o=un(e).status;return o==="draft"||o==="auto-draft"||o==="pending"?t===r||t===null:!1}function Qke(e){return!!e.deleting.pending}function cb(e){return!!e.saving.pending}var Jke=(0,jt.createRegistrySelector)(e=>t=>{let r=e(ro.store).__experimentalGetEntitiesBeingSaved(),{type:o,id:n}=un(t);return r.some(i=>i.kind!=="postType"||i.name!==o||i.key!==n)}),$ke=(0,jt.createRegistrySelector)(e=>t=>{let r=Vs(t),o=al(t);return!e(ro.store).getLastEntitySaveError("postType",r,o)}),e2e=(0,jt.createRegistrySelector)(e=>t=>{let r=Vs(t),o=al(t);return!!e(ro.store).getLastEntitySaveError("postType",r,o)});function t2e(e){return cb(e)&&!!e.saving.options?.isAutosave}function r2e(e){return cb(e)&&!!e.saving.options?.isPreview}function o2e(e){if(e.saving.pending||cb(e))return;let t=NG(e,"preview_link");(!t||un(e).status==="draft")&&(t=Ur(e,"link"),t&&(t=(0,s_.addQueryArgs)(t,{preview:!0})));let r=Ur(e,"featured_media");return t&&r?(0,s_.addQueryArgs)(t,{_thumbnail_id:r}):t}var n2e=(0,jt.createRegistrySelector)(e=>()=>{let t=e(Lk.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}}),c_=(0,jt.createRegistrySelector)(e=>t=>{let r=al(t),o=Vs(t),n=e(ro.store).getEditedEntityRecord("postType",o,r);if(n){if(typeof n.content=="function")return n.content(n);if(n.blocks)return(0,km.__unstableSerializeAndClean)(n.blocks);if(n.content)return n.content}return""});function i2e(e){return cb(e)&&!SL(e)&&Ur(e,"status")==="publish"}function FG(e){let t=Ur(e,"permalink_template");return J6.test(t)}function s2e(e){let t=LG(e);if(!t)return null;let{prefix:r,postName:o,suffix:n}=t;return FG(e)?r+o+n:r}function a2e(e){return Ur(e,"slug")||(0,s_.cleanForSlug)(Ur(e,"title"))||al(e)}function LG(e){let t=Ur(e,"permalink_template");if(!t)return null;let r=Ur(e,"slug")||Ur(e,"generated_slug"),[o,n]=t.split(J6);return{prefix:o,postName:r,suffix:n}}function l2e(e){return e.postLock.isLocked}function c2e(e){return Object.keys(e.postSavingLock).length>0}function BG(e){return Object.keys(e.postAutosavingLock).length>0}function u2e(e){return e.postLock.isTakeover}function d2e(e){return e.postLock.user}function f2e(e){return e.postLock.activePostLock}function m2e(e){return!!un(e)._links?.hasOwnProperty("wp:action-unfiltered-html")}var p2e=(0,jt.createRegistrySelector)(e=>()=>!!e(u_.store).get("core","isPublishSidebarEnabled")),h2e=(0,jt.createSelector)(e=>Ur(e,"blocks")||(0,km.parse)(c_(e)),e=>[Ur(e,"blocks"),c_(e)]);function VG(e,t){return e.removedPanels.includes(t)}var g2e=(0,jt.createRegistrySelector)(e=>(t,r)=>{let o=e(u_.store).get("core","inactivePanels");return!VG(t,r)&&!o?.includes(r)}),v2e=(0,jt.createRegistrySelector)(e=>(t,r)=>!!e(u_.store).get("core","openPanels")?.includes(r));function y2e(e){return(0,cu.default)("select('core/editor').getEditorSelectionStart",{since:"5.8",alternative:"select('core/editor').getEditorSelection"}),Ur(e,"selection")?.selectionStart}function b2e(e){return(0,cu.default)("select('core/editor').getEditorSelectionStart",{since:"5.8",alternative:"select('core/editor').getEditorSelection"}),Ur(e,"selection")?.selectionEnd}function w2e(e){return Ur(e,"selection")}function S2e(e){return!!e.postId}function xL(e){return e.editorSettings}function Bk(e){return e.renderingMode}var x2e=(0,jt.createRegistrySelector)(e=>t=>Y(e(Lk.store)).isZoomOut()?"Desktop":t.deviceType);function _2e(e){return e.listViewPanel}function C2e(e){return!!e.blockInserterPanel}var T2e=(0,jt.createRegistrySelector)(e=>()=>e(u_.store).get("core","editorMode")??"visual");function E2e(){return(0,cu.default)("select('core/editor').getStateBeforeOptimisticTransaction",{since:"5.7",hint:"No state history is kept on this store anymore"}),null}function P2e(){return(0,cu.default)("select('core/editor').inSomeHistory",{since:"5.7",hint:"No state history is kept on this store anymore"}),!1}function et(e){return(0,jt.createRegistrySelector)(t=>(r,...o)=>((0,cu.default)("`wp.data.select( 'core/editor' )."+e+"`",{since:"5.3",alternative:"`wp.data.select( 'core/block-editor' )."+e+"`",version:"6.2"}),t(Lk.store)[e](...o)))}var k2e=et("getBlockName"),R2e=et("isBlockValid"),A2e=et("getBlockAttributes"),I2e=et("getBlock"),O2e=et("getBlocks"),N2e=et("getClientIdsOfDescendants"),M2e=et("getClientIdsWithDescendants"),D2e=et("getGlobalBlockCount"),F2e=et("getBlocksByClientId"),L2e=et("getBlockCount"),B2e=et("getBlockSelectionStart"),V2e=et("getBlockSelectionEnd"),j2e=et("getSelectedBlockCount"),z2e=et("hasSelectedBlock"),H2e=et("getSelectedBlockClientId"),U2e=et("getSelectedBlock"),W2e=et("getBlockRootClientId"),G2e=et("getBlockHierarchyRootClientId"),Y2e=et("getAdjacentBlockClientId"),q2e=et("getPreviousBlockClientId"),K2e=et("getNextBlockClientId"),Z2e=et("getSelectedBlocksInitialCaretPosition"),X2e=et("getMultiSelectedBlockClientIds"),Q2e=et("getMultiSelectedBlocks"),J2e=et("getFirstMultiSelectedBlockClientId"),$2e=et("getLastMultiSelectedBlockClientId"),eRe=et("isFirstMultiSelectedBlock"),tRe=et("isBlockMultiSelected"),rRe=et("isAncestorMultiSelected"),oRe=et("getMultiSelectedBlocksStartClientId"),nRe=et("getMultiSelectedBlocksEndClientId"),iRe=et("getBlockOrder"),sRe=et("getBlockIndex"),aRe=et("isBlockSelected"),lRe=et("hasSelectedInnerBlock"),cRe=et("isBlockWithinSelection"),uRe=et("hasMultiSelection"),dRe=et("isMultiSelecting"),fRe=et("isSelectionEnabled"),mRe=et("getBlockMode"),pRe=et("isTyping"),hRe=et("isCaretWithinFormattedText"),gRe=et("getBlockInsertionPoint"),vRe=et("isBlockInsertionPointVisible"),yRe=et("isValidTemplate"),bRe=et("getTemplate"),wRe=et("getTemplateLock"),SRe=et("canInsertBlockType"),xRe=et("getInserterItems"),_Re=et("hasInserterItems"),CRe=et("getBlockListSettings"),TRe=(0,jt.createRegistrySelector)(e=>()=>((0,cu.default)("select('core/editor').__experimentalGetDefaultTemplateTypes",{since:"6.8",alternative:"select('core/core-data').getCurrentTheme()?.default_template_types"}),e(ro.store).getCurrentTheme()?.default_template_types)),ERe=(0,jt.createRegistrySelector)(e=>(0,jt.createSelector)(()=>((0,cu.default)("select('core/editor').__experimentalGetDefaultTemplatePartAreas",{since:"6.8",alternative:"select('core/core-data').getCurrentTheme()?.default_template_part_areas"}),(e(ro.store).getCurrentTheme()?.default_template_part_areas||[]).map(r=>({...r,icon:Em(r.icon)}))))),PRe=(0,jt.createRegistrySelector)(e=>(0,jt.createSelector)((t,r)=>{(0,cu.default)("select('core/editor').__experimentalGetDefaultTemplateType",{since:"6.8"});let o=e(ro.store).getCurrentTheme()?.default_template_types;return o?Object.values(o).find(n=>n.slug===r)??a_:a_})),kRe=(0,jt.createRegistrySelector)(e=>(0,jt.createSelector)((t,r)=>{if((0,cu.default)("select('core/editor').__experimentalGetTemplateInfo",{since:"6.8"}),!r)return a_;let o=e(ro.store).getCurrentTheme(),n=o?.default_template_types||[],i=o?.default_template_part_areas||[];return sl({template:r,templateAreas:i,templateTypes:n})})),RRe=(0,jt.createRegistrySelector)(e=>t=>{let r=Vs(t);return e(ro.store).getPostType(r)?.labels?.singular_name});function ARe(e){return e.publishSidebarActive}var EL={};Sn(EL,{__experimentalTearDownEditor:()=>ORe,__unstableSaveForPreview:()=>HRe,autosave:()=>zRe,clearSelectedBlock:()=>_Ae,closePublishSidebar:()=>mAe,createUndoLevel:()=>GRe,disablePublishSidebar:()=>KRe,editPost:()=>FRe,enablePublishSidebar:()=>qRe,enterFormattedText:()=>HAe,exitFormattedText:()=>UAe,hideInsertionPoint:()=>NAe,insertBlock:()=>AAe,insertBlocks:()=>IAe,insertDefaultBlock:()=>WAe,lockPostAutosaving:()=>QRe,lockPostSaving:()=>ZRe,mergeBlocks:()=>FAe,moveBlockToPosition:()=>RAe,moveBlocksDown:()=>PAe,moveBlocksUp:()=>kAe,multiSelect:()=>xAe,openPublishSidebar:()=>fAe,receiveBlocks:()=>gAe,redo:()=>URe,refreshPost:()=>VRe,removeBlock:()=>BAe,removeBlocks:()=>LAe,removeEditorPanel:()=>iAe,replaceBlock:()=>EAe,replaceBlocks:()=>TAe,resetBlocks:()=>hAe,resetEditorBlocks:()=>$Re,resetPost:()=>NRe,savePost:()=>LRe,selectBlock:()=>bAe,setDeviceType:()=>rAe,setEditedPost:()=>XG,setIsInserterOpened:()=>sAe,setIsListViewOpened:()=>aAe,setRenderingMode:()=>tAe,setTemplateValidity:()=>MAe,setupEditor:()=>IRe,setupEditorState:()=>DRe,showInsertionPoint:()=>OAe,startMultiSelect:()=>wAe,startTyping:()=>jAe,stopMultiSelect:()=>SAe,stopTyping:()=>zAe,switchEditorMode:()=>dAe,synchronizeTemplate:()=>DAe,toggleBlockMode:()=>VAe,toggleDistractionFree:()=>lAe,toggleEditorPanelEnabled:()=>oAe,toggleEditorPanelOpened:()=>nAe,togglePublishSidebar:()=>pAe,toggleSelection:()=>CAe,toggleSpotlightMode:()=>cAe,toggleTopToolbar:()=>uAe,trashPost:()=>jRe,undo:()=>WRe,unlockPostAutosaving:()=>JRe,unlockPostSaving:()=>XRe,updateBlock:()=>vAe,updateBlockAttributes:()=>yAe,updateBlockListSettings:()=>GAe,updateEditorSettings:()=>eAe,updatePost:()=>MRe,updatePostLock:()=>YRe});var TL=a(ub(),1),ZG=a(Fd(),1),Am=a(rl(),1),db=a(bt(),1),nc=a(xt(),1),Ji=a(ee(),1),Rm=a(he(),1),fb=a(xn(),1),No=a(Rt(),1),Zo=a(j(),1);function CL(e,t){return`wp-autosave-block-editor-post-${t?"auto-draft":e}`}function WG(e,t){return window.sessionStorage.getItem(CL(e,t))}function GG(e,t,r,o,n){window.sessionStorage.setItem(CL(e,t),JSON.stringify({post_title:r,content:o,excerpt:n}))}function Vk(e,t){window.sessionStorage.removeItem(CL(e,t))}var Pa=a(j(),1);function YG(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===Ls?(c=(0,Pa.__)("Media updated."),u=!1):!i&&!s?(c=(0,Pa.__)("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,Pa.__)("View Preview"):o.labels.view_item,url:r.link,openInNewTab:!0}),[c,{id:"editor-save",type:"snackbar",actions:f}]}function qG(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,Pa.__)("Publishing failed because you were offline. Please verify your connection and try again."),private:(0,Pa.__)("Publishing failed because you were offline. Please verify your connection and try again."),future:(0,Pa.__)("Scheduling failed because you were offline. Please verify your connection and try again."),default:(0,Pa.__)("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,Pa.__)("Publishing failed."),private:(0,Pa.__)("Publishing failed."),future:(0,Pa.__)("Scheduling failed."),default:(0,Pa.__)("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 KG(e){return[e.error.message&&e.error.code!=="unknown_error"?e.error.message:(0,Pa.__)("Trashing failed"),{id:"editor-trash-fail"}]}var IRe=(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,db.parse)(i);s=(0,db.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 ORe(){return(0,Am.default)("wp.data.dispatch( 'core/editor' ).__experimentalTearDownEditor",{since:"6.5"}),{type:"DO_NOTHING"}}function NRe(){return(0,Am.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 MRe(){return(0,Am.default)("wp.data.dispatch( 'core/editor' ).updatePost",{since:"5.7",alternative:"Use the core entities store instead"}),{type:"DO_NOTHING"}}function DRe(e){return(0,Am.default)("wp.data.dispatch( 'core/editor' ).setupEditorState",{since:"6.5",alternative:"wp.data.dispatch( 'core/editor' ).setEditedPost"}),XG(e.type,e.id)}function XG(e,t){return{type:"SET_EDITED_POST",postType:e,postId:t}}var FRe=(e,t)=>({select:r,registry:o})=>{let{id:n,type:i}=r.getCurrentPost();o.dispatch(Ji.store).editEntityRecord("postType",i,n,e,t)},LRe=(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(Ji.store).getEntityRecordNonTransientEdits("postType",i.type,i.id),content:n};r({type:"REQUEST_POST_UPDATE_START",options:e});let l=!1;try{s=await(0,fb.applyFiltersAsync)("editor.preSavePost",s,e)}catch(c){l=c}if(!l)try{await o.dispatch(Ji.store).saveEntityRecord("postType",i.type,s,e)}catch(c){l=c.message&&c.code!=="unknown_error"?c.message:(0,Zo.__)("An error occurred while updating.")}if(l||(l=o.select(Ji.store).getLastEntitySaveError("postType",i.type,i.id)),!l)try{await(0,fb.applyFilters)("editor.__unstableSavePost",Promise.resolve(),e)}catch(c){l=c}if(!l)try{await(0,fb.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))&&BRe({select:t,dispatch:r,registry:o}),l){let c=qG({post:i,edits:s,error:l});c.length&&o.dispatch(nc.store).createErrorNotice(...c)}else{let c=t.getCurrentPost(),u=YG({previousPost:i,post:c,postType:await o.resolveSelect(Ji.store).getPostType(c.type),options:e});u.length&&o.dispatch(nc.store).createSuccessNotice(...u),e.isAutosave||o.dispatch(Rm.store).__unstableMarkLastChangeAsPersistent()}};async function BRe({select:e,registry:t}){if(e.getEditorSettings().onNavigateToPreviousEntityRecord)return;let{id:o,slug:n}=e.getCurrentPost();if((await t.select(Ji.store).getEntityRecord("root","site")).active_templates[n]===o)return;let l=(await t.resolveSelect(Ji.store).getCurrentTheme())?.default_template_types.find(c=>c.slug===n);await t.dispatch(nc.store).createNotice("info",(0,Zo.sprintf)((0,Zo.__)('Do you want to activate this "%s" template?'),l?.title??n),{id:"template-activate-notice",actions:[{label:(0,Zo.__)("Activate"),onClick:async()=>{await t.dispatch(nc.store).createNotice("info",(0,Zo.__)("Activating template\u2026"),{id:"template-activate-notice"});try{let c=await t.select(Ji.store).getEntityRecord("root","site");await t.dispatch(Ji.store).saveEntityRecord("root","site",{active_templates:{...c.active_templates,[n]:o}},{throwOnError:!0}),await t.dispatch(nc.store).createSuccessNotice((0,Zo.__)("Template activated."),{id:"template-activate-notice"})}catch(c){throw await t.dispatch(nc.store).createErrorNotice((0,Zo.__)("Template activation failed."),{id:"template-activate-notice"}),c}}}]})}function VRe(){return(0,Am.default)("wp.data.dispatch( 'core/editor' ).refreshPost",{since:"6.0",version:"6.3",alternative:"Use the core entities store instead"}),{type:"DO_NOTHING"}}var jRe=()=>async({select:e,dispatch:t,registry:r})=>{let o=e.getCurrentPostType(),n=await r.resolveSelect(Ji.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,ZG.default)({path:`/${s}/${i}/${l.id}`,method:"DELETE"}),await t.savePost()}catch(l){r.dispatch(nc.store).createErrorNotice(...KG({error:l}))}t({type:"REQUEST_POST_DELETE_FINISH"})},zRe=({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");GG(n.id,i,s,l,c)}else await o.savePost({isAutosave:!0,...t})},HRe=({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()),URe=()=>({registry:e})=>{e.dispatch(Ji.store).redo()},WRe=()=>({registry:e})=>{e.dispatch(Ji.store).undo()};function GRe(){return(0,Am.default)("wp.data.dispatch( 'core/editor' ).createUndoLevel",{since:"6.0",version:"6.3",alternative:"Use the core entities store instead"}),{type:"DO_NOTHING"}}function YRe(e){return{type:"UPDATE_POST_LOCK",lock:e}}var qRe=()=>({registry:e})=>{e.dispatch(No.store).set("core","isPublishSidebarEnabled",!0)},KRe=()=>({registry:e})=>{e.dispatch(No.store).set("core","isPublishSidebarEnabled",!1)};function ZRe(e){return{type:"LOCK_POST_SAVING",lockName:e}}function XRe(e){return{type:"UNLOCK_POST_SAVING",lockName:e}}function QRe(e){return{type:"LOCK_POST_AUTOSAVING",lockName:e}}function JRe(e){return{type:"UNLOCK_POST_AUTOSAVING",lockName:e}}var $Re=(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(Ji.store).getEditedEntityRecord("postType",u,c).blocks===l.blocks){n.dispatch(Ji.store).__unstableCreateUndoLevel("postType",u,c);return}l.content=({blocks:f=[]})=>(0,db.__unstableSerializeAndClean)(f)}o.editPost(l)};function eAe(e){return{type:"UPDATE_EDITOR_SETTINGS",settings:e}}var tAe=e=>({dispatch:t,registry:r,select:o})=>{o.__unstableIsEditorReady()&&!o.getEditorSettings().isPreviewMode&&r.dispatch(Rm.store).clearSelectedBlock(),t({type:"SET_RENDERING_MODE",mode:e})};function rAe(e){return{type:"SET_DEVICE_TYPE",deviceType:e}}var oAe=e=>({registry:t})=>{let r=t.select(No.store).get("core","inactivePanels")??[],o=!!r?.includes(e),n;o?n=r.filter(i=>i!==e):n=[...r,e],t.dispatch(No.store).set("core","inactivePanels",n)},nAe=e=>({registry:t})=>{let r=t.select(No.store).get("core","openPanels")??[],o=!!r?.includes(e),n;o?n=r.filter(i=>i!==e):n=[...r,e],t.dispatch(No.store).set("core","openPanels",n)};function iAe(e){return{type:"REMOVE_PANEL",panelName:e}}var sAe=e=>({dispatch:t,registry:r})=>{typeof e=="object"&&e.hasOwnProperty("rootClientId")&&e.hasOwnProperty("insertionIndex")&&Y(r.dispatch(Rm.store)).setInsertionPoint({rootClientId:e.rootClientId,index:e.insertionIndex}),t({type:"SET_IS_INSERTER_OPENED",value:e})};function aAe(e){return{type:"SET_IS_LIST_VIEW_OPENED",isOpen:e}}var lAe=({createNotice:e=!0}={})=>({dispatch:t,registry:r})=>{let o=r.select(No.store).get("core","distractionFree");o&&r.dispatch(No.store).set("core","fixedToolbar",!1),o||r.batch(()=>{r.dispatch(No.store).set("core","fixedToolbar",!0),t.setIsInserterOpened(!1),t.setIsListViewOpened(!1),Y(r.dispatch(Rm.store)).resetZoomLevel()}),r.batch(()=>{r.dispatch(No.store).set("core","distractionFree",!o),e&&r.dispatch(nc.store).createInfoNotice(o?(0,Zo.__)("Distraction free mode deactivated."):(0,Zo.__)("Distraction free mode activated."),{id:"core/editor/distraction-free-mode/notice",type:"snackbar",actions:[{label:(0,Zo.__)("Undo"),onClick:()=>{r.batch(()=>{r.dispatch(No.store).set("core","fixedToolbar",o),r.dispatch(No.store).toggle("core","distractionFree")})}}]})})},cAe=()=>({registry:e})=>{e.dispatch(No.store).toggle("core","focusMode");let t=e.select(No.store).get("core","focusMode");e.dispatch(nc.store).createInfoNotice(t?(0,Zo.__)("Spotlight mode activated."):(0,Zo.__)("Spotlight mode deactivated."),{id:"core/editor/toggle-spotlight-mode/notice",type:"snackbar",actions:[{label:(0,Zo.__)("Undo"),onClick:()=>{e.dispatch(No.store).toggle("core","focusMode")}}]})},uAe=()=>({registry:e})=>{e.dispatch(No.store).toggle("core","fixedToolbar");let t=e.select(No.store).get("core","fixedToolbar");e.dispatch(nc.store).createInfoNotice(t?(0,Zo.__)("Top toolbar activated."):(0,Zo.__)("Top toolbar deactivated."),{id:"core/editor/toggle-top-toolbar/notice",type:"snackbar",actions:[{label:(0,Zo.__)("Undo"),onClick:()=>{e.dispatch(No.store).toggle("core","fixedToolbar")}}]})},dAe=e=>({dispatch:t,registry:r})=>{r.dispatch(No.store).set("core","editorMode",e),e!=="visual"&&(r.dispatch(Rm.store).clearSelectedBlock(),Y(r.dispatch(Rm.store)).resetZoomLevel()),e==="visual"?(0,TL.speak)((0,Zo.__)("Visual editor selected"),"assertive"):e==="text"&&(r.select(No.store).get("core","distractionFree")&&t.toggleDistractionFree(),(0,TL.speak)((0,Zo.__)("Code editor selected"),"assertive"))};function fAe(){return{type:"OPEN_PUBLISH_SIDEBAR"}}function mAe(){return{type:"CLOSE_PUBLISH_SIDEBAR"}}function pAe(){return{type:"TOGGLE_PUBLISH_SIDEBAR"}}var qt=e=>(...t)=>({registry:r})=>{(0,Am.default)("`wp.data.dispatch( 'core/editor' )."+e+"`",{since:"5.3",alternative:"`wp.data.dispatch( 'core/block-editor' )."+e+"`",version:"6.2"}),r.dispatch(Rm.store)[e](...t)},hAe=qt("resetBlocks"),gAe=qt("receiveBlocks"),vAe=qt("updateBlock"),yAe=qt("updateBlockAttributes"),bAe=qt("selectBlock"),wAe=qt("startMultiSelect"),SAe=qt("stopMultiSelect"),xAe=qt("multiSelect"),_Ae=qt("clearSelectedBlock"),CAe=qt("toggleSelection"),TAe=qt("replaceBlocks"),EAe=qt("replaceBlock"),PAe=qt("moveBlocksDown"),kAe=qt("moveBlocksUp"),RAe=qt("moveBlockToPosition"),AAe=qt("insertBlock"),IAe=qt("insertBlocks"),OAe=qt("showInsertionPoint"),NAe=qt("hideInsertionPoint"),MAe=qt("setTemplateValidity"),DAe=qt("synchronizeTemplate"),FAe=qt("mergeBlocks"),LAe=qt("removeBlocks"),BAe=qt("removeBlock"),VAe=qt("toggleBlockMode"),jAe=qt("startTyping"),zAe=qt("stopTyping"),HAe=qt("enterFormattedText"),UAe=qt("exitFormattedText"),WAe=qt("insertDefaultBlock"),GAe=qt("updateBlockListSettings");var nH={};Sn(nH,{createTemplate:()=>Uqe,hideBlockTypes:()=>Gqe,registerEntityAction:()=>Nqe,registerEntityField:()=>Dqe,registerPostTypeSchema:()=>Vqe,removeTemplates:()=>Kqe,resetStylesNavigation:()=>Jqe,restoreRevision:()=>rKe,revertTemplate:()=>qqe,saveDirtyEntities:()=>Yqe,selectNote:()=>oKe,setCurrentRevisionId:()=>$qe,setCurrentTemplateId:()=>Hqe,setDefaultRenderingMode:()=>Zqe,setIsReady:()=>Lqe,setRevisionPage:()=>eKe,setShowRevisionDiff:()=>tKe,setShowStylebook:()=>Qqe,setStylesPath:()=>Xqe,showBlockTypes:()=>Wqe,unregisterEntityAction:()=>Mqe,unregisterEntityField:()=>Fqe,updateDeviceTypeForViewportState:()=>zqe});var Hn=a(ee(),1),Ft=a(j(),1),Ps=a(xt(),1),oH=a(he(),1),fy=a(Rt(),1),Xhe=a(vo(),1),Qhe=a(Fd(),1),q5=a(bt(),1),rH=a(Ot(),1),K5=a(go(),1);function jk(e){return e?e.source===JE.custom&&(!!e?.plugin||e?.has_theme_file):!1}var OL={};Sn(OL,{buildRevisionsPageQuery:()=>mg,getCurrentRevision:()=>fIe,getCurrentRevisionId:()=>IL,getDefaultRenderingMode:()=>iIe,getEntityActions:()=>tIe,getEntityFields:()=>oIe,getInserter:()=>XAe,getInserterSidebarToggleRef:()=>JAe,getListViewToggleRef:()=>QAe,getPageRevisions:()=>cIe,getPostBlocksByName:()=>nIe,getPostIcon:()=>$Ae,getPreviousRevision:()=>hIe,getRevisionPage:()=>AL,getRevisionsPerPage:()=>lIe,getSelectedNote:()=>mIe,getShowStylebook:()=>aIe,getStylesPath:()=>sIe,hasPostMetaChanges:()=>eIe,isCollaborationEnabledForCurrentPost:()=>gIe,isEntityReady:()=>rIe,isNoteFocused:()=>pIe,isRevisionsMode:()=>uIe,isShowingRevisionDiff:()=>dIe});var hY=a($G(),1),f_=a(he(),1),ka=a(G(),1);var $i=a(ee(),1),gY=a(Rt(),1);var eY=[];function tY(e,t,r){return e.actions[t]?.[r]??eY}function rY(e,t,r){return e.fields[t]?.[r]??eY}function oY(e,t,r){return e.isReady[t]?.[r]}var Jn=[];for(let e=0;e<256;++e)Jn.push((e+256).toString(16).slice(1));function nY(e,t=0){return(Jn[e[t+0]]+Jn[e[t+1]]+Jn[e[t+2]]+Jn[e[t+3]]+"-"+Jn[e[t+4]]+Jn[e[t+5]]+"-"+Jn[e[t+6]]+Jn[e[t+7]]+"-"+Jn[e[t+8]]+Jn[e[t+9]]+"-"+Jn[e[t+10]]+Jn[e[t+11]]+Jn[e[t+12]]+Jn[e[t+13]]+Jn[e[t+14]]+Jn[e[t+15]]).toLowerCase()}var YAe=new Uint8Array(16);function PL(){return crypto.getRandomValues(YAe)}function qAe(e,t,r){return!t&&!e&&crypto.randomUUID?crypto.randomUUID():KAe(e,t,r)}function KAe(e,t,r){e=e||{};let o=e.random??e.rng?.()??PL();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 nY(o)}var mb=qAe;var d_=a(G(),1),aY=a(ee(),1),lY=a(Im(),1),cY=a(kL(),1);var ZAe=()=>{};function zk({additionalData:e={},allowedTypes:t,filesList:r,maxUploadFileSize:o,onError:n=ZAe,onFileChange:i,onSuccess:s,multiple:l=!0}){let{receiveEntityRecords:c}=(0,d_.dispatch)(aY.store),{getCurrentPost:u,getEditorSettings:d}=(0,d_.select)(R),{lockPostAutosaving:f,unlockPostAutosaving:m,lockPostSaving:h,unlockPostSaving:g}=(0,d_.dispatch)(R),v=d().allowedMimeTypes,y=window.__clientSideMediaProcessing&&(0,cY.isClientSideMediaSupported)(),b=`image-upload-${mb()}`;o=o||d().maxUploadFileSize;let w=u(),S=typeof w?.id=="number"?w.id:w?.wp_id,x=()=>{g(b),m(b)};y||(h(b),f(b)),(0,lY.uploadMedia)({allowedTypes:t,filesList:r,onFileChange:P=>{i?.(P);let I=P.filter(A=>A?.id);I?.length&&c("postType","attachment",I,void 0,!0),!y&&I.length===P.length&&x()},onSuccess:s,additionalData:{...S?{post:S}:{},...e},maxUploadFileSize:o,onError:({message:P})=>{y||x(),n(P)},wpAllowedMimeTypes:v,multiple:l})}var uY=a(vo(),1),dY=a(rl(),1);function fY(e){return(0,dY.default)("wp.editor.cleanForSlug",{since:"12.7",plugin:"Gutenberg",alternative:"wp.url.cleanForSlug"}),(0,uY.cleanForSlug)(e)}var mY={rootClientId:void 0,insertionIndex:void 0,filterValue:void 0},RL=["post-only","template-locked"],XAe=(0,ka.createRegistrySelector)(e=>(0,ka.createSelector)(t=>{if(typeof t.blockInserterPanel=="object")return t.blockInserterPanel;if(Bk(t)==="template-locked"){let{getBlocksByName:r,getSelectedBlockClientId:o,getBlockParents:n,getBlockOrder:i}=e(f_.store),[s]=r("core/post-content");if(s){let l=o();return l&&l!==s&&n(l).includes(s)?mY:{rootClientId:s,insertionIndex:i(s).length,filterValue:void 0}}}return mY},t=>{let{getBlocksByName:r,getSelectedBlockClientId:o,getBlockParents:n,getBlockOrder:i}=e(f_.store),[s]=r("core/post-content"),l=o();return[t.blockInserterPanel,Bk(t),s,l,l?n(l):void 0,s?i(s).length:void 0]}));function QAe(e){return e.listViewToggleRef}function JAe(e){return e.inserterSidebarToggleRef}var pY={wp_block:o_,wp_navigation:k4,page:Tm,post:hL},$Ae=(0,ka.createRegistrySelector)(e=>(t,r,o)=>{{if(r==="wp_template_part"||r==="wp_template"){let s=(e($i.store).getCurrentTheme()?.default_template_part_areas||[]).find(l=>o.area===l.area);return s?.icon?Em(s.icon):oc}if(pY[r])return pY[r];let n=e($i.store).getPostType(r);return typeof n?.icon=="string"&&n.icon.startsWith("dashicons-")?n.icon.slice(10):Tm}}),eIe=(0,ka.createRegistrySelector)(e=>(t,r,o)=>{let{type:n,id:i}=un(t),s=e($i.store).getEntityRecordNonTransientEdits("postType",r||n,o||i);if(!s?.meta)return!1;let l=e($i.store).getEntityRecord("postType",r||n,o||i)?.meta;return!(0,hY.default)({...l,footnotes:void 0},{...s.meta,footnotes:void 0})});function tIe(e,...t){return tY(e.dataviews,...t)}function rIe(e,...t){return oY(e.dataviews,...t)}function oIe(e,...t){return rY(e.dataviews,...t)}var nIe=(0,ka.createRegistrySelector)(e=>(0,ka.createSelector)((t,r)=>{r=Array.isArray(r)?r:[r];let{getBlocksByName:o,getBlockParents:n,getBlockName:i}=e(f_.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(f_.store),i=o(r),s=i.map(l=>n(l));return[i,...s]})),iIe=(0,ka.createRegistrySelector)(e=>(t,r)=>{let{getPostType:o,getCurrentTheme:n,hasFinishedResolution:i}=e($i.store),s=n(),l=o(r);if(!i("getPostType",[r])||!i("getCurrentTheme"))return;let c=s?.stylesheet,u=e(gY.store).get("core","renderingModes")?.[c]?.[r];if(RL.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(RL.includes(d))return d;let f=xL(t).defaultRenderingMode;return RL.includes(f)?f:"post-only"});function sIe(e){return e.stylesPath??"/"}function aIe(e){return e.showStylebook??!1}function AL(e){return e.revisionPage}function mg(e,t){return{per_page:vY,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 vY=100;function lIe(){return vY}var cIe=(0,ka.createRegistrySelector)(e=>(t,r)=>{if(!r)return null;let{type:o,id:n}=un(t);if(!o||!n)return null;let s=e($i.store).getEntityConfig("postType",o)?.revisionKey||"id";return e($i.store).getRevisions("postType",o,n,mg(s,r))});function uIe(e){return e.revisionId!==null}function dIe(e){return e.showRevisionDiff}function IL(e){return e.revisionId}var fIe=(0,ka.createRegistrySelector)(e=>t=>{let r=IL(t);if(!r)return;let o=AL(t);if(!o)return null;let{type:n,id:i}=un(t),l=e($i.store).getEntityConfig("postType",n)?.revisionKey||"id",c=e($i.store).getRevisions("postType",n,i,mg(l,o));return c?c.find(u=>u[l]===r)??null:null});function mIe(e){return e.selectedNote?.noteId}function pIe(e){return!!e.selectedNote?.options?.focus}var hIe=(0,ka.createRegistrySelector)(e=>t=>{let r=IL(t);if(!r)return;let o=AL(t);if(!o)return null;let{type:n,id:i}=un(t),l=e($i.store).getEntityConfig("postType",n)?.revisionKey||"id",c=mg(l,o),u=e($i.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=wL(t),m=Math.ceil(f/c.per_page)||1;return d===u.length-1&&o<m?e($i.store).getRevisions("postType",n,i,mg(l,o+1))?.[0]??null:null}),gIe=(0,ka.createRegistrySelector)(e=>t=>{if(!Y(e($i.store)).isCollaborationSupported())return!1;let r=Vs(t);return!!(e($i.store).getEntityConfig("postType",r)?.syncConfig&&window._wpCollaborationEnabled)});var Y5=a(ee(),1),Zhe=a(xn(),1);var RY=a(j(),1);var es=a(W(),1);var Gk=a(_e(),1),_Y=a(G(),1),pb=a(U(),1),CY=a(xt(),1),TY=a(vo(),1),pg=a(j(),1);var xY=a(vo(),1);var Hk=a(Ot(),1),bY=a(j(),1);function wY(e){return e.type==="wp_template"}function SY(e){return e.type==="wp_template_part"}function Ld(e){return e.type==="wp_template"||e.type==="wp_template_part"}function ot(e,t=(0,bY.__)("(no title)")){let r="";return typeof e.title=="string"?r=(0,Hk.decodeEntities)(e.title):e.title&&"rendered"in e.title?r=(0,Hk.decodeEntities)(e.title.rendered):e.title&&"raw"in e.title&&(r=(0,Hk.decodeEntities)(e.title.raw)),r||t}function Uk(e){return e?[e.source,e.source].includes("custom")&&!(e.type==="wp_template"&&e?.plugin)&&!e.has_theme_file:!1}var Wk=e=>typeof e!="object"?"":e.slug||(0,xY.cleanForSlug)(ot(e))||e.id.toString();var Cn=a(T(),1),EY=({field:e,onChange:t,data:r})=>{let{id:o}=e,n=e.getValue({item:r})||Wk(r),i=r.permalink_template||"",s=/%(?:postname|pagename)%/,[l,c]=i.split(s),u=l,d=c,f=s.test(i),m=(0,pb.useRef)(n),h=n||m.current,g=f?`${u}${h}${d}`:(0,TY.safeDecodeURIComponent)(r.link||"");(0,pb.useEffect)(()=>{n&&m.current===void 0&&(m.current=n)},[n]);let v=(0,pb.useCallback)(S=>t({[o]:S}),[o,t]),{createNotice:y}=(0,_Y.useDispatch)(CY.store),b=(0,Gk.useCopyToClipboard)(g,()=>{y("info",(0,pg.__)("Copied Permalink to clipboard."),{isDismissible:!0,type:"snackbar"})}),w="editor-post-url__slug-description-"+(0,Gk.useInstanceId)(EY);return(0,Cn.jsxs)("fieldset",{className:"fields-controls__slug",children:[f&&(0,Cn.jsxs)(es.__experimentalVStack,{children:[(0,Cn.jsxs)(es.__experimentalVStack,{spacing:"0px",children:[(0,Cn.jsx)("span",{children:(0,pg.__)("Customize the last part of the Permalink.")}),(0,Cn.jsx)(es.ExternalLink,{href:"https://wordpress.org/documentation/article/page-post-settings-sidebar/#permalink",children:(0,pg.__)("Learn more")})]}),(0,Cn.jsx)(es.__experimentalInputControl,{__next40pxDefaultSize:!0,prefix:(0,Cn.jsx)(es.__experimentalInputControlPrefixWrapper,{children:"/"}),suffix:(0,Cn.jsx)(es.__experimentalInputControlSuffixWrapper,{variant:"control",children:(0,Cn.jsx)(es.Button,{size:"small",icon:Fx,ref:b,label:(0,pg.__)("Copy")})}),label:(0,pg.__)("Link"),hideLabelFromVision:!0,value:n,autoComplete:"off",spellCheck:"false",type:"text",className:"fields-controls__slug-input",onChange:S=>{v(S)},onBlur:()=>{n===""&&v(m.current)},"aria-describedby":w}),(0,Cn.jsxs)("div",{className:"fields-controls__slug-help",children:[(0,Cn.jsx)("span",{className:"fields-controls__slug-help-visual-label",children:(0,pg.__)("Permalink:")}),(0,Cn.jsxs)(es.ExternalLink,{className:"fields-controls__slug-help-link",href:g,children:[(0,Cn.jsx)("span",{className:"fields-controls__slug-help-prefix",children:u}),(0,Cn.jsx)("span",{className:"fields-controls__slug-help-slug",children:h}),(0,Cn.jsx)("span",{className:"fields-controls__slug-help-suffix",children:d})]})]})]}),!f&&(0,Cn.jsx)(es.ExternalLink,{className:"fields-controls__slug-help",href:g,children:g})]})},PY=EY;var Yk=a(U(),1);var vIe=({item:e})=>{let t=Wk(e),r=(0,Yk.useRef)(t);return(0,Yk.useEffect)(()=>{t&&r.current===void 0&&(r.current=t)},[t]),`${t||r.current}`},kY=vIe;var yIe={id:"slug",type:"text",label:(0,RY.__)("Slug"),Edit:PY,render:kY,filterBy:!1},NL=yIe;var ML=a(j(),1);function AY(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=AY(e[t]))&&(o&&(o+=" "),o+=r)}else for(r in e)e[r]&&(o&&(o+=" "),o+=r);return o}function bIe(){for(var e,t,r=0,o="",n=arguments.length;r<n;r++)(e=arguments[r])&&(t=AY(e))&&(o&&(o+=" "),o+=t);return o}var Z=bIe;var IY=a(W(),1),OY=a(j(),1);var m_=a(T(),1);function p_({item:e,className:t,children:r}){let o=ot(e);return(0,m_.jsxs)(IY.__experimentalHStack,{className:Z("fields-field__title",t),alignment:"center",justify:"flex-start",children:[(0,m_.jsx)("span",{children:o||(0,OY.__)("(no title)")}),r]})}function qk({item:e}){return(0,m_.jsx)(p_,{item:e})}var wIe={type:"text",id:"title",label:(0,ML.__)("Title"),placeholder:(0,ML.__)("No title"),getValue:({item:e})=>ot(e),render:qk,enableHiding:!0,enableGlobalSearch:!0,filterBy:!1},Kk=wIe;var LL=a(j(),1);var DL=a(j(),1),MY=a(G(),1),DY=a(ee(),1),FY=a(W(),1);var NY=a(Pm(),1),{lock:Uit,unlock:Tn}=(0,NY.__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 FL=a(T(),1),{Badge:SIe}=Tn(FY.privateApis);function LY({item:e}){let{frontPageId:t,postsPageId:r}=(0,MY.useSelect)(o=>{let{getEntityRecord:n}=o(DY.store),i=n("root","site");return{frontPageId:i?.page_on_front,postsPageId:i?.page_for_posts}},[]);return(0,FL.jsx)(p_,{item:e,className:"fields-field__page-title",children:[t,r].includes(e.id)&&(0,FL.jsx)(SIe,{children:e.id===t?(0,DL.__)("Homepage"):(0,DL.__)("Posts Page")})})}var xIe={type:"text",id:"title",label:(0,LL.__)("Title"),placeholder:(0,LL.__)("No title"),getValue:({item:e})=>ot(e),render:LY,enableHiding:!1,enableGlobalSearch:!0,filterBy:!1},BL=xIe;var VL=a(j(),1);var _Ie={type:"text",label:(0,VL.__)("Template"),placeholder:(0,VL.__)("No title"),id:"title",getValue:({item:e})=>ot(e),render:qk,enableHiding:!1,enableGlobalSearch:!0,filterBy:!1},h_=_Ie;var jL=a(j(),1);var VY=a(j(),1);var jY=a(W(),1),zY=a(ic(),1);var Zk=a(T(),1),{PATTERN_TYPES:CIe}=Tn(zY.privateApis);function HY({item:e}){return(0,Zk.jsx)(p_,{item:e,className:"fields-field__pattern-title",children:e.type===CIe.theme&&(0,Zk.jsx)(jY.Tooltip,{placement:"top",text:(0,VY.__)("This pattern cannot be edited."),children:(0,Zk.jsx)(cn,{icon:_4,size:24})})})}var TIe={type:"text",id:"title",label:(0,jL.__)("Title"),placeholder:(0,jL.__)("No title"),getValue:({item:e})=>ot(e),render:HY,enableHiding:!1,enableGlobalSearch:!0,filterBy:!1},g_=TIe;var g8=a(j(),1);var rr=a(W(),1),Lg=a(v_(),1),m8=a(ee(),1),o1=a(G(),1),Wr=a(U(),1),as=a(j(),1);var JZ=a(U(),1);var hg=a(Se(),1);function GY({controlled:e,default:t,name:r,state:o="value"}){let{current:n}=hg.useRef(e!==void 0),[i,s]=hg.useState(t),l=n?e:i,c=hg.useCallback(u=>{n||s(u)},[]);return[l,c]}var HL=a(Se(),1);var qY=a(Se(),1),YY={};function Mo(e,t){let r=qY.useRef(YY);return r.current===YY&&(r.current=e(t)),r}var zL=HL[`useInsertionEffect${Math.random().toFixed(1)}`.slice(0,-3)],EIe=zL&&zL!==HL.useLayoutEffect?zL:e=>e();function Je(e){let t=Mo(PIe).current;return t.next=e,EIe(t.effect),t.trampoline}function PIe(){let e={next:void 0,callback:kIe,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function kIe(){}var KY=a(Se(),1),RIe=()=>{},je=typeof document<"u"?KY.useLayoutEffect:RIe;var Xk=a(Se(),1),AIe=Xk.createContext(void 0);function hb(){return Xk.useContext(AIe)?.direction??"ltr"}function IIe(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 OIe=IIe("https://base-ui.com/production-error","Base UI"),En=OIe;var gg=a(Se(),1);function y_(e,t,r,o){let n=Mo(XY).current;return NIe(n,e,t,r,o)&&QY(n,[e,t,r,o]),n.callback}function ZY(e){let t=Mo(XY).current;return MIe(t,e)&&QY(t,e),t.callback}function XY(){return{callback:null,cleanup:null,refs:[]}}function NIe(e,t,r,o,n){return e.refs[0]!==t||e.refs[1]!==r||e.refs[2]!==o||e.refs[3]!==n}function MIe(e,t){return e.refs.length!==t.length||e.refs.some((r,o)=>r!==t[o])}function QY(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 $Y=a(Se(),1);var JY=a(Se(),1),DIe=parseInt(JY.version,10);function gb(e){return DIe>=e}function UL(e){if(!$Y.isValidElement(e))return null;let t=e,r=t.props;return(gb(19)?r?.ref:t.ref)??null}function b_(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}function Bd(){}var _st=Object.freeze([]),Pn=Object.freeze({});function eq(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 tq(e,t){return typeof e=="function"?e(t):e}function rq(e,t){return typeof e=="function"?e(t):e}var WL={};function Do(e,t,r,o,n){if(!r&&!o&&!n&&!e)return Qk(t);let i=Qk(e);return t&&(i=w_(i,t)),r&&(i=w_(i,r)),o&&(i=w_(i,o)),n&&(i=w_(i,n)),i}function oq(e){if(e.length===0)return WL;if(e.length===1)return Qk(e[0]);let t=Qk(e[0]);for(let r=1;r<e.length;r+=1)t=w_(t,e[r]);return t}function Qk(e){return GL(e)?{...iq(e,WL)}:FIe(e)}function w_(e,t){return GL(t)?iq(t,e):LIe(e,t)}function FIe(e){let t={...e};for(let r in t){let o=t[r];nq(r,o)&&(t[r]=sq(o))}return t}function LIe(e,t){if(!t)return e;for(let r in t){let o=t[r];switch(r){case"style":{e[r]=b_(e.style,o);break}case"className":{e[r]=YL(e.className,o);break}default:nq(r,o)?e[r]=BIe(e[r],o):e[r]=o}}return e}function nq(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 GL(e){return typeof e=="function"}function iq(e,t){return GL(e)?e(t):e??WL}function BIe(e,t){return t?e?(...r)=>{let o=r[0];if(aq(o)){let i=o;S_(i);let s=t(...r);return i.baseUIHandlerPrevented||e?.(...r),s}let n=t(...r);return e?.(...r),n}:sq(t):e}function sq(e){return e&&((...t)=>{let r=t[0];return aq(r)&&S_(r),e(...t)})}function S_(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function YL(e,t){return t?e?t+" "+e:t:e}function aq(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}var qL=a(Se(),1);function Xo(e,t,r={}){let o=t.render,n=VIe(t,r);if(r.enabled===!1)return null;let i=r.state??Pn;return HIe(e,o,n,i)}function VIe(e,t={}){let{className:r,style:o,render:n}=e,{state:i=Pn,ref:s,props:l,stateAttributesMapping:c,enabled:u=!0}=t,d=u?tq(r,i):void 0,f=u?rq(o,i):void 0,m=u?eq(i,c):Pn,h=u&&l?jIe(l):void 0,g=u?b_(m,h)??{}:Pn;return typeof document<"u"&&(u?Array.isArray(s)?g.ref=ZY([g.ref,UL(n),...s]):g.ref=y_(g.ref,UL(n),s):y_(null,null)),u?(d!==void 0&&(g.className=YL(g.className,d)),f!==void 0&&(g.style=b_(g.style,f)),g):Pn}function jIe(e){return Array.isArray(e)?oq(e):Do(void 0,e)}var zIe=Symbol.for("react.lazy");function HIe(e,t,r,o){if(t){if(typeof t=="function")return t(r,o);let n=Do(r,t.props);n.ref=r.ref;let i=t;return i?.$$typeof===zIe&&(i=gg.Children.toArray(t)[0]),gg.cloneElement(i,n)}if(e&&typeof e=="string")return UIe(e,r);throw new Error(En(8))}function UIe(e,t){return e==="button"?(0,qL.createElement)("button",{type:"button",...t,key:t.key}):e==="img"?(0,qL.createElement)("img",{alt:"",...t,key:t.key}):gg.createElement(e,t)}var ut={};Sn(ut,{cancelOpen:()=>vOe,chipRemovePress:()=>$Ie,clearPress:()=>JIe,closePress:()=>XIe,closeWatcher:()=>uOe,decrementPress:()=>rOe,disabled:()=>bOe,drag:()=>pOe,escapeKey:()=>cOe,focusOut:()=>lOe,imperativeAction:()=>wOe,incrementPress:()=>tOe,inputBlur:()=>iOe,inputChange:()=>oOe,inputClear:()=>nOe,inputPaste:()=>sOe,inputPress:()=>aOe,itemPress:()=>ZIe,keyboard:()=>fOe,linkPress:()=>QIe,listNavigation:()=>dOe,none:()=>WIe,outsidePress:()=>KIe,pointer:()=>mOe,scrub:()=>gOe,siblingOpen:()=>yOe,swipe:()=>SOe,trackPress:()=>eOe,triggerFocus:()=>qIe,triggerHover:()=>YIe,triggerPress:()=>GIe,wheel:()=>hOe,windowResize:()=>xOe});var WIe="none",GIe="trigger-press",YIe="trigger-hover",qIe="trigger-focus",KIe="outside-press",ZIe="item-press",XIe="close-press",QIe="link-press",JIe="clear-press",$Ie="chip-remove-press",eOe="track-press",tOe="increment-press",rOe="decrement-press",oOe="input-change",nOe="input-clear",iOe="input-blur",sOe="input-paste",aOe="input-press",lOe="focus-out",cOe="escape-key",uOe="close-watcher",dOe="list-navigation",fOe="keyboard",mOe="pointer",pOe="drag",hOe="wheel",gOe="scrub",vOe="cancel-open",yOe="sibling-open",bOe="disabled",wOe="imperative-action",SOe="swipe",xOe="window-resize";function Kt(e,t,r,o){let n=!1,i=!1,s=o??Pn;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 Jk=a(Se(),1);var _Oe=a(Se(),1),lq={..._Oe};var cq=0;function COe(e,t="mui"){let[r,o]=Jk.useState(e),n=e||r;return Jk.useEffect(()=>{r==null&&(cq+=1,o(`${t}-${cq}`))},[r,t]),n}var uq=lq.useId;function Om(e,t){if(uq!==void 0){let r=uq();return e??(t?`${t}-${r}`:r)}return COe(e,t)}function $k(e){return Om(e,"base-ui")}var Ra=a(Se(),1);var pq=a(uu(),1);var fq=a(Se(),1),TOe=[];function Nm(e){fq.useEffect(e,TOe)}var e2=null,Jst=globalThis.requestAnimationFrame,KL=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)}},t2=new KL,oo=class e{static create(){return new e}static request(t){return t2.request(t)}static cancel(t){return t2.cancel(t)}currentId=e2;request(t){this.cancel(),this.currentId=t2.request(()=>{this.currentId=e2,t()})}cancel=()=>{this.currentId!==e2&&(t2.cancel(this.currentId),this.currentId=e2)};disposeEffect=()=>this.cancel};function Mm(){let e=Mo(oo.create).current;return Nm(e.disposeEffect),e}function mq(e){return e==null?e:"current"in e?e.current:e}var du=(function(e){return e.startingStyle="data-starting-style",e.endingStyle="data-ending-style",e})({}),EOe={[du.startingStyle]:""},POe={[du.endingStyle]:""},vb={transitionStatus(e){return e==="starting"?EOe:e==="ending"?POe:null}};function Dm(e,t=!1,r=!0){let o=Mm();return Je((n,i=null)=>{o.cancel();let s=mq(e);if(s==null)return;let l=s,c=()=>{pq.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=du.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)})}var ZL=a(Se(),1);function r2(e,t=!1,r=!1){let[o,n]=ZL.useState(e&&t?"idle":void 0),[i,s]=ZL.useState(e);return e&&!i&&(s(!0),n("starting")),!e&&i&&o!=="ending"&&!r&&n("ending"),!e&&!i&&o==="ending"&&n(void 0),je(()=>{if(!e&&i&&o!=="ending"&&r){let l=oo.request(()=>{n("ending")});return()=>{oo.cancel(l)}}},[e,i,o,r]),je(()=>{if(!e||t)return;let l=oo.request(()=>{n(void 0)});return()=>{oo.cancel(l)}},[t,e]),je(()=>{if(!e||!t)return;e&&i&&o!=="idle"&&n("starting");let l=oo.request(()=>{n("idle")});return()=>{oo.cancel(l)}},[t,e,i,o]),{mounted:i,setMounted:s,transitionStatus:o}}function hq(e){let{open:t,defaultOpen:r,onOpenChange:o,disabled:n}=e,i=t!==void 0,[s,l]=GY({controlled:t,default:r,name:"Collapsible",state:"open"}),{mounted:c,setMounted:u,transitionStatus:d}=r2(s,!0,!0),[f,m]=Ra.useState(s),[{height:h,width:g},v]=Ra.useState({height:void 0,width:void 0}),y=$k(),[b,w]=Ra.useState(),S=b??y,[x,_]=Ra.useState(!1),[P,I]=Ra.useState(!1),A=Ra.useRef(null),k=Ra.useRef(null),D=Ra.useRef(null),E=Ra.useRef(null),C=Dm(E,!1),M=Je(B=>{let N=!s,z=Kt(ut.triggerPress,B.nativeEvent);if(o(N,z),z.isCanceled)return;let O=E.current;k.current==="css-animation"&&O!=null&&O.style.removeProperty("animation-name"),!x&&!P&&(k.current!=null&&k.current!=="css-animation"&&!c&&N&&u(!0),k.current==="css-animation"&&(!f&&N&&m(!0),!c&&N&&u(!0))),l(N),k.current==="none"&&c&&!N&&u(!1)});return je(()=>{i&&k.current==="none"&&!s&&u(!1)},[i,s,t,u]),Ra.useMemo(()=>({abortControllerRef:A,animationTypeRef:k,disabled:n,handleTrigger:M,height:h,mounted:c,open:s,panelId:S,panelRef:E,runOnceAnimationsFinish:C,setDimensions:v,setHiddenUntilFound:_,setKeepMounted:I,setMounted:u,setOpen:l,setPanelIdState:w,setVisible:m,transitionDimensionRef:D,transitionStatus:d,visible:f,width:g}),[A,k,n,M,h,c,s,S,E,C,v,_,I,u,l,m,D,d,f,g])}var o2=a(Se(),1),XL=o2.createContext(void 0);function n2(){let e=o2.useContext(XL);if(e===void 0)throw new Error(En(15));return e}var vg=(function(e){return e.open="data-open",e.closed="data-closed",e[e.startingStyle=du.startingStyle]="startingStyle",e[e.endingStyle=du.endingStyle]="endingStyle",e})({});var gq=(function(e){return e.panelOpen="data-panel-open",e})({});var kOe={[vg.open]:""},ROe={[vg.closed]:""},vq={open(e){return e?{[gq.panelOpen]:""}:null}},yq={open(e){return e?kOe:ROe}};var Sb=a(Se(),1);function i2(){return typeof window<"u"}function bg(e){return s2(e)?(e.nodeName||"").toLowerCase():"#document"}function no(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ac(e){var t;return(t=(s2(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function s2(e){return i2()?e instanceof Node||e instanceof no(e).Node:!1}function st(e){return i2()?e instanceof Element||e instanceof no(e).Element:!1}function Qo(e){return i2()?e instanceof HTMLElement||e instanceof no(e).HTMLElement:!1}function yb(e){return!i2()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof no(e).ShadowRoot}function bb(e){let{overflow:t,overflowX:r,overflowY:o,display:n}=yi(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+r)&&n!=="inline"&&n!=="contents"}function bq(e){return/^(table|td|th)$/.test(bg(e))}function x_(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}var AOe=/transform|translate|scale|rotate|perspective|filter/,IOe=/paint|layout|strict|content/,yg=e=>!!e&&e!=="none",QL;function a2(e){let t=st(e)?yi(e):e;return yg(t.transform)||yg(t.translate)||yg(t.scale)||yg(t.rotate)||yg(t.perspective)||!wb()&&(yg(t.backdropFilter)||yg(t.filter))||AOe.test(t.willChange||"")||IOe.test(t.contain||"")}function wq(e){let t=sc(e);for(;Qo(t)&&!lc(t);){if(a2(t))return t;if(x_(t))return null;t=sc(t)}return null}function wb(){return QL==null&&(QL=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),QL}function lc(e){return/^(html|body|#document)$/.test(bg(e))}function yi(e){return no(e).getComputedStyle(e)}function __(e){return st(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function sc(e){if(bg(e)==="html")return e;let t=e.assignedSlot||e.parentNode||yb(e)&&e.host||ac(e);return yb(t)?t.host:t}function Sq(e){let t=sc(e);return lc(t)?e.ownerDocument?e.ownerDocument.body:e.body:Qo(t)&&bb(t)?t:Sq(t)}function Fm(e,t,r){var o;t===void 0&&(t=[]),r===void 0&&(r=!0);let n=Sq(e),i=n===((o=e.ownerDocument)==null?void 0:o.body),s=no(n);if(i){let l=l2(s);return t.concat(s,s.visualViewport||[],bb(n)?n:[],l&&r?Fm(l):[])}else return t.concat(n,Fm(n,[],r))}function l2(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}var c2=a(Se(),1),OOe=c2.createContext(void 0);function xq(e=!1){let t=c2.useContext(OOe);if(t===void 0&&!e)throw new Error(En(16));return t}var _q=a(Se(),1);function Cq(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:_q.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 $L(e={}){let{disabled:t=!1,focusableWhenDisabled:r,tabIndex:o=0,native:n=!0,composite:i}=e,s=Sb.useRef(null),l=xq(!0),c=i??l!==void 0,{props:u}=Cq({focusableWhenDisabled:r,disabled:t,composite:c,tabIndex:o,isNativeButton:n}),d=Sb.useCallback(()=>{let h=s.current;JL(h)&&c&&t&&u.disabled===void 0&&h.disabled&&(h.disabled=!1)},[t,u.disabled,c]);je(d,[d]);let f=Sb.useCallback((h={})=>{let{onClick:g,onMouseDown:v,onKeyUp:y,onKeyDown:b,onPointerDown:w,...S}=h;return Do({type:n?"button":void 0,onClick(_){if(t){_.preventDefault();return}g?.(_)},onMouseDown(_){t||v?.(_)},onKeyDown(_){if(t||(S_(_),b?.(_),_.baseUIHandlerPrevented))return;let P=_.target===_.currentTarget,I=_.currentTarget,A=JL(I),k=!n&&NOe(I),D=P&&(n?A:!k),E=_.key==="Enter",C=_.key===" ",M=I.getAttribute("role"),B=M?.startsWith("menuitem")||M==="option"||M==="gridcell";if(P&&c&&C){if(_.defaultPrevented&&B)return;_.preventDefault(),k||n&&A?(I.click(),_.preventBaseUIHandler()):D&&(g?.(_),_.preventBaseUIHandler());return}D&&(!n&&(C||E)&&_.preventDefault(),!n&&E&&g?.(_))},onKeyUp(_){if(!t){if(S_(_),y?.(_),_.target===_.currentTarget&&n&&c&&JL(_.currentTarget)&&_.key===" "){_.preventDefault();return}_.baseUIHandlerPrevented||_.target===_.currentTarget&&!n&&!c&&_.key===" "&&g?.(_)}},onPointerDown(_){if(t){_.preventDefault();return}w?.(_)}},n?void 0:{role:"button"},u,S)},[t,u,c,n]),m=Je(h=>{s.current=h,d()});return{getButtonProps:f,buttonRef:m}}function JL(e){return Qo(e)&&e.tagName==="BUTTON"}function NOe(e){return!!(e?.tagName==="A"&&e?.href)}var Lm=typeof navigator<"u",eB=MOe(),Tq=FOe(),u2=DOe(),jat=typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter:none"),zat=eB.platform==="MacIntel"&&eB.maxTouchPoints>1?!0:/iP(hone|ad|od)|iOS/.test(eB.platform),Hat=Lm&&/firefox/i.test(u2),Eq=Lm&&/apple/i.test(navigator.vendor),Uat=Lm&&/Edg/i.test(u2),Wat=Lm&&/android/i.test(Tq)||/android/i.test(u2),Pq=Lm&&Tq.toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints,kq=u2.includes("jsdom/");function MOe(){if(!Lm)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 DOe(){if(!Lm)return"";let e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(({brand:t,version:r})=>`${t}/${r}`).join(" "):navigator.userAgent}function FOe(){if(!Lm)return"";let e=navigator.userAgentData;return e?.platform?e.platform:navigator.platform??""}var tB="data-base-ui-focusable",rB="active",oB="selected",nB="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function d2(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}function Er(e,t){if(!e||!t)return!1;let r=t.getRootNode?.();if(e.contains(t))return!0;if(r&&yb(r)){let o=t;for(;o;){if(e===o)return!0;o=o.parentNode||o.host}}return!1}function ts(e){return"composedPath"in e?e.composedPath()[0]:e.target}function wg(e,t){if(!st(e))return!1;let r=e;if(t.hasElement(r))return!r.hasAttribute("data-trigger-disabled");for(let[,o]of t.entries())if(Er(o,r))return!o.hasAttribute("data-trigger-disabled");return!1}function ll(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 Rq(e){return e.matches("html,body")}function Aq(e){return Qo(e)&&e.matches(nB)}function iB(e){return e?.closest(`button,a[href],[role="button"],select,[tabindex]:not([tabindex="-1"]),${nB}`)!=null}function Iq(e){if(!e||kq)return!0;try{return e.matches(":focus-visible")}catch{return!0}}function cc(e,t,r=!0){return e.filter(n=>n.parentId===t).flatMap(n=>[...!r||n.context?.open?[n]:[],...cc(e,n.id,r)])}function Oq(e){return"nativeEvent"in e}function Sg(e,t){let r=["mouse","pen"];return t||r.push("",void 0),r.includes(e)}function Nq(e){let t=e.type;return t==="click"||t==="mousedown"||t==="keydown"||t==="keyup"}var Fq=["top","right","bottom","left"];var Bm=Math.min,rs=Math.max,Vm=Math.round,T_=Math.floor,uc=e=>({x:e,y:e}),LOe={left:"right",right:"left",bottom:"top",top:"bottom"};function E_(e,t,r){return rs(e,Bm(t,r))}function dc(e,t){return typeof e=="function"?e(t):e}function $n(e){return e.split("-")[0]}function fc(e){return e.split("-")[1]}function m2(e){return e==="x"?"y":"x"}function P_(e){return e==="y"?"height":"width"}function js(e){let t=e[0];return t==="t"||t==="b"?"y":"x"}function k_(e){return m2(js(e))}function Lq(e,t,r){r===void 0&&(r=!1);let o=fc(e),n=k_(e),i=P_(n),s=n==="x"?o===(r?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=C_(s)),[s,C_(s)]}function Bq(e){let t=C_(e);return[f2(e),t,f2(t)]}function f2(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}var Mq=["left","right"],Dq=["right","left"],BOe=["top","bottom"],VOe=["bottom","top"];function jOe(e,t,r){switch(e){case"top":case"bottom":return r?t?Dq:Mq:t?Mq:Dq;case"left":case"right":return t?BOe:VOe;default:return[]}}function Vq(e,t,r,o){let n=fc(e),i=jOe($n(e),r==="start",o);return n&&(i=i.map(s=>s+"-"+n),t&&(i=i.concat(i.map(f2)))),i}function C_(e){let t=$n(e);return LOe[t]+e.slice(t.length)}function zOe(e){return{top:0,right:0,bottom:0,left:0,...e}}function p2(e){return typeof e!="number"?zOe(e):{top:e,right:e,bottom:e,left:e}}function xg(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 kn(e){return e?.ownerDocument||document}var fu=a(Se(),1);function zt(e,t,r,o){return e.addEventListener(t,r,o),()=>{e.removeEventListener(t,r,o)}}var jq=(function(e){return e.disabled="data-disabled",e.orientation="data-orientation",e})({});function zq(e){let{abortControllerRef:t,animationTypeRef:r,externalRef:o,height:n,hiddenUntilFound:i,keepMounted:s,id:l,mounted:c,onOpenChange:u,open:d,panelRef:f,runOnceAnimationsFinish:m,setDimensions:h,setMounted:g,setOpen:v,setVisible:y,transitionDimensionRef:b,visible:w,width:S}=e,x=fu.useRef(!1),_=fu.useRef(null),P=fu.useRef(d),I=fu.useRef(d),A=Mm(),k=fu.useMemo(()=>r.current==="css-animation"?!w:!d&&!c,[d,c,w,r]),D=Je(C=>{if(!C)return;if(r.current==null||b.current==null){let N=getComputedStyle(C),z=N.animationName!=="none"&&N.animationName!=="",O=N.transitionDuration!=="0s"&&N.transitionDuration!=="";z&&O||(N.animationName==="none"&&N.transitionDuration!=="0s"?r.current="css-transition":N.animationName!=="none"&&N.transitionDuration==="0s"?r.current="css-animation":r.current="none"),C.getAttribute(jq.orientation)==="horizontal"||N.transitionProperty.indexOf("width")>-1?b.current="width":b.current="height"}if(r.current!=="css-transition")return;(n===void 0||S===void 0)&&(h({height:C.scrollHeight,width:C.scrollWidth}),I.current&&C.style.setProperty("transition-duration","0s"));let M=-1,B=-1;return M=oo.request(()=>{I.current=!1,B=oo.request(()=>{setTimeout(()=>{C.style.removeProperty("transition-duration")})})}),()=>{oo.cancel(M),oo.cancel(B)}}),E=y_(o,f,D);return je(()=>{if(r.current!=="css-transition")return;let C=f.current;if(!C)return;let M=-1;if(t.current!=null&&(t.current.abort(),t.current=null),d){let B={"justify-content":C.style.justifyContent,"align-items":C.style.alignItems,"align-content":C.style.alignContent,"justify-items":C.style.justifyItems};Object.keys(B).forEach(N=>{C.style.setProperty(N,"initial","important")}),!I.current&&!s&&C.setAttribute(vg.startingStyle,""),h({height:C.scrollHeight,width:C.scrollWidth}),M=oo.request(()=>{Object.entries(B).forEach(([N,z])=>{z===""?C.style.removeProperty(N):C.style.setProperty(N,z)})})}else{if(C.scrollHeight===0&&C.scrollWidth===0)return;h({height:C.scrollHeight,width:C.scrollWidth});let B=new AbortController;t.current=B;let N=B.signal,z=null,O=vg.endingStyle;return z=new MutationObserver(F=>{F.some(H=>H.type==="attributes"&&H.attributeName===O)&&(z?.disconnect(),z=null,m(()=>{h({height:0,width:0}),C.style.removeProperty("content-visibility"),g(!1),t.current===B&&(t.current=null)},N))}),z.observe(C,{attributes:!0,attributeFilter:[O]}),()=>{z?.disconnect(),A.cancel(),t.current===B&&(B.abort(),t.current=null)}}return()=>{oo.cancel(M)}},[t,r,A,i,s,c,d,f,m,h,g]),je(()=>{if(r.current!=="css-animation")return;let C=f.current;C&&(_.current=C.style.animationName||_.current,C.style.setProperty("animation-name","none"),h({height:C.scrollHeight,width:C.scrollWidth}),!P.current&&!x.current&&C.style.removeProperty("animation-name"),d?(t.current!=null&&(t.current.abort(),t.current=null),g(!0),y(!0)):(t.current=new AbortController,m(()=>{g(!1),y(!1),t.current=null},t.current.signal)))},[t,r,d,f,m,h,g,y,w]),Nm(()=>{let C=oo.request(()=>{P.current=!1});return()=>oo.cancel(C)}),je(()=>{if(!i)return;let C=f.current;if(!C)return;let M=-1,B=-1;return d&&x.current&&(C.style.transitionDuration="0s",h({height:C.scrollHeight,width:C.scrollWidth}),M=oo.request(()=>{x.current=!1,B=oo.request(()=>{setTimeout(()=>{C.style.removeProperty("transition-duration")})})})),()=>{oo.cancel(M),oo.cancel(B)}},[i,d,f,h]),je(()=>{let C=f.current;C&&i&&k&&(C.setAttribute("hidden","until-found"),r.current==="css-transition"&&C.setAttribute(vg.startingStyle,""))},[i,k,r,f]),fu.useEffect(function(){let M=f.current;if(!M)return;function B(N){x.current=!0,v(!0),u(!0,Kt(ut.none,N))}return zt(M,"beforematch",B)},[u,f,v]),fu.useMemo(()=>({props:{hidden:k,id:l,ref:E}}),[k,l,E])}var Hq=a(Se(),1);function xb(e){let{enabled:t=!0,open:r,ref:o,onComplete:n}=e,i=Je(n),s=Dm(o,r,!1);Hq.useEffect(()=>{if(!t)return;let l=new AbortController;return s(i,l.signal),()=>{l.abort()}},[t,r,i,s])}var Uq=a(Se(),1);function Wq(e){let t=Uq.useRef(!0);t.current&&(t.current=!1,e())}var R_=0,Aa=class e{static create(){return new e}currentId=R_;start(t,r){this.clear(),this.currentId=setTimeout(()=>{this.currentId=R_,r()},t)}isStarted(){return this.currentId!==R_}clear=()=>{this.currentId!==R_&&(clearTimeout(this.currentId),this.currentId=R_)};disposeEffect=()=>this.clear};function Vd(){let e=Mo(Aa.create).current;return Nm(e.disposeEffect),e}var zs=a(Se(),1);function HOe(e,t){return t!=null&&!Sg(t)?0:typeof e=="function"?e():e}function _g(e,t,r){let o=HOe(e,r);return typeof o=="number"?o:o?.[t]}function sB(e){return typeof e=="function"?e():e}function h2(e,t){return t||e==="click"||e==="mousedown"}var Gq=a(T(),1),Yq=zs.createContext({hasProvider:!1,timeoutMs:0,delayRef:{current:0},initialDelayRef:{current:0},timeout:new Aa,currentIdRef:{current:null},currentContextRef:{current:null}});function aB(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=Vd();return(0,Gq.jsx)(Yq.Provider,{value:zs.useMemo(()=>({hasProvider:!0,delayRef:n,initialDelayRef:i,currentIdRef:s,timeoutMs:o,currentContextRef:l,timeout:c}),[o,c]),children:t})}function lB(e,t={open:!1}){let r="rootStore"in e?e.rootStore:e,o=r.useState("floatingId"),{open:n}=t,i=zs.useContext(Yq),{currentIdRef:s,delayRef:l,timeoutMs:c,initialDelayRef:u,currentContextRef:d,hasProvider:f,timeout:m}=i,[h,g]=zs.useState(!1);return je(()=>{function v(){g(!1),d.current?.setIsInstantPhase(!1),s.current=null,d.current=null,l.current=u.current}if(s.current&&!n&&s.current===o){if(g(!1),c){let y=o;return m.start(c,()=>{r.select("open")||s.current&&s.current!==y||v()}),()=>{m.clear()}}v()}},[n,o,s,l,c,u,d,m,r]),je(()=>{if(!n)return;let v=d.current,y=s.current;m.clear(),d.current={onOpenChange:r.setOpen,setIsInstantPhase:g},s.current=o,l.current={open:0,close:_g(u.current,"close")},y!==null&&y!==o?(g(!0),v?.setIsInstantPhase(!0),v?.onOpenChange(!1,Kt(ut.none))):(g(!1),v?.setIsInstantPhase(!1))},[n,o,r,s,l,c,u,d,m]),je(()=>()=>{d.current=null},[d]),zs.useMemo(()=>({hasProvider:f,delayRef:l,isInstantPhase:h}),[f,l,h])}function mc(...e){return()=>{for(let t=0;t<e.length;t+=1){let r=e[t];r&&r()}}}function pc(e){let t=Mo(UOe,e).current;return t.next=e,je(t.effect),t}function UOe(e){let t={current:e,next:e,effect:()=>{t.current=t.next}};return t}function _b(e){return`data-base-ui-${e}`}var Ia=a(Se(),1),Zq=a(uu(),1);var qq={style:{transition:"none"}};var WOe="data-base-ui-swipe-ignore",GOe="data-swipe-ignore",Blt=`[${WOe}]`,Vlt=`[${GOe}]`;var Kq={fallbackAxisSide:"end"};var Xq=a(T(),1),YOe=Ia.createContext(null),qOe=()=>Ia.useContext(YOe),KOe=_b("portal");function cB(e={}){let{ref:t,container:r,componentProps:o=Pn,elementProps:n}=e,i=Om(),l=qOe()?.portalNode,[c,u]=Ia.useState(null),[d,f]=Ia.useState(null),m=Je(y=>{y!==null&&f(y)}),h=Ia.useRef(null);je(()=>{if(r===null){h.current&&(h.current=null,f(null),u(null));return}if(i==null)return;let y=(r&&(s2(r)?r:r.current))??l??document.body;if(y==null){h.current&&(h.current=null,f(null),u(null));return}h.current!==y&&(h.current=y,f(null),u(y))},[r,l,i]);let g=Xo("div",o,{ref:[t,m],props:[{id:i,[KOe]:""},n]});return{portalNode:d,portalSubtree:c&&g?Zq.createPortal(g,c):null}}var Cg=a(Se(),1);function Qq(){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 ZOe=a(T(),1),XOe=Cg.createContext(null),QOe=Cg.createContext(null),Cb=()=>Cg.useContext(XOe)?.id||null,jm=e=>{let t=Cg.useContext(QOe);return e??t};var os=a(Se(),1);function JOe(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 Jq(e){return e!=null&&e.clientX!=null}function uB(e,t={}){let r="rootStore"in e?e.rootStore:e,o=r.useState("open"),n=r.useState("floatingElement"),i=r.useState("domReferenceElement"),s=r.context.dataRef,{enabled:l=!0,axis:c="both"}=t,u=os.useRef(!1),d=os.useRef(null),[f,m]=os.useState(),[h,g]=os.useState([]),v=Je((x,_,P)=>{u.current||s.current.openEvent&&!Jq(s.current.openEvent)||r.set("positionReference",JOe(P??i,{x,y:_,axis:c,dataRef:s,pointerType:f}))}),y=Je(x=>{o?d.current||g([]):v(x.clientX,x.clientY,x.currentTarget)}),b=Sg(f)?n:o,w=os.useCallback(()=>{if(!b||!l)return;let x=no(n);function _(P){let I=ts(P);Er(n,I)?(d.current?.(),d.current=null):v(P.clientX,P.clientY)}if(!s.current.openEvent||Jq(s.current.openEvent)){let P=()=>{d.current?.(),d.current=null};return d.current=zt(x,"mousemove",_),P}r.set("positionReference",i)},[b,l,n,s,i,r,v]);os.useEffect(()=>w(),[w,h]),os.useEffect(()=>{l&&!n&&(u.current=!1)},[l,n]),os.useEffect(()=>{!l&&o&&(u.current=!0)},[l,o]);let S=os.useMemo(()=>{function x(_){m(_.pointerType)}return{onPointerDown:x,onPointerEnter:x,onMouseMove:y,onMouseEnter:y}},[y]);return os.useMemo(()=>l?{reference:S,trigger:S}:{},[l,S])}var Hs=a(Se(),1);var $Oe={intentional:"onClick",sloppy:"onPointerDown"};function e5e(){return!1}function t5e(e){return{escapeKey:typeof e=="boolean"?e:e?.escapeKey??!1,outsidePress:typeof e=="boolean"?e:e?.outsidePress??!0}}function dB(e,t={}){let r="rootStore"in e?e.rootStore:e,o=r.useState("open"),n=r.useState("floatingElement"),{dataRef:i}=r.context,{enabled:s=!0,escapeKey:l=!0,outsidePress:c=!0,outsidePressEvent:u="sloppy",referencePress:d=e5e,referencePressEvent:f="sloppy",bubbles:m,externalTree:h}=t,g=jm(h),v=Je(typeof c=="function"?c:()=>!1),y=typeof c=="function"?v:c,b=y!==!1,w=Je(()=>u),S=Hs.useRef(!1),x=Hs.useRef(!1),_=Hs.useRef(!1),{escapeKey:P,outsidePress:I}=t5e(m),A=Hs.useRef(null),k=Vd(),D=Vd(),E=Je(()=>{D.clear(),i.current.insideReactTree=!1}),C=Hs.useRef(!1),M=Hs.useRef(""),B=Je(d),N=Je(q=>{if(!o||!s||!l||q.key!=="Escape"||C.current)return;let Q=i.current.floatingContext?.nodeId,J=g?cc(g.nodesRef.current,Q):[];if(!P&&J.length>0){let $=!0;if(J.forEach(X=>{X.context?.open&&!X.context.dataRef.current.__escapeKeyBubbles&&($=!1)}),!$)return}let te=Oq(q)?q.nativeEvent:q,se=Kt(ut.escapeKey,te);r.setOpen(!1,se),!P&&!se.isPropagationAllowed&&q.stopPropagation()}),z=Je(()=>{i.current.insideReactTree=!0,D.start(0,E)});Hs.useEffect(()=>{if(!o||!s)return;i.current.__escapeKeyBubbles=P,i.current.__outsidePressBubbles=I;let q=new Aa,Q=new Aa;function J(){q.clear(),C.current=!0}function te(){q.start(wb()?5:0,()=>{C.current=!1})}function se(){_.current=!0,Q.start(0,()=>{_.current=!1})}function $(){S.current=!1,x.current=!1}function X(){let re=M.current,ne=re==="pen"||!re?"mouse":re,Te=w(),Qe=typeof Te=="function"?Te():Te;return typeof Qe=="string"?Qe:Qe[ne]}function oe(re){let ne=X();return ne==="intentional"&&re.type!=="click"||ne==="sloppy"&&re.type==="click"}function pe(re){let ne=i.current.floatingContext?.nodeId,Te=g&&cc(g.nodesRef.current,ne).some(Qe=>ll(re,Qe.context?.elements.floating));return ll(re,r.select("floatingElement"))||ll(re,r.select("domReferenceElement"))||Te}function be(re){if(oe(re)){E();return}if(i.current.insideReactTree){E();return}let ne=ts(re),Te=`[${_b("inert")}]`,Qe=st(ne)?ne.getRootNode():null,Pt=Array.from((yb(Qe)?Qe:kn(r.select("floatingElement"))).querySelectorAll(Te)),ft=r.context.triggerElements;if(ne&&(ft.hasElement(ne)||ft.hasMatchingElement(kt=>Er(kt,ne))))return;let It=st(ne)?ne:null;for(;It&&!lc(It);){let kt=sc(It);if(lc(kt)||!st(kt))break;It=kt}if(Pt.length&&st(ne)&&!Rq(ne)&&!Er(ne,r.select("floatingElement"))&&Pt.every(kt=>!Er(It,kt)))return;if(Qo(ne)&&!("touches"in re)){let kt=lc(ne),Ze=yi(ne),vi=/auto|scroll/,Ns=kt||vi.test(Ze.overflowX),mr=kt||vi.test(Ze.overflowY),tl=Ns&&ne.clientWidth>0&&ne.scrollWidth>ne.clientWidth,mt=mr&&ne.clientHeight>0&&ne.scrollHeight>ne.clientHeight,$t=Ze.direction==="rtl",dr=mt&&($t?re.offsetX<=ne.offsetWidth-ne.clientWidth:re.offsetX>ne.clientWidth),K=tl&&re.offsetY>ne.clientHeight;if(dr||K)return}if(pe(re))return;if(X()==="intentional"&&_.current){Q.clear(),_.current=!1;return}if(typeof y=="function"&&!y(re))return;let Lt=i.current.floatingContext?.nodeId,Cr=g?cc(g.nodesRef.current,Lt):[];if(Cr.length>0){let kt=!0;if(Cr.forEach(Ze=>{Ze.context?.open&&!Ze.context.dataRef.current.__outsidePressBubbles&&(kt=!1)}),!kt)return}r.setOpen(!1,Kt(ut.outsidePress,re)),E()}function Ce(re){X()!=="sloppy"||re.pointerType==="touch"||!r.select("open")||!s||ll(re,r.select("floatingElement"))||ll(re,r.select("domReferenceElement"))||be(re)}function Ge(re){if(X()!=="sloppy"||!r.select("open")||!s||ll(re,r.select("floatingElement"))||ll(re,r.select("domReferenceElement")))return;let ne=re.touches[0];ne&&(A.current={startTime:Date.now(),startX:ne.clientX,startY:ne.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},k.start(1e3,()=>{A.current&&(A.current.dismissOnTouchEnd=!1,A.current.dismissOnMouseDown=!1)}))}function He(re,ne){let Te=ts(re);if(!Te)return;let Qe=zt(Te,re.type,()=>{ne(re),Qe()})}function ge(re){M.current="touch",He(re,Ge)}function ie(re){k.clear(),re.type==="pointerdown"&&(M.current=re.pointerType),!(re.type==="mousedown"&&A.current&&!A.current.dismissOnMouseDown)&&He(re,ne=>{ne.type==="pointerdown"?Ce(ne):be(ne)})}function ce(re){if(!S.current)return;let ne=x.current;if($(),X()==="intentional"){if(re.type==="pointercancel"){ne&&se();return}if(!pe(re)){if(ne){se();return}typeof y=="function"&&!y(re)||(Q.clear(),_.current=!0,E())}}}function ae(re){if(X()!=="sloppy"||!A.current||ll(re,r.select("floatingElement"))||ll(re,r.select("domReferenceElement")))return;let ne=re.touches[0];if(!ne)return;let Te=Math.abs(ne.clientX-A.current.startX),Qe=Math.abs(ne.clientY-A.current.startY),Pt=Math.sqrt(Te*Te+Qe*Qe);Pt>5&&(A.current.dismissOnTouchEnd=!0),Pt>10&&(be(re),k.clear(),A.current=null)}function ye(re){He(re,ae)}function Ie(re){X()!=="sloppy"||!A.current||ll(re,r.select("floatingElement"))||ll(re,r.select("domReferenceElement"))||(A.current.dismissOnTouchEnd&&be(re),k.clear(),A.current=null)}function Oe(re){He(re,Ie)}let ke=kn(n),ue=mc(l&&mc(zt(ke,"keydown",N),zt(ke,"compositionstart",J),zt(ke,"compositionend",te)),b&&mc(zt(ke,"click",ie,!0),zt(ke,"pointerdown",ie,!0),zt(ke,"pointerup",ce,!0),zt(ke,"pointercancel",ce,!0),zt(ke,"mousedown",ie,!0),zt(ke,"mouseup",ce,!0),zt(ke,"touchstart",ge,!0),zt(ke,"touchmove",ye,!0),zt(ke,"touchend",Oe,!0)));return()=>{ue(),q.clear(),Q.clear(),$(),_.current=!1}},[i,n,l,b,y,o,s,P,I,N,E,w,g,r,k]),Hs.useEffect(E,[y,E]);let O=Hs.useMemo(()=>({onKeyDown:N,[$Oe[f]]:q=>{B()&&r.setOpen(!1,Kt(ut.triggerPress,q.nativeEvent))},...f!=="intentional"&&{onClick(q){B()&&r.setOpen(!1,Kt(ut.triggerPress,q.nativeEvent))}}}),[N,r,f,B]),F=Je(q=>{if(!o||!s||q.button!==0)return;let Q=ts(q.nativeEvent);Er(r.select("floatingElement"),Q)&&(S.current||(S.current=!0,x.current=!1))}),L=Je(q=>{!o||!s||(q.defaultPrevented||q.nativeEvent.defaultPrevented)&&S.current&&(x.current=!0)}),H=Hs.useMemo(()=>({onKeyDown:N,onPointerDown:L,onMouseDown:L,onClickCapture:z,onMouseDownCapture(q){z(),F(q)},onPointerDownCapture(q){z(),F(q)},onMouseUpCapture:z,onTouchEndCapture:z,onTouchMoveCapture:z}),[N,z,F,L]);return Hs.useMemo(()=>s?{reference:O,floating:H,trigger:O}:{},[s,O,H])}var ns=a(Se(),1);function $q(e,t,r){let{reference:o,floating:n}=e,i=js(t),s=k_(t),l=P_(s),c=$n(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(fc(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 rK(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}=dc(t,e),g=p2(h),y=l[m?f==="floating"?"reference":"floating":f],b=xg(await i.getClippingRect({element:(r=await(i.isElement==null?void 0:i.isElement(y)))==null||r?y:y.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(l.floating)),boundary:u,rootBoundary:d,strategy:c})),w=f==="floating"?{x:o,y:n,width:s.floating.width,height:s.floating.height}:s.reference,S=await(i.getOffsetParent==null?void 0:i.getOffsetParent(l.floating)),x=await(i.isElement==null?void 0:i.isElement(S))?await(i.getScale==null?void 0:i.getScale(S))||{x:1,y:1}:{x:1,y:1},_=xg(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:w,offsetParent:S,strategy:c}):w);return{top:(b.top-_.top+g.top)/x.y,bottom:(_.bottom-b.bottom+g.bottom)/x.y,left:(b.left-_.left+g.left)/x.x,right:(_.right-b.right+g.right)/x.x}}var r5e=50,oK=async(e,t,r)=>{let{placement:o="bottom",strategy:n="absolute",middleware:i=[],platform:s}=r,l=s.detectOverflow?s:{...s,detectOverflow:rK},c=await(s.isRTL==null?void 0:s.isRTL(t)),u=await s.getElementRects({reference:e,floating:t,strategy:n}),{x:d,y:f}=$q(u,o,c),m=o,h=0,g={};for(let v=0;v<i.length;v++){let y=i[v];if(!y)continue;let{name:b,fn:w}=y,{x:S,y:x,data:_,reset:P}=await w({x:d,y:f,initialPlacement:o,placement:m,strategy:n,middlewareData:g,rects:u,platform:l,elements:{reference:e,floating:t}});d=S??d,f=x??f,g[b]={...g[b],..._},P&&h<r5e&&(h++,typeof P=="object"&&(P.placement&&(m=P.placement),P.rects&&(u=P.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:n}):P.rects),{x:d,y:f}=$q(u,m,c)),v=-1)}return{x:d,y:f,placement:m,strategy:n,middlewareData:g}};var nK=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,...y}=dc(e,t);if((r=i.arrow)!=null&&r.alignmentOffset)return{};let b=$n(n),w=js(l),S=$n(l)===l,x=await(c.isRTL==null?void 0:c.isRTL(u.floating)),_=m||(S||!v?[C_(l)]:Bq(l)),P=g!=="none";!m&&P&&_.push(...Vq(l,v,g,x));let I=[l,..._],A=await c.detectOverflow(t,y),k=[],D=((o=i.flip)==null?void 0:o.overflows)||[];if(d&&k.push(A[b]),f){let B=Lq(n,s,x);k.push(A[B[0]],A[B[1]])}if(D=[...D,{placement:n,overflows:k}],!k.every(B=>B<=0)){var E,C;let B=(((E=i.flip)==null?void 0:E.index)||0)+1,N=I[B];if(N&&(!(f==="alignment"?w!==js(N):!1)||D.every(F=>js(F.placement)===w?F.overflows[0]>0:!0)))return{data:{index:B,overflows:D},reset:{placement:N}};let z=(C=D.filter(O=>O.overflows[0]<=0).sort((O,F)=>O.overflows[1]-F.overflows[1])[0])==null?void 0:C.placement;if(!z)switch(h){case"bestFit":{var M;let O=(M=D.filter(F=>{if(P){let L=js(F.placement);return L===w||L==="y"}return!0}).map(F=>[F.placement,F.overflows.filter(L=>L>0).reduce((L,H)=>L+H,0)]).sort((F,L)=>F[1]-L[1])[0])==null?void 0:M[0];O&&(z=O);break}case"initialPlacement":z=l;break}if(n!==z)return{reset:{placement:z}}}return{}}}};function eK(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function tK(e){return Fq.some(t=>e[t]>=0)}var iK=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){let{rects:r,platform:o}=t,{strategy:n="referenceHidden",...i}=dc(e,t);switch(n){case"referenceHidden":{let s=await o.detectOverflow(t,{...i,elementContext:"reference"}),l=eK(s,r.reference);return{data:{referenceHiddenOffsets:l,referenceHidden:tK(l)}}}case"escaped":{let s=await o.detectOverflow(t,{...i,altBoundary:!0}),l=eK(s,r.floating);return{data:{escapedOffsets:l,escaped:tK(l)}}}default:return{}}}}};var sK=new Set(["left","top"]);async function o5e(e,t){let{placement:r,platform:o,elements:n}=e,i=await(o.isRTL==null?void 0:o.isRTL(n.floating)),s=$n(r),l=fc(r),c=js(r)==="y",u=sK.has(s)?-1:1,d=i&&c?-1:1,f=dc(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 aK=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 o5e(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}}}}},lK=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:b=>{let{x:w,y:S}=b;return{x:w,y:S}}},...u}=dc(e,t),d={x:r,y:o},f=await i.detectOverflow(t,u),m=js($n(n)),h=m2(m),g=d[h],v=d[m];if(s){let b=h==="y"?"top":"left",w=h==="y"?"bottom":"right",S=g+f[b],x=g-f[w];g=E_(S,g,x)}if(l){let b=m==="y"?"top":"left",w=m==="y"?"bottom":"right",S=v+f[b],x=v-f[w];v=E_(S,v,x)}let y=c.fn({...t,[h]:g,[m]:v});return{...y,data:{x:y.x-r,y:y.y-o,enabled:{[h]:s,[m]:l}}}}}},cK=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}=dc(e,t),d={x:r,y:o},f=js(n),m=m2(f),h=d[m],g=d[f],v=dc(l,t),y=typeof v=="number"?{mainAxis:v,crossAxis:0}:{mainAxis:0,crossAxis:0,...v};if(c){let S=m==="y"?"height":"width",x=i.reference[m]-i.floating[S]+y.mainAxis,_=i.reference[m]+i.reference[S]-y.mainAxis;h<x?h=x:h>_&&(h=_)}if(u){var b,w;let S=m==="y"?"width":"height",x=sK.has($n(n)),_=i.reference[f]-i.floating[S]+(x&&((b=s.offset)==null?void 0:b[f])||0)+(x?0:y.crossAxis),P=i.reference[f]+i.reference[S]+(x?0:((w=s.offset)==null?void 0:w[f])||0)-(x?y.crossAxis:0);g<_?g=_:g>P&&(g=P)}return{[m]:h,[f]:g}}}},uK=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}=dc(e,t),d=await s.detectOverflow(t,u),f=$n(n),m=fc(n),h=js(n)==="y",{width:g,height:v}=i.floating,y,b;f==="top"||f==="bottom"?(y=f,b=m===(await(s.isRTL==null?void 0:s.isRTL(l.floating))?"start":"end")?"left":"right"):(b=f,y=m==="end"?"top":"bottom");let w=v-d.top-d.bottom,S=g-d.left-d.right,x=Bm(v-d[y],w),_=Bm(g-d[b],S),P=!t.middlewareData.shift,I=x,A=_;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(A=S),(o=t.middlewareData.shift)!=null&&o.enabled.y&&(I=w),P&&!m){let D=rs(d.left,0),E=rs(d.right,0),C=rs(d.top,0),M=rs(d.bottom,0);h?A=g-2*(D!==0||E!==0?D+E:rs(d.left,d.right)):I=v-2*(C!==0||M!==0?C+M:rs(d.top,d.bottom))}await c({...t,availableWidth:A,availableHeight:I});let k=await s.getDimensions(l.floating);return g!==k.width||v!==k.height?{reset:{rects:!0}}:{}}}};function pK(e){let t=yi(e),r=parseFloat(t.width)||0,o=parseFloat(t.height)||0,n=Qo(e),i=n?e.offsetWidth:r,s=n?e.offsetHeight:o,l=Vm(r)!==i||Vm(o)!==s;return l&&(r=i,o=s),{width:r,height:o,$:l}}function mB(e){return st(e)?e:e.contextElement}function Tb(e){let t=mB(e);if(!Qo(t))return uc(1);let r=t.getBoundingClientRect(),{width:o,height:n,$:i}=pK(t),s=(i?Vm(r.width):r.width)/o,l=(i?Vm(r.height):r.height)/n;return(!s||!Number.isFinite(s))&&(s=1),(!l||!Number.isFinite(l))&&(l=1),{x:s,y:l}}var n5e=uc(0);function hK(e){let t=no(e);return!wb()||!t.visualViewport?n5e:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function i5e(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==no(e)?!1:t}function Tg(e,t,r,o){t===void 0&&(t=!1),r===void 0&&(r=!1);let n=e.getBoundingClientRect(),i=mB(e),s=uc(1);t&&(o?st(o)&&(s=Tb(o)):s=Tb(e));let l=i5e(i,r,o)?hK(i):uc(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=no(i),h=o&&st(o)?no(o):o,g=m,v=l2(g);for(;v&&o&&h!==g;){let y=Tb(v),b=v.getBoundingClientRect(),w=yi(v),S=b.left+(v.clientLeft+parseFloat(w.paddingLeft))*y.x,x=b.top+(v.clientTop+parseFloat(w.paddingTop))*y.y;c*=y.x,u*=y.y,d*=y.x,f*=y.y,c+=S,u+=x,g=no(v),v=l2(g)}}return xg({width:d,height:f,x:c,y:u})}function g2(e,t){let r=__(e).scrollLeft;return t?t.left+r:Tg(ac(e)).left+r}function gK(e,t){let r=e.getBoundingClientRect(),o=r.left+t.scrollLeft-g2(e,r),n=r.top+t.scrollTop;return{x:o,y:n}}function s5e(e){let{elements:t,rect:r,offsetParent:o,strategy:n}=e,i=n==="fixed",s=ac(o),l=t?x_(t.floating):!1;if(o===s||l&&i)return r;let c={scrollLeft:0,scrollTop:0},u=uc(1),d=uc(0),f=Qo(o);if((f||!f&&!i)&&((bg(o)!=="body"||bb(s))&&(c=__(o)),f)){let h=Tg(o);u=Tb(o),d.x=h.x+o.clientLeft,d.y=h.y+o.clientTop}let m=s&&!f&&!i?gK(s,c):uc(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 a5e(e){return Array.from(e.getClientRects())}function l5e(e){let t=ac(e),r=__(e),o=e.ownerDocument.body,n=rs(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),i=rs(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight),s=-r.scrollLeft+g2(e),l=-r.scrollTop;return yi(o).direction==="rtl"&&(s+=rs(t.clientWidth,o.clientWidth)-n),{width:n,height:i,x:s,y:l}}var dK=25;function c5e(e,t){let r=no(e),o=ac(e),n=r.visualViewport,i=o.clientWidth,s=o.clientHeight,l=0,c=0;if(n){i=n.width,s=n.height;let d=wb();(!d||d&&t==="fixed")&&(l=n.offsetLeft,c=n.offsetTop)}let u=g2(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<=dK&&(i-=g)}else u<=dK&&(i+=u);return{width:i,height:s,x:l,y:c}}function u5e(e,t){let r=Tg(e,!0,t==="fixed"),o=r.top+e.clientTop,n=r.left+e.clientLeft,i=Qo(e)?Tb(e):uc(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 fK(e,t,r){let o;if(t==="viewport")o=c5e(e,r);else if(t==="document")o=l5e(ac(e));else if(st(t))o=u5e(t,r);else{let n=hK(e);o={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return xg(o)}function vK(e,t){let r=sc(e);return r===t||!st(r)||lc(r)?!1:yi(r).position==="fixed"||vK(r,t)}function d5e(e,t){let r=t.get(e);if(r)return r;let o=Fm(e,[],!1).filter(l=>st(l)&&bg(l)!=="body"),n=null,i=yi(e).position==="fixed",s=i?sc(e):e;for(;st(s)&&!lc(s);){let l=yi(s),c=a2(s);!c&&l.position==="fixed"&&(n=null),(i?!c&&!n:!c&&l.position==="static"&&!!n&&(n.position==="absolute"||n.position==="fixed")||bb(s)&&!c&&vK(e,s))?o=o.filter(d=>d!==s):n=l,s=sc(s)}return t.set(e,o),o}function f5e(e){let{element:t,boundary:r,rootBoundary:o,strategy:n}=e,s=[...r==="clippingAncestors"?x_(t)?[]:d5e(t,this._c):[].concat(r),o],l=fK(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=fK(t,s[m],n);c=rs(h.top,c),u=Bm(h.right,u),d=Bm(h.bottom,d),f=rs(h.left,f)}return{width:u-f,height:d-c,x:f,y:c}}function m5e(e){let{width:t,height:r}=pK(e);return{width:t,height:r}}function p5e(e,t,r){let o=Qo(t),n=ac(t),i=r==="fixed",s=Tg(e,!0,i,t),l={scrollLeft:0,scrollTop:0},c=uc(0);function u(){c.x=g2(n)}if(o||!o&&!i)if((bg(t)!=="body"||bb(n))&&(l=__(t)),o){let h=Tg(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?gK(n,l):uc(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 fB(e){return yi(e).position==="static"}function mK(e,t){if(!Qo(e)||yi(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return ac(e)===r&&(r=r.ownerDocument.body),r}function yK(e,t){let r=no(e);if(x_(e))return r;if(!Qo(e)){let n=sc(e);for(;n&&!lc(n);){if(st(n)&&!fB(n))return n;n=sc(n)}return r}let o=mK(e,t);for(;o&&bq(o)&&fB(o);)o=mK(o,t);return o&&lc(o)&&fB(o)&&!a2(o)?r:o||wq(e)||r}var h5e=async function(e){let t=this.getOffsetParent||yK,r=this.getDimensions,o=await r(e.floating);return{reference:p5e(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function g5e(e){return yi(e).direction==="rtl"}var pB={convertOffsetParentRelativeRectToViewportRelativeRect:s5e,getDocumentElement:ac,getClippingRect:f5e,getOffsetParent:yK,getElementRects:h5e,getClientRects:a5e,getDimensions:m5e,getScale:Tb,isElement:st,isRTL:g5e};function bK(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function v5e(e,t){let r=null,o,n=ac(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=T_(f),v=T_(n.clientWidth-(d+m)),y=T_(n.clientHeight-(f+h)),b=T_(d),S={rootMargin:-g+"px "+-v+"px "+-y+"px "+-b+"px",threshold:rs(0,Bm(1,c))||1},x=!0;function _(P){let I=P[0].intersectionRatio;if(I!==c){if(!x)return s();I?s(!1,I):o=setTimeout(()=>{s(!1,1e-7)},1e3)}I===1&&!bK(u,e.getBoundingClientRect())&&s(),x=!1}try{r=new IntersectionObserver(_,{...S,root:n.ownerDocument})}catch{r=new IntersectionObserver(_,S)}r.observe(e)}return s(!0),i}function A_(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=mB(e),d=n||i?[...u?Fm(u):[],...t?Fm(t):[]]:[];d.forEach(b=>{n&&b.addEventListener("scroll",r,{passive:!0}),i&&b.addEventListener("resize",r)});let f=u&&l?v5e(u,r):null,m=-1,h=null;s&&(h=new ResizeObserver(b=>{let[w]=b;w&&w.target===u&&h&&t&&(h.unobserve(t),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var S;(S=h)==null||S.observe(t)})),r()}),u&&!c&&h.observe(u),t&&h.observe(t));let g,v=c?Tg(e):null;c&&y();function y(){let b=Tg(e);v&&!bK(v,b)&&r(),v=b,g=requestAnimationFrame(y)}return r(),()=>{var b;d.forEach(w=>{n&&w.removeEventListener("scroll",r),i&&w.removeEventListener("resize",r)}),f?.(),(b=h)==null||b.disconnect(),h=null,c&&cancelAnimationFrame(g)}}var wK=aK;var SK=lK,xK=nK,_K=uK,CK=iK;var TK=cK,v2=(e,t,r)=>{let o=new Map,n={platform:pB,...r},i={...n.platform,_c:o};return oK(e,t,{...n,platform:i})};var Jo=a(Se(),1),PK=a(Se(),1),kK=a(uu(),1),b5e=typeof document<"u",w5e=function(){},y2=b5e?PK.useLayoutEffect:w5e;function b2(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(!b2(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)&&!b2(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function RK(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function EK(e,t){let r=RK(e);return Math.round(t*r)/r}function hB(e){let t=Jo.useRef(e);return y2(()=>{t.current=e}),t}function AK(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]=Jo.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[m,h]=Jo.useState(o);b2(m,o)||h(o);let[g,v]=Jo.useState(null),[y,b]=Jo.useState(null),w=Jo.useCallback(F=>{F!==P.current&&(P.current=F,v(F))},[]),S=Jo.useCallback(F=>{F!==I.current&&(I.current=F,b(F))},[]),x=i||g,_=s||y,P=Jo.useRef(null),I=Jo.useRef(null),A=Jo.useRef(d),k=c!=null,D=hB(c),E=hB(n),C=hB(u),M=Jo.useCallback(()=>{if(!P.current||!I.current)return;let F={placement:t,strategy:r,middleware:m};E.current&&(F.platform=E.current),v2(P.current,I.current,F).then(L=>{let H={...L,isPositioned:C.current!==!1};B.current&&!b2(A.current,H)&&(A.current=H,kK.flushSync(()=>{f(H)}))})},[m,t,r,E,C]);y2(()=>{u===!1&&A.current.isPositioned&&(A.current.isPositioned=!1,f(F=>({...F,isPositioned:!1})))},[u]);let B=Jo.useRef(!1);y2(()=>(B.current=!0,()=>{B.current=!1}),[]),y2(()=>{if(x&&(P.current=x),_&&(I.current=_),x&&_){if(D.current)return D.current(x,_,M);M()}},[x,_,M,D,k]);let N=Jo.useMemo(()=>({reference:P,floating:I,setReference:w,setFloating:S}),[w,S]),z=Jo.useMemo(()=>({reference:x,floating:_}),[x,_]),O=Jo.useMemo(()=>{let F={position:r,left:0,top:0};if(!z.floating)return F;let L=EK(z.floating,d.x),H=EK(z.floating,d.y);return l?{...F,transform:"translate("+L+"px, "+H+"px)",...RK(z.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:L,top:H}},[r,l,z.floating,d.x,d.y]);return Jo.useMemo(()=>({...d,update:M,refs:N,elements:z,floatingStyles:O}),[d,M,N,z,O])}var gB=(e,t)=>{let r=wK(e);return{name:r.name,fn:r.fn,options:[e,t]}},vB=(e,t)=>{let r=SK(e);return{name:r.name,fn:r.fn,options:[e,t]}},yB=(e,t)=>({fn:TK(e).fn,options:[e,t]}),bB=(e,t)=>{let r=xK(e);return{name:r.name,fn:r.fn,options:[e,t]}},wB=(e,t)=>{let r=_K(e);return{name:r.name,fn:r.fn,options:[e,t]}};var SB=(e,t)=>{let r=CK(e);return{name:r.name,fn:r.fn,options:[e,t]}};var Bt=(e,t,r,o,n,i,...s)=>{if(s.length>0)throw new Error(En(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),y=n(c,u,d,f);return i(m,h,g,v,y,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 HK=a(Se(),1),EB=a(w2(),1),UK=a(LK(),1);var BK=a(Se(),1);var _B=[],CB;function VK(){return CB}function jK(e){_B.push(e)}function TB(e){let t=(r,o)=>{let n=Mo(B5e).current,i;try{CB=n;for(let s of _B)s.before(n);i=e(r,o);for(let s of _B)s.after(n);n.didInitialize=!0}finally{CB=void 0}return i};return t.displayName=e.displayName||e.name,t}function zK(e){return BK.forwardRef(TB(e))}function B5e(){return{didInitialize:!1}}var V5e=gb(19),j5e=V5e?H5e:U5e;function x2(e,t,r,o,n){return j5e(e,t,r,o,n)}function z5e(e,t,r,o,n){let i=HK.useCallback(()=>t(e.getSnapshot(),r,o,n),[e,t,r,o,n]);return(0,EB.useSyncExternalStore)(e.subscribe,i,i)}jK({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,EB.useSyncExternalStore)(e.subscribe,e.getSnapshot,e.getSnapshot))}});function H5e(e,t,r,o,n){let i=VK();if(!i)return z5e(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 U5e(e,t,r,o,n){return(0,UK.useSyncExternalStoreWithSelector)(e.subscribe,e.getSnapshot,e.getSnapshot,i=>t(i,r,o,n))}var _2=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 x2(this,t,r,o,n)}};var Eg=a(Se(),1);var Pb=class extends _2{constructor(t,r={},o){super(t),this.context=r,this.selectors=o}useSyncedValue(t,r){Eg.useDebugValue(t),je(()=>{this.state[t]!==r&&this.set(t,r)},[t,r])}useSyncedValueWithCleanup(t,r){let o=this;je(()=>(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);je(()=>{r.update(t)},[r,...o])}useControlledProp(t,r){Eg.useDebugValue(t);let o=r!==void 0;je(()=>{o&&!Object.is(this.state[t],r)&&super.setState({...this.state,[t]:r})},[t,r,o])}select(t,r,o,n){let i=this.selectors[t];return i(this.state,r,o,n)}useState(t,r,o,n){return Eg.useDebugValue(t),x2(this,this.selectors[t],r,o,n)}useContextCallback(t,r){Eg.useDebugValue(t);let o=Je(r??Bd);this.context[t]=o}useStateSetter(t){let r=Eg.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 W5e={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)},zm=class extends Pb{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:Qq(),nested:o,triggerElements:i},W5e),this.syncOnly=r}syncOpenEvent=(t,r)=>{(!t||!this.state.open||r!=null&&Nq(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)}};var I_=a(Se(),1);function G5e(e,t){let r=I_.useRef(null),o=I_.useRef(null);return I_.useCallback(n=>{if(e!==void 0){if(r.current!==null){let i=r.current,s=o.current,l=t.context.triggerElements.getById(i);s&&l===s&&t.context.triggerElements.delete(i),r.current=null,o.current=null}n!==null&&(r.current=e,o.current=n,t.context.triggerElements.add(e,n))}},[t,e])}function WK(e,t,r,o){let n=r.useState("isMountedByTrigger",e),i=G5e(e,r),s=Je(l=>{if(i(l),!l||!r.select("open"))return;let c=r.select("activeTriggerId");if(c===e){r.update({activeTriggerElement:l,...o});return}c==null&&r.update({activeTriggerId:e,activeTriggerElement:l,...o})});return je(()=>{n&&r.update({activeTriggerElement:t.current,...o})},[n,r,t,...Object.values(o)]),{registerTrigger:s,isMountedByThisTrigger:n}}function GK(e){let t=e.useState("open");je(()=>{if(t&&!e.select("activeTriggerId")&&e.context.triggerElements.size===1){let r=e.context.triggerElements.entries().next();if(!r.done){let[o,n]=r.value;e.update({activeTriggerId:o,activeTriggerElement:n})}}},[t,e])}function YK(e,t,r){let{mounted:o,setMounted:n,transitionStatus:i}=r2(e);t.useSyncedValues({mounted:o,transitionStatus:i});let s=Je(()=>{n(!1),t.update({activeTriggerId:null,activeTriggerElement:null,mounted:!1}),r?.(),t.context.onOpenChangeComplete?.(!1)}),l=t.useState("preventUnmountingOnClose");return xb({enabled:!l,open:e,ref:t.context.popupRef,onComplete(){e||s()}}),{forceUnmount:s,transitionStatus:i}}var Hm=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 qK(){return new zm({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:new Hm,floatingId:"",syncOnly:!1,nested:!1,onOpenChange:void 0})}function KK(){return{open:!1,openProp:void 0,mounted:!1,transitionStatus:void 0,floatingRootContext:qK(),preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,triggerIdProp:void 0,popupElement:null,positionerElement:null,activeTriggerProps:Pn,inactiveTriggerProps:Pn,popupProps:Pn}}var C2=Bt(e=>e.triggerIdProp??e.activeTriggerId),ZK={open:Bt(e=>e.openProp??e.open),mounted:Bt(e=>e.mounted),transitionStatus:Bt(e=>e.transitionStatus),floatingRootContext:Bt(e=>e.floatingRootContext),preventUnmountingOnClose:Bt(e=>e.preventUnmountingOnClose),payload:Bt(e=>e.payload),activeTriggerId:C2,activeTriggerElement:Bt(e=>e.mounted?e.activeTriggerElement:null),isTriggerActive:Bt((e,t)=>t!==void 0&&C2(e)===t),isOpenedByTrigger:Bt((e,t)=>t!==void 0&&C2(e)===t&&e.open),isMountedByTrigger:Bt((e,t)=>t!==void 0&&C2(e)===t&&e.mounted),triggerProps:Bt((e,t)=>t?e.activeTriggerProps:e.inactiveTriggerProps),popupProps:Bt(e=>e.popupProps),popupElement:Bt(e=>e.popupElement),positionerElement:Bt(e=>e.positionerElement)};function XK(e){let{open:t=!1,onOpenChange:r,elements:o={}}=e,n=Om(),i=Cb()!=null,s=Mo(()=>new zm({open:t,transitionStatus:void 0,onOpenChange:r,referenceElement:o.reference??null,floatingElement:o.floating??null,triggerElements:new Hm,floatingId:n,syncOnly:!1,nested:i})).current;return je(()=>{let l={open:t,floatingId:n};o.reference!==void 0&&(l.referenceElement=o.reference,l.domReferenceElement=st(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 PB(e={}){let{nodeId:t,externalTree:r}=e,o=XK(e),n=e.rootContext||o,i={reference:n.useState("referenceElement"),floating:n.useState("floatingElement"),domReference:n.useState("domReferenceElement")},[s,l]=ns.useState(null),c=ns.useRef(null),u=jm(r);je(()=>{i.domReference&&(c.current=i.domReference)},[i.domReference]);let d=AK({...e,elements:{...i,...s&&{reference:s}}}),f=ns.useCallback(A=>{let k=st(A)?{getBoundingClientRect:()=>A.getBoundingClientRect(),getClientRects:()=>A.getClientRects(),contextElement:A}:A;l(k),d.refs.setReference(k)},[d.refs]),[m,h]=ns.useState(void 0),[g,v]=ns.useState(null);n.useSyncedValue("referenceElement",m??null);let y=st(m)?m:null;n.useSyncedValue("domReferenceElement",m===void 0?i.domReference:y),n.useSyncedValue("floatingElement",g);let b=ns.useCallback(A=>{(st(A)||A===null)&&(c.current=A,h(A)),(st(d.refs.reference.current)||d.refs.reference.current===null||A!==null&&!st(A))&&d.refs.setReference(A)},[d.refs,h]),w=ns.useCallback(A=>{v(A),d.refs.setFloating(A)},[d.refs]),S=ns.useMemo(()=>({...d.refs,setReference:b,setFloating:w,setPositionReference:f,domReference:c}),[d.refs,b,w,f]),x=ns.useMemo(()=>({...d.elements,domReference:i.domReference}),[d.elements,i.domReference]),_=n.useState("open"),P=n.useState("floatingId"),I=ns.useMemo(()=>({...d,dataRef:n.context.dataRef,open:_,onOpenChange:n.setOpen,events:n.context.events,floatingId:P,refs:S,elements:x,nodeId:t,rootStore:n}),[d,S,x,t,n,_,P]);return je(()=>{n.context.dataRef.current.floatingContext=I;let A=u?.nodesRef.current.find(k=>k.id===t);A&&(A.context=I)}),ns.useMemo(()=>({...d,context:I,refs:S,elements:x,rootStore:n}),[d,S,x,I,n])}function kB(e){let{popupStore:t,treatPopupAsFloatingElement:r=!1,onOpenChange:o}=e,n=Om(),i=Cb()!=null,s=t.useState("open"),l=t.useState("activeTriggerElement"),c=t.useState(r?"popupElement":"positionerElement"),u=t.context.triggerElements,d=Mo(()=>new zm({open:s,transitionStatus:void 0,referenceElement:l,floatingElement:c,triggerElements:u,onOpenChange:o,floatingId:n,syncOnly:!0,nested:i})).current;return je(()=>{let f={open:s,floatingId:n,referenceElement:l,floatingElement:c};st(l)&&(f.domReferenceElement=l),d.state.positionReference===d.state.referenceElement&&(f.positionReference=l),d.update(f)},[s,n,l,c,d]),d.context.onOpenChange=o,d.context.nested=i,d}var mu=a(Se(),1);var RB=Pq&&Eq;function AB(e,t={}){let r="rootStore"in e?e.rootStore:e,{events:o,dataRef:n}=r.context,{enabled:i=!0,delay:s}=t,l=mu.useRef(!1),c=mu.useRef(null),u=Vd(),d=mu.useRef(!0);mu.useEffect(()=>{let m=r.select("domReferenceElement");if(!i)return;let h=no(m);function g(){let b=r.select("domReferenceElement");!r.select("open")&&Qo(b)&&b===d2(kn(b))&&(l.current=!0)}function v(){d.current=!0}function y(){d.current=!1}return mc(zt(h,"blur",g),RB&&zt(h,"keydown",v,!0),RB&&zt(h,"pointerdown",y,!0))},[r,i]),mu.useEffect(()=>{if(!i)return;function m(h){if(h.reason===ut.triggerPress||h.reason===ut.escapeKey){let g=r.select("domReferenceElement");st(g)&&(c.current=g,l.current=!0)}}return o.on("openchange",m),()=>{o.off("openchange",m)}},[o,i,r]);let f=mu.useMemo(()=>({onMouseLeave(){l.current=!1,c.current=null},onFocus(m){let h=m.currentTarget;if(l.current){if(c.current===h)return;l.current=!1,c.current=null}let g=ts(m.nativeEvent);if(st(g)){if(RB&&!m.relatedTarget){if(!d.current&&!Aq(g))return}else if(!Iq(g))return}let v=wg(m.relatedTarget,r.context.triggerElements),{nativeEvent:y,currentTarget:b}=m,w=typeof s=="function"?s():s;if(r.select("open")&&v||w===0||w===void 0){r.setOpen(!0,Kt(ut.triggerFocus,y,b));return}u.start(w,()=>{l.current||r.setOpen(!0,Kt(ut.triggerFocus,y,b))})},onBlur(m){l.current=!1,c.current=null;let h=m.relatedTarget,g=m.nativeEvent,v=st(h)&&h.hasAttribute(_b("focus-guard"))&&h.getAttribute("data-type")==="outside";u.start(0,()=>{let y=r.select("domReferenceElement"),b=d2(kn(y));!h&&b===y||Er(n.current.floatingContext?.refs.floating.current,b)||Er(y,b)||v||wg(h??b,r.context.triggerElements)||r.setOpen(!1,Kt(ut.triggerFocus,g))})}}),[n,r,u,s]);return mu.useMemo(()=>i?{reference:f,trigger:f}:{},[i,f])}var O_=a(Se(),1);var IB=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 Aa,this.restTimeout=new Aa,this.handleCloseOptions=void 0}static create(){return new e}dispose=()=>{this.openChangeTimeout.clear(),this.restTimeout.clear()};disposeEffect=()=>this.dispose},T2=new WeakMap;function kb(e){if(!e.performedPointerEventsMutation)return;let t=e.pointerEventsScopeElement;t&&T2.get(t)===e&&(e.pointerEventsScopeElement?.style.removeProperty("pointer-events"),e.pointerEventsReferenceElement?.style.removeProperty("pointer-events"),e.pointerEventsFloatingElement?.style.removeProperty("pointer-events"),T2.delete(t)),e.performedPointerEventsMutation=!1,e.pointerEventsScopeElement=null,e.pointerEventsReferenceElement=null,e.pointerEventsFloatingElement=null}function E2(e,t){let{scopeElement:r,referenceElement:o,floatingElement:n}=t,i=T2.get(r);i&&i!==e&&kb(i),kb(e),e.performedPointerEventsMutation=!0,e.pointerEventsScopeElement=r,e.pointerEventsReferenceElement=o,e.pointerEventsFloatingElement=n,T2.set(r,e),r.style.pointerEvents="none",o.style.pointerEvents="auto",n.style.pointerEvents="auto"}function P2(e){let t=Mo(IB.create).current,r=e.context.dataRef.current;return r.hoverInteractionState||(r.hoverInteractionState=t),Nm(r.hoverInteractionState.disposeEffect),r.hoverInteractionState}function OB(e,t={}){let r="rootStore"in e?e.rootStore:e,o=r.useState("open"),n=r.useState("floatingElement"),i=r.useState("domReferenceElement"),{dataRef:s}=r.context,{enabled:l=!0,closeDelay:c=0,nodeId:u}=t,d=P2(r),f=jm(),m=Cb(),h=Je(()=>h2(s.current.openEvent?.type,d.interactedInside)),g=Je(()=>{let x=s.current.openEvent?.type;return x?.includes("mouse")&&x!=="mousedown"}),v=Je(x=>wg(x,r.context.triggerElements)),y=O_.useCallback(x=>{let _=_g(c,"close",d.pointerType),P=()=>{r.setOpen(!1,Kt(ut.triggerHover,x)),f?.events.emit("floating.closed",x)};_?d.openChangeTimeout.start(_,P):(d.openChangeTimeout.clear(),P())},[c,r,d,f]),b=Je(()=>{kb(d)}),w=Je(x=>{let _=ts(x);if(!iB(_)){d.interactedInside=!1;return}d.interactedInside=_?.closest("[aria-haspopup]")!=null});je(()=>{o||(d.pointerType=void 0,d.restTimeoutPending=!1,d.interactedInside=!1,b())},[o,d,b]),O_.useEffect(()=>b,[b]),je(()=>{if(l&&o&&d.handleCloseOptions?.blockPointerEvents&&g()&&st(i)&&n){let x=i,_=n,P=kn(n),I=f?.nodesRef.current.find(k=>k.id===m)?.context?.elements.floating;I&&(I.style.pointerEvents="");let A=d.handleCloseOptions?.getScope?.()??d.pointerEventsScopeElement??I??x.closest("[data-rootownerid]")??P.body;return E2(d,{scopeElement:A,referenceElement:x,floatingElement:_}),()=>{b()}}},[l,o,i,n,d,g,f,m,b]);let S=Vd();O_.useEffect(()=>{if(!l)return;function x(){d.openChangeTimeout.clear(),S.clear(),f?.events.off("floating.closed",P),b()}function _(A){if(f&&m&&cc(f.nodesRef.current,m).length>0){f.events.on("floating.closed",P);return}if(v(A.relatedTarget))return;let k=s.current.floatingContext?.nodeId??u,D=A.relatedTarget;if(!(f&&k&&st(D)&&cc(f.nodesRef.current,k,!1).some(C=>Er(C.context?.elements.floating,D)))){if(d.handler){d.handler(A);return}b(),h()||y(A)}}function P(A){!f||!m||cc(f.nodesRef.current,m).length>0||S.start(0,()=>{f.events.off("floating.closed",P),r.setOpen(!1,Kt(ut.triggerHover,A)),f.events.emit("floating.closed",A)})}let I=n;return mc(I&&zt(I,"mouseenter",x),I&&zt(I,"mouseleave",_),I&&zt(I,"pointerdown",w,!0),()=>{f?.events.off("floating.closed",P)})},[l,n,r,s,u,h,v,y,b,w,d,f,m,S])}var Um=a(Se(),1),QK=a(uu(),1);var Y5e={current:null};function NB(e,t={}){let r="rootStore"in e?e.rootStore:e,{dataRef:o,events:n}=r.context,{enabled:i=!0,delay:s=0,handleClose:l=null,mouseOnly:c=!1,restMs:u=0,move:d=!0,triggerElementRef:f=Y5e,externalTree:m,isActiveTrigger:h=!0,getHandleCloseContext:g,isClosing:v}=t,y=jm(m),b=P2(r),w=Um.useRef(!1),S=pc(l),x=pc(s),_=pc(u),P=pc(i),I=pc(v);h&&(b.handleCloseOptions=S.current?.__options);let A=Je(()=>h2(o.current.openEvent?.type,b.interactedInside)),k=Je(B=>wg(B,r.context.triggerElements)),D=Je((B,N,z)=>{let O=r.context.triggerElements;if(O.hasElement(N))return!B||!Er(B,N);if(!st(z))return!1;let F=z;return O.hasMatchingElement(L=>Er(L,F))&&(!B||!Er(B,F))}),E=Je((B,N=!0)=>{let z=_g(x.current,"close",b.pointerType);z?b.openChangeTimeout.start(z,()=>{r.setOpen(!1,Kt(ut.triggerHover,B)),y?.events.emit("floating.closed",B)}):N&&(b.openChangeTimeout.clear(),r.setOpen(!1,Kt(ut.triggerHover,B)),y?.events.emit("floating.closed",B))}),C=Je(()=>{if(!b.handler)return;kn(r.select("domReferenceElement")).removeEventListener("mousemove",b.handler),b.handler=void 0}),M=Je(()=>{kb(b)});return Um.useEffect(()=>C,[C]),Um.useEffect(()=>{if(!i)return;function B(N){N.open?w.current=!1:(w.current=N.reason===ut.triggerHover,C(),b.openChangeTimeout.clear(),b.restTimeout.clear(),b.blockMouseMove=!0,b.restTimeoutPending=!1)}return n.on("openchange",B),()=>{n.off("openchange",B)}},[i,n,b,C]),Um.useEffect(()=>{if(!i)return;let B=f.current??(h?r.select("domReferenceElement"):null);if(!st(B))return;function N(O){if(b.openChangeTimeout.clear(),b.blockMouseMove=!1,c&&!Sg(b.pointerType))return;let F=sB(_.current),L=_g(x.current,"open",b.pointerType),H=ts(O),q=O.currentTarget??null,Q=r.select("domReferenceElement"),J=q;if(st(H)&&!r.context.triggerElements.hasElement(H)){for(let Ge of r.context.triggerElements.elements())if(Er(Ge,H)){J=Ge;break}}st(q)&&st(Q)&&!r.context.triggerElements.hasElement(q)&&Er(q,Q)&&(J=Q);let te=J==null?!1:D(Q,J,H),se=r.select("open"),$=I.current?.()??r.select("transitionStatus")==="ending",X=!se&&$&&w.current,oe=!te&&st(J)&&st(Q)&&Er(Q,J)&&X,pe=F>0&&!L,be=te&&(se||X)||oe,Ce=!se||te;if(be){r.setOpen(!0,Kt(ut.triggerHover,O,J));return}pe||(L?b.openChangeTimeout.start(L,()=>{Ce&&r.setOpen(!0,Kt(ut.triggerHover,O,J))}):Ce&&r.setOpen(!0,Kt(ut.triggerHover,O,J)))}function z(O){if(A()){M();return}C();let F=r.select("domReferenceElement"),L=kn(F);b.restTimeout.clear(),b.restTimeoutPending=!1;let H=o.current.floatingContext??g?.();if(k(O.relatedTarget))return;if(S.current&&H){r.select("open")||b.openChangeTimeout.clear();let J=f.current;b.handler=S.current({...H,tree:y,x:O.clientX,y:O.clientY,onClose(){M(),C(),P.current&&!A()&&J===r.select("domReferenceElement")&&E(O,!0)}}),L.addEventListener("mousemove",b.handler),b.handler(O);return}(b.pointerType!=="touch"||!Er(r.select("floatingElement"),O.relatedTarget))&&E(O)}return d?mc(zt(B,"mousemove",N,{once:!0}),zt(B,"mouseenter",N),zt(B,"mouseleave",z)):mc(zt(B,"mouseenter",N),zt(B,"mouseleave",z))},[C,M,o,x,E,r,i,S,b,h,D,A,k,c,d,_,f,y,P,g,I]),Um.useMemo(()=>{if(!i)return;function B(N){b.pointerType=N.pointerType}return{onPointerDown:B,onPointerEnter:B,onMouseMove(N){let{nativeEvent:z}=N,O=N.currentTarget,F=r.select("domReferenceElement"),L=r.select("open"),H=D(F,O,N.target);if(c&&!Sg(b.pointerType))return;if(L&&H&&b.handleCloseOptions?.blockPointerEvents){let J=r.select("floatingElement");if(J){let te=b.handleCloseOptions?.getScope?.()??O.ownerDocument.body;E2(b,{scopeElement:te,referenceElement:O,floatingElement:J})}}let q=sB(_.current);if(L&&!H||q===0||!H&&b.restTimeoutPending&&N.movementX**2+N.movementY**2<2)return;b.restTimeout.clear();function Q(){if(b.restTimeoutPending=!1,A())return;let J=r.select("open");!b.blockMouseMove&&(!J||H)&&r.setOpen(!0,Kt(ut.triggerHover,z,O))}b.pointerType==="touch"?QK.flushSync(()=>{Q()}):H&&L?Q():(b.restTimeoutPending=!0,b.restTimeout.start(q,Q))}}},[i,b,A,D,c,r,_])}var Pg=a(Se(),1);function MB(e=[]){let t=e.map(u=>u?.reference),r=e.map(u=>u?.floating),o=e.map(u=>u?.item),n=e.map(u=>u?.trigger),i=Pg.useCallback(u=>k2(u,e,"reference"),t),s=Pg.useCallback(u=>k2(u,e,"floating"),r),l=Pg.useCallback(u=>k2(u,e,"item"),o),c=Pg.useCallback(u=>k2(u,e,"trigger"),n);return Pg.useMemo(()=>({getReferenceProps:i,getFloatingProps:s,getItemProps:l,getTriggerProps:c}),[i,s,l,c])}function k2(e,t,r){let o=new Map,n=r==="item",i={};r==="floating"&&(i.tabIndex=-1,i[tB]="");for(let s in e)n&&e&&(s===rB||s===oB)||(i[s]=e[s]);for(let s=0;s<t.length;s+=1){let l,c=t[s]?.[r];typeof c=="function"?l=e?c(e):null:l=c,l&&JK(i,l,n,o)}return JK(i,e,n,o),i}function JK(e,t,r,o){for(let n in t){let i=t[n];r&&(n===rB||n===oB)||(n.startsWith("on")?(o.has(n)||o.set(n,[]),typeof i=="function"&&(o.get(n)?.push(i),e[n]=(...s)=>o.get(n)?.map(l=>l(...s)).find(l=>l!==void 0))):e[n]=i)}}var $K=.1,q5e=$K*$K,fr=.5;function R2(e,t,r,o,n,i){return o>=t!=i>=t&&e<=(n-r)*(t-o)/(i-o)+r}function A2(e,t,r,o,n,i,s,l,c,u){let d=!1;return R2(e,t,r,o,n,i)&&(d=!d),R2(e,t,n,i,s,l)&&(d=!d),R2(e,t,s,l,c,u)&&(d=!d),R2(e,t,c,u,r,o)&&(d=!d),d}function K5e(e,t,r){return e>=r.x&&e<=r.x+r.width&&t>=r.y&&t<=r.y+r.height}function I2(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 DB(e={}){let{blockPointerEvents:t=!1}=e,r=new Aa,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 y(w,S){let x=performance.now(),_=x-v;if(h===null||g===null||_===0)return h=w,g=S,v=x,!1;let P=w-h,I=S-g,A=P*P+I*I,k=_*_*q5e;return h=w,g=S,v=x,A<k}function b(){r.clear(),c()}return function(S){r.clear();let x=l.domReference,_=l.floating;if(!x||!_||f==null||n==null||i==null)return;let{clientX:P,clientY:I}=S,A=ts(S),k=S.type==="mouseleave",D=Er(_,A),E=Er(x,A);if(D&&(m=!0,!k))return;if(E&&(m=!1,!k)){m=!0;return}if(k&&st(S.relatedTarget)&&Er(_,S.relatedTarget))return;function C(){return!!(d&&cc(d.nodesRef.current,u).length>0)}function M(){C()||b()}if(C())return;let B=x.getBoundingClientRect(),N=_.getBoundingClientRect(),z=n>N.right-N.width/2,O=i>N.bottom-N.height/2,F=N.width>B.width,L=N.height>B.height,H=(F?B:N).left,q=(F?B:N).right,Q=(L?B:N).top,J=(L?B:N).bottom;if(f==="top"&&i>=B.bottom-1||f==="bottom"&&i<=B.top+1||f==="left"&&n>=B.right-1||f==="right"&&n<=B.left+1){M();return}let te=!1;switch(f){case"top":te=I2(P,I,H,B.top+1,q,N.bottom-1);break;case"bottom":te=I2(P,I,H,N.top+1,q,B.bottom-1);break;case"left":te=I2(P,I,N.right-1,J,B.left+1,Q);break;case"right":te=I2(P,I,B.right-1,J,N.left+1,Q);break;default:}if(te)return;if(m&&!K5e(P,I,B)){M();return}if(!k&&y(P,I)){M();return}let se=!1;switch(f){case"top":{let $=F?fr/2:fr*4,X=F||z?n+$:n-$,oe=F?n-$:z?n+$:n-$,pe=i+fr+1,be=z||F?N.bottom-fr:N.top,Ce=z?F?N.bottom-fr:N.top:N.bottom-fr;se=A2(P,I,X,pe,oe,pe,N.left,be,N.right,Ce);break}case"bottom":{let $=F?fr/2:fr*4,X=F||z?n+$:n-$,oe=F?n-$:z?n+$:n-$,pe=i-fr,be=z||F?N.top+fr:N.bottom,Ce=z?F?N.top+fr:N.bottom:N.top+fr;se=A2(P,I,X,pe,oe,pe,N.left,be,N.right,Ce);break}case"left":{let $=L?fr/2:fr*4,X=L||O?i+$:i-$,oe=L?i-$:O?i+$:i-$,pe=n+fr+1,be=O||L?N.right-fr:N.left,Ce=O?L?N.right-fr:N.left:N.right-fr;se=A2(P,I,be,N.top,Ce,N.bottom,pe,X,pe,oe);break}case"right":{let $=L?fr/2:fr*4,X=L||O?i+$:i-$,oe=L?i-$:O?i+$:i-$,pe=n-fr,be=O||L?N.left+fr:N.right,Ce=O?L?N.left+fr:N.right:N.left+fr;se=A2(P,I,pe,X,pe,oe,be,N.top,Ce,N.bottom);break}default:}se?m||r.start(40,M):M()}};return o.__options={...e,blockPointerEvents:t},o}var FB=(function(e){return e.open="data-open",e.closed="data-closed",e[e.startingStyle=du.startingStyle]="startingStyle",e[e.endingStyle=du.endingStyle]="endingStyle",e.anchorHidden="data-anchor-hidden",e.side="data-side",e.align="data-align",e})({}),N_=(function(e){return e.popupOpen="data-popup-open",e.pressed="data-pressed",e})({}),Z5e={[N_.popupOpen]:""},$dt={[N_.popupOpen]:"",[N_.pressed]:""},X5e={[FB.open]:""},Q5e={[FB.closed]:""},J5e={[FB.anchorHidden]:""},eZ={open(e){return e?Z5e:null}};var Rb={open(e){return e?X5e:Q5e},anchorHidden(e){return e?J5e:null}};function tZ(e){return gb(19)?e:e?"true":void 0}var Oa=a(Se(),1);var $5e=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"}=dc(e,t)||{};if(u==null)return{};let m=p2(d),h={x:r,y:o},g=k_(n),v=P_(g),y=await s.getDimensions(u),b=g==="y",w=b?"top":"left",S=b?"bottom":"right",x=b?"clientHeight":"clientWidth",_=i.reference[v]+i.reference[g]-h[g]-i.floating[v],P=h[g]-i.reference[g],I=f==="real"?await s.getOffsetParent?.(u):l.floating,A=l.floating[x]||i.floating[v];(!A||!await s.isElement?.(I))&&(A=l.floating[x]||i.floating[v]);let k=_/2-P/2,D=A/2-y[v]/2-1,E=Math.min(m[w],D),C=Math.min(m[S],D),M=E,B=A-y[v]-C,N=A/2-y[v]/2+k,z=E_(M,N,B),O=!c.arrow&&fc(n)!=null&&N!==z&&i.reference[v]/2-(N<M?E:C)-y[v]/2<0,F=O?N<M?N-M:N-B:0;return{[g]:h[g]+F,data:{[g]:z,centerOffset:N-z-F,...O&&{alignmentOffset:F}},reset:O}}}),rZ=(e,t)=>({...$5e(e),options:[e,t]});var oZ={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 SB().fn(e)).data?.referenceHidden||i}}}};var M_={sideX:"left",sideY:"top"},nZ={name:"adaptiveOrigin",async fn(e){let{x:t,y:r,rects:{floating:o},elements:{floating:n},platform:i,strategy:s,placement:l}=e,c=no(n),u=c.getComputedStyle(n);if(!(u.transitionDuration!=="0s"&&u.transitionDuration!==""))return{x:t,y:r,data:M_};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 w=kn(n);m={width:w.documentElement.clientWidth,height:w.documentElement.clientHeight}}else await i.isElement?.(f)&&(m=await i.getDimensions(f));let h=$n(l),g=t,v=r;h==="left"&&(g=m.width-(t+o.width)),h==="top"&&(v=m.height-(r+o.height));let y=h==="left"?"right":M_.sideX,b=h==="top"?"bottom":M_.sideY;return{x:g,y:v,data:{sideX:y,sideY:b}}}};function aZ(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 iZ(e,t,r){let{rects:o,placement:n}=e;return{side:aZ(t,$n(n),r),align:fc(n)||"center",anchor:{width:o.reference.width,height:o.reference.height},positioner:{width:o.floating.width,height:o.floating.height}}}function lZ(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,keepMounted:m=!1,floatingRootContext:h,mounted:g,collisionAvoidance:v,shiftCrossAxis:y=!1,nodeId:b,adaptiveOrigin:w,lazyFlip:S=!1,externalTree:x}=e,[_,P]=Oa.useState(null);!g&&_!==null&&P(null);let I=v.side||"flip",A=v.align||"flip",k=v.fallbackAxisSide||"end",D=typeof t=="function"?t:void 0,E=Je(D),C=D?E:t,M=pc(t),B=pc(g),z=hb()==="rtl",O=_||{top:"top",right:"right",bottom:"bottom",left:"left","inline-end":z?"left":"right","inline-start":z?"right":"left"}[o],F=i==="center"?O:`${O}-${i}`,L=c,H=1,q=o==="bottom"?H:0,Q=o==="top"?H:0,J=o==="right"?H:0,te=o==="left"?H:0;typeof L=="number"?L={top:L+q,right:L+te,bottom:L+Q,left:L+J}:L&&(L={top:(L.top||0)+q,right:(L.right||0)+te,bottom:(L.bottom||0)+Q,left:(L.left||0)+J});let se={boundary:l==="clipping-ancestors"?"clippingAncestors":l,padding:L},$=Oa.useRef(null),X=pc(n),oe=pc(s),Ce=[gB(mt=>{let $t=iZ(mt,o,z),dr=typeof X.current=="function"?X.current($t):X.current,K=typeof oe.current=="function"?oe.current($t):oe.current;return{mainAxis:dr,crossAxis:K,alignmentAxis:K}},[typeof n!="function"?n:0,typeof s!="function"?s:0,z,o])],Ge=A==="none"&&I!=="shift",He=!Ge&&(u||y||I==="shift"),ge=I==="none"?null:bB({...se,padding:{top:L.top+H,right:L.right+H,bottom:L.bottom+H,left:L.left+H},mainAxis:!y&&I==="flip",crossAxis:A==="flip"?"alignment":!1,fallbackAxisSideDirection:k}),ie=Ge?null:vB(mt=>{let $t=kn(mt.elements.floating).documentElement;return{...se,rootBoundary:y?{x:0,y:0,width:$t.clientWidth,height:$t.clientHeight}:void 0,mainAxis:A!=="none",crossAxis:He,limiter:u||y?void 0:yB(dr=>{if(!$.current)return{};let{width:K,height:fe}=$.current.getBoundingClientRect(),V=js($n(dr.placement)),Pe=V==="y"?K:fe,St=V==="y"?L.left+L.right:L.top+L.bottom;return{offset:Pe/2+St/2}})}},[se,u,y,L,A]);I==="shift"||A==="shift"||i==="center"?Ce.push(ie,ge):Ce.push(ge,ie),Ce.push(wB({...se,apply({elements:{floating:mt},availableWidth:$t,availableHeight:dr,rects:K}){if(!B.current)return;let fe=mt.style;fe.setProperty("--available-width",`${$t}px`),fe.setProperty("--available-height",`${dr}px`);let V=no(mt).devicePixelRatio||1,{x:Pe,y:St,width:xe,height:Dr}=K.reference,Re=(Math.round((Pe+xe)*V)-Math.round(Pe*V))/V,Tr=(Math.round((St+Dr)*V)-Math.round(St*V))/V;fe.setProperty("--anchor-width",`${Re}px`),fe.setProperty("--anchor-height",`${Tr}px`)}}),rZ(()=>({element:$.current||kn($.current).createElement("div"),padding:d,offsetParent:"floating"}),[d]),{name:"transformOrigin",fn(mt){let{elements:$t,middlewareData:dr,placement:K,rects:fe,y:V}=mt,Pe=$n(K),St=js(Pe),xe=$.current,Dr=dr.arrow?.x||0,Re=dr.arrow?.y||0,Tr=xe?.clientWidth||0,me=xe?.clientHeight||0,de=Dr+Tr/2,lu=Re+me/2,nr=Math.abs(dr.shift?.y||0),Fe=fe.reference.height/2,Ta=typeof n=="function"?n(iZ(mt,o,z)):n,kd=nr>Ta,Fr={top:`${de}px calc(100% + ${Ta}px)`,bottom:`${de}px ${-Ta}px`,left:`calc(100% + ${Ta}px) ${lu}px`,right:`${-Ta}px ${lu}px`}[Pe],Nt=`${de}px ${fe.reference.y+Fe-V}px`;return $t.floating.style.setProperty("--transform-origin",He&&St==="y"&&kd?Nt:Fr),{}}},oZ,w),je(()=>{!g&&h&&h.update({referenceElement:null,floatingElement:null,domReferenceElement:null,positionReference:null})},[g,h]);let ce=Oa.useMemo(()=>({elementResize:!f&&typeof ResizeObserver<"u",layoutShift:!f&&typeof IntersectionObserver<"u"}),[f]),{refs:ae,elements:ye,x:Ie,y:Oe,middlewareData:ke,update:ue,placement:re,context:ne,isPositioned:Te,floatingStyles:Qe}=PB({rootContext:h,open:m?g:void 0,placement:F,middleware:Ce,strategy:r,whileElementsMounted:m?void 0:(...mt)=>A_(...mt,ce),nodeId:b,externalTree:x}),{sideX:Pt,sideY:ft}=ke.adaptiveOrigin||M_,It=Te?r:"fixed",Lt=Oa.useMemo(()=>{let mt=w?{position:It,[Pt]:Ie,[ft]:Oe}:{position:It,...Qe};return Te||(mt.opacity=0),mt},[w,It,Pt,Ie,ft,Oe,Qe,Te]),Cr=Oa.useRef(null);je(()=>{if(!g)return;let mt=M.current,$t=typeof mt=="function"?mt():mt,K=(sZ($t)?$t.current:$t)||null||null;K!==Cr.current&&(ae.setPositionReference(K),Cr.current=K)},[g,ae,C,M]),Oa.useEffect(()=>{if(!g)return;let mt=M.current;typeof mt!="function"&&sZ(mt)&&mt.current!==Cr.current&&(ae.setPositionReference(mt.current),Cr.current=mt.current)},[g,ae,C,M]),Oa.useEffect(()=>{if(m&&g&&ye.domReference&&ye.floating)return A_(ye.domReference,ye.floating,ue,ce)},[m,g,ye,ue,ce]);let kt=$n(re),Ze=aZ(o,kt,z),vi=fc(re)||"center",Ns=!!ke.hide?.referenceHidden;je(()=>{S&&g&&Te&&P(kt)},[S,g,Te,kt]);let mr=Oa.useMemo(()=>({position:"absolute",top:ke.arrow?.y,left:ke.arrow?.x}),[ke.arrow]),tl=ke.arrow?.centerOffset!==0;return Oa.useMemo(()=>({positionerStyles:Lt,arrowStyles:mr,arrowRef:$,arrowUncentered:tl,side:Ze,align:vi,physicalSide:kt,anchorHidden:Ns,refs:ae,context:ne,isPositioned:Te,update:ue}),[Lt,mr,$,tl,Ze,vi,kt,Ns,ae,ne,Te,ue])}function sZ(e){return e!=null&&"current"in e}function O2(e){return e==="starting"?qq:Pn}function cZ(e,t,{styles:r,transitionStatus:o,props:n,refs:i,hidden:s,inert:l=!1}){let c={...r};return l&&(c.pointerEvents="none"),Xo("div",e,{state:t,ref:i,props:[{role:"presentation",hidden:s,style:c},O2(o),n],stateAttributesMapping:Rb})}var Wm={};Sn(Wm,{Panel:()=>mZ,Root:()=>dZ,Trigger:()=>fZ});var D_=a(Se(),1);var N2={...yq,...vb};var uZ=a(T(),1),dZ=D_.forwardRef(function(t,r){let{render:o,className:n,defaultOpen:i=!1,disabled:s=!1,onOpenChange:l,open:c,style:u,...d}=t,f=Je(l),m=hq({open:c,defaultOpen:i,onOpenChange:f,disabled:s}),h=D_.useMemo(()=>({open:m.open,disabled:m.disabled,transitionStatus:m.transitionStatus}),[m.open,m.disabled,m.transitionStatus]),g=D_.useMemo(()=>({...m,onOpenChange:f,state:h}),[m,f,h]),v=Xo("div",t,{state:h,ref:r,props:d,stateAttributesMapping:N2});return(0,uZ.jsx)(XL.Provider,{value:g,children:v})});var M2=a(Se(),1);var eNe={...vq,...vb},fZ=M2.forwardRef(function(t,r){let{panelId:o,open:n,handleTrigger:i,state:s,disabled:l}=n2(),{className:c,disabled:u=l,id:d,render:f,nativeButton:m=!0,style:h,...g}=t,{getButtonProps:v,buttonRef:y}=$L({disabled:u,focusableWhenDisabled:!0,native:m}),b=M2.useMemo(()=>({"aria-controls":n?o:void 0,"aria-expanded":n,onClick:i}),[o,n,i]);return Xo("button",t,{state:s,ref:[r,y],props:[b,g,v],stateAttributesMapping:eNe})});var D2=a(Se(),1);var LB=(function(e){return e.collapsiblePanelHeight="--collapsible-panel-height",e.collapsiblePanelWidth="--collapsible-panel-width",e})({});var mZ=D2.forwardRef(function(t,r){let{className:o,hiddenUntilFound:n,keepMounted:i,render:s,id:l,style:c,...u}=t,{abortControllerRef:d,animationTypeRef:f,height:m,mounted:h,onOpenChange:g,open:v,panelId:y,panelRef:b,runOnceAnimationsFinish:w,setDimensions:S,setHiddenUntilFound:x,setKeepMounted:_,setMounted:P,setPanelIdState:I,setOpen:A,setVisible:k,state:D,transitionDimensionRef:E,visible:C,width:M,transitionStatus:B}=n2(),N=n??!1,z=i??!1;je(()=>{if(l)return I(l),()=>{I(void 0)}},[l,I]),je(()=>{x(N)},[x,N]),je(()=>{_(z)},[_,z]);let{props:O}=zq({abortControllerRef:d,animationTypeRef:f,externalRef:r,height:m,hiddenUntilFound:N,id:y,keepMounted:z,mounted:h,onOpenChange:g,open:v,panelRef:b,runOnceAnimationsFinish:w,setDimensions:S,setMounted:P,setOpen:A,setVisible:k,transitionDimensionRef:E,visible:C,width:M});xb({open:v&&B==="idle",ref:b,onComplete(){v&&S({height:void 0,width:void 0})}});let F=D2.useMemo(()=>({...D,transitionStatus:B}),[D,B]),L=Xo("div",t,{state:F,ref:[r,b],props:[O,{style:{[LB.collapsiblePanelHeight]:m===void 0?"auto":`${m}px`,[LB.collapsiblePanelWidth]:M===void 0?"auto":`${M}px`}},u],stateAttributesMapping:N2});return z||N||h?L:null});var bi=a(Se(),1),bZ=a(uu(),1);var pZ=a(Se(),1);function hZ(e){let[t,r]=pZ.useState({current:e,previous:null});return e!==t.current&&r({current:e,previous:t.current}),t.previous}var kg=a(Se(),1);function BB(e){let t=yi(e),r=parseFloat(t.width)||0,o=parseFloat(t.height)||0,n=Qo(e),i=n?e.offsetWidth:r,s=n?e.offsetHeight:o;return(Vm(r)!==i||Vm(o)!==s)&&(r=i,o=s),{width:r,height:o}}var tNe=()=>!0;function vZ(e){let{popupElement:t,positionerElement:r,content:o,mounted:n,enabled:i=tNe,onMeasureLayout:s,onMeasureLayoutComplete:l,side:c,direction:u}=e,d=Dm(t,!0,!1),f=Mm(),m=kg.useRef(null),h=kg.useRef(null),g=kg.useRef(!0),v=kg.useRef(Bd),y=Je(s),b=Je(l),w=kg.useMemo(()=>{let S=c==="top",x=c==="left";return u==="rtl"?(S=S||c==="inline-end",x=x||c==="inline-end"):(S=S||c==="inline-start",x=x||c==="inline-start"),S?{position:"absolute",[c==="top"?"bottom":"top"]:"0",[x?"right":"left"]:"0"}:Pn},[c,u]);je(()=>{if(!n||!i()||typeof ResizeObserver!="function"){v.current=Bd,g.current=!0,m.current=null,h.current=null;return}if(!t||!r)return;v.current=gZ(t,w);let S=new ResizeObserver(M=>{let B=M[0];B&&(h.current={width:Math.ceil(B.borderBoxSize[0].inlineSize),height:Math.ceil(B.borderBoxSize[0].blockSize)})});S.observe(t),F2(t,"auto");let x=L2(t,"position","static"),_=L2(t,"transform","none"),P=L2(t,"scale","1"),I=gZ(r,{"--available-width":"max-content","--available-height":"max-content"});function A(){x(),_(),I()}function k(){A(),P()}if(y?.(),g.current||m.current===null){F_(r,"max-content");let M=BB(t);return m.current=M,F_(r,M),k(),b?.(null,M),g.current=!1,()=>{S.disconnect(),v.current(),v.current=Bd}}F2(t,"auto"),F_(r,"max-content");let D=m.current??h.current,E=BB(t);if(m.current=E,!D)return F_(r,E),k(),b?.(null,E),()=>{S.disconnect(),f.cancel(),v.current(),v.current=Bd};F2(t,D),k(),b?.(D,E),F_(r,E);let C=new AbortController;return f.request(()=>{F2(t,E),d(()=>{t.style.setProperty("--popup-width","auto"),t.style.setProperty("--popup-height","auto")},C.signal)}),()=>{S.disconnect(),C.abort(),f.cancel(),v.current(),v.current=Bd}},[o,t,r,d,f,i,n,y,b,w])}function L2(e,t,r){let o=e.style.getPropertyValue(t);return e.style.setProperty(t,r),()=>{e.style.setProperty(t,o)}}function gZ(e,t){let r=[];for(let[o,n]of Object.entries(t))r.push(L2(e,o,n));return r.length?()=>{r.forEach(o=>o())}:Bd}function F2(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 F_(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 Ab=a(T(),1);function wZ(e){let{store:t,side:r,cssVars:o,children:n}=e,i=hb(),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=hZ(c?s:null),g=nNe(l,u),v=bi.useRef(null),[y,b]=bi.useState(null),[w,S]=bi.useState(null),x=bi.useRef(null),_=bi.useRef(null),P=Dm(x,!0,!1),I=Mm(),[A,k]=bi.useState(null),[D,E]=bi.useState(!1);je(()=>(t.set("hasViewport",!0),()=>{t.set("hasViewport",!1)}),[t]);let C=Je(()=>{x.current?.style.setProperty("animation","none"),x.current?.style.setProperty("transition","none"),_.current?.style.setProperty("display","none")}),M=Je(F=>{x.current?.style.removeProperty("animation"),x.current?.style.removeProperty("transition"),_.current?.style.removeProperty("display"),F&&k(F)}),B=bi.useRef(null);je(()=>{if(s&&h&&s!==h&&B.current!==s&&v.current){b(v.current),E(!0);let F=oNe(h,s);S(F),I.request(()=>{bZ.flushSync(()=>{E(!1)}),P(()=>{b(null),k(null),v.current=null})}),B.current=s}},[s,h,y,P,I]),je(()=>{let F=x.current;if(!F)return;let L=kn(F).createElement("div");for(let H of Array.from(F.childNodes))L.appendChild(H.cloneNode(!0));v.current=L});let N=y!=null,z;N?z=(0,Ab.jsxs)(bi.Fragment,{children:[(0,Ab.jsx)("div",{"data-previous":!0,inert:tZ(!0),ref:_,style:{...A?{[o.popupWidth]:`${A.width}px`,[o.popupHeight]:`${A.height}px`}:null,position:"absolute"},"data-ending-style":D?void 0:""},"previous"),(0,Ab.jsx)("div",{"data-current":!0,ref:x,"data-starting-style":D?"":void 0,children:n},g)]}):z=(0,Ab.jsx)("div",{"data-current":!0,ref:x,children:n},g),je(()=>{let F=_.current;!F||!y||F.replaceChildren(...Array.from(y.childNodes))},[y]),vZ({popupElement:f,positionerElement:m,mounted:d,content:u,onMeasureLayout:C,onMeasureLayoutComplete:M,side:r,direction:i});let O={activationDirection:rNe(w),transitioning:N};return{children:z,state:O}}function rNe(e){if(e)return`${yZ(e.horizontal,5,"right","left")} ${yZ(e.vertical,5,"down","up")}`}function yZ(e,t,r,o){return e>t?r:e<-t?o:""}function oNe(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 nNe(e,t){let[r,o]=bi.useState(0),n=bi.useRef(e),i=bi.useRef(t),s=bi.useRef(!1);return je(()=>{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 B2=a(Se(),1),SZ=a(uu(),1);var xZ=a(T(),1),_Z=B2.forwardRef(function(t,r){let{children:o,container:n,className:i,render:s,style:l,...c}=t,{portalNode:u,portalSubtree:d}=cB({container:n,ref:r,componentProps:t,elementProps:c});return!d&&!u?null:(0,xZ.jsxs)(B2.Fragment,{children:[d,u&&SZ.createPortal(o,u)]})});var Us={};Sn(Us,{Arrow:()=>jZ,Handle:()=>L_,Popup:()=>BZ,Portal:()=>MZ,Positioner:()=>FZ,Provider:()=>zZ,Root:()=>PZ,Trigger:()=>IZ,Viewport:()=>WZ,createHandle:()=>GZ});var pu=a(Se(),1);var V2=a(Se(),1),VB=V2.createContext(void 0);function cl(e){let t=V2.useContext(VB);if(t===void 0&&!e)throw new Error(En(72));return t}var CZ=a(Se(),1),TZ=a(uu(),1);var iNe={...ZK,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)},Ib=class e extends Pb{constructor(t){super({...sNe(),...t},{popupRef:CZ.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerElements:new Hm},iNe)}setOpen=(t,r)=>{let o=r.reason,n=o===ut.triggerHover,i=t&&o===ut.triggerFocus,s=!t&&(o===ut.triggerPress||o===ut.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===ut.triggerHover&&(c.instantType=void 0);let u=r.trigger?.id??null;(u||t)&&(c.activeTriggerId=u,c.activeTriggerElement=r.trigger??null),this.update(c)};n?TZ.flushSync(l):l()};static useStore(t,r){let o=Mo(()=>new e(r)).current,n=t??o,i=kB({popupStore:n,onOpenChange:n.setOpen});return n.state.floatingRootContext=i,n}};function sNe(){return{...KK(),disabled:!1,instantType:void 0,isInstantPhase:!1,trackCursorAxis:"none",disableHoverablePopup:!1,openChangeReason:null,closeOnClick:!0,closeDelay:0,hasViewport:!1}}var EZ=a(T(),1),PZ=TB(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=Ib.useStore(d?.store,{open:o,openProp:n,activeTriggerId:m,triggerIdProp:f});Wq(()=>{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"),y=!r&&v,b=g.useState("activeTriggerId"),w=g.useState("payload");g.useSyncedValues({trackCursorAxis:s,disableHoverablePopup:i}),je(()=>{v&&r&&g.setOpen(!1,Kt(ut.disabled))},[v,r,g]),g.useSyncedValue("disabled",r),GK(g);let{forceUnmount:S,transitionStatus:x}=YK(y,g),_=g.select("floatingRootContext"),P=g.useState("isInstantPhase"),I=g.useState("instantType"),A=g.useState("lastOpenChangeReason"),k=pu.useRef(null);je(()=>{x==="ending"&&A===ut.none||x!=="ending"&&P?(I!=="delay"&&(k.current=I),g.set("instantType","delay")):k.current!==null&&(g.set("instantType",k.current),k.current=null)},[x,P,A,I,g]),je(()=>{y&&b==null&&g.set("payload",void 0)},[g,b,y]);let D=pu.useCallback(()=>{g.setOpen(!1,Kt(ut.imperativeAction))},[g]);pu.useImperativeHandle(l,()=>({unmount:S,close:D}),[S,D]);let E=dB(_,{enabled:!r,referencePress:()=>g.select("closeOnClick")}),C=uB(_,{enabled:!r&&s!=="none",axis:s==="none"?void 0:s}),{getReferenceProps:M,getFloatingProps:B,getTriggerProps:N}=MB([E,C]),z=pu.useMemo(()=>M(),[M]),O=pu.useMemo(()=>N(),[N]),F=pu.useMemo(()=>B(),[B]);return g.useSyncedValues({activeTriggerProps:z,inactiveTriggerProps:O,popupProps:F}),(0,EZ.jsx)(VB.Provider,{value:g,children:typeof h=="function"?h({payload:w}):h})});var AZ=a(Se(),1);var j2=a(Se(),1),jB=j2.createContext(void 0);function kZ(){return j2.useContext(jB)}var RZ=(function(e){return e[e.popupOpen=N_.popupOpen]="popupOpen",e.triggerDisabled="data-trigger-disabled",e})({});var IZ=zK(function(t,r){let{className:o,render:n,handle:i,payload:s,disabled:l,delay:c,closeOnClick:u=!0,closeDelay:d,id:f,style:m,...h}=t,g=cl(!0),v=i?.store??g;if(!v)throw new Error(En(82));let y=$k(f),b=v.useState("isTriggerActive",y),w=v.useState("isOpenedByTrigger",y),S=v.useState("floatingRootContext"),x=AZ.useRef(null),_=c??600,P=d??0,{registerTrigger:I,isMountedByThisTrigger:A}=WK(y,x,v,{payload:s,closeOnClick:u,closeDelay:P}),k=kZ(),{delayRef:D,isInstantPhase:E,hasProvider:C}=lB(S,{open:w});v.useSyncedValue("isInstantPhase",E);let M=v.useState("disabled"),B=l??M,N=v.useState("trackCursorAxis"),z=v.useState("disableHoverablePopup"),O=NB(S,{enabled:!B,mouseOnly:!0,move:!1,handleClose:!z&&N!=="both"?DB():null,restMs(){let Q=k?.delay,J=typeof D.current=="object"?D.current.open:void 0,te=_;return C&&(J!==0?te=c??Q??_:te=0),te},delay(){let Q=typeof D.current=="object"?D.current.close:void 0,J=P;return d==null&&C&&(J=Q),{close:J}},triggerElementRef:x,isActiveTrigger:b,isClosing:()=>v.select("transitionStatus")==="ending"}),F=AB(S,{enabled:!B}).reference,L={open:w},H=v.useState("triggerProps",A);return Xo("button",t,{state:L,ref:[r,I,x],props:[O,F,H,{onPointerDown(){v.set("closeOnClick",u)},id:y,[RZ.triggerDisabled]:B?"":void 0},h],stateAttributesMapping:eZ})});var NZ=a(Se(),1);var z2=a(Se(),1),zB=z2.createContext(void 0);function OZ(){let e=z2.useContext(zB);if(e===void 0)throw new Error(En(70));return e}var HB=a(T(),1),MZ=NZ.forwardRef(function(t,r){let{keepMounted:o=!1,...n}=t;return cl().useState("mounted")||o?(0,HB.jsx)(zB.Provider,{value:o,children:(0,HB.jsx)(_Z,{ref:r,...n})}):null});var U2=a(Se(),1);var H2=a(Se(),1),UB=H2.createContext(void 0);function Ob(){let e=H2.useContext(UB);if(e===void 0)throw new Error(En(71));return e}var DZ=a(T(),1),FZ=U2.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:y=Kq,style:b,...w}=t,S=cl(),x=OZ(),_=S.useState("open"),P=S.useState("mounted"),I=S.useState("trackCursorAxis"),A=S.useState("disableHoverablePopup"),k=S.useState("floatingRootContext"),D=S.useState("instantType"),E=S.useState("transitionStatus"),C=S.useState("hasViewport"),M=lZ({anchor:i,positionMethod:s,floatingRootContext:k,mounted:P,side:l,sideOffset:u,align:c,alignOffset:d,collisionBoundary:f,collisionPadding:m,sticky:g,arrowPadding:h,disableAnchorTracking:v,keepMounted:x,collisionAvoidance:y,adaptiveOrigin:C?nZ:void 0}),B=U2.useMemo(()=>({open:_,side:M.side,align:M.align,anchorHidden:M.anchorHidden,instant:I!=="none"?"tracking-cursor":D}),[_,M.side,M.align,M.anchorHidden,I,D]),N=cZ(t,B,{styles:M.positionerStyles,transitionStatus:E,props:w,refs:[r,S.useStateSetter("positionerElement")],hidden:!P,inert:!_||I==="both"||A});return(0,DZ.jsx)(UB.Provider,{value:M,children:N})});var LZ=a(Se(),1);var aNe={...Rb,...vb},BZ=LZ.forwardRef(function(t,r){let{className:o,render:n,style:i,...s}=t,l=cl(),{side:c,align:u}=Ob(),d=l.useState("open"),f=l.useState("instantType"),m=l.useState("transitionStatus"),h=l.useState("popupProps"),g=l.useState("floatingRootContext");xb({open:d,ref:l.context.popupRef,onComplete(){d&&l.context.onOpenChangeComplete?.(!0)}});let v=l.useState("disabled"),y=l.useState("closeDelay");return OB(g,{enabled:!v,closeDelay:y}),Xo("div",t,{state:{open:d,side:c,align:u,instant:f,transitionStatus:m},ref:[r,l.context.popupRef,l.useStateSetter("popupElement")],props:[h,O2(m),s],stateAttributesMapping:aNe})});var VZ=a(Se(),1);var jZ=VZ.forwardRef(function(t,r){let{className:o,render:n,style:i,...s}=t,l=cl(),c=l.useState("open"),u=l.useState("instantType"),{arrowRef:d,side:f,align:m,arrowUncentered:h,arrowStyles:g}=Ob();return Xo("div",t,{state:{open:c,side:f,align:m,uncentered:h,instant:u},ref:[r,d],props:[{style:g,"aria-hidden":!0},s],stateAttributesMapping:Rb})});var WB=a(Se(),1);var GB=a(T(),1),zZ=function(t){let{delay:r,closeDelay:o,timeout:n=400}=t,i=WB.useMemo(()=>({delay:r,closeDelay:o}),[r,o]),s=WB.useMemo(()=>({open:r,close:o}),[r,o]);return(0,GB.jsx)(jB.Provider,{value:i,children:(0,GB.jsx)(aB,{delay:s,timeoutMs:n,children:t.children})})};var UZ=a(Se(),1);var HZ=(function(e){return e.popupWidth="--popup-width",e.popupHeight="--popup-height",e})({});var lNe={activationDirection:e=>e?{"data-activation-direction":e}:null},WZ=UZ.forwardRef(function(t,r){let{render:o,className:n,style:i,children:s,...l}=t,c=cl(),u=Ob(),d=c.useState("instantType"),{children:f,state:m}=wZ({store:c,side:u.side,cssVars:HZ,children:s}),h={activationDirection:m.activationDirection,transitioning:m.transitioning,instant:d};return Xo("div",t,{state:h,ref:r,props:[l,{children:f}],stateAttributesMapping:lNe})});var L_=class{constructor(){this.store=new Ib}open(t){let r=t?this.store.context.triggerElements.getById(t):void 0;if(t&&!r)throw new Error(En(81,t));this.store.setOpen(!0,Kt(ut.imperativeAction,void 0,r))}close(){this.store.setOpen(!1,Kt(ut.imperativeAction,void 0,void 0))}get isOpen(){return this.store.state.open}};function GZ(){return new L_}function wi(e){return Xo(e.defaultTagName??"div",e,e)}var KZ=a(U(),1),YB="data-wp-hash";function qB(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&uNe(document)),e.__wpStyleRuntime}function cNe(e,t){if(!e.head)return!1;for(let r of e.head.querySelectorAll(`style[${YB}]`))if(r.getAttribute(YB)===t)return!0;return!1}function ZZ(e,t,r){if(!e.head)return;let o=qB(),n=o.injectedStyles.get(e);if(n||(n=new Set,o.injectedStyles.set(e,n)),n.has(t))return;if(cNe(e,t)){n.add(t);return}let i=e.createElement("style");i.setAttribute(YB,t),i.appendChild(e.createTextNode(r)),e.head.appendChild(i),n.add(t)}function uNe(e){let t=qB();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[r,o]of t.styles)ZZ(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 XZ(e,t){let r=qB();r.styles.set(e,t);for(let o of r.documents.keys())ZZ(o,e,t)}typeof process>"u",XZ("0c8601dd83",'@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-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 YZ={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",XZ("1fb29d3a3c","._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,#0000);border:var(--_gcd-input-border,none);border-radius:var(--_gcd-input-border-radius,0);box-shadow:var(--_gcd-input-box-shadow,0 0 0 #0000);color:var(--_gcd-input-color,var(--wpds-color-fg-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,#0000);border-color:var(--_gcd-input-border-color-disabled,#0000);box-shadow:var(--_gcd-input-box-shadow-disabled,none);color:var(--_gcd-input-color-disabled,var(--wpds-color-fg-interactive-neutral-disabled,#8d8d8d))}&::placeholder{color:var(--_gcd-input-placeholder-color,var(--wpds-color-fg-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 #0000)}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-fg-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 #0000);transition:var(--_gcd-a-transition,none)}");var qZ={button:"_6defc79820e382c6__button",input:"d2cff2e5dea83bd1__input",textarea:"_547d86373d02e108__textarea",div:"_8c15fd0ed9f28ba4__div",p:"_43cec3e1eec1066d__p",heading:"e97669c6d9a38497__heading",a:"_2c0831b0499dbd6e__a"},B_=(0,KZ.forwardRef)(function({variant:t="body-md",render:r,className:o,...n},i){return wi({render:r,defaultTagName:"span",ref:i,props:Do(n,{className:Z(YZ.text,qZ.heading,qZ.p,YZ[t],o)})})});var eX=a(T(),1),KB="data-wp-hash";function ZB(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&fNe(document)),e.__wpStyleRuntime}function dNe(e,t){if(!e.head)return!1;for(let r of e.head.querySelectorAll(`style[${KB}]`))if(r.getAttribute(KB)===t)return!0;return!1}function $Z(e,t,r){if(!e.head)return;let o=ZB(),n=o.injectedStyles.get(e);if(n||(n=new Set,o.injectedStyles.set(e,n)),n.has(t))return;if(dNe(e,t)){n.add(t);return}let i=e.createElement("style");i.setAttribute(KB,t),i.appendChild(e.createTextNode(r)),e.head.appendChild(i),n.add(t)}function fNe(e){let t=ZB();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[r,o]of t.styles)$Z(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 mNe(e,t){let r=ZB();r.styles.set(e,t);for(let o of r.documents.keys())$Z(o,e,t)}typeof process>"u",mNe("d6a685e1aa","@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-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-bg-surface-error,#f6e6e3);color:var(--wpds-color-fg-content-error,#470000)}.c20ebef2365bc8b7__is-medium-intent{background-color:var(--wpds-color-bg-surface-warning,#fde6be);color:var(--wpds-color-fg-content-warning,#2e1900)}._365e1626c6202e52__is-low-intent{background-color:var(--wpds-color-bg-surface-caution,#fee995);color:var(--wpds-color-fg-content-caution,#281d00)}._33f8198127ddf4ef__is-stable-intent{background-color:var(--wpds-color-bg-surface-success,#c6f7cd);color:var(--wpds-color-fg-content-success,#002900)}._04c1aca8fc449412__is-informational-intent{background-color:var(--wpds-color-bg-surface-info,#deebfa);color:var(--wpds-color-fg-content-info,#001b4f)}._90726e69d495ec19__is-draft-intent{background-color:var(--wpds-color-bg-surface-neutral-weak,#f4f4f4);color:var(--wpds-color-fg-content-neutral,#1e1e1e)}._898f4a544993bd39__is-none-intent{background-color:var(--wpds-color-bg-surface-neutral-strong,#fff);border:var(--wpds-border-width-xs,1px) solid var(--wpds-color-stroke-surface-neutral,#dbdbdb);color:var(--wpds-color-fg-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 QZ={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"},XB=(0,JZ.forwardRef)(function({intent:t="none",className:r,...o},n){return(0,eX.jsx)(B_,{ref:n,className:Z(QZ.badge,QZ[`is-${t}-intent`],r),...o,variant:"body-sm"})});var tX=a(U(),1),rX=a(we(),1),oX=a(T(),1),QB=(0,tX.forwardRef)(function({icon:t,size:r=24,...o},n){return(0,oX.jsx)(rX.SVG,{ref:n,fill:"currentColor",...t.props,...o,width:r,height:r})});var hu={};Sn(hu,{Content:()=>Y2,FullBleed:()=>mX,Header:()=>G2,Root:()=>W2,Title:()=>hX});var nX=a(U(),1),JB="data-wp-hash";function $B(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&hNe(document)),e.__wpStyleRuntime}function pNe(e,t){if(!e.head)return!1;for(let r of e.head.querySelectorAll(`style[${JB}]`))if(r.getAttribute(JB)===t)return!0;return!1}function iX(e,t,r){if(!e.head)return;let o=$B(),n=o.injectedStyles.get(e);if(n||(n=new Set,o.injectedStyles.set(e,n)),n.has(t))return;if(pNe(e,t)){n.add(t);return}let i=e.createElement("style");i.setAttribute(JB,t),i.appendChild(e.createTextNode(r)),e.head.appendChild(i),n.add(t)}function hNe(e){let t=$B();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[r,o]of t.styles)iX(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 sX(e,t){let r=$B();r.styles.set(e,t);for(let o of r.documents.keys())iX(o,e,t)}typeof process>"u",sX("e3ae230cea","@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-utilities{._336cd3e4e743482f__box-sizing{box-sizing:border-box;*,:after,:before{box-sizing:inherit}}}");var gNe={"box-sizing":"_336cd3e4e743482f__box-sizing"};typeof process>"u",sX("7bb6e0116a","@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-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-bg-surface-neutral-strong,#fff);border:1px solid var(--wpds-color-stroke-surface-neutral-weak,#e4e4e4);border-radius:var(--wpds-border-radius-lg,8px);color:var(--wpds-color-fg-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 vNe={root:"_02872bf298eadc43__root",header:"bbccc92e6ba5662d__header",content:"_5dffdaf2a6e669ac__content",fullbleed:"c1fa192587e1b4a6__fullbleed"},W2=(0,nX.forwardRef)(function({render:t,...r},o){let n=Z(vNe.root,gNe["box-sizing"]);return wi({defaultTagName:"div",render:t,ref:o,props:Do({className:n},r)})});var aX=a(U(),1),eV="data-wp-hash";function tV(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&bNe(document)),e.__wpStyleRuntime}function yNe(e,t){if(!e.head)return!1;for(let r of e.head.querySelectorAll(`style[${eV}]`))if(r.getAttribute(eV)===t)return!0;return!1}function lX(e,t,r){if(!e.head)return;let o=tV(),n=o.injectedStyles.get(e);if(n||(n=new Set,o.injectedStyles.set(e,n)),n.has(t))return;if(yNe(e,t)){n.add(t);return}let i=e.createElement("style");i.setAttribute(eV,t),i.appendChild(e.createTextNode(r)),e.head.appendChild(i),n.add(t)}function bNe(e){let t=tV();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[r,o]of t.styles)lX(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 wNe(e,t){let r=tV();r.styles.set(e,t);for(let o of r.documents.keys())lX(o,e,t)}typeof process>"u",wNe("7bb6e0116a","@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-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-bg-surface-neutral-strong,#fff);border:1px solid var(--wpds-color-stroke-surface-neutral-weak,#e4e4e4);border-radius:var(--wpds-border-radius-lg,8px);color:var(--wpds-color-fg-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 SNe={root:"_02872bf298eadc43__root",header:"bbccc92e6ba5662d__header",content:"_5dffdaf2a6e669ac__content",fullbleed:"c1fa192587e1b4a6__fullbleed"},G2=(0,aX.forwardRef)(function({render:t,...r},o){return wi({defaultTagName:"div",render:t,ref:o,props:Do({className:SNe.header},r)})});var cX=a(U(),1),rV="data-wp-hash";function oV(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&_Ne(document)),e.__wpStyleRuntime}function xNe(e,t){if(!e.head)return!1;for(let r of e.head.querySelectorAll(`style[${rV}]`))if(r.getAttribute(rV)===t)return!0;return!1}function uX(e,t,r){if(!e.head)return;let o=oV(),n=o.injectedStyles.get(e);if(n||(n=new Set,o.injectedStyles.set(e,n)),n.has(t))return;if(xNe(e,t)){n.add(t);return}let i=e.createElement("style");i.setAttribute(rV,t),i.appendChild(e.createTextNode(r)),e.head.appendChild(i),n.add(t)}function _Ne(e){let t=oV();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[r,o]of t.styles)uX(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 CNe(e,t){let r=oV();r.styles.set(e,t);for(let o of r.documents.keys())uX(o,e,t)}typeof process>"u",CNe("7bb6e0116a","@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-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-bg-surface-neutral-strong,#fff);border:1px solid var(--wpds-color-stroke-surface-neutral-weak,#e4e4e4);border-radius:var(--wpds-border-radius-lg,8px);color:var(--wpds-color-fg-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 TNe={root:"_02872bf298eadc43__root",header:"bbccc92e6ba5662d__header",content:"_5dffdaf2a6e669ac__content",fullbleed:"c1fa192587e1b4a6__fullbleed"},Y2=(0,cX.forwardRef)(function({render:t,...r},o){return wi({defaultTagName:"div",render:t,ref:o,props:Do({className:TNe.content},r)})});var dX=a(U(),1),nV="data-wp-hash";function iV(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&PNe(document)),e.__wpStyleRuntime}function ENe(e,t){if(!e.head)return!1;for(let r of e.head.querySelectorAll(`style[${nV}]`))if(r.getAttribute(nV)===t)return!0;return!1}function fX(e,t,r){if(!e.head)return;let o=iV(),n=o.injectedStyles.get(e);if(n||(n=new Set,o.injectedStyles.set(e,n)),n.has(t))return;if(ENe(e,t)){n.add(t);return}let i=e.createElement("style");i.setAttribute(nV,t),i.appendChild(e.createTextNode(r)),e.head.appendChild(i),n.add(t)}function PNe(e){let t=iV();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[r,o]of t.styles)fX(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 kNe(e,t){let r=iV();r.styles.set(e,t);for(let o of r.documents.keys())fX(o,e,t)}typeof process>"u",kNe("7bb6e0116a","@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-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-bg-surface-neutral-strong,#fff);border:1px solid var(--wpds-color-stroke-surface-neutral-weak,#e4e4e4);border-radius:var(--wpds-border-radius-lg,8px);color:var(--wpds-color-fg-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 RNe={root:"_02872bf298eadc43__root",header:"bbccc92e6ba5662d__header",content:"_5dffdaf2a6e669ac__content",fullbleed:"c1fa192587e1b4a6__fullbleed"},mX=(0,dX.forwardRef)(function({render:t,...r},o){return wi({defaultTagName:"div",render:t,ref:o,props:Do({className:RNe.fullbleed},r)})});var pX=a(U(),1);var sV=a(T(),1),ANe=(0,sV.jsx)("div",{}),hX=(0,pX.forwardRef)(function({render:t=ANe,children:r,...o},n){return(0,sV.jsx)(B_,{ref:n,variant:"heading-lg",render:t,...o,children:r})});var gX=a(U(),1),vX=a(T(),1),aV=(0,gX.forwardRef)(function(t,r){return(0,vX.jsx)(Wm.Panel,{ref:r,...t})});var yX=a(U(),1),bX=a(T(),1),lV=(0,yX.forwardRef)(function(t,r){return(0,bX.jsx)(Wm.Root,{ref:r,...t})});var wX=a(U(),1),SX=a(T(),1),cV=(0,wX.forwardRef)(function(t,r){return(0,SX.jsx)(Wm.Trigger,{ref:r,...t})});var Rg={};Sn(Rg,{Content:()=>OX,Header:()=>PX,HeaderDescription:()=>RX,Root:()=>_X});var xX=a(U(),1);var dV=a(T(),1),_X=(0,xX.forwardRef)(function({render:t,...r},o){return(0,dV.jsx)(lV,{ref:o,render:(0,dV.jsx)(W2,{render:t}),...r})});var Mb=a(U(),1);var CX=a(U(),1),q2=(0,CX.createContext)({setDescriptionId:()=>{}});var jd=a(T(),1),fV="data-wp-hash";function mV(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&ONe(document)),e.__wpStyleRuntime}function INe(e,t){if(!e.head)return!1;for(let r of e.head.querySelectorAll(`style[${fV}]`))if(r.getAttribute(fV)===t)return!0;return!1}function EX(e,t,r){if(!e.head)return;let o=mV(),n=o.injectedStyles.get(e);if(n||(n=new Set,o.injectedStyles.set(e,n)),n.has(t))return;if(INe(e,t)){n.add(t);return}let i=e.createElement("style");i.setAttribute(fV,t),i.appendChild(e.createTextNode(r)),e.head.appendChild(i),n.add(t)}function ONe(e){let t=mV();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[r,o]of t.styles)EX(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 pV(e,t){let r=mV();r.styles.set(e,t);for(let o of r.documents.keys())EX(o,e,t)}typeof process>"u",pV("f1b9bb6252","@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-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-fg-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 wp-ui-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 Nb={"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",pV("1fb29d3a3c","._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,#0000);border:var(--_gcd-input-border,none);border-radius:var(--_gcd-input-border-radius,0);box-shadow:var(--_gcd-input-box-shadow,0 0 0 #0000);color:var(--_gcd-input-color,var(--wpds-color-fg-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,#0000);border-color:var(--_gcd-input-border-color-disabled,#0000);box-shadow:var(--_gcd-input-box-shadow-disabled,none);color:var(--_gcd-input-color-disabled,var(--wpds-color-fg-interactive-neutral-disabled,#8d8d8d))}&::placeholder{color:var(--_gcd-input-placeholder-color,var(--wpds-color-fg-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 #0000)}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-fg-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 #0000);transition:var(--_gcd-a-transition,none)}");var TX={button:"_6defc79820e382c6__button",input:"d2cff2e5dea83bd1__input",textarea:"_547d86373d02e108__textarea",div:"_8c15fd0ed9f28ba4__div",p:"_43cec3e1eec1066d__p",heading:"e97669c6d9a38497__heading",a:"_2c0831b0499dbd6e__a"};typeof process>"u",pV("2a5ab8f3a7","@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-utilities{._08e8a2e44959f892__outset-ring--focus,._970d04df7376df67__outset-ring--focus-within-except-active,.c5cb3ee4bddaa8e4__outset-ring--focus-within-visible,.cd83dfc2126a0846__outset-ring--focus-within,.d0541bc9dd9dc7b6__outset-ring--focus-visible,.e25b2bdd7aa21721__outset-ring--focus-except-active,.ecadb9e080e2dfa5__outset-ring--focus-parent-visible{@media not (prefers-reduced-motion){--_gcd-a-transition:outline 0.1s ease-out;transition:outline .1s ease-out}outline:0 solid #0000;outline-offset:1px}._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-brand,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-brand,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-brand,var(--wp-admin-theme-color,#3858e9))}}");var NNe={"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"},PX=(0,Mb.forwardRef)(function({children:t,className:r,render:o,...n},i){let[s,l]=(0,Mb.useState)(),c=(0,Mb.useMemo)(()=>({setDescriptionId:l}),[l]);return wi({defaultTagName:"div",render:o,ref:i,props:Do(n,{className:Z(TX.heading,Nb["heading-wrapper"],r),children:(0,jd.jsx)(q2.Provider,{value:c,children:(0,jd.jsxs)(cV,{className:Nb.header,render:(0,jd.jsx)(G2,{}),nativeButton:!1,"aria-describedby":s,children:[(0,jd.jsx)("div",{className:Nb["header-content"],children:t}),(0,jd.jsx)("div",{className:Z(Nb["header-trigger-positioner"]),children:(0,jd.jsx)("div",{className:Z(Nb["header-trigger-wrapper"],TX.div,NNe["outset-ring--focus-parent-visible"]),children:(0,jd.jsx)(QB,{icon:Nx,className:Nb["header-trigger"]})})})]})})})})});var Gm=a(U(),1);var kX=a(T(),1),RX=(0,Gm.forwardRef)(function({children:t,className:r,...o},n){let i=(0,Gm.useId)(),{setDescriptionId:s}=(0,Gm.useContext)(q2);return(0,Gm.useEffect)(()=>(s(i),()=>s(void 0)),[i,s]),(0,kX.jsx)("div",{ref:n,id:i,"aria-hidden":"true",className:r,...o,children:t})});var AX=a(U(),1);var vV=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"&&DNe(document)),e.__wpStyleRuntime}function MNe(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 IX(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(MNe(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 DNe(e){let t=yV();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[r,o]of t.styles)IX(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 FNe(e,t){let r=yV();r.styles.set(e,t);for(let o of r.documents.keys())IX(o,e,t)}typeof process>"u",FNe("f1b9bb6252","@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-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-fg-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 wp-ui-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 hV={"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"},OX=(0,AX.forwardRef)(function({className:t,render:r,children:o,hiddenUntilFound:n=!0,...i},s){return(0,vV.jsx)(aV,{ref:s,className:l=>Z(hV.content,l.open&&l.transitionStatus==="idle"&&hV.overflowVisible,t),hiddenUntilFound:n,...i,children:(0,vV.jsx)(Y2,{className:hV["content-inner"],render:r,children:o})})});var DX=a(U(),1);function bV(e,t,r){return(0,DX.cloneElement)(e??t,{children:r})}var FX=a(Pm(),1),{lock:pgt,unlock:LX}=(0,FX.__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");var BX=a(U(),1),wV="data-wp-hash";function SV(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&BNe(document)),e.__wpStyleRuntime}function LNe(e,t){if(!e.head)return!1;for(let r of e.head.querySelectorAll(`style[${wV}]`))if(r.getAttribute(wV)===t)return!0;return!1}function VX(e,t,r){if(!e.head)return;let o=SV(),n=o.injectedStyles.get(e);if(n||(n=new Set,o.injectedStyles.set(e,n)),n.has(t))return;if(LNe(e,t)){n.add(t);return}let i=e.createElement("style");i.setAttribute(wV,t),i.appendChild(e.createTextNode(r)),e.head.appendChild(i),n.add(t)}function BNe(e){let t=SV();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[r,o]of t.styles)VX(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 VNe(e,t){let r=SV();r.styles.set(e,t);for(let o of r.documents.keys())VX(o,e,t)}typeof process>"u",VNe("b51ff41489","@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-components{._19ce0419607e1896__stack{display:flex}}");var jNe={stack:"_19ce0419607e1896__stack"},zNe={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)"},le=(0,BX.forwardRef)(function({direction:t,gap:r,align:o,justify:n,wrap:i,render:s,...l},c){let u={gap:r&&zNe[r],alignItems:o,justifyContent:n,flexDirection:t,flexWrap:i};return wi({render:s,ref:c,props:Do(l,{style:u,className:jNe.stack})})});var ht={};Sn(ht,{Popup:()=>$X,Portal:()=>K2,Positioner:()=>Z2,Provider:()=>sQ,Root:()=>nQ,Trigger:()=>rQ});var XX=a(U(),1),QX=a(MX(),1);var WX=a(U(),1);var xV="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"&&UNe(document)),e.__wpStyleRuntime}function HNe(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 zX(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(HNe(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 UNe(e){let t=_V();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[r,o]of t.styles)zX(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 WNe(e,t){let r=_V();r.styles.set(e,t);for(let o of r.documents.keys())zX(o,e,t)}typeof process>"u",WNe("45eb1fe20f","@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;._11fc52b637ff8a7e__slot{inset:0;isolation:isolate;pointer-events:none;position:fixed;z-index:1000000003}@layer wp-ui-utilities{._11fc52b637ff8a7e__slot>*{pointer-events:auto}}");var jX={slot:"_11fc52b637ff8a7e__slot"},HX="data-wp-compat-overlay-slot";function GNe(){return typeof document>"u"?null:document}function YNe(){let e;try{e=window.top?.wp}catch{}let t=e??window.wp;return typeof t?.components=="object"&&t.components!==null}var zd=null;function qNe(e){let t=e.createElement("div");return t.setAttribute(HX,""),jX.slot&&t.classList.add(jX.slot),e.body.appendChild(t),t}function UX(){if(typeof window>"u"||!YNe()&&window.__wpUiCompatOverlaySlotEnabled!==!0)return;let e=GNe();if(!e||!e.body)return;if(zd&&zd.ownerDocument===e&&zd.isConnected)return zd;let t=e.querySelector(`[${HX}]`);return t instanceof HTMLDivElement?(zd=t,t):(zd?.isConnected&&zd.remove(),zd=qNe(e),zd)}var GX=a(T(),1),K2=(0,WX.forwardRef)(function({container:t,...r},o){return(0,GX.jsx)(Us.Portal,{container:t??UX(),...r,ref:o})});var YX=a(U(),1),ZX=a(T(),1),CV="data-wp-hash";function TV(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&ZNe(document)),e.__wpStyleRuntime}function KNe(e,t){if(!e.head)return!1;for(let r of e.head.querySelectorAll(`style[${CV}]`))if(r.getAttribute(CV)===t)return!0;return!1}function qX(e,t,r){if(!e.head)return;let o=TV(),n=o.injectedStyles.get(e);if(n||(n=new Set,o.injectedStyles.set(e,n)),n.has(t))return;if(KNe(e,t)){n.add(t);return}let i=e.createElement("style");i.setAttribute(CV,t),i.appendChild(e.createTextNode(r)),e.head.appendChild(i),n.add(t)}function ZNe(e){let t=TV();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[r,o]of t.styles)qX(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 KX(e,t){let r=TV();r.styles.set(e,t);for(let o of r.documents.keys())qX(o,e,t)}typeof process>"u",KX("e3ae230cea","@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-utilities{._336cd3e4e743482f__box-sizing{box-sizing:border-box;*,:after,:before{box-sizing:inherit}}}");var XNe={"box-sizing":"_336cd3e4e743482f__box-sizing"};typeof process>"u",KX("8293efbb49",'@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-components{._480b748dd3510e64__positioner{z-index:var(--wp-ui-tooltip-z-index,initial)}._50096b232db7709d__popup{background-color:var(--wpds-color-bg-surface-neutral-strong,#fff);border-radius:var(--wpds-border-radius-sm,2px);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-fg-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 QNe={positioner:"_480b748dd3510e64__positioner",popup:"_50096b232db7709d__popup"},Z2=(0,YX.forwardRef)(function({align:t="center",className:r,side:o="top",sideOffset:n=4,...i},s){return(0,ZX.jsx)(Us.Positioner,{ref:s,align:t,side:o,sideOffset:n,...i,className:Z(XNe["box-sizing"],QNe.positioner,r)})});var V_=a(T(),1),EV="data-wp-hash";function PV(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&$Ne(document)),e.__wpStyleRuntime}function JNe(e,t){if(!e.head)return!1;for(let r of e.head.querySelectorAll(`style[${EV}]`))if(r.getAttribute(EV)===t)return!0;return!1}function JX(e,t,r){if(!e.head)return;let o=PV(),n=o.injectedStyles.get(e);if(n||(n=new Set,o.injectedStyles.set(e,n)),n.has(t))return;if(JNe(e,t)){n.add(t);return}let i=e.createElement("style");i.setAttribute(EV,t),i.appendChild(e.createTextNode(r)),e.head.appendChild(i),n.add(t)}function $Ne(e){let t=PV();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[r,o]of t.styles)JX(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 eMe(e,t){let r=PV();r.styles.set(e,t);for(let o of r.documents.keys())JX(o,e,t)}typeof process>"u",eMe("8293efbb49",'@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-components{._480b748dd3510e64__positioner{z-index:var(--wp-ui-tooltip-z-index,initial)}._50096b232db7709d__popup{background-color:var(--wpds-color-bg-surface-neutral-strong,#fff);border-radius:var(--wpds-border-radius-sm,2px);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-fg-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 tMe={positioner:"_480b748dd3510e64__positioner",popup:"_50096b232db7709d__popup"},rMe=LX(QX.privateApis).ThemeProvider,$X=(0,XX.forwardRef)(function({portal:t,positioner:r,children:o,className:n,...i},s){let l=(0,V_.jsx)(rMe,{color:{bg:"#1e1e1e"},children:(0,V_.jsx)(Us.Popup,{ref:s,className:Z(tMe.popup,n),...i,children:o})}),c=bV(r,(0,V_.jsx)(Z2,{}),l);return bV(t,(0,V_.jsx)(K2,{}),c)});var eQ=a(U(),1),tQ=a(T(),1),rQ=(0,eQ.forwardRef)(function(t,r){return(0,tQ.jsx)(Us.Trigger,{ref:r,...t})});var oQ=a(T(),1);function nQ(e){return(0,oQ.jsx)(Us.Root,{...e})}var iQ=a(T(),1);function sQ({...e}){return(0,iQ.jsx)(Us.Provider,{...e})}var aQ=a(U(),1),kV="data-wp-hash";function RV(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&nMe(document)),e.__wpStyleRuntime}function oMe(e,t){if(!e.head)return!1;for(let r of e.head.querySelectorAll(`style[${kV}]`))if(r.getAttribute(kV)===t)return!0;return!1}function lQ(e,t,r){if(!e.head)return;let o=RV(),n=o.injectedStyles.get(e);if(n||(n=new Set,o.injectedStyles.set(e,n)),n.has(t))return;if(oMe(e,t)){n.add(t);return}let i=e.createElement("style");i.setAttribute(kV,t),i.appendChild(e.createTextNode(r)),e.head.appendChild(i),n.add(t)}function nMe(e){let t=RV();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[r,o]of t.styles)lQ(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 iMe(e,t){let r=RV();r.styles.set(e,t);for(let o of r.documents.keys())lQ(o,e,t)}typeof process>"u",iMe("c46e8cb841","@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-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 sMe={"visually-hidden":"f37b9e2e191ebd66__visually-hidden"},tr=(0,aQ.forwardRef)(function({render:t,...r},o){return wi({render:t,ref:o,props:Do({className:sMe["visually-hidden"]},r,{"data-visually-hidden":""})})});var Gb=a(Im(),1),cJ=a(xt(),1);var IV=z_(),nt=e=>j_(e,IV),OV=z_();nt.write=e=>j_(e,OV);var X2=z_();nt.onStart=e=>j_(e,X2);var NV=z_();nt.onFrame=e=>j_(e,NV);var MV=z_();nt.onFinish=e=>j_(e,MV);var Db=[];nt.setTimeout=(e,t)=>{let r=nt.now()+t,o=()=>{let i=Db.findIndex(s=>s.cancel==o);~i&&Db.splice(i,1),qm-=~i?1:0},n={time:r,handler:e,cancel:o};return Db.splice(cQ(r),0,n),qm+=1,uQ(),n};var cQ=e=>~(~Db.findIndex(t=>t.time>e)||~Db.length);nt.cancel=e=>{X2.delete(e),NV.delete(e),MV.delete(e),IV.delete(e),OV.delete(e)};nt.sync=e=>{AV=!0,nt.batchedUpdates(e),AV=!1};nt.throttle=e=>{let t;function r(){try{e(...t)}finally{t=null}}function o(...n){t=n,nt.onStart(r)}return o.handler=e,o.cancel=()=>{X2.delete(r),t=null},o};var DV=typeof window<"u"?window.requestAnimationFrame:()=>{};nt.use=e=>DV=e;nt.now=typeof performance<"u"?()=>performance.now():Date.now;nt.batchedUpdates=e=>e();nt.catch=console.error;nt.frameLoop="always";nt.advance=()=>{nt.frameLoop!=="demand"?console.warn("Cannot call the manual advancement of rafz whilst frameLoop is not set as demand"):fQ()};var Ym=-1,qm=0,AV=!1;function j_(e,t){AV?(t.delete(e),e(0)):(t.add(e),uQ())}function uQ(){Ym<0&&(Ym=0,nt.frameLoop!=="demand"&&DV(dQ))}function aMe(){Ym=-1}function dQ(){~Ym&&(DV(dQ),nt.batchedUpdates(fQ))}function fQ(){let e=Ym;Ym=nt.now();let t=cQ(Ym);if(t&&(mQ(Db.splice(0,t),r=>r.handler()),qm-=t),!qm){aMe();return}X2.flush(),IV.flush(e?Math.min(64,Ym-e):16.667),NV.flush(),OV.flush(),MV.flush()}function z_(){let e=new Set,t=e;return{add(r){qm+=t==e&&!e.has(r)?1:0,e.add(r)},delete(r){return qm-=t==e&&e.has(r)?1:0,e.delete(r)},flush(r){t.size&&(e=new Set,qm-=t.size,mQ(t,o=>o(r)&&e.add(o)),qm+=e.size,t=e)}}}function mQ(e,t){e.forEach(r=>{try{t(r)}catch(o){nt.catch(o)}})}var dl=a(Se());function tR(){}var bQ=(e,t,r)=>Object.defineProperty(e,t,{value:r,writable:!0,configurable:!0}),Ee={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 gu(e,t){if(Ee.arr(e)){if(!Ee.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 Pr=(e,t)=>e.forEach(t);function fl(e,t,r){if(Ee.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 Ws=e=>Ee.und(e)?[]:Ee.arr(e)?e:[e];function Vb(e,t){if(e.size){let r=Array.from(e);e.clear(),Pr(r,t)}}var jb=(e,...t)=>Vb(e,r=>r(...t)),zV=()=>typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),HV,wQ,Km=null,SQ=!1,UV=tR,lMe=e=>{e.to&&(wQ=e.to),e.now&&(nt.now=e.now),e.colors!==void 0&&(Km=e.colors),e.skipAnimation!=null&&(SQ=e.skipAnimation),e.createStringInterpolator&&(HV=e.createStringInterpolator),e.requestAnimationFrame&&nt.use(e.requestAnimationFrame),e.batchedUpdates&&(nt.batchedUpdates=e.batchedUpdates),e.willAdvance&&(UV=e.willAdvance),e.frameLoop&&(nt.frameLoop=e.frameLoop)},Na=Object.freeze({__proto__:null,get createStringInterpolator(){return HV},get to(){return wQ},get colors(){return Km},get skipAnimation(){return SQ},get willAdvance(){return UV},assign:lMe}),H_=new Set,ul=[],FV=[],$2=0,zb={get idle(){return!H_.size&&!ul.length},start(e){$2>e.priority?(H_.add(e),nt.onStart(cMe)):(xQ(e),nt(VV))},advance:VV,sort(e){if($2)nt.onFrame(()=>zb.sort(e));else{let t=ul.indexOf(e);~t&&(ul.splice(t,1),_Q(e))}},clear(){ul=[],H_.clear()}};function cMe(){H_.forEach(xQ),H_.clear(),nt(VV)}function xQ(e){ul.includes(e)||_Q(e)}function _Q(e){ul.splice(uMe(ul,t=>t.priority>e.priority),0,e)}function VV(e){let t=FV;for(let r=0;r<ul.length;r++){let o=ul[r];$2=o.priority,o.idle||(UV(o),o.advance(e),o.idle||t.push(o))}return $2=0,FV=ul,FV.length=0,ul=t,ul.length>0}function uMe(e,t){let r=e.findIndex(t);return r<0?e.length:r}var CQ={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},hc="[-+]?\\d*\\.?\\d+",eR=hc+"%";function rR(...e){return"\\(\\s*("+e.join(")\\s*,\\s*(")+")\\s*\\)"}var dMe=new RegExp("rgb"+rR(hc,hc,hc)),fMe=new RegExp("rgba"+rR(hc,hc,hc,hc)),mMe=new RegExp("hsl"+rR(hc,eR,eR)),pMe=new RegExp("hsla"+rR(hc,eR,eR,hc)),hMe=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,gMe=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,vMe=/^#([0-9a-fA-F]{6})$/,yMe=/^#([0-9a-fA-F]{8})$/;function bMe(e){let t;return typeof e=="number"?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=vMe.exec(e))?parseInt(t[1]+"ff",16)>>>0:Km&&Km[e]!==void 0?Km[e]:(t=dMe.exec(e))?(Fb(t[1])<<24|Fb(t[2])<<16|Fb(t[3])<<8|255)>>>0:(t=fMe.exec(e))?(Fb(t[1])<<24|Fb(t[2])<<16|Fb(t[3])<<8|gQ(t[4]))>>>0:(t=hMe.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+"ff",16)>>>0:(t=yMe.exec(e))?parseInt(t[1],16)>>>0:(t=gMe.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=mMe.exec(e))?(pQ(hQ(t[1]),Q2(t[2]),Q2(t[3]))|255)>>>0:(t=pMe.exec(e))?(pQ(hQ(t[1]),Q2(t[2]),Q2(t[3]))|gQ(t[4]))>>>0:null}function LV(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 pQ(e,t,r){let o=r<.5?r*(1+t):r+t-r*t,n=2*r-o,i=LV(n,o,e+1/3),s=LV(n,o,e),l=LV(n,o,e-1/3);return Math.round(i*255)<<24|Math.round(s*255)<<16|Math.round(l*255)<<8}function Fb(e){let t=parseInt(e,10);return t<0?0:t>255?255:t}function hQ(e){return(parseFloat(e)%360+360)%360/360}function gQ(e){let t=parseFloat(e);return t<0?0:t>1?255:Math.round(t*255)}function Q2(e){let t=parseFloat(e);return t<0?0:t>100?1:t/100}function vQ(e){let t=bMe(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 Zm=(e,t,r)=>{if(Ee.fun(e))return e;if(Ee.arr(e))return Zm({range:e,output:t,extrapolate:r});if(Ee.str(e.output[0]))return HV(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=SMe(u,i);return wMe(u,i[d],i[d+1],n[d],n[d+1],c,s,l,o.map)}};function wMe(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 SMe(e,t){for(var r=1;r<t.length-1&&!(t[r]>=e);++r);return r-1}function jV(){return jV=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},jV.apply(this,arguments)}var Lb=Symbol.for("FluidValue.get"),Ag=Symbol.for("FluidValue.observers"),is=e=>!!(e&&e[Lb]),ei=e=>e&&e[Lb]?e[Lb]():e,WV=e=>e[Ag]||null;function xMe(e,t){e.eventObserved?e.eventObserved(t):e(t)}function Ig(e,t){let r=e[Ag];r&&r.forEach(o=>{xMe(o,t)})}var Bb=class{constructor(t){if(this[Lb]=void 0,this[Ag]=void 0,!t&&!(t=this.get))throw Error("Unknown getter");_Me(this,t)}},_Me=(e,t)=>TQ(e,Lb,t);function Xm(e,t){if(e[Lb]){let r=e[Ag];r||TQ(e,Ag,r=new Set),r.has(t)||(r.add(t),e.observerAdded&&e.observerAdded(r.size,t))}return t}function Qm(e,t){let r=e[Ag];if(r&&r.has(t)){let o=r.size-1;o?r.delete(t):e[Ag]=null,e.observerRemoved&&e.observerRemoved(o,t)}}var TQ=(e,t,r)=>Object.defineProperty(e,t,{value:r,writable:!0,configurable:!0}),J2=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,CMe=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,yQ=new RegExp(`(${J2.source})(%|[a-z]+)`,"i"),TMe=/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,oR=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/,EQ=e=>{let[t,r]=EMe(e);if(!t||zV())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&&oR.test(r))return EQ(r);if(r)return r}return e},EMe=e=>{let t=oR.exec(e);if(!t)return[,];let[,r,o]=t;return[r,o]},BV,PMe=(e,t,r,o,n)=>`rgba(${Math.round(t)}, ${Math.round(r)}, ${Math.round(o)}, ${n})`,nR=e=>{BV||(BV=Km?new RegExp(`(${Object.keys(Km).join("|")})(?!\\w)`,"g"):/^\b$/);let t=e.output.map(i=>ei(i).replace(oR,EQ).replace(CMe,vQ).replace(BV,vQ)),r=t.map(i=>i.match(J2).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=>Zm(jV({},e,{output:i})));return i=>{var s;let l=!yQ.test(t[0])&&((s=t.find(u=>yQ.test(u)))==null?void 0:s.replace(J2,"")),c=0;return t[0].replace(J2,()=>`${n[c++](i)}${l||""}`).replace(TMe,PMe)}},PQ="react-spring: ",kQ=e=>{let t=e,r=!1;if(typeof t!="function")throw new TypeError(`${PQ}once requires a function parameter`);return(...o)=>{r||(t(...o),r=!0)}},kMe=kQ(console.warn);function RQ(){kMe(`${PQ}The "interpolate" function is deprecated in v9 (use "to" instead)`)}var lvt=kQ(console.warn);function Hb(e){return Ee.str(e)&&(e[0]=="#"||/\d/.test(e)||!zV()&&oR.test(e)||e in(Km||{}))}var U_=zV()?dl.useEffect:dl.useLayoutEffect,RMe=()=>{let e=(0,dl.useRef)(!1);return U_(()=>(e.current=!0,()=>{e.current=!1}),[]),e};function GV(){let e=(0,dl.useState)()[1],t=RMe();return()=>{t.current&&e(Math.random())}}function AQ(e,t){let[r]=(0,dl.useState)(()=>({inputs:t,result:e()})),o=(0,dl.useRef)(),n=o.current,i=n;return i?t&&i.inputs&&AMe(t,i.inputs)||(i={inputs:t,result:e()}):i=r,(0,dl.useEffect)(()=>{o.current=i,n==r&&(r.inputs=r.result=void 0)},[i]),i.result}function AMe(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 YV=e=>(0,dl.useEffect)(e,IMe),IMe=[];var $_=a(Se()),e1=a(Se());var MQ=a(Se()),Hd=a(Se()),W_=Symbol.for("Animated:node"),OMe=e=>!!e&&e[W_]===e,gc=e=>e&&e[W_],lR=(e,t)=>bQ(e,W_,t),G_=e=>e&&e[W_]&&e[W_].getPayload(),iR=class{constructor(){this.payload=void 0,lR(this,this)}getPayload(){return this.payload||[]}},Og=class e extends iR{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,Ee.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 Ee.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,Ee.num(this._value)&&(this.elapsedTime=0,this.durationProgress=0,this.lastPosition=this._value,t&&(this.lastVelocity=null),this.v0=null)}},Ng=class e extends Og{constructor(t){super(0),this._string=null,this._toString=void 0,this._toString=Zm({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(Ee.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=Zm({output:[this.getValue(),t]})),this._value=0,super.reset()}},sR={dependencies:null},Mg=class extends iR{constructor(t){super(),this.source=t,this.setValue(t)}getValue(t){let r={};return fl(this.source,(o,n)=>{OMe(o)?r[n]=o.getValue(t):is(o)?r[n]=ei(o):t||(r[n]=o)}),r}setValue(t){this.source=t,this.payload=this._makePayload(t)}reset(){this.payload&&Pr(this.payload,t=>t.reset())}_makePayload(t){if(t){let r=new Set;return fl(t,this._addToPayload,r),Array.from(r)}}_addToPayload(t){sR.dependencies&&is(t)&&sR.dependencies.add(t);let r=G_(t);r&&Pr(r,o=>this.add(o))}},qV=class e extends Mg{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(NMe)),!0)}};function NMe(e){return(Hb(e)?Ng:Og).create(e)}function cR(e){let t=gc(e);return t?t.constructor:Ee.arr(e)?qV:Hb(e)?Ng:Og}function aR(){return aR=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},aR.apply(this,arguments)}var IQ=(e,t)=>{let r=!Ee.fun(e)||e.prototype&&e.prototype.isReactComponent;return(0,Hd.forwardRef)((o,n)=>{let i=(0,Hd.useRef)(null),s=r&&(0,Hd.useCallback)(g=>{i.current=DMe(n,g)},[n]),[l,c]=MMe(o,t),u=GV(),d=()=>{let g=i.current;if(r&&!g)return;(g?t.applyAnimatedValues(g,l.getValue(!0)):!1)===!1&&u()},f=new KV(d,c),m=(0,Hd.useRef)();U_(()=>(m.current=f,Pr(c,g=>Xm(g,f)),()=>{m.current&&(Pr(m.current.deps,g=>Qm(g,m.current)),nt.cancel(m.current.update))})),(0,Hd.useEffect)(d,[]),YV(()=>()=>{let g=m.current;Pr(g.deps,v=>Qm(v,g))});let h=t.getComponentProps(l.getValue());return MQ.createElement(e,aR({},h,{ref:s}))})},KV=class{constructor(t,r){this.update=t,this.deps=r}eventObserved(t){t.type=="change"&&nt.write(this.update)}};function MMe(e,t){let r=new Set;return sR.dependencies=r,e.style&&(e=aR({},e,{style:t.createAnimatedStyle(e.style)})),e=new Mg(e),sR.dependencies=null,[e,r]}function DMe(e,t){return e&&(Ee.fun(e)?e(t):e.current=t),t}var OQ=Symbol.for("AnimatedComponent"),DQ=(e,{applyAnimatedValues:t=()=>!1,createAnimatedStyle:r=n=>new Mg(n),getComponentProps:o=n=>n}={})=>{let n={applyAnimatedValues:t,createAnimatedStyle:r,getComponentProps:o},i=s=>{let l=NQ(s)||"Anonymous";return Ee.str(s)?s=i[s]||(i[s]=IQ(s,n)):s=s[OQ]||(s[OQ]=IQ(s,n)),s.displayName=`Animated(${l})`,s};return fl(e,(s,l)=>{Ee.arr(e)&&(l=NQ(s)),i[l]=i(s)}),{animated:i}},NQ=e=>Ee.str(e)?e:e&&Ee.str(e.displayName)?e.displayName:Ee.fun(e)&&e.name||null;function ss(){return ss=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},ss.apply(this,arguments)}function Dg(e,...t){return Ee.fun(e)?e(...t):e}var Z_=(e,t)=>e===!0||!!(t&&e&&(Ee.fun(e)?e(t):Ws(e).includes(t))),qQ=(e,t)=>Ee.obj(e)?t&&e[t]:e,KQ=(e,t)=>e.default===!0?e[t]:e.default?e.default[t]:void 0,FMe=e=>e,ZQ=(e,t=FMe)=>{let r=LMe;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);Ee.und(i)||(o[n]=i)}return o},LMe=["config","onProps","onStart","onChange","onPause","onResume","onRest"],BMe={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 VMe(e){let t={},r=0;if(fl(e,(o,n)=>{BMe[n]||(t[n]=o,r++)}),r)return t}function XQ(e){let t=VMe(e);if(t){let r={to:t};return fl(e,(o,n)=>n in t||(r[n]=o)),r}return ss({},e)}function X_(e){return e=ei(e),Ee.arr(e)?e.map(X_):Hb(e)?Na.createStringInterpolator({range:[0,1],output:[e,e]})(1):e}function QV(e){return Ee.fun(e)||Ee.arr(e)&&Ee.obj(e[0])}var jMe={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}},fR=1.70158,uR=fR*1.525,FQ=fR+1,LQ=2*Math.PI/3,BQ=2*Math.PI/4.5,dR=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,zMe={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=>FQ*e*e*e-fR*e*e,easeOutBack:e=>1+FQ*Math.pow(e-1,3)+fR*Math.pow(e-1,2),easeInOutBack:e=>e<.5?Math.pow(2*e,2)*((uR+1)*2*e-uR)/2:(Math.pow(2*e-2,2)*((uR+1)*(e*2-2)+uR)+2)/2,easeInElastic:e=>e===0?0:e===1?1:-Math.pow(2,10*e-10)*Math.sin((e*10-10.75)*LQ),easeOutElastic:e=>e===0?0:e===1?1:Math.pow(2,-10*e)*Math.sin((e*10-.75)*LQ)+1,easeInOutElastic:e=>e===0?0:e===1?1:e<.5?-(Math.pow(2,20*e-10)*Math.sin((20*e-11.125)*BQ))/2:Math.pow(2,-20*e+10)*Math.sin((20*e-11.125)*BQ)/2+1,easeInBounce:e=>1-dR(1-e),easeOutBounce:dR,easeInOutBounce:e=>e<.5?(1-dR(1-2*e))/2:(1+dR(2*e-1))/2},JV=ss({},jMe.default,{mass:1,damping:1,easing:zMe.linear,clamp:!1}),$V=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,JV)}};function HMe(e,t,r){r&&(r=ss({},r),VQ(r,t),t=ss({},r,t)),VQ(e,t),Object.assign(e,t);for(let s in JV)e[s]==null&&(e[s]=JV[s]);let{mass:o,frequency:n,damping:i}=e;return Ee.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 VQ(e,t){if(!Ee.und(t.decay))e.duration=void 0;else{let r=!Ee.und(t.tension)||!Ee.und(t.friction);(r||!Ee.und(t.frequency)||!Ee.und(t.damping)||!Ee.und(t.mass))&&(e.duration=void 0,e.decay=void 0),r&&(e.frequency=void 0)}}var jQ=[],e8=class{constructor(){this.changed=!1,this.values=jQ,this.toValues=null,this.fromValues=jQ,this.to=void 0,this.from=void 0,this.config=new $V,this.immediate=!1}};function QQ(e,{key:t,props:r,defaultProps:o,state:n,actions:i}){return new Promise((s,l)=>{var c;let u,d,f=Z_((c=r.cancel)!=null?c:o?.cancel,t);if(f)g();else{Ee.und(r.pause)||(n.paused=Z_(r.pause,t));let v=o?.pause;v!==!0&&(v=n.paused||Z_(v,t)),u=Dg(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-nt.now()}function h(){u>0&&!Na.skipAnimation?(n.delayed=!0,d=nt.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(ss({},r,{callId:e,cancel:f}),s)}catch(v){l(v)}}})}var a8=(e,t)=>t.length==1?t[0]:t.some(r=>r.cancelled)?Ub(e.get()):t.every(r=>r.noop)?JQ(e.get()):vc(e.get(),t.every(r=>r.finished)),JQ=e=>({value:e,noop:!0,finished:!0,cancelled:!1}),vc=(e,t,r=!1)=>({value:e,finished:t,cancelled:r}),Ub=e=>({value:e,cancelled:!0,finished:!1});function $Q(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=ZQ(t,(y,b)=>b==="onRest"?void 0:y),d,f,m=new Promise((y,b)=>(d=y,f=b)),h=y=>{let b=n<=(r.cancelId||0)&&Ub(o)||n!==r.asyncId&&vc(o,!1);if(b)throw y.result=b,f(y),y},g=(y,b)=>{let w=new mR,S=new pR;return(async()=>{if(Na.skipAnimation)throw Q_(r),S.result=vc(o,!1),f(S),S;h(w);let x=Ee.obj(y)?ss({},y):ss({},b,{to:y});x.parentId=n,fl(u,(P,I)=>{Ee.und(x[I])&&(x[I]=P)});let _=await o.start(x);return h(w),r.paused&&await new Promise(P=>{r.resumeQueue.add(P)}),_})()},v;if(Na.skipAnimation)return Q_(r),vc(o,!1);try{let y;Ee.arr(e)?y=(async b=>{for(let w of b)await g(w)})(e):y=Promise.resolve(e(g,o.stop.bind(o))),await Promise.all([y.then(d),m]),v=vc(o.get(),!0,!1)}catch(y){if(y instanceof mR)v=y.result;else if(y instanceof pR)v=y.result;else throw y}finally{n==r.asyncId&&(r.asyncId=i,r.asyncTo=i?l:void 0,r.promise=i?c:void 0)}return Ee.fun(s)&&nt.batchedUpdates(()=>{s(v,o,o.item)}),v})()}function Q_(e,t){Vb(e.timeouts,r=>r.cancel()),e.pauseQueue.clear(),e.resumeQueue.clear(),e.asyncId=e.asyncTo=e.promise=void 0,t&&(e.cancelId=t)}var mR=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}},pR=class extends Error{constructor(){super("SkipAnimationSignal"),this.result=void 0}},t8=e=>e instanceof J_,UMe=1,J_=class extends Bb{constructor(...t){super(...t),this.id=UMe++,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=gc(this);return t&&t.getValue()}to(...t){return Na.to(this,t)}interpolate(...t){return RQ(),Na.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){Ig(this,{type:"change",parent:this,value:t,idle:r})}_onPriorityChange(t){this.idle||zb.sort(this),Ig(this,{type:"priority",parent:this,priority:t})}},Fg=Symbol.for("SpringPhase"),eJ=1,r8=2,o8=4,ZV=e=>(e[Fg]&eJ)>0,Jm=e=>(e[Fg]&r8)>0,Y_=e=>(e[Fg]&o8)>0,zQ=(e,t)=>t?e[Fg]|=r8|eJ:e[Fg]&=~r8,HQ=(e,t)=>t?e[Fg]|=o8:e[Fg]&=~o8,n8=class extends J_{constructor(t,r){if(super(),this.key=void 0,this.animation=new e8,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,!Ee.und(t)||!Ee.und(r)){let o=Ee.obj(t)?ss({},t):ss({},r,{from:t});Ee.und(o.default)&&(o.default=!0),this.start(o)}}get idle(){return!(Jm(this)||this._state.asyncTo)||Y_(this)}get goal(){return ei(this.animation.to)}get velocity(){let t=gc(this);return t instanceof Og?t.lastVelocity||0:t.getPayload().map(r=>r.lastVelocity||0)}get hasAnimated(){return ZV(this)}get isAnimating(){return Jm(this)}get isPaused(){return Y_(this)}get isDelayed(){return this._state.delayed}advance(t){let r=!0,o=!1,n=this.animation,{config:i,toValues:s}=n,l=G_(n.to);!l&&is(n.to)&&(s=Ws(ei(n.to))),n.values.forEach((d,f)=>{if(d.done)return;let m=d.constructor==Ng?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,y=n.fromValues[f],b=d.v0!=null?d.v0:d.v0=Ee.arr(i.velocity)?i.velocity[f]:i.velocity,w,S=i.precision||(y==m?.005:Math.min(1,Math.abs(m-y)*.001));if(Ee.und(i.duration))if(i.decay){let x=i.decay===!0?.998:i.decay,_=Math.exp(-(1-x)*v);g=y+b/(1-x)*(1-_),h=Math.abs(d.lastPosition-g)<=S,w=b*_}else{w=d.lastVelocity==null?b:d.lastVelocity;let x=i.restVelocity||S/10,_=i.clamp?0:i.bounce,P=!Ee.und(_),I=y==m?d.v0>0:y<m,A,k=!1,D=1,E=Math.ceil(t/D);for(let C=0;C<E&&(A=Math.abs(w)>x,!(!A&&(h=Math.abs(m-g)<=S,h)));++C){P&&(k=g==m||g>m==I,k&&(w=-w*_,g=m));let M=-i.tension*1e-6*(g-m),B=-i.friction*.001*w,N=(M+B)/i.mass;w=w+N*D,g=g+w*D}}else{let x=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)),x=(i.progress||0)+v/this._memoizedDuration,x=x>1?1:x<0?0:x,d.durationProgress=x),g=y+i.easing(x)*(m-y),w=(g-d.lastPosition)/t,h=x==1}d.lastVelocity=w,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=gc(this),u=c.getValue();if(r){let d=ei(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 nt.batchedUpdates(()=>{this._stop(),this._focus(t),this._set(t)}),this}pause(){this._update({pause:!0})}resume(){this._update({pause:!1})}finish(){if(Jm(this)){let{to:t,config:r}=this.animation;nt.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 Ee.und(t)?(o=this.queue||[],this.queue=[]):o=[Ee.obj(t)?t:ss({},r,{to:t})],Promise.all(o.map(n=>this._update(n))).then(n=>a8(this,n))}stop(t){let{to:r}=this.animation;return this._focus(this.get()),Q_(this._state,t&&this._lastCallId),nt.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=Ee.obj(o)?o[r]:o,(o==null||QV(o))&&(o=void 0),n=Ee.obj(n)?n[r]:n,n==null&&(n=void 0);let i={to:o,from:n};return ZV(this)||(t.reverse&&([o,n]=[n,o]),n=ei(n),Ee.und(n)?gc(this)||this._set(o):this._set(n)),i}_update(t,r){let o=ss({},t),{key:n,defaultProps:i}=this;o.default&&Object.assign(i,ZQ(o,(c,u)=>/^on/.test(u)?qQ(c,n):c)),WQ(this,o,"onProps"),K_(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 QQ(++this._lastCallId,{key:n,props:o,defaultProps:i,state:l,actions:{pause:()=>{Y_(this)||(HQ(this,!0),jb(l.pauseQueue),K_(this,"onPause",vc(this,q_(this,this.animation.to)),this))},resume:()=>{Y_(this)&&(HQ(this,!1),Jm(this)&&this._resume(),jb(l.resumeQueue),K_(this,"onResume",vc(this,q_(this,this.animation.to)),this))},start:this._merge.bind(this,s)}}).then(c=>{if(o.loop&&c.finished&&!(r&&c.noop)){let u=tJ(o);if(u)return this._update(u,!0)}return c})}_merge(t,r,o){if(r.cancel)return this.stop(!0),o(Ub(this));let n=!Ee.und(t.to),i=!Ee.und(t.from);if(n||i)if(r.callId>this._lastToId)this._lastToId=r.callId;else return o(Ub(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||Ee.und(f))&&(f=m),r.reverse&&([f,m]=[m,f]);let h=!gu(m,d);h&&(c.from=m),m=ei(m);let g=!gu(f,u);g&&this._focus(f);let v=QV(r.to),{config:y}=c,{decay:b,velocity:w}=y;(n||i)&&(y.velocity=0),r.config&&!v&&HMe(y,Dg(r.config,s),r.config!==l.config?Dg(l.config,s):void 0);let S=gc(this);if(!S||Ee.und(f))return o(vc(this,!0));let x=Ee.und(r.reset)?i&&!r.default:!Ee.und(m)&&Z_(r.reset,s),_=x?m:this.get(),P=X_(f),I=Ee.num(P)||Ee.arr(P)||Hb(P),A=!v&&(!I||Z_(l.immediate||r.immediate,s));if(g){let C=cR(f);if(C!==S.constructor)if(A)S=this._set(P);else throw Error(`Cannot animate between ${S.constructor.name} and ${C.name}, as the "to" prop suggests`)}let k=S.constructor,D=is(f),E=!1;if(!D){let C=x||!ZV(this)&&h;(g||C)&&(E=gu(X_(_),P),D=!E),(!gu(c.immediate,A)&&!A||!gu(y.decay,b)||!gu(y.velocity,w))&&(D=!0)}if(E&&Jm(this)&&(c.changed&&!x?D=!0:D||this._stop(u)),!v&&((D||is(u))&&(c.values=S.getPayload(),c.toValues=is(f)?null:k==Ng?[1]:Ws(P)),c.immediate!=A&&(c.immediate=A,!A&&!x&&this._set(u)),D)){let{onRest:C}=c;Pr(WMe,B=>WQ(this,r,B));let M=vc(this,q_(this,u));jb(this._pendingCalls,M),this._pendingCalls.add(o),c.changed&&nt.batchedUpdates(()=>{c.changed=!x,C?.(M,this),x?Dg(l.onRest,M):c.onStart==null||c.onStart(M,this)})}x&&this._set(_),v?o($Q(r.to,r,this._state,this)):D?this._start():Jm(this)&&!g?this._pendingCalls.add(o):o(JQ(_))}_focus(t){let r=this.animation;t!==r.to&&(WV(this)&&this._detach(),r.to=t,WV(this)&&this._attach())}_attach(){let t=0,{to:r}=this.animation;is(r)&&(Xm(r,this),t8(r)&&(t=r.priority+1)),this.priority=t}_detach(){let{to:t}=this.animation;is(t)&&Qm(t,this)}_set(t,r=!0){let o=ei(t);if(!Ee.und(o)){let n=gc(this);if(!n||!gu(o,n.getValue())){let i=cR(o);!n||n.constructor!=i?lR(this,i.create(o)):n.setValue(o),n&&nt.batchedUpdates(()=>{this._onChange(o,r)})}}return gc(this)}_onStart(){let t=this.animation;t.changed||(t.changed=!0,K_(this,"onStart",vc(this,q_(this,t.to)),this))}_onChange(t,r){r||(this._onStart(),Dg(this.animation.onChange,t,this)),Dg(this.defaultProps.onChange,t,this),super._onChange(t,r)}_start(){let t=this.animation;gc(this).reset(ei(t.to)),t.immediate||(t.fromValues=t.values.map(r=>r.lastPosition)),Jm(this)||(zQ(this,!0),Y_(this)||this._resume())}_resume(){Na.skipAnimation?this.finish():zb.start(this)}_stop(t,r){if(Jm(this)){zQ(this,!1);let o=this.animation;Pr(o.values,i=>{i.done=!0}),o.toValues&&(o.onChange=o.onPause=o.onResume=void 0),Ig(this,{type:"idle",parent:this});let n=r?Ub(this.get()):vc(this.get(),q_(this,t??o.to));jb(this._pendingCalls,n),o.changed&&(o.changed=!1,K_(this,"onRest",n,this))}}};function q_(e,t){let r=X_(t),o=X_(e.get());return gu(o,r)}function tJ(e,t=e.loop,r=e.to){let o=Dg(t);if(o){let n=o!==!0&&XQ(o),i=(n||e).reverse,s=!n||n.reset;return i8(ss({},e,{loop:t,default:!1,pause:void 0,to:!i||QV(r)?r:void 0,from:s?e.from:void 0,reset:s},n))}}function i8(e){let{to:t,from:r}=e=XQ(e),o=new Set;return Ee.obj(t)&&UQ(t,o),Ee.obj(r)&&UQ(r,o),e.keys=o.size?Array.from(o):null,e}function UQ(e,t){fl(e,(r,o)=>r!=null&&t.add(o))}var WMe=["onStart","onRest","onChange","onPause","onResume"];function WQ(e,t,r){e.animation[r]=t[r]!==KQ(t,r)?qQ(t[r],e.key):void 0}function K_(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 GMe=["onStart","onChange","onRest"],YMe=1,hR=class{constructor(t,r){this.id=YMe++,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(ss({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];Ee.und(o)||this.springs[r].set(o)}}update(t){return t&&this.queue.push(i8(t)),this}start(t){let{queue:r}=this;return t?r=Ws(t).map(i8):this.queue=[],this._flush?this._flush(this,r):(oJ(this,r),qMe(this,r))}stop(t,r){if(t!==!!t&&(r=t),r){let o=this.springs;Pr(Ws(r),n=>o[n].stop(!!t))}else Q_(this._state,this._lastAsyncId),this.each(o=>o.stop(!!t));return this}pause(t){if(Ee.und(t))this.start({pause:!0});else{let r=this.springs;Pr(Ws(t),o=>r[o].pause())}return this}resume(t){if(Ee.und(t))this.start({pause:!1});else{let r=this.springs;Pr(Ws(t),o=>r[o].resume())}return this}each(t){fl(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,Vb(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&&Vb(r,([c,u])=>{u.value=l,c(u,this,this._item)}),s&&(this._started=!1,Vb(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;nt.onFrame(this._onFrame)}};function qMe(e,t){return Promise.all(t.map(r=>rJ(e,r))).then(r=>a8(e,r))}async function rJ(e,t,r){let{keys:o,to:n,from:i,loop:s,onRest:l,onResolve:c}=t,u=Ee.obj(t.default)&&t.default;s&&(t.loop=!1),n===!1&&(t.to=null),i===!1&&(t.from=null);let d=Ee.arr(n)||Ee.fun(n)?n:void 0;d?(t.to=void 0,t.onRest=void 0,u&&(u.onRest=void 0)):Pr(GMe,v=>{let y=t[v];if(Ee.fun(y)){let b=e._events[v];t[v]=({finished:w,cancelled:S})=>{let x=b.get(y);x?(w||(x.finished=!1),S&&(x.cancelled=!0)):b.set(y,{value:null,finished:w||!1,cancelled:S||!1})},u&&(u[v]=t[v])}});let f=e._state;t.pause===!f.paused?(f.paused=t.pause,jb(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||KQ(t,"cancel")===!0;(d||h&&f.asyncId)&&m.push(QQ(++e._lastAsyncId,{props:t,state:f,actions:{pause:tR,resume:tR,start(v,y){h?(Q_(f,e._lastAsyncId),y(Ub(e))):(v.onRest=l,y($Q(d,v,f,e)))}}})),f.paused&&await new Promise(v=>{f.resumeQueue.add(v)});let g=a8(e,await Promise.all(m));if(s&&g.finished&&!(r&&g.noop)){let v=tJ(t,s,n);if(v)return oJ(e,[v]),rJ(e,v,!0)}return c&&nt.batchedUpdates(()=>c(g,e,e.item)),g}function KMe(e,t){let r=new n8;return r.key=e,t&&Xm(r,t),r}function ZMe(e,t,r){t.keys&&Pr(t.keys,o=>{(e[o]||(e[o]=r(o)))._prepareNode(t)})}function oJ(e,t){Pr(t,r=>{ZMe(e.springs,r,o=>KMe(o,e))})}function XMe(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 QMe=["children"],l8=e=>{let{children:t}=e,r=XMe(e,QMe),o=(0,e1.useContext)(gR),n=r.pause||!!o.pause,i=r.immediate||!!o.immediate;r=AQ(()=>({pause:n,immediate:i}),[n,i]);let{Provider:s}=gR;return $_.createElement(s,{value:r},t)},gR=JMe(l8,{});l8.Provider=gR.Provider;l8.Consumer=gR.Consumer;function JMe(e,t){return Object.assign(e,$_.createContext(t)),e.Provider._context=e,e.Consumer._context=e,e}var GQ;(function(e){e.MOUNT="mount",e.ENTER="enter",e.UPDATE="update",e.LEAVE="leave"})(GQ||(GQ={}));var s8=class extends J_{constructor(t,r){super(),this.key=void 0,this.idle=!0,this.calc=void 0,this._active=new Set,this.source=t,this.calc=Zm(...r);let o=this._get(),n=cR(o);lR(this,n.create(o))}advance(t){let r=this._get(),o=this.get();gu(r,o)||(gc(this).setValue(r),this._onChange(r,this.idle)),!this.idle&&YQ(this._active)&&XV(this)}_get(){let t=Ee.arr(this.source)?this.source.map(ei):Ws(ei(this.source));return this.calc(...t)}_start(){this.idle&&!YQ(this._active)&&(this.idle=!1,Pr(G_(this),t=>{t.done=!1}),Na.skipAnimation?(nt.batchedUpdates(()=>this.advance()),XV(this)):zb.start(this))}_attach(){let t=1;Pr(Ws(this.source),r=>{is(r)&&Xm(r,this),t8(r)&&(r.idle||this._active.add(r),t=Math.max(t,r.priority+1))}),this.priority=t,this._start()}_detach(){Pr(Ws(this.source),t=>{is(t)&&Qm(t,this)}),this._active.clear(),XV(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=Ws(this.source).reduce((r,o)=>Math.max(r,(t8(o)?o.priority:0)+1),0))}};function $Me(e){return e.idle!==!1}function YQ(e){return!e.size||Array.from(e).every($Me)}function XV(e){e.idle||(e.idle=!0,Pr(G_(e),t=>{t.done=!0}),Ig(e,{type:"idle",parent:e}))}Na.assign({createStringInterpolator:nR,to:(e,t)=>new s8(e,t)});var yvt=zb.advance;var iJ=a(uu());function f8(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 eDe=["style","children","scrollTop","scrollLeft"],sJ=/^--/;function tDe(e,t){return t==null||typeof t=="boolean"||t===""?"":typeof t=="number"&&t!==0&&!sJ.test(e)&&!(t1.hasOwnProperty(e)&&t1[e])?t+"px":(""+t).trim()}var nJ={};function rDe(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=f8(o,eDe),u=Object.values(c),d=Object.keys(c).map(f=>r||e.hasAttribute(f)?f:nJ[f]||(nJ[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=tDe(f,n[f]);sJ.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 t1={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},oDe=(e,t)=>e+t.charAt(0).toUpperCase()+t.substring(1),nDe=["Webkit","Ms","Moz","O"];t1=Object.keys(t1).reduce((e,t)=>(nDe.forEach(r=>e[oDe(r,t)]=e[t]),e),t1);var iDe=["x","y","z"],sDe=/^(matrix|translate|scale|rotate|skew)/,aDe=/^(translate)/,lDe=/^(rotate|skew)/,c8=(e,t)=>Ee.num(e)&&e!==0?e+t:e,vR=(e,t)=>Ee.arr(e)?e.every(r=>vR(r,t)):Ee.num(e)?e===t:parseFloat(e)===t,u8=class extends Mg{constructor(t){let{x:r,y:o,z:n}=t,i=f8(t,iDe),s=[],l=[];(r||o||n)&&(s.push([r||0,o||0,n||0]),l.push(c=>[`translate3d(${c.map(u=>c8(u,"px")).join(",")})`,vR(c,0)])),fl(i,(c,u)=>{if(u==="transform")s.push([c||""]),l.push(d=>[d,d===""]);else if(sDe.test(u)){if(delete i[u],Ee.und(c))return;let d=aDe.test(u)?"px":lDe.test(u)?"deg":"";s.push(Ws(c)),l.push(u==="rotate3d"?([f,m,h,g])=>[`rotate3d(${f},${m},${h},${c8(g,d)})`,vR(g,0)]:f=>[`${u}(${f.map(m=>c8(m,d)).join(",")})`,vR(f,u.startsWith("scale")?1:0)])}}),s.length&&(i.transform=new d8(s,l)),super(i)}},d8=class extends Bb{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 Pr(this.inputs,(o,n)=>{let i=ei(o[0]),[s,l]=this.transforms[n](Ee.arr(i)?i:o.map(ei));t+=" "+s,r=r&&l}),r?"none":t}observerAdded(t){t==1&&Pr(this.inputs,r=>Pr(r,o=>is(o)&&Xm(o,this)))}observerRemoved(t){t==0&&Pr(this.inputs,r=>Pr(r,o=>is(o)&&Qm(o,this)))}eventObserved(t){t.type=="change"&&(this._value=null),Ig(this,t)}},cDe=["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"],uDe=["scrollTop","scrollLeft"];Na.assign({batchedUpdates:iJ.unstable_batchedUpdates,createStringInterpolator:nR,colors:CQ});var dDe=DQ(cDe,{applyAnimatedValues:rDe,createAnimatedStyle:e=>new u8(e),getComponentProps:e=>f8(e,uDe)}),Evt=dDe.animated;var r1=a(U(),1);function aJ(e){return{top:e.offsetTop,left:e.offsetLeft}}function lJ(e){let t=(0,r1.useRef)(null),r=(0,r1.useRef)(void 0);return t.current&&(r.current=aJ(t.current)),(0,r1.useLayoutEffect)(()=>{let o=r.current;if(!o||!t.current||window.matchMedia("(prefers-reduced-motion: reduce)").matches)return;let n=new hR({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=aJ(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 Me=a(T(),1),{MediaUploadModal:fDe}=Tn(Gb.privateApis);function uJ({children:e,index:t,className:r}){let o=lJ(t);return(0,Me.jsx)("div",{ref:o,className:r,children:e})}function Wb(e){return Array.isArray(e)?e:e?[e]:[]}function mDe({render:e,multiple:t,...r}){let[o,n]=(0,Wr.useState)(!1);return window.__experimentalDataViewsMediaModal?(0,Me.jsxs)(Me.Fragment,{children:[e&&e({open:()=>n(!0)}),o&&(0,Me.jsx)(fDe,{...r,multiple:t,isOpen:o,onClose:()=>{n(!1),r.onClose?.()},onSelect:i=>{n(!1),r.onSelect?.(i)}})]}):(0,Me.jsx)(Gb.MediaUpload,{...r,render:e,multiple:t?"add":void 0})}function p8({open:e,children:t,label:r,showTooltip:o=!1,onFilesDrop:n,attachment:i,isUploading:s=!1}){let l=i&&(0,Lg.isBlobURL)(i.source_url),c=(0,Me.jsxs)("div",{className:Z("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,Me.jsx)("span",{className:"fields__media-edit-picker-button-spinner",children:(0,Me.jsx)(rr.Spinner,{})}),!s&&(0,Me.jsx)(rr.DropZone,{onFilesDrop:u=>n(u,i?.id)})]});return o?(0,Me.jsx)(rr.Tooltip,{text:r,placement:"top",children:c}):c}var pDe=["application/zip","application/x-zip-compressed","application/x-rar-compressed","application/x-7z-compressed","application/x-tar","application/x-gzip"];function hDe({attachment:e}){return(0,Me.jsx)(rr.__experimentalTruncate,{className:"fields__media-edit-filename",children:e.title.rendered})}function dJ(e){return(0,Me.jsx)(p8,{...e,children:(0,Me.jsx)("span",{className:"fields__media-edit-placeholder",children:e.label})})}function fJ({itemId:e,index:t,totalItems:r,isUploading:o,moveItem:n,orientation:i="vertical"}){let s=i==="horizontal";return(0,Me.jsxs)(Me.Fragment,{children:[(0,Me.jsx)(rr.Button,{__next40pxDefaultSize:!0,icon:s?pr:I3,label:s?(0,as.__)("Move left"):(0,as.__)("Move up"),size:"small",disabled:o||t===0,accessibleWhenDisabled:!0,tooltipPosition:"top",onClick:l=>{l.stopPropagation(),n(e,"up")}}),(0,Me.jsx)(rr.Button,{__next40pxDefaultSize:!0,icon:s?hr:Nx,label:s?(0,as.__)("Move right"):(0,as.__)("Move down"),size:"small",disabled:o||t===r-1,accessibleWhenDisabled:!0,tooltipPosition:"top",onClick:l=>{l.stopPropagation(),n(e,"down")}})]})}function mJ({attachment:e}){let t=e.source_url,r=e.mime_type||"";return r.startsWith("image")?(0,Me.jsx)("img",{className:"fields__media-edit-thumbnail",alt:e.alt_text||"",src:t}):r.startsWith("audio")?(0,Me.jsx)(rr.Icon,{icon:p3}):r.startsWith("video")?(0,Me.jsx)(rr.Icon,{icon:vL}):pDe.includes(r)?(0,Me.jsx)(rr.Icon,{icon:n3}):(0,Me.jsx)(rr.Icon,{icon:i4})}function gDe({allItems:e,addButtonLabel:t,multiple:r,removeItem:o,moveItem:n,open:i,onFilesDrop:s,isUploading:l,setTargetItemId:c}){return(0,Me.jsxs)("div",{className:Z("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,Lg.isBlobURL)(u.source_url),h=u.id;return(0,Me.jsxs)(uJ,{index:d,className:Z("fields__media-edit-expanded-item",{"has-preview-image":f}),children:[(0,Me.jsx)(p8,{open:()=>{c(h),i()},label:m?(0,as.__)("Replace"):(0,as.sprintf)((0,as.__)("Replace %s"),u.title.rendered),showTooltip:!0,onFilesDrop:s,attachment:u,isUploading:l,children:(0,Me.jsx)("div",{className:"fields__media-edit-expanded-preview",children:(0,Me.jsx)(rr.__experimentalVStack,{spacing:0,alignment:"center",justify:"center",className:"fields__media-edit-expanded-preview-stack",children:(!m||f)&&(0,Me.jsx)(mJ,{attachment:u})})})}),!m&&(0,Me.jsx)("div",{className:"fields__media-edit-expanded-overlay",children:(0,Me.jsxs)(rr.__experimentalHStack,{className:"fields__media-edit-expanded-actions",spacing:0,alignment:"flex-end",expanded:!1,children:[r&&e.length>1&&(0,Me.jsx)(fJ,{itemId:h,index:d,totalItems:e.length,isUploading:l,moveItem:n,orientation:"horizontal"}),(0,Me.jsx)(rr.Button,{__next40pxDefaultSize:!0,icon:_n,label:(0,as.__)("Remove"),size:"small",disabled:l,accessibleWhenDisabled:!0,tooltipPosition:"top",onClick:g=>{g.stopPropagation(),o(h)}})]})})]},u.id)}),(r||!e?.length)&&(0,Me.jsx)(dJ,{open:()=>{c(void 0),i()},label:t,onFilesDrop:s,isUploading:l})]})}function vDe({allItems:e,addButtonLabel:t,multiple:r,removeItem:o,moveItem:n,open:i,onFilesDrop:s,isUploading:l,setTargetItemId:c}){return(0,Me.jsxs)(Me.Fragment,{children:[!!e?.length&&(0,Me.jsx)("div",{className:Z("fields__media-edit-compact-group",{"is-single":e.length===1}),children:(0,Me.jsx)(rr.__experimentalVStack,{spacing:0,children:e.map((u,d)=>{let f=(0,Lg.isBlobURL)(u.source_url),m=r&&e.length>1,h=u.id;return(0,Me.jsxs)(uJ,{index:d,className:"fields__media-edit-compact",children:[(0,Me.jsx)(p8,{open:()=>{c(h),i()},label:(0,as.__)("Replace"),showTooltip:!0,onFilesDrop:s,attachment:u,isUploading:l,children:(0,Me.jsxs)(Me.Fragment,{children:[(0,Me.jsx)(mJ,{attachment:u}),!f&&(0,Me.jsx)(hDe,{attachment:u})]})}),!f&&(0,Me.jsxs)(rr.__experimentalHStack,{className:"fields__media-edit-compact-movers",spacing:0,alignment:"flex-end",expanded:!1,children:[m&&(0,Me.jsx)(fJ,{itemId:h,index:d,totalItems:e.length,isUploading:l,moveItem:n,orientation:"vertical"}),(0,Me.jsx)(rr.Button,{__next40pxDefaultSize:!0,icon:_n,label:(0,as.__)("Remove"),size:"small",disabled:l,accessibleWhenDisabled:!0,tooltipPosition:"top",onClick:g=>{g.stopPropagation(),o(h)}})]})]},u.id)})})}),(r||!e?.length)&&(0,Me.jsx)(dJ,{open:()=>{c(void 0),i()},label:t,onFilesDrop:s,isUploading:l})]})}function pJ({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,Wr.useState)(!1),f=(0,Wr.useRef)(null),[m,h]=(0,Wr.useState)(void 0);(0,Wr.useEffect)(()=>{let F=f.current,L=()=>{d(!0)};return F?.addEventListener("invalid",L),()=>F?.removeEventListener("invalid",L)},[]);let g=(0,o1.useSelect)(F=>{if(!c)return null;let H=Wb(c).toSorted((Q,J)=>Q-J),{getEntityRecords:q}=F(m8.store);return q("postType","attachment",{include:H})},[c]),v=(0,Wr.useRef)(null);g!==null&&(v.current=g);let y=g;if(g===null&&v.current&&c){let F=new Set(v.current.map(L=>L.id));Wb(c).every(L=>F.has(L))&&(y=v.current)}let b=(0,Wr.useMemo)(()=>{if(!y)return null;let F=Wb(c),L=new Map(y.map(H=>[H.id,H]));return F.map(H=>L.get(H)).filter(H=>H!==void 0)},[y,c]),{createErrorNotice:w}=(0,o1.useDispatch)(cJ.store),{receiveEntityRecords:S}=(0,o1.useDispatch)(m8.store),[x,_]=(0,Wr.useState)(),P=(0,Wr.useRef)(void 0),[I,A]=(0,Wr.useState)(!1),[k,D]=(0,Wr.useState)([]);(0,Wr.useEffect)(()=>{I&&(A(!1),P.current?.())},[I]);let E=(0,Wr.useCallback)(F=>r(t.setValue({item:e,value:F})),[e,t,r]),C=(0,Wr.useCallback)(F=>{let H=Wb(c).filter(q=>q!==F);d(!0),E(H.length?H:void 0)},[c,E]),M=(0,Wr.useCallback)((F,L)=>{if(!b)return;let H=b.map(J=>J.id),q=H.indexOf(F),Q=L==="up"?q-1:q+1;[H[q],H[Q]]=[H[Q],H[q]],E(H)},[b,E]),B=(0,Wr.useCallback)((F,L)=>{_(L),(0,Gb.uploadMedia)({allowedTypes:n?.length?n:void 0,filesList:F,onFileChange(H){let q=H.filter(te=>(0,Lg.isBlobURL)(te.url)).map(te=>te.url);if(D(q),q.length)return;S("postType","attachment",[],void 0,!0);let Q=H.map(te=>te.id);if(!i){E(Q[0]),_(void 0);return}let J=Wb(c);if(L===void 0)E([...J,...Q]);else{let te=[...J];te.splice(J.indexOf(L),1,...Q),E(te)}_(void 0)},onError(H){_(void 0),D([]),w(H.message,{type:"snackbar"})},multiple:!!i})},[n,c,i,w,E,S]),N=t.placeholder||(i?(0,as.__)("Choose files"):(0,as.__)("Choose file")),z=(0,Wr.useMemo)(()=>{if(!k.length)return b;let F=[...b||[]],L=k.map(H=>({id:H,source_url:H,mime_type:(0,Lg.getBlobTypeByURL)(H)}));if(x!==void 0){let H=F.findIndex(q=>q.id===x);F.splice(H,1,...L)}else F.push(...L);return F},[b,x,k]);(0,Wr.useEffect)(()=>{if(!u)return;let F=f.current;if(F)if(l){let L=l?.custom;h(L),L?.type==="invalid"?F.setCustomValidity(L.message||(0,as.__)("Invalid")):F.setCustomValidity("")}else F.setCustomValidity(""),h(void 0)},[u,t.isValid,l]);let O=(0,Wr.useCallback)(F=>{u||(!F.relatedTarget||!F.currentTarget.contains(F.relatedTarget))&&d(!0)},[u]);return(0,Me.jsxs)("div",{onBlur:O,children:[(0,Me.jsx)("fieldset",{className:"fields__media-edit","data-field-id":t.id,children:(0,Me.jsx)(mDe,{onSelect:F=>{if(!i){E(F.id),_(void 0);return}let L=Array.isArray(F)?F.map(q=>q.id):[F.id],H=Wb(c);if(!H.length)E(L);else if(x===void 0){let q=H.filter(J=>L.includes(J)),Q=L.filter(J=>!H.includes(J));E([...q,...Q])}else if(F.id!==x){let q=H.filter(Q=>Q!==F.id);E(q.map(Q=>Q===x?F.id:Q))}_(void 0)},onClose:()=>_(void 0),allowedTypes:n,value:x!==void 0?x:c,multiple:i&&x===void 0,title:t.label,render:({open:F})=>{P.current=F;let L=s?gDe:vDe;return(0,Me.jsxs)(rr.__experimentalVStack,{spacing:2,children:[t.label&&(o?(0,Me.jsx)(tr,{render:(0,Me.jsx)("legend",{}),children:t.label}):(0,Me.jsx)(rr.BaseControl.VisualLabel,{as:"legend",style:{marginBottom:0},children:t.label})),(0,Me.jsx)(L,{allItems:z,addButtonLabel:N,multiple:i,removeItem:C,moveItem:M,open:()=>A(!0),onFilesDrop:B,isUploading:!!k.length,setTargetItemId:_}),t.description&&(0,Me.jsx)(rr.__experimentalText,{variant:"muted",className:"fields__media-edit-description",children:t.description})]})}})}),(0,Me.jsx)(tr,{children:(0,Me.jsx)("input",{type:"text",ref:f,value:c??"",tabIndex:-1,"aria-hidden":"true",onChange:()=>{}})}),m&&(0,Me.jsx)("div",{"aria-live":"polite",children:(0,Me.jsxs)("p",{className:Z("components-validated-control__indicator",{"is-invalid":m.type==="invalid","is-valid":m.type==="valid"}),children:[(0,Me.jsx)(rr.Icon,{className:"components-validated-control__indicator-icon",icon:Nd,size:16,fill:"currentColor"}),m.message]})})]})}var h8=a(T(),1),hJ=({item:e,config:t})=>{let r=e?._embedded?.["wp:featuredmedia"]?.[0],o=r?.source_url;return o?(0,h8.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,h8.jsx)("span",{className:"fields-controls__featured-image-placeholder"})};var gJ=a(T(),1),yDe={id:"featured_media",type:"media",label:(0,g8.__)("Featured Image"),placeholder:(0,g8.__)("Set featured image"),Edit:e=>(0,gJ.jsx)(pJ,{...e,isExpanded:!0}),render:hJ,setValue:({value:e})=>({featured_media:e??0}),enableSorting:!1,filterBy:!1},v8=yDe;var xJ=a(j(),1);var i1=a(U(),1),wR=a(ee(),1),b8=a(W(),1),w8=a(G(),1),S8=a(j(),1);var y8=a(G(),1),ml=a(ee(),1);function yR(e){let t=e.type,r=e?.available_templates??{},o=Object.keys(r).length>0;return(0,y8.useSelect)(n=>{let i=!!n(ml.store).getCurrentTheme()?.is_block_theme;if(!n(ml.store).getPostType(t)?.viewable)return null;let l=i&&(n(ml.store).canUser("create",{kind:"postType",name:"wp_template"})??!1),c=o||l,u=c?!!n(ml.store).canUser("read",{kind:"postType",name:"wp_template"}):!1;return(!i||!u)&&c?"classic":i&&u?"block-theme":null},[t,o])}function bDe(e,t){return t?e==="page"?`${e}-${t}`:`single-${e}-${t}`:e==="page"?"page":`single-${e}`}var n1="";function bR(e,t,r){return(0,y8.useSelect)(o=>{if(!e||!t)return n1;let n=String(t),i=Tn(o(ml.store)).getHomePage();if(e==="page"&&i?.postType==="page"&&i?.postId===n){let f=o(ml.store).getEntityRecords("postType","wp_template",{per_page:-1})?.find(m=>m.slug==="front-page");if(f)return ot(f)}let s=Tn(o(ml.store)).getPostsPageId();if(e==="page"&&s===n){let d=o(ml.store).getDefaultTemplateId({slug:"home"});if(!d)return n1;let f=o(ml.store).getEntityRecord("postType","wp_template",d);return f?ot(f):n1}let l=bDe(e,r),c=o(ml.store).getDefaultTemplateId({slug:l});if(!c)return n1;let u=o(ml.store).getEntityRecord("postType","wp_template",c);return u?ot(u):n1},[e,t,r])}var SR=a(T(),1),wDe=[];function SDe({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,i1.useMemo)(()=>Object.entries(e?.available_templates??{}).map(([l,c])=>({label:c,value:l})),[e]),s=(0,w8.useSelect)(l=>{let{getHomePage:c,getPostsPageId:u}=Tn(l(wR.store)),d=String(o),f=u()===d,m=e.type==="page"&&c()?.postId===d;return!f&&!m},[o,e.type]);return(0,SR.jsx)(b8.SelectControl,{__next40pxDefaultSize:!0,label:(0,S8.__)("Template"),hideLabelFromVision:!0,value:n,options:i,onChange:r,disabled:!s})}function xDe({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,w8.useSelect)(f=>{let m=f(wR.store).getEntityRecords("postType","wp_template",{per_page:-1,post_type:o})??wDe,{getHomePage:h,getPostsPageId:g}=Tn(f(wR.store)),v=String(n),y=g()===v,b=o==="page"&&h()?.postId===v;return{templates:m,canSwitchTemplate:!y&&!b}},[n,o]),c=bR(o,n,i),u=t.getValue({item:e}),d=(0,i1.useMemo)(()=>{let f=s.map(m=>({label:ot(m),value:m.slug}));return[{label:c,value:""},...f]},[s,c]);return(0,SR.jsx)(b8.SelectControl,{__next40pxDefaultSize:!0,label:(0,S8.__)("Template"),hideLabelFromVision:!0,value:u,options:d,onChange:r,disabled:!l})}var vJ=({data:e,field:t,onChange:r})=>{let o=(0,i1.useCallback)(s=>r({[t.id]:s}),[t.id,r]),n=yR(e);return!n||!["block-theme","classic"].includes(n)?null:(0,SR.jsx)(n==="classic"?SDe:xDe,{data:e,field:t,onChange:o})};var yJ=a(G(),1),bJ=a(ee(),1),wJ=a(j(),1);var Bg=a(T(),1);function _De({item:e,field:t}){let r=t.getValue({item:e}),o=e?.available_templates??{},n=r&&o[r]?o[r]:(0,wJ.__)("Default template");return(0,Bg.jsx)(Bg.Fragment,{children:n})}function CDe({item:e,field:t}){let r=e.type,o=e.slug,n=e.id,i=t.getValue({item:e}),s=bR(r,n,o),l=(0,yJ.useSelect)(c=>{if(!i)return;let d=c(bJ.store).getEntityRecords("postType","wp_template",{per_page:-1,post_type:r})?.find(f=>f.slug===i);return d?ot(d):void 0},[r,i]);return(0,Bg.jsx)(Bg.Fragment,{children:l??s})}var SJ=({item:e,field:t})=>{let r=yR(e);return!r||!["block-theme","classic"].includes(r)?null:(0,Bg.jsx)(r==="classic"?_De:CDe,{item:e,field:t})};var TDe={id:"template",type:"text",label:(0,xJ.__)("Template"),Edit:vJ,render:SJ,enableSorting:!1,filterBy:!1},x8=TDe;var LJ=a(j(),1);var _8=a(s1(),1),_R=a(W(),1),C8=a(G(),1),Wd=a(U(),1),T8=a(ee(),1),RJ=a(_e(),1),AJ=a(Ot(),1),$m=a(j(),1),IJ=a(vo(),1);var EJ=a(Ot(),1),PJ=a(j(),1);function a1(e){return typeof e.title=="object"&&"rendered"in e.title&&e.title.rendered?(0,EJ.decodeEntities)(e.title.rendered):`#${e?.id} (${(0,PJ.__)("no title")})`}var Ud=a(T(),1);function ADe(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 kJ=(e,t)=>{let r=(0,_8.default)(e||"").toLowerCase(),o=(0,_8.default)(t||"").toLowerCase();return r===o?0:r.startsWith(o)?r.length:1/0};function IDe({data:e,onChangeControl:t}){let[r,o]=(0,Wd.useState)(""),n=e.parent,i=e.id,s=e.type,{parentPostTitle:l,pageItems:c,isHierarchical:u}=(0,C8.useSelect)(h=>{let{getEntityRecord:g,getEntityRecords:v,getPostType:y}=h(T8.store),b=y(s),w=b?.hierarchical&&b.viewable,S=n?g("postType",s,n):null,x={per_page:100,exclude:i,parent_exclude:i,orderby:"menu_order",order:"asc",_fields:"id,title,parent",...!!r&&{search:r,orderby:"relevance"}};return{isHierarchical:w,parentPostTitle:S?a1(S):"",pageItems:w?v("postType",s,x):null}},[r,n,i,s]),d=(0,Wd.useMemo)(()=>{let h=(b,w=0)=>b.map(_=>[{value:_.id,label:"\u2014 ".repeat(w)+(0,AJ.decodeEntities)(_.name),rawName:_.name},...h(_.children||[],w+1)]).sort(([_],[P])=>{let I=kJ(_.rawName,r),A=kJ(P.rawName,r);return I>=A?1:-1}).flat();if(!c)return[];let g=c.map(b=>({id:b.id,parent:b.parent??null,name:a1(b)}));r||(g=ADe(g));let v=h(g),y=v.find(b=>b.value===n);return n&&l&&!y&&v.unshift({value:n,label:l,rawName:""}),v.map(b=>({...b,value:b.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,Ud.jsx)(_R.ComboboxControl,{__next40pxDefaultSize:!0,label:(0,$m.__)("Parent"),help:(0,$m.__)("Choose a parent page."),value:n?.toString(),options:d,onFilterValueChange:(0,RJ.debounce)(h=>f(h),300),onChange:m,hideLabelFromVision:!0})}var OJ=({data:e,field:t,onChange:r})=>{let{id:o}=t,n=(0,C8.useSelect)(s=>s(T8.store).getEntityRecord("root","__unstableBase")?.home,[]),i=(0,Wd.useCallback)(s=>r({[o]:s}),[o,r]);return(0,Ud.jsx)("fieldset",{className:"fields-controls__parent",children:(0,Ud.jsxs)("div",{children:[(0,Wd.createInterpolateElement)((0,$m.sprintf)((0,$m.__)('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,IJ.filterURLForDisplay)(n).replace(/([/.])/g,"<wbr />$1")),{wbr:(0,Ud.jsx)("wbr",{})}),(0,Ud.jsx)("p",{children:(0,Wd.createInterpolateElement)((0,$m.__)("They also show up as sub-items in the default navigation menu. <a>Learn more.</a>"),{a:(0,Ud.jsx)(_R.ExternalLink,{href:(0,$m.__)("https://wordpress.org/documentation/article/page-post-settings-sidebar/#page-attributes"),children:void 0})})}),(0,Ud.jsx)(IDe,{data:e,onChangeControl:i})]})})};var NJ=a(G(),1),MJ=a(ee(),1),DJ=a(j(),1);var Yb=a(T(),1),FJ=({item:e})=>{let t=(0,NJ.useSelect)(r=>{let{getEntityRecord:o}=r(MJ.store);return e?.parent?o("postType",e.type,e.parent):null},[e.parent,e.type]);return t?(0,Yb.jsx)(Yb.Fragment,{children:a1(t)}):(0,Yb.jsx)(Yb.Fragment,{children:(0,DJ.__)("None")})};var ODe={id:"parent",type:"text",label:(0,LJ.__)("Parent"),Edit:OJ,render:FJ,enableSorting:!0,filterBy:!1},E8=ODe;var jJ=a(j(),1);var Kb=a(W(),1),BJ=a(U(),1),l1=a(j(),1),qb=a(T(),1);function NDe({data:e,onChange:t,field:r}){let[o,n]=(0,BJ.useState)(!!r.getValue({item:e})),i=s=>{n(s),s||t({password:""})};return(0,qb.jsxs)(Kb.__experimentalVStack,{as:"fieldset",spacing:4,className:"fields-controls__password",children:[(0,qb.jsx)(Kb.CheckboxControl,{label:(0,l1.__)("Password protected"),help:(0,l1.__)("Only visible to those who know the password"),checked:o,onChange:i}),o&&(0,qb.jsx)("div",{className:"fields-controls__password-input",children:(0,qb.jsx)(Kb.TextControl,{label:(0,l1.__)("Password"),onChange:s=>t({password:s}),value:r.getValue({item:e})||"",placeholder:(0,l1.__)("Use a secure password"),type:"text",__next40pxDefaultSize:!0,maxLength:255})})]})}var VJ=NDe;var MDe={id:"password",type:"text",label:(0,jJ.__)("Password"),Edit:VJ,enableSorting:!1,enableHiding:!1,isVisible:e=>e.status!=="private",filterBy:!1},P8=MDe;var HJ=a(j(),1);var TR=a(W(),1);var pl=a(j(),1),DDe=[{value:"draft",label:(0,pl.__)("Draft"),icon:sb,description:(0,pl.__)("Not ready to publish.")},{value:"future",label:(0,pl.__)("Scheduled"),icon:cg,description:(0,pl.__)("Publish automatically on a chosen date.")},{value:"pending",label:(0,pl.__)("Pending Review"),icon:Xx,description:(0,pl.__)("Waiting for review before publishing.")},{value:"private",label:(0,pl.__)("Private"),icon:Yx,description:(0,pl.__)("Only visible to site admins and editors.")},{value:"publish",label:(0,pl.__)("Published"),icon:ag,description:(0,pl.__)("Visible to everyone.")},{value:"trash",label:(0,pl.__)("Trash"),icon:Dd}],CR=DDe;var Zb=a(T(),1);function FDe({item:e}){let t=CR.find(({value:n})=>n===e.status),r=t?.label||e.status,o=t?.icon;return(0,Zb.jsxs)(TR.__experimentalHStack,{alignment:"left",spacing:0,children:[o&&(0,Zb.jsx)("div",{className:"fields-controls__status-icon",children:(0,Zb.jsx)(TR.Icon,{icon:o})}),(0,Zb.jsx)("span",{children:r})]})}var zJ=FDe;var LDe="isAny",BDe={label:(0,HJ.__)("Status"),id:"status",type:"text",elements:CR,render:zJ,Edit:"radio",enableSorting:!1,filterBy:{operators:[LDe]}},k8=BDe;var Xb=a(j(),1),VDe={id:"comment_status",label:(0,Xb.__)("Comments"),type:"text",Edit:"radio",enableSorting:!1,enableHiding:!1,filterBy:!1,elements:[{value:"open",label:(0,Xb.__)("Open"),description:(0,Xb.__)("Visitors can add new comments and replies.")},{value:"closed",label:(0,Xb.__)("Closed"),description:(0,Xb.__)("Visitors cannot add new comments or replies. Existing comments remain visible.")}]},R8=VDe;var Gd=a(j(),1),ER=a(W(),1),A8=a(T(),1);function jDe({data:e,onChange:t}){let r=e?.ping_status??"open",o=n=>{t({...e,ping_status:n?"open":"closed"})};return(0,A8.jsx)(ER.CheckboxControl,{label:(0,Gd.__)("Enable pingbacks & trackbacks"),checked:r==="open",onChange:o,help:(0,A8.jsx)(ER.ExternalLink,{href:(0,Gd.__)("https://wordpress.org/documentation/article/trackbacks-and-pingbacks/"),children:(0,Gd.__)("Learn more about pingbacks & trackbacks")})})}var zDe={id:"ping_status",label:(0,Gd.__)("Trackbacks & Pingbacks"),type:"text",Edit:jDe,enableSorting:!1,enableHiding:!1,filterBy:!1,elements:[{value:"open",label:(0,Gd.__)("Allow"),description:(0,Gd.__)("Allow link notifications from other blogs (pingbacks and trackbacks) on new articles.")},{value:"closed",label:(0,Gd.__)("Don't allow"),description:(0,Gd.__)("Don't allow link notifications from other blogs (pingbacks and trackbacks) on new articles.")}]},I8=zDe;var Qb=a(j(),1),HDe={id:"discussion",label:(0,Qb.__)("Discussion"),type:"text",render:({item:e})=>{let t=e.comment_status==="open",r=e.ping_status==="open";return t&&r?(0,Qb.__)("Open"):t&&!r?(0,Qb.__)("Comments only"):!t&&r?(0,Qb.__)("Pings only"):(0,Qb.__)("Closed")},filterBy:!1},O8=HDe;var WJ=a(j(),1);var yu=a(j(),1),u1=a(U(),1),ep=a(go(),1),vu=a(T(),1),c1=e=>(0,ep.dateI18n)((0,ep.getSettings)().formats.datetimeAbbreviated,(0,ep.getDate)(e)),UDe=({item:e})=>{if(["draft","private"].includes(e.status??""))return(0,u1.createInterpolateElement)((0,yu.sprintf)((0,yu.__)("<span>Modified: <time>%s</time></span>"),c1(e.date??null)),{span:(0,vu.jsx)("span",{}),time:(0,vu.jsx)("time",{})});if(e.status==="future")return(0,u1.createInterpolateElement)((0,yu.sprintf)((0,yu.__)("<span>Scheduled: <time>%s</time></span>"),c1(e.date??null)),{span:(0,vu.jsx)("span",{}),time:(0,vu.jsx)("time",{})});if(e.status==="publish")return(0,u1.createInterpolateElement)((0,yu.sprintf)((0,yu.__)("<span>Published: <time>%s</time></span>"),c1(e.date??null)),{span:(0,vu.jsx)("span",{}),time:(0,vu.jsx)("time",{})});let n=(0,ep.getDate)(e.modified??null)>(0,ep.getDate)(e.date??null)?e.modified:e.date;return e.status==="pending"?(0,u1.createInterpolateElement)((0,yu.sprintf)((0,yu.__)("<span>Modified: <time>%s</time></span>"),c1(n??null)),{span:(0,vu.jsx)("span",{}),time:(0,vu.jsx)("time",{})}):(0,vu.jsx)("time",{children:c1(e.date??null)})},UJ=UDe;var WDe={id:"date",type:"datetime",label:(0,WJ.__)("Date"),render:UJ,filterBy:{operators:["before","after"]}},N8=WDe;var GJ=a(j(),1),GDe={id:"scheduled_date",type:"datetime",label:(0,GJ.__)("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},M8=GDe;var QJ=a(j(),1),JJ=a(G(),1),$J=a(ee(),1);var YJ=a(j(),1),qJ=a(U(),1);var PR=a(W(),1),KJ=a(G(),1),ZJ=a(ee(),1),tp=a(T(),1);function YDe({item:e}){let t=e?.author,r=e?._embedded?.author?.[0]?.id,o=!!(t&&(!r||t!==r)),n=(0,KJ.useSelect)(u=>{if(!o)return null;let{getEntityRecord:d}=u(ZJ.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,qJ.useState)(!1);return(0,tp.jsxs)(PR.__experimentalHStack,{alignment:"left",spacing:0,children:[!!s&&(0,tp.jsx)("div",{className:Z("fields-controls__author-avatar",{"is-loaded":l}),children:(0,tp.jsx)("img",{onLoad:()=>c(!0),alt:(0,YJ.__)("Author avatar"),src:s})}),!s&&(0,tp.jsx)("div",{className:"fields-controls__author-icon",children:(0,tp.jsx)(PR.Icon,{icon:Dx})}),(0,tp.jsx)("span",{className:"fields-controls__author-name",children:i})]})}var XJ=YDe;var qDe={label:(0,QJ.__)("Author"),id:"author",type:"integer",getElements:async()=>(await(0,JJ.resolveSelect)($J.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:XJ,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"]}},d1=qDe;var e$=a(j(),1),KDe={id:"notesCount",label:(0,e$.__)("Notes"),type:"integer",enableSorting:!1,filterBy:!1},D8=KDe;var F8=a(Ot(),1),Jb=a(j(),1),kR=a(W(),1),L8=a(T(),1),ZDe={id:"excerpt",type:"text",label:(0,Jb.__)("Excerpt"),placeholder:(0,Jb.__)("Add an excerpt"),description:(0,L8.jsx)(kR.ExternalLink,{href:(0,Jb.__)("https://wordpress.org/documentation/article/page-post-settings-sidebar/#excerpt"),children:(0,Jb.__)("Learn more about manual excerpts")}),render:({item:e})=>{let t;return typeof e.excerpt=="string"?t=e.excerpt?(0,F8.decodeEntities)(e.excerpt):(0,Jb.__)("Add an excerpt"):t=(0,F8.decodeEntities)(e.excerpt?.raw||""),(0,L8.jsx)(kR.__experimentalText,{align:"left",numberOfLines:3,truncate:!0,children:t})},Edit:{control:"textarea",rows:4},enableSorting:!1,filterBy:!1},B8=ZDe;var hl=a(j(),1),t$=a(G(),1),r$=a(ee(),1),XDe=[{id:"aside",caption:(0,hl.__)("Aside")},{id:"audio",caption:(0,hl.__)("Audio")},{id:"chat",caption:(0,hl.__)("Chat")},{id:"gallery",caption:(0,hl.__)("Gallery")},{id:"image",caption:(0,hl.__)("Image")},{id:"link",caption:(0,hl.__)("Link")},{id:"quote",caption:(0,hl.__)("Quote")},{id:"standard",caption:(0,hl.__)("Standard")},{id:"status",caption:(0,hl.__)("Status")},{id:"video",caption:(0,hl.__)("Video")}].sort((e,t)=>{let r=e.caption.toUpperCase(),o=t.caption.toUpperCase();return r<o?-1:r>o?1:0}),QDe={id:"format",label:(0,hl.__)("Format"),type:"text",Edit:"radio",enableSorting:!1,enableHiding:!1,filterBy:!1,getElements:async()=>{let e=await(0,t$.resolveSelect)(r$.store).getThemeSupports();return XDe.filter(t=>e?.formats?.includes(t.id)).map(t=>({value:t.id,label:t.caption}))}},V8=QDe;var l$=a(j(),1);var f1=a(W(),1),Gs=a(j(),1),n$=a($b(),1),i$=a(go(),1),s$=a(U(),1),m1=a(T(),1),JDe=189;function a$({item:e}){let t="";typeof e.content=="string"?t=e.content:typeof e.content=="function"&&(t=e.content(e));let r=(0,Gs._x)("words","Word count type. Do not translate!"),o=(0,s$.useMemo)(()=>t?(0,n$.count)(t,r):0,[t,r]),n=e.modified;if(!o&&!n)return null;let i;if(o){let s=Math.round(o/JDe),l=(0,Gs.sprintf)((0,Gs._n)("%s word","%s words",o),o.toLocaleString()),c=s<=1?(0,Gs.__)("1 minute"):(0,Gs.sprintf)((0,Gs._n)("%s minute","%s minutes",s),s.toLocaleString());i=(0,Gs.sprintf)((0,Gs.__)("%1$s, %2$s read time."),l,c)}return(0,m1.jsxs)(f1.__experimentalVStack,{spacing:1,children:[i&&(0,m1.jsx)(f1.__experimentalText,{variant:"muted",children:i}),n&&(0,m1.jsx)(f1.__experimentalText,{variant:"muted",children:(0,Gs.sprintf)((0,Gs.__)("Last edited %s."),(0,i$.humanTimeDiff)(n))})]})}var $De={label:(0,l$.__)("Post content information"),id:"post-content-info",type:"text",readOnly:!0,render:a$,enableSorting:!1,enableHiding:!1,filterBy:!1},j8=$De;var z8=a(j(),1),eFe={id:"sticky",type:"boolean",label:(0,z8.__)("Sticky"),description:(0,z8.__)("Pin this post to the top of the blog."),enableSorting:!1,enableHiding:!1,isVisible:e=>!!e._links?.["wp:action-sticky"],filterBy:!1},H8=eFe;var c$=a(j(),1),tFe={id:"view-post",label:(0,c$._x)("View","verb"),isPrimary:!0,icon:Bs,isEligible(e){return e.status!=="trash"},callback(e,{onActionPerformed:t}){let r=e[0];window.open(r?.link,"_blank"),t&&t(e)}},U8=tFe;var W8=a(G(),1),u$=a(ee(),1),rp=a(j(),1),d$=a(xt(),1),f$=a(U(),1),qd=a(W(),1),Yd=a(T(),1);function rFe(e){return typeof e.menu_order=="number"&&Number.isInteger(e.menu_order)}function oFe({items:e,closeModal:t,onActionPerformed:r}){let[o,n]=(0,f$.useState)(e[0]),{editEntityRecord:i,saveEditedEntityRecord:s}=(0,W8.useDispatch)(u$.store),{createSuccessNotice:l,createErrorNotice:c}=(0,W8.useDispatch)(d$.store),u=rFe(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,rp.__)("Order updated."),{type:"snackbar"}),r?.(e)}catch(m){let h=m,g=h.message&&h.code!=="unknown_error"?h.message:(0,rp.__)("An error occurred while updating the order");c(g,{type:"snackbar"})}}return(0,Yd.jsx)("form",{onSubmit:d,children:(0,Yd.jsxs)(qd.__experimentalVStack,{spacing:"5",children:[(0,Yd.jsx)("div",{children:(0,rp.__)("Determines the order of pages. Pages with the same order value are sorted alphabetically. Negative order values are supported.")}),(0,Yd.jsx)(qd.__experimentalInputControl,{__next40pxDefaultSize:!0,label:(0,rp.__)("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,Yd.jsxs)(qd.__experimentalHStack,{justify:"right",children:[(0,Yd.jsx)(qd.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:()=>{t?.()},children:(0,rp.__)("Cancel")}),(0,Yd.jsx)(qd.Button,{__next40pxDefaultSize:!0,variant:"primary",type:"submit",accessibleWhenDisabled:!0,disabled:!u,children:(0,rp.__)("Save")})]})]})})}var nFe={id:"order-pages",label:(0,rp.__)("Order"),isEligible({status:e}){return e!=="trash"},modalFocusOnMount:"firstContentElement",RenderModal:oFe},G8=nFe;var Y8=a(G(),1),m$=a(ee(),1),Si=a(j(),1),p$=a(xt(),1),q8=a(U(),1),Zd=a(W(),1);var Kd=a(T(),1),iFe={id:"duplicate-post",label:(0,Si._x)("Duplicate","action label"),isEligible({status:e}){return e!=="trash"},modalFocusOnMount:"firstContentElement",RenderModal:({items:e,closeModal:t,onActionPerformed:r})=>{let[o,n]=(0,q8.useState)({...e[0],title:(0,Si.sprintf)((0,Si._x)("%s (Copy)","post"),ot(e[0]))}),[i,s]=(0,q8.useState)(!1),{saveEntityRecord:l}=(0,Y8.useDispatch)(m$.store),{createSuccessNotice:c,createErrorNotice:u}=(0,Y8.useDispatch)(p$.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,Si.__)("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(y=>y.startsWith(g)).map(y=>y.slice(g.length)).forEach(y=>{o.hasOwnProperty(y)&&(h[y]=o[y])}),s(!0);try{let y=await l("postType",o.type,h,{throwOnError:!0});c((0,Si.sprintf)((0,Si.__)('"%s" successfully created.'),ot(y)),{id:"duplicate-post-action",type:"snackbar"}),r&&r([y])}catch(y){let b=y,w=b.message&&b.code!=="unknown_error"?b.message:(0,Si.__)("An error occurred while duplicating the page.");u(w,{type:"snackbar"})}finally{s(!1),t?.()}}return(0,Kd.jsx)("form",{onSubmit:d,children:(0,Kd.jsxs)(Zd.__experimentalVStack,{spacing:3,children:[typeof o.id=="string"&&(0,Kd.jsx)("div",{children:(0,Si.__)("You are about to duplicate a bundled template. Changes will not be live until you activate the new template.")}),(0,Kd.jsx)(Zd.__experimentalInputControl,{__next40pxDefaultSize:!0,label:(0,Si.__)("Title"),placeholder:(0,Si.__)("No title"),value:ot(o),onChange:f=>n(m=>({...m,title:f||(0,Si.__)("No title")}))}),(0,Kd.jsxs)(Zd.__experimentalHStack,{spacing:2,justify:"end",children:[(0,Kd.jsx)(Zd.Button,{variant:"tertiary",onClick:t,__next40pxDefaultSize:!0,children:(0,Si.__)("Cancel")}),(0,Kd.jsx)(Zd.Button,{variant:"primary",type:"submit",isBusy:i,"aria-disabled":i,__next40pxDefaultSize:!0,children:(0,Si._x)("Duplicate","action label")})]})]})})}},K8=iFe;var Z8=a(G(),1),h$=a(ee(),1),Vg=a(j(),1),g$=a(U(),1),v$=a(ic(),1),Xd=a(W(),1),y$=a(xt(),1);var op=a(T(),1),{PATTERN_TYPES:sFe}=Tn(v$.privateApis),aFe={id:"rename-post",label:(0,Vg.__)("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)?wY(e)&&!window?.__experimentalTemplateActivate?Uk(e)&&e.is_custom&&e.permissions?.update:SY(e)?e.source==="custom"&&!e?.has_theme_file&&e.permissions?.update:e.type===sFe.user&&e.permissions?.update:e.permissions?.update},RenderModal:({items:e,closeModal:t,onActionPerformed:r})=>{let[o]=e,[n,i]=(0,g$.useState)(()=>ot(o,"")),{editEntityRecord:s,saveEditedEntityRecord:l}=(0,Z8.useDispatch)(h$.store),{createSuccessNotice:c,createErrorNotice:u}=(0,Z8.useDispatch)(y$.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,Vg.__)("Name updated"),{type:"snackbar"}),r?.(e)}catch(m){let h=m,g=h.message&&h.code!=="unknown_error"?h.message:(0,Vg.__)("An error occurred while updating the name");u(g,{type:"snackbar"})}}return(0,op.jsx)("form",{onSubmit:d,children:(0,op.jsxs)(Xd.__experimentalVStack,{spacing:"5",children:[(0,op.jsx)(Xd.TextControl,{__next40pxDefaultSize:!0,label:(0,Vg.__)("Name"),value:n,onChange:i,required:!0}),(0,op.jsxs)(Xd.__experimentalHStack,{justify:"right",children:[(0,op.jsx)(Xd.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:()=>{t?.()},children:(0,Vg.__)("Cancel")}),(0,op.jsx)(Xd.Button,{__next40pxDefaultSize:!0,variant:"primary",type:"submit",children:(0,Vg.__)("Save")})]})]})})}},X8=aFe;var xi=a(G(),1),jg=a(ee(),1),$o=a(j(),1),np=a(xt(),1),b$=a(U(),1),RR=a(bt(),1),Qd=a(W(),1),w$=a(vo(),1),S$=a(Fd(),1);var zg=a(T(),1),lFe=e=>e?e.source==="custom"&&(!!e?.plugin||e?.has_theme_file):!1,cFe=async(e,{allowUndo:t=!0}={})=>{let r="edit-site-template-reverted";if((0,xi.dispatch)(np.store).removeNotice(r),!lFe(e)){(0,xi.dispatch)(np.store).createErrorNotice((0,$o.__)("This template is not revertable."),{type:"snackbar"});return}try{let o=(0,xi.select)(jg.store).getEntityConfig("postType",e.type);if(!o){(0,xi.dispatch)(np.store).createErrorNotice((0,$o.__)("The editor has encountered an unexpected error. Please reload."),{type:"snackbar"});return}let n=(0,w$.addQueryArgs)(`${o.baseURL}/${e.id}`,{context:"edit",source:e.origin}),i=await(0,S$.default)({path:n});if(!i){(0,xi.dispatch)(np.store).createErrorNotice((0,$o.__)("The editor has encountered an unexpected error. Please reload."),{type:"snackbar"});return}let s=({blocks:u=[]})=>(0,RR.__unstableSerializeAndClean)(u),l=(0,xi.select)(jg.store).getEditedEntityRecord("postType",e.type,e.id);(0,xi.dispatch)(jg.store).editEntityRecord("postType",e.type,e.id,{content:s,blocks:l.blocks,source:"custom"},{undoIgnore:!0});let c=(0,RR.parse)(i?.content?.raw);if((0,xi.dispatch)(jg.store).editEntityRecord("postType",e.type,i.id,{content:s,blocks:c,source:"theme"}),t){let u=()=>{(0,xi.dispatch)(jg.store).editEntityRecord("postType",e.type,l.id,{content:s,blocks:l.blocks,source:"custom"})};(0,xi.dispatch)(np.store).createSuccessNotice((0,$o.__)("Template reset."),{type:"snackbar",id:r,actions:[{label:(0,$o.__)("Undo"),onClick:u}]})}}catch(o){let n=o.message&&o.code!=="unknown_error"?o.message:(0,$o.__)("Template revert failed. Please reload.");(0,xi.dispatch)(np.store).createErrorNotice(n,{type:"snackbar"})}},uFe={id:"reset-post",label:(0,$o.__)("Reset"),isEligible:e=>window?.__experimentalTemplateActivate?e.type==="wp_template_part"&&e?.source==="custom"&&e?.has_theme_file:Ld(e)&&e?.source==="custom"&&(!!(e.type==="wp_template"&&e?.plugin)||e?.has_theme_file),icon:Id,supportsBulk:!0,hideModalHeader:!0,modalFocusOnMount:"firstContentElement",RenderModal:({items:e,closeModal:t,onActionPerformed:r})=>{let[o,n]=(0,b$.useState)(!1),{saveEditedEntityRecord:i}=(0,xi.useDispatch)(jg.store),{createSuccessNotice:s,createErrorNotice:l}=(0,xi.useDispatch)(np.store),c=async()=>{try{for(let u of e)await cFe(u,{allowUndo:!1}),await i("postType",u.type,u.id);s(e.length>1?(0,$o.sprintf)((0,$o.__)("%d items reset."),e.length):(0,$o.sprintf)((0,$o.__)('"%s" reset.'),ot(e[0])),{type:"snackbar",id:"revert-template-action"})}catch(u){let d;e[0].type==="wp_template"?d=e.length===1?(0,$o.__)("An error occurred while reverting the template."):(0,$o.__)("An error occurred while reverting the templates."):d=e.length===1?(0,$o.__)("An error occurred while reverting the template part."):(0,$o.__)("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,zg.jsxs)(Qd.__experimentalVStack,{spacing:"5",children:[(0,zg.jsx)(Qd.__experimentalText,{children:(0,$o.__)("Reset to default and clear all customizations?")}),(0,zg.jsxs)(Qd.__experimentalHStack,{justify:"right",children:[(0,zg.jsx)(Qd.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:t,disabled:o,accessibleWhenDisabled:!0,children:(0,$o.__)("Cancel")}),(0,zg.jsx)(Qd.Button,{__next40pxDefaultSize:!0,variant:"primary",onClick:async()=>{n(!0),await c(),r?.(e),n(!1),t?.()},isBusy:o,disabled:o,accessibleWhenDisabled:!0,children:(0,$o.__)("Reset")})]})]})}},Q8=uFe;var AR=a(j(),1),x$=a(ic(),1);var _$=a(T(),1),{CreatePatternModalContents:dFe,useDuplicatePatternProps:fFe}=Tn(x$.privateApis),mFe={id:"duplicate-pattern",label:(0,AR._x)("Duplicate","action label"),isEligible:e=>e.type!=="wp_template_part",modalHeader:(0,AR._x)("Duplicate pattern","action label"),modalFocusOnMount:"firstContentElement",RenderModal:({items:e,closeModal:t})=>{let[r]=e,o=fFe({pattern:r,onSuccess:()=>t?.()});return(0,_$.jsx)(dFe,{onClose:t,confirmLabel:(0,AR._x)("Duplicate","action label"),...o})}},J8=mFe;var e0=function(){return e0=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},e0.apply(this,arguments)};function C$(e){return e.toLowerCase()}var pFe=[/([a-z0-9])([A-Z])/g,/([A-Z])([A-Z][a-z])/g],hFe=/[^A-Z0-9]+/gi;function E$(e,t){t===void 0&&(t={});for(var r=t.splitRegexp,o=r===void 0?pFe:r,n=t.stripRegexp,i=n===void 0?hFe:n,s=t.transform,l=s===void 0?C$:s,c=t.delimiter,u=c===void 0?" ":c,d=T$(T$(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 T$(e,t,r){return t instanceof RegExp?e.replace(t,r):t.reduce(function(o,n){return o.replace(n,r)},e)}function P$(e,t){return t===void 0&&(t={}),E$(e,e0({delimiter:"."},t))}function Hg(e,t){return t===void 0&&(t={}),P$(e,e0({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 r0=e=>new DataView(new ArrayBuffer(e)),Jd=e=>new Uint8Array(e.buffer||e),t0=e=>new TextEncoder().encode(String(e)),Ug=e=>Math.min(4294967295,Number(e)),k$=e=>Math.min(65535,Number(e));function gFe(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:t0(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:Jd(e)};if(Symbol.asyncIterator in e)return{isFile:1,t,i:A$(e[Symbol.asyncIterator]())};throw new TypeError("Unsupported input format.")}function A$(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=vFe(n.value);r.enqueue(i),o+=i.byteLength}}},cancel(r){t.throw?.(r)}})}function vFe(e){return typeof e=="string"?t0(e):e instanceof Uint8Array?e:Jd(e)}function I$(e,t,r){let[o,n]=(function(i){return i?i instanceof Uint8Array?[i,1]:ArrayBuffer.isView(i)||i instanceof ArrayBuffer?[Jd(i),1]:[t0(i),0]:[void 0,0]})(t);if(e instanceof File)return{o:$8(o||t0(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:$8(o||t0(c)),u:BigInt(u),l:n}}return o=$8(o,e!==void 0||r!==void 0),typeof e=="string"?{o,u:BigInt(t0(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:yFe(e,r),l:n}}function yFe(e,t){return t>-1?BigInt(t):e?void 0:0n}function $8(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 O$=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);O$[e]=t}function R$(e,t=0){t^=-1;for(var r=0,o=e.length;r<o;r++)t=t>>>8^O$[255&t^e[r]];return(-1^t)>>>0}function N$(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 bFe({o:e,l:t},r){return 8*(!t||(r??(function(o){try{wFe.decode(o)}catch{return 0}return 1})(e)))}var wFe=new TextDecoder("utf8",{fatal:1});function SFe(e,t=0){let r=r0(30);return r.setUint32(0,1347093252),r.setUint32(4,754976768|t),N$(e.t,r,10),r.setUint16(26,e.o.length,1),Jd(r)}async function*xFe(e){let{i:t}=e;if("then"in t&&(t=await t),t instanceof Uint8Array)yield t,e.m=R$(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=R$(o,e.m),e.u+=BigInt(o.length),yield o}}}function _Fe(e,t){let r=r0(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,Ug(e.u),1),r.setUint32(12,Ug(e.u),1)),Jd(r)}function CFe(e,t,r=0,o=0){let n=r0(46);return n.setUint32(0,1347092738),n.setUint32(4,755182848),n.setUint16(8,2048|r),N$(e.t,n,12),n.setUint32(16,e.isFile?e.m:0,1),n.setUint32(20,Ug(e.u),1),n.setUint32(24,Ug(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,Ug(t),1),Jd(n)}function TFe(e,t,r){let o=r0(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),Jd(o)}function M$(e){return e instanceof File||e instanceof Response?[[e],[e]]:[[e.input,e.name,e.size],[e.input,e.lastModified]]}var EFe=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 I$(...M$(r)[0])})(e));function D$(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(EFe(t.metadata))),new Response(PFe(e,t),{headers:r})}function PFe(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]=M$(i.value);return{done:0,value:Object.assign(gFe(...l),I$(...s))}},throw:n.throw?.bind(n),[Symbol.asyncIterator](){return this}}})(e);return A$((async function*(o,n){let i=[],s=0n,l=0n,c=0;for await(let f of o){let m=bFe(f,n.buffersAreUTF8);yield SFe(f,m),yield new Uint8Array(f.o),f.isFile&&(yield*xFe(f));let h=f.u>=0xffffffffn,g=12*(s>=0xffffffffn)|28*h;yield _Fe(f,h),i.push(CFe(f,s,m,g)),i.push(f.o),g&&i.push(TFe(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=r0(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 Jd(f)}let d=r0(22);d.setUint32(0,1347093766),d.setUint16(8,k$(l),1),d.setUint16(10,k$(l),1),d.setUint32(12,Ug(u),1),d.setUint32(16,Ug(s),1),yield Jd(d)})(r,t),r)}var e7=a(v_(),1),t7=a(j(),1);function F$(e){return JSON.stringify({__file:e.type,title:ot(e),content:typeof e.content=="string"?e.content:e.content?.raw,syncStatus:e.wp_pattern_sync_status},null,2)}var kFe={id:"export-pattern",label:(0,t7.__)("Export as JSON"),icon:X3,supportsBulk:!0,isEligible:e=>e.type==="wp_block",callback:async e=>{if(e.length===1)return(0,e7.downloadBlob)(`${Hg(ot(e[0])||e[0].slug)}.json`,F$(e[0]),"application/json");let t={},r=e.map(o=>{let n=Hg(ot(o)||o.slug);return t[n]=(t[n]||0)+1,{name:`${n+(t[n]>1?"-"+(t[n]-1):"")}.json`,lastModified:new Date,input:F$(o)}});return(0,e7.downloadBlob)((0,t7.__)("patterns-export")+".zip",await D$(r).blob(),"application/zip")}},r7=kFe;var L$=a(vo(),1),IR=a(j(),1),RFe={id:"view-post-revisions",context:"list",label(e){let t=e[0]._links?.["version-history"]?.[0]?.count??0;return(0,IR.sprintf)((0,IR.__)("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,L$.addQueryArgs)("revision.php",{revision:r?._links?.["predecessor-version"]?.[0]?.id});document.location.href=o,t&&t(e)}},o7=RFe;var B$=a(ee(),1),dn=a(j(),1),V$=a(xt(),1);var j$=a(U(),1),n7=a(G(),1),$d=a(W(),1),z$=a(Ot(),1);var Wg=a(T(),1),AFe={id:"permanently-delete",label:(0,dn.__)("Permanently delete"),supportsBulk:!0,icon:Dd,isEligible(e){if(Ld(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,j$.useState)(!1),{createSuccessNotice:i,createErrorNotice:s}=(0,n7.useDispatch)(V$.store),{deleteEntityRecord:l}=(0,n7.useDispatch)(B$.store);return(0,Wg.jsxs)($d.__experimentalVStack,{spacing:"5",children:[(0,Wg.jsx)($d.__experimentalText,{children:e.length>1?(0,dn.sprintf)((0,dn._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,dn.sprintf)((0,dn.__)('Are you sure you want to permanently delete "%s"?'),(0,z$.decodeEntities)(ot(e[0])))}),(0,Wg.jsxs)($d.__experimentalHStack,{justify:"right",children:[(0,Wg.jsx)($d.Button,{variant:"tertiary",onClick:t,disabled:o,accessibleWhenDisabled:!0,__next40pxDefaultSize:!0,children:(0,dn.__)("Cancel")}),(0,Wg.jsx)($d.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,dn.sprintf)((0,dn.__)('"%s" permanently deleted.'),ot(e[0])):u=(0,dn.__)("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,dn.__)("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,dn.__)("An error occurred while permanently deleting the items."):d.size===1?u=(0,dn.sprintf)((0,dn.__)("An error occurred while permanently deleting the items: %s"),[...d][0]):u=(0,dn.sprintf)((0,dn.__)("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,dn.__)("Delete permanently")})]})]})}},i7=AFe;var H$=a(ee(),1),ls=a(j(),1),U$=a(xt(),1);var IFe={id:"restore",label:(0,ls.__)("Restore"),isPrimary:!0,icon:Id,supportsBulk:!0,isEligible(e){return!Ld(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(U$.store),{editEntityRecord:i,saveEditedEntityRecord:s}=t.dispatch(H$.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,ls.sprintf)((0,ls.__)('"%s" has been restored.'),ot(e[0])):e[0].type==="page"?c=(0,ls.sprintf)((0,ls.__)("%d pages have been restored."),e.length):c=(0,ls.sprintf)((0,ls.__)("%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,ls.__)("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,ls.__)("An error occurred while restoring the posts."):u.size===1?c=(0,ls.sprintf)((0,ls.__)("An error occurred while restoring the posts: %s"),[...u][0]):c=(0,ls.sprintf)((0,ls.__)("Some errors occurred while restoring the posts: %s"),[...u].join(","))}n(c,{type:"snackbar"})}}},s7=IFe;var a7=a(G(),1),W$=a(ee(),1),Fo=a(j(),1),G$=a(xt(),1),Y$=a(U(),1),ef=a(W(),1);var Gg=a(T(),1),OFe={id:"move-to-trash",label:(0,Fo._x)("Trash","verb"),isPrimary:!0,icon:Dd,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,Y$.useState)(!1),{createSuccessNotice:i,createErrorNotice:s}=(0,a7.useDispatch)(G$.store),{deleteEntityRecord:l}=(0,a7.useDispatch)(W$.store);return(0,Gg.jsxs)(ef.__experimentalVStack,{spacing:"5",children:[(0,Gg.jsx)(ef.__experimentalText,{children:e.length===1?(0,Fo.sprintf)((0,Fo.__)('Are you sure you want to move "%s" to the trash?'),ot(e[0])):(0,Fo.sprintf)((0,Fo._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,Gg.jsxs)(ef.__experimentalHStack,{justify:"right",children:[(0,Gg.jsx)(ef.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:t,disabled:o,accessibleWhenDisabled:!0,children:(0,Fo.__)("Cancel")}),(0,Gg.jsx)(ef.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,Fo.sprintf)((0,Fo.__)('"%s" moved to the trash.'),ot(e[0])):u=(0,Fo.sprintf)((0,Fo._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,Fo.__)("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,Fo.__)("An error occurred while moving the items to the trash."):d.size===1?u=(0,Fo.sprintf)((0,Fo.__)("An error occurred while moving the item to the trash: %s"),[...d][0]):u=(0,Fo.sprintf)((0,Fo.__)("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,Fo._x)("Trash","verb")})]})]})}},l7=OFe;var ir=a(j(),1),X$=a(U(),1),tf=a(W(),1),Q$=a(ic(),1),u7=a(Ot(),1);var q$=a(xt(),1),K$=a(ee(),1),c7=a(G(),1);function NFe(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 Z$=async(e,t,r)=>{let{createSuccessNotice:o,createErrorNotice:n}=(0,c7.dispatch)(q$.store),{deleteEntityRecord:i}=(0,c7.dispatch)(K$.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=NFe(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 Yg=a(T(),1),{PATTERN_TYPES:MFe}=Tn(Q$.privateApis),DFe={id:"delete-post",label:(0,ir.__)("Delete"),isPrimary:!0,icon:Dd,isEligible(e){return Ld(e)?Uk(e):e.type===MFe.user},supportsBulk:!0,hideModalHeader:!0,modalFocusOnMount:"firstContentElement",RenderModal:({items:e,closeModal:t,onActionPerformed:r})=>{let[o,n]=(0,X$.useState)(!1),i=e.every(s=>Ld(s)&&s?.has_theme_file);return(0,Yg.jsxs)(tf.__experimentalVStack,{spacing:"5",children:[(0,Yg.jsx)(tf.__experimentalText,{children:e.length>1?(0,ir.sprintf)((0,ir._n)("Delete %d item?","Delete %d items?",e.length),e.length):(0,ir.sprintf)((0,ir._x)('Delete "%s"?',"template part"),ot(e[0]))}),(0,Yg.jsxs)(tf.__experimentalHStack,{justify:"right",children:[(0,Yg.jsx)(tf.Button,{variant:"tertiary",onClick:t,disabled:o,accessibleWhenDisabled:!0,__next40pxDefaultSize:!0,children:(0,ir.__)("Cancel")}),(0,Yg.jsx)(tf.Button,{variant:"primary",onClick:async()=>{n(!0),await Z$(e,{success:{messages:{getMessage:l=>i?(0,ir.sprintf)((0,ir.__)('"%s" reset.'),(0,u7.decodeEntities)(ot(l))):(0,ir.sprintf)((0,ir._x)('"%s" deleted.',"template part"),(0,u7.decodeEntities)(ot(l))),getBatchMessage:()=>i?(0,ir.__)("Items reset."):(0,ir.__)("Items deleted.")}},error:{messages:{getMessage:l=>l.size===1?[...l][0]:i?(0,ir.__)("An error occurred while reverting the item."):(0,ir.__)("An error occurred while deleting the item."),getBatchMessage:l=>l.size===0?i?(0,ir.__)("An error occurred while reverting the items."):(0,ir.__)("An error occurred while deleting the items."):l.size===1?i?(0,ir.sprintf)((0,ir.__)("An error occurred while reverting the items: %s"),[...l][0]):(0,ir.sprintf)((0,ir.__)("An error occurred while deleting the items: %s"),[...l][0]):i?(0,ir.sprintf)((0,ir.__)("Some errors occurred while reverting the items: %s"),[...l].join(",")):(0,ir.sprintf)((0,ir.__)("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,ir.__)("Delete")})]})]})}},d7=DFe;var lee=a(G(),1),rf=a(j(),1),cee=a(xt(),1),uee=a(U(),1),dee=a(bt(),1);var _i=a(W(),1),iee=a(_e(),1),NR=a(ee(),1),n0=a(G(),1),OR=a(U(),1),o0=a(j(),1);var see=a(xt(),1),aee=a(bt(),1);var J$=a(G(),1),$$=a(ee(),1),eee=()=>(0,J$.useSelect)(e=>e($$.store).getEntityRecords("postType","wp_template_part",{per_page:-1}),[])??[],tee=(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}`},ree=e=>Hg(e).replace(/[^\w-]+/g,"")||"wp-custom-part";var fn=a(T(),1);function oee(e,t){return`fields-create-template-part-modal__area-option-${e}-${t}`}function nee(e,t){return`fields-create-template-part-modal__area-option-description-${e}-${t}`}function i0({modalTitle:e,...t}){let r=(0,n0.useSelect)(o=>o(NR.store).getPostType("wp_template_part")?.labels?.add_new_item,[]);return(0,fn.jsx)(_i.Modal,{title:e||r,onRequestClose:t.closeModal,overlayClassName:"fields-create-template-part-modal",focusOnMount:"firstContentElement",size:"medium",children:(0,fn.jsx)(f7,{...t})})}var FFe=e=>e==="header"?jx:e==="footer"?Lx:e==="sidebar"?r_:e==="navigation-overlay"?Gx:dg;function f7({defaultArea:e="uncategorized",blocks:t=[],confirmLabel:r=(0,o0.__)("Add"),closeModal:o,onCreate:n,onError:i,defaultTitle:s=""}){let{createErrorNotice:l}=(0,n0.useDispatch)(see.store),{saveEntityRecord:c}=(0,n0.useDispatch)(NR.store),u=eee(),[d,f]=(0,OR.useState)(s),[m,h]=(0,OR.useState)(e),[g,v]=(0,OR.useState)(!1),y=(0,iee.useInstanceId)(i0),b=(0,n0.useSelect)(S=>S(NR.store).getCurrentTheme()?.default_template_part_areas,[]);async function w(){if(!(!d||g))try{v(!0);let S=tee(d,u),x=ree(S),_=await c("postType","wp_template_part",{slug:x,title:S,content:(0,aee.serialize)(t),area:m},{throwOnError:!0});await n(_)}catch(S){let x=S instanceof Error&&"code"in S&&S.message&&S.code!=="unknown_error"?S.message:(0,o0.__)("An error occurred while creating the template part.");l(x,{type:"snackbar"}),i?.()}finally{v(!1)}}return(0,fn.jsx)("form",{onSubmit:async S=>{S.preventDefault(),await w()},children:(0,fn.jsxs)(_i.__experimentalVStack,{spacing:"4",children:[(0,fn.jsx)(_i.TextControl,{__next40pxDefaultSize:!0,label:(0,o0.__)("Name"),value:d,onChange:f,required:!0}),(0,fn.jsxs)("fieldset",{className:"fields-create-template-part-modal__area-fieldset",children:[(0,fn.jsx)(_i.BaseControl.VisualLabel,{as:"legend",children:(0,o0.__)("Area")}),(0,fn.jsx)("div",{className:"fields-create-template-part-modal__area-radio-group",children:(b??[]).map(S=>{let x=FFe(S.icon);return(0,fn.jsxs)("div",{className:"fields-create-template-part-modal__area-radio-wrapper",children:[(0,fn.jsx)("input",{type:"radio",id:oee(S.area,y),name:`fields-create-template-part-modal__area-${y}`,value:S.area,checked:m===S.area,onChange:()=>{h(S.area)},"aria-describedby":nee(S.area,y)}),(0,fn.jsx)(_i.Icon,{icon:x,className:"fields-create-template-part-modal__area-radio-icon"}),(0,fn.jsx)("label",{htmlFor:oee(S.area,y),className:"fields-create-template-part-modal__area-radio-label",children:S.label}),(0,fn.jsx)(_i.Icon,{icon:Qn,className:"fields-create-template-part-modal__area-radio-checkmark"}),(0,fn.jsx)("p",{className:"fields-create-template-part-modal__area-radio-description",id:nee(S.area,y),children:S.description})]},S.area)})})]}),(0,fn.jsxs)(_i.__experimentalHStack,{justify:"right",children:[(0,fn.jsx)(_i.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:()=>{o()},children:(0,o0.__)("Cancel")}),(0,fn.jsx)(_i.Button,{__next40pxDefaultSize:!0,variant:"primary",type:"submit","aria-disabled":!d||g,isBusy:g,children:r})]})]})})}var fee=a(T(),1),LFe={id:"duplicate-template-part",label:(0,rf._x)("Duplicate","action label"),isEligible:e=>e.type==="wp_template_part",modalHeader:(0,rf._x)("Duplicate template part","action label"),modalFocusOnMount:"firstContentElement",RenderModal:({items:e,closeModal:t})=>{let[r]=e,o=(0,uee.useMemo)(()=>r.blocks??(0,dee.parse)(typeof r.content=="string"?r.content:r.content.raw,{__unstableSkipMigrationLogs:!0}),[r.content,r.blocks]),{createSuccessNotice:n}=(0,lee.useDispatch)(cee.store);function i(s){n((0,rf.sprintf)((0,rf._x)('"%s" duplicated.',"template part"),ot(s)),{type:"snackbar",id:"edit-site-patterns-success"}),t?.()}return(0,fee.jsx)(f7,{blocks:o,defaultArea:r.area,defaultTitle:(0,rf.sprintf)((0,rf._x)("%s (Copy)","template part"),ot(r)),onCreate:i,onError:t,confirmLabel:(0,rf._x)("Duplicate","action label"),closeModal:t??(()=>{})})}},m7=LFe;var mee=a(j(),1),pee=a(W(),1),hee=a(T(),1),BFe={id:"alt_text",type:"text",label:(0,mee.__)("Alt text"),isVisible:e=>e?.media_type==="image",render:({item:e})=>e?.alt_text||"-",Edit:({field:e,onChange:t,data:r})=>(0,hee.jsx)(pee.TextareaControl,{label:e.label,value:r.alt_text||"",onChange:o=>t({alt_text:o}),rows:2}),enableSorting:!1,filterBy:!1},p7=BFe;var wee=a(j(),1);var DR=a(U(),1),h7=a(j(),1);function MR(e){return e?typeof e=="string"?e:typeof e=="object"&&(e.rendered||e.raw)||"":""}var FR=a(T(),1);function gee({item:e}){let[t,r]=(0,DR.useState)(null),o=e.post,n=e._embedded?.["wp:attached-to"]?.[0]?.id,i=e._embedded?.["wp:attached-to"]?.[0]?.title;return(0,DR.useEffect)(()=>{o&&o===n&&r(MR(i)||(0,h7.__)("(no title)")),o||r((0,h7.__)("(Unattached)"))},[o,n,i]),(0,FR.jsx)(FR.Fragment,{children:t})}var BR=a(ee(),1),VR=a(W(),1),LR=a(j(),1),qg=a(U(),1),vee=a(_e(),1),yee=a(G(),1);var g7=a(T(),1);function bee({data:e,onChange:t}){let r=e.post&&e?._embedded?.["wp:attached-to"]?.[0]?[{label:MR(e._embedded?.["wp:attached-to"]?.[0]?.title),value:e.post.toString()}]:[],[o,n]=(0,qg.useState)(r),[i,s]=(0,qg.useState)([]),[l,c]=(0,qg.useState)(!1),[u,d]=(0,qg.useState)(e?.post?.toString()??null),f=(0,yee.useSelect)(y=>y(BR.store).getPostTypes(),[]),m=()=>{t({post:0,_embedded:{...e?._embedded,"wp:attached-to":void 0}}),n([])},h=async y=>{c(!0);let b=await(0,BR.__experimentalFetchLinkSuggestions)(y,{type:"post",isInitialSuggestions:!0},{});s(b);let w=b.map(S=>({label:S.title,value:S.id.toString()}));n(w),c(!1)},g=y=>{if(!y){m();return}if(d(y),y){let b=i.find(w=>w.id===Number(y));if(b&&f){let w=f.find(x=>x.slug===b?.type),S={...w&&{type:w.slug},id:Number(y),title:{raw:b.title,rendered:b.title}};t({post:Number(y),_embedded:{...e?._embedded,"wp:attached-to":[S]}})}}},v=e.post?(0,qg.createInterpolateElement)((0,LR.__)("Search for a post or page to attach this media to or <button>detach current</button>."),{button:(0,g7.jsx)(VR.Button,{__next40pxDefaultSize:!0,onClick:m,variant:"link",accessibleWhenDisabled:!0})}):(0,LR.__)("Search for a post or page to attach this media to.");return(0,g7.jsx)(VR.ComboboxControl,{className:"dataviews-media-field__attached-to",__next40pxDefaultSize:!0,isLoading:l,label:(0,LR.__)("Attached to"),help:v,value:u,options:o,onFilterValueChange:(0,vee.debounce)(y=>h(y),300),onChange:g,hideLabelFromVision:!0})}var VFe={id:"attached_to",type:"text",label:(0,wee.__)("Attached to"),Edit:bee,render:gee,enableSorting:!1,filterBy:!1},v7=VFe;var _ee=a(j(),1),Cee=a(G(),1),Tee=a(ee(),1);var See=a(j(),1),s0=a(U(),1);var jR=a(W(),1),ip=a(T(),1);function xee({item:e}){let t=e?._embedded?.author?.[0],r=t?.name,o=t?.avatar_urls?.[48],[n,i]=(0,s0.useState)("loading");(0,s0.useEffect)(()=>{i("loading")},[o]);let s=(0,s0.useCallback)(c=>{c?.complete&&i("instant")},[]),l=()=>{n==="loading"&&i("loaded")};return(0,ip.jsxs)(jR.__experimentalHStack,{alignment:"left",spacing:0,children:[!!o&&(0,ip.jsx)("div",{className:Z("media-author-field__avatar",{"is-loading":n==="loading","is-loaded":n==="loaded"}),children:(0,ip.jsx)("img",{ref:s,onLoad:l,alt:(0,See.__)("Author avatar"),src:o})}),!o&&(0,ip.jsx)("div",{className:"media-author-field__icon",children:(0,ip.jsx)(jR.Icon,{icon:Dx})}),(0,ip.jsx)("span",{className:"media-author-field__name",children:r})]})}var jFe={label:(0,_ee.__)("Author"),id:"author",type:"integer",getElements:async()=>(await(0,Cee.resolveSelect)(Tee.store).getEntityRecords("root","user",{per_page:-1,who:"authors",_fields:"id,name",context:"view"})??[]).map(({id:t,name:r})=>({value:t,label:r})),render:xee,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},y7=jFe;var Eee=a(j(),1),Pee=a(W(),1);function sp(e){return e?typeof e=="string"?e:typeof e=="object"&&"raw"in e&&e.raw||"":""}var kee=a(T(),1),zFe={id:"caption",type:"text",label:(0,Eee.__)("Caption"),getValue:({item:e})=>sp(e?.caption),render:({item:e})=>sp(e?.caption)||"-",Edit:({field:e,onChange:t,data:r})=>(0,kee.jsx)(Pee.TextareaControl,{label:e.label,value:sp(r.caption)||"",onChange:o=>t({caption:o}),rows:2}),enableSorting:!1,filterBy:!1},b7=zFe;var Ree=a(j(),1),Aee=a(go(),1),HFe={id:"date",type:"datetime",label:(0,Ree.__)("Date added"),filterBy:{operators:["before","after"]},format:{datetime:(0,Aee.getSettings)().formats.datetimeAbbreviated},readOnly:!0},w7=HFe;var Iee=a(j(),1),Oee=a(W(),1);var S7=a(T(),1),UFe={id:"description",type:"text",label:(0,Iee.__)("Description"),getValue:({item:e})=>sp(e?.description),render:({item:e})=>(0,S7.jsx)("div",{children:sp(e?.description)||"-"}),Edit:({field:e,onChange:t,data:r})=>(0,S7.jsx)(Oee.TextareaControl,{label:e.label,value:sp(r.description)||"",onChange:o=>t({description:o}),rows:5}),enableSorting:!1,filterBy:!1},x7=UFe;var Lee=a(j(),1),Bee=a(vo(),1);var Nee=a(W(),1),Mee=a(U(),1),Dee=a(vo(),1),zR=a(T(),1),WFe=15;function Fee({item:e}){let t=(0,Mee.useMemo)(()=>e?.source_url?(0,Dee.getFilename)(e.source_url):null,[e?.source_url]);return t?t.length<=WFe?(0,zR.jsx)("span",{className:"dataviews-media-field__filename",children:t}):(0,zR.jsx)(Nee.Tooltip,{text:t,children:(0,zR.jsx)("span",{className:"dataviews-media-field__filename",tabIndex:-1,children:t})}):""}var GFe={id:"filename",type:"text",label:(0,Lee.__)("File name"),getValue:({item:e})=>(0,Bee.getFilename)(e?.source_url||""),render:Fee,enableSorting:!1,filterBy:!1,readOnly:!0},_7=GFe;var Ci=a(j(),1),jee=1024,zee=1024*jee,Hee=1024*zee,Uee=1024*Hee,Wee=1024*Uee,Gee=1024*Wee,Yee=1024*Gee,YFe=1024*Yee;function Vee(e,t,r=2){return(0,Ci.sprintf)((0,Ci._x)("%1$s %2$s","file size"),e.toLocaleString(void 0,{minimumFractionDigits:0,maximumFractionDigits:r}),t)}function qFe(e,t=2){if(e===0)return Vee(0,(0,Ci._x)("B","unit symbol"),t);let r={[(0,Ci._x)("YB","unit symbol")]:YFe,[(0,Ci._x)("ZB","unit symbol")]:Yee,[(0,Ci._x)("EB","unit symbol")]:Gee,[(0,Ci._x)("PB","unit symbol")]:Wee,[(0,Ci._x)("TB","unit symbol")]:Uee,[(0,Ci._x)("GB","unit symbol")]:Hee,[(0,Ci._x)("MB","unit symbol")]:zee,[(0,Ci._x)("KB","unit symbol")]:jee,[(0,Ci._x)("B","unit symbol")]:1};for(let[o,n]of Object.entries(r))if(e>=n)return Vee(e/n,o,t);return""}var KFe={id:"filesize",type:"text",label:(0,Ci.__)("File size"),getValue:({item:e})=>e?.media_details?.filesize?qFe(e?.media_details?.filesize):"",isVisible:e=>!!e?.media_details?.filesize,enableSorting:!1,filterBy:!1,readOnly:!0},C7=KFe;var a0=a(j(),1),ZFe={id:"media_dimensions",type:"text",label:(0,a0.__)("Dimensions"),getValue:({item:e})=>e?.media_details?.width&&e?.media_details?.height?(0,a0.sprintf)((0,a0._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},T7=ZFe;var qee=a(j(),1),XFe={id:"mime_type",type:"text",label:(0,qee.__)("File type"),getValue:({item:e})=>e?.mime_type||"",render:({item:e})=>e?.mime_type||"-",enableSorting:!1,filterBy:!1,readOnly:!0},E7=XFe;var qhe=a(j(),1);var Whe=a(j(),1),tH=a(he(),1),Ghe=a(G(),1),yT=a(ee(),1);var Ga=a(U(),1),vh=a(G(),1),Jz=a(j(),1),zf=a(ee(),1),jw=a(he(),1),jhe=a(xt(),1),zhe=a(ic(),1),Hhe=a(bt(),1);var Kee=a(U(),1),l0=a(G(),1),Zee=a(_e(),1),Xee=a(he(),1);var HR=a(T(),1);function QFe(e,t,r){if(!r)return t;let o=e.get(t);return o||(o=(0,l0.createRegistry)({"core/block-editor":Xee.storeConfig},t),o.registerStore("core/editor",p1),e.set(t,o)),o}var JFe=(0,Zee.createHigherOrderComponent)(e=>({useSubRegistry:t=!0,...r})=>{let o=(0,l0.useRegistry)(),[n]=(0,Kee.useState)(()=>new WeakMap),i=QFe(n,o,t);return i===o?(0,HR.jsx)(e,{registry:o,...r}):(0,HR.jsx)(l0.RegistryProvider,{value:i,children:(0,HR.jsx)(e,{registry:i,...r})})},"withRegistryProvider"),Qee=JFe;var sy=a(U(),1),fh=a(G(),1),ca=a(ee(),1),fpe=a(j(),1),mpe=a(Rt(),1),ppe=a(_e(),1),hpe=a(bt(),1),k5=a(he(),1);var UR=a(U(),1),Jee=a(T(),1),$ee=(0,UR.createContext)(void 0);function ete({value:e,onChange:t,settings:r={},children:o}){let n={media:e,onChange:t,fields:r.fields||[]};return(0,Jee.jsx)($ee.Provider,{value:n,children:o})}function c0(){let e=(0,UR.useContext)($ee);if(!e)throw new Error("useMediaEditorContext must be used within MediaEditorProvider");return e}var tte=a(W(),1),rte=a(U(),1),WR=a(j(),1);function Kg(e){return e?e.startsWith("image/")?{type:"image"}:e.startsWith("video/")?{type:"video"}:e.startsWith("audio/")?{type:"audio"}:{type:"application"}:{type:"application"}}var Rn=a(T(),1);function $Fe({mediaType:e,mediaUrl:t,altText:r,displayTitle:o,mimeType:n,onLoad:i,onError:s,loadingState:l}){switch(e.type){case"image":return(0,Rn.jsx)("img",{className:l==="loaded"?"loaded":"",src:t,alt:r||"",onLoad:i,onError:s});case"video":return(0,Rn.jsx)("video",{src:t,controls:!0,onError:s,children:o});case"audio":return(0,Rn.jsx)("audio",{src:t,controls:!0,onError:s,children:o});default:return(0,Rn.jsxs)("div",{className:"media-editor-preview__file-info",children:[(0,Rn.jsx)("p",{className:"media-editor-preview__file-name",children:o}),(0,Rn.jsx)("p",{className:"media-editor-preview__mime-type",children:n}),(0,Rn.jsx)("a",{href:t,target:"_blank",rel:"noopener",className:"media-editor-preview__download-link",children:(0,WR.__)("View file")})]})}}function ote(e){let[t,r]=(0,rte.useState)("loading"),{media:o}=c0(),{source_url:n,mime_type:i,alt_text:s,title:l}=o||{},c=Kg(i);if(!n)return(0,Rn.jsx)("div",{className:"media-editor-preview media-editor-preview--empty",children:(0,Rn.jsx)("p",{children:(0,WR.__)("No media file available.")})});if(t==="error")return(0,Rn.jsxs)("div",{className:"media-editor-preview media-editor-preview--error",children:[(0,Rn.jsx)("p",{children:(0,WR.__)("Failed to load media file.")}),(0,Rn.jsx)("p",{className:"media-editor-preview__url",children:n})]});let u=typeof l=="string"?l:l?.rendered||l?.raw;return(0,Rn.jsxs)("div",{...e,className:`media-editor-preview media-editor-preview--${c.type}`,children:[c.type==="image"&&t==="loading"&&(0,Rn.jsx)("div",{className:"media-editor-preview__spinner",children:(0,Rn.jsx)(tte.Spinner,{})}),(0,Rn.jsx)($Fe,{mediaType:c,mediaUrl:n,altText:s,displayTitle:u,mimeType:i,onLoad:()=>r("loaded"),onError:()=>r("error"),loadingState:t})]})}var Oi=a(U(),1),qse=a(_e(),1);var ZR=a(U(),1);var P7=a(j(),1);var Gr="isAny",Yr="isNone",Ti="isAll",Ei="isNotAll",cs="between",us="inThePast",Ys="over",io="is",so="isNot",ap="lessThan",lp="greaterThan",cp="lessThanOrEqual",up="greaterThanOrEqual",dp="before",fp="after",mp="beforeInc",pp="afterInc",bu="contains",wu="notContains",Su="startsWith",hp="on",gp="notOn",GR=["asc","desc"],nte={asc:"\u2191",desc:"\u2193"},YR={asc:"ascending",desc:"descending"},qR={asc:(0,P7.__)("Sort ascending"),desc:(0,P7.__)("Sort descending")},ite={asc:f3,desc:s3},u0="table",KR="grid",ste="list",ate="activity",lte="pickerGrid",cte="pickerTable";var ute=(0,ZR.createContext)({view:{type:u0},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,ZR.createRef)(),resizeObserverRef:()=>{},defaultLayouts:{list:{},grid:{},table:{}},filters:[],isShowingFilter:!1,setIsShowingFilter:()=>{},hasInitiallyLoaded:!1,config:{perPageSizes:[]},intersectionObserver:null});ute.displayName="DataViewsContext";var tt=ute;var af=a(j(),1);var $g=a(j(),1),rA=a(W(),1),qs=a(U(),1),N7=a(yo(),1);var fte=a(W(),1),mte=a(j(),1),pte=a(T(),1);function vp({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,mte.__)("(no title)");return(0,pte.jsx)(fte.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 Zg=a(W(),1),vte=a(j(),1),f0=a(U(),1);var yte=a(G(),1),k7=a(_e(),1);var hte=a(Pm(),1),{lock:xwt,unlock:vt}=(0,hte.__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 kr=a(T(),1),{Menu:d0,kebabCase:e6e}=vt(Zg.privateApis);function t6e({action:e,onClick:t,items:r,variant:o}){let n=typeof e.label=="string"?e.label:e.label(r);return(0,kr.jsx)(Zg.Button,{disabled:!!e.disabled,accessibleWhenDisabled:!0,size:"compact",variant:o,onClick:t,children:n})}function r6e({action:e,onClick:t,items:r}){let o=typeof e.label=="string"?e.label:e.label(r);return(0,kr.jsx)(d0.Item,{disabled:e.disabled,onClick:t,children:(0,kr.jsx)(d0.ItemLabel,{children:o})})}function Xg({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,kr.jsx)(Zg.Modal,{title:n||o,__experimentalHideHeader:!!e.hideModalHeader,onRequestClose:r,focusOnMount:e.modalFocusOnMount??!0,size:e.modalSize||"medium",overlayClassName:`dataviews-action-modal dataviews-action-modal__${e6e(e.id)}`,children:(0,kr.jsx)(e.RenderModal,{items:t,closeModal:r})})}function R7({actions:e,item:t,registry:r,setActiveModalAction:o}){let{primaryActions:n,regularActions:i}=(0,f0.useMemo)(()=>e.reduce((l,c)=>((c.isPrimary?l.primaryActions:l.regularActions).push(c),l),{primaryActions:[],regularActions:[]}),[e]),s=l=>l.map(c=>(0,kr.jsx)(r6e,{action:c,onClick:()=>{if("RenderModal"in c){o(c);return}c.callback([t],{registry:r})},items:[t]},c.id));return(0,kr.jsxs)(d0.Group,{children:[s(n),s(i)]})}function m0({item:e,actions:t,isCompact:r}){let o=(0,yte.useRegistry)(),{primaryActions:n,eligibleActions:i}=(0,f0.useMemo)(()=>{let l=t.filter(u=>!u.isEligible||u.isEligible(e));return{primaryActions:l.filter(u=>u.isPrimary),eligibleActions:l}},[t,e]),s=(0,k7.useViewportMatch)("medium","<");return r?(0,kr.jsx)(gte,{item:e,actions:i,isSmall:!0,registry:o}):(0,kr.jsxs)(le,{direction:"row",justify:"flex-end",className:"dataviews-item-actions",style:{flexShrink:0,width:"auto"},children:[(0,kr.jsx)(A7,{item:e,actions:n,registry:o}),(n.length<i.length||s)&&(0,kr.jsx)(gte,{item:e,actions:i,registry:o})]})}function gte({item:e,actions:t,isSmall:r,registry:o}){let[n,i]=(0,f0.useState)(null);return(0,kr.jsxs)(kr.Fragment,{children:[(0,kr.jsxs)(d0,{placement:"bottom-end",children:[(0,kr.jsx)(d0.TriggerButton,{render:(0,kr.jsx)(Zg.Button,{size:r?"small":"compact",icon:to,label:(0,vte.__)("Actions"),accessibleWhenDisabled:!0,disabled:!t.length,className:"dataviews-all-actions-button"})}),(0,kr.jsx)(d0.Popover,{children:(0,kr.jsx)(R7,{actions:t,item:e,registry:o,setActiveModalAction:i})})]}),!!n&&(0,kr.jsx)(Xg,{action:n,items:[e],closeModal:()=>i(null)})]})}function A7({item:e,actions:t,registry:r,buttonVariant:o}){let[n,i]=(0,f0.useState)(null);return(0,k7.useViewportMatch)("medium","<")||!Array.isArray(t)||t.length===0?null:(0,kr.jsxs)(kr.Fragment,{children:[t.map(l=>(0,kr.jsx)(t6e,{action:l,onClick:()=>{if("RenderModal"in l){i(l);return}l.callback([e],{registry:r})},items:[e],variant:o},l.id)),!!n&&(0,kr.jsx)(Xg,{action:n,items:[e],closeModal:()=>i(null)})]})}var Qg=a(W(),1),h1=a(j(),1),Pi=a(U(),1),xte=a(G(),1);var I7=a(_e(),1);var yp=a(j(),1);function bte(e,t,r,o=!1){return e>0?(0,yp.sprintf)((0,yp._n)("%d Item selected","%d Items selected",e),e):o||r<=t?(0,yp.sprintf)((0,yp._n)("%d Item","%d Items",r),r):(0,yp.sprintf)((0,yp._n)("%1$d of %2$d Item","%1$d of %2$d Items",r),t,r)}var en=a(T(),1);function o6e({action:e,items:t,ActionTriggerComponent:r}){let[o,n]=(0,Pi.useState)(!1);return(0,en.jsxs)(en.Fragment,{children:[(0,en.jsx)(r,{...{action:e,onClick:()=>{n(!0)},items:t}}),o&&(0,en.jsx)(Xg,{action:e,items:t,closeModal:()=>n(!1)})]})}function XR(e,t){return(0,Pi.useMemo)(()=>e.some(r=>r.supportsBulk&&(!r.isEligible||r.isEligible(t))),[e,t])}function p0(e,t){return(0,Pi.useMemo)(()=>t.some(r=>e.some(o=>o.supportsBulk&&(!o.isEligible||o.isEligible(r)))),[e,t])}function g1({selection:e,onChangeSelection:t,data:r,actions:o,getItemId:n,disableSelectAll:i=!1}){let s=(0,Pi.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,en.jsx)(Qg.CheckboxControl,{className:"dataviews-view-table-selection-checkbox",checked:c,disabled:!c,onChange:()=>{t([])},"aria-label":(0,h1.__)("Deselect all")}):(0,en.jsx)(Qg.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,h1.__)("Deselect all"):(0,h1.__)("Select all")})}function wte({action:e,onClick:t,isBusy:r,items:o}){let n=typeof e.label=="string"?e.label:e.label(o);return(0,I7.useViewportMatch)("medium","<")?(0,en.jsx)(Qg.Button,{disabled:r,accessibleWhenDisabled:!0,label:n,icon:e.icon,size:"compact",onClick:t,isBusy:r}):(0,en.jsx)(Qg.Button,{disabled:r,accessibleWhenDisabled:!0,size:"compact",onClick:t,isBusy:r,children:n})}var _te=[];function n6e({action:e,selectedItems:t,actionInProgress:r,setActionInProgress:o}){let n=(0,xte.useRegistry)(),i=(0,Pi.useMemo)(()=>t.filter(s=>!e.isEligible||e.isEligible(s)),[e,t]);return"RenderModal"in e?(0,en.jsx)(o6e,{action:e,items:i,ActionTriggerComponent:wte},e.id):(0,en.jsx)(wte,{action:e,onClick:async()=>{o(e.id),await e.callback(t,{registry:n}),o(null)},items:i,isBusy:r===e.id},e.id)}function Ste(e,t,r,o,n,i,s,l,c,u,d){let f=bte(n.length,e.length,d.totalItems,o);return(0,en.jsxs)(le,{direction:"row",className:"dataviews-bulk-actions-footer__container",gap:"md",align:"center",children:[(0,en.jsx)(g1,{selection:n,onChangeSelection:u,data:e,actions:t,getItemId:r,disableSelectAll:o}),(0,en.jsx)("span",{className:"dataviews-bulk-actions-footer__item-count",children:f}),(0,en.jsxs)(le,{direction:"row",className:"dataviews-bulk-actions-footer__action-buttons",gap:"xs",children:[i.map(m=>(0,en.jsx)(n6e,{action:m,selectedItems:s,actionInProgress:l,setActionInProgress:c},m.id)),s.length>0&&(0,en.jsx)(Qg.Button,{icon:_n,showTooltip:!0,tooltipPosition:"top",size:"compact",label:(0,h1.__)("Cancel"),disabled:!!l,accessibleWhenDisabled:!1,onClick:()=>{u(_te)}})]})]})}function i6e({selection:e,actions:t,onChangeSelection:r,data:o,getItemId:n,isInfiniteScroll:i,paginationInfo:s}){let[l,c]=(0,Pi.useState)(null),u=(0,Pi.useRef)(void 0),d=(0,I7.useViewportMatch)("medium","<"),f=(0,Pi.useMemo)(()=>t.filter(v=>v.supportsBulk),[t]),m=(0,Pi.useMemo)(()=>o.filter(v=>f.some(y=>!y.isEligible||y.isEligible(v))),[o,f]),h=(0,Pi.useMemo)(()=>o.filter(v=>e.includes(n(v))&&m.includes(v)),[e,o,n,m]),g=(0,Pi.useMemo)(()=>t.filter(v=>v.supportsBulk&&(!d||v.icon)&&h.some(y=>!v.isEligible||v.isEligible(y))),[t,h,d]);if(l)u.current||(u.current=Ste(o,t,n,i,e,g,h,l,c,r,s));else return u.current&&(u.current=void 0),Ste(o,t,n,i,e,g,h,l,c,r,s);return u.current}function QR(){let{data:e,selection:t,actions:r=_te,onChangeSelection:o,getItemId:n,paginationInfo:i,view:s}=(0,Pi.useContext)(tt);return(0,en.jsx)(i6e,{selection:t,onChangeSelection:o,data:e,actions:r,getItemId:n,isInfiniteScroll:!!s.infiniteScrollEnabled,paginationInfo:i})}var of=a(j(),1);var nf=a(W(),1),bp=a(U(),1);function JR(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 wt=a(T(),1),{Menu:sr}=vt(nf.privateApis);function s6e({children:e}){return bp.Children.toArray(e).filter(Boolean).map((t,r)=>(0,wt.jsxs)(bp.Fragment,{children:[r>0&&(0,wt.jsx)(sr.Separator,{}),t]},r))}var a6e=(0,bp.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,y=!1,b=[],w=o.find(A=>A.id===t),{setIsShowingFilter:S}=(0,bp.useContext)(tt);if(!w)return null;g=w.enableHiding!==!1,v=w.enableSorting!==!1;let x=w.header;if(b=!!w.filterBy&&w.filterBy?.operators||[],y=!r.filters?.some(A=>t===A.field)&&!!(w.hasElements||w.Edit)&&w.filterBy!==!1&&!w.filterBy?.isPrimary,!v&&!l&&!g&&!y)return x;let _=JR(r,o).filter(A=>!f.includes(A.id)),P=(c||u)&&!!_.length,I=(0,of.isRTL)();return(0,wt.jsxs)(sr,{children:[(0,wt.jsxs)(sr.TriggerButton,{render:(0,wt.jsx)(nf.Button,{size:"compact",className:"dataviews-view-table-header-button",ref:d,variant:"tertiary"}),children:[x,r.sort&&h&&(0,wt.jsx)("span",{"aria-hidden":"true",children:nte[r.sort.direction]})]}),(0,wt.jsx)(sr.Popover,{style:{minWidth:"240px"},children:(0,wt.jsxs)(s6e,{children:[v&&(0,wt.jsx)(sr.Group,{children:GR.map(A=>{let k=r.sort&&h&&r.sort.direction===A,D=`${t}-${A}`;return(0,wt.jsx)(sr.RadioItem,{name:"view-table-sorting",value:D,checked:k,onChange:()=>{n({...r,sort:{field:t,direction:A},showLevels:!1})},children:(0,wt.jsx)(sr.ItemLabel,{children:qR[A]})},D)})}),y&&(0,wt.jsx)(sr.Group,{children:(0,wt.jsx)(sr.Item,{prefix:(0,wt.jsx)(nf.Icon,{icon:Vx}),onClick:()=>{s(t),S(!0),n({...r,page:1,filters:[...r.filters||[],{field:t,value:void 0,operator:b[0]}]})},children:(0,wt.jsx)(sr.ItemLabel,{children:(0,of.__)("Add filter")})})}),(l||g||P)&&w&&(0,wt.jsxs)(sr.Group,{children:[l&&(0,wt.jsx)(sr.Item,{prefix:(0,wt.jsx)(nf.Icon,{icon:l3}),disabled:I?m>=f.length-1:m<1,onClick:()=>{let A=I?m+1:m-1,k=[...f];k.splice(m,1),k.splice(A,0,t),n({...r,fields:k})},children:(0,wt.jsx)(sr.ItemLabel,{children:(0,of.__)("Move left")})}),l&&(0,wt.jsx)(sr.Item,{prefix:(0,wt.jsx)(nf.Icon,{icon:u3}),disabled:I?m<1:m>=f.length-1,onClick:()=>{let A=I?m-1:m+1,k=[...f];k.splice(m,1),k.splice(A,0,t),n({...r,fields:k})},children:(0,wt.jsx)(sr.ItemLabel,{children:(0,of.__)("Move right")})}),c&&!!_.length&&(0,wt.jsxs)(sr,{children:[(0,wt.jsx)(sr.SubmenuTriggerItem,{children:(0,wt.jsx)(sr.ItemLabel,{children:(0,of.__)("Insert left")})}),(0,wt.jsx)(sr.Popover,{children:_.map(A=>{let k=I?m+1:m;return(0,wt.jsx)(sr.Item,{onClick:()=>{n({...r,fields:[...f.slice(0,k),A.id,...f.slice(k)]})},children:(0,wt.jsx)(sr.ItemLabel,{children:A.label})},A.id)})})]}),u&&!!_.length&&(0,wt.jsxs)(sr,{children:[(0,wt.jsx)(sr.SubmenuTriggerItem,{children:(0,wt.jsx)(sr.ItemLabel,{children:(0,of.__)("Insert right")})}),(0,wt.jsx)(sr.Popover,{children:_.map(A=>{let k=I?m:m+1;return(0,wt.jsx)(sr.Item,{onClick:()=>{n({...r,fields:[...f.slice(0,k),A.id,...f.slice(k)]})},children:(0,wt.jsx)(sr.ItemLabel,{children:A.label})},A.id)})})]}),g&&w&&(0,wt.jsx)(sr.Item,{prefix:(0,wt.jsx)(nf.Icon,{icon:n_}),onClick:()=>{i(w),n({...r,fields:f.filter(A=>A!==t)})},children:(0,wt.jsx)(sr.ItemLabel,{children:(0,of.__)("Hide column")})})]})]})})]})}),l6e=a6e,h0=l6e;var Cte=a(U(),1),O7=a(T(),1);function c6e({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 wp({item:e,isItemClickable:t,onClickItem:r,renderItemLink:o,className:n,children:i,...s}){if(!t(e))return(0,O7.jsx)("div",{className:n,...s,children:i});if(o){let c=o({item:e,className:`${n} ${n}--clickable`,...s,children:i});return(0,Cte.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=c6e({item:e,isItemClickable:t,onClickItem:r,className:n});return(0,O7.jsx)("div",{...l,...s,children:i})}var xu=a(T(),1);function u6e({item:e,level:t,titleField:r,mediaField:o,descriptionField:n,onClickItem:i,renderItemLink:s,isItemClickable:l}){return(0,xu.jsxs)(le,{direction:"row",gap:"md",align:"flex-start",justify:"flex-start",children:[o&&(0,xu.jsx)(wp,{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,xu.jsx)(o.render,{item:e,field:o,config:{sizes:"32px"}})}),(0,xu.jsxs)(le,{direction:"column",align:"flex-start",className:"dataviews-view-table__primary-column-content",children:[r&&(0,xu.jsxs)(wp,{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,xu.jsxs)("span",{className:"dataviews-view-table__level",children:[Array(t).fill("\u2014").join(" "),"\xA0"]}),(0,xu.jsx)(r.render,{item:e,field:r})]}),n&&(0,xu.jsx)(n.render,{item:e,field:n})]})]})}var $R=u6e;var Jg=a(U(),1),Tte=a(j(),1),d6e=e=>(0,Tte.isRTL)()?Math.abs(e.scrollLeft)<=1:e.scrollLeft+e.clientWidth>=e.scrollWidth-1;function Ete({scrollContainerRef:e,enabledHorizontal:t=!1}){let[r,o]=(0,Jg.useState)(!1),[n,i]=(0,Jg.useState)(!1),s=(0,Jg.useCallback)(()=>{let l=e.current;l&&(t&&o(d6e(l)),i(l.scrollTop>0))},[e,t]);return(0,Jg.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 gl(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 Sp=a(W(),1),kte=a(j(),1),Rte=a(U(),1);var Ma=a(T(),1);function Pte({field:e,isVisible:t,onToggleVisibility:r}){return(0,Ma.jsx)(Sp.__experimentalItem,{onClick:e.enableHiding?r:void 0,children:(0,Ma.jsxs)(le,{direction:"row",gap:"sm",justify:"flex-start",align:"center",children:[(0,Ma.jsx)("div",{style:{height:24,width:24},children:t&&(0,Ma.jsx)(Sp.Icon,{icon:Qn})}),(0,Ma.jsx)("span",{className:"dataviews-view-config__label",children:e.label})]})})}function f6e(e){return!!e}function eA({showLabel:e=!0}){let{view:t,fields:r,onChangeView:o}=(0,Rte.useContext)(tt),n=JR(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})=>f6e(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,Ma.jsxs)(le,{direction:"column",className:"dataviews-field-control",children:[e&&(0,Ma.jsx)(Sp.BaseControl.VisualLabel,{children:(0,kte.__)("Properties")}),(0,Ma.jsx)(le,{direction:"column",className:"dataviews-view-config__properties",children:(0,Ma.jsxs)(Sp.__experimentalItemGroup,{isBordered:!0,isSeparated:!0,size:"medium",children:[c.map(({field:g,isVisibleFlag:v})=>{let y=t[v]??!0,b=h&&y?{...g,enableHiding:!1}:g;return(0,Ma.jsx)(Pte,{field:b,isVisible:y,onToggleVisibility:()=>{o({...t,[v]:!y})}},g.id)}),n.map(g=>{let v=u.includes(g.id),y=m===1&&v?{...g,enableHiding:!1}:g;return(0,Ma.jsx)(Pte,{field:y,isVisible:v,onToggleVisibility:()=>{o({...t,fields:v?u.filter(b=>b!==g.id):[...u,g.id]})}},g.id)})]})})]})}var tA=a(U(),1);function vl(e,t={delay:400}){let[r,o]=(0,tA.useState)(!1);return(0,tA.useEffect)(()=>{if(!e)return;let n=setTimeout(()=>{o(!0)},t.delay);return()=>{clearTimeout(n),o(!1)}},[e,t.delay]),r}var at=a(T(),1);function Ite(e,t){if(e)return e;if(t==="integer"||t==="number")return"end"}function m6e({item:e,fields:t,column:r,align:o}){let n=t.find(s=>s.id===r);if(!n)return null;let i=Z("dataviews-view-table__cell-content-wrapper",{"dataviews-view-table__cell-align-end":o==="end","dataviews-view-table__cell-align-center":o==="center"});return(0,at.jsx)("div",{className:i,children:(0,at.jsx)(n.render,{item:e,field:n})})}function Ate({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:y,posinset:b}){let{paginationInfo:w}=(0,qs.useContext)(tt),S=XR(o,t),x=S&&d.includes(i),{showTitle:_=!0,showMedia:P=!0,showDescription:I=!0,infiniteScrollEnabled:A}=s,k=(0,qs.useRef)(!1),D=s.fields??[],E=l&&_||c&&P||u&&I;return(0,at.jsxs)("tr",{className:Z("dataviews-view-table__row",{"is-selected":S&&x,"has-bulk-actions":S}),onTouchStart:()=>{k.current=!0},"aria-setsize":A?w.totalItems:void 0,"aria-posinset":b,role:A?"article":void 0,onMouseDown:C=>{let M=(0,N7.isAppleOS)()?C.metaKey:C.ctrlKey;C.button===0&&M&&window.navigator.userAgent.toLowerCase().includes("firefox")&&C?.preventDefault()},onClick:C=>{if(!S)return;((0,N7.isAppleOS)()?C.metaKey:C.ctrlKey)&&!k.current&&document.getSelection()?.type!=="Range"&&v(d.includes(i)?d.filter(B=>i!==B):[...d,i])},children:[e&&(0,at.jsx)("td",{className:"dataviews-view-table__checkbox-column",children:(0,at.jsx)("div",{className:"dataviews-view-table__cell-content-wrapper",children:(0,at.jsx)(vp,{item:t,selection:d,onChangeSelection:v,getItemId:f,titleField:l,disabled:!S})})}),E&&(0,at.jsx)("td",{children:(0,at.jsx)($R,{item:t,level:r,titleField:_?l:void 0,mediaField:P?c:void 0,descriptionField:I?u:void 0,isItemClickable:m,onClickItem:h,renderItemLink:g})}),D.map(C=>{let{width:M,maxWidth:B,minWidth:N,align:z}=s.layout?.styles?.[C]??{},O=n.find(L=>L.id===C),F=Ite(z,O?.type);return(0,at.jsx)("td",{style:{width:M,maxWidth:B,minWidth:N},children:(0,at.jsx)(m6e,{fields:n,item:t,column:C,align:F})},C)}),!!o?.length&&(0,at.jsx)("td",{className:Z("dataviews-view-table__actions-column",{"dataviews-view-table__actions-column--sticky":!0,"dataviews-view-table__actions-column--stuck":y}),onClick:C=>C.stopPropagation(),children:(0,at.jsx)(m0,{item:t,actions:o})})]})}function p6e({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:y}=(0,qs.useContext)(tt),b=vl(i),w=(0,qs.useRef)(new Map),S=(0,qs.useRef)(void 0),[x,_]=(0,qs.useState)(),[P,I]=(0,qs.useState)(null);(0,qs.useEffect)(()=>{S.current&&(S.current.focus(),S.current=void 0)});let A=(0,qs.useId)(),{isHorizontalScrollEnd:k,isVerticallyScrolled:D}=Ete({scrollContainerRef:y,enabledHorizontal:!!e?.length}),E=p0(e,t);if(x){S.current=x,_(void 0);return}let C=oe=>{let pe=w.current.get(oe.id),be=pe?w.current.get(pe.fallback):void 0;_(be?.node)},M=oe=>{oe.preventDefault(),oe.stopPropagation();let pe={getBoundingClientRect:()=>({x:oe.clientX,y:oe.clientY,top:oe.clientY,left:oe.clientX,right:oe.clientX,bottom:oe.clientY,width:0,height:0,toJSON:()=>({})})};window.requestAnimationFrame(()=>{I(pe)})},B=!!t?.length,N=r.find(oe=>oe.id===h.titleField),z=r.find(oe=>oe.id===h.mediaField),O=r.find(oe=>oe.id===h.descriptionField),F=h.groupBy?.field?r.find(oe=>oe.id===h.groupBy?.field):null,L=F?gl(t,F):null,{showTitle:H=!0,showMedia:q=!0,showDescription:Q=!0}=h,J=N&&H||z&&q||O&&Q,te=h.fields??[],se=(oe,pe)=>be=>{be?w.current.set(oe,{node:be,fallback:te[pe>0?pe-1:1]}):w.current.delete(oe)},$=h.infiniteScrollEnabled&&!L,X=(0,$g.isRTL)();return B?(0,at.jsxs)(at.Fragment,{children:[(0,at.jsxs)("table",{className:Z("dataviews-view-table",g,{[`has-${h.layout?.density}-density`]:h.layout?.density&&["compact","comfortable"].includes(h.layout.density),"has-bulk-actions":E,"is-refreshing":!$&&b}),"aria-busy":i,"aria-describedby":A,role:$?"feed":void 0,inert:!$&&i?"true":void 0,children:[(0,at.jsxs)("colgroup",{children:[E&&(0,at.jsx)("col",{className:"dataviews-view-table__col-checkbox"}),J&&(0,at.jsx)("col",{className:"dataviews-view-table__col-first-data"}),te.map((oe,pe)=>(0,at.jsx)("col",{className:Z(`dataviews-view-table__col-${oe}`,{"dataviews-view-table__col-expand":!J&&pe===te.length-1})},`col-${oe}`)),!!e?.length&&(0,at.jsx)("col",{className:"dataviews-view-table__col-actions"})]}),P&&(0,at.jsx)(rA.Popover,{anchor:P,onClose:()=>I(null),placement:"bottom-start",children:(0,at.jsx)(eA,{showLabel:!1})}),(0,at.jsx)("thead",{className:Z({"dataviews-view-table__thead--stuck":D}),onContextMenu:M,children:(0,at.jsxs)("tr",{className:"dataviews-view-table__row",children:[E&&(0,at.jsx)("th",{className:"dataviews-view-table__checkbox-column",scope:"col",onContextMenu:M,children:(0,at.jsx)(g1,{selection:c,onChangeSelection:l,data:t,actions:e,getItemId:o})}),J&&(0,at.jsx)("th",{scope:"col",children:N&&(0,at.jsx)(h0,{ref:se(N.id,0),fieldId:N.id,view:h,fields:r,onChangeView:s,onHide:C,setOpenedFilter:u,canMove:!1,canInsertLeft:X?h.layout?.enableMoving??!0:!1,canInsertRight:X?!1:h.layout?.enableMoving??!0})}),te.map((oe,pe)=>{let{width:be,maxWidth:Ce,minWidth:Ge,align:He}=h.layout?.styles?.[oe]??{},ge=r.find(ae=>ae.id===oe),ie=Ite(He,ge?.type),ce=h.layout?.enableMoving??!0;return(0,at.jsx)("th",{style:{width:be,maxWidth:Ce,minWidth:Ge,textAlign:ie},"aria-sort":h.sort?.direction&&h.sort?.field===oe?YR[h.sort.direction]:void 0,scope:"col",children:(0,at.jsx)(h0,{ref:se(oe,pe),fieldId:oe,view:h,fields:r,onChangeView:s,onHide:C,setOpenedFilter:u,canMove:ce,canInsertLeft:ce,canInsertRight:ce})},oe)}),!!e?.length&&(0,at.jsx)("th",{className:Z("dataviews-view-table__actions-column",{"dataviews-view-table__actions-column--sticky":!0,"dataviews-view-table__actions-column--stuck":!k}),children:(0,at.jsx)("span",{className:"dataviews-view-table-header",children:(0,$g.__)("Actions")})})]})}),B&&F&&L?Array.from(L.entries()).map(([oe,pe])=>(0,at.jsxs)("tbody",{children:[(0,at.jsx)("tr",{className:"dataviews-view-table__group-header-row",children:(0,at.jsx)("td",{colSpan:te.length+(J?1:0)+(E?1:0)+(e?.length?1:0),className:"dataviews-view-table__group-header-cell",children:h.groupBy?.showLabel===!1?oe:(0,$g.sprintf)((0,$g.__)("%1$s: %2$s"),F.label,oe)})}),pe.map((be,Ce)=>(0,at.jsx)(Ate,{item:be,level:h.showLevels&&typeof n=="function"?n(be):void 0,hasBulkActions:E,actions:e,fields:r,id:o(be)||Ce.toString(),view:h,titleField:N,mediaField:z,descriptionField:O,selection:c,getItemId:o,onChangeSelection:l,onClickItem:d,renderItemLink:m,isItemClickable:f,isActionsColumnSticky:!k},o(be)))]},`group-${oe}`)):(0,at.jsx)("tbody",{children:B&&t.map((oe,pe)=>(0,at.jsx)(Ate,{item:oe,level:h.showLevels&&typeof n=="function"?n(oe):void 0,hasBulkActions:E,actions:e,fields:r,id:o(oe)||pe.toString(),view:h,titleField:N,mediaField:z,descriptionField:O,selection:c,getItemId:o,onChangeSelection:l,onClickItem:d,renderItemLink:m,isItemClickable:f,isActionsColumnSticky:!k,posinset:$?pe+1:void 0},o(oe)))})]}),$&&i&&(0,at.jsx)("div",{className:"dataviews-loading",id:A,children:(0,at.jsx)("p",{className:"dataviews-loading-more",children:(0,at.jsx)(rA.Spinner,{})})})]}):(0,at.jsx)("div",{className:Z("dataviews-no-results",{"is-refreshing":b}),id:A,children:v})}var Ote=p6e;var Bte=a(W(),1),aA=a(j(),1);var Ks=a(W(),1);var y1=a(j(),1),Fte=a(_e(),1),Lte=a(yo(),1),xp=a(U(),1);var h6e=a(W(),1),g6e=a(j(),1),oA=a(U(),1);var v6e=a(T(),1),y6e=[{value:120,breakpoint:1},{value:170,breakpoint:1},{value:230,breakpoint:1},{value:290,breakpoint:1112},{value:350,breakpoint:1636},{value:430,breakpoint:588}],b6e=y6e[2].value;function nA(){let e=(0,oA.useContext)(tt),t=e.view;return(0,oA.useMemo)(()=>{let r=e.containerWidth,o=32,n=t.layout?.previewSize??b6e,i=Math.floor((r+o)/(n+o));return Math.max(1,i)},[e.containerWidth,t.layout?.previewSize])}var Nte=a(U(),1);var Mte=a(T(),1),v1=(0,Nte.forwardRef)(({className:e,previewSize:t,...r},o)=>(0,Mte.jsx)("div",{ref:o,className:Z("dataviews-view-grid-items",e),style:{gridTemplateColumns:t&&`repeat(auto-fill, minmax(${t}px, 1fr))`},...r}));var iA=a(U(),1);function g0(e,t){let{intersectionObserver:r}=(0,iA.useContext)(tt);(0,iA.useEffect)(()=>{let o=e.current;if(!(!o||t===void 0||!r))return r.observe(o),()=>{r.unobserve(o)}},[e,r,t])}function sA(e,t,r){let n=!!e?.length&&t?e[0].position:void 0;return n&&r?(n-1)%r:0}var gt=a(T(),1),{Badge:w6e}=vt(Ks.privateApis);function S6e(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 Dte=(0,xp.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:y,posinset:b,setsize:w,...S},x){let{showTitle:_=!0,showMedia:P=!0,showDescription:I=!0}=t,A=XR(u,c),k=l(c),D=(0,xp.useRef)(null),E=(0,xp.useCallback)(H=>{D.current=H,typeof x=="function"?x(H):x&&(x.current=H)},[x]);g0(D,b);let C=(0,Fte.useInstanceId)(e),M=r.includes(k),B=(0,gt.jsx)("span",{className:"dataviews-view-grid__media-placeholder"}),N=P&&d?.render,z=N?(0,gt.jsx)(d.render,{item:c,field:d,config:y}):B,O=_&&f?.render?(0,gt.jsx)(f.render,{item:c,field:f}):null,F,L;return i(c)&&n&&(O?(F={"aria-labelledby":`dataviews-view-grid__title-field-${C}`},L={id:`dataviews-view-grid__title-field-${C}`}):F={"aria-label":(0,y1.__)("Navigate to item")}),(0,gt.jsxs)(le,{direction:"column",...S,ref:E,"aria-setsize":w,"aria-posinset":b,className:Z(S.className,"dataviews-view-grid__row__gridcell","dataviews-view-grid__card",{"is-selected":A&&M}),onClickCapture:H=>{if(S.onClickCapture?.(H),(0,Lte.isAppleOS)()?H.metaKey:H.ctrlKey){if(H.stopPropagation(),H.preventDefault(),!A)return;o(M?r.filter(q=>k!==q):[...r,k])}},children:[(0,gt.jsx)(wp,{item:c,isItemClickable:i,onClickItem:n,renderItemLink:s,className:Z("dataviews-view-grid__media",{"dataviews-view-grid__media--placeholder":!N}),...F,children:z}),v&&(0,gt.jsx)(vp,{item:c,selection:r,onChangeSelection:o,getItemId:l,titleField:f,disabled:!A}),!!u?.length&&(0,gt.jsx)("div",{className:"dataviews-view-grid__media-actions",children:(0,gt.jsx)(m0,{item:c,actions:u,isCompact:!0})}),_&&(0,gt.jsx)("div",{className:"dataviews-view-grid__title-actions",children:(0,gt.jsx)(wp,{item:c,isItemClickable:i,onClickItem:n,renderItemLink:s,className:"dataviews-view-grid__title-field dataviews-title-field",...L,title:f?.getValueFormatted({item:c,field:f})||void 0,children:O})}),(0,gt.jsxs)(le,{direction:"column",gap:"xs",children:[I&&m?.render&&(0,gt.jsx)(m.render,{item:c,field:m}),!!g?.length&&(0,gt.jsx)(le,{direction:"row",className:"dataviews-view-grid__badge-fields",gap:"sm",wrap:"wrap",align:"top",justify:"flex-start",children:g.map(H=>(0,gt.jsx)(w6e,{className:"dataviews-view-grid__field-value",children:(0,gt.jsx)(H.render,{item:c,field:H})},H.id))}),!!h?.length&&(0,gt.jsx)(le,{direction:"column",className:"dataviews-view-grid__fields",gap:"xs",children:h.map(H=>(0,gt.jsx)(Ks.Flex,{className:"dataviews-view-grid__field",gap:1,justify:"flex-start",expanded:!0,style:{height:"auto"},direction:"row",children:(0,gt.jsxs)(gt.Fragment,{children:[(0,gt.jsxs)(ht.Root,{children:[(0,gt.jsx)(ht.Trigger,{render:(0,gt.jsx)(Ks.FlexItem,{className:"dataviews-view-grid__field-name",children:H.header})}),(0,gt.jsx)(ht.Popup,{children:H.label})]}),(0,gt.jsx)(Ks.FlexItem,{className:"dataviews-view-grid__field-value",style:{maxHeight:"none"},children:(0,gt.jsx)(H.render,{item:c,field:H})})]})},H.id))})]})]})});function M7({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,xp.useContext)(tt),y=nA(),b=p0(h,e),w=s.find(E=>E.id===i?.titleField),S=s.find(E=>E.id===i?.mediaField),x=s.find(E=>E.id===i?.descriptionField),_=i.fields??[],{regularFields:P,badgeFields:I}=_.reduce((E,C)=>{let M=s.find(N=>N.id===C);if(!M)return E;let B=i.layout?.badgeFields?.includes(C)?"badgeFields":"regularFields";return E[B].push(M),E},{regularFields:[],badgeFields:[]}),A="900px",k=Math.ceil(e.length/y),D=sA(e,t,y);return(0,gt.jsxs)(gt.Fragment,{children:[t&&(0,gt.jsxs)(Ks.Composite,{render:(0,gt.jsx)(v1,{className:Z("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:D}).map((E,C)=>(0,gt.jsx)(Ks.Composite.Item,{render:M=>(0,gt.jsx)(le,{...M,direction:"column",role:"article",className:"dataviews-view-grid__row__gridcell dataviews-view-grid__card dataviews-view-grid__placeholder"}),"aria-hidden":!0,tabIndex:-1},`placeholder-${C}`)),e.map(E=>{let C=m(E),M=E.position;return(0,gt.jsx)(Ks.Composite.Item,{render:B=>(0,gt.jsx)(Dte,{...B,id:C,role:"article",view:i,selection:l,onChangeSelection:c,onClickItem:u,isItemClickable:d,renderItemLink:f,getItemId:m,item:E,actions:h,mediaField:S,titleField:w,descriptionField:x,regularFields:P,badgeFields:I,hasBulkActions:b,posinset:M,setsize:g.totalItems,config:{sizes:A}})},C)})]}),!t&&(0,gt.jsx)(Ks.Composite,{role:"grid",className:Z("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":k,ref:v,inert:o,children:S6e(e,y).map((E,C)=>(0,gt.jsx)(Ks.Composite.Row,{render:(0,gt.jsx)("div",{role:"row","aria-rowindex":C+1,"aria-label":(0,y1.sprintf)((0,y1.__)("Row %d"),C+1),className:"dataviews-view-grid__row",style:{gridTemplateColumns:`repeat( ${y}, minmax(0, 1fr) )`}}),children:E.map(M=>{let B=m(M);return(0,gt.jsx)(Ks.Composite.Item,{render:N=>(0,gt.jsx)(Dte,{...N,id:B,role:"gridcell",view:i,selection:l,onChangeSelection:c,onClickItem:u,isItemClickable:d,renderItemLink:f,getItemId:m,item:M,actions:h,mediaField:S,titleField:w,descriptionField:x,regularFields:P,badgeFields:I,hasBulkActions:b,config:{sizes:A}})},B)})},C))})]})}var Da=a(T(),1);function x6e({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=vl(!!n),g=!!t?.length,v=d.groupBy?.field?r.find(S=>S.id===d.groupBy?.field):null,y=v?gl(t,v):null,b=d.infiniteScrollEnabled&&!y;if(!g)return(0,Da.jsx)("div",{className:Z("dataviews-no-results",{"is-refreshing":h}),children:m});let w={className:Z(f,{"is-refreshing":!b&&h}),inert:!b&&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,Da.jsxs)(Da.Fragment,{children:[g&&v&&y&&(0,Da.jsx)(le,{direction:"column",gap:"lg",children:Array.from(y.entries()).map(([S,x])=>(0,Da.jsxs)(le,{direction:"column",gap:"sm",children:[(0,Da.jsx)("h3",{className:"dataviews-view-grid__group-header",children:d.groupBy?.showLabel===!1?S:(0,aA.sprintf)((0,aA.__)("%1$s: %2$s"),v.label,S)}),(0,Da.jsx)(M7,{...w,data:x,isInfiniteScroll:!1})]},S))}),!y&&(0,Da.jsx)(M7,{...w,data:t,isInfiniteScroll:!!b}),b&&n&&(0,Da.jsx)("p",{className:"dataviews-loading-more",children:(0,Da.jsx)(Bte.Spinner,{})})]})}var Vte=x6e;var lA=a(_e(),1),ki=a(W(),1),Lo=a(U(),1),b1=a(j(),1);var B7=a(G(),1);var Ye=a(T(),1),{Menu:D7}=vt(ki.privateApis);function F7(e){return`${e}-item-wrapper`}function _6e(e,t){return`${e}-primary-action-${t}`}function L7(e){return`${e}-dropdown`}function C6e({idPrefix:e,primaryAction:t,item:r}){let o=(0,B7.useRegistry)(),[n,i]=(0,Lo.useState)(!1),s=_6e(e,t.id),l=typeof t.label=="string"?t.label:t.label([r]);return"RenderModal"in t?(0,Ye.jsx)("div",{role:"gridcell",children:(0,Ye.jsx)(ki.Composite.Item,{id:s,render:(0,Ye.jsx)(ki.Button,{disabled:!!t.disabled,accessibleWhenDisabled:!0,text:l,size:"small",onClick:()=>i(!0)}),children:n&&(0,Ye.jsx)(Xg,{action:t,items:[r],closeModal:()=>i(!1)})})},t.id):(0,Ye.jsx)("div",{role:"gridcell",children:(0,Ye.jsx)(ki.Composite.Item,{id:s,render:(0,Ye.jsx)(ki.Button,{disabled:!!t.disabled,accessibleWhenDisabled:!0,size:"small",onClick:()=>{t.callback([r],{registry:o})},children:l})})},t.id)}function jte({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,y=(0,Lo.useRef)(null),b=`${r}-label`,w=`${r}-description`,S=(0,B7.useRegistry)(),[x,_]=(0,Lo.useState)(!1),[P,I]=(0,Lo.useState)(null),A=({type:F})=>{_(F==="mouseenter")},{paginationInfo:k}=(0,Lo.useContext)(tt);(0,Lo.useEffect)(()=>{o&&y.current?.scrollIntoView({behavior:"auto",block:"nearest",inline:"nearest"})},[o]);let{primaryAction:D,eligibleActions:E}=(0,Lo.useMemo)(()=>{let F=t.filter(H=>!H.isEligible||H.isEligible(n));return{primaryAction:F.filter(H=>H.isPrimary)[0],eligibleActions:F}},[t,n]),C=D&&t.length===1,M=h&&s?.render?(0,Ye.jsx)("div",{className:"dataviews-view-list__media-wrapper",children:(0,Ye.jsx)(s.render,{item:n,field:s,config:{sizes:"52px"}})}):null,B=m&&i?.render?(0,Ye.jsx)(i.render,{item:n,field:i}):null,N=g&&l?.render,z=!!M&&!N&&!u.length,O=E?.length>0&&(0,Ye.jsxs)(le,{direction:"row",gap:"md",className:"dataviews-view-list__item-actions",children:[D&&(0,Ye.jsx)(C6e,{idPrefix:r,primaryAction:D,item:n}),!C&&(0,Ye.jsxs)("div",{role:"gridcell",children:[(0,Ye.jsxs)(D7,{placement:"bottom-end",children:[(0,Ye.jsx)(D7.TriggerButton,{render:(0,Ye.jsx)(ki.Composite.Item,{id:L7(r),render:(0,Ye.jsx)(ki.Button,{size:"small",icon:to,label:(0,b1.__)("Actions"),accessibleWhenDisabled:!0,disabled:!t.length,onKeyDown:d})})}),(0,Ye.jsx)(D7.Popover,{children:(0,Ye.jsx)(R7,{actions:E,item:n,registry:S,setActiveModalAction:I})})]}),!!P&&(0,Ye.jsx)(Xg,{action:P,items:[n],closeModal:()=>I(null)})]})]});return(0,Ye.jsx)(ki.Composite.Row,{ref:y,render:(0,Ye.jsx)("div",{"aria-posinset":f,"aria-setsize":v?k.totalItems:void 0}),role:v?"article":"row",className:Z({"is-selected":o,"is-hovered":x}),onMouseEnter:A,onMouseLeave:A,children:(0,Ye.jsxs)(le,{direction:"row",className:"dataviews-view-list__item-wrapper",children:[(0,Ye.jsx)("div",{role:"gridcell",children:(0,Ye.jsx)(ki.Composite.Item,{id:F7(r),"aria-pressed":o,"aria-labelledby":b,"aria-describedby":w,className:"dataviews-view-list__item",onClick:()=>c(n)})}),(0,Ye.jsxs)(le,{direction:"row",gap:"md",justify:"start",align:z?"center":"flex-start",style:{flex:1,minWidth:0},children:[M,(0,Ye.jsxs)(le,{direction:"column",gap:"xs",className:"dataviews-view-list__field-wrapper",children:[(0,Ye.jsxs)(le,{direction:"row",align:"center",children:[(0,Ye.jsx)("div",{className:"dataviews-title-field dataviews-view-list__title-field",id:b,children:B}),O]}),N&&(0,Ye.jsx)("div",{className:"dataviews-view-list__field",children:(0,Ye.jsx)(l.render,{item:n,field:l})}),(0,Ye.jsx)("div",{className:"dataviews-view-list__fields",id:w,children:u.map(F=>(0,Ye.jsxs)("div",{className:"dataviews-view-list__field",children:[(0,Ye.jsx)(tr,{className:"dataviews-view-list__field-label",render:(0,Ye.jsx)("span",{}),children:F.label}),(0,Ye.jsx)("span",{className:"dataviews-view-list__field-value",children:(0,Ye.jsx)(F.render,{item:n,field:F})})]},F.id))})]})]})]})})}function T6e(e){return!!e}function V7(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,lA.useInstanceId)(V7,"view-list"),m=vl(!!i),h=r?.findLast(O=>l.includes(n(O))),g=o.find(O=>O.id===c.titleField),v=o.find(O=>O.id===c.mediaField),y=o.find(O=>O.id===c.descriptionField),b=(c?.fields??[]).map(O=>o.find(F=>O===F.id)).filter(T6e),w=O=>s([n(O)]),S=(0,Lo.useCallback)(O=>`${f}-${n(O)}`,[f,n]),x=(0,Lo.useCallback)((O,F)=>F.startsWith(S(O)),[S]),[_,P]=(0,Lo.useState)(void 0),I=(0,Lo.useRef)(null);(0,Lo.useEffect)(()=>{h&&P(F7(S(h)))},[h,S]);let A=r.findIndex(O=>x(O,_??"")),k=(0,lA.usePrevious)(A),D=A!==-1,E=(0,Lo.useCallback)((O,F)=>{let L=Math.min(r.length-1,Math.max(0,O));if(!r[L])return;let H=S(r[L]),q=F(H);P(q),I.current?.contains(I.current.ownerDocument.activeElement)&&document.getElementById(q)?.focus()},[r,S]);(0,Lo.useEffect)(()=>{!D&&(k!==void 0&&k!==-1)&&E(k,F7)},[D,E,k]);let C=(0,Lo.useCallback)(O=>{O.key==="ArrowDown"&&(O.preventDefault(),E(A+1,L7)),O.key==="ArrowUp"&&(O.preventDefault(),E(A-1,L7))},[E,A]),M=!!r?.length,B=c.groupBy?.field?o.find(O=>O.id===c.groupBy?.field):null,N=M&&B?gl(r,B):null,z=c.infiniteScrollEnabled&&!N;return M?M&&B&&N?(0,Ye.jsx)(ki.Composite,{ref:I,id:`${f}`,render:(0,Ye.jsx)("div",{}),className:"dataviews-view-list__group",role:"grid",activeId:_,setActiveId:P,children:(0,Ye.jsx)(le,{direction:"column",gap:"lg",className:Z("dataviews-view-list",u),children:Array.from(N.entries()).map(([O,F])=>(0,Ye.jsxs)(le,{direction:"column",gap:"sm",children:[(0,Ye.jsx)("h3",{className:"dataviews-view-list__group-header",children:c.groupBy?.showLabel===!1?O:(0,b1.sprintf)((0,b1.__)("%1$s: %2$s"),B.label,O)}),F.map(L=>{let H=S(L);return(0,Ye.jsx)(jte,{view:c,idPrefix:H,actions:t,item:L,isSelected:L===h,onSelect:w,mediaField:v,titleField:g,descriptionField:y,otherFields:b,onDropdownTriggerKeyDown:C},H)})]},O))})}):(0,Ye.jsxs)(Ye.Fragment,{children:[(0,Ye.jsx)(ki.Composite,{ref:I,id:f,render:(0,Ye.jsx)("div",{}),className:Z("dataviews-view-list",u,{[`has-${c.layout?.density}-density`]:c.layout?.density&&["compact","comfortable"].includes(c.layout.density),"is-refreshing":!z&&m}),role:c.infiniteScrollEnabled?"feed":"grid",activeId:_,setActiveId:P,inert:!z&&i?"true":void 0,children:r.map((O,F)=>{let L=S(O);return(0,Ye.jsx)(jte,{view:c,idPrefix:L,actions:t,item:O,isSelected:O===h,onSelect:w,mediaField:v,titleField:g,descriptionField:y,otherFields:b,onDropdownTriggerKeyDown:C,posinset:c.infiniteScrollEnabled?F+1:void 0},L)})}),z&&i&&(0,Ye.jsx)("p",{className:"dataviews-loading-more",children:(0,Ye.jsx)(ki.Spinner,{})})]}):(0,Ye.jsx)("div",{className:Z("dataviews-no-results",{"is-refreshing":m}),children:d})}var qte=a(W(),1);var cA=a(j(),1),zte=a(U(),1);var v0=a(T(),1);function Hte({groupName:e,groupData:t,groupField:r,showLabel:o=!0,children:n}){let i=o?(0,zte.createInterpolateElement)((0,cA.sprintf)((0,cA.__)("%s: <groupName />"),r.label).trim(),{groupName:(0,v0.jsx)(r.render,{item:t[0],field:r})}):(0,v0.jsx)(r.render,{item:t[0],field:r});return(0,v0.jsxs)(le,{direction:"column",className:"dataviews-view-activity__group",children:[(0,v0.jsx)("h3",{className:"dataviews-view-activity__group-header",children:i}),n]},e)}var ev=a(U(),1),Ute=a(G(),1),Wte=a(_e(),1);var bo=a(T(),1);function E6e(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,y=(0,ev.useRef)(null),b=(0,Ute.useRegistry)(),{paginationInfo:w}=(0,ev.useContext)(tt),{primaryActions:S,eligibleActions:x}=(0,ev.useMemo)(()=>{let E=r.filter(M=>!M.isEligible||M.isEligible(o));return{primaryActions:E.filter(M=>M.isPrimary),eligibleActions:E}},[r,o]),_=(0,Wte.useViewportMatch)("medium","<"),P=t.layout?.density??"balanced",I=h&&P!=="compact"&&i?.render?(0,bo.jsx)(i.render,{item:o,field:i,config:{sizes:P==="comfortable"?"32px":"24px"}}):null,A=(0,bo.jsx)("div",{className:"dataviews-view-activity__item-type-icon",children:I||(0,bo.jsx)("span",{className:"dataviews-view-activity__item-bullet","aria-hidden":"true"})}),k=m&&n?.render?(0,bo.jsx)(n.render,{item:o,field:n}):null,D=(0,ev.useMemo)(()=>P==="comfortable"?"md":"sm",[P]);return(0,bo.jsx)("div",{ref:y,role:v?"article":void 0,"aria-posinset":c,"aria-setsize":v?w.totalItems:void 0,className:Z("dataviews-view-activity__item",P==="compact"&&"is-compact",P==="balanced"&&"is-balanced",P==="comfortable"&&"is-comfortable"),children:(0,bo.jsxs)(le,{direction:"row",gap:"lg",justify:"start",align:"flex-start",children:[(0,bo.jsx)(le,{direction:"column",gap:"xs",align:"center",className:"dataviews-view-activity__item-type",children:A}),(0,bo.jsxs)(le,{direction:"column",gap:D,align:"flex-start",className:"dataviews-view-activity__item-content",children:[k&&(0,bo.jsx)(wp,{item:o,isItemClickable:f,onClickItem:u,renderItemLink:d,className:"dataviews-view-activity__item-title",children:k}),g&&s&&(0,bo.jsx)("div",{className:"dataviews-view-activity__item-description",children:(0,bo.jsx)(s.render,{item:o,field:s})}),(0,bo.jsx)("div",{className:"dataviews-view-activity__item-fields",children:l.map(E=>(0,bo.jsxs)("div",{className:"dataviews-view-activity__item-field",children:[(0,bo.jsx)(tr,{className:"dataviews-view-activity__item-field-label",render:(0,bo.jsx)("span",{}),children:E.label}),(0,bo.jsx)("span",{className:"dataviews-view-activity__item-field-value",children:(0,bo.jsx)(E.render,{item:o,field:E})})]},E.id))}),!!S?.length&&(0,bo.jsx)(A7,{item:o,actions:S,registry:b,buttonVariant:"secondary"})]}),(S.length<x.length||_&&x.length>0)&&(0,bo.jsx)("div",{className:"dataviews-view-activity__item-actions",children:(0,bo.jsx)(m0,{item:o,actions:x,isCompact:!0})})]})})}var Gte=E6e;var Yte=a(Se(),1);function P6e(e){return!!e}function j7(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(P6e);return t.map((u,d)=>(0,Yte.createElement)(Gte,{...e,key:o(u),item:u,mediaField:s,titleField:i,descriptionField:l,otherFields:c,posinset:n.infiniteScrollEnabled?d+1:void 0}))}var Fa=a(T(),1);function Kte(e){let{empty:t,data:r,fields:o,isLoading:n,view:i,className:s}=e,l=vl(!!n),c=!!r?.length,u=i.groupBy?.field?o.find(v=>v.id===i.groupBy?.field):null,d=c&&u?gl(r,u):null,f=i.infiniteScrollEnabled&&!d;if(!c)return(0,Fa.jsx)("div",{className:Z("dataviews-no-results",{"is-refreshing":l}),children:t});let m=!f&&!!n,h=Z("dataviews-view-activity",s,{"is-refreshing":!f&&l}),g=d?Array.from(d.entries()):[];return c&&u&&d?(0,Fa.jsx)(le,{direction:"column",gap:"sm",className:h,inert:m?"true":void 0,children:g.map(([v,y])=>(0,Fa.jsx)(Hte,{groupName:v,groupData:y,groupField:u,showLabel:i.groupBy?.showLabel!==!1,children:(0,Fa.jsx)(j7,{...e,data:y})},v))}):(0,Fa.jsxs)(Fa.Fragment,{children:[(0,Fa.jsx)("div",{className:h,role:i.infiniteScrollEnabled?"feed":void 0,inert:m?"true":void 0,children:(0,Fa.jsx)(j7,{...e})}),f&&n&&(0,Fa.jsx)("p",{className:"dataviews-loading-more",children:(0,Fa.jsx)(qte.Spinner,{})})]})}var ds=a(W(),1),S1=a(j(),1),$te=a(_e(),1),fA=a(U(),1);var Xte=a(W(),1),k6e=a(G(),1),uA=a(U(),1);var R6e=a(j(),1);var w1=a(W(),1),y0=a(U(),1),La=a(j(),1);var sf=a(T(),1);function z7(){let{view:e,onChangeView:t,paginationInfo:{totalItems:r=0,totalPages:o}}=(0,y0.useContext)(tt);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,La.sprintf)((0,La.__)("Page %1$d of %2$d"),n,o):c.toString()}});return!!r&&o!==1&&(0,sf.jsxs)(le,{direction:"row",className:"dataviews-pagination",justify:"end",align:"center",gap:"xl",children:[(0,sf.jsx)(le,{direction:"row",justify:"flex-start",align:"center",gap:"xs",className:"dataviews-pagination__page-select",children:(0,y0.createInterpolateElement)((0,La.sprintf)((0,La._x)("<div>Page</div>%1$s<div>of %2$d</div>","paging"),"<CurrentPage />",o),{div:(0,sf.jsx)("div",{"aria-hidden":!0}),CurrentPage:(0,sf.jsx)(w1.SelectControl,{"aria-label":(0,La.__)("Current page"),value:n.toString(),options:i,onChange:s=>{t({...e,page:+s})},size:"small",variant:"minimal"})})}),(0,sf.jsxs)(le,{direction:"row",gap:"xs",align:"center",children:[(0,sf.jsx)(w1.Button,{onClick:()=>t({...e,page:n-1}),disabled:n===1,accessibleWhenDisabled:!0,label:(0,La.__)("Previous page"),icon:(0,La.isRTL)()?nl:il,showTooltip:!0,size:"compact",tooltipPosition:"top"}),(0,sf.jsx)(w1.Button,{onClick:()=>t({...e,page:n+1}),disabled:n>=o,accessibleWhenDisabled:!0,label:(0,La.__)("Next page"),icon:(0,La.isRTL)()?il:nl,showTooltip:!0,size:"compact",tooltipPosition:"top"})]})]})}var Zte=(0,y0.memo)(z7);var Qte=a(T(),1);function dA(e){return(0,uA.useMemo)(()=>e?.every(t=>t.supportsBulk),[e])}var pt=a(T(),1),{Badge:A6e}=vt(ds.privateApis);function Jte({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:y=!0}=e,b=n(i),w=(0,fA.useRef)(null),S=r.includes(b);g0(w,m);let x=s?.render?(0,pt.jsx)(s.render,{item:i,field:s,config:f}):null,_=g&&l?.render?(0,pt.jsx)(l.render,{item:i,field:l}):null;return(0,pt.jsxs)(ds.Composite.Item,{ref:w,"aria-label":l?l.getValue({item:i})||(0,S1.__)("(no title)"):void 0,render:({children:P,...I})=>(0,pt.jsx)(le,{direction:"column",children:P,...I}),role:"option","aria-posinset":m,"aria-setsize":h,className:Z("dataviews-view-picker-grid__card",{"is-selected":S}),"aria-selected":S,onClick:()=>{if(S)o(r.filter(P=>b!==P));else{let P=t?[...r,b]:[b];o(P)}},children:[v&&x&&(0,pt.jsx)("div",{className:"dataviews-view-picker-grid__media",children:x}),v&&x&&(0,pt.jsx)(vp,{item:i,selection:r,onChangeSelection:o,getItemId:n,titleField:l,disabled:!1,"aria-hidden":!0,tabIndex:-1}),g&&(0,pt.jsx)(le,{direction:"row",justify:"space-between",className:"dataviews-view-picker-grid__title-actions",children:(0,pt.jsx)("div",{className:"dataviews-view-picker-grid__title-field dataviews-title-field",children:_})}),(0,pt.jsxs)(le,{direction:"column",gap:"xs",children:[y&&c?.render&&(0,pt.jsx)(c.render,{item:i,field:c}),!!d?.length&&(0,pt.jsx)(le,{direction:"row",className:"dataviews-view-picker-grid__badge-fields",gap:"sm",wrap:"wrap",align:"top",justify:"flex-start",children:d.map(P=>(0,pt.jsx)(A6e,{className:"dataviews-view-picker-grid__field-value",children:(0,pt.jsx)(P.render,{item:i,field:P})},P.id))}),!!u?.length&&(0,pt.jsx)(le,{direction:"column",className:"dataviews-view-picker-grid__fields",gap:"xs",children:u.map(P=>(0,pt.jsx)(ds.Flex,{className:"dataviews-view-picker-grid__field",gap:1,justify:"flex-start",expanded:!0,style:{height:"auto"},direction:"row",children:(0,pt.jsxs)(pt.Fragment,{children:[(0,pt.jsx)(ds.FlexItem,{className:"dataviews-view-picker-grid__field-name",children:P.header}),(0,pt.jsx)(ds.FlexItem,{className:"dataviews-view-picker-grid__field-value",style:{maxHeight:"none"},children:(0,pt.jsx)(P.render,{item:i,field:P})})]})},P.id))})]})]},b)}function ere({groupName:e,groupField:t,showLabel:r=!0,children:o}){let n=(0,$te.useInstanceId)(ere,"dataviews-view-picker-grid-group__header");return(0,pt.jsxs)(le,{direction:"column",gap:"sm",role:"group","aria-labelledby":n,children:[(0,pt.jsx)("h3",{className:"dataviews-view-picker-grid-group__header",id:n,children:r?(0,S1.sprintf)((0,S1.__)("%1$s: %2$s"),t.label,e):e}),o]},e)}function I6e({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,fA.useContext)(tt),h=r.find(N=>N.id===l?.titleField),g=r.find(N=>N.id===l?.mediaField),v=r.find(N=>N.id===l?.descriptionField),y=l.fields??[],{regularFields:b,badgeFields:w}=y.reduce((N,z)=>{let O=r.find(L=>L.id===z);if(!O)return N;let F=l.layout?.badgeFields?.includes(z)?"badgeFields":"regularFields";return N[F].push(O),N},{regularFields:[],badgeFields:[]}),S=!!t?.length,x=l.layout?.previewSize,_=dA(e),P="900px",I=l.groupBy?.field?r.find(N=>N.id===l.groupBy?.field):null,A=I?gl(t,I):null,k=(l.infiniteScrollEnabled&&!A)??!1,D=l?.page??1,E=l?.perPage??0,C=k?f?.totalItems:void 0,M=nA(),B=sA(t,k,M);return(0,pt.jsxs)(pt.Fragment,{children:[S&&I&&A&&(0,pt.jsx)(ds.Composite,{virtualFocus:!0,orientation:"horizontal",role:"listbox","aria-multiselectable":_,className:Z("dataviews-view-picker-grid",c,{[`has-${l.layout?.density}-density`]:l.layout?.density&&["compact","comfortable"].includes(l.layout.density)}),"aria-label":m,render:({children:N,...z})=>(0,pt.jsx)(le,{direction:"column",gap:"lg",children:N,...z}),children:Array.from(A.entries()).map(([N,z])=>(0,pt.jsx)(ere,{groupName:N,groupField:I,showLabel:l.groupBy?.showLabel!==!1,children:(0,pt.jsx)(v1,{previewSize:x,style:{gridTemplateColumns:x&&`repeat(auto-fill, minmax(${x}px, 1fr))`},"aria-busy":n,ref:d,children:z.map(O=>{let F=O.position??(D-1)*E+t.indexOf(O)+1;return(0,pt.jsx)(Jte,{view:l,multiselect:_,selection:s,onChangeSelection:i,getItemId:o,item:O,mediaField:g,titleField:h,descriptionField:v,regularFields:b,badgeFields:w,config:{sizes:P},posinset:F,setsize:C},o(O))})})},N))}),S&&!A&&(0,pt.jsxs)(ds.Composite,{render:(0,pt.jsx)(v1,{className:Z("dataviews-view-picker-grid",c,{[`has-${l.layout?.density}-density`]:l.layout?.density&&["compact","comfortable"].includes(l.layout.density)}),previewSize:x,"aria-busy":n,ref:d}),virtualFocus:!0,orientation:"horizontal",role:"listbox","aria-multiselectable":_,"aria-label":m,children:[Array.from({length:B}).map((N,z)=>(0,pt.jsx)(ds.Composite.Item,{render:({children:O,...F})=>(0,pt.jsx)(le,{direction:"column",children:O,...F}),role:"option","aria-hidden":!0,tabIndex:-1,className:"dataviews-view-picker-grid__card dataviews-view-picker-grid__placeholder"},`placeholder-${z}`)),t.map(N=>{let z=N.position;return(0,pt.jsx)(Jte,{view:l,multiselect:_,selection:s,onChangeSelection:i,getItemId:o,item:N,mediaField:g,titleField:h,descriptionField:v,regularFields:b,badgeFields:w,config:{sizes:P},posinset:z,setsize:C},o(N))})]}),!S&&(0,pt.jsx)("div",{className:Z({"dataviews-loading":n,"dataviews-no-results":!n}),children:n?(0,pt.jsx)("p",{children:(0,pt.jsx)(ds.Spinner,{})}):u}),S&&n&&(0,pt.jsx)("p",{className:"dataviews-loading-more",children:(0,pt.jsx)(ds.Spinner,{})})]})}var tre=I6e;var mA=a(j(),1),tv=a(W(),1),Ba=a(U(),1);var _t=a(T(),1);function O6e({item:e,fields:t,column:r,align:o}){let n=t.find(s=>s.id===r);if(!n)return null;let i=Z("dataviews-view-table__cell-content-wrapper",{"dataviews-view-table__cell-align-end":o==="end","dataviews-view-table__cell-align-center":o==="center"});return(0,_t.jsx)("div",{className:i,children:(0,_t.jsx)(n.render,{item:e,field:n})})}function rre({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,Ba.useContext)(tt),h=l.includes(r),[g,v]=(0,Ba.useState)(!1),y=(0,Ba.useRef)(null);g0(y,f);let{showTitle:b=!0,showMedia:w=!0,showDescription:S=!0,infiniteScrollEnabled:x}=o,_=()=>{v(!0)},P=()=>{v(!1)},I=o.fields??[],A=n&&b||i&&w||s&&S;return(0,_t.jsxs)(tv.Composite.Item,{ref:y,render:({children:k,...D})=>(0,_t.jsx)("tr",{className:Z("dataviews-view-table__row",{"is-selected":h,"is-hovered":g}),onMouseEnter:_,onMouseLeave:P,children:k,...D}),"aria-selected":h,"aria-setsize":m.totalItems||void 0,"aria-posinset":f,role:x?"article":"option",onMouseDown:k=>{k.button===0&&k.currentTarget.parentElement?.focus({preventScroll:!0})},onClick:()=>{if(h)u(l.filter(k=>r!==k));else{let k=d?[...l,r]:[r];u(k)}},children:[(0,_t.jsx)("td",{className:"dataviews-view-table__checkbox-column",role:"presentation",children:(0,_t.jsx)("div",{className:"dataviews-view-table__cell-content-wrapper",children:(0,_t.jsx)(vp,{item:e,selection:l,onChangeSelection:u,getItemId:c,titleField:n,disabled:!1,"aria-hidden":!0,tabIndex:-1})})}),A&&(0,_t.jsx)("td",{role:"presentation",children:(0,_t.jsx)($R,{item:e,titleField:b?n:void 0,mediaField:w?i:void 0,descriptionField:S?s:void 0,isItemClickable:()=>!1})}),I.map(k=>{let{width:D,maxWidth:E,minWidth:C,align:M}=o.layout?.styles?.[k]??{};return(0,_t.jsx)("td",{style:{width:D,maxWidth:E,minWidth:C},role:"presentation",children:(0,_t.jsx)(O6e,{fields:t,item:e,column:k,align:M})},k)})]},r)}function N6e({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,Ba.useRef)(new Map),h=(0,Ba.useRef)(void 0),[g,v]=(0,Ba.useState)(),y=dA(e)??!1;(0,Ba.useEffect)(()=>{h.current&&(h.current.focus(),h.current=void 0)});let b=u.groupBy?.field?r.find(z=>z.id===u.groupBy?.field):null,w=b?gl(t,b):null,S=u.infiniteScrollEnabled&&!w,x=(0,Ba.useId)();if(g){h.current=g,v(void 0);return}let _=z=>{let O=m.current.get(z.id),F=O?m.current.get(O.fallback):void 0;v(F?.node)},P=!!t?.length,I=r.find(z=>z.id===u.titleField),A=r.find(z=>z.id===u.mediaField),k=r.find(z=>z.id===u.descriptionField),{showTitle:D=!0,showMedia:E=!0,showDescription:C=!0}=u,M=I&&D||A&&E||k&&C,B=u.fields??[],N=(z,O)=>F=>{F?m.current.set(z,{node:F,fallback:B[O>0?O-1:1]}):m.current.delete(z)};return(0,_t.jsxs)(_t.Fragment,{children:[(0,_t.jsxs)("table",{className:Z("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":x,role:S?"feed":"listbox",children:[(0,_t.jsx)("thead",{role:"presentation",children:(0,_t.jsxs)("tr",{className:"dataviews-view-table__row",role:"presentation",children:[(0,_t.jsx)("th",{className:"dataviews-view-table__checkbox-column",children:y&&(0,_t.jsx)(g1,{selection:l,onChangeSelection:s,data:t,actions:e,getItemId:o,disableSelectAll:S})}),M&&(0,_t.jsx)("th",{children:I&&(0,_t.jsx)(h0,{ref:N(I.id,0),fieldId:I.id,view:u,fields:r,onChangeView:i,onHide:_,setOpenedFilter:c,canMove:!1})}),B.map((z,O)=>{let{width:F,maxWidth:L,minWidth:H,align:q}=u.layout?.styles?.[z]??{};return(0,_t.jsx)("th",{style:{width:F,maxWidth:L,minWidth:H,textAlign:q},"aria-sort":u.sort?.direction&&u.sort?.field===z?YR[u.sort.direction]:void 0,scope:"col",children:(0,_t.jsx)(h0,{ref:N(z,O),fieldId:z,view:u,fields:r,onChangeView:i,onHide:_,setOpenedFilter:c,canMove:u.layout?.enableMoving??!0})},z)})]})}),P&&b&&w?Array.from(w.entries()).map(([z,O])=>(0,_t.jsxs)(tv.Composite,{virtualFocus:!0,orientation:"vertical",render:(0,_t.jsx)("tbody",{role:"group"}),children:[(0,_t.jsx)("tr",{className:"dataviews-view-table__group-header-row",role:"presentation",children:(0,_t.jsx)("td",{colSpan:B.length+(M?1:0)+1,className:"dataviews-view-table__group-header-cell",role:"presentation",children:u.groupBy?.showLabel===!1?z:(0,mA.sprintf)((0,mA.__)("%1$s: %2$s"),b.label,z)})}),O.map((F,L)=>(0,_t.jsx)(rre,{item:F,fields:r,id:o(F)||L.toString(),view:u,titleField:I,mediaField:A,descriptionField:k,selection:l,getItemId:o,onChangeSelection:s,multiselect:y},o(F)))]},`group-${z}`)):(0,_t.jsx)(tv.Composite,{render:(0,_t.jsx)("tbody",{role:"presentation"}),virtualFocus:!0,orientation:"vertical",children:P&&t.map((z,O)=>{let F=o(z),L=z.position;return(0,_t.jsx)(rre,{item:z,fields:r,id:F||O.toString(),view:u,titleField:I,mediaField:A,descriptionField:k,selection:l,getItemId:o,onChangeSelection:s,multiselect:y,posinset:L},F)})})]}),(0,_t.jsxs)("div",{className:Z({"dataviews-loading":n,"dataviews-no-results":!P&&!n}),id:x,children:[!P&&(n?(0,_t.jsx)("p",{children:(0,_t.jsx)(tv.Spinner,{})}):f),P&&n&&(0,_t.jsx)("p",{className:"dataviews-loading-more",children:(0,_t.jsx)(tv.Spinner,{})})]})]})}var ore=N6e;var b0=a(W(),1),w0=a(j(),1),nre=a(U(),1);var S0=a(T(),1);function rv(){let e=(0,nre.useContext)(tt),t=e.view;return(0,S0.jsxs)(b0.__experimentalToggleGroupControl,{size:"__unstable-large",label:(0,w0.__)("Density"),value:t.layout?.density||"balanced",onChange:r=>{e.onChangeView({...t,layout:{...t.layout,density:r}})},isBlock:!0,children:[(0,S0.jsx)(b0.__experimentalToggleGroupControlOption,{value:"comfortable",label:(0,w0._x)("Comfortable","Density option for DataView layout")},"comfortable"),(0,S0.jsx)(b0.__experimentalToggleGroupControlOption,{value:"balanced",label:(0,w0._x)("Balanced","Density option for DataView layout")},"balanced"),(0,S0.jsx)(b0.__experimentalToggleGroupControlOption,{value:"compact",label:(0,w0._x)("Compact","Density option for DataView layout")},"compact")]})}var ire=a(W(),1),sre=a(j(),1),are=a(U(),1);var lre=a(T(),1),M6e=[{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 cre(){let e=(0,are.useContext)(tt),t=e.view,r=M6e.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,lre.jsx)(ire.RangeControl,{__next40pxDefaultSize:!0,showTooltip:!1,label:(0,sre.__)("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 ov=a(T(),1);function H7(){return(0,ov.jsxs)(ov.Fragment,{children:[(0,ov.jsx)(rv,{}),(0,ov.jsx)(cre,{})]})}var _p=[{type:u0,label:(0,af.__)("Table"),component:Ote,icon:dP,viewConfigOptions:rv},{type:KR,label:(0,af.__)("Grid"),component:Vte,icon:mP,viewConfigOptions:H7},{type:ste,label:(0,af.__)("List"),component:V7,icon:(0,af.isRTL)()?f4:Bx,viewConfigOptions:rv},{type:ate,label:(0,af.__)("Activity"),component:Kte,icon:cg,viewConfigOptions:rv},{type:lte,label:(0,af.__)("Grid"),component:tre,icon:mP,viewConfigOptions:H7,isPicker:!0},{type:cte,label:(0,af.__)("Table"),component:ore,icon:dP,viewConfigOptions:rv,isPicker:!0}];var D0=a(U(),1);var Op=a(W(),1),hf=a(j(),1),qA=a(U(),1);function x1(...e){}function U7(e,t){if(D6e(e)){let r=F6e(t)?t():t;return e(r)}return e}function D6e(e){return typeof e=="function"}function F6e(e){return typeof e=="function"}function Zs(e,t){return typeof Object.hasOwn=="function"?Object.hasOwn(e,t):Object.prototype.hasOwnProperty.call(e,t)}function Cp(...e){return(...t)=>{for(let r of e)typeof r=="function"&&r(...t)}}function _1(e){return e.normalize("NFD").replace(/[\u0300-\u036f]/g,"")}function W7(e,t){let r={...e};for(let o of t)Zs(r,o)&&delete r[o];return r}function G7(e,t){let r={};for(let o of t)Zs(e,o)&&(r[o]=e[o]);return r}function C1(e){return e}function ti(e,t){if(!e)throw typeof t!="string"?new Error("Invariant failed"):new Error(t)}function Y7(e){return Object.keys(e)}function q7(e,...t){let r=typeof e=="function"?e(...t):e;return r==null?!1:!r}function nv(e){return e.disabled||e["aria-disabled"]===!0||e["aria-disabled"]==="true"}function ri(e){let t={};for(let r in e)e[r]!==void 0&&(t[r]=e[r]);return t}function Ct(...e){for(let t of e)if(t!==void 0)return t}var ure=a(Se(),1);function dre(e,t){typeof e=="function"?e(t):e&&(e.current=t)}function L6e(e){return!e||!(0,ure.isValidElement)(e)?!1:"ref"in e.props||"ref"in e}function fre(e){return L6e(e)?{...e.props}.ref||e.ref:null}function mre(e,t){let r={...e};for(let o in t){if(!Zs(t,o))continue;if(o==="className"){let i="className";r[i]=e[i]?`${e[i]} ${t[i]}`:t[i];continue}if(o==="style"){let i="style";r[i]=e[i]?{...e[i],...t[i]}:t[i];continue}let n=t[o];if(typeof n=="function"&&o.startsWith("on")){let i=e[o];if(typeof i=="function"){r[o]=(...s)=>{n(...s),i(...s)};continue}}r[o]=n}return r}var Tp=B6e();function B6e(){var e;return typeof window<"u"&&!!((e=window.document)!=null&&e.createElement)}function lf(e){return e?"self"in e?e.document:e.ownerDocument||document:document}function iv(e,t=!1){var r;let{activeElement:o}=lf(e);if(!o?.nodeName)return null;if(K7(o)&&((r=o.contentDocument)!=null&&r.body))return iv(o.contentDocument.body,t);if(t){let n=o.getAttribute("aria-activedescendant");if(n){let i=lf(o).getElementById(n);if(i)return i}}return o}function _u(e,t){return e===t||e.contains(t)}function K7(e){return e.tagName==="IFRAME"}function cf(e){let t=e.tagName.toLowerCase();return t==="button"?!0:t==="input"&&e.type?V6e.indexOf(e.type)!==-1:!1}var V6e=["button","color","file","image","reset","submit"];function Z7(e){if(typeof e.checkVisibility=="function")return e.checkVisibility();let t=e;return t.offsetWidth>0||t.offsetHeight>0||e.getClientRects().length>0}function fs(e){try{let t=e instanceof HTMLInputElement&&e.selectionStart!==null,r=e.tagName==="TEXTAREA";return t||r||!1}catch{return!1}}function T1(e){return e.isContentEditable||fs(e)}function X7(e){if(fs(e))return e.value;if(e.isContentEditable){let t=lf(e).createRange();return t.selectNodeContents(e),t.toString()}return""}function x0(e){let t=0,r=0;if(fs(e))t=e.selectionStart||0,r=e.selectionEnd||0;else if(e.isContentEditable){let o=lf(e).getSelection();if(o?.rangeCount&&o.anchorNode&&_u(e,o.anchorNode)&&o.focusNode&&_u(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 Q7(e,t){let r=["dialog","menu","listbox","tree","grid"],o=e?.getAttribute("role");return o&&r.indexOf(o)!==-1?o:t}function _0(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 _0(e.parentElement)||document.scrollingElement||document.body}function E1(e,...t){/text|search|password|tel|url/i.test(e.type)&&e.setSelectionRange(...t)}function J7(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:j6e(c,u)?(n>s&&(o=!0),-1):(n<s&&(o=!0),1)}),o?r.map(([n,i])=>i):e}function j6e(e,t){return!!(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}function $7(){return Tp&&!!navigator.maxTouchPoints}function pA(){return Tp?/mac|iphone|ipad|ipod/i.test(navigator.platform):!1}function sv(){return Tp&&pA()&&/apple/i.test(navigator.vendor)}function e9(){return Tp&&/firefox\//i.test(navigator.userAgent)}function hA(e){return!!(e.currentTarget&&!_u(e.currentTarget,e.target))}function Ri(e){return e.target===e.currentTarget}function pre(e){let t=e.currentTarget;if(!t)return!1;let r=pA();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 hre(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 av(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 gre(e,t,r){let o=new KeyboardEvent(t,r);return e.dispatchEvent(o)}function t9(e,t){let r=new MouseEvent("click",t);return e.dispatchEvent(r)}function gA(e,t){let r=t||e.currentTarget,o=e.relatedTarget;return!o||!_u(r,o)}function Ep(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 Cu(e,t,r,o=window){let n=[];try{o.document.addEventListener(e,t,r);for(let s of Array.from(o.frames))n.push(Cu(e,t,r,s))}catch{}return()=>{try{o.document.removeEventListener(e,t,r)}catch{}for(let s of n)s()}}var z6e=a(Se(),1),gr=a(Se(),1),r9={...z6e},vre=r9.useId,P_t=r9.useDeferredValue,yre=r9.useInsertionEffect,ao=Tp?gr.useLayoutEffect:gr.useEffect;function H6e(e){let[t]=(0,gr.useState)(e);return t}function xre(e){let t=(0,gr.useRef)(e);return ao(()=>{t.current=e}),t}function At(e){let t=(0,gr.useRef)(()=>{throw new Error("Cannot call an event handler while rendering.")});return yre?yre(()=>{t.current=e}):t.current=e,(0,gr.useCallback)((...r)=>{var o;return(o=t.current)==null?void 0:o.call(t,...r)},[])}function _re(e){let[t,r]=(0,gr.useState)(null);return ao(()=>{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)dre(r,t)}},e)}function yl(e){if(vre){let o=vre();return e||o}let[t,r]=(0,gr.useState)(e);return ao(()=>{if(e||t)return;let o=Math.random().toString(36).slice(2,8);r(`id-${o}`)},[e,t]),e||t}function Cre(e,t){let r=i=>{if(typeof i=="string")return i},[o,n]=(0,gr.useState)(()=>r(t));return ao(()=>{let i=e&&"current"in e?e.current:e;n(i?.tagName.toLowerCase()||r(t))},[e,t]),o}function Tre(e,t,r){let o=H6e(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 Tu(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 Ere(e,t){let r=(0,gr.useRef)(!1);ao(()=>{if(r.current)return e();r.current=!0},t),ao(()=>()=>{r.current=!1},[])}function Pre(){return(0,gr.useReducer)(()=>[],[])}function Bo(e){return At(typeof e=="function"?e:()=>e)}function Eu(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 kre(e,t,r){let o=e.onLoadedMetadataCapture,n=(0,gr.useMemo)(()=>Object.assign(()=>{},{...o,[t]:r}),[o,t,r]);return[o?.[t],{onLoadedMetadataCapture:n}]}var bre=!1;function Rre(){return(0,gr.useEffect)(()=>{bre||(Cu("mousemove",W6e,!0),Cu("mousedown",vA,!0),Cu("mouseup",vA,!0),Cu("keydown",vA,!0),Cu("scroll",vA,!0),bre=!0)},[]),At(()=>o9)}var o9=!1,wre=0,Sre=0;function U6e(e){let t=e.movementX||e.screenX-wre,r=e.movementY||e.screenY-Sre;return wre=e.screenX,Sre=e.screenY,t||r||!1}function W6e(e){U6e(e)&&(o9=!0)}function vA(){o9=!1}var ms=a(Se(),1),lv=a(T(),1);function vr(e){let t=ms.forwardRef((r,o)=>e({...r,ref:o}));return t.displayName=e.displayName||e.name,t}function Pp(e,t){return ms.memo(e,t)}function Rr(e,t){let{wrapElement:r,render:o,...n}=t,i=wo(t.ref,fre(o)),s;if(ms.isValidElement(o)){let l={...o.props,ref:i};s=ms.cloneElement(o,mre(n,l))}else o?s=o(n):s=(0,lv.jsx)(e,{...n});return r?r(s):s}function Ar(e){let t=(r={})=>e(r);return t.displayName=e.name,t}function Xs(e=[],t=[]){let r=ms.createContext(void 0),o=ms.createContext(void 0),n=()=>ms.useContext(r),i=(u=!1)=>{let d=ms.useContext(o),f=n();return u?d:d||f},s=()=>{let u=ms.useContext(o),d=n();if(!(u&&u===d))return d},l=u=>e.reduceRight((d,f)=>(0,lv.jsx)(f,{...u,children:d}),(0,lv.jsx)(r.Provider,{...u}));return{context:r,scopedContext:o,useContext:n,useScopedContext:i,useProviderContext:s,ContextProvider:l,ScopedContextProvider:u=>(0,lv.jsx)(l,{...u,children:t.reduceRight((d,f)=>(0,lv.jsx)(f,{...u,children:d}),(0,lv.jsx)(o.Provider,{...u}))})}}var P1=Xs(),Are=P1.useContext,N_t=P1.useScopedContext,M_t=P1.useProviderContext,Ire=P1.ContextProvider,Ore=P1.ScopedContextProvider;var n9=a(Se(),1),k1=Xs([Ire],[Ore]),yA=k1.useContext,B_t=k1.useScopedContext,Nre=k1.useProviderContext,C0=k1.ContextProvider,bA=k1.ScopedContextProvider,Mre=(0,n9.createContext)(void 0),Dre=(0,n9.createContext)(void 0);function Fre(e,t){return e.find(r=>t?!r.disabled&&r.id!==t:!r.disabled)}function Pu(e,t){return t&&e.item(t)||null}function Lre(e){let t=[];for(let r of e){let o=t.find(n=>{var i;return((i=n[0])==null?void 0:i.rowId)===r.rowId});o?o.push(r):t.push([r])}return t}function Bre(e,t=!1){if(fs(e))e.setSelectionRange(t?e.value.length:0,e.value.length);else if(e.isContentEditable){let r=lf(e).getSelection();r?.selectAllChildren(e),t&&r?.collapseToEnd()}}var i9=Symbol("FOCUS_SILENTLY");function Vre(e){e[i9]=!0,e.focus({preventScroll:!0})}function jre(e){let t=e[i9];return delete e[i9],t}function cv(e,t,r){if(!t||t===r)return!1;let o=e.item(t.id);return!(!o||r&&o.element===r)}var wA=a(Se(),1),G6e="div",s9=Ar(function({store:t,shouldRegisterItem:r=!0,getItem:o=C1,element:n,...i}){let s=Are();t=t||s;let l=yl(i.id),c=(0,wA.useRef)(n);return(0,wA.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)},ri(i)}),Y_t=vr(function(t){let r=s9(t);return Rr(G6e,r)});var zre=a(Se(),1),Hre=(0,zre.createContext)(!0);var Ure="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 R1(e){return!(!e.matches(Ure)||!Z7(e)||e.closest("[inert]"))}function Wre(e){for(;e&&!R1(e);)e=e.closest(Ure);return e||null}function bl(e){let t=iv(e);if(!t)return!1;if(t===e)return!0;let r=t.getAttribute("aria-activedescendant");return r?r===e.id:!1}function a9(e){let t=iv(e);if(!t)return!1;if(_u(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 Gre(e){!a9(e)&&R1(e)&&e.focus()}function Yre(e,t){"scrollIntoView"in e?(e.focus({preventScroll:!0}),e.scrollIntoView({block:"nearest",inline:"nearest",...t})):e.focus()}var Va=a(Se(),1),Y6e="div",qre=sv(),q6e=["text","search","url","tel","email","password","number","date","month","week","time","datetime","datetime-local"],K6e=Symbol("safariFocusAncestor");function Kre(e,t){e&&(e[K6e]=t)}function Z6e(e){let{tagName:t,readOnly:r,type:o}=e;return t==="TEXTAREA"&&!r||t==="SELECT"&&!r?!0:t==="INPUT"&&!r?q6e.includes(o):!!(e.isContentEditable||e.getAttribute("role")==="combobox"&&e.dataset.name)}function X6e(e){return"labels"in e?e.labels:null}function Zre(e){return e.tagName.toLowerCase()==="input"&&e.type?e.type==="radio"||e.type==="checkbox":!1}function Q6e(e){return e?e==="button"||e==="summary"||e==="input"||e==="select"||e==="textarea"||e==="a":!0}function J6e(e){return e?e==="button"||e==="input"||e==="select"||e==="textarea":!0}function $6e(e,t,r,o,n){return e?t?r&&!o?-1:void 0:r?n:n||0:n}function l9(e,t){return At(r=>{e?.(r),!r.defaultPrevented&&t&&(r.stopPropagation(),r.preventDefault())})}var Xre=!1,c9=!0;function e3e(e){let t=e.target;t&&"hasAttribute"in t&&(t.hasAttribute("data-focus-visible")||(c9=!1))}function t3e(e){e.metaKey||e.ctrlKey||e.altKey||(c9=!0)}var A1=Ar(function({focusable:t=!0,accessibleWhenDisabled:r,autoFocus:o,onFocusVisible:n,...i}){let s=(0,Va.useRef)(null);(0,Va.useEffect)(()=>{t&&(Xre||(Cu("mousedown",e3e,!0),Cu("keydown",t3e,!0),Xre=!0))},[t]),qre&&(0,Va.useEffect)(()=>{if(!t)return;let B=s.current;if(!B||!Zre(B))return;let N=X6e(B);if(!N)return;let z=()=>queueMicrotask(()=>B.focus());for(let O of N)O.addEventListener("mouseup",z);return()=>{for(let O of N)O.removeEventListener("mouseup",z)}},[t]);let l=t&&nv(i),c=!!l&&!r,[u,d]=(0,Va.useState)(!1);(0,Va.useEffect)(()=>{t&&c&&u&&d(!1)},[t,c,u]),(0,Va.useEffect)(()=>{if(!t||!u)return;let B=s.current;if(!B||typeof IntersectionObserver>"u")return;let N=new IntersectionObserver(()=>{R1(B)||d(!1)});return N.observe(B),()=>N.disconnect()},[t,u]);let f=l9(i.onKeyPressCapture,l),m=l9(i.onMouseDownCapture,l),h=l9(i.onClickCapture,l),g=i.onMouseDown,v=At(B=>{if(g?.(B),B.defaultPrevented||!t)return;let N=B.currentTarget;if(!qre||hA(B)||!cf(N)&&!Zre(N))return;let z=!1,O=()=>{z=!0},F={capture:!0,once:!0};N.addEventListener("focusin",O,F);let L=Wre(N.parentElement);Kre(L,!0),Ep(N,"mouseup",()=>{N.removeEventListener("focusin",O,!0),Kre(L,!1),!z&&Gre(N)})}),y=(B,N)=>{if(N&&(B.currentTarget=N),!t)return;let z=B.currentTarget;z&&bl(z)&&(n?.(B),!B.defaultPrevented&&(z.dataset.focusVisible="true",d(!0)))},b=i.onKeyDownCapture,w=At(B=>{if(b?.(B),B.defaultPrevented||!t||u||B.metaKey||B.altKey||B.ctrlKey||!Ri(B))return;let N=B.currentTarget;Ep(N,"focusout",()=>y(B,N))}),S=i.onFocusCapture,x=At(B=>{if(S?.(B),B.defaultPrevented||!t)return;if(!Ri(B)){d(!1);return}let N=B.currentTarget,z=()=>y(B,N);c9||Z6e(B.target)?Ep(B.target,"focusout",z):d(!1)}),_=i.onBlur,P=At(B=>{_?.(B),t&&gA(B)&&(B.currentTarget.removeAttribute("data-focus-visible"),d(!1))}),I=(0,Va.useContext)(Hre),A=At(B=>{t&&o&&B&&I&&queueMicrotask(()=>{bl(B)||R1(B)&&B.focus()})}),k=Cre(s),D=t&&Q6e(k),E=t&&J6e(k),C=i.style,M=(0,Va.useMemo)(()=>c?{pointerEvents:"none",...C}:C,[c,C]);return i={"data-focus-visible":t&&u||void 0,"data-autofocus":o||void 0,"aria-disabled":l||void 0,...i,ref:wo(s,A,i.ref),style:M,tabIndex:$6e(t,c,D,E,i.tabIndex),disabled:E&&c?!0:void 0,contentEditable:l?void 0:i.contentEditable,onKeyPressCapture:f,onClickCapture:h,onMouseDownCapture:m,onMouseDown:v,onKeyDownCapture:w,onFocusCapture:x,onBlur:P},ri(i)}),l1t=vr(function(t){let r=A1(t);return Rr(Y6e,r)});var kp=a(Se(),1),r3e="button";function Qre(e){if(!e.isTrusted)return!1;let t=e.currentTarget;return e.key==="Enter"?cf(t)||t.tagName==="SUMMARY"||t.tagName==="A":e.key===" "?cf(t)||t.tagName==="SUMMARY"||t.tagName==="INPUT"||t.tagName==="SELECT":!1}var o3e=Symbol("command"),u9=Ar(function({clickOnEnter:t=!0,clickOnSpace:r=!0,...o}){let n=(0,kp.useRef)(null),[i,s]=(0,kp.useState)(!1);(0,kp.useEffect)(()=>{n.current&&s(cf(n.current))},[]);let[l,c]=(0,kp.useState)(!1),u=(0,kp.useRef)(!1),d=nv(o),[f,m]=kre(o,o3e,!0),h=o.onKeyDown,g=At(b=>{h?.(b);let w=b.currentTarget;if(b.defaultPrevented||f||d||!Ri(b)||fs(w)||w.isContentEditable)return;let S=t&&b.key==="Enter",x=r&&b.key===" ",_=b.key==="Enter"&&!t,P=b.key===" "&&!r;if(_||P){b.preventDefault();return}if(S||x){let I=Qre(b);if(S){if(!I){b.preventDefault();let{view:A,...k}=b,D=()=>t9(w,k);e9()?Ep(w,"keyup",D):queueMicrotask(D)}}else x&&(u.current=!0,I||(b.preventDefault(),c(!0)))}}),v=o.onKeyUp,y=At(b=>{if(v?.(b),b.defaultPrevented||f||d||b.metaKey)return;let w=r&&b.key===" ";if(u.current&&w&&(u.current=!1,!Qre(b))){b.preventDefault(),c(!1);let S=b.currentTarget,{view:x,..._}=b;queueMicrotask(()=>t9(S,_))}});return o={"data-active":l||void 0,type:i?"button":void 0,...m,...o,ref:wo(n,o.ref),onKeyDown:g,onKeyUp:y},o=A1(o),o}),v1t=vr(function(t){let r=u9(t);return Rr(r3e,r)});function uv(e,t){let r=e.__unstableInternals;return ti(r,"Invalid store"),r[t]}function ps(e,...t){let r=e,o=r,n=Symbol(),i=x1,s=new Set,l=new Set,c=new Set,u=new Set,d=new Set,f=new WeakMap,m=new WeakMap,h=A=>(c.add(A),()=>c.delete(A)),g=()=>{let A=s.size,k=Symbol();s.add(k);let D=()=>{s.delete(k),!s.size&&i()};if(A)return D;let E=Y7(r).map(B=>Cp(...t.map(N=>{var z;let O=(z=N?.getState)==null?void 0:z.call(N);if(O&&Zs(O,B))return In(N,[B],F=>{P(B,F[B],!0)})}))),C=[];for(let B of c)C.push(B());let M=t.map(T0);return i=Cp(...E,...C,...M),D},v=(A,k,D=u)=>(D.add(k),m.set(k,A),()=>{var E;(E=f.get(k))==null||E(),f.delete(k),m.delete(k),D.delete(k)}),y=(A,k)=>v(A,k),b=(A,k)=>(f.set(k,k(r,r)),v(A,k)),w=(A,k)=>(f.set(k,k(r,o)),v(A,k,d)),S=A=>ps(G7(r,A),I),x=A=>ps(W7(r,A),I),_=()=>r,P=(A,k,D=!1)=>{var E;if(!Zs(r,A))return;let C=U7(k,r[A]);if(C===r[A])return;if(!D)for(let z of t)(E=z?.setState)==null||E.call(z,A,C);let M=r;r={...r,[A]:C};let B=Symbol();n=B,l.add(A);let N=(z,O,F)=>{var L;let H=m.get(z),q=Q=>F?F.has(Q):Q===A;(!H||H.some(q))&&((L=f.get(z))==null||L(),f.set(z,z(r,O)))};for(let z of u)N(z,M);queueMicrotask(()=>{if(n!==B)return;let z=r;for(let O of d)N(O,o,l);o=z,l.clear()})},I={getState:_,setState:P,__unstableInternals:{setup:h,init:g,subscribe:y,sync:b,batch:w,pick:S,omit:x}};return I}function An(e,...t){if(e)return uv(e,"setup")(...t)}function T0(e,...t){if(e)return uv(e,"init")(...t)}function E0(e,...t){if(e)return uv(e,"subscribe")(...t)}function In(e,...t){if(e)return uv(e,"sync")(...t)}function Rp(e,...t){if(e)return uv(e,"batch")(...t)}function I1(e,...t){if(e)return uv(e,"omit")(...t)}function d9(e,...t){if(e)return uv(e,"pick")(...t)}function dv(...e){var t;let r={};for(let n of e){let i=(t=n?.getState)==null?void 0:t.call(n);i&&Object.assign(r,i)}let o=ps(r,...e);return Object.assign({},...e,o)}var ku=a(Se(),1),Jre=a(w2(),1),{useSyncExternalStore:$re}=Jre.default,eoe=()=>()=>{};function P0(e,t=C1){let r=ku.useCallback(n=>e?E0(e,null,n):eoe(),[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&&Zs(s,n))return s[n]};return $re(r,o,o)}function xA(e,t){let r=ku.useRef({}),o=ku.useCallback(i=>e?E0(e,null,i):eoe(),[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||!Zs(i,u))continue;let d=i[u];d!==l[c]&&(l[c]=d,s=!0)}}return s&&(r.current={...l}),r.current};return $re(o,n,n)}function So(e,t,r,o){let n=Zs(t,r)?t[r]:void 0,i=o?t[o]:void 0,s=xre({value:n,setValue:i});ao(()=>In(e,[r],(l,c)=>{let{value:u,setValue:d}=s.current;d&&l[r]!==c[r]&&l[r]!==u&&d(l[r])}),[e,r]),ao(()=>{if(n!==void 0)return e.setState(r,n),Rp(e,[r],()=>{n!==void 0&&e.setState(r,n)})})}function k0(e,t){let[r,o]=ku.useState(()=>e(t));ao(()=>T0(r),[r]);let n=ku.useCallback(l=>P0(r,l),[r]),i=ku.useMemo(()=>({...r,useState:n}),[r,n]),s=At(()=>{o(l=>e({...t,...l.getState()}))});return[i,s]}var uf=a(Se(),1),roe=a(T(),1),n3e="button";function i3e(e){return T1(e)?!0:e.tagName==="INPUT"&&!cf(e)}function s3e(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 a3e(e,t=!1){let{top:r}=e.getBoundingClientRect();return t?r+e.clientHeight:r}function toe(e,t,r,o=!1){var n;if(!t||!r)return;let{renderedItems:i}=t.getState(),s=_0(e);if(!s)return;let l=s3e(s,o),c,u;for(let d=0;d<i.length;d+=1){let f=c;if(c=r(d),!c)break;if(c===f)continue;let m=(n=Pu(t,c))==null?void 0:n.element;if(!m)continue;let g=a3e(m,o)-l,v=Math.abs(g);if(o&&g<=0||!o&&g>=0){u!==void 0&&u<v&&(c=f);break}u=v}return c}function l3e(e,t){return Ri(e)?!1:cv(t,e.target)}var f9=Ar(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=yA();t=t||d;let f=yl(u.id),m=(0,uf.useRef)(null),h=(0,uf.useContext)(Dre),v=nv(u)&&!u.accessibleWhenDisabled,{rowId:y,baseElement:b,isActiveItem:w,ariaSetSize:S,ariaPosInSet:x,isTabbable:_}=xA(t,{rowId(O){if(r)return r;if(O&&h?.baseElement&&h.baseElement===O.baseElement)return h.id},baseElement(O){return O?.baseElement||void 0},isActiveItem(O){return!!O&&O.activeId===f},ariaSetSize(O){if(l!=null)return l;if(O&&h?.ariaSetSize&&h.baseElement===O.baseElement)return h.ariaSetSize},ariaPosInSet(O){if(c!=null)return c;if(!O||!h?.ariaPosInSet||h.baseElement!==O.baseElement)return;let F=O.renderedItems.filter(L=>L.rowId===y);return h.ariaPosInSet+F.findIndex(L=>L.id===f)},isTabbable(O){if(!O?.renderedItems.length)return!0;if(O.virtualFocus)return!1;if(i)return!0;if(O.activeId===null)return!1;let F=t?.item(O.activeId);return F?.disabled||!F?.element?!0:O.activeId===f}}),P=(0,uf.useCallback)(O=>{var F;let L={...O,id:f||O.id,rowId:y,disabled:!!v,children:(F=O.element)==null?void 0:F.textContent};return s?s(L):L},[f,y,v,s]),I=u.onFocus,A=(0,uf.useRef)(!1),k=At(O=>{if(I?.(O),O.defaultPrevented||hA(O)||!f||!t||l3e(O,t))return;let{virtualFocus:F,baseElement:L}=t.getState();if(t.setActiveId(f),T1(O.currentTarget)&&Bre(O.currentTarget),!F||!Ri(O)||i3e(O.currentTarget)||!L?.isConnected)return;sv()&&O.currentTarget.hasAttribute("data-autofocus")&&O.currentTarget.scrollIntoView({block:"nearest",inline:"nearest"}),A.current=!0,O.relatedTarget===L||cv(t,O.relatedTarget)?Vre(L):L.focus()}),D=u.onBlurCapture,E=At(O=>{if(D?.(O),O.defaultPrevented)return;let F=t?.getState();F?.virtualFocus&&A.current&&(A.current=!1,O.preventDefault(),O.stopPropagation())}),C=u.onKeyDown,M=Bo(o),B=Bo(n),N=At(O=>{if(C?.(O),O.defaultPrevented||!Ri(O)||!t)return;let{currentTarget:F}=O,L=t.getState(),H=t.item(f),q=!!H?.rowId,Q=L.orientation!=="horizontal",J=L.orientation!=="vertical",te=()=>!!(q||J||!L.baseElement||!fs(L.baseElement)),$={ArrowUp:(q||Q)&&t.up,ArrowRight:(q||J)&&t.next,ArrowDown:(q||Q)&&t.down,ArrowLeft:(q||J)&&t.previous,Home:()=>{if(te())return!q||O.ctrlKey?t?.first():t?.previous(-1)},End:()=>{if(te())return!q||O.ctrlKey?t?.last():t?.next(-1)},PageUp:()=>toe(F,t,t?.up,!0),PageDown:()=>toe(F,t,t?.down)}[O.key];if($){if(T1(F)){let oe=x0(F),pe=J&&O.key==="ArrowLeft",be=J&&O.key==="ArrowRight",Ce=Q&&O.key==="ArrowUp",Ge=Q&&O.key==="ArrowDown";if(be||Ge){let{length:He}=X7(F);if(oe.end!==He)return}else if((pe||Ce)&&oe.start!==0)return}let X=$();if(M(O)||X!==void 0){if(!B(O))return;O.preventDefault(),t.move(X)}}}),z=(0,uf.useMemo)(()=>({id:f,baseElement:b}),[f,b]);return u=Eu(u,O=>(0,roe.jsx)(Mre.Provider,{value:z,children:O}),[z]),u={id:f,"data-active-item":w||void 0,...u,ref:wo(m,u.ref),tabIndex:_?u.tabIndex:-1,onFocus:k,onBlurCapture:E,onKeyDown:N},u=u9(u),u=s9({store:t,...u,getItem:P,shouldRegisterItem:f?u.shouldRegisterItem:!1}),ri({...u,"aria-setsize":S,"aria-posinset":x})}),B1t=Pp(vr(function(t){let r=f9(t);return Rr(n3e,r)}));function m9(e){return Array.isArray(e)?e:typeof e<"u"?[e]:[]}function O1(e){let t=[];for(let r of e)t.push(...r);return t}function R0(e){return e.slice().reverse()}var Ru=a(Se(),1),noe=a(T(),1),c3e="div";function u3e(e){return e.some(t=>!!t.rowId)}function d3e(e){let t=e.target;return t&&!fs(t)?!1:e.key.length===1&&!e.ctrlKey&&!e.metaKey}function f3e(e){return e.key==="Shift"||e.key==="Control"||e.key==="Alt"||e.key==="Meta"}function ooe(e,t,r){return At(o=>{var n;if(t?.(o),o.defaultPrevented||o.isPropagationStopped()||!Ri(o)||f3e(o)||d3e(o))return;let i=e.getState(),s=(n=Pu(e,i.activeId))==null?void 0:n.element;if(!s)return;let{view:l,...c}=o,u=r?.current;s!==u&&s.focus(),gre(s,o.type,c)||o.preventDefault(),o.currentTarget.contains(s)&&o.stopPropagation()})}function m3e(e){return Fre(O1(R0(Lre(e))))}function p3e(e){let[t,r]=(0,Ru.useState)(!1),o=(0,Ru.useCallback)(()=>r(!0),[]),n=e.useState(i=>Pu(e,i.activeId));return(0,Ru.useEffect)(()=>{let i=n?.element;t&&i&&(r(!1),i.focus({preventScroll:!0}))},[n,t]),o}var p9=Ar(function({store:t,composite:r=!0,focusOnMove:o=r,moveOnKeyPress:n=!0,...i}){let s=Nre();t=t||s,ti(t,!1);let l=(0,Ru.useRef)(null),c=(0,Ru.useRef)(null),u=p3e(t),d=t.useState("moves"),[,f]=_re(r?t.setBaseElement:null);(0,Ru.useEffect)(()=>{var E;if(!t||!d||!r||!o)return;let{activeId:C}=t.getState(),M=(E=Pu(t,C))==null?void 0:E.element;M&&Yre(M)},[t,d,r,o]),ao(()=>{if(!t||!d||!r)return;let{baseElement:E,activeId:C}=t.getState();if(!(C===null)||!E)return;let B=c.current;c.current=null,B&&av(B,{relatedTarget:E}),bl(E)||E.focus()},[t,d,r]);let m=t.useState("activeId"),h=t.useState("virtualFocus");ao(()=>{var E;if(!t||!r||!h)return;let C=c.current;if(c.current=null,!C)return;let B=((E=Pu(t,m))==null?void 0:E.element)||iv(C);B!==C&&av(C,{relatedTarget:B})},[t,m,h,r]);let g=ooe(t,i.onKeyDownCapture,c),v=ooe(t,i.onKeyUpCapture,c),y=i.onFocusCapture,b=At(E=>{if(y?.(E),E.defaultPrevented||!t)return;let{virtualFocus:C}=t.getState();if(!C)return;let M=E.relatedTarget,B=jre(E.currentTarget);Ri(E)&&B&&(E.stopPropagation(),c.current=M)}),w=i.onFocus,S=At(E=>{if(w?.(E),E.defaultPrevented||!r||!t)return;let{relatedTarget:C}=E,{virtualFocus:M}=t.getState();M?Ri(E)&&!cv(t,C)&&queueMicrotask(u):Ri(E)&&t.setActiveId(null)}),x=i.onBlurCapture,_=At(E=>{var C;if(x?.(E),E.defaultPrevented||!t)return;let{virtualFocus:M,activeId:B}=t.getState();if(!M)return;let N=(C=Pu(t,B))==null?void 0:C.element,z=E.relatedTarget,O=cv(t,z),F=c.current;c.current=null,Ri(E)&&O?(z===N?F&&F!==z&&av(F,E):N?av(N,E):F&&av(F,E),E.stopPropagation()):!cv(t,E.target)&&N&&av(N,E)}),P=i.onKeyDown,I=Bo(n),A=At(E=>{var C;if(P?.(E),E.nativeEvent.isComposing||E.defaultPrevented||!t||!Ri(E))return;let{orientation:M,renderedItems:B,activeId:N}=t.getState(),z=Pu(t,N);if((C=z?.element)!=null&&C.isConnected)return;let O=M!=="horizontal",F=M!=="vertical",L=u3e(B);if((E.key==="ArrowLeft"||E.key==="ArrowRight"||E.key==="Home"||E.key==="End")&&fs(E.currentTarget))return;let J={ArrowUp:(L||O)&&(()=>{if(L){let te=m3e(B);return te?.id}return t?.last()}),ArrowRight:(L||F)&&t.first,ArrowDown:(L||O)&&t.first,ArrowLeft:(L||F)&&t.last,Home:t.first,End:t.last,PageUp:t.first,PageDown:t.last}[E.key];if(J){let te=J();if(te!==void 0){if(!I(E))return;E.preventDefault(),t.move(te)}}});i=Eu(i,E=>(0,noe.jsx)(C0,{value:t,children:E}),[t]),i={"aria-activedescendant":t.useState(E=>{var C;if(t&&r&&E.virtualFocus)return(C=Pu(t,E.activeId))==null?void 0:C.id}),...i,ref:wo(l,f,i.ref),onKeyDownCapture:g,onKeyUpCapture:v,onFocusCapture:b,onFocus:S,onBlurCapture:_,onKeyDown:A};let D=t.useState(E=>r&&(E.virtualFocus||E.activeId===null));return i=A1({focusable:D,...i}),i}),eCt=vr(function(t){let r=p9(t);return Rr(c3e,r)});var N1=Xs(),oCt=N1.useContext,nCt=N1.useScopedContext,h9=N1.useProviderContext,ioe=N1.ContextProvider,soe=N1.ScopedContextProvider;var g9=a(Se(),1),M1=Xs([ioe],[soe]),lCt=M1.useContext,cCt=M1.useScopedContext,uCt=M1.useProviderContext,aoe=M1.ContextProvider,_A=M1.ScopedContextProvider,dCt=(0,g9.createContext)(void 0),fCt=(0,g9.createContext)(void 0);var A0=a(Se(),1),uoe=a(uu(),1),v9=a(T(),1),h3e="div";function loe(e,t){let r=setTimeout(t,e);return()=>clearTimeout(r)}function g3e(e){let t=requestAnimationFrame(()=>{t=requestAnimationFrame(e)});return()=>cancelAnimationFrame(t)}function coe(...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 y9(e,t,r){return!r&&t!==!1&&(!e||!!t)}var v3e=Ar(function({store:t,alwaysVisible:r,...o}){let n=h9();t=t||n,ti(t,!1);let i=(0,A0.useRef)(null),s=yl(o.id),[l,c]=(0,A0.useState)(null),u=t.useState("open"),d=t.useState("mounted"),f=t.useState("animated"),m=t.useState("contentElement"),h=P0(t.disclosure,"contentElement");ao(()=>{i.current&&t?.setContentElement(i.current)},[t]),ao(()=>{let b;return t?.setState("animated",w=>(b=w,!0)),()=>{b!==void 0&&t?.setState("animated",b)}},[t]),ao(()=>{if(f){if(!m?.isConnected){c(null);return}return g3e(()=>{c(u?"enter":d?"leave":null)})}},[f,m,u,d]),ao(()=>{if(!t||!f||!l||!m)return;let b=()=>t?.setState("animating",!1),w=()=>(0,uoe.flushSync)(b);if(l==="leave"&&u||l==="enter"&&!u)return;if(typeof f=="number")return loe(f,w);let{transitionDuration:S,animationDuration:x,transitionDelay:_,animationDelay:P}=getComputedStyle(m),{transitionDuration:I="0",animationDuration:A="0",transitionDelay:k="0",animationDelay:D="0"}=h?getComputedStyle(h):{},E=coe(_,P,k,D),C=coe(S,x,I,A),M=E+C;if(!M){l==="enter"&&t.setState("animated",!1),b();return}let B=1e3/60,N=Math.max(M-B,0);return loe(N,w)},[t,f,m,h,u,l]),o=Eu(o,b=>(0,v9.jsx)(_A,{value:t,children:b}),[t]);let g=y9(d,o.hidden,r),v=o.style,y=(0,A0.useMemo)(()=>g?{...v,display:"none"}:v,[g,v]);return o={id:s,"data-open":u||void 0,"data-enter":l==="enter"||void 0,"data-leave":l==="leave"||void 0,hidden:g,...o,ref:wo(s?t.setContentElement:null,i,o.ref),style:y},ri(o)}),y3e=vr(function(t){let r=v3e(t);return Rr(h3e,r)}),wCt=vr(function({unmountOnHide:t,...r}){let o=h9(),n=r.store||o;return P0(n,s=>!t||s?.mounted)===!1?null:(0,v9.jsx)(y3e,{...r})});function doe(e={}){let t=dv(e.store,I1(e.disclosure,["contentElement","disclosureElement"]));let r=t?.getState(),o=Ct(e.open,r?.open,e.defaultOpen,!1),n=Ct(e.animated,r?.animated,!1),i={open:o,animated:n,animating:!!n&&o,mounted:o,contentElement:Ct(r?.contentElement,null),disclosureElement:Ct(r?.disclosureElement,null)},s=ps(i,t);return An(s,()=>In(s,["animated","animating"],l=>{l.animated||s.setState("animating",!1)})),An(s,()=>E0(s,["open"],()=>{s.getState().animated&&s.setState("animating",!0)})),An(s,()=>In(s,["open","animating"],l=>{s.setState("mounted",l.open||l.animating)})),{...s,disclosure:e.disclosure,setOpen:l=>s.setState("open",l),show:()=>s.setState("open",!0),hide:()=>s.setState("open",!1),toggle:()=>s.setState("open",l=>!l),stopAnimation:()=>s.setState("animating",!1),setContentElement:l=>s.setState("contentElement",l),setDisclosureElement:l=>s.setState("disclosureElement",l)}}function foe(e,t,r){return Tu(t,[r.store,r.disclosure]),So(e,r,"open","setOpen"),So(e,r,"mounted","setMounted"),So(e,r,"animated"),Object.assign(e,{disclosure:r.disclosure})}var D1=Xs([aoe],[_A]),ACt=D1.useContext,ICt=D1.useScopedContext,moe=D1.useProviderContext,poe=D1.ContextProvider,hoe=D1.ScopedContextProvider;function b3e(e){var t;let r=e.find(i=>!!i.element),o=[...e].reverse().find(i=>!!i.element),n=(t=r?.element)==null?void 0:t.parentElement;for(;n&&o?.element;){if(o&&n.contains(o.element))return n;n=n.parentElement}return lf(n).body}function w3e(e){return e?.__unstablePrivateStore}function goe(e={}){var t;e.store;let r=(t=e.store)==null?void 0:t.getState(),o=Ct(e.items,r?.items,e.defaultItems,[]),n=new Map(o.map(m=>[m.id,m])),i={items:o,renderedItems:Ct(r?.renderedItems,[])},s=w3e(e.store),l=ps({items:o,renderedItems:i.renderedItems},s),c=ps(i,e.store),u=m=>{let h=J7(m,g=>g.element);l.setState("renderedItems",h),c.setState("renderedItems",h)};An(c,()=>T0(l)),An(l,()=>Rp(l,["items"],m=>{c.setState("items",m.items)})),An(l,()=>Rp(l,["renderedItems"],m=>{let h=!0,g=requestAnimationFrame(()=>{let{renderedItems:w}=c.getState();m.renderedItems!==w&&u(m.renderedItems)});if(typeof IntersectionObserver!="function")return()=>cancelAnimationFrame(g);let v=()=>{if(h){h=!1;return}cancelAnimationFrame(g),g=requestAnimationFrame(()=>u(m.renderedItems))},y=b3e(m.renderedItems),b=new IntersectionObserver(v,{root:y});for(let w of m.renderedItems)w.element&&b.observe(w.element);return()=>{cancelAnimationFrame(g),b.disconnect()}}));let d=(m,h,g=!1)=>{let v;return h(b=>{let w=b.findIndex(({id:x})=>x===m.id),S=b.slice();if(w!==-1){v=b[w];let x={...v,...m};S[w]=x,n.set(m.id,x)}else S.push(m),n.set(m.id,m);return S}),()=>{h(b=>{if(!v)return g&&n.delete(m.id),b.filter(({id:x})=>x!==m.id);let w=b.findIndex(({id:x})=>x===m.id);if(w===-1)return b;let S=b.slice();return S[w]=v,n.set(m.id,v),S})}},f=m=>d(m,h=>l.setState("items",h),!0);return{...c,registerItem:f,renderItem:m=>Cp(f(m),d(m,h=>l.setState("renderedItems",h))),item:m=>{if(!m)return null;let h=n.get(m);if(!h){let{items:g}=l.getState();h=g.find(v=>v.id===m),h&&n.set(m,h)}return h||null},__unstablePrivateStore:l}}function voe(e,t,r){return Tu(t,[r.store]),So(e,r,"items","setItems"),e}var S3e={id:null};function df(e,t){return e.find(r=>t?!r.disabled&&r.id!==t:!r.disabled)}function x3e(e,t){return e.filter(r=>t?!r.disabled&&r.id!==t:!r.disabled)}function yoe(e,t){return e.filter(r=>r.rowId===t)}function _3e(e,t,r=!1){let o=e.findIndex(n=>n.id===t);return[...e.slice(o+1),...r?[S3e]:[],...e.slice(0,o)]}function boe(e){let t=[];for(let r of e){let o=t.find(n=>{var i;return((i=n[0])==null?void 0:i.rowId)===r.rowId});o?o.push(r):t.push([r])}return t}function woe(e){let t=0;for(let{length:r}of e)r>t&&(t=r);return t}function C3e(e){return{id:"__EMPTY_ITEM__",disabled:!0,rowId:e}}function T3e(e,t,r){let o=woe(e);for(let n of e)for(let i=0;i<o;i+=1){let s=n[i];if(!s||r&&s.disabled){let c=i===0&&r?df(n):n[i-1];n[i]=c&&t!==c.id&&r?c:C3e(c?.rowId)}}return e}function E3e(e){let t=boe(e),r=woe(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 Soe(e={}){var t;let r=(t=e.store)==null?void 0:t.getState(),o=goe(e),n=Ct(e.activeId,r?.activeId,e.defaultActiveId),i={...o.getState(),id:Ct(e.id,r?.id,`id-${Math.random().toString(36).slice(2,8)}`),activeId:n,baseElement:Ct(r?.baseElement,null),includesBaseElement:Ct(e.includesBaseElement,r?.includesBaseElement,n===null),moves:Ct(r?.moves,0),orientation:Ct(e.orientation,r?.orientation,"both"),rtl:Ct(e.rtl,r?.rtl,!1),virtualFocus:Ct(e.virtualFocus,r?.virtualFocus,!1),focusLoop:Ct(e.focusLoop,r?.focusLoop,!1),focusWrap:Ct(e.focusWrap,r?.focusWrap,!1),focusShift:Ct(e.focusShift,r?.focusShift,!1)},s=ps(i,o,e.store);An(s,()=>In(s,["renderedItems","activeId"],c=>{s.setState("activeId",u=>{var d;return u!==void 0?u:(d=df(c.renderedItems))==null?void 0:d.id})}));let l=(c="next",u={})=>{var d,f;let m=s.getState(),{skip:h=0,activeId:g=m.activeId,focusShift:v=m.focusShift,focusLoop:y=m.focusLoop,focusWrap:b=m.focusWrap,includesBaseElement:w=m.includesBaseElement,renderedItems:S=m.renderedItems,rtl:x=m.rtl}=u,_=c==="up"||c==="down",P=c==="next"||c==="down",I=P?x&&!_:!x||_,A=v&&!h,k=_?O1(T3e(boe(S),g,A)):S;if(k=I?R0(k):k,k=_?E3e(k):k,g==null)return(d=df(k))==null?void 0:d.id;let D=k.find(L=>L.id===g);if(!D)return(f=df(k))==null?void 0:f.id;let E=k.some(L=>L.rowId),C=k.indexOf(D),M=k.slice(C+1),B=yoe(M,D.rowId);if(h){let L=x3e(B,g),H=L.slice(h)[0]||L[L.length-1];return H?.id}let N=y&&(_?y!=="horizontal":y!=="vertical"),z=E&&b&&(_?b!=="horizontal":b!=="vertical"),O=P?(!E||_)&&N&&w:_?w:!1;if(N){let L=z&&!O?k:yoe(k,D.rowId),H=_3e(L,g,O),q=df(H,g);return q?.id}if(z){let L=df(O?B:M,g);return O?L?.id||null:L?.id}let F=df(B,g);return!F&&O?null:F?.id};return{...o,...s,setBaseElement:c=>s.setState("baseElement",c),setActiveId:c=>s.setState("activeId",c),move:c=>{c!==void 0&&(s.setState("activeId",c),s.setState("moves",u=>u+1))},first:()=>{var c;return(c=df(s.getState().renderedItems))==null?void 0:c.id},last:()=>{var c;return(c=df(R0(s.getState().renderedItems)))==null?void 0:c.id},next:c=>(c!==void 0&&typeof c=="number"&&(c={skip:c}),l("next",c)),previous:c=>(c!==void 0&&typeof c=="number"&&(c={skip:c}),l("previous",c)),down:c=>(c!==void 0&&typeof c=="number"&&(c={skip:c}),l("down",c)),up:c=>(c!==void 0&&typeof c=="number"&&(c={skip:c}),l("up",c))}}function xoe(e){return{id:yl(e.id),...e}}function _oe(e,t,r){return e=voe(e,t,r),So(e,r,"activeId","setActiveId"),So(e,r,"includesBaseElement"),So(e,r,"virtualFocus"),So(e,r,"orientation"),So(e,r,"rtl"),So(e,r,"focusLoop"),So(e,r,"focusWrap"),So(e,r,"focusShift"),e}var CA=a(Se(),1),TA=(0,CA.createContext)(void 0),F1=Xs([poe,C0],[hoe,bA]),b9=F1.useContext,I0=F1.useScopedContext,EA=F1.useProviderContext,Coe=F1.ContextProvider,Toe=F1.ScopedContextProvider,PA=(0,CA.createContext)(void 0),Eoe=(0,CA.createContext)(!1);function Poe(e={}){return doe(e)}function koe(e,t,r){return foe(e,t,r)}function Roe({popover:e,...t}={}){let r=dv(t.store,I1(e,["arrowElement","anchorElement","contentElement","popoverElement","disclosureElement"]));let o=r?.getState(),n=Poe({...t,store:r}),i=Ct(t.placement,o?.placement,"bottom"),s={...n.getState(),placement:i,currentPlacement:i,anchorElement:Ct(o?.anchorElement,null),popoverElement:Ct(o?.popoverElement,null),arrowElement:Ct(o?.arrowElement,null),rendered:Symbol("rendered")},l=ps(s,n,r);return{...n,...l,setAnchorElement:c=>l.setState("anchorElement",c),setPopoverElement:c=>l.setState("popoverElement",c),setArrowElement:c=>l.setState("arrowElement",c),render:()=>l.setState("rendered",Symbol("rendered"))}}function Aoe(e,t,r){return Tu(t,[r.popover]),So(e,r,"placement"),koe(e,t,r)}var P3e="div",w9=Ar(function({store:t,...r}){let o=moe();return t=t||o,r={...r,ref:wo(t?.setAnchorElement,r.ref)},r}),pTt=vr(function(t){let r=w9(t);return Rr(P3e,r)});var Ioe=a(Se(),1),k3e="div";function Ooe(e){let t=e.relatedTarget;return t?.nodeType===Node.ELEMENT_NODE?t:null}function R3e(e){let t=Ooe(e);return t?_u(e.currentTarget,t):!1}var S9=Symbol("composite-hover");function A3e(e){let t=Ooe(e);if(!t)return!1;do{if(Zs(t,S9)&&t[S9])return!0;t=t.parentElement}while(t);return!1}var x9=Ar(function({store:t,focusOnHover:r=!0,blurOnHoverEnd:o=!!r,...n}){let i=yA();t=t||i,ti(t,!1);let s=Rre(),l=n.onMouseMove,c=Bo(r),u=At(g=>{if(l?.(g),!g.defaultPrevented&&s()&&c(g)){if(!a9(g.currentTarget)){let v=t?.getState().baseElement;v&&!bl(v)&&v.focus()}t?.setActiveId(g.currentTarget.id)}}),d=n.onMouseLeave,f=Bo(o),m=At(g=>{var v;d?.(g),!g.defaultPrevented&&s()&&(R3e(g)||A3e(g)||c(g)&&f(g)&&(t?.setActiveId(null),(v=t?.getState().baseElement)==null||v.focus()))}),h=(0,Ioe.useCallback)(g=>{g&&(g[S9]=!0)},[]);return n={...n,ref:wo(h,n.ref),onMouseMove:u,onMouseLeave:m},ri(n)}),xTt=Pp(vr(function(t){let r=x9(t);return Rr(k3e,r)}));var oi=a(Se(),1),I3e="input";function Noe(e,t,r){if(!r)return!1;let o=e.find(n=>!n.disabled&&n.value);return o?.value===t}function Moe(e,t){return!t||e==null?!1:(e=_1(e),t.length>e.length&&t.toLowerCase().indexOf(e.toLowerCase())===0)}function O3e(e){return e.type==="input"}function N3e(e){return e==="inline"||e==="list"||e==="both"||e==="none"}function M3e(e){let t=e.find(r=>{var o;return r.disabled?!1:((o=r.element)==null?void 0:o.getAttribute("role"))!=="tab"});return t?.id}var D3e=Ar(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",...y}){let b=EA();t=t||b,ti(t,!1);let w=(0,oi.useRef)(null),[S,x]=Pre(),_=(0,oi.useRef)(!1),P=(0,oi.useRef)(!1),I=t.useState(ue=>ue.virtualFocus&&o),A=v==="inline"||v==="both",[k,D]=(0,oi.useState)(A);Ere(()=>{A&&D(!0)},[A]);let E=t.useState("value"),C=(0,oi.useRef)(void 0);(0,oi.useEffect)(()=>In(t,["selectedValue","activeId"],(ue,re)=>{C.current=re.selectedValue}),[]);let M=t.useState(ue=>{var re;if(A&&k&&!(ue.activeValue&&Array.isArray(ue.selectedValue)&&(ue.selectedValue.includes(ue.activeValue)||(re=C.current)!=null&&re.includes(ue.activeValue))))return ue.activeValue}),B=t.useState("renderedItems"),N=t.useState("open"),z=t.useState("contentElement"),O=(0,oi.useMemo)(()=>{if(!A||!k)return E;if(Noe(B,M,I)){if(Moe(E,M)){let re=M?.slice(E.length)||"";return E+re}return E}return M||E},[A,k,B,M,I,E]);(0,oi.useEffect)(()=>{let ue=w.current;if(!ue)return;let re=()=>D(!0);return ue.addEventListener("combobox-item-move",re),()=>{ue.removeEventListener("combobox-item-move",re)}},[]),(0,oi.useEffect)(()=>{if(!A||!k||!M||!Noe(B,M,I)||!Moe(E,M))return;let re=x1;return queueMicrotask(()=>{let ne=w.current;if(!ne)return;let{start:Te,end:Qe}=x0(ne),Pt=E.length,ft=M.length;E1(ne,Pt,ft),re=()=>{if(!bl(ne))return;let{start:It,end:Lt}=x0(ne);It===Pt&&Lt===ft&&E1(ne,Te,Qe)}}),()=>re()},[S,A,k,M,B,I,E]);let F=(0,oi.useRef)(null),L=At(n),H=(0,oi.useRef)(null);(0,oi.useEffect)(()=>{if(!N||!z)return;let ue=_0(z);if(!ue)return;F.current=ue;let re=()=>{_.current=!1},ne=()=>{if(!t||!_.current)return;let{activeId:Qe}=t.getState();Qe!==null&&Qe!==H.current&&(_.current=!1)},Te={passive:!0,capture:!0};return ue.addEventListener("wheel",re,Te),ue.addEventListener("touchmove",re,Te),ue.addEventListener("scroll",ne,Te),()=>{ue.removeEventListener("wheel",re,!0),ue.removeEventListener("touchmove",re,!0),ue.removeEventListener("scroll",ne,!0)}},[N,z,t]),ao(()=>{E&&(P.current||(_.current=!0))},[E]),ao(()=>{I!=="always"&&N||(_.current=N)},[I,N]);let q=t.useState("resetValueOnSelect");Tu(()=>{var ue,re;let ne=_.current;if(!t||!N||!ne&&!q)return;let{baseElement:Te,contentElement:Qe,activeId:Pt}=t.getState();if(!(Te&&!bl(Te))){if(Qe?.hasAttribute("data-placing")){let ft=new MutationObserver(x);return ft.observe(Qe,{attributeFilter:["data-placing"]}),()=>ft.disconnect()}if(I&&ne){let ft=L(B),It=ft!==void 0?ft:(ue=M3e(B))!=null?ue:t.first();H.current=It,t.move(It??null)}else{let ft=(re=t.item(Pt||t.first()))==null?void 0:re.element;ft&&"scrollIntoView"in ft&&ft.scrollIntoView({block:"nearest",inline:"nearest"})}}},[t,N,S,E,I,q,L,B]),(0,oi.useEffect)(()=>{if(!A)return;let ue=w.current;if(!ue)return;let re=[ue,z].filter(Te=>!!Te),ne=Te=>{re.every(Qe=>gA(Te,Qe))&&t?.setValue(O)};for(let Te of re)Te.addEventListener("focusout",ne);return()=>{for(let Te of re)Te.removeEventListener("focusout",ne)}},[A,z,t,O]);let Q=ue=>ue.currentTarget.value.length>=s,J=y.onChange,te=Bo(l??Q),se=Bo(i??!t.tag),$=At(ue=>{if(J?.(ue),ue.defaultPrevented||!t)return;let re=ue.currentTarget,{value:ne,selectionStart:Te,selectionEnd:Qe}=re,Pt=ue.nativeEvent;if(_.current=!0,O3e(Pt)&&(Pt.isComposing&&(_.current=!1,P.current=!0),A)){let ft=Pt.inputType==="insertText"||Pt.inputType==="insertCompositionText",It=Te===ne.length;D(ft&&It)}if(se(ue)){let ft=ne===t.getState().value;t.setValue(ne),queueMicrotask(()=>{E1(re,Te,Qe)}),A&&I&&ft&&x()}te(ue)&&t.show(),(!I||!_.current)&&t.setActiveId(null)}),X=y.onCompositionEnd,oe=At(ue=>{_.current=!0,P.current=!1,X?.(ue),!ue.defaultPrevented&&I&&x()}),pe=y.onMouseDown,be=Bo(m??(()=>!!t?.getState().includesBaseElement)),Ce=Bo(h),Ge=Bo(u??Q),He=At(ue=>{pe?.(ue),!ue.defaultPrevented&&(ue.button||ue.ctrlKey||t&&(be(ue)&&t.setActiveId(null),Ce(ue)&&t.setValue(O),Ge(ue)&&Ep(ue.currentTarget,"mouseup",t.show)))}),ge=y.onKeyDown,ie=Bo(f??Q),ce=At(ue=>{if(ge?.(ue),ue.repeat||(_.current=!1),ue.defaultPrevented||ue.ctrlKey||ue.altKey||ue.shiftKey||ue.metaKey||!t)return;let{open:re}=t.getState();re||(ue.key==="ArrowUp"||ue.key==="ArrowDown")&&ie(ue)&&(ue.preventDefault(),t.show())}),ae=y.onBlur,ye=At(ue=>{_.current=!1,ae?.(ue),ue.defaultPrevented}),Ie=yl(y.id),Oe=N3e(v)?v:void 0,ke=t.useState(ue=>ue.activeId===null);return y={id:Ie,role:"combobox","aria-autocomplete":Oe,"aria-haspopup":Q7(z,"listbox"),"aria-expanded":N,"aria-controls":z?.id,"data-active-item":ke||void 0,value:O,...y,ref:wo(w,y.ref),onChange:$,onCompositionEnd:oe,onMouseDown:He,onKeyDown:ce,onBlur:ye},y=p9({store:t,focusable:r,...y,moveOnKeyPress:ue=>q7(g,ue)?!1:(A&&D(!0),!0)}),y=w9({store:t,...y}),{autoComplete:"off",...y}}),kA=vr(function(t){let r=D3e(t);return Rr(I3e,r)});var RA=a(Se(),1),_9=a(T(),1),F3e="div";function L3e(e,t){if(t!=null)return e==null?!1:Array.isArray(e)?e.includes(t):e===t}function B3e(e){var t;return(t={menu:"menuitem",listbox:"option",tree:"treeitem"}[e])!=null?t:"option"}var Doe=Ar(function({store:t,value:r,hideOnClick:o,setValueOnClick:n,selectValueOnClick:i=!0,resetValueOnSelect:s,focusOnHover:l=!1,moveOnKeyPress:c=!0,getItem:u,...d}){var f;let m=I0();t=t||m,ti(t,!1);let{resetValueOnSelectState:h,multiSelectable:g,selected:v}=xA(t,{resetValueOnSelectState:"resetValueOnSelect",multiSelectable(E){return Array.isArray(E.selectedValue)},selected(E){return L3e(E.selectedValue,r)}}),y=(0,RA.useCallback)(E=>{let C={...E,value:r};return u?u(C):C},[r,u]);n=n??!g,o=o??(r!=null&&!g);let b=d.onClick,w=Bo(n),S=Bo(i),x=Bo((f=s??h)!=null?f:g),_=Bo(o),P=At(E=>{b?.(E),!E.defaultPrevented&&(hre(E)||pre(E)||(r!=null&&(S(E)&&(x(E)&&t?.resetValue(),t?.setSelectedValue(C=>Array.isArray(C)?C.includes(r)?C.filter(M=>M!==r):[...C,r]:r)),w(E)&&t?.setValue(r)),_(E)&&t?.hide()))}),I=d.onKeyDown,A=At(E=>{if(I?.(E),E.defaultPrevented)return;let C=t?.getState().baseElement;if(!C||bl(C))return;(E.key.length===1||E.key==="Backspace"||E.key==="Delete")&&(queueMicrotask(()=>C.focus()),fs(C)&&t?.setValue(C.value))});g&&v!=null&&(d={"aria-selected":v,...d}),d=Eu(d,E=>(0,_9.jsx)(PA.Provider,{value:r,children:(0,_9.jsx)(Eoe.Provider,{value:v??!1,children:E})}),[r,v]);let k=(0,RA.useContext)(TA);d={role:B3e(k),children:r,...d,onClick:P,onKeyDown:A};let D=Bo(c);return d=f9({store:t,...d,getItem:y,moveOnKeyPress:E=>{if(!D(E))return!1;let C=new Event("combobox-item-move"),M=t?.getState().baseElement;return M?.dispatchEvent(C),!0}}),d=x9({store:t,focusOnHover:l,...d}),d}),L1=Pp(vr(function(t){let r=Doe(t);return Rr(F3e,r)}));var AA=a(Se(),1),Loe=a(T(),1),V3e="span";function Foe(e){return _1(e).toLowerCase()}function j3e(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 z3e(e){return e.filter(([t,r],o,n)=>!n.some(([i,s],l)=>l!==o&&i<=t&&i+s>=t+r))}function H3e(e){return e.sort(([t],[r])=>t-r)}function U3e(e,t){if(!e||!t)return e;let r=m9(t).filter(Boolean).map(Foe),o=[],n=(c,u=!1)=>(0,Loe.jsx)("span",{"data-autocomplete-value":u?"":void 0,"data-user-value":u?void 0:"",children:c},o.length),i=H3e(z3e(j3e(Foe(e),new Set(r))));if(!i.length)return o.push(n(e,!0)),o;let[s]=i[0];return[e.slice(0,s),...i.flatMap(([c,u],d)=>{var f;let m=e.slice(c,c+u),h=(f=i[d+1])==null?void 0:f[0],g=e.slice(c+u,h);return[m,g]})].forEach((c,u)=>{c&&o.push(n(c,u%2===0))}),o}var W3e=Ar(function({store:t,value:r,userValue:o,...n}){let i=I0();t=t||i;let s=(0,AA.useContext)(PA),l=r??s,c=P0(t,d=>o??d?.value);return n={children:(0,AA.useMemo)(()=>{if(l)return c?U3e(l,c):l},[l,c]),...n},ri(n)}),IA=vr(function(t){let r=W3e(t);return Rr(V3e,r)});var G3e="label",Y3e=Ar(function({store:t,...r}){let o=EA();return t=t||o,ti(t,!1),r={htmlFor:t.useState(i=>{var s;return(s=i.baseElement)==null?void 0:s.id}),...r},ri(r)}),OA=Pp(vr(function(t){let r=Y3e(t);return Rr(G3e,r)}));var NA=a(Se(),1),C9=a(T(),1),q3e="div",Boe=Ar(function({store:t,alwaysVisible:r,...o}){let n=I0(!0),i=b9();t=t||i;let s=!!t&&t===n;ti(t,!1);let l=(0,NA.useRef)(null),c=yl(o.id),u=t.useState("mounted"),d=y9(u,o.hidden,r),f=d?{...o.style,display:"none"}:o.style,m=t.useState(x=>Array.isArray(x.selectedValue)),h=Tre(l,"role",o.role),v=(h==="listbox"||h==="tree"||h==="grid")&&m||void 0,[y,b]=(0,NA.useState)(!1),w=t.useState("contentElement");ao(()=>{if(!u)return;let x=l.current;if(!x||w!==x)return;let _=()=>{b(!!x.querySelector("[role='listbox']"))},P=new MutationObserver(_);return P.observe(x,{subtree:!0,childList:!0,attributeFilter:["role"]}),_(),()=>P.disconnect()},[u,w]),y||(o={role:"listbox","aria-multiselectable":v,...o}),o=Eu(o,x=>(0,C9.jsx)(Toe,{value:t,children:(0,C9.jsx)(TA.Provider,{value:h,children:x})}),[t,h]);let S=c&&(!n||!s)?t.setContentElement:null;return o={id:c,hidden:d,...o,ref:wo(S,l,o.ref),style:f},ri(o)}),B1=vr(function(t){let r=Boe(t);return Rr(q3e,r)});var T9=a(Se(),1),pEt=(0,T9.createContext)(null),hEt=(0,T9.createContext)(null),V1=Xs([C0],[bA]),Voe=V1.useContext,gEt=V1.useScopedContext,vEt=V1.useProviderContext,yEt=V1.ContextProvider,bEt=V1.ScopedContextProvider;var K3e=sv()&&$7();function joe({tag:e,...t}={}){let r=dv(t.store,d9(e,["value","rtl"]));let o=e?.getState(),n=r?.getState(),i=Ct(t.activeId,n?.activeId,t.defaultActiveId,null),s=Soe({...t,activeId:i,includesBaseElement:Ct(t.includesBaseElement,n?.includesBaseElement,!0),orientation:Ct(t.orientation,n?.orientation,"vertical"),focusLoop:Ct(t.focusLoop,n?.focusLoop,!0),focusWrap:Ct(t.focusWrap,n?.focusWrap,!0),virtualFocus:Ct(t.virtualFocus,n?.virtualFocus,!0)}),l=Roe({...t,placement:Ct(t.placement,n?.placement,"bottom-start")}),c=Ct(t.value,n?.value,t.defaultValue,""),u=Ct(t.selectedValue,n?.selectedValue,o?.values,t.defaultSelectedValue,""),d=Array.isArray(u),f={...s.getState(),...l.getState(),value:c,selectedValue:u,resetValueOnSelect:Ct(t.resetValueOnSelect,n?.resetValueOnSelect,d),resetValueOnHide:Ct(t.resetValueOnHide,n?.resetValueOnHide,d&&!e),activeValue:n?.activeValue},m=ps(f,s,l,r);return K3e&&An(m,()=>In(m,["virtualFocus"],()=>{m.setState("virtualFocus",!1)})),An(m,()=>{if(e)return Cp(In(m,["selectedValue"],h=>{Array.isArray(h.selectedValue)&&e.setValues(h.selectedValue)}),In(e,["values"],h=>{m.setState("selectedValue",h.values)}))}),An(m,()=>In(m,["resetValueOnHide","mounted"],h=>{h.resetValueOnHide&&(h.mounted||m.setState("value",c))})),An(m,()=>In(m,["open"],h=>{h.open||(m.setState("activeId",i),m.setState("moves",0))})),An(m,()=>In(m,["moves","activeId"],(h,g)=>{h.moves===g.moves&&m.setState("activeValue",void 0)})),An(m,()=>Rp(m,["moves","renderedItems"],(h,g)=>{if(h.moves===g.moves)return;let{activeId:v}=m.getState(),y=s.item(v);m.setState("activeValue",y?.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 X3e(e){let t=Voe();return e={...e,tag:e.tag!==void 0?e.tag:t},xoe(e)}function Q3e(e,t,r){return Tu(t,[r.tag]),So(e,r,"value","setValue"),So(e,r,"selectedValue","setSelectedValue"),So(e,r,"resetValueOnHide"),So(e,r,"resetValueOnSelect"),Object.assign(_oe(Aoe(e,t,r),t,r),{tag:r.tag})}function E9(e={}){e=X3e(e);let[t,r]=k0(joe,e);return Q3e(t,r,e)}var zoe=a(T(),1);function MA(e={}){let t=E9(e);return(0,zoe.jsx)(Coe,{value:t,children:e.children})}var Goe=a(s1(),1);var Yoe=a(_e(),1),Ap=a(j(),1),fv=a(U(),1),Au=a(W(),1);var $3e=[],j1=(e,t)=>e.singleSelection?t?.value:Array.isArray(t?.value)?t.value:!Array.isArray(t?.value)&&t?.value?[t.value]:$3e;var z1=a(U(),1),e4e=[];function On({elements:e,getElements:t}){let r=Array.isArray(e)&&e.length>0?e:e4e,[o,n]=(0,z1.useState)(r),[i,s]=(0,z1.useState)(!1);return(0,z1.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 Ht=a(T(),1);function Hoe(e=""){return(0,Goe.default)(e.trim().toLowerCase())}var Uoe=(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 Woe(e,t){return`${e}-${t}`}var qoe=({selected:e})=>(0,Ht.jsx)("span",{className:Z("dataviews-filters__search-widget-listitem-multi-selection",{"is-selected":e}),children:e&&(0,Ht.jsx)(Au.Icon,{icon:Qn})}),Koe=({selected:e})=>(0,Ht.jsx)("span",{className:Z("dataviews-filters__search-widget-listitem-single-selection",{"is-selected":e})});function Zoe({view:e,filter:t,onChangeView:r}){let o=(0,Yoe.useInstanceId)(Zoe,"dataviews-filter-list-box"),[n,i]=(0,fv.useState)(t.operators?.length===1?void 0:null),s=e.filters?.find(c=>c.field===t.field),l=j1(t,s);return(0,Ht.jsx)(Au.Composite,{virtualFocus:!0,focusLoop:!0,activeId:n,setActiveId:i,role:"listbox",className:"dataviews-filters__search-widget-listbox","aria-label":(0,Ap.sprintf)((0,Ap.__)("List of: %1$s"),t.name),onFocusVisible:()=>{!n&&t.elements.length&&i(Woe(o,t.elements[0].value))},render:(0,Ht.jsx)(Au.Composite.Typeahead,{}),children:t.elements.map(c=>(0,Ht.jsxs)(Au.Composite.Hover,{render:(0,Ht.jsx)(Au.Composite.Item,{id:Woe(o,c.value),render:(0,Ht.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:Uoe(t,s,c.value)}:d)]:[...e.filters??[],{field:t.field,operator:t.operators[0],value:Uoe(t,s,c.value)}];r({...e,page:1,filters:u})}}),children:[t.singleSelection&&(0,Ht.jsx)(Koe,{selected:l===c.value}),!t.singleSelection&&(0,Ht.jsx)(qoe,{selected:l.includes(c.value)}),(0,Ht.jsx)("span",{className:"dataviews-filters__search-widget-listitem-value",title:c.label,children:c.label})]},c.value))})}function t4e({view:e,filter:t,onChangeView:r}){let[o,n]=(0,fv.useState)(""),i=(0,fv.useDeferredValue)(o),s=e.filters?.find(u=>u.field===t.field),l=j1(t,s),c=(0,fv.useMemo)(()=>{let u=Hoe(i);return t.elements.filter(d=>Hoe(d.label).includes(u))},[t.elements,i]);return(0,Ht.jsxs)(MA,{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,Ht.jsxs)("div",{className:"dataviews-filters__search-widget-filter-combobox__wrapper",children:[(0,Ht.jsx)(tr,{render:(0,Ht.jsx)(OA,{}),children:(0,Ap.__)("Search items")}),(0,Ht.jsx)(kA,{autoSelect:"always",placeholder:(0,Ap.__)("Search"),className:"dataviews-filters__search-widget-filter-combobox__input"}),(0,Ht.jsx)("div",{className:"dataviews-filters__search-widget-filter-combobox__icon",children:(0,Ht.jsx)(Au.Icon,{icon:G4})})]}),(0,Ht.jsxs)(B1,{className:"dataviews-filters__search-widget-filter-combobox-list",alwaysVisible:!0,children:[c.map(u=>(0,Ht.jsxs)(L1,{resetValueOnSelect:!1,value:u.value,className:"dataviews-filters__search-widget-listitem",hideOnClick:!1,setValueOnClick:!1,focusOnHover:!0,children:[t.singleSelection&&(0,Ht.jsx)(Koe,{selected:l===u.value}),!t.singleSelection&&(0,Ht.jsx)(qoe,{selected:l.includes(u.value)}),(0,Ht.jsxs)("span",{className:"dataviews-filters__search-widget-listitem-value",title:u.label,children:[(0,Ht.jsx)(IA,{className:"dataviews-filters__search-widget-filter-combobox-item-value",value:u.label}),!!u.description&&(0,Ht.jsx)("span",{className:"dataviews-filters__search-widget-listitem-description",children:u.description})]})]},u.value)),!c.length&&(0,Ht.jsx)("p",{children:(0,Ap.__)("No results found")})]})]})}function Xoe(e){let{elements:t,isLoading:r}=On({elements:e.filter.elements,getElements:e.filter.getElements});if(r)return(0,Ht.jsx)("div",{className:"dataviews-filters__search-widget-no-elements",children:(0,Ht.jsx)(Au.Spinner,{})});if(t.length===0)return(0,Ht.jsx)("div",{className:"dataviews-filters__search-widget-no-elements",children:(0,Ap.__)("No elements found")});let o=t.length>10?t4e:Zoe;return(0,Ht.jsx)(o,{...e,filter:{...e.filter,elements:t}})}var Joe=a(DA(),1),$oe=a(_e(),1),P9=a(U(),1),ene=a(W(),1);var k9=a(T(),1);function tne({filter:e,view:t,onChangeView:r,fields:o}){let n=t.filters?.find(u=>u.field===e.field),i=j1(e,n),s=(0,P9.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,P9.useMemo)(()=>(t.filters??[]).reduce((u,d)=>(u[d.field]=d.value,u),{}),[t.filters]),c=(0,$oe.useEvent)(u=>{if(!s||!n)return;let d=s.getValue({item:u});(0,Joe.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,k9.jsx)(ene.Flex,{className:"dataviews-filters__user-input-widget",gap:2.5,direction:"column",children:(0,k9.jsx)(s.Edit,{hideLabelFromVision:!0,data:l,field:s,operator:n.operator,onChange:c})})}var r4e=Math.pow(10,8)*24*60*60*1e3,cPt=-r4e,FA=6048e5,rne=864e5,R9=6e4,A9=36e5;var o4e=3600;var one=o4e*24,uPt=one*7,n4e=one*365.2425,i4e=n4e/12,dPt=i4e*3,I9=Symbol.for("constructDateFrom");function Vo(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&I9 in e?e[I9](t):e instanceof Date?new e.constructor(t):new Date(t)}function Vt(e,t){return Vo(t||e,e)}function LA(e,t,r){let o=Vt(e,r?.in);return isNaN(t)?Vo(r?.in||e,NaN):(t&&o.setDate(o.getDate()+t),o)}function BA(e,t,r){let o=Vt(e,r?.in);if(isNaN(t))return Vo(r?.in||e,NaN);if(!t)return o;let n=o.getDate(),i=Vo(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 s4e={};function Ip(){return s4e}function ff(e,t){let r=Ip(),o=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,n=Vt(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 mv(e,t){return ff(e,{...t,weekStartsOn:1})}function VA(e,t){let r=Vt(e,t?.in),o=r.getFullYear(),n=Vo(r,0);n.setFullYear(o+1,0,4),n.setHours(0,0,0,0);let i=mv(n),s=Vo(r,0);s.setFullYear(o,0,4),s.setHours(0,0,0,0);let l=mv(s);return r.getTime()>=i.getTime()?o+1:r.getTime()>=l.getTime()?o:o-1}function O9(e){let t=Vt(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 nne(e,...t){let r=Vo.bind(null,e||t.find(o=>typeof o=="object"));return t.map(r)}function N9(e,t){let r=Vt(e,t?.in);return r.setHours(0,0,0,0),r}function ine(e,t,r){let[o,n]=nne(r?.in,e,t),i=N9(o),s=N9(n),l=+i-O9(i),c=+s-O9(s);return Math.round((l-c)/rne)}function sne(e,t){let r=VA(e,t),o=Vo(t?.in||e,0);return o.setFullYear(r,0,4),o.setHours(0,0,0,0),mv(o)}function ane(e,t,r){return LA(e,t*7,r)}function lne(e,t,r){return BA(e,t*12,r)}function cne(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function mf(e){return!(!cne(e)&&typeof e!="number"||isNaN(+Vt(e)))}function une(e,t){let r=Vt(e,t?.in),o=r.getMonth();return r.setFullYear(r.getFullYear(),o+1,0),r.setHours(23,59,59,999),r}function H1(e,t){let r=Vt(e,t?.in);return r.setDate(1),r.setHours(0,0,0,0),r}function jA(e,t){let r=Vt(e,t?.in);return r.setFullYear(r.getFullYear(),0,1),r.setHours(0,0,0,0),r}var a4e={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"}},dne=(e,t,r)=>{let o,n=a4e[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 zA(e){return(t={})=>{let r=t.width?String(t.width):e.defaultWidth;return e.formats[r]||e.formats[e.defaultWidth]}}var l4e={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},c4e={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},u4e={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},fne={date:zA({formats:l4e,defaultWidth:"full"}),time:zA({formats:c4e,defaultWidth:"full"}),dateTime:zA({formats:u4e,defaultWidth:"full"})};var d4e={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},mne=(e,t,r,o)=>d4e[e];function O0(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 f4e={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},m4e={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},p4e={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"]},h4e={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"]},g4e={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"}},v4e={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"}},y4e=(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"},pne={ordinalNumber:y4e,era:O0({values:f4e,defaultWidth:"wide"}),quarter:O0({values:m4e,defaultWidth:"wide",argumentCallback:e=>e-1}),month:O0({values:p4e,defaultWidth:"wide"}),day:O0({values:h4e,defaultWidth:"wide"}),dayPeriod:O0({values:g4e,defaultWidth:"wide",formattingValues:v4e,defaultFormattingWidth:"wide"})};function N0(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)?w4e(l,f=>f.test(s)):b4e(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 b4e(e,t){for(let r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&t(e[r]))return r}function w4e(e,t){for(let r=0;r<e.length;r++)if(t(e[r]))return r}function hne(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 S4e=/^(\d+)(th|st|nd|rd)?/i,x4e=/\d+/i,_4e={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},C4e={any:[/^b/i,/^(a|c)/i]},T4e={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},E4e={any:[/1/i,/2/i,/3/i,/4/i]},P4e={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},k4e={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]},R4e={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},A4e={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]},I4e={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},O4e={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}},gne={ordinalNumber:hne({matchPattern:S4e,parsePattern:x4e,valueCallback:e=>parseInt(e,10)}),era:N0({matchPatterns:_4e,defaultMatchWidth:"wide",parsePatterns:C4e,defaultParseWidth:"any"}),quarter:N0({matchPatterns:T4e,defaultMatchWidth:"wide",parsePatterns:E4e,defaultParseWidth:"any",valueCallback:e=>e+1}),month:N0({matchPatterns:P4e,defaultMatchWidth:"wide",parsePatterns:k4e,defaultParseWidth:"any"}),day:N0({matchPatterns:R4e,defaultMatchWidth:"wide",parsePatterns:A4e,defaultParseWidth:"any"}),dayPeriod:N0({matchPatterns:I4e,defaultMatchWidth:"any",parsePatterns:O4e,defaultParseWidth:"any"})};var M9={code:"en-US",formatDistance:dne,formatLong:fne,formatRelative:mne,localize:pne,match:gne,options:{weekStartsOn:0,firstWeekContainsDate:1}};function vne(e,t){let r=Vt(e,t?.in);return ine(r,jA(r))+1}function yne(e,t){let r=Vt(e,t?.in),o=+mv(r)-+sne(r);return Math.round(o/FA)+1}function HA(e,t){let r=Vt(e,t?.in),o=r.getFullYear(),n=Ip(),i=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,s=Vo(t?.in||e,0);s.setFullYear(o+1,0,i),s.setHours(0,0,0,0);let l=ff(s,t),c=Vo(t?.in||e,0);c.setFullYear(o,0,i),c.setHours(0,0,0,0);let u=ff(c,t);return+r>=+l?o+1:+r>=+u?o:o-1}function bne(e,t){let r=Ip(),o=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,n=HA(e,t),i=Vo(t?.in||e,0);return i.setFullYear(n,0,o),i.setHours(0,0,0,0),ff(i,t)}function wne(e,t){let r=Vt(e,t?.in),o=+ff(r,t)-+bne(r,t);return Math.round(o/FA)+1}function Zt(e,t){let r=e<0?"-":"",o=Math.abs(e).toString().padStart(t,"0");return r+o}var pf={y(e,t){let r=e.getFullYear(),o=r>0?r:1-r;return Zt(t==="yy"?o%100:o,t.length)},M(e,t){let r=e.getMonth();return t==="M"?String(r+1):Zt(r+1,2)},d(e,t){return Zt(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 Zt(e.getHours()%12||12,t.length)},H(e,t){return Zt(e.getHours(),t.length)},m(e,t){return Zt(e.getMinutes(),t.length)},s(e,t){return Zt(e.getSeconds(),t.length)},S(e,t){let r=t.length,o=e.getMilliseconds(),n=Math.trunc(o*Math.pow(10,r-3));return Zt(n,t.length)}};var M0={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},D9={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 pf.y(e,t)},Y:function(e,t,r,o){let n=HA(e,o),i=n>0?n:1-n;if(t==="YY"){let s=i%100;return Zt(s,2)}return t==="Yo"?r.ordinalNumber(i,{unit:"year"}):Zt(i,t.length)},R:function(e,t){let r=VA(e);return Zt(r,t.length)},u:function(e,t){let r=e.getFullYear();return Zt(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 Zt(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 Zt(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 pf.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 Zt(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=wne(e,o);return t==="wo"?r.ordinalNumber(n,{unit:"week"}):Zt(n,t.length)},I:function(e,t,r){let o=yne(e);return t==="Io"?r.ordinalNumber(o,{unit:"week"}):Zt(o,t.length)},d:function(e,t,r){return t==="do"?r.ordinalNumber(e.getDate(),{unit:"date"}):pf.d(e,t)},D:function(e,t,r){let o=vne(e);return t==="Do"?r.ordinalNumber(o,{unit:"dayOfYear"}):Zt(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 Zt(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 Zt(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 Zt(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=M0.noon:o===0?n=M0.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=M0.evening:o>=12?n=M0.afternoon:o>=4?n=M0.morning:n=M0.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 pf.h(e,t)},H:function(e,t,r){return t==="Ho"?r.ordinalNumber(e.getHours(),{unit:"hour"}):pf.H(e,t)},K:function(e,t,r){let o=e.getHours()%12;return t==="Ko"?r.ordinalNumber(o,{unit:"hour"}):Zt(o,t.length)},k:function(e,t,r){let o=e.getHours();return o===0&&(o=24),t==="ko"?r.ordinalNumber(o,{unit:"hour"}):Zt(o,t.length)},m:function(e,t,r){return t==="mo"?r.ordinalNumber(e.getMinutes(),{unit:"minute"}):pf.m(e,t)},s:function(e,t,r){return t==="so"?r.ordinalNumber(e.getSeconds(),{unit:"second"}):pf.s(e,t)},S:function(e,t){return pf.S(e,t)},X:function(e,t,r){let o=e.getTimezoneOffset();if(o===0)return"Z";switch(t){case"X":return xne(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 xne(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"+Sne(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"+Sne(o,":");default:return"GMT"+pv(o,":")}},t:function(e,t,r){let o=Math.trunc(+e/1e3);return Zt(o,t.length)},T:function(e,t,r){return Zt(+e,t.length)}};function Sne(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+Zt(i,2)}function xne(e,t){return e%60===0?(e>0?"-":"+")+Zt(Math.abs(e)/60,2):pv(e,t)}function pv(e,t=""){let r=e>0?"-":"+",o=Math.abs(e),n=Zt(Math.trunc(o/60),2),i=Zt(o%60,2);return r+n+t+i}var _ne=(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"})}},Cne=(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"})}},N4e=(e,t)=>{let r=e.match(/(P+)(p+)?/)||[],o=r[1],n=r[2];if(!n)return _ne(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}}",_ne(o,t)).replace("{{time}}",Cne(n,t))},Tne={p:Cne,P:N4e};var M4e=/^D+$/,D4e=/^Y+$/,F4e=["D","DD","YY","YYYY"];function Ene(e){return M4e.test(e)}function Pne(e){return D4e.test(e)}function kne(e,t,r){let o=L4e(e,t,r);if(console.warn(o),F4e.includes(e))throw new RangeError(o)}function L4e(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 B4e=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,V4e=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,j4e=/^'([^]*?)'?$/,z4e=/''/g,H4e=/[a-zA-Z]/;function F9(e,t,r){let o=Ip(),n=r?.locale??o.locale??M9,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=Vt(e,r?.in);if(!mf(l))throw new RangeError("Invalid time value");let c=t.match(V4e).map(d=>{let f=d[0];if(f==="p"||f==="P"){let m=Tne[f];return m(d,n.formatLong)}return d}).join("").match(B4e).map(d=>{if(d==="''")return{isToken:!1,value:"'"};let f=d[0];if(f==="'")return{isToken:!1,value:U4e(d)};if(D9[f])return{isToken:!0,value:d};if(f.match(H4e))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&&Pne(f)||!r?.useAdditionalDayOfYearTokens&&Ene(f))&&kne(f,t,String(e));let m=D9[f[0]];return m(l,f,n.localize,u)}).join("")}function U4e(e){let t=e.match(j4e);return t?t[1].replace(z4e,"'"):e}function hv(e,t,r){return LA(e,-t,r)}function Rne(e,t){let r=()=>Vo(t?.in,NaN),o=t?.additionalDigits??2,n=q4e(e),i;if(n.date){let u=K4e(n.date,o);i=Z4e(u.restDateString,u.year)}if(!i||isNaN(+i))return r();let s=+i,l=0,c;if(n.time&&(l=X4e(n.time),isNaN(l)))return r();if(n.timezone){if(c=Q4e(n.timezone),isNaN(c))return r()}else{let u=new Date(s+l),d=Vt(0,t?.in);return d.setFullYear(u.getUTCFullYear(),u.getUTCMonth(),u.getUTCDate()),d.setHours(u.getUTCHours(),u.getUTCMinutes(),u.getUTCSeconds(),u.getUTCMilliseconds()),d}return Vt(s+l+c,t?.in)}var UA={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},W4e=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,G4e=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,Y4e=/^([+-])(\d{2})(?::?(\d{2}))?$/;function q4e(e){let t={},r=e.split(UA.dateTimeDelimiter),o;if(r.length>2)return t;if(/:/.test(r[0])?o=r[0]:(t.date=r[0],o=r[1],UA.timeZoneDelimiter.test(t.date)&&(t.date=e.split(UA.timeZoneDelimiter)[0],o=e.substr(t.date.length,e.length))),o){let n=UA.timezone.exec(o);n?(t.time=o.replace(n[1],""),t.timezone=n[1]):t.time=o}return t}function K4e(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 Z4e(e,t){if(t===null)return new Date(NaN);let r=e.match(W4e);if(!r)return new Date(NaN);let o=!!r[4],n=U1(r[1]),i=U1(r[2])-1,s=U1(r[3]),l=U1(r[4]),c=U1(r[5])-1;if(o)return rLe(t,l,c)?J4e(t,l,c):new Date(NaN);{let u=new Date(0);return!eLe(t,i,s)||!tLe(t,n)?new Date(NaN):(u.setUTCFullYear(t,i,Math.max(n,s)),u)}}function U1(e){return e?parseInt(e):1}function X4e(e){let t=e.match(G4e);if(!t)return NaN;let r=L9(t[1]),o=L9(t[2]),n=L9(t[3]);return oLe(r,o,n)?r*A9+o*R9+n*1e3:NaN}function L9(e){return e&&parseFloat(e.replace(",","."))||0}function Q4e(e){if(e==="Z")return 0;let t=e.match(Y4e);if(!t)return 0;let r=t[1]==="+"?-1:1,o=parseInt(t[2]),n=t[3]&&parseInt(t[3])||0;return nLe(o,n)?r*(o*A9+n*R9):NaN}function J4e(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 $4e=[31,null,31,30,31,30,31,31,30,31,30,31];function Ane(e){return e%400===0||e%4===0&&e%100!==0}function eLe(e,t,r){return t>=0&&t<=11&&r>=1&&r<=($4e[t]||(Ane(e)?29:28))}function tLe(e,t){return t>=1&&t<=(Ane(e)?366:365)}function rLe(e,t,r){return t>=1&&t<=53&&r>=0&&r<=6}function oLe(e,t,r){return e===24?t===0&&r===0:r>=0&&r<60&&t>=0&&t<60&&e>=0&&e<25}function nLe(e,t){return t>=0&&t<=59}function WA(e,t,r){return BA(e,-t,r)}function Ine(e,t,r){return ane(e,-t,r)}function GA(e,t,r){return lne(e,-t,r)}var Ne=a(j(),1),xo=a(U(),1),hs=a(go(),1);var B9=a(T(),1),jo={Name:(0,B9.jsx)("span",{className:"dataviews-filters__summary-filter-text-name"}),Value:(0,B9.jsx)("span",{className:"dataviews-filters__summary-filter-text-value"})};function One(e,t){switch(t){case"days":return hv(new Date,e);case"weeks":return Ine(new Date,e);case"months":return WA(new Date,e);case"years":return GA(new Date,e);default:return new Date}}var Nne={label:(0,Ne.__)("Is none of"),filterText:(e,t)=>(0,xo.createInterpolateElement)((0,Ne.sprintf)((0,Ne.__)("<Name>%1$s is none of: </Name><Value>%2$s</Value>"),e.name,t.map(r=>r.label).join(", ")),jo),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"},YA=[{name:Gr,label:(0,Ne.__)("Includes"),filterText:(e,t)=>(0,xo.createInterpolateElement)((0,Ne.sprintf)((0,Ne.__)("<Name>%1$s includes: </Name><Value>%2$s</Value>"),e.name,t.map(r=>r.label).join(", ")),jo),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:Yr,...Nne},{name:Ti,label:(0,Ne.__)("Includes all"),filterText:(e,t)=>(0,xo.createInterpolateElement)((0,Ne.sprintf)((0,Ne.__)("<Name>%1$s includes all: </Name><Value>%2$s</Value>"),e.name,t.map(r=>r.label).join(", ")),jo),filter(e,t,r){return r?.length?r.every(o=>t.getValue({item:e})?.includes(o)):!0},selection:"multi"},{name:Ei,...Nne},{name:cs,label:(0,Ne.__)("Between (inc)"),filterText:(e,t)=>(0,xo.createInterpolateElement)((0,Ne.sprintf)((0,Ne.__)("<Name>%1$s between (inc): </Name><Value>%2$s and %3$s</Value>"),e.name,t[0].label[0],t[0].label[1]),jo),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:us,label:(0,Ne.__)("In the past"),filterText:(e,t)=>(0,xo.createInterpolateElement)((0,Ne.sprintf)((0,Ne.__)("<Name>%1$s is in the past: </Name><Value>%2$s</Value>"),e.name,`${t[0].value.value} ${t[0].value.unit}`),jo),filter(e,t,r){if(r?.value===void 0||r?.unit===void 0)return!0;let o=One(r.value,r.unit),n=(0,hs.getDate)(t.getValue({item:e}));return n>=o&&n<=new Date},selection:"custom"},{name:Ys,label:(0,Ne.__)("Over"),filterText:(e,t)=>(0,xo.createInterpolateElement)((0,Ne.sprintf)((0,Ne.__)("<Name>%1$s is over: </Name><Value>%2$s</Value>"),e.name,`${t[0].value.value} ${t[0].value.unit}`),jo),filter(e,t,r){if(r?.value===void 0||r?.unit===void 0)return!0;let o=One(r.value,r.unit);return(0,hs.getDate)(t.getValue({item:e}))<o},selection:"custom"},{name:io,label:(0,Ne.__)("Is"),filterText:(e,t)=>(0,xo.createInterpolateElement)((0,Ne.sprintf)((0,Ne.__)("<Name>%1$s is: </Name><Value>%2$s</Value>"),e.name,t[0].label),jo),filter(e,t,r){return r===t.getValue({item:e})||r===void 0},selection:"single"},{name:so,label:(0,Ne.__)("Is not"),filterText:(e,t)=>(0,xo.createInterpolateElement)((0,Ne.sprintf)((0,Ne.__)("<Name>%1$s is not: </Name><Value>%2$s</Value>"),e.name,t[0].label),jo),filter(e,t,r){return r!==t.getValue({item:e})},selection:"single"},{name:ap,label:(0,Ne.__)("Less than"),filterText:(e,t)=>(0,xo.createInterpolateElement)((0,Ne.sprintf)((0,Ne.__)("<Name>%1$s is less than: </Name><Value>%2$s</Value>"),e.name,t[0].label),jo),filter(e,t,r){return r===void 0?!0:t.getValue({item:e})<r},selection:"single"},{name:lp,label:(0,Ne.__)("Greater than"),filterText:(e,t)=>(0,xo.createInterpolateElement)((0,Ne.sprintf)((0,Ne.__)("<Name>%1$s is greater than: </Name><Value>%2$s</Value>"),e.name,t[0].label),jo),filter(e,t,r){return r===void 0?!0:t.getValue({item:e})>r},selection:"single"},{name:cp,label:(0,Ne.__)("Less than or equal"),filterText:(e,t)=>(0,xo.createInterpolateElement)((0,Ne.sprintf)((0,Ne.__)("<Name>%1$s is less than or equal to: </Name><Value>%2$s</Value>"),e.name,t[0].label),jo),filter(e,t,r){return r===void 0?!0:t.getValue({item:e})<=r},selection:"single"},{name:up,label:(0,Ne.__)("Greater than or equal"),filterText:(e,t)=>(0,xo.createInterpolateElement)((0,Ne.sprintf)((0,Ne.__)("<Name>%1$s is greater than or equal to: </Name><Value>%2$s</Value>"),e.name,t[0].label),jo),filter(e,t,r){return r===void 0?!0:t.getValue({item:e})>=r},selection:"single"},{name:dp,label:(0,Ne.__)("Before"),filterText:(e,t)=>(0,xo.createInterpolateElement)((0,Ne.sprintf)((0,Ne.__)("<Name>%1$s is before: </Name><Value>%2$s</Value>"),e.name,t[0].label),jo),filter(e,t,r){if(r===void 0)return!0;let o=(0,hs.getDate)(r);return(0,hs.getDate)(t.getValue({item:e}))<o},selection:"single"},{name:fp,label:(0,Ne.__)("After"),filterText:(e,t)=>(0,xo.createInterpolateElement)((0,Ne.sprintf)((0,Ne.__)("<Name>%1$s is after: </Name><Value>%2$s</Value>"),e.name,t[0].label),jo),filter(e,t,r){if(r===void 0)return!0;let o=(0,hs.getDate)(r);return(0,hs.getDate)(t.getValue({item:e}))>o},selection:"single"},{name:mp,label:(0,Ne.__)("Before (inc)"),filterText:(e,t)=>(0,xo.createInterpolateElement)((0,Ne.sprintf)((0,Ne.__)("<Name>%1$s is on or before: </Name><Value>%2$s</Value>"),e.name,t[0].label),jo),filter(e,t,r){if(r===void 0)return!0;let o=(0,hs.getDate)(r);return(0,hs.getDate)(t.getValue({item:e}))<=o},selection:"single"},{name:pp,label:(0,Ne.__)("After (inc)"),filterText:(e,t)=>(0,xo.createInterpolateElement)((0,Ne.sprintf)((0,Ne.__)("<Name>%1$s is on or after: </Name><Value>%2$s</Value>"),e.name,t[0].label),jo),filter(e,t,r){if(r===void 0)return!0;let o=(0,hs.getDate)(r);return(0,hs.getDate)(t.getValue({item:e}))>=o},selection:"single"},{name:bu,label:(0,Ne.__)("Contains"),filterText:(e,t)=>(0,xo.createInterpolateElement)((0,Ne.sprintf)((0,Ne.__)("<Name>%1$s contains: </Name><Value>%2$s</Value>"),e.name,t[0].label),jo),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:wu,label:(0,Ne.__)("Doesn't contain"),filterText:(e,t)=>(0,xo.createInterpolateElement)((0,Ne.sprintf)((0,Ne.__)("<Name>%1$s doesn't contain: </Name><Value>%2$s</Value>"),e.name,t[0].label),jo),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:Su,label:(0,Ne.__)("Starts with"),filterText:(e,t)=>(0,xo.createInterpolateElement)((0,Ne.sprintf)((0,Ne.__)("<Name>%1$s starts with: </Name><Value>%2$s</Value>"),e.name,t[0].label),jo),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:hp,label:(0,Ne.__)("On"),filterText:(e,t)=>(0,xo.createInterpolateElement)((0,Ne.sprintf)((0,Ne.__)("<Name>%1$s is: </Name><Value>%2$s</Value>"),e.name,t[0].label),jo),filter(e,t,r){if(r===void 0)return!0;let o=(0,hs.getDate)(r),n=(0,hs.getDate)(t.getValue({item:e}));return o.getTime()===n.getTime()},selection:"single"},{name:gp,label:(0,Ne.__)("Not on"),filterText:(e,t)=>(0,xo.createInterpolateElement)((0,Ne.sprintf)((0,Ne.__)("<Name>%1$s is not: </Name><Value>%2$s</Value>"),e.name,t[0].label),jo),filter(e,t,r){if(r===void 0)return!0;let o=(0,hs.getDate)(r),n=(0,hs.getDate)(t.getValue({item:e}));return o.getTime()!==n.getTime()},selection:"single"}],gv=e=>YA.find(t=>t.name===e),Mne=()=>YA.map(e=>e.name),Dne=e=>YA.filter(t=>t.selection==="single").some(t=>t.name===e),Fne=e=>YA.some(t=>t.name===e);var zo=a(T(),1),iLe="Enter",sLe=" ",aLe=({activeElements:e,filterInView:t,filter:r})=>{if(e===void 0||e.length===0)return r.name;let o=gv(t?.operator);return o!==void 0?o.filterText(r,e):(0,hf.sprintf)((0,hf.__)("Unknown status for %1$s"),r.name)};function lLe({filter:e,view:t,onChangeView:r}){let o=e.operators?.map(s=>({value:s,label:gv(s)?.label||s})),n=t.filters?.find(s=>s.field===e.field),i=n?.operator||e.operators[0];return o.length>1&&(0,zo.jsxs)(le,{direction:"row",gap:"sm",justify:"flex-start",className:"dataviews-filters__summary-operators-container",align:"center",children:[(0,zo.jsx)(Op.FlexItem,{className:"dataviews-filters__summary-operators-filter-name",children:e.name}),(0,zo.jsx)(Op.SelectControl,{className:"dataviews-filters__summary-operators-filter-select",label:(0,hf.__)("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=gv(c)?.selection,m=gv(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 Lne({addFilterRef:e,openedFilter:t,fields:r,...o}){let n=(0,qA.useRef)(null),{filter:i,view:s,onChangeView:l}=o,c=s.filters?.find(b=>b.field===i.field),u=[],d=(0,qA.useMemo)(()=>{let b=r.find(w=>w.id===i.field);return b&&{...b,getValue:({item:w})=>w[b.id]}},[r,i.field]),{elements:f}=On({elements:i.elements,getElements:i.getElements});if(f.length>0)u=f.filter(b=>i.singleSelection?b.value===c?.value:c?.value?.includes(b.value));else if(Array.isArray(c?.value)){let b=c.value.map(w=>d?.getValueFormatted({item:{[d.id]:w},field:d})||String(w));u=[{value:c.value,label:b}]}else if(typeof c?.value=="object")u=[{value:c.value,label:c.value}];else if(c?.value!==void 0){let b=d!==void 0?d.getValueFormatted({item:{[d.id]:c.value},field:d}):String(c.value);u=[{value:c.value,label:b}]}let m=i.isPrimary,h=c?.isLocked,g=!h&&c?.value!==void 0,v=!h&&(!m||g),y=m?(0,hf.__)("Reset"):(0,hf.__)("Remove");return(0,zo.jsx)(Op.Dropdown,{defaultOpen:t===i.field,contentClassName:"dataviews-filters__summary-popover",popoverProps:{placement:"bottom-start",role:"dialog"},onClose:()=>{n.current?.focus()},renderToggle:({isOpen:b,onToggle:w})=>(0,zo.jsxs)("div",{className:"dataviews-filters__summary-chip-container",children:[(0,zo.jsxs)(ht.Root,{children:[(0,zo.jsx)(ht.Trigger,{render:(0,zo.jsx)("div",{className:Z("dataviews-filters__summary-chip",{"has-reset":v,"has-values":g,"is-not-clickable":h}),role:"button",tabIndex:h?-1:0,onClick:()=>{h||w()},onKeyDown:S=>{!h&&[iLe,sLe].includes(S.key)&&(w(),S.preventDefault())},"aria-disabled":h,"aria-pressed":b,"aria-expanded":b,ref:n,children:(0,zo.jsx)(aLe,{activeElements:u,filterInView:c,filter:i})})}),(0,zo.jsx)(ht.Popup,{children:(0,hf.sprintf)((0,hf.__)("Filter by: %1$s"),i.name.toLowerCase())})]}),v&&(0,zo.jsxs)(ht.Root,{children:[(0,zo.jsx)(ht.Trigger,{render:(0,zo.jsx)("button",{className:Z("dataviews-filters__summary-chip-remove",{"has-values":g}),"aria-label":y,onClick:()=>{l({...s,page:1,filters:s.filters?.filter(S=>S.field!==i.field)}),m?n.current?.focus():e.current?.focus()},children:(0,zo.jsx)(Op.Icon,{icon:_n})})}),(0,zo.jsx)(ht.Popup,{children:y})]})]}),renderContent:()=>(0,zo.jsxs)(le,{direction:"column",justify:"flex-start",children:[(0,zo.jsx)(lLe,{...o}),o.filter.hasElements?(0,zo.jsx)(Xoe,{...o,filter:{...o.filter,elements:f}}):(0,zo.jsx)(tne,{...o,fields:r})]})})}var KA=a(W(),1),Bne=a(j(),1),Vne=a(U(),1);var gf=a(T(),1),{Menu:W1}=vt(KA.privateApis);function V9({filters:e,view:t,onChangeView:r,setOpenedFilter:o,triggerProps:n}){let i=e.filter(s=>!s.isVisible);return(0,gf.jsxs)(W1,{children:[(0,gf.jsx)(W1.TriggerButton,{...n}),(0,gf.jsx)(W1.Popover,{children:i.map(s=>(0,gf.jsx)(W1.Item,{onClick:()=>{o(s.field),r({...t,page:1,filters:[...t.filters||[],{field:s.field,value:void 0,operator:s.operators[0]}]})},children:(0,gf.jsx)(W1.ItemLabel,{children:s.name})},s.field))})]})}function cLe({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,gf.jsx)(V9,{triggerProps:{render:(0,gf.jsx)(KA.Button,{accessibleWhenDisabled:!0,size:"compact",className:"dataviews-filters-button",variant:"tertiary",disabled:!i.length,ref:n}),children:(0,Bne.__)("Add filter")},filters:e,view:t,onChangeView:r,setOpenedFilter:o})}var jne=(0,Vne.forwardRef)(cLe);var zne=a(W(),1),Hne=a(j(),1),Une=a(T(),1);function Wne({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,Une.jsx)(zne.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,Hne.__)("Reset")})}var Gne=a(U(),1);function uLe(e,t){return(0,Gne.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=>Dne(l)),operators:n,isVisible:s||i||!!t.filters?.some(l=>l.field===o.id&&Fne(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 G1=uLe;var Y1=a(T(),1);function dLe({className:e}){let{fields:t,view:r,onChangeView:o,openedFilter:n,setOpenedFilter:i}=(0,D0.useContext)(tt),s=(0,D0.useRef)(null),l=G1(t,r),c=(0,Y1.jsx)(jne,{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,Y1.jsx)(Lne,{filter:f,view:r,fields:t,onChangeView:o,addFilterRef:s,openedFilter:n},f.field)),c];return d.push((0,Y1.jsx)(Wne,{filters:l,view:r,onChangeView:o},"reset-filters")),(0,Y1.jsx)(le,{direction:"row",justify:"flex-start",gap:"sm",style:{width:"fit-content"},wrap:"wrap",className:e,children:d})}var q1=(0,D0.memo)(dLe);var Np=a(U(),1),Yne=a(W(),1);var ZA=a(j(),1);var Iu=a(T(),1);function fLe(){let{filters:e,view:t,onChangeView:r,setOpenedFilter:o,isShowingFilter:n,setIsShowingFilter:i}=(0,Np.useContext)(tt),s=(0,Np.useRef)(null),l=(0,Np.useCallback)(h=>{r(h),i(!0)},[r,i]);if(e.length===0)return null;let c=e.some(h=>h.isVisible),u={label:(0,ZA.__)("Add filter"),"aria-expanded":!1,isPressed:!1},d={label:(0,ZA._x)("Filter","verb"),"aria-expanded":n,isPressed:n,onClick:()=>{n||o(null),i(!n)}},f=e.some(h=>h.isPrimary||h.isLocked),m=(0,Iu.jsx)(Yne.Button,{ref:s,className:"dataviews-filters__visibility-toggle",size:"compact",icon:Vx,disabled:f,accessibleWhenDisabled:!0,...c?d:u});return(0,Iu.jsx)("div",{className:"dataviews-filters__container-visibility-toggle",children:c?(0,Iu.jsx)(mLe,{buttonRef:s,filtersCount:t.filters?.length,children:m}):(0,Iu.jsx)(V9,{filters:e,view:t,onChangeView:l,setOpenedFilter:o,triggerProps:{render:m}})})}function mLe({buttonRef:e,filtersCount:t,children:r}){return(0,Np.useEffect)(()=>()=>{e.current?.focus()},[e]),(0,Iu.jsxs)(Iu.Fragment,{children:[r,!!t&&(0,Iu.jsx)("span",{className:"dataviews-filters-toggle__count",children:t})]})}var XA=fLe;var qne=a(U(),1);var Kne=a(T(),1);function pLe(e){let{isShowingFilter:t}=(0,qne.useContext)(tt);return t?(0,Kne.jsx)(q1,{...e}):null}var QA=pLe;var Zne=a(U(),1),Xne=a(W(),1),Qne=a(j(),1);var vv=a(T(),1);function j9({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:y,containerRef:b,empty:w=(0,vv.jsx)("p",{children:(0,Qne.__)("No results")})}=(0,Zne.useContext)(tt),S=vl(!s,{delay:200});if(!s)return S?(0,vv.jsx)("div",{className:"dataviews-loading",children:(0,vv.jsx)("p",{children:(0,vv.jsx)(Xne.Spinner,{})})}):null;let x=_p.find(_=>_.type===c.type&&y[_.type])?.component;return(0,vv.jsx)("div",{className:"dataviews-layout__container",ref:b,children:(0,vv.jsx)(x,{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:w})})}var Jne=a(U(),1);var F0=a(T(),1),hLe=[];function z9(){let{view:e,paginationInfo:{totalItems:t=0,totalPages:r},data:o,actions:n=hLe,isLoading:i,hasInitiallyLoaded:s}=(0,Jne.useContext)(tt),l=!!i&&s&&!!o?.length,c=vl(!!l),u=p0(n,o)&&[u0,KR].includes(e.type);return!l&&(!t||!r||r<=1&&!u)?null:(!!t||l)&&(0,F0.jsx)("div",{className:"dataviews-footer",inert:l?"true":void 0,children:(0,F0.jsxs)(le,{direction:"row",justify:"end",align:"center",className:Z("dataviews-footer__content",{"is-refreshing":c}),gap:"sm",children:[u&&(0,F0.jsx)(QR,{}),(0,F0.jsx)(Zte,{})]})})}var $ne=a(j(),1),yc=a(U(),1),eie=a(W(),1),tie=a(_e(),1);var rie=a(T(),1),gLe=(0,yc.memo)(function({label:t}){let{view:r,onChangeView:o}=(0,yc.useContext)(tt),[n,i,s]=(0,tie.useDebouncedInput)(r.search);(0,yc.useEffect)(()=>{r.search!==s&&i(r.search??"")},[r.search,i]);let l=(0,yc.useRef)(o),c=(0,yc.useRef)(r);(0,yc.useEffect)(()=>{l.current=o,c.current=r},[o,r]),(0,yc.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,$ne.__)("Search");return(0,rie.jsx)(eie.SearchControl,{className:"dataviews-search",onChange:i,value:n,label:u,placeholder:u,size:"compact"})}),H9=gLe;var Ho=a(W(),1),vf=a(j(),1),bc=a(U(),1);var W9=a(U9(),1),nie=a(_e(),1);var Mt=a(T(),1),{Menu:K1}=vt(Ho.privateApis),vLe={className:"dataviews-config__popover",placement:"bottom-end",offset:9};function G9(){let{view:e,onChangeView:t,defaultLayouts:r}=(0,bc.useContext)(tt),o=Object.keys(r);if(o.length<=1)return null;let n=_p.find(i=>e.type===i.type);return(0,Mt.jsxs)(K1,{children:[(0,Mt.jsx)(K1.TriggerButton,{render:(0,Mt.jsx)(Ho.Button,{size:"compact",icon:n?.icon,label:(0,vf.__)("Layout")})}),(0,Mt.jsx)(K1.Popover,{children:o.map(i=>{let s=_p.find(l=>l.type===i);return s?(0,Mt.jsx)(K1.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"activity":let c={...e};return"layout"in c&&delete c.layout,t({...c,type:l.target.value,...r[l.target.value]})}(0,W9.default)("Invalid dataview")},children:(0,Mt.jsx)(K1.ItemLabel,{children:s.label})},i):null})})]})}function yLe(){let{view:e,fields:t,onChangeView:r}=(0,bc.useContext)(tt),o=(0,bc.useMemo)(()=>t.filter(i=>i.enableSorting!==!1).map(i=>({label:i.label,value:i.id})),[t]);return(0,Mt.jsx)(Ho.SelectControl,{__next40pxDefaultSize:!0,label:(0,vf.__)("Sort by"),value:e.sort?.field,options:o,onChange:n=>{r({...e,sort:{direction:e?.sort?.direction||"desc",field:n},showLevels:!1})}})}function bLe(){let{view:e,fields:t,onChangeView:r}=(0,bc.useContext)(tt);if(t.filter(i=>i.enableSorting!==!1).length===0)return null;let n=e.sort?.direction;return!n&&e.sort?.field&&(n="desc"),(0,Mt.jsx)(Ho.__experimentalToggleGroupControl,{className:"dataviews-view-config__sort-direction",__next40pxDefaultSize:!0,isBlock:!0,label:(0,vf.__)("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,W9.default)("Invalid direction")},children:GR.map(i=>(0,Mt.jsx)(Ho.__experimentalToggleGroupControlOptionIcon,{value:i,icon:ite[i],label:qR[i]},i))})}function wLe(){let{view:e,config:t,onChangeView:r}=(0,bc.useContext)(tt),{infiniteScrollEnabled:o}=e;return!t||!t.perPageSizes||t.perPageSizes.length<2||t.perPageSizes.length>6||o?null:(0,Mt.jsx)(Ho.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,isBlock:!0,label:(0,vf.__)("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,Mt.jsx)(Ho.__experimentalToggleGroupControlOption,{value:n,label:n.toString()},n))})}function SLe(){let{onReset:e}=(0,bc.useContext)(tt);return e===void 0?null:(0,Mt.jsx)(Ho.Button,{variant:"tertiary",size:"compact",disabled:e===!1,accessibleWhenDisabled:!0,className:"dataviews-view-config__reset-button",onClick:()=>{typeof e=="function"&&e()},children:(0,vf.__)("Reset view")})}function Y9(){let{view:e,onReset:t}=(0,bc.useContext)(tt),r=(0,nie.useInstanceId)(iie,"dataviews-view-config-dropdown"),o=_p.find(i=>i.type===e.type),n=typeof t=="function";return(0,Mt.jsx)(Ho.Dropdown,{expandOnMobile:!0,popoverProps:{...vLe,id:r},renderToggle:({onToggle:i,isOpen:s})=>(0,Mt.jsxs)("div",{className:"dataviews-view-config__toggle-wrapper",children:[(0,Mt.jsx)(Ho.Button,{size:"compact",icon:z3,label:(0,vf._x)("View options","View is used as a noun"),onClick:i,"aria-expanded":s?"true":"false","aria-controls":r}),n&&(0,Mt.jsx)("span",{className:"dataviews-view-config__modified-indicator"})]}),renderContent:()=>(0,Mt.jsx)(Ho.__experimentalDropdownContentWrapper,{paddingSize:"medium",className:"dataviews-config__popover-content-wrapper",children:(0,Mt.jsxs)(le,{direction:"column",className:"dataviews-view-config",gap:"xl",children:[(0,Mt.jsxs)(le,{direction:"row",justify:"space-between",align:"center",className:"dataviews-view-config__header",children:[(0,Mt.jsx)(Ho.__experimentalHeading,{level:2,className:"dataviews-settings-section__title",children:(0,vf.__)("Appearance")}),(0,Mt.jsx)(SLe,{})]}),(0,Mt.jsxs)(le,{direction:"column",gap:"lg",children:[(0,Mt.jsxs)(le,{direction:"row",gap:"sm",className:"dataviews-view-config__sort-controls",children:[(0,Mt.jsx)(yLe,{}),(0,Mt.jsx)(bLe,{})]}),!!o?.viewConfigOptions&&(0,Mt.jsx)(o.viewConfigOptions,{}),(0,Mt.jsx)(wLe,{}),(0,Mt.jsx)(eA,{})]})]})})})}function iie(){return(0,Mt.jsxs)(Mt.Fragment,{children:[(0,Mt.jsx)(G9,{}),(0,Mt.jsx)(Y9,{})]})}var xLe=(0,bc.memo)(iie),sie=xLe;var aie=a(W(),1),lie=a(U(),1);function yr(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 cie=a(T(),1),{ValidatedCheckboxControl:_Le}=vt(aie.privateApis);function uie({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,lie.useCallback)(()=>{t(l({item:r,value:!s({item:r})}))},[r,s,t,l]);return(0,cie.jsx)(_Le,{required:!!e.isValid?.required,markWhenOptional:n,customValidity:yr(d,i),hidden:o,label:c,help:u,checked:s({item:r}),onChange:m,disabled:f})}var JA=a(W(),1),die=a(U(),1);var q9=a(T(),1),{ValidatedComboboxControl:CLe}=vt(JA.privateApis);function $A({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,die.useCallback)(v=>r(u({item:e,value:v??""})),[e,r,u]),{elements:h,isLoading:g}=On({elements:t.elements,getElements:t.getElements});return g?(0,q9.jsx)(JA.Spinner,{}):(0,q9.jsx)(CLe,{required:!!t.isValid?.required,customValidity:yr(d,n),label:i,value:f,help:s,placeholder:l,options:h,onChange:m,hideLabelFromVision:o,allowReset:!0,expandOnFocus:!0})}var rI=a(W(),1),wl=a(U(),1),tI=a(j(),1),ja=a(go(),1);var B0=a(W(),1),K9=a(U(),1),Ou=a(j(),1);var L0=a(T(),1),TLe={[us]:[{value:"days",label:(0,Ou.__)("Days")},{value:"weeks",label:(0,Ou.__)("Weeks")},{value:"months",label:(0,Ou.__)("Months")},{value:"years",label:(0,Ou.__)("Years")}],[Ys]:[{value:"days",label:(0,Ou.__)("Days ago")},{value:"weeks",label:(0,Ou.__)("Weeks ago")},{value:"months",label:(0,Ou.__)("Months ago")},{value:"years",label:(0,Ou.__)("Years ago")}]};function eI({className:e,data:t,field:r,onChange:o,hideLabelFromVision:n,operator:i}){let s=TLe[i===us?"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:{},y=(0,K9.useCallback)(w=>o(f({item:t,value:{value:Number(w),unit:v}})),[o,f,t,v]),b=(0,K9.useCallback)(w=>o(f({item:t,value:{value:g,unit:w}})),[o,f,t,g]);return(0,L0.jsx)(B0.BaseControl,{id:l,className:Z(e,"dataviews-controls__relative-date"),label:c,hideLabelFromVision:n,help:u,children:(0,L0.jsxs)(le,{direction:"row",gap:"sm",children:[(0,L0.jsx)(B0.__experimentalNumberControl,{__next40pxDefaultSize:!0,className:"dataviews-controls__relative-date-number",spinControls:"none",min:1,step:1,value:g,onChange:y,disabled:m}),(0,L0.jsx)(B0.SelectControl,{className:"dataviews-controls__relative-date-unit",__next40pxDefaultSize:!0,label:(0,Ou.__)("Unit"),value:v,options:s,onChange:b,hideLabelFromVision:!0,disabled:m})]})})}var fie=a(U(),1);function Z1(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,fie.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 mie=a(go(),1);function X1(e){if(!e)return null;let t=(0,mie.getDate)(e);return t&&mf(t)?t:null}var Mp=a(T(),1),{DateCalendar:ELe,ValidatedInputControl:PLe}=vt(rI.privateApis),Z9=e=>e?(0,ja.dateI18n)("Y-m-d\\TH:i",(0,ja.getDate)(e)):"";function kLe({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}),y=typeof v=="string"?v:void 0,[b,w]=(0,wl.useState)(()=>X1(y)||new Date),S=(0,wl.useRef)(null),x=(0,wl.useRef)(void 0),_=(0,wl.useRef)(null),{minConstraint:P,maxConstraint:I,disabledMatchers:A}=Z1(h,X1),k=(0,wl.useCallback)(z=>r(f({item:e,value:z})),[e,r,f]);(0,wl.useEffect)(()=>()=>{x.current&&clearTimeout(x.current)},[]);let D=(0,wl.useCallback)(z=>{let O;if(z){let F=(0,ja.dateI18n)("Y-m-d",z),L;y?L=(0,ja.dateI18n)("H:i",(0,ja.getDate)(y)):L=(0,ja.dateI18n)("H:i",z),O=(0,ja.getDate)(`${F}T${L}`).toISOString(),k(O),x.current&&clearTimeout(x.current)}else k(void 0);_.current=S.current&&S.current.ownerDocument.activeElement,x.current=setTimeout(()=>{S.current&&(S.current.focus(),S.current.blur(),k(O),_.current&&_.current instanceof HTMLElement&&_.current.focus())},0)},[k,y]),E=(0,wl.useCallback)(z=>{if(z){let O=(0,ja.getDate)(z);k(O.toISOString());let F=X1(O.toISOString());F&&w(F)}else k(void 0)},[k]),{format:C}=t,M=C.weekStartsOn??(0,ja.getSettings)().l10n.startOfWeek,{timezone:{string:B}}=(0,ja.getSettings)(),N=u;return h?.required&&!n&&!o?N=`${u} (${(0,tI.__)("Required")})`:!h?.required&&n&&!o&&(N=`${u} (${(0,tI.__)("Optional")})`),(0,Mp.jsx)(rI.BaseControl,{id:c,label:N,help:d,hideLabelFromVision:o,children:(0,Mp.jsxs)(le,{direction:"column",gap:"lg",children:[(0,Mp.jsx)(PLe,{ref:S,__next40pxDefaultSize:!0,required:!!h?.required,customValidity:yr(h,i),type:"datetime-local",label:(0,tI.__)("Date time"),hideLabelFromVision:!0,value:Z9(y),onChange:E,disabled:g,min:P?Z9(P):void 0,max:I?Z9(I):void 0}),!l&&(0,Mp.jsx)(ELe,{style:{width:"100%"},selected:y&&X1(y)||void 0,onSelect:D,month:b,onMonthChange:w,timeZone:B||void 0,weekStartsOn:M,disabled:g||A})]})})}function pie({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,operator:i,validity:s,config:l}){return i===us||i===Ys?(0,Mp.jsx)(eI,{className:"dataviews-controls__datetime",data:e,field:t,onChange:r,hideLabelFromVision:o,operator:i}):(0,Mp.jsx)(kLe,{data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:s,config:l})}var Ii=a(W(),1),ar=a(U(),1),mn=a(j(),1),Ai=a(go(),1);var br=a(T(),1),{DateCalendar:RLe,DateRangeCalendar:ALe}=vt(Ii.privateApis),ILe=[{id:"today",label:(0,mn.__)("Today"),getValue:()=>(0,Ai.getDate)(null)},{id:"yesterday",label:(0,mn.__)("Yesterday"),getValue:()=>{let e=(0,Ai.getDate)(null);return hv(e,1)}},{id:"past-week",label:(0,mn.__)("Past week"),getValue:()=>{let e=(0,Ai.getDate)(null);return hv(e,7)}},{id:"past-month",label:(0,mn.__)("Past month"),getValue:()=>{let e=(0,Ai.getDate)(null);return WA(e,1)}}],OLe=[{id:"last-7-days",label:(0,mn.__)("Last 7 days"),getValue:()=>{let e=(0,Ai.getDate)(null);return[hv(e,7),e]}},{id:"last-30-days",label:(0,mn.__)("Last 30 days"),getValue:()=>{let e=(0,Ai.getDate)(null);return[hv(e,30),e]}},{id:"month-to-date",label:(0,mn.__)("Month to date"),getValue:()=>{let e=(0,Ai.getDate)(null);return[H1(e),e]}},{id:"last-year",label:(0,mn.__)("Last year"),getValue:()=>{let e=(0,Ai.getDate)(null);return[GA(e,1),e]}},{id:"year-to-date",label:(0,mn.__)("Year to date"),getValue:()=>{let e=(0,Ai.getDate)(null);return[jA(e),e]}}],Dp=e=>{if(!e)return null;let t=(0,Ai.getDate)(e);return t&&mf(t)?t:null},X9=e=>e?typeof e=="string"?e:F9(e,"yyyy-MM-dd"):"";function hie({field:e,validity:t,inputRefs:r,isTouched:o,setIsTouched:n,children:i}){let{isValid:s}=e,[l,c]=(0,ar.useState)(void 0),u=(0,ar.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,ar.useEffect)(()=>{let f=Array.isArray(r)?r:[r],m=t?yr(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,ar.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,ar.useEffect)(()=>{if(!o)return;let f=t?yr(s,t):void 0;f?c(f):u()},[o,s,t,u]),(0,br.jsxs)("div",{onBlur:f=>{o||(!f.relatedTarget||!f.currentTarget.contains(f.relatedTarget))&&n(!0)},children:[i,(0,br.jsx)("div",{"aria-live":"polite",children:l&&(0,br.jsxs)("p",{className:Z("components-validated-control__indicator",l.type==="invalid"?"is-invalid":void 0),children:[(0,br.jsx)(Ii.Icon,{className:"components-validated-control__indicator-icon",icon:Nd,size:16,fill:"currentColor"}),l.message]})})]})}function NLe({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,ar.useState)(null),y=m.weekStartsOn??(0,Ai.getSettings)().l10n.startOfWeek,b=d({item:e}),w=typeof b=="string"?b:void 0,[S,x]=(0,ar.useState)(()=>Dp(w)||new Date),[_,P]=(0,ar.useState)(!1),I=(0,ar.useRef)(null),{minConstraint:A,maxConstraint:k,disabledMatchers:D}=Z1(f,Dp),E=(0,ar.useCallback)(O=>r(u({item:e,value:O})),[e,r,u]),C=(0,ar.useCallback)(O=>{let F=O?F9(O,"yyyy-MM-dd"):void 0;E(F),v(null),P(!0)},[E]),M=(0,ar.useCallback)(O=>{let F=O.getValue(),L=X9(F);x(F),E(L),v(O.id),P(!0)},[E]),B=(0,ar.useCallback)(O=>{if(E(O),O){let F=Dp(O);F&&x(F)}v(null),P(!0)},[E]),{timezone:{string:N}}=(0,Ai.getSettings)(),z=l;return f?.required&&!n?z=`${l} (${(0,mn.__)("Required")})`:!f?.required&&n&&(z=`${l} (${(0,mn.__)("Optional")})`),(0,br.jsx)(hie,{field:t,validity:i,inputRefs:I,isTouched:_,setIsTouched:P,children:(0,br.jsx)(Ii.BaseControl,{id:s,className:"dataviews-controls__date",label:z,help:c,hideLabelFromVision:o,children:(0,br.jsxs)(le,{direction:"column",gap:"lg",children:[(0,br.jsxs)(le,{direction:"row",gap:"sm",wrap:"wrap",justify:"flex-start",children:[ILe.map(O=>{let F=g===O.id;return(0,br.jsx)(Ii.Button,{className:"dataviews-controls__date-preset",variant:"tertiary",isPressed:F,size:"small",disabled:h,accessibleWhenDisabled:!0,onClick:()=>M(O),children:O.label},O.id)}),(0,br.jsx)(Ii.Button,{className:"dataviews-controls__date-preset",variant:"tertiary",isPressed:!g,size:"small",disabled:!!g||h,accessibleWhenDisabled:!0,children:(0,mn.__)("Custom")})]}),(0,br.jsx)(Ii.__experimentalInputControl,{__next40pxDefaultSize:!0,ref:I,type:"date",label:(0,mn.__)("Date"),hideLabelFromVision:!0,value:w,onChange:B,required:!!t.isValid?.required,disabled:h,min:A,max:k}),(0,br.jsx)(RLe,{style:{width:"100%"},selected:w&&Dp(w)||void 0,onSelect:C,month:S,onMonthChange:x,timeZone:N||void 0,weekStartsOn:y,disabled:h||D,disableNavigation:h})]})})})}function MLe({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(H=>typeof H=="string")&&(g=v);let y=m.weekStartsOn??(0,Ai.getSettings)().l10n.startOfWeek,{minConstraint:b,maxConstraint:w,disabledMatchers:S}=Z1(f,Dp),x=(0,ar.useCallback)(H=>{r(d({item:e,value:H}))},[e,r,d]),[_,P]=(0,ar.useState)(null),I=(0,ar.useMemo)(()=>{if(!g)return{from:void 0,to:void 0};let[H,q]=g;return{from:Dp(H)||void 0,to:Dp(q)||void 0}},[g]),[A,k]=(0,ar.useState)(()=>I.from||new Date),[D,E]=(0,ar.useState)(!1),C=(0,ar.useRef)(null),M=(0,ar.useRef)(null),B=(0,ar.useCallback)((H,q)=>{H&&q?x([X9(H),X9(q)]):!H&&!q&&x(void 0)},[x]),N=(0,ar.useCallback)(H=>{B(H?.from,H?.to),P(null),E(!0)},[B]),z=(0,ar.useCallback)(H=>{let[q,Q]=H.getValue();k(q),B(q,Q),P(H.id),E(!0)},[B]),O=(0,ar.useCallback)((H,q)=>{let[Q,J]=g||[void 0,void 0];if(B(H==="from"?q:Q,H==="to"?q:J),q){let $=Dp(q);$&&k($)}P(null),E(!0)},[g,B]),{timezone:F}=(0,Ai.getSettings)(),L=l;return t.isValid?.required&&!n?L=`${l} (${(0,mn.__)("Required")})`:!t.isValid?.required&&n&&(L=`${l} (${(0,mn.__)("Optional")})`),(0,br.jsx)(hie,{field:t,validity:i,inputRefs:[C,M],isTouched:D,setIsTouched:E,children:(0,br.jsx)(Ii.BaseControl,{id:s,className:"dataviews-controls__date",label:L,help:c,hideLabelFromVision:o,children:(0,br.jsxs)(le,{direction:"column",gap:"lg",children:[(0,br.jsxs)(le,{direction:"row",gap:"sm",wrap:"wrap",justify:"flex-start",children:[OLe.map(H=>{let q=_===H.id;return(0,br.jsx)(Ii.Button,{className:"dataviews-controls__date-preset",variant:"tertiary",isPressed:q,size:"small",disabled:h,accessibleWhenDisabled:!0,onClick:()=>z(H),children:H.label},H.id)}),(0,br.jsx)(Ii.Button,{className:"dataviews-controls__date-preset",variant:"tertiary",isPressed:!_,size:"small",accessibleWhenDisabled:!0,disabled:!!_||h,children:(0,mn.__)("Custom")})]}),(0,br.jsxs)(le,{direction:"row",gap:"sm",justify:"space-between",className:"dataviews-controls__date-range-inputs",children:[(0,br.jsx)(Ii.__experimentalInputControl,{__next40pxDefaultSize:!0,ref:C,type:"date",label:(0,mn.__)("From"),hideLabelFromVision:!0,value:g?.[0],onChange:H=>O("from",H),required:!!t.isValid?.required,disabled:h,min:b,max:w}),(0,br.jsx)(Ii.__experimentalInputControl,{__next40pxDefaultSize:!0,ref:M,type:"date",label:(0,mn.__)("To"),hideLabelFromVision:!0,value:g?.[1],onChange:H=>O("to",H),required:!!t.isValid?.required,disabled:h,min:b,max:w})]}),(0,br.jsx)(ALe,{style:{width:"100%"},selected:I,onSelect:N,month:A,onMonthChange:k,timeZone:F.string||void 0,weekStartsOn:y,disabled:h||S})]})})})}function gie({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,operator:i,validity:s}){return i===us||i===Ys?(0,br.jsx)(eI,{className:"dataviews-controls__date",data:e,field:t,onChange:r,hideLabelFromVision:o,operator:i}):i===cs?(0,br.jsx)(MLe,{data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:s}):(0,br.jsx)(NLe,{data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:s})}var oI=a(W(),1),vie=a(U(),1);var Q9=a(T(),1),{ValidatedSelectControl:DLe}=vt(oI.privateApis);function nI({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,vie.useCallback)(w=>r(d({item:e,value:w})),[e,r,d]),{elements:y,isLoading:b}=On({elements:t.elements,getElements:t.getElements});return b?(0,Q9.jsx)(oI.Spinner,{}):(0,Q9.jsx)(DLe,{required:!!t.isValid?.required,markWhenOptional:n,customValidity:yr(f,i),label:l,value:g,help:c,options:y,onChange:v,__next40pxDefaultSize:!0,hideLabelFromVision:o,multiple:h,disabled:m})}var J9=a(T(),1),FLe=10;function yie(e){let{field:t}=e,{elements:r}=On({elements:t.elements,getElements:t.getElements});return r.length>=FLe?(0,J9.jsx)($A,{...e}):(0,J9.jsx)(nI,{...e})}var sI=a(W(),1);var bie=a(W(),1),wie=a(U(),1);var Sie=a(T(),1),{ValidatedInputControl:LLe}=vt(bie.privateApis);function Nu({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}),y=t.isDisabled({item:e,field:t}),b=(0,wie.useCallback)(w=>r(h({item:e,value:w})),[e,h,r]);return(0,Sie.jsx)(LLe,{required:!!g.required,markWhenOptional:n,customValidity:yr(g,c),label:u,placeholder:d,value:v??"",help:f,onChange:b,hideLabelFromVision:o,type:i,prefix:s,suffix:l,disabled:y,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 iI=a(T(),1);function xie({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i}){return(0,iI.jsx)(Nu,{data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i,type:"email",prefix:(0,iI.jsx)(sI.__experimentalInputControlPrefixWrapper,{variant:"icon",children:(0,iI.jsx)(sI.Icon,{icon:t4})})})}var lI=a(W(),1);var aI=a(T(),1);function _ie({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i}){return(0,aI.jsx)(Nu,{data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i,type:"tel",prefix:(0,aI.jsx)(lI.__experimentalInputControlPrefixWrapper,{variant:"icon",children:(0,aI.jsx)(lI.Icon,{icon:ab})})})}var uI=a(W(),1);var cI=a(T(),1);function Cie({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i}){return(0,cI.jsx)(Nu,{data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i,type:"url",prefix:(0,cI.jsx)(uI.__experimentalInputControlPrefixWrapper,{variant:"icon",children:(0,cI.jsx)(uI.Icon,{icon:w4})})})}var yf=a(W(),1),Q1=a(U(),1),dI=a(j(),1);var Fp=a(T(),1),{ValidatedNumberControl:BLe}=vt(yf.privateApis);function Tie(e){if(e===""||e===void 0)return"";let t=Number(e);return Number.isFinite(t)?t:""}function VLe({value:e,onChange:t,hideLabelFromVision:r,step:o}){let[n="",i=""]=e,s=(0,Q1.useCallback)(c=>t([Tie(c),i]),[t,i]),l=(0,Q1.useCallback)(c=>t([n,Tie(c)]),[t,n]);return(0,Fp.jsx)(yf.BaseControl,{help:(0,dI.__)("The max. value must be greater than the min. value."),children:(0,Fp.jsxs)(yf.Flex,{direction:"row",gap:4,children:[(0,Fp.jsx)(yf.__experimentalNumberControl,{label:(0,dI.__)("Min."),value:n,max:i?Number(i)-o:void 0,onChange:s,__next40pxDefaultSize:!0,hideLabelFromVision:r,step:o}),(0,Fp.jsx)(yf.__experimentalNumberControl,{label:(0,dI.__)("Max."),value:i,min:n?Number(n)+o:void 0,onChange:l,__next40pxDefaultSize:!0,hideLabelFromVision:r,step:o})]})})}function fI({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}),y=(0,Q1.useCallback)(w=>{r(m({item:e,value:["",void 0].includes(w)?void 0:Number(w)}))},[e,r,m]),b=(0,Q1.useCallback)(w=>{r(m({item:e,value:w}))},[e,r,m]);if(i===cs){let w=["",""];return Array.isArray(g)&&g.length===2&&g.every(S=>typeof S=="number"||S==="")&&(w=g),(0,Fp.jsx)(VLe,{value:w,onChange:b,hideLabelFromVision:o,step:c})}return(0,Fp.jsx)(BLe,{required:!!h.required,markWhenOptional:n,customValidity:yr(h,s),label:u,help:d,value:g,onChange:y,__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 Eie=a(T(),1);function Pie(e){return(0,Eie.jsx)(fI,{...e})}var kie=a(T(),1);function Rie(e){return(0,kie.jsx)(fI,{...e})}var mI=a(W(),1),Aie=a(U(),1);var $9=a(T(),1),{ValidatedRadioControl:jLe}=vt(mI.privateApis);function Iie({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}=On({elements:t.elements,getElements:t.getElements}),g=c({item:e}),v=(0,Aie.useCallback)(y=>r(u({item:e,value:y})),[e,r,u]);return h?(0,$9.jsx)(mI.Spinner,{}):(0,$9.jsx)(jLe,{required:!!t.isValid?.required,markWhenOptional:n,customValidity:yr(d,i),label:s,help:l,onChange:v,options:m,selected:g,hideLabelFromVision:o,disabled:f})}var ej=a(U(),1);var Oie=a(T(),1);function Nie({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,config:i,validity:s}){let{prefix:l,suffix:c}=i||{};return(0,Oie.jsx)(Nu,{data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:s,prefix:l?(0,ej.createElement)(l):void 0,suffix:c?(0,ej.createElement)(c):void 0})}var Mie=a(W(),1),Die=a(U(),1);var Fie=a(T(),1),{ValidatedToggleControl:zLe}=vt(Mie.privateApis);function Lie({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,Die.useCallback)(()=>{t(u({item:r,value:!c({item:r})}))},[t,u,r,c]);return(0,Fie.jsx)(zLe,{required:!!d.required,markWhenOptional:n,customValidity:yr(d,i),hidden:o,label:s,help:l,checked:c({item:r}),onChange:m,disabled:f})}var Bie=a(W(),1),Vie=a(U(),1);var jie=a(T(),1),{ValidatedTextareaControl:HLe}=vt(Bie.privateApis);function zie({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,Vie.useCallback)(y=>r(m({item:e,value:y})),[e,r,m]);return(0,jie.jsx)(HLe,{required:!!h.required,markWhenOptional:n,customValidity:yr(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 V0=a(W(),1),Hie=a(U(),1);var pI=a(T(),1),{ValidatedToggleGroupControl:ULe}=vt(V0.privateApis);function Uie({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,Hie.useCallback)(v=>r(l({item:e,value:v})),[e,r,l]),{elements:m,isLoading:h}=On({elements:t.elements,getElements:t.getElements});if(h)return(0,pI.jsx)(V0.Spinner,{});if(m.length===0)return null;let g=m.find(v=>v.value===d);return(0,pI.jsx)(ULe,{required:!!t.isValid?.required,markWhenOptional:n,customValidity:yr(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,pI.jsx)(V0.__experimentalToggleGroupControlOption,{label:v.label,value:v.value,disabled:u},v.value))})}var hI=a(W(),1),gI=a(U(),1);var J1=a(T(),1),{ValidatedFormTokenField:WLe}=vt(hI.privateApis);function Wie({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}=On({elements:t.elements,getElements:t.getElements}),y=(0,gI.useMemo)(()=>Array.isArray(m)?m.map(w=>g?.find(x=>x.value===w)||{value:w,label:w}):[],[m,g]),b=(0,gI.useCallback)(w=>{let S=w.map(x=>typeof x=="object"&&"value"in x?x.value:x);r(d({item:e,value:S}))},[r,d,e]);return v?(0,J1.jsx)(hI.Spinner,{}):(0,J1.jsx)(WLe,{required:!!f?.required,markWhenOptional:n,customValidity:yr(f,i),label:o?void 0:s,value:y,onChange:b,placeholder:l,suggestions:g?.map(w=>w.value),disabled:h,__experimentalValidateInput:w=>t.isValid?.elements&&g?g.some(S=>S.value===w||S.label===w):!0,__experimentalExpandOnFocus:g&&g.length>0,help:c??(t.isValid?.elements?"":void 0),displayTransform:w=>typeof w=="object"&&"label"in w?w.label:typeof w=="string"&&g&&g.find(x=>x.value===w)?.label||w,__experimentalRenderItem:({item:w})=>{if(typeof w=="string"&&g){let S=g.find(x=>x.value===w);return(0,J1.jsx)("span",{children:S?.label||w})}return(0,J1.jsx)("span",{children:w})}})}var GLe={grad:.9,turn:360,rad:360/(2*Math.PI)},bf=function(e){return typeof e=="string"?e.length>0:typeof e=="number"},Nn=function(e,t,r){return t===void 0&&(t=0),r===void 0&&(r=Math.pow(10,t)),Math.round(r*e)/r+0},Sl=function(e,t,r){return t===void 0&&(t=0),r===void 0&&(r=1),e>r?r:e>t?e:t},Jie=function(e){return(e=isFinite(e)?e%360:0)>0?e:e+360},Gie=function(e){return{r:Sl(e.r,0,255),g:Sl(e.g,0,255),b:Sl(e.b,0,255),a:Sl(e.a)}},tj=function(e){return{r:Nn(e.r),g:Nn(e.g),b:Nn(e.b),a:Nn(e.a,3)}},YLe=/^#([0-9a-f]{3,8})$/i,vI=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},$ie=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}},ese=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}},Yie=function(e){return{h:Jie(e.h),s:Sl(e.s,0,100),l:Sl(e.l,0,100),a:Sl(e.a)}},qie=function(e){return{h:Nn(e.h),s:Nn(e.s),l:Nn(e.l),a:Nn(e.a,3)}},Kie=function(e){return ese((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},$1=function(e){return{h:(t=$ie(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},qLe=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,KLe=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,ZLe=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,XLe=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,nj={string:[[function(e){var t=YLe.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?Nn(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?Nn(parseInt(e.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(e){var t=ZLe.exec(e)||XLe.exec(e);return t?t[2]!==t[4]||t[4]!==t[6]?null:Gie({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=qLe.exec(e)||KLe.exec(e);if(!t)return null;var r,o,n=Yie({h:(r=t[1],o=t[2],o===void 0&&(o="deg"),Number(r)*(GLe[o]||1)),s:Number(t[3]),l:Number(t[4]),a:t[5]===void 0?1:Number(t[5])/(t[6]?100:1)});return Kie(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 bf(t)&&bf(r)&&bf(o)?Gie({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(!bf(t)||!bf(r)||!bf(o))return null;var s=Yie({h:Number(t),s:Number(r),l:Number(o),a:Number(i)});return Kie(s)},"hsl"],[function(e){var t=e.h,r=e.s,o=e.v,n=e.a,i=n===void 0?1:n;if(!bf(t)||!bf(r)||!bf(o))return null;var s=(function(l){return{h:Jie(l.h),s:Sl(l.s,0,100),v:Sl(l.v,0,100),a:Sl(l.a)}})({h:Number(t),s:Number(r),v:Number(o),a:Number(i)});return ese(s)},"hsv"]]},Zie=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]},QLe=function(e){return typeof e=="string"?Zie(e.trim(),nj.string):typeof e=="object"&&e!==null?Zie(e,nj.object):[null,void 0]};var rj=function(e,t){var r=$1(e);return{h:r.h,s:Sl(r.s+100*t,0,100),l:r.l,a:r.a}},oj=function(e){return(299*e.r+587*e.g+114*e.b)/1e3/255},Xie=function(e,t){var r=$1(e);return{h:r.h,s:r.s,l:Sl(r.l+100*t,0,100),a:r.a}},ij=(function(){function e(t){this.parsed=QLe(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 Nn(oj(this.rgba),2)},e.prototype.isDark=function(){return oj(this.rgba)<.5},e.prototype.isLight=function(){return oj(this.rgba)>=.5},e.prototype.toHex=function(){return t=tj(this.rgba),r=t.r,o=t.g,n=t.b,s=(i=t.a)<1?vI(Nn(255*i)):"","#"+vI(r)+vI(o)+vI(n)+s;var t,r,o,n,i,s},e.prototype.toRgb=function(){return tj(this.rgba)},e.prototype.toRgbString=function(){return t=tj(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 qie($1(this.rgba))},e.prototype.toHslString=function(){return t=qie($1(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=$ie(this.rgba),{h:Nn(t.h),s:Nn(t.s),v:Nn(t.v),a:Nn(t.a,3)};var t},e.prototype.invert=function(){return _o({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),_o(rj(this.rgba,t))},e.prototype.desaturate=function(t){return t===void 0&&(t=.1),_o(rj(this.rgba,-t))},e.prototype.grayscale=function(){return _o(rj(this.rgba,-1))},e.prototype.lighten=function(t){return t===void 0&&(t=.1),_o(Xie(this.rgba,t))},e.prototype.darken=function(t){return t===void 0&&(t=.1),_o(Xie(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"?_o({r:(r=this.rgba).r,g:r.g,b:r.b,a:t}):Nn(this.rgba.a,3);var r},e.prototype.hue=function(t){var r=$1(this.rgba);return typeof t=="number"?_o({h:t,s:r.s,l:r.l,a:r.a}):Nn(r.h)},e.prototype.isEqual=function(t){return this.toHex()===_o(t).toHex()},e})(),_o=function(e){return e instanceof ij?e:new ij(e)},Qie=[],yI=function(e){e.forEach(function(t){Qie.indexOf(t)<0&&(t(ij,nj),Qie.push(t))})};var Qs=a(W(),1),sj=a(U(),1),tse=a(j(),1);var wf=a(T(),1),{ValidatedInputControl:JLe}=vt(Qs.privateApis),$Le=({color:e,onColorChange:t,disabled:r})=>{let o=e&&_o(e).isValid()?e:"#ffffff";return(0,wf.jsx)(Qs.Dropdown,{className:"dataviews-controls__color-picker-dropdown",popoverProps:{resize:!1},renderToggle:({onToggle:n})=>(0,wf.jsx)(Qs.Button,{onClick:n,"aria-label":(0,tse.__)("Open color picker"),size:"small",disabled:r,accessibleWhenDisabled:!0,icon:()=>(0,wf.jsx)(Qs.ColorIndicator,{colorValue:o})}),renderContent:()=>(0,wf.jsx)(Qs.__experimentalDropdownContentWrapper,{paddingSize:"none",children:(0,wf.jsx)(Qs.ColorPicker,{color:o,onChange:t,enableAlpha:!0})})})};function rse({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,sj.useCallback)(v=>{r(u({item:e,value:v}))},[e,r,u]),g=(0,sj.useCallback)(v=>{r(u({item:e,value:v||""}))},[e,r,u]);return(0,wf.jsx)(JLe,{required:!!t.isValid?.required,markWhenOptional:n,customValidity:yr(d,i),label:s,placeholder:l,value:m,help:c,onChange:g,hideLabelFromVision:o,type:"text",disabled:f,prefix:(0,wf.jsx)(Qs.__experimentalInputControlPrefixWrapper,{variant:"control",children:(0,wf.jsx)($Le,{color:m,onColorChange:h,disabled:f})})})}var wI=a(W(),1),SI=a(U(),1),aj=a(j(),1);var bI=a(T(),1);function ose({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i}){let[s,l]=(0,SI.useState)(!1),c=t.isDisabled({item:e,field:t}),u=(0,SI.useCallback)(()=>{l(d=>!d)},[]);return(0,bI.jsx)(Nu,{data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i,type:s?"text":"password",suffix:(0,bI.jsx)(wI.__experimentalInputControlSuffixWrapper,{variant:"control",children:(0,bI.jsx)(wI.Button,{icon:s?n_:ug,onClick:u,size:"small",label:s?(0,aj.__)("Hide password"):(0,aj.__)("Show password"),disabled:c,accessibleWhenDisabled:!0})})})}function xI(e){return Array.isArray(e.elements)&&e.elements.length>0||typeof e.getElements=="function"}var ise=a(T(),1),nse={adaptiveSelect:yie,array:Wie,checkbox:uie,color:rse,combobox:$A,datetime:pie,date:gie,email:xie,telephone:_ie,url:Cie,integer:Pie,number:Rie,password:ose,radio:Iie,select:nI,text:Nie,toggle:Lie,textarea:zie,toggleGroup:Uie};function eBe(e){return e&&typeof e=="object"&&typeof e.control=="string"}function tBe(e){let{control:t,...r}=e,o=_I(t);return o===null?null:function(i){return(0,ise.jsx)(o,{...i,config:r})}}function sse(e,t){return typeof e.Edit=="function"?e.Edit:typeof e.Edit=="string"?_I(e.Edit):eBe(e.Edit)?tBe(e.Edit):xI(e)&&e.type!=="array"?_I("adaptiveSelect"):t===null?null:_I(t)}function _I(e){return Object.keys(nse).includes(e)?nse[e]:null}function rBe(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 ase=rBe;var oBe=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},lse=oBe;var nBe=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},cse=nBe;var dse=a(j(),1);function CI({item:e,field:t}){let{elements:r,isLoading:o}=On({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 use=a(T(),1);function Co({item:e,field:t}){return t.hasElements?(0,use.jsx)(CI,{item:e,field:t}):t.getValueFormatted({item:e,field:t})}var Mu=(e,t,r)=>r==="asc"?e.localeCompare(t):t.localeCompare(e);function To(e,t){let r=t.getValue({item:e});return![void 0,"",null].includes(r)}function Du(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 Fu(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 Lu(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 Ir(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 iBe({item:e,field:t}){return t.getValue({item:e})}var gs=iBe;var sBe=/^[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 aBe(e,t){let r=t.getValue({item:e});return![void 0,"",null].includes(r)&&!sBe.test(r)?(0,dse.__)("Value must be a valid email address."):null}var fse={type:"email",render:Co,Edit:"email",sort:Mu,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[Gr,Yr],validOperators:[io,so,bu,wu,Su,Gr,Yr,Ti,Ei],format:{},getValueFormatted:gs,validate:{required:To,pattern:Lu,minLength:Du,maxLength:Fu,elements:Ir,custom:aBe}};var mse=a(j(),1);var j0=(e,t,r)=>r==="asc"?e-t:t-e;function TI(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 EI(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 pse={separatorThousand:","};function lBe({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=pse: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 cBe(e,t){let r=t.getValue({item:e});return![void 0,"",null].includes(r)&&!Number.isInteger(r)?(0,mse.__)("Value must be an integer."):null}var hse={type:"integer",render:Co,Edit:"integer",sort:j0,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[io,so,ap,lp,cp,up,cs],validOperators:[io,so,ap,lp,cp,up,cs,Gr,Yr,Ti,Ei],format:pse,getValueFormatted:lBe,validate:{required:To,min:TI,max:EI,elements:Ir,custom:cBe}};var gse=a(j(),1);var vse={separatorThousand:",",separatorDecimal:".",decimals:2};function uBe({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=vse: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 dBe(e){return e===""||e===void 0||e===null}function fBe(e,t){let r=t.getValue({item:e});return!dBe(r)&&!Number.isFinite(r)?(0,gse.__)("Value must be a number."):null}var yse={type:"number",render:Co,Edit:"number",sort:j0,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[io,so,ap,lp,cp,up,cs],validOperators:[io,so,ap,lp,cp,up,cs,Gr,Yr,Ti,Ei],format:vse,getValueFormatted:uBe,validate:{required:To,min:TI,max:EI,elements:Ir,custom:fBe}};var bse={type:"text",render:Co,Edit:"text",sort:Mu,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[Gr,Yr],validOperators:[io,so,bu,wu,Su,Gr,Yr,Ti,Ei],format:{},getValueFormatted:gs,validate:{required:To,pattern:Lu,minLength:Du,maxLength:Fu,elements:Ir}};var yv=a(go(),1);var Sse=a(go(),1);function wse(e){if(!e||!mf(new Date(e)))return null;let t=(0,Sse.getDate)(e);return t&&mf(t)?t:null}function xse(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=wse(o),l=wse(String(i));return!!s&&!!l&&(r==="min"?l.getTime()>=s.getTime():l.getTime()<=s.getTime())}function PI(e,t){return xse(e,t,"min")}function kI(e,t){return xse(e,t,"max")}var _se={datetime:(0,yv.getSettings)().formats.datetime,weekStartsOn:(0,yv.getSettings)().l10n.startOfWeek};function mBe({item:e,field:t}){let r=t.getValue({item:e});if(["",void 0,null].includes(r))return"";let o;return t.type!=="datetime"?o=_se:o=t.format,(0,yv.dateI18n)(o.datetime,(0,yv.getDate)(r))}var pBe=(e,t,r)=>{let o=new Date(e).getTime(),n=new Date(t).getTime();return r==="asc"?o-n:n-o},Cse={type:"datetime",render:Co,Edit:"datetime",sort:pBe,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[hp,gp,dp,fp,mp,pp,us,Ys],validOperators:[hp,gp,dp,fp,mp,pp,us,Ys],format:_se,getValueFormatted:mBe,validate:{required:To,elements:Ir,min:PI,max:kI}};var bv=a(go(),1);var Tse={date:(0,bv.getSettings)().formats.date,weekStartsOn:(0,bv.getSettings)().l10n.startOfWeek};function hBe({item:e,field:t}){let r=t.getValue({item:e});if(["",void 0,null].includes(r))return"";let o;return t.type!=="date"?o=Tse:o=t.format,(0,bv.dateI18n)(o.date,(0,bv.getDate)(r))}var gBe=(e,t,r)=>{let o=new Date(e).getTime(),n=new Date(t).getTime();return r==="asc"?o-n:n-o},Ese={type:"date",render:Co,Edit:"date",sort:gBe,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[hp,gp,dp,fp,mp,pp,us,Ys,cs],validOperators:[hp,gp,dp,fp,mp,pp,us,Ys,cs],format:Tse,getValueFormatted:hBe,validate:{required:To,elements:Ir,min:PI,max:kI}};var RI=a(j(),1);function Pse(e,t){return t.getValue({item:e})===!0}function vBe({item:e,field:t}){let r=t.getValue({item:e});return r===!0?(0,RI.__)("True"):r===!1?(0,RI.__)("False"):""}function yBe(e,t){let r=t.getValue({item:e});return![void 0,"",null].includes(r)&&![!0,!1].includes(r)?(0,RI.__)("Value must be true, false, or undefined"):null}var bBe=(e,t,r)=>{let o=!!e;return o===!!t?0:r==="asc"?o?1:-1:o?-1:1},kse={type:"boolean",render:Co,Edit:"checkbox",sort:bBe,validate:{required:Pse,elements:Ir,custom:yBe},enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[io,so],validOperators:[io,so],format:{},getValueFormatted:vBe};var Rse={type:"media",render:()=>null,Edit:null,sort:()=>0,enableSorting:!1,enableGlobalSearch:!1,defaultOperators:[],validOperators:[],format:{},getValueFormatted:gs,validate:{}};var lj=a(j(),1);function Ase(e,t){let r=t.getValue({item:e});return Array.isArray(r)&&r.length>0&&r.every(o=>![void 0,"",null].includes(o))}function Ise({item:e,field:t}){let r=t.getValue({item:e});return(Array.isArray(r)?r:[]).join(", ")}function wBe({item:e,field:t}){return Ise({item:e,field:t})}function SBe(e,t){let r=t.getValue({item:e});return![void 0,"",null].includes(r)&&!Array.isArray(r)?(0,lj.__)("Value must be an array."):r.every(o=>typeof o=="string")?null:(0,lj.__)("Every value must be a string.")}var xBe=(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)},Ose={type:"array",render:wBe,Edit:"array",sort:xBe,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[Gr,Yr],validOperators:[Gr,Yr,Ti,Ei],format:{},getValueFormatted:Ise,validate:{required:Ase,elements:Ir,custom:SBe}};function _Be({item:e,field:t}){return t.getValue({item:e})?"\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022":""}var Nse={type:"password",render:Co,Edit:"password",sort:()=>0,enableSorting:!1,enableGlobalSearch:!1,defaultOperators:[],validOperators:[],format:{},getValueFormatted:_Be,validate:{required:To,pattern:Lu,minLength:Du,maxLength:Fu,elements:Ir}};var Mse={type:"telephone",render:Co,Edit:"telephone",sort:Mu,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[Gr,Yr],validOperators:[io,so,bu,wu,Su,Gr,Yr,Ti,Ei],format:{},getValueFormatted:gs,validate:{required:To,pattern:Lu,minLength:Du,maxLength:Fu,elements:Ir}};var Dse=a(j(),1);var z0=a(T(),1);function CBe({item:e,field:t}){if(t.hasElements)return(0,z0.jsx)(CI,{item:e,field:t});let r=gs({item:e,field:t});return!r||!_o(r).isValid()?r:(0,z0.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[(0,z0.jsx)("div",{style:{width:"16px",height:"16px",borderRadius:"50%",backgroundColor:r,border:"1px solid #ddd",flexShrink:0}}),(0,z0.jsx)("span",{children:r})]})}function TBe(e,t){let r=t.getValue({item:e});return![void 0,"",null].includes(r)&&!_o(r).isValid()?(0,Dse.__)("Value must be a valid color."):null}var EBe=(e,t,r)=>{let o=_o(e),n=_o(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},Fse={type:"color",render:CBe,Edit:"color",sort:EBe,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[Gr,Yr],validOperators:[io,so,Gr,Yr],format:{},getValueFormatted:gs,validate:{required:To,elements:Ir,custom:TBe}};var Lse={type:"url",render:Co,Edit:"url",sort:Mu,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[Gr,Yr],validOperators:[io,so,bu,wu,Su,Gr,Yr,Ti,Ei],format:{},getValueFormatted:gs,validate:{required:To,pattern:Lu,minLength:Du,maxLength:Fu,elements:Ir}};var PBe=(e,t,r)=>typeof e=="number"&&typeof t=="number"?j0(e,t,r):Mu(e,t,r),Bse={render:Co,Edit:null,sort:PBe,enableSorting:!0,enableGlobalSearch:!1,defaultOperators:[io,so],validOperators:Mne(),format:{},getValueFormatted:gs,validate:{required:To,elements:Ir}};function kBe(e){return e==="integer"||e==="number"}function RBe(e){return e==="date"||e==="datetime"}function Vse(e,t,r){let o=t.validate[r];if(o&&(typeof e=="number"&&kBe(t.type)||typeof e=="string"&&RBe(t.type)))return{constraint:e,validate:o}}function jse(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=Vse(r?.min,t,"min"),s=Vse(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 zse(e){return e.validOperators.reduce((t,r)=>{let o=gv(r);return o?.filter&&(t[r]=o.filter),t},{})}function ABe(e,t){return{...t.format,...e.format}}var Hse=ABe;function IBe(e){let t=[fse,hse,yse,bse,Cse,Ese,kse,Rse,Ose,Nse,Mse,Fse,Lse].find(r=>r?.type===e);return t||Bse}function wv(e){return e.map(t=>{let r=IBe(t.type),o=t.getValue||lse(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||cse(t.id),elements:t.elements,getElements:t.getElements,hasElements:xI(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:sse(t,r.Edit),sort:n,enableSorting:t.enableSorting??r.enableSorting,enableGlobalSearch:t.enableGlobalSearch??r.enableGlobalSearch,isValid:jse(t,r),filterBy:ase(t,r.defaultOperators,r.validOperators),filter:zse(r),format:Hse(t,r),getValueFormatted:t.getValueFormatted??r.getValueFormatted}})}var ni=a(U(),1);function Use({view:e,data:t,getItemId:r,isLoading:o,paginationInfo:n,selection:i}){let s=e.infiniteScrollEnabled,[l,c]=(0,ni.useState)(!o);(0,ni.useEffect)(()=>{o||c(!0)},[o]);let u=(0,ni.useRef)(t),d=(0,ni.useRef)(n);(0,ni.useEffect)(()=>{o||(u.current=t,d.current=n)},[t,o,n]);let[f,m]=(0,ni.useState)([]),h=(0,ni.useRef)(new Map),g=(0,ni.useRef)([]),v=(0,ni.useRef)({search:void 0,filters:void 0,perPage:void 0}),y=(0,ni.useRef)(void 0),b=(0,ni.useRef)(void 0),w=(0,ni.useRef)(!1),S=(0,ni.useMemo)(()=>{e.startPosition!==void 0&&b.current!==void 0&&(e.startPosition<b.current?y.current="up":e.startPosition>b.current&&(y.current="down")),b.current=e.startPosition;let x=JSON.stringify(e.filters??[]),_=v.current.filters,P=!w.current||!e.infiniteScrollEnabled||e.search!==v.current.search||x!==_||e.perPage!==v.current.perPage;if(w.current=!0,v.current={search:e.search,filters:x,perPage:e.perPage},P){h.current.clear(),y.current=void 0;let N=e.search?1:e.startPosition??1,z=t.map((O,F)=>{let L=N+F;return h.current.set(r(O),L),{...O,position:L}});return g.current=z,z}let I=g.current,A=new Set(t.map(r)),k=y.current,D=e.search?1:e.startPosition??1,E=t.map((N,z)=>{let O=r(N),F=e.infiniteScrollEnabled?D+z:void 0;return F!==void 0&&h.current.set(O,F),{...N,position:F}});if(E.length===0)return I;let C=I.filter(N=>!A.has(r(N))),M=k==="up"?[...E,...C]:[...C,...E];M.sort((N,z)=>{let O=N.position,F=z.position;return O-F});let B=M;if(f.length>0){let N=Math.min(...f),z=Math.max(...f),O=20,F=M.map(Q=>Q.position),L=Math.min(...F);!(Math.max(...F)<N-O||L>z+O)&&(B=M.filter(Q=>{let J=r(Q);if(i?.includes(J))return!0;let se=Q.position;return k==="up"?se<=z+O:k==="down"?se>=N-O:se>=N-O&&se<=z+O}))}return g.current=B,B},[t,e.search,e.filters,e.perPage,e.startPosition,e.infiniteScrollEnabled,f,i,r]);return s?{data:S,paginationInfo:n,hasInitiallyLoaded:l,setVisibleEntries:m}:{data:(o&&u.current?.length?u.current:t).map(_=>({..._,position:void 0})),paginationInfo:o&&u.current?.length?d.current:n,hasInitiallyLoaded:l,setVisibleEntries:void 0}}var vs=a(U(),1),Gse=a(_e(),1);function Wse(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,y=Math.abs(v-n);return h<y?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 Yse({view:e,onChangeView:t,isLoading:r,paginationInfo:o,containerRef:n,setVisibleEntries:i}){let s=(0,vs.useRef)(null),l=(0,vs.useRef)(e),c=(0,vs.useRef)(r),u=(0,vs.useRef)(t),d=(0,vs.useRef)(o.totalItems);(0,vs.useLayoutEffect)(()=>{l.current=e,c.current=r,u.current=t,d.current=o.totalItems},[e,r,t,o.totalItems]);let f=(0,vs.useCallback)(h=>{i&&i(g=>{let v=new Set(g),y=!1;return h.forEach(b=>{let w=Number(b.target?.attributes?.getNamedItem("aria-posinset")?.value);isNaN(w)||(b.isIntersecting?v.has(w)||(v.add(w),y=!0):v.has(w)&&(v.delete(w),y=!0))}),y?Array.from(v).sort():g})},[i]);(0,vs.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 y=h.getBoundingClientRect(),S=v.getBoundingClientRect().top-y.top-g.viewportOffset;Math.abs(S)>1&&(h.scrollTop+=S)}s.current=null},[n,r,e.infiniteScrollEnabled]);let m=(0,vs.useRef)(null);return(0,vs.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,vs.useEffect)(()=>{if(!e.infiniteScrollEnabled||!n.current)return;let h=0,g=600,v=800,y=(0,Gse.throttle)(w=>{let S=l.current,x=d.current,_=w.target,P=_.scrollTop,I=_.scrollHeight,A=_.clientHeight,k=P>h?"down":"up";if(h=P,c.current)return;let D=S.startPosition||1,E=S.perPage||10,C=Math.min(D+E,x);if(k==="down"&&P+A>=I-g&&C<x){let M=C;Wse(_,s,"down"),u.current({...S,startPosition:M})}if(k==="up"&&P<=v&&D>1){let M=D-E,B=M<6?1:M;Wse(_,s,"up"),u.current({...S,startPosition:B})}},50),b=n.current;return b.addEventListener("scroll",y),()=>{b.removeEventListener("scroll",y),y.cancel()}},[n,e.infiniteScrollEnabled]),{intersectionObserver:m.current}}var ii=a(T(),1),OBe=e=>e.id,NBe=()=>!0,MBe=[],DBe={table:{},grid:{},list:{}},FBe=_p.filter(e=>!e.isPicker);function LBe({header:e,search:t=!0,searchLabel:r=void 0}){let{view:o}=(0,Oi.useContext)(tt),n=o.infiniteScrollEnabled;return(0,ii.jsxs)(ii.Fragment,{children:[(0,ii.jsxs)(le,{direction:"row",align:"top",justify:"space-between",className:Z("dataviews__view-actions",{"dataviews__view-actions--infinite-scroll":n}),gap:"xs",children:[(0,ii.jsxs)(le,{direction:"row",justify:"start",gap:"sm",className:"dataviews__search",children:[t&&(0,ii.jsx)(H9,{label:r}),(0,ii.jsx)(XA,{})]}),(0,ii.jsxs)(le,{direction:"row",gap:"xs",style:{flexShrink:0},children:[(0,ii.jsx)(sie,{}),e]})]}),(0,ii.jsx)(QA,{className:"dataviews-filters__container"}),(0,ii.jsx)(j9,{}),(0,ii.jsx)(z9,{})]})}function BBe({view:e,onChangeView:t,fields:r,search:o=!0,searchLabel:n=void 0,actions:i=MBe,data:s,getItemId:l=OBe,getItemLevel:c,isLoading:u=!1,paginationInfo:d,defaultLayouts:f=DBe,selection:m,onChangeSelection:h,onClickItem:g,renderItemLink:v,isItemClickable:y=NBe,header:b,children:w,config:S={perPageSizes:[10,20,50,100]},empty:x,onReset:_}){let[P,I]=(0,Oi.useState)([]),A=m===void 0||h===void 0,k=A?P:m,{data:D,paginationInfo:E,hasInitiallyLoaded:C,setVisibleEntries:M}=Use({view:e,data:s,getItemId:l,isLoading:u,selection:k,paginationInfo:d}),B=(0,Oi.useRef)(null),[N,z]=(0,Oi.useState)(0),O=(0,qse.useResizeObserver)(pe=>{z(pe[0].borderBoxSize[0].inlineSize)},{box:"border-box"}),[F,L]=(0,Oi.useState)(null);function H(pe){let be=typeof pe=="function"?pe(k):pe;A&&I(be),h&&h(be)}let q=(0,Oi.useMemo)(()=>wv(r),[r]),Q=(0,Oi.useMemo)(()=>e.infiniteScrollEnabled?k:k.filter(pe=>s.some(be=>l(be)===pe)),[k,s,l,e.infiniteScrollEnabled]),J=G1(q,e),te=(0,Oi.useMemo)(()=>(J||[]).some(pe=>pe.isPrimary||pe.isLocked),[J]),[se,$]=(0,Oi.useState)(te),{intersectionObserver:X}=Yse({view:e,onChangeView:t,isLoading:u,paginationInfo:d,containerRef:B,setVisibleEntries:M});(0,Oi.useEffect)(()=>{te&&!se&&$(!0)},[te,se]);let oe=(0,Oi.useMemo)(()=>Object.fromEntries(Object.entries(f).filter(([pe])=>FBe.some(be=>be.type===pe)).map(([pe,be])=>[pe,be===!0?{}:be])),[f]);return oe[e.type]?(0,ii.jsx)(tt.Provider,{value:{view:e,onChangeView:t,fields:q,actions:i,data:D,isLoading:u,paginationInfo:E,selection:Q,onChangeSelection:H,openedFilter:F,setOpenedFilter:L,getItemId:l,getItemLevel:c,isItemClickable:y,onClickItem:g,renderItemLink:v,containerWidth:N,containerRef:B,resizeObserverRef:O,defaultLayouts:oe,filters:J,isShowingFilter:se,setIsShowingFilter:$,config:S,empty:x,hasInitiallyLoaded:C,onReset:_,intersectionObserver:X},children:(0,ii.jsx)("div",{className:"dataviews-wrapper",children:w??(0,ii.jsx)(LBe,{header:b,search:o,searchLabel:n})})}):null}var wc=BBe;wc.BulkActionToolbar=QR;wc.Filters=q1;wc.FiltersToggled=QA;wc.FiltersToggle=XA;wc.Layout=j9;wc.LayoutSwitcher=G9;wc.Pagination=z7;wc.Search=H9;wc.ViewConfig=Y9;wc.Footer=z9;var AI=wc;var mj=a(U(),1);var Kse=a(U(),1),Zse=a(T(),1),cj=(0,Kse.createContext)({fields:[]});cj.displayName="DataFormContext";function Xse({fields:e,children:t}){return(0,Zse.jsx)(cj.Provider,{value:{fields:e},children:t})}var xl=cj;var zI=a(U(),1);var OI=a(U(),1),tC=a(W(),1);var eC=a(j(),1),Ni={type:"regular",labelPosition:"top"},VBe=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 Qse(e){let t=Ni;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,eC.__)("Apply"),cancelLabel:n.cancelLabel?.trim()||(0,eC.__)("Cancel")}:n==="modal"?i={type:"modal",applyLabel:(0,eC.__)("Apply"),cancelLabel:(0,eC.__)("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:VBe(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 Jse(e){let t=Qse(e?.layout),r=(e.fields??[]).map(o=>{if(typeof o=="string")return{id:o,layout:t};let n=o.layout?Qse(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:Jse({fields:o.children,layout:Ni}).fields}}});return{layout:t,fields:r}}var II=Jse;var qr=a(T(),1);function jBe({title:e}){return(0,qr.jsx)(le,{direction:"column",className:"dataforms-layouts-regular__header",gap:"lg",children:(0,qr.jsx)(le,{direction:"row",align:"center",children:(0,qr.jsx)(tC.__experimentalHeading,{level:2,size:13,children:e})})})}function $se({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i}){let{fields:s}=(0,OI.useContext)(xl),l=t.layout,c=(0,OI.useMemo)(()=>({layout:Ni,fields:t.children?t.children:[]}),[t]);if(t.children)return(0,qr.jsxs)(qr.Fragment,{children:[!o&&t.label&&(0,qr.jsx)(jBe,{title:t.label}),(0,qr.jsx)(Js,{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,qr.jsxs)(le,{direction:"row",className:"dataforms-layouts-regular__field",gap:"sm",children:[(0,qr.jsx)("div",{className:Z("dataforms-layouts-regular__field-label",`dataforms-layouts-regular__field-label--label-position-${u}`),children:(0,qr.jsx)(tC.BaseControl.VisualLabel,{children:d.label})}),(0,qr.jsx)("div",{className:"dataforms-layouts-regular__field-control",children:d.readOnly===!0?(0,qr.jsx)(d.render,{item:e,field:d}):(0,qr.jsx)(d.Edit,{data:e,field:d,onChange:r,hideLabelFromVision:!0,markWhenOptional:n,validity:i},d.id)})]}):(0,qr.jsx)("div",{className:"dataforms-layouts-regular__field",children:d.readOnly===!0?(0,qr.jsx)(qr.Fragment,{children:(0,qr.jsxs)(qr.Fragment,{children:[!o&&u!=="none"&&(0,qr.jsx)(tC.BaseControl.VisualLabel,{children:d.label}),(0,qr.jsx)(d.render,{item:e,field:d})]})}):(0,qr.jsx)(d.Edit,{data:e,field:d,onChange:r,hideLabelFromVision:u==="none"?!0:o,markWhenOptional:n,validity:i})})}var dj=a(NI(),1),Sv=a(W(),1),Sc=a(U(),1),LI=a(_e(),1);var MI=a(W(),1),U0=a(j(),1);var lae=a(_e(),1);var cae=a(U(),1);function eVe(e,t){return Z("dataforms-layouts-panel__field-label",`dataforms-layouts-panel__field-label--label-position-${e}`,{"has-error":t})}var oae=eVe;var nae=a(W(),1);var Lp=a(T(),1);function tVe(e,t,r){return e?(0,Lp.jsxs)(ht.Root,{children:[(0,Lp.jsx)(ht.Trigger,{render:(0,Lp.jsxs)("span",{className:"dataforms-layouts-panel__field-label-error-content",children:[(0,Lp.jsx)(nae.Icon,{icon:Nd,size:16}),(0,Lp.jsxs)(tr,{children:[t,": "]}),r]})}),(0,Lp.jsx)(ht.Popup,{children:t})]}):r}var iae=tVe;function sae(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=sae(r);if(o)return o}}var aae=sae;var ys=a(T(),1);function oC({data:e,field:t,fieldLabel:r,summaryFields:o,validity:n,touched:i,disabled:s,onClick:l,"aria-expanded":c}){let{labelPosition:u,editVisibility:d}=t.layout,f=aae(n),m=i&&!!f,h=oae(u,m),g=iae(m,f,r),v=Z("dataforms-layouts-panel__field-trigger",`dataforms-layouts-panel__field-trigger--label-${u}`,{"is-disabled":s,"dataforms-layouts-panel__field-trigger--edit-always":d==="always"}),y=(0,lae.useInstanceId)(oC,"dataforms-layouts-panel__field-control"),b=m?(0,U0.sprintf)((0,U0._x)("Edit %s (has errors)","field"),r||""):(0,U0.sprintf)((0,U0._x)("Edit %s","field"),r||""),w=(0,cae.useRef)(null);return(0,ys.jsxs)("div",{ref:w,className:v,onClick:s?void 0:()=>{let _=w.current?.ownerDocument.defaultView?.getSelection();_&&_.toString().length>0||l()},onKeyDown:s?void 0:_=>{_.target===_.currentTarget&&(_.key==="Enter"||_.key===" ")&&(_.preventDefault(),l())},children:[u!=="none"&&(0,ys.jsx)("span",{className:h,children:g}),u==="none"&&m&&(0,ys.jsxs)(ht.Root,{children:[(0,ys.jsx)(ht.Trigger,{render:(0,ys.jsx)("span",{className:"dataforms-layouts-panel__field-label-error-content",role:"img","aria-label":f,children:(0,ys.jsx)(MI.Icon,{icon:Nd,size:16})})}),(0,ys.jsx)(ht.Popup,{children:f})]}),(0,ys.jsx)("span",{id:`${y}`,className:"dataforms-layouts-panel__field-control",children:o.length>1?(0,ys.jsx)("span",{style:{display:"flex",flexDirection:"column",alignItems:"flex-start",width:"100%",gap:"2px"},children:o.map(_=>(0,ys.jsx)("span",{style:{width:"100%"},children:(0,ys.jsx)(_.render,{item:e,field:_})},_.id))}):o.map(_=>(0,ys.jsx)(_.render,{item:e,field:_},_.id))}),!s&&(0,ys.jsx)(MI.Button,{className:"dataforms-layouts-panel__field-trigger-icon",label:b,icon:Zx,size:"small","aria-expanded":c,"aria-haspopup":"dialog","aria-describedby":`${y}`})]})}var uae=a(NI(),1),uj=a(DA(),1),Bu=a(U(),1),bs=a(j(),1);function dae(e){return e?Object.values(e).every(t=>Object.entries(t).every(([r,o])=>r==="children"&&o&&typeof o=="object"?dae(o):o.type!=="invalid"&&o.type!=="validating")):!0}function rVe(e,t){let r=II(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]=wv([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]=wv([l]);return{id:s.id,children:[],field:c}}return r.fields.map(n).filter(s=>s!==null)}function W0(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 fae(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 oVe(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=>W0(u,{elements:{type:"invalid",message:(0,bs.__)("Could not validate elements.")}},[...i,t.id]));return}t.field?.isValid.elements&&!t.field.isValid.elements.validate(s,{...t.field,elements:c})?n(u=>W0(u,{elements:{type:"invalid",message:(0,bs.__)("Value must be one of the elements.")}},[...i,t.id])):n(u=>fae(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,bs.__)("Unknown error when running elements validation asynchronously."),n(d=>W0(d,{elements:{type:"invalid",message:u}},[...i,t.id]))})}function nVe(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=>fae(c,[...i,t.id],"custom"));return}if(typeof l=="string"){n(c=>W0(c,{custom:{type:"invalid",message:l}},[...i,t.id]));return}n(c=>W0(c,{custom:{type:"invalid",message:(0,bs.__)("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,bs.__)("Unknown error when running custom validation asynchronously."),n(u=>W0(u,{custom:{type:"invalid",message:c}},[...i,t.id]))})}function mae(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,bs.__)("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,bs.__)("Value is below the minimum.")}};if(t.field?.isValid.max&&!t.field.isValid.max.validate(e,t.field))return{max:{type:"invalid",message:(0,bs.__)("Value is above the maximum.")}};if(t.field?.isValid.minLength&&!t.field.isValid.minLength.validate(e,t.field))return{minLength:{type:"invalid",message:(0,bs.__)("Value is too short.")}};if(t.field?.isValid.maxLength&&!t.field.isValid.maxLength.validate(e,t.field))return{maxLength:{type:"invalid",message:(0,bs.__)("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,bs.__)("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,uae.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,bs.__)("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"&&(oVe(t.field.getElements(),t,r),n.elements={type:"validating",message:(0,bs.__)("Validating\u2026")}),o instanceof Promise&&(nVe(o,t,r),n.custom={type:"validating",message:(0,bs.__)("Validating\u2026")}),Object.keys(n).length>0)return n;if(t.children.length>0){let i={};t.children.forEach(l=>{i[l.id]=mae(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 pae(e,t){let r=e?.field?.getValue({item:t});if(e.children.length===0)return r;let o=e.children.map(n=>pae(n,t));return o?{value:r,children:o}:r}function iVe(e,t,r){let[o,n]=(0,Bu.useState)(),i=(0,Bu.useRef)({}),s=(0,Bu.useRef)({}),l=(0,Bu.useRef)({}),c=(0,Bu.useCallback)(()=>{let u={customCounterRef:i,elementsCounterRef:s,setFormValidity:n,path:[],item:e},d=rVe(r,t);if(d.length===0){n(void 0);return}let f={},m=[];d.forEach(h=>{let g=pae(h,e);if(l.current.hasOwnProperty(h.id)&&(0,uj.default)(l.current[h.id],g)){m.push(h.id);return}l.current[h.id]=g;let v=mae(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(b=>{g&&!v.includes(b)&&delete g[b]}),Object.keys(g).length===0&&(g=void 0),(0,uj.default)(h,g)?h:g})},[e,t,r]);return(0,Bu.useEffect)(()=>{c()},[c]),{validity:o,isValid:dae(o)}}var hae=iVe;var gae=a(U(),1);function Bp(e,t){(0,gae.useEffect)(()=>{t&&e.current&&e.current.querySelectorAll("input, textarea, select").forEach(o=>{o.reportValidity()})},[t,e])}var vae=a(U(),1);function sVe(e){return Array.isArray(e)?e.map(t=>typeof t=="string"?t:t.id):[]}var DI=(e,t)=>Array.isArray(e)&&e.length>0?sVe(e).map(o=>t.find(n=>n.id===o)).filter(o=>o!==void 0):[];var aVe=(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 lVe(e){let{fields:t}=(0,vae.useContext)(xl),r=e.layout,o=DI(r.summary,t),n=aVe(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 FI=lVe;var ws=a(T(),1);function cVe({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,Sc.useContext)(xl),[d,f]=(0,Sc.useState)({}),m=(0,Sc.useMemo)(()=>(0,dj.default)(e,d,{arrayMerge:(_,P)=>P}),[e,d]),h=(0,Sc.useMemo)(()=>({layout:Ni,fields:t.children?t.children:[{id:t.id,layout:Ni}]}),[t]),g=u.map(_=>({..._,Edit:_.Edit===null?void 0:_.Edit,isValid:{required:_.isValid.required?.constraint,elements:_.isValid.elements?.constraint,min:_.isValid.min?.constraint,max:_.isValid.max?.constraint,pattern:_.isValid.pattern?.constraint,minLength:_.isValid.minLength?.constraint,maxLength:_.isValid.maxLength?.constraint}})),{validity:v}=hae(m,g,h),y=()=>{r(d),n()},b=_=>{f(P=>(0,dj.default)(P,_,{arrayMerge:(I,A)=>A}))},w=(0,LI.useFocusOnMount)("firstInputElement"),S=(0,Sc.useRef)(null),x=(0,LI.useMergeRefs)([w,S]);return Bp(S,i),(0,ws.jsxs)(Sv.Modal,{className:"dataforms-layouts-panel__modal",onRequestClose:n,isFullScreen:!1,title:o,size:"medium",children:[(0,ws.jsx)("div",{ref:x,children:(0,ws.jsx)(Js,{data:m,form:h,onChange:b,validity:v,children:(_,P,I,A)=>(0,ws.jsx)(_,{data:m,field:P,onChange:b,hideLabelFromVision:h.fields.length<2,markWhenOptional:A,validity:I},P.id)})}),(0,ws.jsxs)(le,{direction:"row",className:"dataforms-layouts-panel__modal-footer",gap:"md",children:[(0,ws.jsx)(Sv.__experimentalSpacer,{style:{flex:1}}),(0,ws.jsx)(Sv.Button,{variant:"tertiary",onClick:n,__next40pxDefaultSize:!0,children:c}),(0,ws.jsx)(Sv.Button,{variant:"primary",onClick:y,__next40pxDefaultSize:!0,children:l})]})]})}function uVe({data:e,field:t,onChange:r,validity:o}){let[n,i]=(0,Sc.useState)(!1),[s,l]=(0,Sc.useState)(!1),{fieldDefinition:c,fieldLabel:u,summaryFields:d}=FI(t);if(!c)return null;let f=()=>{l(!1),i(!0)};return(0,ws.jsxs)(ws.Fragment,{children:[(0,ws.jsx)(oC,{data:e,field:t,fieldLabel:u,summaryFields:d,validity:o,touched:n,disabled:c.readOnly===!0,onClick:()=>l(!0),"aria-expanded":s}),s&&(0,ws.jsx)(cVe,{data:e,field:t,onChange:r,fieldLabel:u??"",onClose:f,touched:n})]})}var yae=uVe;var Vp=a(W(),1),bae=a(j(),1),Sf=a(U(),1);var wae=a(_e(),1);var Mi=a(T(),1);function dVe({title:e,onClose:t}){return(0,Mi.jsx)(le,{direction:"column",className:"dataforms-layouts-panel__dropdown-header",gap:"lg",children:(0,Mi.jsxs)(le,{direction:"row",gap:"sm",align:"center",children:[e&&(0,Mi.jsx)(Vp.__experimentalHeading,{level:2,size:13,children:e}),(0,Mi.jsx)(Vp.__experimentalSpacer,{style:{flex:1}}),t&&(0,Mi.jsx)(Vp.Button,{label:(0,bae.__)("Close"),icon:_n,onClick:t,size:"small"})]})})}function fVe({touched:e,children:t}){let r=(0,Sf.useRef)(null);return Bp(r,e),(0,Mi.jsx)("div",{ref:r,children:t})}function mVe({data:e,field:t,onChange:r,validity:o}){let[n,i]=(0,Sf.useState)(!1),[s,l]=(0,Sf.useState)(null),c=(0,Sf.useMemo)(()=>({anchor:s,placement:"left-start",offset:36,shift:!0}),[s]),[u,d]=(0,wae.__experimentalUseDialog)({focusOnMount:"firstInputElement"}),f=(0,Sf.useMemo)(()=>({layout:Ni,fields:t.children?t.children:[{id:t.id,layout:Ni}]}),[t]),m=(0,Sf.useMemo)(()=>{if(o!==void 0)return t.children?o?.children:{[t.id]:o}},[o,t]),{fieldDefinition:h,fieldLabel:g,summaryFields:v}=FI(t);return h?(0,Mi.jsx)("div",{ref:l,className:"dataforms-layouts-panel__field-dropdown-anchor",children:(0,Mi.jsx)(Vp.Dropdown,{contentClassName:"dataforms-layouts-panel__field-dropdown",popoverProps:c,focusOnMount:!1,onToggle:y=>{y||i(!0)},renderToggle:({isOpen:y,onToggle:b})=>(0,Mi.jsx)(oC,{data:e,field:t,fieldLabel:g,summaryFields:v,validity:o,touched:n,disabled:h.readOnly===!0,onClick:b,"aria-expanded":y}),renderContent:({onClose:y})=>(0,Mi.jsx)(fVe,{touched:n,children:(0,Mi.jsxs)("div",{ref:u,...d,children:[(0,Mi.jsx)(dVe,{title:g,onClose:y}),(0,Mi.jsx)(Js,{data:e,form:f,onChange:r,validity:m,children:(b,w,S,x)=>(0,Mi.jsx)(b,{data:e,field:w,onChange:r,hideLabelFromVision:(f?.fields??[]).length<2,markWhenOptional:x,validity:S},w.id)})]})})})}):null}var Sae=mVe;var fj=a(T(),1);function xae({data:e,field:t,onChange:r,validity:o}){return t.layout.openAs.type==="modal"?(0,fj.jsx)(yae,{data:e,field:t,onChange:r,validity:o}):(0,fj.jsx)(Sae,{data:e,field:t,onChange:r,validity:o})}var $s=a(U(),1);var BI=a(j(),1),_ae=a(T(),1);function Cae(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+=Cae(o);return t}function VI({validity:e}){let t=Cae(e);return t===0?null:(0,_ae.jsx)(XB,{intent:"high",children:(0,BI.sprintf)((0,BI._n)("%d field needs attention","%d fields need attention",t),t)})}var Eo=a(T(),1);function pVe(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 hVe({data:e,fields:t,label:r,layout:o,isOpen:n,touched:i,validity:s}){let c=DI(o.summary,t).filter(f=>pVe(f,o.summary,n)),u=i&&o.isCollapsible,d=c.length>0&&o.withHeader;return(0,Eo.jsxs)(le,{align:"center",justify:"space-between",className:"dataforms-layouts-card__field-header-content",children:[(0,Eo.jsx)(hu.Title,{children:r}),(u||d)&&(0,Eo.jsxs)(Rg.HeaderDescription,{className:"dataforms-layouts-card__field-header-content-description",children:[u&&(0,Eo.jsx)(VI,{validity:s}),d&&(0,Eo.jsx)("div",{className:"dataforms-layouts-card__field-summary",children:c.map(f=>(0,Eo.jsx)(f.render,{item:e,field:f},f.id))})]})]})}function gVe({data:e,field:t,form:r,onChange:o,hideLabelFromVision:n,markWhenOptional:i,validity:s,withHeader:l}){if(t.children)return(0,Eo.jsxs)(Eo.Fragment,{children:[t.description&&(0,Eo.jsx)("div",{className:"dataforms-layouts-card__field-description",children:t.description}),(0,Eo.jsx)(Js,{data:e,form:r,onChange:o,validity:s?.children})]});let c=xv("regular")?.component;return c?(0,Eo.jsx)(c,{data:e,field:t,onChange:o,hideLabelFromVision:n||l,markWhenOptional:i,validity:s}):null}function Tae({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i}){let{fields:s}=(0,$s.useContext)(xl),l=t.layout,c=(0,$s.useRef)(null),u=(0,$s.useMemo)(()=>({layout:Ni,fields:t.children??[]}),[t]),{isOpened:d,isCollapsible:f}=l,[m,h]=(0,$s.useState)(d),[g,v]=(0,$s.useState)(!1);(0,$s.useEffect)(()=>{h(d)},[d]);let y=(0,$s.useCallback)(P=>{P||v(!0),h(P)},[]),b=(0,$s.useCallback)(()=>{v(!0)},[]);Bp(c,(f?m:!0)&&g);let w=t.label,S;if(t.children)S=!!w&&l.withHeader;else{let P=s.find(I=>I.id===t.id);if(!P||!P.Edit)return null;w=P.label,S=!!w&&l.withHeader}let x=(0,Eo.jsx)(gVe,{data:e,field:t,form:u,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i,withHeader:S}),_=(0,Eo.jsx)(hVe,{data:e,fields:s,label:w,layout:l,isOpen:f?!!m:!0,touched:g,validity:i});return S&&f?(0,Eo.jsxs)(Rg.Root,{className:"dataforms-layouts-card__field",open:m,onOpenChange:y,children:[(0,Eo.jsx)(Rg.Header,{children:_}),(0,Eo.jsx)(Rg.Content,{ref:c,onBlur:b,children:x})]}):(0,Eo.jsxs)(hu.Root,{className:"dataforms-layouts-card__field",children:[S&&(0,Eo.jsx)(hu.Header,{children:_}),(0,Eo.jsx)(hu.Content,{ref:c,onBlur:b,children:x})]})}var Eae=a(W(),1);var Mn=a(T(),1);function vVe({title:e}){return(0,Mn.jsx)(le,{direction:"column",className:"dataforms-layouts-row__header",gap:"lg",children:(0,Mn.jsx)(le,{direction:"row",align:"center",children:(0,Mn.jsx)(Eae.__experimentalHeading,{level:2,size:13,children:e})})})}var yVe=({children:e})=>(0,Mn.jsx)(Mn.Fragment,{children:e});function Pae({data:e,field:t,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:i}){let s=t.layout;if(t.children){let c={layout:Ni,fields:t.children};return(0,Mn.jsxs)("div",{className:"dataforms-layouts-row__field",children:[!o&&t.label&&(0,Mn.jsx)(vVe,{title:t.label}),(0,Mn.jsx)(le,{direction:"row",align:s.alignment,gap:"lg",children:(0,Mn.jsx)(Js,{data:e,form:c,onChange:r,validity:i?.children,as:yVe,children:(u,d,f)=>(0,Mn.jsx)("div",{className:"dataforms-layouts-row__field-control",style:s.styles[d.id],children:(0,Mn.jsx)(u,{data:e,field:d,onChange:r,hideLabelFromVision:o,markWhenOptional:n,validity:f})},d.id)})})]})}let l=xv("regular")?.component;return l?(0,Mn.jsx)(Mn.Fragment,{children:(0,Mn.jsx)("div",{className:"dataforms-layouts-row__field-control",children:(0,Mn.jsx)(l,{data:e,field:t,onChange:r,markWhenOptional:n,validity:i})})}):null}var ea=a(U(),1),kae=a(j(),1);var xf=a(T(),1);function Rae({data:e,field:t,onChange:r,validity:o}){let{fields:n}=(0,ea.useContext)(xl),i=(0,ea.useRef)(null),s=(0,ea.useRef)(null),[l,c]=(0,ea.useState)(!1),[u,d]=(0,ea.useState)(!1),f=(0,ea.useMemo)(()=>({layout:Ni,fields:t.children??[]}),[t]);(0,ea.useEffect)(()=>{let y=i.current;if(!y)return;let b=()=>{let w=y.open;w||c(!0),d(w)};return y.addEventListener("toggle",b),()=>{y.removeEventListener("toggle",b)}},[]),Bp(s,u&&l);let m=(0,ea.useCallback)(()=>{c(!0)},[]);if(!t.children)return null;let h=t.layout.summary??"",g=h?n.find(y=>y.id===h):void 0,v;return g&&g.render?v=(0,xf.jsx)(g.render,{item:e,field:g}):v=t.label||(0,kae.__)("More details"),(0,xf.jsxs)("details",{ref:i,className:"dataforms-layouts-details__details",children:[(0,xf.jsx)("summary",{className:"dataforms-layouts-details__summary",children:(0,xf.jsxs)(le,{direction:"row",align:"center",gap:"md",className:"dataforms-layouts-details__summary-content",children:[v,l&&(0,xf.jsx)(VI,{validity:o})]})}),(0,xf.jsx)("div",{ref:s,className:"dataforms-layouts-details__content",onBlur:m,children:(0,xf.jsx)(Js,{data:e,form:f,onChange:r,validity:o?.children})})]})}var _v=a(T(),1),bVe=[{type:"regular",component:$se,wrapper:({children:e})=>(0,_v.jsx)(le,{direction:"column",className:"dataforms-layouts__wrapper",gap:"lg",children:e})},{type:"panel",component:xae,wrapper:({children:e})=>(0,_v.jsx)(le,{direction:"column",className:"dataforms-layouts__wrapper",gap:"md",children:e})},{type:"card",component:Tae,wrapper:({children:e})=>(0,_v.jsx)(le,{direction:"column",className:"dataforms-layouts__wrapper",gap:"xl",children:e})},{type:"row",component:Pae,wrapper:({children:e,layout:t})=>(0,_v.jsx)(le,{direction:"column",className:"dataforms-layouts__wrapper",gap:"lg",children:(0,_v.jsx)("div",{className:"dataforms-layouts-row__field",children:(0,_v.jsx)(le,{direction:"row",gap:"lg",align:t.alignment,children:e})})})},{type:"details",component:Rae}];function xv(e){return bVe.find(t=>t.type===e)}var jI=a(T(),1),wVe=({children:e})=>(0,jI.jsx)(le,{direction:"column",className:"dataforms-layouts__wrapper",gap:"lg",children:e});function Js({data:e,form:t,onChange:r,validity:o,children:n,as:i}){let{fields:s}=(0,zI.useContext)(xl),l=(0,zI.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??xv(t.layout.type)?.wrapper??wVe;return(0,jI.jsx)(u,{layout:t.layout,children:t.fields.map(d=>{let f=xv(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,jI.jsx)(f,{data:e,field:d,onChange:r,markWhenOptional:l,validity:o?.[d.id]},d.id)})})}var pj=a(T(),1);function nC({data:e,form:t,fields:r,onChange:o,validity:n}){let i=(0,mj.useMemo)(()=>II(t),[t]),s=(0,mj.useMemo)(()=>wv(r),[r]);return t.fields?(0,pj.jsx)(Xse,{fields:s,children:(0,pj.jsx)(Js,{data:e,form:i,onChange:o,validity:n})}):null}var HI=a(W(),1);var Oae=a(j(),1),Nae=a(U(),1);var jp=a(go(),1),Aae=a(W(),1),hj=a(T(),1);function Iae({item:e,field:t}){let r=t.getValue({item:e});if(!r)return null;let o=(0,jp.getSettings)(),n=(0,jp.dateI18n)(o.formats.date,(0,jp.getDate)(r)),i=(0,jp.dateI18n)(o.formats.datetimeAbbreviated,(0,jp.getDate)(r));return(0,hj.jsx)(Aae.Tooltip,{text:i,placement:"top",children:(0,hj.jsx)("time",{dateTime:r,"aria-label":i,tabIndex:-1,children:n})})}var _f=a(T(),1);function Mae({form:e,header:t}){let{media:r,fields:o,onChange:n}=c0(),i=(0,Nae.useMemo)(()=>o.map(c=>c.type==="datetime"&&c.readOnly?{...c,render:Iae}:c),[o]);if(!r||!n)return(0,_f.jsx)("div",{className:"media-editor-form media-editor-form--loading",children:(0,_f.jsx)(HI.Spinner,{})});let s={layout:{type:"panel"},fields:o.map(c=>["title","alt_text","caption","description"].includes(c.id)?{id:c.id,layout:{type:"regular",labelPosition:"top"}}:c.id)},l=e||s;return(0,_f.jsx)("div",{className:"media-editor-form",children:(0,_f.jsxs)(HI.__experimentalVStack,{spacing:4,children:[(0,_f.jsx)(tr,{render:(0,_f.jsx)("h2",{}),children:(0,Oae.__)("Media details")}),t,(0,_f.jsx)(nC,{data:r,fields:i,form:l,onChange:n})]})})}var Dae=a(Pm(),1),{lock:Fae,unlock:Lae}=(0,Dae.__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 UI=a(G(),1);var Bae={isOpen:!1,id:null,onUpdate:null,onClose:null};function Vae(e=Bae,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 Bae}return e}var gj={};Sn(gj,{closeMediaEditorModal:()=>xVe,openMediaEditorModal:()=>SVe});function SVe({id:e,onUpdate:t,onClose:r}){return{type:"OPEN_MEDIA_EDITOR_MODAL",id:e,onUpdate:t??null,onClose:r??null}}function xVe(){return{type:"CLOSE_MEDIA_EDITOR_MODAL"}}var vj={};Sn(vj,{getId:()=>CVe,getOnClose:()=>EVe,getOnUpdate:()=>TVe,isOpen:()=>_Ve});function _Ve(e){return e.isOpen}function CVe(e){return e.id}function TVe(e){return e.onUpdate}function EVe(e){return e.onClose}var jae="core/media-editor";var G0=(0,UI.createReduxStore)(jae,{reducer:Vae,actions:gj,selectors:vj});(0,UI.register)(G0);var Ice=a(W(),1),CC=a(G(),1),_C=a(j(),1),Oce=a(ta(),1),Nce=a(xt(),1);var Fn=a(W(),1);var Dj=a(_e(),1),xC=a(G(),1),Fj=a(ee(),1),Uo=a(U(),1),ai=a(j(),1);var Pc=a(yo(),1),TO=a(xt(),1);var xj={};Sn(xj,{ActionItem:()=>Cl,ComplementaryArea:()=>El,ComplementaryAreaMoreMenuItem:()=>Up,FullscreenMode:()=>ale,InterfaceSkeleton:()=>Ev,PinnedItems:()=>Wp,store:()=>Le});var Tl=a(W(),1),lC=a(G(),1),$I=a(j(),1);var ju=a(U(),1),wj=a(Uae(),1),ole=a(Rt(),1),Gp=a(_e(),1),nle=a(zp(),1);var Zae=a(W(),1),qI=a(G(),1),Xae=a(zp(),1);var YI=a(G(),1);var yj={};Sn(yj,{closeModal:()=>FVe,disableComplementaryArea:()=>RVe,enableComplementaryArea:()=>kVe,openModal:()=>DVe,pinItem:()=>AVe,setDefaultComplementaryArea:()=>PVe,setFeatureDefaults:()=>MVe,setFeatureValue:()=>NVe,toggleFeature:()=>OVe,unpinItem:()=>IVe});var GI=a(rl(),1),_l=a(Rt(),1);var WI=a(rl(),1);function Vu(e){return["core/edit-post","core/edit-site"].includes(e)?((0,WI.default)(`${e} interface scope`,{alternative:"core interface scope",hint:"core/edit-post and core/edit-site are merging.",version:"6.6"}),"core"):e}function Cv(e,t){return e==="core"&&t==="edit-site/template"?((0,WI.default)("edit-site/template sidebar",{alternative:"edit-post/document",version:"6.6"}),"edit-post/document"):e==="core"&&t==="edit-site/block-inspector"?((0,WI.default)("edit-site/block-inspector sidebar",{alternative:"edit-post/block",version:"6.6"}),"edit-post/block"):t}var PVe=(e,t)=>(e=Vu(e),t=Cv(e,t),{type:"SET_DEFAULT_COMPLEMENTARY_AREA",scope:e,area:t}),kVe=(e,t)=>({registry:r,dispatch:o})=>{if(!t)return;e=Vu(e),t=Cv(e,t),r.select(_l.store).get(e,"isComplementaryAreaVisible")||r.dispatch(_l.store).set(e,"isComplementaryAreaVisible",!0),o({type:"ENABLE_COMPLEMENTARY_AREA",scope:e,area:t})},RVe=e=>({registry:t})=>{e=Vu(e),t.select(_l.store).get(e,"isComplementaryAreaVisible")&&t.dispatch(_l.store).set(e,"isComplementaryAreaVisible",!1)},AVe=(e,t)=>({registry:r})=>{if(!t)return;e=Vu(e),t=Cv(e,t);let o=r.select(_l.store).get(e,"pinnedItems");o?.[t]!==!0&&r.dispatch(_l.store).set(e,"pinnedItems",{...o,[t]:!0})},IVe=(e,t)=>({registry:r})=>{if(!t)return;e=Vu(e),t=Cv(e,t);let o=r.select(_l.store).get(e,"pinnedItems");r.dispatch(_l.store).set(e,"pinnedItems",{...o,[t]:!1})};function OVe(e,t){return function({registry:r}){(0,GI.default)("dispatch( 'core/interface' ).toggleFeature",{since:"6.0",alternative:"dispatch( 'core/preferences' ).toggle"}),r.dispatch(_l.store).toggle(e,t)}}function NVe(e,t,r){return function({registry:o}){(0,GI.default)("dispatch( 'core/interface' ).setFeatureValue",{since:"6.0",alternative:"dispatch( 'core/preferences' ).set"}),o.dispatch(_l.store).set(e,t,!!r)}}function MVe(e,t){return function({registry:r}){(0,GI.default)("dispatch( 'core/interface' ).setFeatureDefaults",{since:"6.0",alternative:"dispatch( 'core/preferences' ).setDefaults"}),r.dispatch(_l.store).setDefaults(e,t)}}function DVe(e){return{type:"OPEN_MODAL",name:e}}function FVe(){return{type:"CLOSE_MODAL"}}var bj={};Sn(bj,{getActiveComplementaryArea:()=>LVe,isComplementaryAreaLoading:()=>BVe,isFeatureActive:()=>jVe,isItemPinned:()=>VVe,isModalActive:()=>zVe});var iC=a(G(),1),Gae=a(rl(),1),sC=a(Rt(),1);var LVe=(0,iC.createRegistrySelector)(e=>(t,r)=>{r=Vu(r);let o=e(sC.store).get(r,"isComplementaryAreaVisible");if(o!==void 0)return o===!1?null:t?.complementaryAreas?.[r]}),BVe=(0,iC.createRegistrySelector)(e=>(t,r)=>{r=Vu(r);let o=e(sC.store).get(r,"isComplementaryAreaVisible"),n=t?.complementaryAreas?.[r];return o&&n===void 0}),VVe=(0,iC.createRegistrySelector)(e=>(t,r,o)=>(r=Vu(r),o=Cv(r,o),e(sC.store).get(r,"pinnedItems")?.[o]??!0)),jVe=(0,iC.createRegistrySelector)(e=>(t,r,o)=>((0,Gae.default)("select( 'core/interface' ).isFeatureActive( scope, featureName )",{since:"6.0",alternative:"select( 'core/preferences' ).get( scope, featureName )"}),!!e(sC.store).get(r,o)));function zVe(e,t){return e.activeModal===t}var Yae=a(G(),1);function HVe(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 UVe(e=null,t){switch(t.type){case"OPEN_MODAL":return t.name;case"CLOSE_MODAL":return null}return e}var qae=(0,Yae.combineReducers)({complementaryAreas:HVe,activeModal:UVe});var Kae="core/interface";var Le=(0,YI.createReduxStore)(Kae,{reducer:qae,actions:yj,selectors:bj});(0,YI.register)(Le);var Qae=a(T(),1);function WVe(e){return["checkbox","option","radio","switch","menuitemcheckbox","menuitemradio","treeitem"].includes(e)}function Y0({as:e=Zae.Button,scope:t,identifier:r,icon:o,selectedIcon:n,name:i,shortcut:s,...l}){let c=e,u=(0,Xae.usePluginContext)(),d=o||u.icon,f=r||`${u.name}/${i}`,m=(0,qI.useSelect)(v=>v(Le).getActiveComplementaryArea(t)===f,[f,t]),{enableComplementaryArea:h,disableComplementaryArea:g}=(0,qI.useDispatch)(Le);return(0,Qae.jsx)(c,{icon:n&&m?n:d,"aria-controls":f.replace("/",":"),"aria-checked":WVe(l.role)?m:void 0,onClick:()=>{m?g(t):h(t,f)},shortcut:s,...l})}var KI=a(T(),1),GVe=({children:e,className:t,toggleButtonProps:r})=>{let o=(0,KI.jsx)(Y0,{icon:_n,...r});return(0,KI.jsxs)("div",{className:Z("components-panel__header","interface-complementary-area-header",t),tabIndex:-1,children:[e,o]})},Jae=GVe;var tle=a(W(),1);var Hp=a(W(),1),ZI=a(U(),1),aC=a(T(),1),$ae=()=>{};function YVe({name:e,as:t=Hp.MenuGroup,fillProps:r={},bubblesVirtually:o,...n}){return(0,aC.jsx)(Hp.Slot,{name:e,bubblesVirtually:o,fillProps:r,children:i=>{if(!ZI.Children.toArray(i).length)return null;let s=[];ZI.Children.forEach(i,({props:{__unstableExplicitMenuItem:c,__unstableTarget:u}})=>{u&&c&&s.push(u)});let l=ZI.Children.map(i,c=>!c.props.__unstableExplicitMenuItem&&s.includes(c.props.__unstableTarget)?null:c);return(0,aC.jsx)(t,{...n,children:l})}})}function ele({name:e,as:t=Hp.Button,onClick:r,...o}){return(0,aC.jsx)(Hp.Fill,{name:e,children:({onClick:n})=>(0,aC.jsx)(t,{onClick:r||n?(...i)=>{(r||$ae)(...i),(n||$ae)(...i)}:void 0,...o})})}ele.Slot=YVe;var Cl=ele;var XI=a(T(),1),qVe=({__unstableExplicitMenuItem:e,__unstableTarget:t,...r})=>(0,XI.jsx)(tle.MenuItem,{...r});function Up({scope:e,target:t,__unstableExplicitMenuItem:r,...o}){return(0,XI.jsx)(Y0,{as:n=>(0,XI.jsx)(Cl,{__unstableExplicitMenuItem:r,__unstableTarget:`${e}/${t}`,as:qVe,name:`${e}/plugin-more-menu`,...n}),role:"menuitemcheckbox",selectedIcon:Qn,name:t,scope:e,...o})}var JI=a(W(),1),QI=a(T(),1);function rle({scope:e,...t}){return(0,QI.jsx)(JI.Fill,{name:`PinnedItems/${e}`,...t})}function KVe({scope:e,className:t,...r}){return(0,QI.jsx)(JI.Slot,{name:`PinnedItems/${e}`,...r,children:o=>o?.length>0&&(0,QI.jsx)("div",{className:Z(t,"interface-pinned-items"),children:o})})}rle.Slot=KVe;var Wp=rle;var tn=a(T(),1),ZVe=.3;function XVe({scope:e,...t}){return(0,tn.jsx)(Tl.Slot,{name:`ComplementaryArea/${e}`,...t})}var ile=280,QVe={open:{width:ile},closed:{width:0},mobileOpen:{width:"100vw"}};function JVe({activeArea:e,isActive:t,scope:r,children:o,className:n,id:i}){let s=(0,Gp.useReducedMotion)(),l=(0,Gp.useViewportMatch)("medium","<"),c=(0,Gp.usePrevious)(e),u=(0,Gp.usePrevious)(t),[,d]=(0,ju.useState)({});(0,ju.useEffect)(()=>{d({})},[t]);let f={type:"tween",duration:s||l||c&&e&&e!==c?0:ZVe,ease:[.6,0,.4,1]};return(0,tn.jsx)(Tl.Fill,{name:`ComplementaryArea/${r}`,children:(0,tn.jsx)(Tl.__unstableAnimatePresence,{initial:!1,children:(u||t)&&(0,tn.jsx)(Tl.__unstableMotion.div,{variants:QVe,initial:"closed",animate:l?"mobileOpen":"open",exit:"closed",transition:f,className:"interface-complementary-area__fill",children:(0,tn.jsx)("div",{id:i,className:n,style:{width:l?"100vw":ile},children:o})})})})}function $Ve(e,t,r,o,n){let i=(0,ju.useRef)(!1),s=(0,ju.useRef)(!1),{enableComplementaryArea:l,disableComplementaryArea:c}=(0,lC.useDispatch)(Le);(0,ju.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 sle({children:e,className:t,closeLabel:r=(0,$I.__)("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,nle.usePluginContext)(),v=s||g.icon,y=o||`${g.name}/${d}`,[b,w]=(0,ju.useState)(!1),{isLoading:S,isActive:x,isPinned:_,activeArea:P,isSmall:I,isLarge:A,showIconLabels:k}=(0,lC.useSelect)(N=>{let{getActiveComplementaryArea:z,isComplementaryAreaLoading:O,isItemPinned:F}=N(Le),{get:L}=N(ole.store),H=z(u);return{isLoading:O(u),isActive:H===y,isPinned:F(u,y),activeArea:H,isSmall:N(wj.store).isViewportMatch("< medium"),isLarge:N(wj.store).isViewportMatch("large"),showIconLabels:L("core","showIconLabels")}},[y,u]),D=(0,Gp.useViewportMatch)("medium","<");$Ve(u,y,P,x,I);let{enableComplementaryArea:E,disableComplementaryArea:C,pinItem:M,unpinItem:B}=(0,lC.useDispatch)(Le);if((0,ju.useEffect)(()=>{h&&P===void 0&&!I?E(u,y):P===void 0&&I&&C(u,y),w(!0)},[P,h,u,y,I,E,C]),!!b)return(0,tn.jsxs)(tn.Fragment,{children:[l&&(0,tn.jsx)(Wp,{scope:u,children:_&&(0,tn.jsx)(Y0,{scope:u,identifier:y,isPressed:x&&(!k||A),"aria-expanded":x,"aria-disabled":S,label:f,icon:k?Qn:v,showTooltip:!k,variant:k?"tertiary":void 0,size:"compact",shortcut:m})}),d&&l&&(0,tn.jsx)(Up,{target:d,scope:u,icon:v,identifier:y,children:f}),(0,tn.jsxs)(JVe,{activeArea:P,isActive:x,className:Z("interface-complementary-area",t),scope:u,id:y.replace("/",":"),children:[(0,tn.jsx)(Jae,{className:i,closeLabel:r,onClose:()=>C(u),toggleButtonProps:{label:r,size:"compact",shortcut:m,scope:u,identifier:y},children:n||(0,tn.jsxs)(tn.Fragment,{children:[(0,tn.jsx)("h2",{className:"interface-complementary-area-header__title",children:f}),l&&!D&&(0,tn.jsx)(Tl.Button,{className:"interface-complementary-area__pin-unpin-item",icon:_?oL:tL,label:_?(0,$I.__)("Unpin from toolbar"):(0,$I.__)("Pin to toolbar"),onClick:()=>(_?B:M)(u,y),isPressed:_,"aria-expanded":_,size:"compact"})]})}),(0,tn.jsx)(Tl.Panel,{className:c,children:e})]})]})}sle.Slot=XVe;var El=sle;var Sj=a(U(),1),e8e=({isActive:e})=>((0,Sj.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,Sj.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),ale=e8e;var lle=a(U(),1),cle=a(T(),1),ule=(0,lle.forwardRef)(({children:e,className:t,ariaLabel:r,as:o="div",...n},i)=>(0,cle.jsx)(o,{ref:i,className:Z("admin-ui-navigable-region",t),"aria-label":r,role:"region",tabIndex:"-1",...n,children:e}));ule.displayName="NavigableRegion";var Yp=ule;var eO=a(U(),1),Tv=a(W(),1),qp=a(j(),1),q0=a(_e(),1),Ss=a(T(),1),fle=.25,dle={type:"tween",duration:fle,ease:[.6,0,.4,1]};function t8e(e){(0,eO.useEffect)(()=>{let t=document&&document.querySelector(`html:not(.${e})`);if(t)return t.classList.toggle(e),()=>{t.classList.toggle(e)}},[e])}var r8e={hidden:{opacity:1,marginTop:-60},visible:{opacity:1,marginTop:0},distractionFreeHover:{opacity:1,marginTop:0,transition:{...dle,delay:.2,delayChildren:.2}},distractionFreeHidden:{opacity:0,marginTop:-60},distractionFreeDisabled:{opacity:0,marginTop:0,transition:{...dle,delay:.8,delayChildren:.8}}};function o8e({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,q0.useResizeObserver)(),h=(0,q0.useViewportMatch)("medium","<"),v={type:"tween",duration:(0,q0.useReducedMotion)()?0:fle,ease:[.6,0,.4,1]};t8e("interface-interface-skeleton__html-container");let b={...{header:(0,qp._x)("Header","header landmark area"),body:(0,qp.__)("Content"),secondarySidebar:(0,qp.__)("Block Library"),sidebar:(0,qp._x)("Settings","settings landmark area"),actions:(0,qp.__)("Publish"),footer:(0,qp.__)("Footer")},...c};return(0,Ss.jsxs)("div",{ref:d,className:Z(u,"interface-interface-skeleton",!!t&&"has-footer"),children:[(0,Ss.jsxs)("div",{className:"interface-interface-skeleton__editor",children:[(0,Ss.jsx)(Tv.__unstableAnimatePresence,{initial:!1,children:!!r&&(0,Ss.jsx)(Yp,{as:Tv.__unstableMotion.div,className:"interface-interface-skeleton__header",ariaLabel:b.header,initial:e&&!h?"distractionFreeHidden":"hidden",whileHover:e&&!h?"distractionFreeHover":"visible",animate:e&&!h?"distractionFreeDisabled":"visible",exit:e&&!h?"distractionFreeHidden":"hidden",variants:r8e,transition:v,children:r})}),e&&(0,Ss.jsx)("div",{className:"interface-interface-skeleton__header",children:o}),(0,Ss.jsxs)("div",{className:"interface-interface-skeleton__body",children:[(0,Ss.jsx)(Tv.__unstableAnimatePresence,{initial:!1,children:!!i&&(0,Ss.jsx)(Yp,{className:"interface-interface-skeleton__secondary-sidebar",ariaLabel:b.secondarySidebar,as:Tv.__unstableMotion.div,initial:"closed",animate:"open",exit:"closed",variants:{open:{width:m.width},closed:{width:0}},transition:v,children:(0,Ss.jsxs)(Tv.__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,Ss.jsx)(Yp,{className:"interface-interface-skeleton__content",ariaLabel:b.body,children:s}),!!n&&(0,Ss.jsx)(Yp,{className:"interface-interface-skeleton__sidebar",ariaLabel:b.sidebar,children:n}),!!l&&(0,Ss.jsx)(Yp,{className:"interface-interface-skeleton__actions",ariaLabel:b.actions,children:l})]})]}),!!t&&(0,Ss.jsx)(Yp,{className:"interface-interface-skeleton__footer",ariaLabel:b.footer,children:t})]})}var Ev=(0,eO.forwardRef)(o8e);var Av=a(U(),1);var zu=a(j(),1),Cf=1,cC=.1,Pl=10,_j=24,ple=.0025,uC=.01,tO=10,dC=45,n8e={x:0,y:0,width:1,height:1},i8e={horizontal:!1,vertical:!1},mle={x:0,y:0},K0={image:null,pan:{...mle},zoom:Cf,rotation:0,basePan:{...mle},baseZoom:Cf,baseRotation:0,flip:{...i8e},cropRect:{...n8e}},fC=-1,mC=[{label:(0,zu.__)("Free"),value:0},{label:(0,zu.__)("Original"),value:fC},{label:(0,zu.__)("Square (1:1)"),value:1},{label:(0,zu.__)("Landscape (16:9)"),value:16/9},{label:(0,zu.__)("Portrait (9:16)"),value:9/16},{label:(0,zu.__)("Classic (4:3)"),value:4/3},{label:(0,zu.__)("Classic portrait (3:4)"),value:3/4},{label:(0,zu.__)("Photo (3:2)"),value:3/2},{label:(0,zu.__)("Photo portrait (2:3)"),value:2/3}];var Hu=1e-6,Uu=typeof Float32Array<"u"?Float32Array:Array,hle=Math.random;function Cj(e){return e>=0?Math.round(e):e%.5===0?Math.floor(e):Math.round(e)}var FFt=Math.PI/180,LFt=180/Math.PI;var Lr={};Sn(Lr,{add:()=>x8e,clone:()=>a8e,copy:()=>l8e,create:()=>s8e,determinant:()=>m8e,equals:()=>E8e,exactEquals:()=>T8e,frob:()=>S8e,fromRotation:()=>v8e,fromScaling:()=>y8e,fromTranslation:()=>b8e,fromValues:()=>u8e,identity:()=>c8e,invert:()=>f8e,mul:()=>P8e,multiply:()=>vle,multiplyScalar:()=>_8e,multiplyScalarAndAdd:()=>C8e,rotate:()=>p8e,scale:()=>h8e,set:()=>d8e,str:()=>w8e,sub:()=>k8e,subtract:()=>yle,translate:()=>g8e});function s8e(){var e=new Uu(6);return Uu!=Float32Array&&(e[1]=0,e[2]=0,e[4]=0,e[5]=0),e[0]=1,e[3]=1,e}function a8e(e){var t=new Uu(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 l8e(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 c8e(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=1,e[4]=0,e[5]=0,e}function u8e(e,t,r,o,n,i){var s=new Uu(6);return s[0]=e,s[1]=t,s[2]=r,s[3]=o,s[4]=n,s[5]=i,s}function d8e(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 f8e(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 m8e(e){return e[0]*e[3]-e[1]*e[2]}function vle(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 p8e(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 h8e(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 g8e(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 v8e(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 y8e(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 b8e(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 w8e(e){return"mat2d("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+", "+e[4]+", "+e[5]+")"}function S8e(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 x8e(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 yle(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 _8e(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 C8e(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 T8e(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 E8e(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)<=Hu*Math.max(1,Math.abs(r),Math.abs(c))&&Math.abs(o-u)<=Hu*Math.max(1,Math.abs(o),Math.abs(u))&&Math.abs(n-d)<=Hu*Math.max(1,Math.abs(n),Math.abs(d))&&Math.abs(i-f)<=Hu*Math.max(1,Math.abs(i),Math.abs(f))&&Math.abs(s-m)<=Hu*Math.max(1,Math.abs(s),Math.abs(m))&&Math.abs(l-h)<=Hu*Math.max(1,Math.abs(l),Math.abs(h))}var P8e=vle,k8e=yle;var kl={};Sn(kl,{add:()=>N8e,angle:()=>$8e,ceil:()=>M8e,clone:()=>R8e,copy:()=>I8e,create:()=>ble,cross:()=>G8e,dist:()=>c7e,distance:()=>_le,div:()=>l7e,divide:()=>xle,dot:()=>W8e,equals:()=>n7e,exactEquals:()=>o7e,floor:()=>D8e,forEach:()=>f7e,fromValues:()=>A8e,inverse:()=>H8e,len:()=>i7e,length:()=>Tle,lerp:()=>Y8e,max:()=>L8e,min:()=>F8e,mul:()=>a7e,multiply:()=>Sle,negate:()=>z8e,normalize:()=>U8e,random:()=>q8e,rotate:()=>J8e,round:()=>B8e,scale:()=>V8e,scaleAndAdd:()=>j8e,set:()=>O8e,signedAngle:()=>e7e,sqrDist:()=>u7e,sqrLen:()=>d7e,squaredDistance:()=>Cle,squaredLength:()=>Ele,str:()=>r7e,sub:()=>s7e,subtract:()=>wle,transformMat2:()=>K8e,transformMat2d:()=>Z8e,transformMat3:()=>X8e,transformMat4:()=>Q8e,zero:()=>t7e});function ble(){var e=new Uu(2);return Uu!=Float32Array&&(e[0]=0,e[1]=0),e}function R8e(e){var t=new Uu(2);return t[0]=e[0],t[1]=e[1],t}function A8e(e,t){var r=new Uu(2);return r[0]=e,r[1]=t,r}function I8e(e,t){return e[0]=t[0],e[1]=t[1],e}function O8e(e,t,r){return e[0]=t,e[1]=r,e}function N8e(e,t,r){return e[0]=t[0]+r[0],e[1]=t[1]+r[1],e}function wle(e,t,r){return e[0]=t[0]-r[0],e[1]=t[1]-r[1],e}function Sle(e,t,r){return e[0]=t[0]*r[0],e[1]=t[1]*r[1],e}function xle(e,t,r){return e[0]=t[0]/r[0],e[1]=t[1]/r[1],e}function M8e(e,t){return e[0]=Math.ceil(t[0]),e[1]=Math.ceil(t[1]),e}function D8e(e,t){return e[0]=Math.floor(t[0]),e[1]=Math.floor(t[1]),e}function F8e(e,t,r){return e[0]=Math.min(t[0],r[0]),e[1]=Math.min(t[1],r[1]),e}function L8e(e,t,r){return e[0]=Math.max(t[0],r[0]),e[1]=Math.max(t[1],r[1]),e}function B8e(e,t){return e[0]=Cj(t[0]),e[1]=Cj(t[1]),e}function V8e(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e}function j8e(e,t,r,o){return e[0]=t[0]+r[0]*o,e[1]=t[1]+r[1]*o,e}function _le(e,t){var r=t[0]-e[0],o=t[1]-e[1];return Math.sqrt(r*r+o*o)}function Cle(e,t){var r=t[0]-e[0],o=t[1]-e[1];return r*r+o*o}function Tle(e){var t=e[0],r=e[1];return Math.sqrt(t*t+r*r)}function Ele(e){var t=e[0],r=e[1];return t*t+r*r}function z8e(e,t){return e[0]=-t[0],e[1]=-t[1],e}function H8e(e,t){return e[0]=1/t[0],e[1]=1/t[1],e}function U8e(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 W8e(e,t){return e[0]*t[0]+e[1]*t[1]}function G8e(e,t,r){var o=t[0]*r[1]-t[1]*r[0];return e[0]=e[1]=0,e[2]=o,e}function Y8e(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 q8e(e,t){t=t===void 0?1:t;var r=hle()*2*Math.PI;return e[0]=Math.cos(r)*t,e[1]=Math.sin(r)*t,e}function K8e(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 Z8e(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 X8e(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 Q8e(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 J8e(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 $8e(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 e7e(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 t7e(e){return e[0]=0,e[1]=0,e}function r7e(e){return"vec2("+e[0]+", "+e[1]+")"}function o7e(e,t){return e[0]===t[0]&&e[1]===t[1]}function n7e(e,t){var r=e[0],o=e[1],n=t[0],i=t[1];return Math.abs(r-n)<=Hu*Math.max(1,Math.abs(r),Math.abs(n))&&Math.abs(o-i)<=Hu*Math.max(1,Math.abs(o),Math.abs(i))}var i7e=Tle,s7e=wle,a7e=Sle,l7e=xle,c7e=_le,u7e=Cle,d7e=Ele,f7e=(function(){var e=ble();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 rO(e){return e>=0?e%360:(360+e%360)%360}function xc(e){return e*Math.PI/180}var oO=1e6;function Dn(e,t){return!Number.isFinite(e)||Math.abs(e)>oO?t:e}function nO(e){return Number.isFinite(e)&&Math.abs(e)<=oO}function Di(e){return Number.isFinite(e.width)&&Number.isFinite(e.height)&&e.width>=Number.EPSILON&&e.height>=Number.EPSILON&&e.width<=oO&&e.height<=oO}function iO(e){let t=Dn(e.x,0),r=Dn(e.y,0),o=Dn(e.width,0),n=Dn(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 _c(e){let t=Dn(e.pan.x,0),r=Dn(e.pan.y,0),o=Dn(e.basePan.x,0),n=Dn(e.basePan.y,0),i=Dn(e.rotation,0),s=Dn(e.baseRotation,0),l=Dn(e.zoom,1),c=l>=Number.EPSILON?l:1,u=Dn(e.baseZoom,1),d=u>=Number.EPSILON?u:1,f=iO(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 WFt=Lr.create(),GFt=kl.create();function Fi(e,t,r){if(!nO(e)||!nO(t)||!nO(r)||e<=0||t<=0)return{width:0,height:0};let o=xc(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 Ple(e,t,r){if(!Di(e)||!Di(t))return{elementSize:{width:0,height:0},visualSize:{width:0,height:0}};let o=Dn(r,0),n=Math.round(o/90)*90,i=Fi(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=Fi(l,c,n);return{elementSize:{width:l,height:c},visualSize:u}}function Z0(e,t,r){let o=Lr.create();if(!Di(t)||!Di(r))return o;let n=_c(e),i=Math.round(n.rotation/90)*90,s=Fi(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}=Fi(c,u,i);return Lr.translate(o,o,[t.width/2,t.height/2]),Lr.translate(o,o,[n.pan.x*d,n.pan.y*f]),Lr.scale(o,o,[n.flip.horizontal?-1:1,n.flip.vertical?-1:1]),Lr.rotate(o,o,xc(n.rotation)),Lr.scale(o,o,[n.zoom,n.zoom]),Lr.translate(o,o,[-c/2,-u/2]),Lr.scale(o,o,[c,u]),o}function m7e(e,t){let r=t.map(l=>{let c=kl.create();return kl.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 sO(e){return m7e(e,[[0,0],[1,0],[1,1],[0,1]])}function kle(e,t,r){let o=Lr.create();if(!Di(t)||!Di(r))return o;let{rotation:n,flip:i,cropRect:s,zoom:l,pan:c}=_c(e),u=Math.round(n/90)*90,{width:d,height:f}=Fi(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,y=s.x*d+r.width/2/g,b=s.y*f+r.height/2/v,w=d/2+c.x*d,S=f/2+c.y*f;return Lr.scale(o,o,[g,v]),Lr.translate(o,o,[w-y+r.width/2/g,S-b+r.height/2/v]),Lr.scale(o,o,[i.horizontal?-1:1,i.vertical?-1:1]),Lr.rotate(o,o,xc(n)),Lr.scale(o,o,[l,l]),Lr.translate(o,o,[-t.width/2,-t.height/2]),o}var Rle=.92;function p7e(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 h7e(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=Fi(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=kle(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 g7e(e,t="image/png",r=Rle){return new Promise((o,n)=>{e.toBlob(i=>{i?o(i):n(new Error("Canvas toBlob returned null."))},t,r)})}async function aO(e,t,r="image/png",o=Rle){let n=await p7e(e),i=h7e(n,t);return g7e(i,r,o)}var Tf=1e-9;function lO(e,t){let r=xc(e),o=Math.abs(Math.cos(r)),n=Math.abs(Math.sin(r)),i=Fi(t,1,e);return{visualW:i.width,visualH:i.height,absC:o,absS:n}}function Nle(e,t,r){let o=Math.max(t,Number.EPSILON),n=Math.round(e/90)*90,{visualW:i,visualH:s}=lO(n,o),{absC:l,absS:c}=lO(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 X0(e){if(!e.image)return Cf;let t={width:e.image.naturalWidth,height:e.image.naturalHeight};if(!Di(t))return Cf;let r=_c(e),o=t.width/t.height;return Math.max(cC,Nle(r.rotation,o,r.cropRect))}function Mle(e,t,r){if(!Di(t)||!Di(r))return{minX:0,minY:0,maxX:1,maxY:1};let o=_c(e),n=o.pan.x*r.width,i=o.pan.y*r.height,s=xc(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,y=t.width/2,b=t.height/2,w=[[-y,-b],[y,-b],[y,b],[-y,b]],S=1/0,x=-1/0,_=1/0,P=-1/0;for(let[I,A]of w){let k=m*I+g*A+n,D=h*I+v*A+i,E=k/r.width+.5,C=D/r.height+.5;S=Math.min(S,E),x=Math.max(x,E),_=Math.min(_,C),P=Math.max(P,C)}return{minX:S,minY:_,maxX:x,maxY:P}}function Dle(e,t,r,o){let n=iO(e),i=Dn(t,1),s=i>=Number.EPSILON?i:1,l=Dn(r,0),c=Dn(o,1),u=Math.max(c,Number.EPSILON),d=Math.round(l/90)*90,{visualW:f,visualH:m}=lO(d,u),{absC:h,absS:g}=lO(l,u),v=n.width,y=n.height,b=v*f,w=y*m,S=b*h+w*g,x=b*g+w*h,_=u*s,P=s,I=1;if(S>0&&(I=Math.min(I,_/S)),x>0&&(I=Math.min(I,P/x)),I>=1-Tf)return n;let A=v*I,k=y*I,D=n.x+v/2,E=n.y+y/2,C=D-A/2,M=E-k/2;return C=Math.max(0,Math.min(C,1-A)),M=Math.max(0,Math.min(M,1-k)),{x:C,y:M,width:A,height:k}}var Ale={width:1e3,height:1e3},Ile=Lr.create(),Ole=kl.create();function xs(e,t,r){let o=_c(e),n=iO(r),i=Di(t)?t.width/t.height:1,s=Math.max(cC,Nle(o.rotation,i,n)),l=Math.min(Pl,Math.max(o.zoom,s)),c={...o,zoom:l},u=Z0(c,Ale,t),d=Math.round(o.rotation/90)*90,f=Z0({...c,pan:{x:0,y:0},zoom:1,rotation:d},Ale,t),m=sO(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]];Lr.invert(Ile,u);let g=1/0,v=-1/0,y=1/0,b=-1/0;for(let A of h){kl.transformMat2d(Ole,A,Ile);let k=Ole;k[0]<g&&(g=k[0]),k[0]>v&&(v=k[0]),k[1]<y&&(y=k[1]),k[1]>b&&(b=k[1])}if(g>=-Tf&&v<=1+Tf&&y>=-Tf&&b<=1+Tf)return{pan:o.pan,zoom:l};let w=0,S=0;g<0&&v<=1+Tf?w=-g:v>1&&g>=-Tf?w=1-v:g<0&&v>1&&(w=(1-v-g)/2),y<0&&b<=1+Tf?S=-y:b>1&&y>=-Tf?S=1-b:y<0&&b>1&&(S=(1-b-y)/2);let x=u[0]*w+u[2]*S,_=u[1]*w+u[3]*S,P=o.pan.x-(m.width>0?x/m.width:0),I=o.pan.y-(m.height>0?_/m.height:0);return{pan:{x:P,y:I},zoom:l}}var v7e=1e-6;function Kp(e,t){return Math.abs(e-t)<v7e}function Q0(e,t){let r=e.image,o=t.image;return r?.src===o?.src&&r?.naturalWidth===o?.naturalWidth&&r?.naturalHeight===o?.naturalHeight&&Kp(e.pan.x,t.pan.x)&&Kp(e.pan.y,t.pan.y)&&Kp(e.zoom,t.zoom)&&Kp(e.rotation,t.rotation)&&e.flip.horizontal===t.flip.horizontal&&e.flip.vertical===t.flip.vertical&&Kp(e.cropRect.x,t.cropRect.x)&&Kp(e.cropRect.y,t.cropRect.y)&&Kp(e.cropRect.width,t.cropRect.width)&&Kp(e.cropRect.height,t.cropRect.height)}function Fle(e,t){return e.image?Math.min(Pl,Math.max(cC,t)):Math.min(Pl,Math.max(Cf,t))}function y7e(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:rO(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 ra(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}=xs(e,t,e.cropRect),i=Dle(e.cropRect,n,e.rotation,r),s=o;return i!==e.cropRect&&({pan:s}=xs({...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 Ef(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 Pv(e,t){switch(t.type){case"SET_IMAGE":return Ef(ra({...e,image:t.payload}));case"SET_PAN":return Ef(ra({...e,pan:t.payload}));case"SET_ZOOM":{let r=Fle(e,t.payload);return Ef(ra({...e,zoom:r}))}case"SET_ZOOM_AT_POINT":{let r=Fle(e,t.payload.zoom);return Ef(ra({...e,zoom:r,pan:t.payload.pan}))}case"SET_ROTATION":{let r=rO(t.payload),o=e.flip.horizontal!==e.flip.vertical,n=xc(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 ra({...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=rO(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 Ef(ra({...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 Ef(ra({...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 Ef(ra({...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?Pl/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 Ef(ra({...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 Pv(e,y7e(e,t.payload));case"RESET":return Ef(ra({...K0,image:e.image,...t.payload}))}}function Lle(e,t){let r=Math.min(Pl,Math.max(X0(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}=xs({...e,zoom:r,pan:{x:l,y:c}},u,e.cropRect);return{type:"SET_ZOOM_AT_POINT",payload:{zoom:r,pan:d}}}function cO(e,t){return{setPan:r=>e({type:"SET_PAN",payload:r}),setZoom:r=>{let o=Lle(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 dt=a(U(),1),kj=a(j(),1);function kv(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}}var Br=a(U(),1);var Ble=300,b7e=30,w7e=200;function Pf(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 Vle=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??Cf}get maxZoom(){return this.options.maxZoom??Pl}get zoomSpeed(){return this.options.zoomSpeed??ple}get keyboardStep(){return this.options.keyboardStep??uC}getKeyboardStep(e){return e.shiftKey?this.keyboardStep*tO: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)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:y}=xs({...d,pan:{x:c.startPanX+g,y:c.startPanY+v}},Pf(d),d.cropRect);this.options.actions.setPan(y)})},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?.()},Ble);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:y}=xs({...t,zoom:o,pan:{x:g,y:v}},Pf(t),t.cropRect);this.options.actions.setZoomAtPoint(o,y)}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&&(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,y=d.width>0?(m-g)/d.width:0,b=d.height>0?(h-v)/d.height:0,w=r.zoom!==0?1-u/r.zoom:0,S=m/d.width,x=h/d.height,_=r.pan.x+(S-r.pan.x)*w,P=r.pan.y+(x-r.pan.y)*w,I=t.startPanX+y+(_-r.pan.x),A=t.startPanY+b+(P-r.pan.y),{pan:k}=xs({...r,zoom:u,pan:{x:I,y:A}},Pf(r),r.cropRect);this.options.actions.setZoomAtPoint(u,k)}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}=xs({...r,pan:{x:t.startPanX+s,y:t.startPanY+l}},Pf(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<Ble&&l<b7e))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})},w7e),this.options.onGestureStart?.(),h.width>0&&h.height>0){let g=t-o.left-d.width/2,v=r-o.top-d.height/2,y=1-m/u.zoom,b=g/h.width,w=v/h.height,S=u.pan.x+(b-u.pan.x)*y,x=u.pan.y+(w-u.pan.y)*y,{pan:_}=xs({...u,zoom:m,pan:{x:S,y:x}},Pf(u),u.cropRect);this.options.actions.setZoomAtPoint(m,_)}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}=xs({...t,pan:{x:t.pan.x,y:t.pan.y+r}},Pf(t),t.cropRect);this.options.actions.setPan(o);break}case"ArrowDown":{e.preventDefault();let r=this.getKeyboardStep(e),{pan:o}=xs({...t,pan:{x:t.pan.x,y:t.pan.y-r}},Pf(t),t.cropRect);this.options.actions.setPan(o);break}case"ArrowLeft":{e.preventDefault();let r=this.getKeyboardStep(e),{pan:o}=xs({...t,pan:{x:t.pan.x+r,y:t.pan.y}},Pf(t),t.cropRect);this.options.actions.setPan(o);break}case"ArrowRight":{e.preventDefault();let r=this.getKeyboardStep(e),{pan:o}=xs({...t,pan:{x:t.pan.x-r,y:t.pan.y}},Pf(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 S7e=300;function x7e(e){switch(e.key){case"ArrowUp":case"ArrowDown":case"ArrowLeft":case"ArrowRight":return!0;default:return!1}}function _7e(e){switch(e.key){case"+":case"=":case"-":case"_":return!0;default:return!1}}function jle(e,t,r,o,n){let[i,s]=(0,Br.useState)(!1),[l,c]=(0,Br.useState)(!1),[u,d]=(0,Br.useState)(!1),[f,m]=(0,Br.useState)(!1),h=(0,Br.useRef)(),g=(0,Br.useRef)(!1),v=(0,Br.useRef)(e);v.current=e;let y=(0,Br.useRef)(r);y.current=r;let b=(0,Br.useRef)(o);b.current=o;let w=(0,Br.useRef)(n);w.current=n;let S=(0,Br.useRef)(t);S.current=t;let x=(0,Br.useRef)(null),_=(0,Br.useCallback)(()=>{d(!0)},[]),P=(0,Br.useCallback)(()=>{d(!1)},[]),I=(0,Br.useCallback)(()=>{g.current||(g.current=!0,w.current?.onGestureStart?.()),clearTimeout(h.current),h.current=setTimeout(()=>{g.current=!1,m(!1),w.current?.onGestureEnd?.()},S7e)},[]);(0,Br.useEffect)(()=>()=>{clearTimeout(h.current)},[]),(0,Br.useEffect)(()=>{let C=new Vle({getState:()=>v.current,actions:{setPan:M=>S.current.setPan(M),setZoom:M=>S.current.setZoom(M),setZoomAtPoint:(M,B)=>S.current.setZoomAtPoint(M,B),snapRotate90:M=>S.current.snapRotate90(M),toggleFlip:M=>S.current.toggleFlip?.(M)},getContainerSize:()=>y.current,getImageSize:()=>b.current,get minZoom(){return w.current?.minZoom},get maxZoom(){return w.current?.maxZoom},get zoomSpeed(){return w.current?.zoomSpeed},get keyboardStep(){return w.current?.keyboardStep},get doubleTapZoom(){return w.current?.doubleTapZoom},onGestureStart:()=>{_(),w.current?.onGestureStart?.()},onGestureEnd:()=>{P(),w.current?.onGestureEnd?.()},onStatusChange:M=>{s(M.isDragging),c(M.isZooming)}});return x.current=C,()=>{C.destroy(),x.current=null}},[_,P]);let A=(0,Br.useCallback)(C=>{let M=C.currentTarget;x.current?.handlePointerDown(C.nativeEvent,M)},[]),k=(0,Br.useCallback)(C=>{let M=C.currentTarget,B=M.getBoundingClientRect();x.current?.handleTouchStart(C.nativeEvent,B,M.ownerDocument)},[]),D=(0,Br.useCallback)(C=>{x7e(C.nativeEvent)?(m(!0),I()):_7e(C.nativeEvent)&&I(),x.current?.handleKeyDown(C.nativeEvent)},[I]),E=(0,Br.useCallback)(C=>{x.current?.handleWheel(C)},[]);return{handlers:{onPointerDown:A,onTouchStart:k,onKeyDown:D},onWheelNative:E,isDragging:i,isZooming:l,isPlacementActive:u||f||l}}var Hle=a(U(),1);var C7e="matrix(1, 0, 0, 1, 0, 0)";function zle(e,t){if(!Di(t))return C7e;let r=_c(e),o=r.pan.x*t.width,n=r.pan.y*t.height,i=xc(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 Ule(e,t){return(0,Hle.useMemo)(()=>zle(e,t),[e,t])}var Cc=a(U(),1),Rl=a(j(),1),T7e=300;function Wle(e){let{horizontal:t,vertical:r}=e.flip;return t&&r?(0,Rl.__)("Flipped horizontally and vertically"):t?(0,Rl.__)("Flipped horizontally"):r?(0,Rl.__)("Flipped vertically"):(0,Rl.__)("Flip removed")}function E7e(e,t){if(t&&(t.flip.horizontal!==e.flip.horizontal||t.flip.vertical!==e.flip.vertical))return Wle(e);let r=[];r.push((0,Rl.sprintf)((0,Rl.__)("Zoom %d%%"),Math.round(e.zoom*100))),e.rotation!==0&&r.push((0,Rl.sprintf)((0,Rl.__)("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,Rl.sprintf)((0,Rl.__)("Crop %1$d%% by %2$d%%"),o,n)),(e.flip.horizontal||e.flip.vertical)&&r.push(Wle(e)),r.join(", ")}function Gle(e){let[t,r]=(0,Cc.useState)(""),o=(0,Cc.useRef)(),n=(0,Cc.useRef)(""),i=(0,Cc.useRef)(null),s=(0,Cc.useRef)(e);return(0,Cc.useLayoutEffect)(()=>{s.current=e},[e]),(0,Cc.useEffect)(()=>(clearTimeout(o.current),o.current=setTimeout(()=>{let l=s.current,c=E7e(l,i.current);i.current=l,c!==n.current&&(n.current=c,r(c))},T7e),()=>{clearTimeout(o.current)}),[e.zoom,e.rotation,e.cropRect.width,e.cropRect.height,e.flip.horizontal,e.flip.vertical]),t}var si=a(U(),1),Wu=a(j(),1);var Tj={width:.05,height:.05};function dO(e,t,r,o,n,i=Tj){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 Ej(e,t,r,o,n,i,s=Tj){if(i<=0||o.width<=0||o.height<=0)return{...e.startRect};let l=(t-e.startX)/o.width,c=(r-e.startY)/o.height,u=e.startRect,d=e.handle,f=d==="nw"||d==="sw"?u.x+u.width:u.x,m=d==="nw"||d==="ne"?u.y+u.height:u.y,h=d==="nw"||d==="sw"?-1:1,g=d==="nw"||d==="ne"?-1:1,v=(d==="nw"||d==="sw"?u.x:u.x+u.width)+l,y=(d==="nw"||d==="ne"?u.y:u.y+u.height)+c,b=(v-f)*h,w=(y-m)*g,S=Math.max(s.width,s.height*i),x=S/i;b=Math.max(b,S),w=Math.max(w,x);let _=b*o.width,P=w*o.height,I=i*o.width/o.height;_/P>I?w=b/i:b=w*i;let A=h>0?n.maxX-f:f-n.minX,k=g>0?n.maxY-m:m-n.minY;b>A&&(b=A,w=b/i),w>k&&(w=k,b=w*i),b=Math.max(b,S),w=Math.max(w,x);let D=h>0?f:f-b,E=g>0?m:m-w;return{x:D,y:E,width:b,height:w}}function Yle(e,t,r,o,n,i=Tj){let s=e.startRect,l=s.width*o.width;if(s.height*o.height<=0||l<=0)return dO(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 Ej(e,t,r,o,n,u,i);let f=dO(e,t,r,o,n,i);if(d==="n"||d==="s"){let w=f.height,S=w*u,x=s.x+s.width/2,_=Math.min(x-n.minX,n.maxX-x)*2;S>_&&(S=_,w=S/u);let P=Math.max(i.height,i.width/u);w<P&&(w=P,S=w*u);let I=d==="n"?s.y+s.height-w:s.y;return{x:x-S/2,y:I,width:S,height:w}}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 y=Math.max(i.width,i.height*u);return m<y&&(m=y,h=m/u),{x:d==="w"?s.x+s.width-m:s.x,y:g-h/2,width:m,height:h}}var pC={position:"absolute",width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",border:0};var J0=a(T(),1),P7e=["nw","ne","se","sw"],k7e=["nw","n","ne","e","se","s","sw","w"];function R7e(e){switch(e){case"n":return(0,Wu.__)("Resize top edge");case"s":return(0,Wu.__)("Resize bottom edge");case"e":return(0,Wu.__)("Resize right edge");case"w":return(0,Wu.__)("Resize left edge");case"nw":return(0,Wu.__)("Resize top-left corner");case"ne":return(0,Wu.__)("Resize top-right corner");case"sw":return(0,Wu.__)("Resize bottom-left corner");case"se":return(0,Wu.__)("Resize bottom-right corner")}}var A7e=500;function qle({cropRect:e,containerSize:t,imageSize:r,onCropChange:o,onResizeStart:n,onResizeEnd:i,aspectRatio:s,freeformCrop:l=!1,stencilTransition:c,cropBounds:u,onEscape:d,minCropSize:f}){let m=u?.minX??0,h=u?.minY??0,g=u?.maxX??1,v=u?.maxY??1,y=(0,si.useMemo)(()=>({minX:m,minY:h,maxX:g,maxY:v}),[m,h,g,v]),b=(0,si.useRef)(),w=(0,si.useRef)(!1),S=(0,si.useId)(),x=!!(s&&s>0);(0,si.useEffect)(()=>()=>{clearTimeout(b.current),w.current=!1},[]);let _=(0,si.useRef)(null),P=(0,si.useMemo)(()=>!x||r.width===0?0:s*r.height/r.width,[s,x,r.width,r.height]),I=(t.width-r.width)/2,A=(t.height-r.height)/2,k=I+e.x*r.width,D=A+e.y*r.height,E=e.width*r.width,C=e.height*r.height,M=(0,si.useCallback)((L,H)=>{if(H.button!==0)return;H.preventDefault(),H.stopPropagation();let q=H.currentTarget.ownerDocument;q.activeElement instanceof HTMLElement&&q.activeElement.blur();let Q=H.currentTarget;Q.setPointerCapture(H.pointerId);let J={handle:L,startX:H.clientX,startY:H.clientY,startRect:{...e}},te=0,se=H.clientX,$=H.clientY,X=H.shiftKey,oe=Ce=>{let Ge=Ce;se=Ge.clientX,$=Ge.clientY,X=Ge.shiftKey,!te&&(te=requestAnimationFrame(()=>{te=0;let He=_.current;if(!He)return;let ge;He.hasLockedRatio?ge=He.computeLockedRect(J,se,$):X?ge=He.computeShiftLockedRect(J,se,$):ge=He.computeFreeRect(J,se,$),He.onCropChange(ge)}))},pe=!1,be=()=>{pe||(pe=!0,te&&(cancelAnimationFrame(te),te=0),Q.removeEventListener("pointermove",oe),Q.removeEventListener("pointerup",be),Q.removeEventListener("lostpointercapture",be),_.current?.onResizeEnd?.(),Q.focus({preventScroll:!0}))};Q.addEventListener("pointermove",oe),Q.addEventListener("pointerup",be),Q.addEventListener("lostpointercapture",be),n?.(L),clearTimeout(b.current),w.current=!1},[e,n]),B=(0,si.useCallback)((L,H,q)=>dO(L,H,q,r,y,f),[r,y,f]),N=(0,si.useCallback)((L,H,q)=>Ej(L,H,q,r,y,P,f),[r,y,P,f]),z=(0,si.useCallback)((L,H,q)=>Yle(L,H,q,r,y,f),[r,y,f]);_.current={hasLockedRatio:x,computeLockedRect:N,computeFreeRect:B,computeShiftLockedRect:z,onCropChange:o,onResizeEnd:i};let O=(0,si.useCallback)((L,H)=>{let q=H.key;if(q==="Escape"){H.preventDefault(),H.stopPropagation(),d?.();return}if(q!=="ArrowUp"&&q!=="ArrowDown"&&q!=="ArrowLeft"&&q!=="ArrowRight")return;H.preventDefault(),H.stopPropagation(),w.current||(w.current=!0,n?.(L));let Q=()=>{clearTimeout(b.current),b.current=setTimeout(()=>{w.current=!1,i?.()},A7e)},J=H.shiftKey?uC*tO:uC,te=0,se=0;if(q==="ArrowLeft"&&(te=-J),q==="ArrowRight"&&(te=J),q==="ArrowUp"&&(se=-J),q==="ArrowDown"&&(se=J),x){let $={handle:L,startX:0,startY:0,startRect:{...e}},X=te*r.width,oe=se*r.height;o(N($,X,oe)),Q()}else{let $={handle:L,startX:0,startY:0,startRect:{...e}},X=te*r.width,oe=se*r.height;o(B($,X,oe)),Q()}},[e,x,r.width,r.height,N,B,o,n,i,d]);if(t.width===0||t.height===0)return null;let F=x?P7e:k7e;return(0,J0.jsxs)("div",{className:"wp-media-editor-image-editor__stencil",style:{left:k,top:D,width:E,height:C,transition:c},children:[l&&(0,J0.jsx)("div",{id:S,style:pC,children:(0,Wu.__)("Use arrow keys to resize the crop area. Hold Shift for larger steps.")}),(0,J0.jsx)("div",{className:"wp-media-editor-image-editor__stencil-rect",style:{width:"100%",height:"100%",top:0,left:0}}),l&&F.map(L=>(0,J0.jsx)("button",{type:"button",className:`wp-media-editor-image-editor__handle wp-media-editor-image-editor__handle--${L}`,onPointerDown:H=>M(L,H),onTouchStart:H=>H.stopPropagation(),onKeyDown:H=>O(L,H),"aria-label":R7e(L),"aria-describedby":S},L))]})}var Kle=a(T(),1);function Zle({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,Kle.jsx)("div",{className:"wp-media-editor-image-editor__dimming",style:{left:s,top:l,width:c,height:u,transition:d}})}var Rv=a(T(),1);function Xle({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,Rv.jsxs)("div",{className:"wp-media-editor-image-editor__grid","data-testid":"cropper-grid",style:{left:i,top:s,width:l,height:c},children:[(0,Rv.jsx)("div",{className:"wp-media-editor-image-editor__grid-line wp-media-editor-image-editor__grid-line--horizontal",style:{top:d}}),(0,Rv.jsx)("div",{className:"wp-media-editor-image-editor__grid-line wp-media-editor-image-editor__grid-line--horizontal",style:{top:d*2}}),(0,Rv.jsx)("div",{className:"wp-media-editor-image-editor__grid-line wp-media-editor-image-editor__grid-line--vertical",style:{left:u}}),(0,Rv.jsx)("div",{className:"wp-media-editor-image-editor__grid-line wp-media-editor-image-editor__grid-line--vertical",style:{left:u*2}})]})}var $0=a(U(),1),tce=a(T(),1),fO=12,Qle={before:"-100%",center:"-50%",after:"0"},Jle={before:-1,center:0,after:1},I7e={before:"after",center:"center",after:"before"};function O7e(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 $le(e,t,r){return e==="before"?t-fO-r:e==="after"?t+fO:t-r/2}function ece(e,t,r,o){let n=c=>{let u=$le(c,t,r);return u>=0&&u+r<=o};if(n(e))return e;let i=I7e[e];if(i!==e&&n(i))return i;if(e!=="center"&&n("center"))return"center";let s=c=>{let u=$le(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 rce({cropRect:e,containerSize:t,imageSize:r,activeHandle:o,outputWidth:n,outputHeight:i}){let s=(0,$0.useRef)(null),[l,c]=(0,$0.useState)(null);if((0,$0.useLayoutEffect)(()=>{if(!s.current)return;let S=s.current.getBoundingClientRect();c(x=>x&&x.width===S.width&&x.height===S.height?x:{width:S.width,height:S.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 y=m+g/2;o.includes("n")?y=m:o.includes("s")&&(y=m+g);let b=O7e(o),w=l?{x:ece(b.x,v,l.width,t.width),y:ece(b.y,y,l.height,t.height)}:b;return(0,tce.jsx)("div",{ref:s,className:"wp-media-editor-image-editor__dimensions-tooltip","data-testid":"cropper-dimensions-tooltip",style:{left:v+Jle[w.x]*fO,top:y+Jle[w.y]*fO,transform:`translate(${Qle[w.x]}, ${Qle[w.y]})`},"aria-hidden":"true",children:`W: ${Math.round(n)}px H: ${Math.round(i)}px`})}function Pj(e,t){let r=_c(e);if(!Di(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=Z0(r,o,t),i=Lr.create();Lr.invert(i,n);let s=Z0({...r,pan:{x:0,y:0},zoom:1},o,t),l=sO(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=kl.create();kl.transformMat2d(f,[u,d],i);let m=Math.round(r.rotation/90)*90,{width:h,height:g}=Fi(t.width,t.height,m),v=c.width*h/r.zoom,y=c.height*g/r.zoom;return{x:f[0]*t.width-v/2,y:f[1]*t.height-y/2,width:v,height:y,rotation:r.rotation,flip:{...r.flip},zoom:r.zoom}}var mO=a(U(),1);var Zp=a(U(),1);var ew={zoom:1,pan:{x:0,y:0}};function oce(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===ew.zoom&&e.pan.x===ew.pan.x&&e.pan.y===ew.pan.y?e:ew}}function nce(){let[e,t]=(0,Zp.useReducer)(oce,ew),r=(0,Zp.useCallback)(i=>{t({type:"SET_VIEWPORT_ZOOM",payload:i})},[]),o=(0,Zp.useCallback)(i=>{t({type:"SET_VIEWPORT_PAN",payload:i})},[]),n=(0,Zp.useCallback)(()=>{t({type:"RESET_VIEWPORT"})},[]);return(0,Zp.useMemo)(()=>({viewport:e,setViewportZoom:r,setViewportPan:o,resetViewport:n}),[e,r,o,n])}var ice=a(T(),1),sce=(0,mO.createContext)(null);function ace({children:e}){let t=nce();return(0,ice.jsx)(sce.Provider,{value:t,children:e})}function lce(){let e=(0,mO.useContext)(sce);if(!e)throw new Error("useViewport must be used within a ViewportProvider.");return e}var oa=a(T(),1),Xp=1e-6;function N7e({src:e,controller:t,stencil:r=qle,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:y},b){let{state:w,setImage:S,setCropRect:x,settleCrop:_,setVisualSize:P,adjustCropRectForViewport:I}=t,{viewport:A,setViewportPan:k,resetViewport:D}=lce(),E=(0,dt.useRef)(null),C=(0,dt.useId)(),[M,B]=(0,dt.useState)(f),[N,z]=(0,dt.useState)(!1),[O,F]=(0,dt.useState)({width:0,height:0});(0,dt.useLayoutEffect)(()=>{f&&E.current?.focus({preventScroll:!0})},[f]);let L=(0,dt.useCallback)(K=>{let fe=K.target;fe===K.currentTarget&&B(!0),K.relatedTarget!==null&&fe.matches(":focus-visible")&&z(!0)},[]),H=(0,dt.useCallback)(K=>{K.target===K.currentTarget&&B(!1),K.currentTarget.contains(K.relatedTarget)||z(!1)},[]);(0,dt.useEffect)(()=>{let K=E.current;if(!K)return;let fe=new ResizeObserver(V=>{for(let Pe of V){let{width:St,height:xe}=Pe.contentRect;F(Dr=>Dr.width===St&&Dr.height===xe?Dr:{width:St,height:xe})}});return fe.observe(K),()=>{fe.disconnect()}},[]),(0,dt.useEffect)(()=>{h?.(w)},[w,h]);let q=Gle(w),Q=w.image?.naturalWidth??0,J=w.image?.naturalHeight??0,{elementSize:te,visualSize:se}=(0,dt.useMemo)(()=>Ple(O,{width:Q,height:J},w.rotation),[O,Q,J,w.rotation]),$=(0,dt.useMemo)(()=>{if(Q<=0||J<=0)return;let K=Math.round(w.rotation/90)*90,fe=Fi(Q,J,K);return{width:Math.min(1,_j*w.zoom/fe.width),height:Math.min(1,_j*w.zoom/fe.height)}},[Q,J,w.rotation,w.zoom]);(0,dt.useEffect)(()=>{P(se)},[se,P]),(0,dt.useEffect)(()=>{if(d||se.width===0||se.height===0||!u||u<=0)return;let K=kv(u,se),fe=w.cropRect;Math.abs(fe.x-K.x)<Xp&&Math.abs(fe.y-K.y)<Xp&&Math.abs(fe.width-K.width)<Xp&&Math.abs(fe.height-K.height)<Xp||I(K)},[d,u,se,I,w.cropRect]);let X=(0,dt.useRef)(u);(0,dt.useEffect)(()=>{if(X.current===u||(X.current=u,!d||se.width===0||se.height===0||!u||u<=0))return;let K=kv(u,se),fe=w.cropRect;Math.abs(fe.x-K.x)<Xp&&Math.abs(fe.y-K.y)<Xp&&Math.abs(fe.width-K.width)<Xp&&Math.abs(fe.height-K.height)<Xp||I(K)},[u,d,se,I,w.cropRect]);let oe=(0,dt.useMemo)(()=>{if(!(!w.image||te.width===0))return Mle(w,te,se)},[w,te,se]),pe=l!==void 0?l:X0(w),[be,Ce]=(0,dt.useState)(!1),Ge=(0,dt.useRef)(!1),He=(0,dt.useRef)(!1),[ge,ie]=(0,dt.useState)(null),{handlers:ce,onWheelNative:ae,isDragging:ye,isZooming:Ie,isPlacementActive:Oe}=jle(w,t,O,se,{minZoom:pe,maxZoom:c,onGestureStart:g,onGestureEnd:v}),ke={...ce,onPointerDownCapture:()=>{z(!1)},onKeyDownCapture:K=>{["Shift","Control","Alt","Meta"].includes(K.key)||z(!0)},onPointerDown:K=>{ce.onPointerDown?.(K),z(!1)}};(0,dt.useEffect)(()=>{let K=E.current;if(!K)return;let fe=V=>{if(Ge.current||He.current){V.preventDefault();return}ae(V)};return K.addEventListener("wheel",fe,{passive:!1}),()=>{K.removeEventListener("wheel",fe)}},[ae]);let ue=Ule(w,se),re=(0,dt.useCallback)(K=>{let fe=K.currentTarget,V={width:fe.naturalWidth,height:fe.naturalHeight};S({src:e,naturalWidth:V.width,naturalHeight:V.height}),m?.(V)},[e,S,m]),ne=(0,dt.useCallback)(K=>{if(x(K),Ge.current&&se.width>0&&se.height>0){let fe=(O.width-se.width)/2,V=(O.height-se.height)/2,Pe=Math.max(0,fe+(K.x+K.width)*se.width-O.width),St=Math.max(0,-(fe+K.x*se.width)),xe=Math.max(0,V+(K.y+K.height)*se.height-O.height),Dr=Math.max(0,-(V+K.y*se.height));k({x:-Pe+St,y:-xe+Dr})}},[x,k,O,se]),[Te,Qe]=(0,dt.useState)(!1),Pt=(0,dt.useRef)();(0,dt.useEffect)(()=>()=>{clearTimeout(Pt.current)},[]);let ft=o==="interactive",It=ft&&(Oe||be||n),Lt=(0,dt.useMemo)(()=>{if(!s||!ge||!w.image)return null;let K=Pj(w,{width:w.image.naturalWidth,height:w.image.naturalHeight});return{width:K.width,height:K.height}},[s,ge,w]),Cr=(0,dt.useCallback)(()=>{z(!0),E.current?.focus({preventScroll:!0})},[]),kt=(0,dt.useCallback)(K=>{Ge.current=!0,Ce(!0),ie(K??null),clearTimeout(Pt.current),He.current=!1,Qe(!1),D(),g?.()},[g,D]),Ze=(0,dt.useCallback)(()=>{Ge.current=!1,Ce(!1),ie(null),He.current=!0,Qe(!0),D(),_(),v?.(),clearTimeout(Pt.current),Pt.current=setTimeout(()=>{He.current=!1,Qe(!1)},200)},[_,v,D]),vi;Te?vi="transform 200ms ease-out":Ie&&(vi="transform 150ms linear");let Ns=Te?"left 200ms ease-out, top 200ms ease-out, width 200ms ease-out, height 200ms ease-out":void 0,mr=(0,dt.useMemo)(()=>{if(te.width===0||te.height===0)return{};let K=(O.width-te.width)/2,fe=(O.height-te.height)/2;return{width:te.width,height:te.height,maxWidth:te.width,maxHeight:te.height,left:K,top:fe,transform:ue,transition:vi}},[O,te,ue,vi]),tl=Te?"transform 200ms ease-out":void 0,mt=be||Te?"transform":void 0,$t;A.pan.x!==0||A.pan.y!==0?$t={transform:`translate(${A.pan.x}px, ${A.pan.y}px)`,transition:tl,willChange:mt}:Te&&($t={transition:tl,willChange:mt});let dr=(0,dt.useCallback)(K=>{typeof b=="function"?b(K):b&&(b.current=K)},[b]);return(0,oa.jsx)("div",{ref:dr,className:Z("wp-media-editor-image-editor",ye&&"wp-media-editor-image-editor--dragging",y),children:(0,oa.jsxs)("div",{ref:E,className:Z("wp-media-editor-image-editor__canvas",ft&&"wp-media-editor-image-editor__canvas--grid-interactive",It&&"wp-media-editor-image-editor__canvas--show-grid",Te&&"wp-media-editor-image-editor__canvas--settling",N&&"wp-media-editor-image-editor__canvas--focus-visible"),tabIndex:0,role:"group","aria-label":(0,kj.__)("Crop area"),"aria-describedby":M?C:void 0,onFocus:L,onBlur:H,...ke,children:[(0,oa.jsx)("div",{id:C,style:pC,children:(0,kj.__)("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,oa.jsxs)("div",{className:"wp-media-editor-image-editor__stage","data-testid":"cropper-stage",style:$t,children:[(0,oa.jsx)("img",{className:"wp-media-editor-image-editor__image",src:e,alt:"",onLoad:re,style:mr,draggable:!1}),i&&(0,oa.jsx)(Zle,{cropRect:w.cropRect,containerSize:O,imageSize:se,transition:Ns}),(0,oa.jsx)(r,{cropRect:w.cropRect,containerSize:O,imageSize:se,onCropChange:ne,onResizeStart:kt,onResizeEnd:Ze,onEscape:Cr,aspectRatio:u,freeformCrop:d,stencilTransition:Ns,cropBounds:oe,minCropSize:$}),(o===!0||ft)&&(0,oa.jsx)(Xle,{cropRect:w.cropRect,containerSize:O,imageSize:se}),ge&&Lt&&(0,oa.jsx)(rce,{cropRect:w.cropRect,containerSize:O,imageSize:se,activeHandle:ge,outputWidth:Lt.width,outputHeight:Lt.height})]}),(0,oa.jsx)("div",{"aria-live":"polite","aria-atomic":"true",className:"wp-media-editor-image-editor__aria-live",style:pC,children:q})]})})}var M7e=(0,dt.forwardRef)(N7e),pO=(0,dt.forwardRef)((e,t)=>(0,oa.jsx)(ace,{children:(0,oa.jsx)(M7e,{...e,ref:t})}));var Xt=a(U(),1);var hO={aspectRatioValue:"0"};function gO(e,t){switch(t.type){case"CROPPER":{let r=Pv(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=kv(o,n);return{cropper:Pv(e.cropper,{type:"SET_CROP_RECT",payload:l}),cropOptions:s}}case"RESET_CROP_OPTIONS":return e.cropOptions.aspectRatioValue===hO.aspectRatioValue?e:{...e,cropOptions:{...hO}};case"RESTORE_SNAPSHOT":return t.payload;case"VIEWPORT_ADJUST_CROP_RECT":{let r=Pv(e.cropper,{type:"SET_CROP_RECT",payload:t.payload});return r===e.cropper?e:{...e,cropper:r}}}}function hC(e,t){return e===t?!0:Q0(e.cropper,t.cropper)&&e.cropOptions.aspectRatioValue===t.cropOptions.aspectRatioValue}function cce(e,t){return{cropper:e,cropOptions:{...hO,...t}}}function tw(e,t){let r=parseFloat(e);if(!(r===0||Number.isNaN(r))){if(r===fC)return t&&t.naturalWidth>0&&t.naturalHeight>0?t.naturalWidth/t.naturalHeight:void 0;if(r>0)return r}}function F7e(e,t){return e?.src===t?.src&&e?.naturalWidth===t?.naturalWidth&&e?.naturalHeight===t?.naturalHeight}function Rj(e){let[t,r]=(0,Xt.useReducer)(gO,null,()=>cce(ra({...K0,...e?.cropper}),e?.cropOptions)),[o,n]=(0,Xt.useState)(()=>t),i=(0,Xt.useRef)(t),s=(0,Xt.useRef)({width:0,height:0}),l=(0,Xt.useRef)([]),c=(0,Xt.useRef)([]),[u,d]=(0,Xt.useState)(!1),[f,m]=(0,Xt.useState)(!1),h=(0,Xt.useRef)(!1),g=(0,Xt.useRef)(null),v=(0,Xt.useCallback)(O=>{let F=l.current[l.current.length-1];F&&hC(F,O)||(l.current=[...l.current,O],c.current=[],d(!0),m(!1))},[]),y=(0,Xt.useCallback)((O,F=!0)=>{let L=i.current,H=gO(L,O);F&&(hC(L,H)||(h.current?g.current===null&&(g.current=L):v(L))),i.current=H,r(O)},[v]),b=(0,Xt.useCallback)(()=>{h.current||(h.current=!0,g.current=null)},[]),w=(0,Xt.useCallback)(()=>{let O=g.current;O&&!hC(O,i.current)&&v(O),g.current=null,h.current=!1},[v]),S=(0,Xt.useCallback)(O=>{y({type:"CROPPER",action:O})},[y]),x=(0,Xt.useMemo)(()=>cO(S,()=>i.current.cropper),[S]),_=(0,Xt.useCallback)(O=>{if(F7e(i.current.cropper.image,O))return;let F={type:"CROPPER",action:{type:"SET_IMAGE",payload:O}},L=gO(i.current,F);i.current=L,r(F),n(L),h.current=!1,g.current=null,l.current=[],c.current=[],d(!1),m(!1)},[]),P=(0,Xt.useCallback)(O=>{y({type:"CROPPER",action:{type:"RESET",payload:O}})},[y]),I=(0,Xt.useCallback)(O=>{let F=tw(O,i.current.cropper.image);y({type:"SET_ASPECT_RATIO_VALUE",payload:{presetKey:O,resolved:F,visualSize:s.current}})},[y]),A=(0,Xt.useCallback)(()=>{y({type:"RESET_CROP_OPTIONS"})},[y]),k=(0,Xt.useCallback)(()=>{w();let O=l.current[l.current.length-1];O&&(c.current=[i.current,...c.current],l.current=l.current.slice(0,-1),d(l.current.length>0),m(!0),i.current=O,r({type:"RESTORE_SNAPSHOT",payload:O}))},[w]),D=(0,Xt.useCallback)(()=>{w();let O=c.current[0];O&&(l.current=[...l.current,i.current],c.current=c.current.slice(1),d(!0),m(c.current.length>0),i.current=O,r({type:"RESTORE_SNAPSHOT",payload:O}))},[w]),E=(0,Xt.useCallback)(O=>{s.current=O},[]),C=(0,Xt.useCallback)(O=>{y({type:"VIEWPORT_ADJUST_CROP_RECT",payload:O},!1)},[y]),M=!hC(t,o),B=!Q0(t.cropper,o.cropper),N=(0,Xt.useCallback)((O,F)=>t.cropper.image?aO(t.cropper.image.src,t.cropper,O,F):Promise.reject(new Error("No image loaded \u2014 call setImage first.")),[t.cropper]);return(0,Xt.useMemo)(()=>({...x,state:t.cropper,setImage:_,reset:P,isDirty:M,getCroppedImage:N,cropOptions:t.cropOptions,setAspectRatioValue:I,resetCropOptions:A,isCropperDirty:B,hasUndo:u,hasRedo:f,undo:k,redo:D,beginGesture:b,endGesture:w,setVisualSize:E,adjustCropRectForViewport:C}),[x,t.cropper,_,P,M,N,t.cropOptions,I,A,B,u,f,k,D,b,w,E,C])}var vO=a(U(),1);var uce=a(T(),1),dce=(0,vO.createContext)(null);function Aj({initialCropperState:e,initialCropOptions:t,children:r}){let o=Rj({cropper:e,cropOptions:t});return(0,uce.jsx)(dce.Provider,{value:o,children:r})}function Li(){let e=(0,vO.useContext)(dce);if(!e)throw new Error("useMediaEditor must be used within a MediaEditorStateProvider.");return e}var Ij=a(T(),1);function fce({focusOnMount:e,isPlacementActive:t=!1,onGestureStart:r,onGestureEnd:o}){let{media:n}=c0(),i=Li(),{aspectRatioValue:s}=i.cropOptions,l=i.state.image,{beginGesture:c,endGesture:u,setImage:d}=i,f=(0,Av.useMemo)(()=>tw(s,l),[s,l]),m=(0,Av.useCallback)(()=>{c(),r?.()},[c,r]),h=(0,Av.useCallback)(()=>{u(),o?.()},[u,o]),g=n?.source_url,v=Kg(n?.mime_type),y=Number(n?.media_details?.width),b=Number(n?.media_details?.height);return(0,Av.useEffect)(()=>{l||!g||!Number.isFinite(y)||!Number.isFinite(b)||y<=0||b<=0||d({src:g,naturalWidth:y,naturalHeight:b})},[l,g,y,b,d]),!g||v.type!=="image"?null:(0,Ij.jsx)("div",{className:"media-editor-canvas",children:(0,Ij.jsx)(pO,{src:g,controller:i,aspectRatio:f,freeformCrop:!0,focusOnMount:e,showGrid:"interactive",isPlacementActive:t,onGestureStart:m,onGestureEnd:h})})}var vce=a(j(),1);var Tc=a(U(),1);var gC="data-crop-control",L7e=300;function yO(e={}){let{commitOnKeyUp:t=!0}=e,{beginGesture:r,endGesture:o}=Li(),n=(0,Tc.useRef)(),i=(0,Tc.useCallback)(()=>{clearTimeout(n.current)},[]),s=(0,Tc.useCallback)(()=>{i(),n.current=setTimeout(()=>{o()},L7e)},[i,o]);(0,Tc.useEffect)(()=>i,[i]);let l=(0,Tc.useCallback)(()=>{i(),r()},[r,i]),c=(0,Tc.useCallback)(()=>{i(),o()},[i,o]),u=(0,Tc.useCallback)(()=>{r(),t||s()},[r,t,s]),d=(0,Tc.useCallback)(()=>{if(t){o();return}s()},[t,o,s]);return{[gC]:!0,onPointerDownCapture:l,onPointerUp:c,onPointerCancel:c,onKeyDownCapture:u,onKeyUp:d}}var Iv=a(U(),1);var kf=a(U(),1);function B7e(e,t,r){return-e/t*r}function bO(e,t,r){return e<t?t:e>r?r:e}function V7e(e,t){return Math.round(e/t)*t}function mce(e){let{value:t,onChange:r,min:o,max:n,step:i,pixelsPerStep:s,disabled:l,onPointerDownStart:c}=e,u=(0,kf.useRef)({value:t,startX:0,startValue:0,activeStep:i,dragging:!1,captureElement:null,capturePointerId:0,windowPointerUp:null});(0,kf.useEffect)(()=>{u.current.value=t},[t]);let d=(0,kf.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,kf.useEffect)(()=>d,[d]);let f=(0,kf.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,kf.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 y=h.clientX-g.startX,b=B7e(y,s,g.activeStep),w=g.startValue+b,S=V7e(w,g.activeStep),x=bO(S,o,n);x!==g.value&&(g.value=x,r(x))},[r,o,n,i,s]);return{onPointerDown:f,onPointerMove:m,onPointerUp:d,onPointerCancel:d}}var za=a(T(),1),wO=32,j7e=11,pce=15,z7e=4,H7e=8,U7e=14;function W7e(e,t){return(0,Iv.useMemo)(()=>{let r=[];for(let o=Math.ceil(e);o<=Math.floor(t);o+=1){let n="minor",i=z7e;o%15===0?(n="major",i=U7e):o%5===0&&(n="mid",i=H7e),r.push({value:o,kind:n,height:i})}return r},[e,t])}function hce(e){let t=Math.round(e*10)/10;return Number.isInteger(t)?t.toFixed(0):t.toFixed(1)}function gce(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,Iv.useRef)(null),h=(0,Iv.useId)(),g=d??h,v=mce({value:t,onChange:r,min:o,max:n,step:i,pixelsPerStep:c,disabled:f,onPointerDownStart:()=>m.current?.focus()}),y=E=>{let C=E.key==="ArrowRight"||E.key==="ArrowUp",M=E.key==="ArrowLeft"||E.key==="ArrowDown";if(!C&&!M||(E.preventDefault(),f))return;let B=C?1:-1,N=E.shiftKey?i/2:i,z=bO(t+B*N,o,n);z!==t&&r(z)},b=`${hce(t)}${l}`,w=W7e(o,n),S=c/i,x=(0,Iv.useMemo)(()=>({transform:`translateX(calc(-50% + ${-t*S}px))`}),[t,S]),_=Math.round(t/pce)*pce,I=Math.abs(t-_)<.01?`${_}`:hce(t),A=I.startsWith("-"),k=A?I.slice(1):I,D=w.filter(E=>E.kind==="major");return(0,za.jsxs)("div",{className:Z("rotation-ruler",u),role:"presentation","data-disabled":f||void 0,...v,children:[(0,za.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":b,onChange:E=>r(bO(E.target.valueAsNumber,o,n)),onKeyDown:y}),(0,za.jsx)("div",{className:"rotation-ruler__strip","aria-hidden":"true",children:(0,za.jsxs)("svg",{className:"rotation-ruler__ticks",style:x,width:(n-o)*S,height:wO,viewBox:`${o*S} 0 ${(n-o)*S} ${wO}`,preserveAspectRatio:"xMidYMid meet",children:[w.map(E=>(0,za.jsx)("line",{x1:E.value*S,x2:E.value*S,y1:wO-E.height,y2:wO,className:`rotation-ruler__tick rotation-ruler__tick--${E.kind}`},E.value)),D.map(E=>(0,za.jsxs)("text",{x:E.value*S,y:j7e,textAnchor:"middle",className:"rotation-ruler__label",children:[E.value,l]},E.value))]})}),(0,za.jsx)("div",{className:"rotation-ruler__active-label","aria-hidden":"true",children:(0,za.jsxs)("span",{className:"rotation-ruler__active-label-number",children:[A&&(0,za.jsx)("span",{className:"rotation-ruler__active-label-sign",children:"-"}),k,(0,za.jsx)("span",{className:"rotation-ruler__active-label-unit",children:l})]})}),(0,za.jsx)("div",{className:"rotation-ruler__pointer","aria-hidden":"true"})]})}var Oj=a(T(),1);function yce({onPlacementControlInteraction:e}){let{state:t,setRotation:r}=Li(),o=yO({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(-dC+.01,Math.min(dC-.01,u));e?.(),r(n+f*s)};return(0,Oj.jsx)("div",{role:"presentation",className:"media-editor-fine-rotation",...o,children:(0,Oj.jsx)(gce,{label:(0,vce.__)("Fine rotation"),min:-dC,max:dC,value:l,onChange:c})})}var vC=a(W(),1),yC=a(j(),1);var Ov=a(T(),1);function bce(){let{state:e,setFlip:t,snapRotate90:r}=Li();return(0,Ov.jsxs)("div",{className:"media-editor-transform-controls",children:[(0,Ov.jsx)(vC.Button,{size:"compact",icon:Qx,label:(0,yC.__)("Rotate 90\xB0 counter-clockwise"),showTooltip:!0,onClick:()=>r(-1)}),(0,Ov.jsx)(vC.Button,{size:"compact",icon:Jx,label:(0,yC.__)("Rotate 90\xB0 clockwise"),showTooltip:!0,onClick:()=>r(1)}),(0,Ov.jsx)(vC.Button,{size:"compact",icon:a4,label:(0,yC.__)("Flip horizontal"),showTooltip:!0,isPressed:e.flip.horizontal,onClick:()=>t({horizontal:!e.flip.horizontal,vertical:e.flip.vertical})}),(0,Ov.jsx)(vC.Button,{size:"compact",icon:c4,label:(0,yC.__)("Flip vertical"),showTooltip:!0,isPressed:e.flip.vertical,onClick:()=>t({horizontal:e.flip.horizontal,vertical:!e.flip.vertical})})]})}var SO=a(W(),1);var Nv=a(j(),1);var Qp=a(T(),1),xO=100,G7e=Pl*xO;function Y7e(e){return Math.round(e*xO)}function q7e(e){return Math.ceil(e*xO)}function wce({aspectRatioValue:e,onAspectRatioChange:t,onPlacementControlInteraction:r,aspectRatioOptions:o}){let{state:n,setZoom:i}=Li(),s=yO(),l=X0(n),c=Y7e(n.zoom),u=q7e(l);return(0,Qp.jsxs)(le,{direction:"column",gap:"xl",[gC]:!0,children:[(0,Qp.jsx)(tr,{render:(0,Qp.jsx)("h2",{}),children:(0,Nv.__)("Crop options")}),(0,Qp.jsx)(SO.SelectControl,{__next40pxDefaultSize:!0,label:(0,Nv.__)("Aspect ratio"),value:e,onChange:t,options:o.map(d=>({label:d.label,value:d.value.toString()}))}),(0,Qp.jsx)("div",{role:"presentation",...s,children:(0,Qp.jsx)(SO.RangeControl,{__next40pxDefaultSize:!0,label:(0,Nv.__)("Zoom (%)"),min:u,max:G7e,step:1,shiftStep:10,value:c,onChange:d=>{r?.(),i(typeof d=="number"?d/xO:l)},renderTooltipContent:d=>{let f=typeof d=="number"?d:u;return(0,Nv.sprintf)((0,Nv.__)("%d%%"),Math.round(f))}})})]})}var Sce=a(W(),1),xce=a(U(),1),_s=a(j(),1),bC=a(yo(),1),Ec=a(T(),1),K7e=[{description:(0,_s.__)("Undo"),keyCombination:{modifier:"primary",character:"z"}},{description:(0,_s.__)("Redo"),keyCombination:{modifier:"primaryShift",character:"z"}},{description:(0,_s.__)("Pan"),keyCombination:{character:["\u2191","\u2193","\u2190","\u2192"],ariaLabel:(0,_s.__)("Arrow keys")}},{description:(0,_s.__)("Zoom in"),keyCombination:{character:"+"}},{description:(0,_s.__)("Zoom out"),keyCombination:{character:"-"}},{description:(0,_s.__)("Rotate 90\xB0 clockwise"),keyCombination:{character:"R"}},{description:(0,_s.__)("Rotate 90\xB0 counter-clockwise"),keyCombination:{modifier:"shift",character:"R"}},{description:(0,_s.__)("Flip horizontal"),keyCombination:{character:"H"}},{description:(0,_s.__)("Flip vertical"),keyCombination:{character:"V"}},{description:(0,_s.__)("Pan or resize crop (large step)"),keyCombination:{modifier:"shift",character:["\u2191","\u2193","\u2190","\u2192"],ariaLabel:(0,_s.__)("Shift + Arrow keys")}}];function Z7e({keyCombination:e}){let{modifier:t,character:r,ariaLabel:o}=e,n;Array.isArray(r)?t?n=[...bC.displayShortcutList[t](r[0]).slice(0,-1),...r]:n=r:n=t?bC.displayShortcutList[t](r):[r];let i=Array.isArray(r)?r.join(""):r,s;return o?s=o:t?s=bC.shortcutAriaLabel[t](i):s=i,(0,Ec.jsx)("kbd",{className:"media-editor-keyboard-shortcuts-modal__shortcut-term","aria-label":s,children:n.map((l,c)=>l==="+"&&t?(0,Ec.jsx)(xce.Fragment,{children:l},c):(0,Ec.jsx)("kbd",{className:"media-editor-keyboard-shortcuts-modal__shortcut-key",children:l},c))})}function _ce({onClose:e}){return(0,Ec.jsxs)(Sce.Modal,{className:"media-editor-keyboard-shortcuts-modal",title:(0,_s.__)("Keyboard shortcuts"),onRequestClose:e,children:[(0,Ec.jsx)("p",{className:"media-editor-keyboard-shortcuts-modal__note",children:(0,_s.__)("These shortcuts work when the image editor has focus.")}),(0,Ec.jsx)("ul",{className:"media-editor-keyboard-shortcuts-modal__shortcut-list",role:"list",children:K7e.map(({description:t,keyCombination:r},o)=>(0,Ec.jsxs)("li",{className:"media-editor-keyboard-shortcuts-modal__shortcut",children:[(0,Ec.jsx)("span",{className:"media-editor-keyboard-shortcuts-modal__shortcut-description",children:t}),(0,Ec.jsx)(Z7e,{keyCombination:r})]},o))})]})}var Tce=a(Fd(),1),wC=a(G(),1),Nj=a(ee(),1),CO=a(U(),1),Mv=a(j(),1),Ece=a(xt(),1);var _O=.1;function Cce(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}=Fi(t.width,t.height,m),{width:v,height:y}=Fi(t.width,t.height,e.rotation),b=.5+n.x-i/2,w=.5+n.y-i/2,S=(o.x-b)/i*h,x=(o.y-w)/i*g,_=o.width/i*h,P=o.height/i*g,I=(v-h)/2,A=(y-g)/2,k=S+I,D=x+A,E=k/v*100,C=D/y*100,M=_/v*100,B=P/y*100;return E<=_O&&C<=_O&&M>=100-_O&&B>=100-_O||r.push({type:"crop",args:{left:E,top:C,width:M,height:B}}),r}var X7e=["title","caption","description","alt_text","post"],SC="media-editor";function Q7e(e){return!e.isCropperDirty||!e.state.image?[]:Cce(e.state,{width:e.state.image.naturalWidth,height:e.state.image.naturalHeight})}function J7e(e,t){let r={};for(let o of X7e)e&&o in e&&(r[o]=e[o]);return!("post"in r)&&t?.post!==void 0&&(r.post=t.post),r}function Pce({cropper:e,id:t,isImage:r,media:o,onSaved:n}){let i=(0,wC.useRegistry)(),{clearEntityRecordEdits:s,receiveEntityRecords:l,saveEditedEntityRecord:c}=(0,wC.useDispatch)(Nj.store),{createErrorNotice:u,removeAllNotices:d}=(0,wC.useDispatch)(Ece.store),[f,m]=(0,CO.useState)(!1),h=(0,CO.useCallback)(async()=>{d("snackbar",SC),m(!0);try{let g,v=Q7e(e),y=v.length>0&&o?{id:t,url:o.source_url}:void 0;if(v.length>0){let w=i.select(Nj.store).getEntityRecordNonTransientEdits("postType","attachment",t),S=J7e(w,o);g=await(0,Tce.default)({path:`/wp/v2/media/${t}/edit`,method:"POST",data:{src:o?.source_url,modifiers:v,...S}}),g&&l("postType","attachment",g,void 0,!0)}else g=await c("postType","attachment",t);let b=g??o;b&&b.id!==t&&s("postType","attachment",t),b&&b.id&&(b.id===t&&e.reset(),n?.({id:b.id,url:b.source_url,media:b,previous:y}))}catch(g){let v=g instanceof Error?g.message:g?.message??(0,Mv.__)("An unknown error occurred.");u(r?(0,Mv.sprintf)((0,Mv.__)("Could not save image. %s"),v):(0,Mv.sprintf)((0,Mv.__)("Could not save media. %s"),v),{type:"snackbar",context:SC})}finally{m(!1)}},[s,u,e,t,r,o,n,l,i,d,c]);return{isSaving:f,save:h}}var Mj=a(U(),1);function $7e(e){return[...mC.filter(t=>t.value<=0),...e??mC.filter(t=>t.value>0)]}function kce({aspectRatioPresets:e}={}){let t=Li(),{aspectRatioValue:r}=t.cropOptions,o=t.state.image,n=(0,Mj.useMemo)(()=>$7e(e),[e]),i=(0,Mj.useMemo)(()=>tw(r,o),[r,o]);return{aspectRatioValue:r,setAspectRatioValue:t.setAspectRatioValue,aspectRatioOptions:n,resolvedAspectRatio:i,resetCropOptions:t.resetCropOptions}}var Ue=a(T(),1),Rce={_embed:"author,wp:attached-to"},e9e=300,{Tabs:Dv}=Lae(Fn.privateApis);function t9e({tabs:e}){let t=(0,Uo.useContext)(Dv.Context);return(0,Ue.jsx)(El,{scope:"media-editor",identifier:"media-editor/details",title:(0,ai.__)("Details"),icon:Od,isActiveByDefault:!0,className:"media-editor__sidebar",panelClassName:"media-editor__sidebar-panel",headerClassName:"media-editor__sidebar-header",header:(0,Ue.jsx)(Dv.Context.Provider,{value:t,children:(0,Ue.jsx)(Dv.TabList,{children:e.map(r=>(0,Ue.jsx)(Dv.Tab,{tabId:r.id,children:r.title},r.id))})}),children:(0,Ue.jsx)(Dv.Context.Provider,{value:t,children:e.map(r=>(0,Ue.jsx)(Dv.TabPanel,{tabId:r.id,focusable:!1,children:r.panel},r.id))})})}function r9e({isSaving:e,isImage:t,showCloseButton:r=!1,onCancel:o}){let[n,i]=(0,Uo.useState)(!1);return(0,Ue.jsxs)(Fn.Flex,{className:"media-editor__header-actions",justify:"flex-end",expanded:!1,gap:2,children:[t&&(0,Ue.jsx)(Fn.Button,{size:"compact",icon:Ux,label:(0,ai.__)("Keyboard shortcuts"),onClick:()=>i(!0)}),(0,Ue.jsx)(Wp.Slot,{scope:"media-editor"}),r&&(0,Ue.jsx)(Fn.Button,{size:"compact",icon:Mx,label:(0,ai.__)("Close"),onClick:o,disabled:e,accessibleWhenDisabled:!0}),n&&(0,Ue.jsx)(_ce,{onClose:()=>i(!1)})]})}function o9e({isUndoRedoDisabled:e=!1,onReset:t}){let{reset:r,isDirty:o,hasUndo:n,hasRedo:i,undo:s,redo:l,beginGesture:c,endGesture:u}=Li(),d=()=>{e||s()},f=()=>{e||l()},m=()=>{c(),r(),t(),u()};return(0,Ue.jsxs)(Fn.Flex,{className:"media-editor__history-actions",expanded:!1,gap:2,children:[(0,Ue.jsx)(Fn.Button,{size:"compact",icon:fg,label:(0,ai.__)("Undo"),showTooltip:!0,shortcut:Pc.displayShortcut.primary("z"),disabled:e||!n,accessibleWhenDisabled:!0,onClick:d}),(0,Ue.jsx)(Fn.Button,{size:"compact",icon:lg,label:(0,ai.__)("Redo"),showTooltip:!0,shortcut:(0,Pc.isAppleOS)()?Pc.displayShortcut.primaryShift("z"):Pc.displayShortcut.primary("y"),disabled:e||!i,accessibleWhenDisabled:!0,onClick:f}),(0,Ue.jsx)(Fn.Button,{size:"compact",variant:"tertiary",disabled:!o,accessibleWhenDisabled:!0,onClick:m,children:(0,ai.__)("Reset")})]})}function n9e({isSaving:e,hasMedia:t,hasChanges:r,onCancel:o,onSave:n}){let i=e||!t||!r;return(0,Ue.jsxs)(Fn.Flex,{className:"media-editor__footer-actions",justify:"flex-end",expanded:!1,gap:2,children:[(0,Ue.jsx)(Fn.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:o,disabled:e,accessibleWhenDisabled:!0,children:(0,ai.__)("Cancel")}),(0,Ue.jsx)(Fn.Button,{__next40pxDefaultSize:!0,variant:"primary",onClick:n,isBusy:e,disabled:i,accessibleWhenDisabled:!0,children:(0,ai.__)("Save")})]})}function i9e({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=Li(),f=(0,Dj.useViewportMatch)("xlarge"),m=(0,Dj.useViewportMatch)("medium"),h="narrow";f?h="wide":m&&(h="medium");let{media:g,hasEdits:v}=(0,xC.useSelect)(ce=>{let{getEditedEntityRecord:ae,getEntityRecord:ye,hasEditsForEntityRecord:Ie}=ce(Fj.store);return ye("postType","attachment",t,Rce),{media:ae("postType","attachment",t),hasEdits:Ie("postType","attachment",t)}},[t]),y=d.isCropperDirty||v,{clearEntityRecordEdits:b,editEntityRecord:w,invalidateResolution:S}=(0,xC.useDispatch)(Fj.store),{removeAllNotices:x}=(0,xC.useDispatch)(TO.store),[_,P]=(0,Uo.useState)(!1),[I,A]=(0,Uo.useState)(!1),[k,D]=(0,Uo.useState)(!1),E=(0,Uo.useRef)(),C=(0,Uo.useCallback)(()=>{A(!0),clearTimeout(E.current),E.current=setTimeout(()=>{A(!1)},e9e)},[]),M=(0,Uo.useCallback)(()=>{D(!0)},[]),B=(0,Uo.useCallback)(()=>{D(!1)},[]),N=I||k;(0,Uo.useEffect)(()=>()=>{clearTimeout(E.current)},[]),(0,Uo.useEffect)(()=>{A(!1),D(!1)},[t]),(0,Uo.useEffect)(()=>{S("getEntityRecord",["postType","attachment",t,Rce])},[t,S]);let z=Kg(g?.mime_type).type,O=!!g&&z==="image",{aspectRatioValue:F,setAspectRatioValue:L,aspectRatioOptions:H,resetCropOptions:q}=kce({aspectRatioPresets:r}),{isSaving:Q,save:J}=Pce({cropper:d,id:t,isImage:O,media:g,onSaved:n}),te=(0,Uo.useMemo)(()=>{let ce={id:"details",title:(0,ai.__)("Details"),panel:(0,Ue.jsx)(le,{className:"media-editor__panel",direction:"column",gap:"lg",children:(0,Ue.jsx)(Mae,{})})};return O?[{id:"crop",title:(0,ai.__)("Crop"),panel:(0,Ue.jsx)(le,{className:"media-editor__panel",direction:"column",gap:"lg",children:(0,Ue.jsx)(wce,{aspectRatioValue:F,onAspectRatioChange:L,onPlacementControlInteraction:C,aspectRatioOptions:H})})},ce]:[ce]},[O,F,L,H,C]),se=ce=>{w("postType","attachment",t,ce)},$=()=>{x("snackbar",SC),b("postType","attachment",t),o?.()},X=()=>{if(!Q){if(y){P(!0);return}$()}},oe=ce=>{let ae=Pc.isKeyboardEvent.primary(ce,"z"),ye=Pc.isKeyboardEvent.primaryShift(ce,"z")||!(0,Pc.isAppleOS)()&&Pc.isKeyboardEvent.primary(ce,"y");if((ae||ye)&&O){let Ie=ce.target;if(!((Ie.tagName==="INPUT"||Ie.tagName==="TEXTAREA"||Ie.isContentEditable)&&!Ie.closest(`[${gC}]`))){if(ce.preventDefault(),N)return;ye?d.redo():d.undo()}}if(u){if(ce.code!=="Escape"&&ce.key!=="Escape")return;if(Q){ce.preventDefault();return}y&&(ce.preventDefault(),P(!0))}},pe=(0,Ue.jsx)(TO.SnackbarNotices,{className:s,context:SC}),be=(0,Ue.jsxs)(ete,{value:g??void 0,onChange:se,settings:{fields:e},children:[(0,Ue.jsx)("div",{className:"media-editor",children:g?(0,Ue.jsxs)(Ue.Fragment,{children:[(0,Ue.jsx)(Dv,{children:(0,Ue.jsx)(t9e,{tabs:te})}),(0,Ue.jsx)(Ev,{className:"media-editor__skeleton",labels:{body:O?(0,ai.__)("Image editor"):(0,ai.__)("Media preview"),sidebar:(0,ai.__)("Media details")},content:(0,Ue.jsx)("div",{className:"media-editor__canvas",children:O?(0,Ue.jsx)(fce,{focusOnMount:!0,isPlacementActive:I,onGestureStart:M,onGestureEnd:B}):(0,Ue.jsx)(ote,{})}),sidebar:(0,Ue.jsx)(El.Slot,{scope:"media-editor"})})]}):(0,Ue.jsx)("div",{className:"media-editor__loading",children:(0,Ue.jsx)(Fn.Spinner,{})})}),(0,Ue.jsx)(Fn.__experimentalConfirmDialog,{isOpen:_,confirmButtonText:(0,ai.__)("Discard"),cancelButtonText:(0,ai.__)("Keep editing"),onCancel:()=>P(!1),onConfirm:()=>{P(!1),$()},children:(0,ai.__)("Are you sure you want to discard your unsaved changes?")}),l?(0,Uo.createPortal)(pe,l):pe]}),Ce=O?(0,Ue.jsx)(o9e,{isUndoRedoDisabled:N,onReset:q}):null,Ge=O?(0,Ue.jsx)(yce,{onPlacementControlInteraction:C}):null,He=O?(0,Ue.jsx)(bce,{}):null,ge=(0,Ue.jsx)(n9e,{isSaving:Q,hasMedia:!!g,hasChanges:y,onCancel:X,onSave:J}),ie;return h==="wide"?ie=(0,Ue.jsxs)(Ue.Fragment,{children:[Ce,O&&(0,Ue.jsxs)("div",{className:"media-editor-modal__footer-toolbar",children:[Ge,He]}),ge]}):h==="medium"?ie=(0,Ue.jsxs)(Ue.Fragment,{children:[Ge,(0,Ue.jsxs)("div",{className:"media-editor-modal__footer-row",children:[Ce,He,ge]})]}):ie=(0,Ue.jsxs)(Ue.Fragment,{children:[Ge,He,(0,Ue.jsxs)("div",{className:"media-editor-modal__footer-row",children:[Ce,ge]})]}),i({children:be,headerActions:(0,Ue.jsx)(r9e,{isSaving:Q,isImage:O,showCloseButton:c,onCancel:X}),footerActions:ie,footerLayout:h,onRequestClose:X,onKeyDown:oe,shouldCloseOnClickOutside:!y&&!Q,isSaving:Q,hasChanges:y,hasMedia:!!g})}function Lj(e){return(0,Ue.jsx)(Aj,{children:(0,Ue.jsx)(i9e,{...e})},e.id)}var Ace=Lj;var rw=a(T(),1);function Mce({fields:e=[],aspectRatioPresets:t}){let{isModalOpen:r,id:o,onUpdate:n,onClose:i}=(0,CC.useSelect)(f=>{let{isOpen:m,getId:h,getOnUpdate:g,getOnClose:v}=f(G0);return{isModalOpen:m(),id:h(),onUpdate:g(),onClose:v()}},[]),{closeMediaEditorModal:s}=(0,CC.useDispatch)(G0),{createSuccessNotice:l}=(0,CC.useDispatch)(Nce.store);if(!r||!o)return null;let c=typeof document>"u"?null:document.body,u=f=>{f.stopPropagation()},d=()=>{s(),i?.()};return(0,rw.jsx)(Ace,{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,_C.__)("Image edited."),{type:"snackbar",actions:[{label:(0,_C.__)("Undo"),onClick:()=>{n({id:h.id,url:h.url})}}]})},renderFrame:({children:f,headerActions:m,footerActions:h,footerLayout:g,onRequestClose:v,onKeyDown:y,shouldCloseOnClickOutside:b})=>(0,rw.jsx)(Oce.ShortcutProvider,{className:"media-editor-modal__shortcut-scope",onKeyDown:u,children:(0,rw.jsxs)(Ice.Modal,{className:"media-editor-modal",title:(0,_C.__)("Edit media"),size:"fill",isDismissible:!1,shouldCloseOnClickOutside:b,onKeyDown:y,onRequestClose:v,headerActions:m,children:[f,(0,rw.jsx)("div",{className:`media-editor-modal__footer is-${g}`,role:"region","aria-label":(0,_C.__)("Editor actions"),children:h})]})})})}var ow={};Fae(ow,{store:G0,MediaEditor:Lj,MediaEditorModal:Mce});var pn=a(j(),1),Dce=a(G(),1),EO=a(Ot(),1),Fce=a(ee(),1),Jp=(e,t)=>`<a ${Vj(e)}>${t}</a>`,Vj=e=>`href="${e}" target="_blank" rel="noopener"`,s9e=(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},a9e=e=>{let{title:t,foreign_landing_url:r,creator:o,creator_url:n,license:i,license_version:s,license_url:l}=e,c=s9e(i,s),u=(0,EO.decodeEntities)(o),d;return u?d=t?(0,pn.sprintf)((0,pn._x)('"%1$s" by %2$s/ %3$s',"caption"),Jp(r,(0,EO.decodeEntities)(t)),n?Jp(n,u):u,l?Jp(`${l}?ref=openverse`,c):c):(0,pn.sprintf)((0,pn._x)("<a %1$s>Work</a> by %2$s/ %3$s","caption"),Vj(r),n?Jp(n,u):u,l?Jp(`${l}?ref=openverse`,c):c):d=t?(0,pn.sprintf)((0,pn._x)('"%1$s"/ %2$s',"caption"),Jp(r,(0,EO.decodeEntities)(t)),l?Jp(`${l}?ref=openverse`,c):c):(0,pn.sprintf)((0,pn._x)("<a %1$s>Work</a>/ %2$s","caption"),Vj(r),l?Jp(`${l}?ref=openverse`,c):c),d.replace(/\s{2}/g," ")},Bj=async(e={})=>(await(0,Dce.resolveSelect)(Fce.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})),l9e=[{name:"images",labels:{name:(0,pn.__)("Images"),search_items:(0,pn.__)("Search images")},mediaType:"image",async fetch(e={}){return Bj({...e,media_type:"image"})}},{name:"videos",labels:{name:(0,pn.__)("Videos"),search_items:(0,pn.__)("Search videos")},mediaType:"video",async fetch(e={}){return Bj({...e,media_type:"video"})}},{name:"audio",labels:{name:(0,pn.__)("Audio"),search_items:(0,pn.__)("Search audio")},mediaType:"audio",async fetch(e={}){return Bj({...e,media_type:"audio"})}},{name:"openverse",labels:{name:(0,pn.__)("Openverse"),search_items:(0,pn.__)("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:a9e(c),previewUrl:c.thumbnail}))},getReportUrl:({sourceId:e})=>`https://wordpress.org/openverse/image/${e}/report/`,isExternalResource:!0}],Lce=l9e;var Bce=a(G(),1),Vce=a(ee(),1);function jce(e){let{invalidateResolution:t}=(0,Bce.dispatch)(Vce.store);for(let r of e)r.id&&(t("getEntityRecord",["postType","attachment",r.id,{context:"view"}]),t("getEntityRecord",["postType","attachment",r.id]))}var zce=a(Im(),1);var{sideloadMedia:c9e}=Y(zce.privateApis),Hce=c9e;var Uce=a(Fd(),1),Wce=a(Im(),1);async function Gce(e,t=[]){let r=await(0,Uce.default)({path:`/wp/v2/media/${e}/finalize`,method:"POST",data:{sub_sizes:t}});return r?(0,Wce.transformAttachment)(r):void 0}var Yce=a(Fd(),1);async function qce(e){await(0,Yce.default)({path:`/wp/v2/media/${e}?force=true`,method:"DELETE"})}var lpe=a(ee(),1),cpe=a(G(),1),Az=a(U(),1);var kw=a(W(),1),E5=a(bt(),1),epe=a(G(),1),tpe=a(he(),1),uh=a(U(),1),Tz=a(_e(),1);function $p(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 lr=(e,t,r)=>{let o=Array.isArray(t)?t:t.split("."),n=e;return o.forEach(i=>{n=n?.[i]}),n??r};var u9e=["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 Fv(e,t,r){let o=r?".blocks."+r:"",n=t?"."+t:"",i=`settings${o}${n}`,s=`settings${n}`;if(t)return lr(e,i)??lr(e,s);let l={};return u9e.forEach(c=>{let u=lr(e,`settings${o}.${c}`)??lr(e,`settings.${c}`);u!==void 0&&(l=$p(l,c.split("."),u))}),l}function TC(e,t,r,o){let n=o?".blocks."+o:"",i=t?"."+t:"",s=`settings${n}${i}`;return $p(e,s.split("."),r)}var Xce=a(jj(),1);var d9e="1600px",f9e="320px",m9e=1,p9e=.25,h9e=.75,g9e="14px";function Zce({minimumFontSize:e,maximumFontSize:t,fontSize:r,minimumViewportWidth:o=f9e,maximumViewportWidth:n=d9e,scaleFactor:i=m9e,minimumFontSizeLimit:s}){if(s=Gu(s)?s:g9e,r){let S=Gu(r);if(!S?.unit||!S?.value)return null;let x=Gu(s,{coerceTo:S.unit});if(x?.value&&!e&&!t&&S?.value<=x?.value)return null;if(t||(t=`${S.value}${S.unit}`),!e){let _=S.unit==="px"?S.value:S.value*16,P=Math.min(Math.max(1-.075*Math.log2(_),p9e),h9e),I=EC(S.value*P,3);x?.value&&I<x?.value?e=`${x.value}${x.unit}`:e=`${I}${S.unit}`}}let l=Gu(e),c=l?.unit||"rem",u=Gu(t,{coerceTo:c});if(!l||!u)return null;let d=Gu(e,{coerceTo:"rem"}),f=Gu(n,{coerceTo:c}),m=Gu(o,{coerceTo:c});if(!f||!m||!d)return null;let h=f.value-m.value;if(!h)return null;let g=EC(m.value/100,3),v=EC(g,3)+c,y=100*((u.value-l.value)/h),b=EC((y||1)*i,3),w=`${d.value}${d.unit} + ((1vw - ${v}) * ${b})`;return`clamp(${e}, ${w}, ${t})`}function Gu(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:EC(d,3),unit:u}:null}function EC(e,t=3){let r=Math.pow(10,t);return Math.round(e*r)/r}function zj(e){let t=e?.fluid;return t===!0||t&&typeof t=="object"&&Object.keys(t).length>0}function v9e(e){let t=e?.typography??{},r=e?.layout,o=Gu(r?.wideSize)?r?.wideSize:null;return zj(t)&&o?{fluid:{maxViewportWidth:o,...typeof t.fluid=="object"?t.fluid:{}}}:{fluid:t?.fluid}}function PO(e,t){let{size:r}=e;if(!r||r==="0"||e?.fluid===!1||!zj(t?.typography)&&!zj(e))return r;let o=v9e(t)?.fluid??{},n=Zce({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 Yu="body",kC=":root";function PC(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 nw=[{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)=>PO(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 kc(e,t){if(!e||!t)return t;let r=PC(e),o=PC(t),n=[];return r.forEach(i=>{o.forEach(s=>{n.push(`${i.trim()} ${s.trim()}`)})}),n.join(", ")}function Qce(e,t){if(!e||!t)return;let r={};return Object.entries(t).forEach(([o,n])=>{typeof n=="string"&&(r[o]=kc(e,n)),typeof n=="object"&&(r[o]={},Object.entries(n).forEach(([i,s])=>{r[o][i]=kc(e,s)}))}),r}function kO(e,t){return e.includes(",")?PC(e).map(n=>n+t).join(","):e+t}function Hj(e,t){let r=`.is-style-${e}`;if(!t)return r;let o=/((?::\([^)]+\))?\s*)([^\s:]+)/,n=(s,l,c)=>l+c+r;return PC(t).map(s=>s.replace(o,n)).join(",")}function Jce(e,t){let r=`.is-style-${e}`,o=PC(t).map(n=>{let i=n.trim(),s=`${r} `;return i.startsWith(s)?i.slice(s.length):i});return Hj(e,o.join(","))}function y9e(e,t){if(!e||!t)return e;if(typeof e=="object"&&"ref"in e&&e?.ref){let r=(0,Xce.getCSSValueFromRawStyle)(lr(t,e.ref));return typeof r=="object"&&r!==null&&"ref"in r&&r?.ref?void 0:r===void 0?e:r}return e}function b9e(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 Uj(e,t){if(!e||!t)return e;let r=y9e(e,t);return typeof r=="object"&&r!==null&&"url"in r&&r?.url&&(r.url=b9e(r.url,t?._links?.["wp:theme-file"])),r}function $ce(e,t,r=[],o="slug",n){let i=[t?lr(e,["blocks",t,...r]):void 0,lr(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"||$ce(e,t,r,"slug",d.slug)[o]===d[o]?d:void 0}}}}function w9e(e,t,r,[o,n]=[]){let i=nw.find(l=>l.cssVarInfix===o);if(!i||!e.settings)return r;let s=$ce(e.settings,t,i.path,"slug",n);if(s){let{valueKey:l}=i,c=s[l];return RO(e,t,c)}return r}function S9e(e,t,r,o=[]){let n=(t?lr(e?.settings??{},["blocks",t,"custom",...o]):void 0)??lr(e?.settings??{},["custom",...o]);return n?RO(e,t,n):r}function RO(e,t,r){if(!r||typeof r!="string")if(typeof r=="object"&&r!==null&&"ref"in r&&typeof r.ref=="string"){let u=lr(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"?w9e(e,t,r,c):l==="custom"?S9e(e,t,r,c):r}function iw(e,t,r,o=!0){let n=t?"."+t:"",i=r?`styles.blocks.${r}${n}`:`styles${n}`;if(!e)return;let s=lr(e,i);return o?RO(e,r,s):s}function RC(e,t,r,o){let n=t?"."+t:"",i=o?`styles.blocks.${o}${n}`:`styles${n}`;return $p(e,i.split("."),r)}var Wj=a(DA(),1);function Lv(e,t){return typeof e!="object"||typeof t!="object"?e===t:(0,Wj.default)(e?.styles,t?.styles)&&(0,Wj.default)(e?.settings,t?.settings)}var rue=a(NI(),1);function eue(e){return Object.prototype.toString.call(e)==="[object Object]"}function tue(e){var t,r;return eue(e)===!1?!1:(t=e.constructor,t===void 0?!0:(r=t.prototype,!(eue(r)===!1||r.hasOwnProperty("isPrototypeOf")===!1)))}function Bi(e,t){return(0,rue.default)(e,t,{isMergeableObject:tue,customMerge:r=>{if(r==="backgroundImage")return(o,n)=>n??o}})}function oue(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 Ut=a(j(),1),nue=a(bt(),1),AO=new Map,x9e=[],Gj={caption:(0,Ut.__)("Caption"),link:(0,Ut.__)("Link"),button:(0,Ut.__)("Button"),heading:(0,Ut.__)("Heading"),h1:(0,Ut.__)("H1"),h2:(0,Ut.__)("H2"),h3:(0,Ut.__)("H3"),h4:(0,Ut.__)("H4"),h5:(0,Ut.__)("H5"),h6:(0,Ut.__)("H6"),"settings.color":(0,Ut.__)("Color"),"settings.typography":(0,Ut.__)("Typography"),"settings.shadow":(0,Ut.__)("Shadow"),"settings.layout":(0,Ut.__)("Layout"),"styles.color":(0,Ut.__)("Colors"),"styles.spacing":(0,Ut.__)("Spacing"),"styles.background":(0,Ut.__)("Background"),"styles.typography":(0,Ut.__)("Typography")},_9e=oue(()=>(0,nue.getBlockTypes)().reduce((e,{name:t,title:r})=>(e[t]=r,e),{})),IO=e=>e!==null&&typeof e=="object";function C9e(e){if(Gj[e])return Gj[e];let t=e.split(".");if(t?.[0]==="blocks")return _9e()?.[t[1]]||t[1];if(t?.[0]==="elements")return Gj[t[1]]||t[1]}function iue(e,t,r=""){if(!IO(e)&&!IO(t))return e!==t?r.split(".").slice(0,2).join("."):void 0;e=IO(e)?e:{},t=IO(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=iue(e[i],t[i],s);l&&(n=n.concat(l))}return n}function T9e(e,t){let r=JSON.stringify({next:e,previous:t});if(AO.has(r))return AO.get(r);let o=iue({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 AO.set(r,[]),[];let n=Array.isArray(o)?o:[o],i=[...new Set(n)].reduce((s,l)=>{let c=C9e(l);return c&&s.push([l.split(".")[0],c]),s},[]);return AO.set(r,i),i}function AC(e,t,r={}){let o=T9e(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,Ut.__)(", "));switch(s){case"blocks":return(0,Ut.sprintf)((0,Ut._n)("%s block.","%s blocks.",c),u);case"elements":return(0,Ut.sprintf)((0,Ut._n)("%s element.","%s elements.",c),u);case"settings":return(0,Ut.sprintf)((0,Ut.__)("%s settings."),u);case"styles":return(0,Ut.sprintf)((0,Ut.__)("%s styles."),u);default:return(0,Ut.sprintf)((0,Ut.__)("%s."),u)}})):x9e}var Vi=a(bt(),1),IC=a(jj(),1),due=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 lr(i,`${c}.root`,null)||lr(i,c,null)||m;let h=s?lr(s,`${c}.__experimentalSelector`,null):void 0;return h?kc(u,h):m}let f;return l&&(f=lr(i,c,null)),f||(o?sw(e,d[0],r):null)}function E9e(e=[]){let t={r:[],g:[],b:[],a:[]};return e.forEach(r=>{let o=_o(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 sue(e,t){let r=E9e(t);return`
<svg
	xmlns:xlink="http://www.w3.org/1999/xlink"
	viewBox="0 0 0 0"
	width="0"
	height="0"
	focusable="false"
	role="none"
	aria-hidden="true"
	style="visibility: hidden; position: absolute; left: -9999px; overflow: hidden;"
>
	<defs>
		<filter id="${e}">
			<!--
				Use sRGB instead of linearRGB so transparency looks correct.
				Use perceptual brightness to convert to grayscale.
			-->
			<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>
			<!-- Use sRGB instead of linearRGB to be consistent with how CSS gradients work. -->
			<feComponentTransfer color-interpolation-filters="sRGB">
				<feFuncR type="table" tableValues="${r.r.join(" ")}"></feFuncR>
				<feFuncG type="table" tableValues="${r.g.join(" ")}"></feFuncG>
				<feFuncB type="table" tableValues="${r.b.join(" ")}"></feFuncB>
				<feFuncA type="table" tableValues="${r.a.join(" ")}"></feFuncA>
			</feComponentTransfer>
			<!-- Re-mask the image with the original transparency since the feColorMatrix above loses that information. -->
			<feComposite in2="SourceGraphic" operator="in"></feComposite>
		</filter>
	</defs>
</svg>`}function eh(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 Yj(e){if(!e)return;let t=e.match(/var:preset\|spacing\|(.+)/);return t?`var(--wp--preset--spacing--${t[1]})`:e}function P9e(e){if(!e)return null;let t=typeof e=="string";return{top:t?e:e?.top,left:t?e:e?.left}}function qj(e,t="0"){let r=P9e(e);if(!r)return null;let o=Yj(r?.top)||t,n=Yj(r?.left)||t;return o===n?o:`${o} ${n}`}var aue={backgroundSize:"cover",backgroundPosition:"50% 50%"};function lue(e){if(!e||!e?.backgroundImage?.url)return;let t;return e?.backgroundSize||(t={backgroundSize:aue.backgroundSize}),e?.backgroundSize==="contain"&&!e?.backgroundPosition&&(t={backgroundPosition:aue.backgroundPosition}),t}var cue={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 k9e={button:"wp-element-button",caption:"wp-element-caption"},R9e={__experimentalBorder:"border",color:"color",dimensions:"dimensions",spacing:"spacing",typography:"typography"},fue={"core/button":[":hover",":focus",":focus-visible",":active"],"core/navigation-link":[":hover",":focus",":focus-visible",":active"]},A9e={link:[":link",":any-link",":visited",":hover",":focus",":focus-visible",":active"],button:[":link",":any-link",":visited",":hover",":focus",":focus-visible",":active"]},mue={mobile:"@media (width <= 480px)",tablet:"@media (480px < width <= 782px)"};function I9e(e="*",t={}){return nw.reduce((r,{path:o,cssVarInfix:n,classes:i})=>{if(!i)return r;let s=lr(t,o,[]);return["default","theme","custom"].forEach(l=>{s[l]&&s[l].forEach(({slug:c})=>{i.forEach(({classSuffix:u,propertyName:d})=>{let f=`.has-${eh(c)}-${u}`,m=e.split(",").map(g=>`${g}${f}`).join(","),h=`var(--wp--preset--${n}--${eh(c)})`;r+=`${m}{${d}: ${h} !important;}`})})}),r},"")}function O9e(e={}){return nw.filter(t=>t.path.at(-1)==="duotone").flatMap(t=>{let r=lr(e,t.path,{});return["default","theme"].filter(o=>r[o]).flatMap(o=>r[o].map(n=>sue(`wp-duotone-${n.slug}`,n.colors))).join("")})}function pue(e={},t,r){let o=[];return Object.keys(e).forEach(n=>{let i=t+eh(n.replace("/","-")),s=e[n];if(s instanceof Object){let l=i+r;o=[...o,...pue(s,l,r)]}else o.push(`${i}: ${s}`)}),o}var N9e=(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},M9e=(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},D9e=(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=NO(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=NO(l);r[s]=[...r[s]||[],...c],delete t[o]}}),r};function NO(e={},t="",r,o={},n=!1){let i=Yu===t,s=Object.entries(Vi.__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=lr(e,g);if(u==="--wp--style--root--padding"&&(typeof v=="string"||!r))return c;if(f&&typeof v!="string")Object.entries(f).forEach(y=>{let[b,w]=y;if(!lr(v,[w],!1))return;let S=b.startsWith("--")?b:eh(b);c.push(`${S}: ${(0,IC.getCSSValueFromRawStyle)(lr(v,[w]))}`)});else if(lr(e,g,!1)){let y=u.startsWith("--")?u:eh(u);c.push(`${y}: ${(0,IC.getCSSValueFromRawStyle)(lr(e,g))}`)}return c},[]);return e.background&&(e.background?.backgroundImage&&(e.background.backgroundImage=Uj(e.background.backgroundImage,o)),!i&&e.background?.backgroundImage?.id&&(e={...e,background:{...e.background,...lue(e.background)}})),(0,IC.getCSSRules)(e).forEach(c=>{if(i&&(r||n)&&c.key.startsWith("padding"))return;let u=c.key.startsWith("--")?c.key:eh(c.key),d=Uj(c.value,o);u==="font-size"&&(d=PO({name:"",slug:"",size:d},o?.settings)),u==="aspect-ratio"&&s.push("min-height: unset"),s.push(`${u}: ${d}`)}),s}function F9e({layoutDefinitions:e=cue,style:t,selector:r,hasBlockGapSupport:o,hasFallbackGapSupport:n,fallbackGapValue:i}){let s="",l=o?qj(t?.spacing?.blockGap):"";if(n&&(r===Yu?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===Yu?`:root :where(.${c})${f?.selector||""}`:`:root :where(${r}-${c})${f?.selector||""}`:h=r===Yu?`:where(.${c}${f?.selector||""})`:`:where(${r}.${c}${f?.selector||""})`,s+=`${h} { ${m.join("; ")}; }`}})}),r===Yu&&o&&(s+=`${kC} { --wp--style--block-gap: ${l}; }`)),r===Yu&&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 L9e=["border","color","dimensions","spacing","typography","filter","outline","shadow","background"];function B9e(e){return OO(e)}function OO(e,t){if(!e)return{};let r=Object.entries(e),o=t?fue[t]??[]:[],i=r.filter(([s])=>L9e.includes(s)||o.includes(s)||mue[s]).map(([s,l])=>[s,JSON.parse(JSON.stringify(l))]);return Object.fromEntries(i)}function uue(e){let{styles:t,selector:r,featureSelectors:o,name:n,elementName:i,mediaQuery:s,variationName:l}=e,c=n?fue[n]??[]:A9e[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 V9e(e){let{styles:t,selector:r,featureSelectors:o,name:n,elementName:i,isStyleVariation:s,variationName:l}=e;return!n&&!i?[]:Object.entries(mue).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 j9e=(e,t)=>{let r=[];if(!e?.styles)return r;let o=B9e(e.styles);return o&&r.push({styles:o,selector:Yu,skipSelectorWrapper:!0}),Object.entries(Vi.__EXPERIMENTAL_ELEMENTS).forEach(([n,i])=>{e.styles?.elements?.[n]&&r.push({styles:e.styles?.elements?.[n]??{},selector:i,elementName:n,skipSelectorWrapper:!k9e[n]})}),Object.entries(e.styles?.blocks??{}).forEach(([n,i])=>{let s=OO(i,n),l=i,c=[],u=[];l?.variations&&Object.entries(l.variations).forEach(([d,f])=>{let m=f,h=OO(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,y])=>{y&&Vi.__EXPERIMENTAL_ELEMENTS[v]&&c.push({styles:y,selector:kc(g,Vi.__EXPERIMENTAL_ELEMENTS[v]),elementName:v,isStyleVariation:!0})}),Object.entries(m?.blocks??{}).forEach(([v,y])=>{let b=typeof t!="string"?kc(g,t[v]?.selector):void 0,w=typeof t!="string"?kc(g,t[v]?.duotoneSelector):void 0,S=typeof t!="string"?Qce(g,t[v]?.featureSelectors??{}):void 0,x=OO(y,v);y?.css&&(x.css=y.css),!(!b||typeof t=="string")&&(c.push({selector:b,name:v,isStyleVariation:!0,duotoneSelector:w,featureSelectors:S,fallbackGapValue:t[v]?.fallbackGapValue,hasLayoutSupport:t[v]?.hasLayoutSupport,styles:x}),Object.entries(y.elements??{}).forEach(([_,P])=>{P&&Vi.__EXPERIMENTAL_ELEMENTS[_]&&c.push({styles:P,selector:kc(b,Vi.__EXPERIMENTAL_ELEMENTS[_]),elementName:_,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]&&Vi.__EXPERIMENTAL_ELEMENTS[d]&&r.push({styles:f,selector:t[n]?.selector.split(",").map(m=>Vi.__EXPERIMENTAL_ELEMENTS[d].split(",").map(g=>m+" "+g)).join(","),elementName:d})}),r.push(...c)}),r},Kj=(e,t)=>{let r=[];if(!e?.settings)return r;let o=s=>{let l={};return nw.forEach(({path:c})=>{let u=lr(s,c,!1);u!==!1&&(l=$p(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 z9e(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 H9e(e,t,{path:r,valueKey:o,valueFunc:n,cssVarInfix:i}){let s=lr(e,r,[]),l=[];for(let c of["default","theme","custom"])if(s[c])for(let u of s[c]){let d=eh(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 U9e=(e,t)=>{let r=Kj(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 nw){let m=H9e(n,e.settings,f);if(m.length===0)continue;let h=z9e(l,f.path[0],c);u[h]||(u[h]=[]),u[h].push(...m)}let d=pue(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 W9e(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:y,skipSelectorWrapper:b,name:w,variationName:S}=e,x="",_=c?kO(l,c):l;if(g&&typeof g!="string"){let k=D9e(g,f);k=N9e(k,t.settings,w),k=M9e(k,t.settings),Object.entries(k).forEach(([D,E])=>{if(E.length){let C=S?Jce(S,D):D;C=c?kO(C,c):C;let M=E.join(";");x+=`:root :where(${C}){${M};}`}})}if(d){let k={};f?.filter&&(k.filter=f.filter,delete f.filter);let D=NO(k);D.length&&(x+=`${d}{${D.join(";")};}`)}let P=v??_;!o&&(Yu===P||h)&&(x+=F9e({style:f,selector:P,hasBlockGapSupport:y??n,hasFallbackGapSupport:i,fallbackGapValue:m}));let A=NO(f,_,r,t,s);if(A?.length){let k=b?_:`:root :where(${_})`;x+=`${k}{${A.join(";")};}`}return f?.css&&(x+=hue(f.css,`:root :where(${_})`)),u&&x?`${u}{${x}}`:x}var G9e=(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=j9e(e,t),u=Kj(e,t),d=e?.settings?.useRootPaddingAwareAlignments,{contentSize:f,wideSize:m}=e?.settings?.layout||{},h=l.marginReset||l.rootPadding||l.layoutStyles,g="";if(l.presets&&(f||m)&&(g+=`${kC} {`,g=f?g+` --wp--style--global--content-size: ${f};`:g,g=m?g+` --wp--style--global--wide-size: ${m};`:g,g+="}"),h&&(g+=":where(body) {margin: 0;",l.rootPadding&&d&&(g+=`padding-right: 0; padding-left: 0; padding-top: var(--wp--style--root--padding-top); padding-bottom: var(--wp--style--root--padding-bottom) }
				.has-global-padding { padding-right: var(--wp--style--root--padding-right); padding-left: var(--wp--style--root--padding-left); }
				.has-global-padding > .alignfull { margin-right: calc(var(--wp--style--root--padding-right) * -1); margin-left: calc(var(--wp--style--root--padding-left) * -1); }
				.has-global-padding :where(:not(.alignfull.is-layout-flow) > .has-global-padding:not(.wp-block-block, .alignfull)) { padding-right: 0; padding-left: 0; }
				.has-global-padding :where(:not(.alignfull.is-layout-flow) > .has-global-padding:not(.wp-block-block, .alignfull)) > .alignfull { margin-left: 0; margin-right: 0;
				`),g+="}"),l.blockStyles&&c.forEach(v=>{if(v.isStyleVariation&&!l.variationStyles)return;let y=V9e(v);[v,...y,...uue(v),...y.flatMap(uue)].forEach(b=>{g+=W9e(b,{tree:e,useRootPaddingAlign:d,disableLayoutStyles:n,hasBlockGapSupport:r,hasFallbackGapSupport:o,disableRootPadding:i})})}),l.layoutStyles&&(g=g+".wp-site-blocks > .alignleft { float: left; margin-right: 2em; }",g=g+".wp-site-blocks > .alignright { float: right; margin-left: 2em; }",g=g+".wp-site-blocks > .aligncenter { justify-content: center; margin-left: auto; margin-right: auto; }"),l.blockGap&&r){let v=qj(e?.styles?.spacing?.blockGap)||"0.5em";g=g+`:root :where(.wp-site-blocks) > * { margin-block-start: ${v}; margin-block-end: 0; }`,g=g+":root :where(.wp-site-blocks) > :first-child { margin-block-start: 0; }",g=g+":root :where(.wp-site-blocks) > :last-child { margin-block-end: 0; }"}return l.presets&&u.forEach(({selector:v,presets:y})=>{(Yu===v||kC===v)&&(v="");let b=I9e(v,y);b.length>0&&(g+=b)}),g};function Y9e(e,t){return Kj(e,t).flatMap(({presets:o})=>O9e(o))}var q9e=(e,t)=>{if(e?.selectors&&Object.keys(e.selectors).length>0)return e.selectors;let r={root:t};return Object.entries(R9e).forEach(([o,n])=>{let i=sw(e,o);i&&(r[n]=i)}),r},K9e=(e,t)=>{let{getBlockStyles:r}=(0,due.select)(Vi.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,Vi.getBlockSupport)(n,"color.__experimentalDuotone",!1);typeof g=="string"&&h&&(l=kc(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}`,y=Hj(v,s);f[v]=y});let m=q9e(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 Z9e(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 hue(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(" ")?kc(t,f):kO(t,f),r+=`:root :where(${m})${d}{${c.trim()}}`}}),r}function Bv(e={},t=[],r={}){let{hasBlockGapSupport:o,hasFallbackGapSupport:n,disableLayoutStyles:i=!1,disableRootPadding:s=!1,styleOptions:l={}}=r,c=t.length>0?t:(0,Vi.getBlockTypes)(),u=Fv(e,"spacing.blockGap"),d=o??u!==null,f=n??!d;if(!e?.styles||!e?.settings)return[[],{}];let m=Z9e(e),h=K9e(c),g=U9e(m,h),v=G9e(m,h,d,f,i,s,l),y=Y9e(m,h),b=[{css:g,isGlobalStyles:!0},{css:v,isGlobalStyles:!0},{css:m?.styles?.css??"",isGlobalStyles:!0},{assets:y,__unstableType:"svgs",isGlobalStyles:!0}];return c.forEach(w=>{let S=m?.styles?.blocks?.[w.name];if(S?.css){let{featureSelectors:x}=h[w.name],_=typeof x=="object"?x?.css:void 0,P;typeof _=="string"?P=_:typeof _=="object"&&(P=_?.root);let I=P??h[w.name].selector;b.push({css:hue(S.css,I),isGlobalStyles:!0})}}),[b,m.settings]}function Zj(e,t){if(!e||!t)return"";let r={settings:{},styles:{blocks:{[t]:e}}};try{let[o]=Bv(r,[]);return o.map(n=>n.css).join(`
`)}catch{return""}}var Xj=a(U(),1);var gue=a(U(),1),Wo=(0,gue.createContext)({user:{styles:{},settings:{}},base:{styles:{},settings:{}},merged:{styles:{},settings:{}},onChange:()=>{},fontLibraryEnabled:!1});var vue=a(T(),1);function OC({children:e,value:t,baseValue:r,onChange:o,fontLibraryEnabled:n}){let i=(0,Xj.useMemo)(()=>Bi(r,t),[r,t]),s=(0,Xj.useMemo)(()=>({user:t,base:r,merged:i,onChange:o,fontLibraryEnabled:n}),[t,r,i,o,n]);return(0,vue.jsx)(Wo.Provider,{value:s,children:e})}var co=a(W(),1),Uv=a(j(),1);var Uue=a(G(),1),Wue=a(ee(),1);var yue=a(T(),1);function NC({className:e,...t}){return(0,yue.jsx)(cn,{className:Z(e,"global-styles-ui-icon-with-current-color"),...t})}var th=a(W(),1);var Vv=a(T(),1);function X9e({icon:e,children:t,...r}){return(0,Vv.jsxs)(th.__experimentalItem,{...r,children:[e&&(0,Vv.jsxs)(th.__experimentalHStack,{justify:"flex-start",children:[(0,Vv.jsx)(NC,{icon:e,size:24}),(0,Vv.jsx)(th.FlexItem,{children:t})]}),!e&&t]})}function lo(e){return(0,Vv.jsx)(th.Navigator.Button,{as:X9e,...e})}var Aue=a(W(),1);var jv=a(j(),1),Iue=a(he(),1);var Qj=function(e){var t=e/255;return t<.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)},Jj=function(e){return .2126*Qj(e.r)+.7152*Qj(e.g)+.0722*Qj(e.b)};function MO(e){e.prototype.luminance=function(){return t=Jj(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=Jj(i),c=Jj(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 Al=a(U(),1),Eue=a(G(),1),Pue=a(ee(),1),ez=a(j(),1);var Go=a(j(),1),bue={link:[{value:":link",label:(0,Go.__)("Link")},{value:":any-link",label:(0,Go.__)("Any Link")},{value:":visited",label:(0,Go.__)("Visited")},{value:":hover",label:(0,Go.__)("Hover")},{value:":focus",label:(0,Go.__)("Focus")},{value:":focus-visible",label:(0,Go.__)("Focus-visible")},{value:":active",label:(0,Go.__)("Active")}],button:[{value:":link",label:(0,Go.__)("Link")},{value:":any-link",label:(0,Go.__)("Any Link")},{value:":visited",label:(0,Go.__)("Visited")},{value:":hover",label:(0,Go.__)("Hover")},{value:":focus",label:(0,Go.__)("Focus")},{value:":focus-visible",label:(0,Go.__)("Focus-visible")},{value:":active",label:(0,Go.__)("Active")}]},wue={"core/button":[{value:":hover",label:(0,Go.__)("Hover")},{value:":focus",label:(0,Go.__)("Focus")},{value:":focus-visible",label:(0,Go.__)("Focus-visible")},{value:":active",label:(0,Go.__)("Active")}]},Q9e=[{value:"tablet",label:(0,Go.__)("Tablet")},{value:"mobile",label:(0,Go.__)("Mobile")}];function xue(e){return wue[e]?wue[e]??[]:bue[e]?bue[e]:[]}function _ue(){return Q9e}function $j(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"&&$j(e[r],t);return e}var DO=(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=DO(e[o],t);Object.keys(n).length&&(r[o]=n)}}),r};function MC(e,t){let r=DO(structuredClone(e),t);return Lv(r,e)}function Sue(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 Cue(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=Sue(o,n),s=e?.styles?.elements?.heading?.typography?.fontFamily,l;return s?l=Sue(o,e?.styles?.elements?.heading?.typography?.fontFamily):l=i,[i,l]}function Tue(e){return e?`is-style-${e}`:""}function FO(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}yI([MO]);function ze(e,t,r="merged",o=!0,n){let{user:i,base:s,merged:l,onChange:c}=(0,Al.useContext)(Wo),u=n?.split(".").filter(Boolean)??[],d=u.find(y=>y.startsWith(":")),f=u.filter(y=>!y.startsWith(":")).join("."),m=[e,f].filter(Boolean).join("."),h=l;r==="base"?h=s:r==="user"&&(h=i);let g=(0,Al.useMemo)(()=>{let y=iw(h,m,t,o);return d?y?.[d]??{}:y},[h,m,t,o,d]),v=(0,Al.useCallback)(y=>{let b=y;d&&(b={...iw(i,m,t,!1),[d]:y});let w=RC(i,m,b,t);c(w)},[i,c,m,t,d]);return[g,v]}function Ae(e,t,r="merged"){let{user:o,base:n,merged:i,onChange:s}=(0,Al.useContext)(Wo),l=i;r==="base"?l=n:r==="user"&&(l=o);let c=(0,Al.useMemo)(()=>Fv(l,e,t),[l,e,t]),u=(0,Al.useCallback)(d=>{let f=TC(o,e,d,t);s(f)},[o,s,e,t]);return[c,u]}var J9e=[];function $9e({title:e,settings:t,styles:r}){return e===(0,ez.__)("Default")||Object.keys(t||{}).length>0||Object.keys(r||{}).length>0}function LO(e=[]){let{variationsFromTheme:t}=(0,Eue.useSelect)(o=>({variationsFromTheme:o(Pue.store).__experimentalGetCurrentThemeGlobalStylesVariations?.()||J9e}),[]),{user:r}=(0,Al.useContext)(Wo);return(0,Al.useMemo)(()=>{let o=structuredClone(r),n=$j(o,e);n.title=(0,ez.__)("Default");let i=t.filter(l=>MC(l,e)).map(l=>Bi(n,l)),s=[n,...i];return s?.length?s.filter($9e):[]},[e,r,t])}function kue(e){let[t,r]=Ae("color.palette.theme",e),o=(0,Al.useCallback)(()=>{if(!t||!t.length)return;let n=Math.floor(Math.random()*225),i=t.map(s=>{let{color:l}=s,c=_o(l).rotate(n).toHex();return{...s,color:c}});r(i)},[t,r]);return window.__experimentalEnableColorRandomizer?[o]:[]}var Rue=a(Pm(),1),{lock:gBt,unlock:Tt}=(0,Rue.__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 Rc=a(T(),1),{useHasDimensionsPanel:eje,useHasTypographyPanel:tje,useHasColorPanel:rje,useSettingsForBlockElement:oje,useHasBackgroundPanel:nje}=Tt(Iue.privateApis);function ije(){let[e]=Ae(""),t=oje(e),r=nje(e),o=tje(t),n=rje(t),i=!0,l=eje(t);return(0,Rc.jsx)(Rc.Fragment,{children:(0,Rc.jsxs)(Aue.__experimentalItemGroup,{children:[o&&(0,Rc.jsx)(lo,{icon:dL,path:"/typography",children:(0,jv.__)("Typography")}),n&&(0,Rc.jsx)(lo,{icon:U3,path:"/colors",children:(0,jv.__)("Colors")}),r&&(0,Rc.jsx)(lo,{icon:g3,path:"/background","aria-label":(0,jv.__)("Background styles"),children:(0,jv.__)("Background")}),i&&(0,Rc.jsx)(lo,{icon:t_,path:"/shadows",children:(0,jv.__)("Shadows")}),l&&(0,Rc.jsx)(lo,{icon:oc,path:"/layout",children:(0,jv.__)("Layout")})]})})}var Oue=ije;var qu=a(W(),1);function aw(){let[e="black"]=ze("color.text"),[t="white"]=ze("color.background"),[r=e]=ze("elements.h1.color.text"),[o=r]=ze("elements.link.color.text"),[n=o]=ze("elements.button.color.background"),[i]=Ae("color.palette.core")||[],[s]=Ae("color.palette.theme")||[],[l]=Ae("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 Due=a(U(),1),Fue=a(W(),1),rz=a(j(),1);function sje(e,t){return t.length===0?null:(t.sort((r,o)=>Math.abs(e-r)-Math.abs(e-o)),t[0])}function aje(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 Nue(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 tz(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 zv(e){let t={fontFamily:Nue(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=aje(r),n=sje(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 Mue(e){return{fontFamily:Nue(e.fontFamily),fontStyle:e.fontStyle||"normal",fontWeight:e.fontWeight||"400"}}var DC=a(T(),1);function BO({fontSize:e,variation:t}){let{base:r}=(0,Due.useContext)(Wo),o=r;t&&(o={...r,...t});let[n]=ze("color.text"),[i,s]=Cue(o),l=i?zv(i):{},c=s?zv(s):{};return n&&(l.color=n,c.color=n),e&&(l.fontSize=e,c.fontSize=e),(0,DC.jsxs)(Fue.__unstableMotion.div,{animate:{scale:1,opacity:1},initial:{scale:.1,opacity:0},transition:{delay:.3,type:"tween"},style:{textAlign:"center",lineHeight:1},children:[(0,DC.jsx)("span",{style:c,children:(0,rz._x)("A","Uppercase letter A")}),(0,DC.jsx)("span",{style:l,children:(0,rz._x)("a","Lowercase letter A")})]})}var Lue=a(W(),1);var Bue=a(T(),1);function Vue({normalizedColorSwatchSize:e,ratio:t}){let{highlightedColors:r}=aw(),o=e*t;return r.map(({slug:n,color:i},s)=>(0,Bue.jsx)(Lue.__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 Hue=a(W(),1),lw=a(_e(),1),Hv=a(U(),1);var rh=a(T(),1),jue=248,zue=152,lje={leading:!0,trailing:!0};function cje({children:e,label:t,isFocused:r,withHoverView:o}){let[n="white"]=ze("color.background"),[i]=ze("color.gradient"),s=(0,lw.useReducedMotion)(),[l,c]=(0,Hv.useState)(!1),[u,{width:d}]=(0,lw.useResizeObserver)(),[f,m]=(0,Hv.useState)(d),[h,g]=(0,Hv.useState)(),v=(0,lw.useThrottle)(m,250,lje);(0,Hv.useLayoutEffect)(()=>{d&&v(d)},[d,v]),(0,Hv.useLayoutEffect)(()=>{let S=f?f/jue:1,x=S-(h||0);(Math.abs(x)>.1||!h)&&g(S)},[f,h]);let y=d?d/jue:1,b=h||y;return(0,rh.jsxs)(rh.Fragment,{children:[(0,rh.jsx)("div",{style:{position:"relative"},children:u}),!!d&&(0,rh.jsx)("div",{className:Z("global-styles-ui-preview__wrapper",{"is-hoverable":o}),style:{height:zue*b},onMouseEnter:()=>c(!0),onMouseLeave:()=>c(!1),tabIndex:-1,children:(0,rh.jsx)(Hue.__unstableMotion.div,{style:{height:zue*b,width:"100%",background:i??n},initial:"start",animate:(l||r)&&!s&&t?"hover":"start",children:[].concat(e).map((S,x)=>S({ratio:b,key:x}))})})]})}var cw=cje;var na=a(T(),1),uje={start:{scale:1,opacity:1},hover:{scale:0,opacity:0}},dje={hover:{opacity:1},start:{opacity:.5}},fje={hover:{scale:1,opacity:1},start:{scale:0,opacity:0}};function mje({label:e,isFocused:t,withHoverView:r,variation:o}){let[n]=ze("typography.fontWeight"),[i="serif"]=ze("typography.fontFamily"),[s=i]=ze("elements.h1.typography.fontFamily"),[l=n]=ze("elements.h1.typography.fontWeight"),[c="black"]=ze("color.text"),[u=c]=ze("elements.h1.color.text"),{paletteColors:d}=aw();return(0,na.jsxs)(cw,{label:e,isFocused:t,withHoverView:r,children:[({ratio:f,key:m})=>(0,na.jsx)(qu.__unstableMotion.div,{variants:uje,style:{height:"100%",overflow:"hidden"},children:(0,na.jsxs)(qu.__experimentalHStack,{spacing:10*f,justify:"center",style:{height:"100%",overflow:"hidden"},children:[(0,na.jsx)(BO,{fontSize:65*f,variation:o}),(0,na.jsx)(qu.__experimentalVStack,{spacing:4*f,children:(0,na.jsx)(Vue,{normalizedColorSwatchSize:32,ratio:f})})]})},m),({key:f})=>(0,na.jsx)(qu.__unstableMotion.div,{variants:r?dje:void 0,style:{height:"100%",width:"100%",position:"absolute",top:0,overflow:"hidden",filter:"blur(60px)",opacity:.1},children:(0,na.jsx)(qu.__experimentalHStack,{spacing:0,justify:"flex-start",style:{height:"100%",overflow:"hidden"},children:d.slice(0,4).map(({color:m},h)=>(0,na.jsx)("div",{style:{height:"100%",background:m,flexGrow:1}},h))})},f),({ratio:f,key:m})=>(0,na.jsx)(qu.__unstableMotion.div,{variants:fje,style:{height:"100%",width:"100%",overflow:"hidden",position:"absolute",top:0},children:(0,na.jsx)(qu.__experimentalVStack,{spacing:3*f,justify:"center",style:{height:"100%",overflow:"hidden",padding:10*f,boxSizing:"border-box"},children:e&&(0,na.jsx)("div",{style:{fontSize:40*f,fontFamily:s,color:u,fontWeight:l,lineHeight:"1em",textAlign:"center"},children:e})})},m)]})}var VO=mje;var Po=a(T(),1);function pje(){let e=(0,Uue.useSelect)(t=>{let{__experimentalGetCurrentThemeGlobalStylesVariations:r}=t(Wue.store);return!!r()?.length},[]);return(0,Po.jsxs)(co.Card,{size:"small",isBorderless:!0,className:"global-styles-ui-screen-root",isRounded:!1,children:[(0,Po.jsx)(co.CardBody,{children:(0,Po.jsxs)(co.__experimentalVStack,{spacing:4,children:[(0,Po.jsx)(co.Card,{className:"global-styles-ui-screen-root__active-style-tile",children:(0,Po.jsx)(co.CardMedia,{className:"global-styles-ui-screen-root__active-style-tile-preview",children:(0,Po.jsx)(VO,{})})}),e&&(0,Po.jsx)(co.__experimentalItemGroup,{children:(0,Po.jsx)(lo,{path:"/variations",children:(0,Po.jsxs)(co.__experimentalHStack,{justify:"space-between",children:[(0,Po.jsx)(co.FlexItem,{children:(0,Uv.__)("Browse styles")}),(0,Po.jsx)(NC,{icon:(0,Uv.isRTL)()?pr:hr})]})})}),(0,Po.jsx)(Oue,{})]})}),(0,Po.jsx)(co.CardDivider,{}),(0,Po.jsxs)(co.CardBody,{children:[(0,Po.jsx)(co.__experimentalSpacer,{as:"p",paddingTop:2,paddingX:"13px",marginBottom:4,children:(0,Uv.__)("Customize the appearance of specific blocks for the whole site.")}),(0,Po.jsx)(co.__experimentalItemGroup,{children:(0,Po.jsx)(lo,{path:"/blocks",children:(0,Po.jsxs)(co.__experimentalHStack,{justify:"space-between",children:[(0,Po.jsx)(co.FlexItem,{children:(0,Uv.__)("Blocks")}),(0,Po.jsx)(NC,{icon:(0,Uv.isRTL)()?pr:hr})]})})})]})]})}var Gue=pje;var nz=a(bt(),1),Ku=a(j(),1),oh=a(W(),1),iz=a(G(),1),Zu=a(U(),1),zO=a(he(),1),Que=a(_e(),1),Jue=a(ub(),1);var Yue=a(bt(),1),que=a(G(),1),Kue=a(W(),1);var oz=a(T(),1);function hje(e,t){return e?.filter(r=>r.source==="block"||t.includes(r.name))||[]}function FC(e){let t=(0,que.useSelect)(n=>{let{getBlockStyles:i}=n(Yue.store);return i(e)},[e]),[r]=ze("variations",e),o=Object.keys(r??{});return hje(t,o)}function Zue({name:e}){let t=FC(e);return(0,oz.jsx)(Kue.__experimentalItemGroup,{isBordered:!0,isSeparated:!0,children:t.map((r,o)=>r?.isDefault?null:(0,oz.jsx)(lo,{path:"/blocks/"+encodeURIComponent(e)+"/variations/"+encodeURIComponent(r.name),children:r.label},o))})}var Ln=a(W(),1),jO=a(j(),1);var Xue=a(he(),1);var Cs=a(T(),1),{StateControl:gje,StateControlBadges:vje}=Tt(Xue.privateApis);function Qt({title:e,description:t,onBack:r,viewportStates:o,pseudoStates:n,selectedViewport:i="default",selectedPseudoState:s="default",onChangeViewport:l,onChangePseudoState:c}){return(0,Cs.jsx)(Ln.__experimentalVStack,{spacing:0,children:(0,Cs.jsx)(Ln.__experimentalView,{children:(0,Cs.jsx)(Ln.__experimentalSpacer,{marginBottom:0,paddingX:4,paddingY:3,children:(0,Cs.jsxs)(Ln.__experimentalVStack,{spacing:2,children:[(0,Cs.jsxs)(Ln.__experimentalHStack,{spacing:2,alignment:"top",children:[(0,Cs.jsx)(Ln.Navigator.BackButton,{icon:(0,jO.isRTL)()?hr:pr,size:"small",label:(0,jO.__)("Back"),onClick:r}),(0,Cs.jsx)(Ln.__experimentalSpacer,{children:(0,Cs.jsxs)(Ln.__experimentalHStack,{justify:"space-between",alignment:"top",children:[(0,Cs.jsx)(Ln.__experimentalHeading,{className:"global-styles-ui-header",level:2,size:13,children:e}),(0,Cs.jsxs)(Ln.__experimentalVStack,{spacing:2,alignment:"right",children:[(0,Cs.jsx)(gje,{viewportStates:o,pseudoStates:n,viewportValue:i,pseudoStateValue:s,onChangeViewport:l,onChangePseudoState:c}),(0,Cs.jsx)(vje,{viewportStates:o,pseudoStates:n,viewportValue:i,pseudoStateValue:s})]})]})})]}),t&&(0,Cs.jsx)(Ln.__experimentalText,{className:"global-styles-ui-header__description",children:t})]})})})})}var Ts=a(T(),1),{useHasDimensionsPanel:yje,useHasTypographyPanel:bje,useHasBorderPanel:wje,useSettingsForBlockElement:Sje,useHasColorPanel:xje}=Tt(zO.privateApis);function _je(){let e=(0,iz.useSelect)(n=>n(nz.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 Cje(e){let[t]=Ae("",e),r=Sje(t,e),o=bje(r),n=xje(r),i=wje(r),s=yje(r),l=i||s,c=!!FC(e)?.length;return o||n||l||c}function Tje({block:e}){return Cje(e.name)?(0,Ts.jsx)(lo,{path:"/blocks/"+encodeURIComponent(e.name),children:(0,Ts.jsxs)(oh.__experimentalHStack,{justify:"flex-start",children:[(0,Ts.jsx)(zO.BlockIcon,{icon:e.icon}),(0,Ts.jsx)(oh.FlexItem,{children:e.title})]})}):null}function Eje({filterValue:e}){let t=_je(),r=(0,Que.useDebounce)(Jue.speak,500),{isMatchingSearchTerm:o}=(0,iz.useSelect)(nz.store),n=e?t.filter(s=>o(s,e)):t,i=(0,Zu.useRef)(null);return(0,Zu.useEffect)(()=>{if(!e)return;let s=i.current?.childElementCount||0,l=(0,Ku.sprintf)((0,Ku._n)("%d result found.","%d results found.",s),s);r(l,"polite")},[e,r]),(0,Ts.jsx)("div",{ref:i,className:"global-styles-ui-block-types-item-list",role:"list",children:n.length===0?(0,Ts.jsx)(oh.__experimentalText,{align:"center",as:"p",children:(0,Ku.__)("No blocks found.")}):n.map(s=>(0,Ts.jsx)(Tje,{block:s},"menu-itemblock-"+s.name))})}var Pje=(0,Zu.memo)(Eje);function kje(){let[e,t]=(0,Zu.useState)(""),r=(0,Zu.useDeferredValue)(e);return(0,Ts.jsxs)(Ts.Fragment,{children:[(0,Ts.jsx)(Qt,{title:(0,Ku.__)("Blocks"),description:(0,Ku.__)("Customize the appearance of specific blocks and for the whole site.")}),(0,Ts.jsx)(oh.SearchControl,{className:"global-styles-ui-block-types-search",onChange:t,value:e,label:(0,Ku.__)("Search"),placeholder:(0,Ku.__)("Search")}),(0,Ts.jsx)(Pje,{filterValue:r})]})}var $ue=kje;var ide=a(bt(),1),sde=a(he(),1),Ac=a(U(),1),ade=a(G(),1),lde=a(ee(),1),Wv=a(W(),1),uw=a(j(),1);var ede=a(he(),1),UO=a(bt(),1),tde=a(W(),1),sz=a(U(),1);var HO=a(T(),1),Rje={default:783,tablet:600,mobile:480},Aje=({name:e,variation:t="",selectedViewport:r="default",selectedState:o="default",stateStyles:n})=>{let i=(0,UO.getBlockType)(e)?.example,s=(0,sz.useMemo)(()=>{if(!i)return null;let y={...i,attributes:{...i.attributes,style:void 0,className:t?Tue(t):i.attributes?.className}};return(0,UO.getBlockFromExample)(e,y)},[e,i,t]),l=(0,sz.useMemo)(()=>o==="default"||!n?"":Zj(n,e),[o,n,e]);if(!i)return null;let c=Rje[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,HO.jsx)(tde.__experimentalSpacer,{marginX:4,marginBottom:4,children:(0,HO.jsx)("div",{className:"global-styles-ui__block-preview-panel",style:{maxHeight:m,boxSizing:"initial"},children:(0,HO.jsx)(ede.BlockPreview,{blocks:s,viewportWidth:c,minHeight:m,additionalStyles:[{css:`
								body{
									padding: ${f}px;
									min-height:${Math.round(v)}px;
									display:flex;
								}
								.is-root-container {
									width: ${100/d}%;
									transform: scale(${d});
									transform-origin: top left;
								}
								${l}
							`}]})})})},rde=Aje;var ode=a(W(),1),nde=a(T(),1);function ko({children:e,level:t=2}){return(0,nde.jsx)(ode.__experimentalHeading,{className:"global-styles-ui-subtitle",level:t,children:e})}var rn=a(T(),1),Ije={backgroundSize:"cover",backgroundPosition:"50% 50%"};function LC(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 Oje(e){return e&&((0,Wv.__experimentalHasSplitBorders)(e)?{top:LC(e.top),right:LC(e.right),bottom:LC(e.bottom),left:LC(e.left)}:LC(e))}var{useHasDimensionsPanel:Nje,useHasTypographyPanel:Mje,useHasBorderPanel:Dje,useSettingsForBlockElement:Fje,useHasColorPanel:Lje,useHasFiltersPanel:Bje,useHasImageSettingsPanel:Vje,useHasBackgroundPanel:jje,BackgroundPanel:zje,BorderPanel:Hje,ColorPanel:Uje,TypographyPanel:Wje,DimensionsPanel:Gje,FiltersPanel:Yje,ImageSettingsPanel:qje,AdvancedPanel:Kje}=Tt(sde.privateApis);function Zje({name:e,variation:t}){let{user:r,onChange:o}=(0,Ac.useContext)(Wo),n=[];t&&(n=["variations",t].concat(n));let i=n.join("."),[s,l]=(0,Ac.useState)("default"),[c,u]=(0,Ac.useState)("default"),d=(0,Ac.useMemo)(()=>_ue(),[]),f=(0,Ac.useMemo)(()=>xue(e),[e]),m=[s,c].filter(X=>X!=="default").join("."),h=m.length>0,[g,v]=ze(i,e,"user",!1,h?m:void 0),[y]=ze(i,e,"merged",!1,h?m:void 0),[b]=Ae("",e,"user"),[w,S]=Ae("",e),x=Fje(w,e),_=(0,ide.getBlockType)(e),P=!1;x?.spacing?.blockGap&&_?.supports?.spacing?.blockGap&&(_?.supports?.spacing?.__experimentalSkipSerialization===!0||_?.supports?.spacing?.__experimentalSkipSerialization?.some?.(X=>X==="blockGap"))&&(P=!0);let I=!1;x?.dimensions?.aspectRatio&&e==="core/group"&&(I=!0);let A=(0,Ac.useMemo)(()=>{let X=structuredClone(x);return P&&(X.spacing.blockGap=!1),I&&(X.dimensions.aspectRatio=!1),X},[x,P,I]),k=FC(e),D=jje(A),E=Mje(A),C=Lje(A),M=Dje(A),B=Nje(A),z=Bje(A)&&s==="default",O=Vje(e,b,A),F=!!k?.length&&!t,{canEditCSS:L}=(0,ade.useSelect)(X=>{let{getEntityRecord:oe,__experimentalGetCurrentGlobalStylesId:pe}=X(lde.store),be=pe();return{canEditCSS:!!(be?oe("root","globalStyles",be):void 0)?._links?.["wp:action-edit-css"]}},[]),H=t?k.find(X=>X.name===t):null,q=(0,Ac.useMemo)(()=>({...y,layout:A.layout}),[y,A.layout]),Q=(0,Ac.useMemo)(()=>({...g,layout:b.layout}),[g,b.layout]),J=X=>{let oe={...X};delete oe.layout,v(oe),X.layout!==b.layout&&S({...b,layout:X.layout})},te=X=>{S(X===void 0?{...w,lightbox:void 0}:{...w,lightbox:{...w.lightbox,...X}})},se=X=>{let{settings:oe,...pe}=X;if(oe?.typography){let be=[i,m].filter(Boolean).join("."),Ce=RC(r,be,pe,e);Ce=TC(Ce,"typography",{...b.typography,...oe.typography},e),o(Ce)}else v(pe)},$=X=>{if(!X?.border){v(X);return}let{radius:oe,...pe}=X.border,be=Oje(pe),Ce=(0,Wv.__experimentalHasSplitBorders)(be)?{color:null,style:null,width:null,...be}:{top:be,right:be,bottom:be,left:be};v({...X,border:{...Ce,radius:oe}})};return(0,rn.jsxs)(rn.Fragment,{children:[(0,rn.jsx)(Qt,{title:t?H?.label:_?.title,viewportStates:d,pseudoStates:f,selectedViewport:s,selectedPseudoState:c,onChangeViewport:l,onChangePseudoState:u}),(0,rn.jsx)(rde,{name:e,variation:t,selectedViewport:s,selectedState:h?m:"default",stateStyles:h?y:void 0}),F&&(0,rn.jsx)("div",{className:"global-styles-ui-screen-variations",children:(0,rn.jsxs)(Wv.__experimentalVStack,{spacing:3,children:[(0,rn.jsx)(ko,{children:(0,uw.__)("Style Variations")}),(0,rn.jsx)(Zue,{name:e})]})}),C&&(0,rn.jsx)(Uje,{inheritedValue:y,value:g,onChange:v,settings:A}),D&&(0,rn.jsx)(zje,{inheritedValue:y,value:g,onChange:v,settings:A,defaultValues:Ije}),E&&(0,rn.jsx)(Wje,{inheritedValue:y,value:g,onChange:se,settings:A,isGlobalStyles:!h}),B&&(0,rn.jsx)(Gje,{inheritedValue:q,value:Q,onChange:J,settings:A,includeLayoutControls:!0}),M&&(0,rn.jsx)(Hje,{inheritedValue:y,value:g,onChange:$,settings:A}),z&&(0,rn.jsx)(Yje,{inheritedValue:q,value:Q,onChange:v,settings:A,includeLayoutControls:!0}),O&&!h&&(0,rn.jsx)(qje,{onChange:te,value:b,inheritedValue:A}),L&&(0,rn.jsx)(Wv.PanelBody,{title:(0,uw.__)("Advanced"),initialOpen:!1,children:(0,rn.jsx)(Kje,{value:g,onChange:v,inheritedValue:y,help:(0,uw.sprintf)((0,uw.__)("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."),_?.title)})})]})}var az=Zje;var p5=a(j(),1),xfe=a(W(),1),_fe=a(U(),1);var cde=a(W(),1);var ude=a(T(),1);function nh({children:e,className:t}){return(0,ude.jsx)(cde.__experimentalSpacer,{className:Z("global-styles-ui-screen-body",t),padding:4,children:e})}var ih=a(j(),1),Rf=a(W(),1);var ia=a(T(),1);function BC({parentMenu:e,element:t,label:r}){let o=t==="text"||!t?"":`elements.${t}.`,n=t==="link"?{textDecoration:"underline"}:{},[i]=ze(o+"typography.fontFamily"),[s]=ze(o+"typography.fontStyle"),[l]=ze(o+"typography.fontWeight"),[c]=ze(o+"color.background"),[u]=ze("color.background"),[d]=ze(o+"color.gradient"),[f]=ze(o+"color.text");return(0,ia.jsx)(lo,{path:e+"/typography/"+t,children:(0,ia.jsxs)(Rf.__experimentalHStack,{justify:"flex-start",children:[(0,ia.jsx)(Rf.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,ih.__)("Aa")}),(0,ia.jsx)(Rf.FlexItem,{children:r})]})})}function Xje(){return(0,ia.jsxs)(Rf.__experimentalVStack,{spacing:3,children:[(0,ia.jsx)(ko,{level:3,children:(0,ih.__)("Elements")}),(0,ia.jsxs)(Rf.__experimentalItemGroup,{isBordered:!0,isSeparated:!0,children:[(0,ia.jsx)(BC,{parentMenu:"",element:"text",label:(0,ih.__)("Text")}),(0,ia.jsx)(BC,{parentMenu:"",element:"link",label:(0,ih.__)("Links")}),(0,ia.jsx)(BC,{parentMenu:"",element:"heading",label:(0,ih.__)("Headings")}),(0,ia.jsx)(BC,{parentMenu:"",element:"caption",label:(0,ih.__)("Captions")}),(0,ia.jsx)(BC,{parentMenu:"",element:"button",label:(0,ih.__)("Buttons")})]})]})}var dde=Xje;var YO=a(W(),1);var fde=a(W(),1);var WO=a(T(),1),Qje=({variation:e,isFocused:t,withHoverView:r})=>(0,WO.jsx)(cw,{label:e.title,isFocused:t,withHoverView:r,children:({ratio:o,key:n})=>(0,WO.jsx)(fde.__experimentalHStack,{spacing:10*o,justify:"center",style:{height:"100%",overflow:"hidden"},children:(0,WO.jsx)(BO,{variation:e,fontSize:85*o})},n)}),mde=Qje;var pde=a(W(),1),Gv=a(U(),1),hde=a(yo(),1),GO=a(j(),1);var VC=a(T(),1);function dw({variation:e,children:t,isPill:r=!1,properties:o,showTooltip:n=!1}){let[i,s]=(0,Gv.useState)(!1),{base:l,user:c,onChange:u}=(0,Gv.useContext)(Wo),d=(0,Gv.useMemo)(()=>{let y=Bi(l,e);return o&&(y=DO(y,o)),{user:e,base:l,merged:y,onChange:()=>{}}},[e,l,o]),f=()=>u(e),m=y=>{y.keyCode===hde.ENTER&&(y.preventDefault(),f())},h=(0,Gv.useMemo)(()=>Lv(c,e),[c,e]),g=e?.title;e?.description&&(g=(0,GO.sprintf)((0,GO._x)("%1$s (%2$s)","variation label"),e?.title,e?.description));let v=(0,VC.jsx)("div",{className:Z("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,VC.jsx)("div",{className:Z("global-styles-ui-variations_item-preview",{"is-pill":r}),children:t(i)})});return(0,VC.jsx)(Wo.Provider,{value:d,children:n?(0,VC.jsx)(pde.Tooltip,{text:e?.title,children:v}):v})}var Yv=a(T(),1),gde=["typography"];function fw({title:e,gap:t=2}){let r=LO(gde);return r?.length<=1?null:(0,Yv.jsxs)(YO.__experimentalVStack,{spacing:3,children:[e&&(0,Yv.jsx)(ko,{level:3,children:e}),(0,Yv.jsx)(YO.__experimentalGrid,{columns:3,gap:t,className:"global-styles-ui-style-variations-container",children:r.map((o,n)=>(0,Yv.jsx)(dw,{variation:o,properties:gde,showTooltip:!0,children:()=>(0,Yv.jsx)(mde,{variation:o})},n))})]})}var Jv=a(j(),1),Oc=a(W(),1);var bfe=a(U(),1);var If=a(U(),1),lh=a(G(),1),ah=a(ee(),1),dz=a(j(),1);var lz=a(Fd(),1),vde=a(ee(),1),yde="/wp/v2/font-families";function bde(e){let{receiveEntityRecords:t}=e.dispatch(vde.store);t("postType","wp_font_family",[],void 0,!0)}async function wde(e,t){let o=await(0,lz.default)({path:yde,method:"POST",body:e});return bde(t),{id:o.id,...o.font_family_settings,fontFace:[]}}async function Sde(e,t,r){let o={path:`${yde}/${e}/font-faces`,method:"POST",body:t},n=await(0,lz.default)(o);return bde(r),{id:n.id,...n.font_face_settings}}var Cde=a(W(),1);var Il=a(j(),1),cz=["otf","ttf","woff","woff2"],xde={100:(0,Il._x)("Thin","font weight"),200:(0,Il._x)("Extra-light","font weight"),300:(0,Il._x)("Light","font weight"),400:(0,Il._x)("Normal","font weight"),500:(0,Il._x)("Medium","font weight"),600:(0,Il._x)("Semi-bold","font weight"),700:(0,Il._x)("Bold","font weight"),800:(0,Il._x)("Extra-bold","font weight"),900:(0,Il._x)("Black","font weight")},_de={normal:(0,Il._x)("Normal","font style"),italic:(0,Il._x)("Italic","font style")};var{File:Tde}=window,{kebabCase:Jje}=Tt(Cde.privateApis);function Af(e,t={}){return!e.name&&(e.fontFamily||e.slug)&&(e.name=e.fontFamily||e.slug),{...e,...t}}function $je(e){return typeof e!="string"?!1:e!==decodeURIComponent(e)}function qO(e){let t=xde[e.fontWeight??""]||e.fontWeight,r=e.fontStyle==="normal"?"":_de[e.fontStyle??""]||e.fontStyle;return`${t} ${r}`}function eze(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 Ede(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=eze(s.fontFace,n);r.set(o.slug,{...i,fontFace:l})}else r.set(o.slug,{...o});return Array.from(r.values())}async function sh(e,t,r="all"){let o;if(typeof t=="string")o=`url(${t})`;else if(t instanceof Tde)o=await t.arrayBuffer();else return;let i=await new window.FontFace(tz(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 jC(e,t="all"){let r=o=>{o.forEach(n=>{n.family===tz(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 mw(e){if(!e)return;let t;if(Array.isArray(e)?t=e[0]:t=e,!t.startsWith("file:."))return $je(t)||(t=encodeURI(t)),t}function Pde(e){let t=new FormData,{fontFace:r,category:o,...n}=e,i={...n,slug:Jje(e.slug)};return t.append("font_family_settings",JSON.stringify(i)),t}function kde(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 Rde(e,t,r){let o=[];for(let i of t)try{let s=await Sde(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 Ade(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 Tde([o],n,{type:o.type})})));return t.length===1?t[0]:t}function uz(e,t){return t.findIndex(r=>r.fontWeight===e.fontWeight&&r.fontStyle===e.fontStyle)!==-1}function Ide(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 KO(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 Ode=a(T(),1),li=(0,If.createContext)({});li.displayName="FontLibraryContext";function tze({children:e}){let t=(0,lh.useRegistry)(),{saveEntityRecord:r,deleteEntityRecord:o}=(0,lh.useDispatch)(ah.store),{globalStylesId:n}=(0,lh.useSelect)(L=>{let{__experimentalGetCurrentGlobalStylesId:H}=L(ah.store);return{globalStylesId:H()}},[]),i=(0,ah.useEntityRecord)("root","globalStyles",n),[s,l]=(0,If.useState)(!1),{records:c=[],isResolving:u}=(0,ah.useEntityRecords)("postType","wp_font_family",{_embed:!0}),d=(c||[]).map(L=>({id:L.id,...L.font_family_settings||{},fontFace:L?._embedded?.font_faces?.map(H=>H.font_face_settings)||[]}))||[],[f,m]=Ae("typography.fontFamilies"),h=async L=>{if(!i.record)return;let H=i.record,q=Ide(H??{},["settings","typography","fontFamilies"],L);await r("root","globalStyles",q)},[g,v]=(0,If.useState)(""),[y,b]=(0,If.useState)(void 0),w=f?.theme?f.theme.map(L=>Af(L,{source:"theme"})).sort((L,H)=>L.name.localeCompare(H.name)):[],S=f?.custom?f.custom.map(L=>Af(L,{source:"custom"})).sort((L,H)=>L.name.localeCompare(H.name)):[],x=d?d.map(L=>Af(L,{source:"custom"})).sort((L,H)=>L.name.localeCompare(H.name)):[];(0,If.useEffect)(()=>{g||b(void 0)},[g]);let _=L=>{if(!L){b(void 0);return}let q=(L.source==="theme"?w:x).find(Q=>Q.slug===L.slug);b({...q||L,source:L.source})},[P]=(0,If.useState)(new Set),I=L=>L.reduce((q,Q)=>{let J=Q?.fontFace&&Q.fontFace?.length>0?Q?.fontFace.map(te=>`${te.fontStyle??""}${te.fontWeight??""}`):["normal400"];return q[Q.slug]=J,q},{}),A=L=>I(L==="theme"?w:S),k=(L,H,q,Q)=>!H&&!q?!!A(Q)[L]:!!A(Q)[L]?.includes((H??"")+(q??"")),D=(L,H)=>A(H)[L]||[];async function E(L){l(!0);try{let H=[],q=[];for(let J of L){let te=!1,se=await(0,lh.resolveSelect)(ah.store).getEntityRecords("postType","wp_font_family",{slug:J.slug,per_page:1,_embed:!0}),$=se&&se.length>0?se[0]:null,X=$?{id:$.id,...$.font_family_settings,fontFace:($?._embedded?.font_faces??[]).map(Ce=>Ce.font_face_settings)||[]}:null;X||(te=!0,X=await wde(Pde(J),t));let oe=X.fontFace&&J.fontFace?X.fontFace.filter(Ce=>Ce&&J.fontFace&&uz(Ce,J.fontFace)):[];X.fontFace&&J.fontFace&&(J.fontFace=J.fontFace.filter(Ce=>!uz(Ce,X.fontFace)));let pe=[],be=[];if(J?.fontFace?.length??!1){let Ce=await Rde(X.id,kde(J),t);pe=Ce?.successes,be=Ce?.errors}(pe?.length>0||oe?.length>0)&&(X.fontFace=[...pe],H.push(X)),X&&!J?.fontFace?.length&&H.push(X),te&&(J?.fontFace?.length??0)>0&&pe?.length===0&&await o("postType","wp_font_family",X.id,{force:!0}),q=q.concat(be)}let Q=q.reduce((J,te)=>J.includes(te.message)?J:[...J,te.message],[]);if(H.length>0){let J=B(H);await h(J)}if(Q.length>0){let J=new Error((0,dz.__)("There was an error installing fonts."));throw J.installationErrors=Q,J}}finally{l(!1)}}async function C(L){if(!L?.id)throw new Error((0,dz.__)("Font family to uninstall is not defined."));try{await o("postType","wp_font_family",L.id,{force:!0});let H=M(L);return await h(H),{deleted:!0}}catch(H){throw console.error("There was an error uninstalling the font family:",H),H}}let M=L=>{let q=(f?.[L.source??""]??[]).filter(J=>J.slug!==L.slug),Q={...f,[L.source??""]:q};return m(Q),L.fontFace&&L.fontFace.forEach(J=>{jC(J,"all")}),Q},B=L=>{let H=N(L),q={...f,custom:Ede(f?.custom,H)};return m(q),z(H),q},N=L=>L.map(({id:H,fontFace:q,...Q})=>({...Q,...q&&q.length>0?{fontFace:q.map(({id:J,...te})=>te)}:{}})),z=L=>{L.forEach(H=>{H.fontFace&&H.fontFace.forEach(q=>{let Q=mw(q?.src??"");Q&&sh(q,Q,"all")})})},O=(L,H)=>{let q=f?.[L.source??""]??[],Q=KO(L,H,q);m({...f,[L.source??""]:Q});let J=k(L.slug,H?.fontStyle??"",H?.fontWeight??"",L.source??"custom");if(H&&J)jC(H,"all");else{let te=mw(H?.src??"");H&&te&&sh(H,te,"all")}},F=async L=>{if(!L.src)return;let H=mw(L.src);!H||P.has(H)||(sh(L,H,"document"),P.add(H))};return(0,Ode.jsx)(li.Provider,{value:{libraryFontSelected:y,handleSetLibraryFontSelected:_,fontFamilies:f??{},baseCustomFonts:x,isFontActivated:k,getFontFacesActivated:D,loadFontFaceAsset:F,installFonts:E,uninstallFontFamily:C,toggleActivateFont:O,getAvailableFontsOutline:I,modalTabOpen:g,setModalTabOpen:v,saveFontFamilies:h,isResolvingLibrary:u,isInstalling:s},children:e})}var ZO=tze;var vw=a(j(),1),d5=a(W(),1),f5=a(ee(),1),pfe=a(G(),1);var yt=a(W(),1),HC=a(ee(),1),fz=a(G(),1),Kv=a(U(),1),Kr=a(j(),1);var hw=a(j(),1),Ol=a(W(),1);var Nde=a(W(),1),Xu=a(U(),1);var XO=a(T(),1);function rze(e){if(e.preview)return e.preview;if(e.src)return Array.isArray(e.src)?e.src[0]:e.src}function oze(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 nze({font:e,text:t}){let r=(0,Xu.useRef)(null),o=oze(e),n=zv(e);t=t||("name"in e?e.name:"");let i=e.preview,[s,l]=(0,Xu.useState)(!1),[c,u]=(0,Xu.useState)(!1),{loadFontFaceAsset:d}=(0,Xu.useContext)(li),f=i??rze(o),m=f&&f.match(/\.(png|jpg|jpeg|gif|svg)$/i),h=Mue(o),g={fontSize:"18px",lineHeight:1,opacity:c?"1":"0",...n,...h};return(0,Xu.useEffect)(()=>{let v=new window.IntersectionObserver(([y])=>{l(y.isIntersecting)},{});return r.current&&v.observe(r.current),()=>v.disconnect()},[r]),(0,Xu.useEffect)(()=>{(async()=>s&&(!m&&o.src&&await d(o),u(!0)))()},[o,s,d,m]),(0,XO.jsx)("div",{ref:r,children:m?(0,XO.jsx)("img",{src:f,loading:"lazy",alt:t,className:"font-library__font-variant_demo-image"}):(0,XO.jsx)(Nde.__experimentalText,{style:g,className:"font-library__font-variant_demo-text",children:t})})}var pw=nze;var Qu=a(T(),1);function ize({font:e,onClick:t,variantsText:r,navigatorPath:o}){let n=e.fontFace?.length||1,i={cursor:t?"pointer":"default"},s=(0,Ol.useNavigator)();return(0,Qu.jsx)(Ol.Button,{__next40pxDefaultSize:!0,onClick:()=>{t(),o&&s.goTo(o)},style:i,className:"font-library__font-card",children:(0,Qu.jsxs)(Ol.Flex,{justify:"space-between",wrap:!1,children:[(0,Qu.jsx)(pw,{font:e}),(0,Qu.jsxs)(Ol.Flex,{justify:"flex-end",children:[(0,Qu.jsx)(Ol.FlexItem,{children:(0,Qu.jsx)(Ol.__experimentalText,{className:"font-library__font-card__count",children:r||(0,hw.sprintf)((0,hw._n)("%d variant","%d variants",n),n)})}),(0,Qu.jsx)(Ol.FlexItem,{children:(0,Qu.jsx)(cn,{icon:(0,hw.isRTL)()?pr:hr})})]})]})})}var zC=ize;var QO=a(U(),1),JO=a(W(),1);var qv=a(T(),1);function sze({face:e,font:t}){let{isFontActivated:r,toggleActivateFont:o}=(0,QO.useContext)(li),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+" "+qO(e),l=(0,QO.useId)();return(0,qv.jsx)("div",{className:"font-library__font-card",children:(0,qv.jsxs)(JO.Flex,{justify:"flex-start",align:"center",gap:"1rem",children:[(0,qv.jsx)(JO.CheckboxControl,{checked:n,onChange:i,id:l}),(0,qv.jsx)("label",{htmlFor:l,children:(0,qv.jsx)(pw,{font:e,text:s,onClick:i})})]})})}var Mde=sze;function Dde(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 $O(e){return e.sort((t,r)=>t.fontStyle==="normal"&&r.fontStyle!=="normal"?-1:r.fontStyle==="normal"&&t.fontStyle!=="normal"?1:t.fontStyle===r.fontStyle?Dde(t.fontWeight?.toString()??"normal")-Dde(r.fontWeight?.toString()??"normal"):!t.fontStyle||!r.fontStyle?t.fontStyle?-1:1:t.fontStyle.localeCompare(r.fontStyle))}var it=a(T(),1);function aze(){let{baseCustomFonts:e,libraryFontSelected:t,handleSetLibraryFontSelected:r,uninstallFontFamily:o,isResolvingLibrary:n,isInstalling:i,saveFontFamilies:s,getFontFacesActivated:l}=(0,Kv.useContext)(li),[c,u]=Ae("typography.fontFamilies"),[d,f]=(0,Kv.useState)(!1),[m,h]=(0,Kv.useState)(null),[g]=Ae("typography.fontFamilies",void 0,"base"),v=(0,fz.useSelect)(F=>{let{__experimentalGetCurrentGlobalStylesId:L}=F(HC.store);return L()},[]),b=!!(0,HC.useEntityRecord)("root","globalStyles",v)?.edits?.settings?.typography?.fontFamilies,w=c?.theme?c.theme.map(F=>Af(F,{source:"theme"})).sort((F,L)=>F.name.localeCompare(L.name)):[],S=new Set(w.map(F=>F.slug)),x=g?.theme?w.concat(g.theme.filter(F=>!S.has(F.slug)).map(F=>Af(F,{source:"theme"})).sort((F,L)=>F.name.localeCompare(L.name))):[],_=t?.source==="custom"&&t?.id,P=(0,fz.useSelect)(F=>{let{canUser:L}=F(HC.store);return _&&L("delete",{kind:"postType",name:"wp_font_family",id:_})},[_]),I=!!t&&t?.source!=="theme"&&P,A=()=>{f(!0)},k=async()=>{h(null);try{await s(c),h({type:"success",message:(0,Kr.__)("Font family updated successfully.")})}catch(F){h({type:"error",message:(0,Kr.sprintf)((0,Kr.__)("There was an error updating the font family. %s"),F.message)})}},D=F=>F?!F.fontFace||!F.fontFace.length?[{fontFamily:F.fontFamily,fontStyle:"normal",fontWeight:"400"}]:$O(F.fontFace):[],E=F=>{let L=F?.fontFace&&(F?.fontFace?.length??0)>0?F.fontFace.length:1,H=l(F.slug,F.source).length;return(0,Kr.sprintf)((0,Kr.__)("%1$d of %2$d active"),H,L)};(0,Kv.useEffect)(()=>{r(t)},[]);let C=t?l(t.slug,t.source).length:0,M=t?.fontFace?.length??(t?.fontFamily?1:0),B=C>0&&C!==M,N=C===M,z=()=>{if(!t||!t?.source)return;let F=c?.[t.source]?.filter(H=>H.slug!==t.slug)??[],L=N?F:[...F,t];u({...c,[t.source]:L}),t.fontFace&&t.fontFace.forEach(H=>{if(N)jC(H,"all");else{let q=mw(H?.src??"");q&&sh(H,q,"all")}})},O=x.length>0||e.length>0;return(0,it.jsxs)("div",{className:"font-library__tabpanel-layout",children:[n&&(0,it.jsx)("div",{className:"font-library__loading",children:(0,it.jsx)(yt.ProgressBar,{})}),!n&&(0,it.jsxs)(it.Fragment,{children:[(0,it.jsxs)(yt.Navigator,{initialPath:t?"/fontFamily":"/",children:[(0,it.jsx)(yt.Navigator.Screen,{path:"/",children:(0,it.jsxs)(yt.__experimentalVStack,{spacing:"8",children:[m&&(0,it.jsx)(yt.Notice,{status:m.type,onRemove:()=>h(null),children:m.message}),!O&&(0,it.jsx)(yt.__experimentalText,{as:"p",children:(0,Kr.__)("No fonts installed.")}),x.length>0&&(0,it.jsxs)(yt.__experimentalVStack,{children:[(0,it.jsx)("h2",{className:"font-library__fonts-title",children:(0,Kr._x)("Theme","font source")}),(0,it.jsx)("ul",{role:"list",className:"font-library__fonts-list",children:x.map(F=>(0,it.jsx)("li",{className:"font-library__fonts-list-item",children:(0,it.jsx)(zC,{font:F,navigatorPath:"/fontFamily",variantsText:E(F),onClick:()=>{h(null),r(F)}})},F.slug))})]}),e.length>0&&(0,it.jsxs)(yt.__experimentalVStack,{children:[(0,it.jsx)("h2",{className:"font-library__fonts-title",children:(0,Kr._x)("Custom","font source")}),(0,it.jsx)("ul",{role:"list",className:"font-library__fonts-list",children:e.map(F=>(0,it.jsx)("li",{className:"font-library__fonts-list-item",children:(0,it.jsx)(zC,{font:F,navigatorPath:"/fontFamily",variantsText:E(F),onClick:()=>{h(null),r(F)}})},F.slug))})]})]})}),(0,it.jsxs)(yt.Navigator.Screen,{path:"/fontFamily",children:[t&&(0,it.jsx)(lze,{font:t,isOpen:d,setIsOpen:f,setNotice:h,uninstallFontFamily:o,handleSetLibraryFontSelected:r}),(0,it.jsxs)(yt.Flex,{justify:"flex-start",children:[(0,it.jsx)(yt.Navigator.BackButton,{icon:(0,Kr.isRTL)()?hr:pr,size:"small",onClick:()=>{r(void 0),h(null)},label:(0,Kr.__)("Back")}),(0,it.jsx)(yt.__experimentalHeading,{level:2,size:13,className:"global-styles-ui-header",children:t?.name})]}),m&&(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(yt.__experimentalSpacer,{margin:1}),(0,it.jsx)(yt.Notice,{status:m.type,onRemove:()=>h(null),children:m.message}),(0,it.jsx)(yt.__experimentalSpacer,{margin:1})]}),(0,it.jsx)(yt.__experimentalSpacer,{margin:4}),(0,it.jsx)(yt.__experimentalText,{children:(0,Kr.__)("Choose font variants. Keep in mind that too many variants could make your site slower.")}),(0,it.jsx)(yt.__experimentalSpacer,{margin:4}),(0,it.jsxs)(yt.__experimentalVStack,{spacing:0,children:[(0,it.jsx)(yt.CheckboxControl,{className:"font-library__select-all",label:(0,Kr.__)("Select all"),checked:N,onChange:z,indeterminate:B}),(0,it.jsx)(yt.__experimentalSpacer,{margin:8}),(0,it.jsx)("ul",{role:"list",className:"font-library__fonts-list",children:t&&D(t).map((F,L)=>(0,it.jsx)("li",{className:"font-library__fonts-list-item",children:(0,it.jsx)(Mde,{font:t,face:F},`face${L}`)},`face${L}`))})]})]})]}),(0,it.jsxs)(yt.__experimentalHStack,{justify:"flex-end",className:"font-library__footer",children:[i&&(0,it.jsx)(yt.ProgressBar,{}),I&&(0,it.jsx)(yt.Button,{__next40pxDefaultSize:!0,isDestructive:!0,variant:"tertiary",onClick:A,children:(0,Kr.__)("Delete")}),(0,it.jsx)(yt.Button,{__next40pxDefaultSize:!0,variant:"primary",onClick:k,disabled:!b,accessibleWhenDisabled:!0,children:(0,Kr.__)("Update")})]})]})]})}function lze({font:e,isOpen:t,setIsOpen:r,setNotice:o,uninstallFontFamily:n,handleSetLibraryFontSelected:i}){let s=(0,yt.useNavigator)(),l=async()=>{o(null),r(!1);try{await n(e),s.goBack(),i(void 0),o({type:"success",message:(0,Kr.__)("Font family uninstalled successfully.")})}catch(u){o({type:"error",message:(0,Kr.__)("There was an error uninstalling the font family.")+u.message})}},c=()=>{r(!1)};return(0,it.jsx)(yt.__experimentalConfirmDialog,{isOpen:t,cancelButtonText:(0,Kr.__)("Cancel"),confirmButtonText:(0,Kr.__)("Delete"),onCancel:c,onConfirm:l,size:"medium",children:e&&(0,Kr.sprintf)((0,Kr.__)('Are you sure you want to delete "%s" font and all its variants and assets?'),e.name)})}var e5=aze;var Bn=a(U(),1),rt=a(W(),1),Ude=a(_e(),1),Vr=a(j(),1);var Wde=a(ee(),1);function Fde(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 Lde(e){return e.reduce((t,r)=>({...t,[r.slug]:(r?.fontFace||[]).reduce((o,n)=>({...o,[`${n.fontStyle}-${n.fontWeight}`]:!0}),{})}),{})}function Bde(e,t,r){return t?!!r[e]?.[`${t.fontStyle}-${t.fontWeight}`]:!!r[e]}var UC=a(j(),1),Es=a(W(),1),Nl=a(T(),1);function cze(){let e=()=>{window.localStorage.setItem("wp-font-library-google-fonts-permission","true"),window.dispatchEvent(new Event("storage"))};return(0,Nl.jsx)("div",{className:"font-library__google-fonts-confirm",children:(0,Nl.jsx)(Es.Card,{children:(0,Nl.jsxs)(Es.CardBody,{children:[(0,Nl.jsx)(Es.__experimentalHeading,{level:2,children:(0,UC.__)("Connect to Google Fonts")}),(0,Nl.jsx)(Es.__experimentalSpacer,{margin:6}),(0,Nl.jsx)(Es.__experimentalText,{as:"p",children:(0,UC.__)("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,Nl.jsx)(Es.__experimentalSpacer,{margin:3}),(0,Nl.jsx)(Es.__experimentalText,{as:"p",children:(0,UC.__)("You can alternatively upload files directly on the Upload tab.")}),(0,Nl.jsx)(Es.__experimentalSpacer,{margin:6}),(0,Nl.jsx)(Es.Button,{__next40pxDefaultSize:!0,variant:"primary",onClick:e,children:(0,UC.__)("Allow access to Google Fonts")})]})})})}var Vde=cze;var jde=a(U(),1),t5=a(W(),1);var Zv=a(T(),1);function uze({face:e,font:t,handleToggleVariant:r,selected:o}){let n=()=>{if(t?.fontFace){r(t,e);return}r(t)},i=t.name+" "+qO(e),s=(0,jde.useId)();return(0,Zv.jsx)("div",{className:"font-library__font-card",children:(0,Zv.jsxs)(t5.Flex,{justify:"flex-start",align:"center",gap:"1rem",children:[(0,Zv.jsx)(t5.CheckboxControl,{checked:o,onChange:n,id:s}),(0,Zv.jsx)("label",{htmlFor:s,children:(0,Zv.jsx)(pw,{font:e,text:i,onClick:n})})]})})}var zde=uze;var qe=a(T(),1),dze={slug:"all",name:(0,Vr._x)("All","font categories")},Hde="wp-font-library-google-fonts-permission",fze=500;function mze({slug:e}){let t=e==="google-fonts",r=()=>window.localStorage.getItem(Hde)==="true",[o,n]=(0,Bn.useState)(null),[i,s]=(0,Bn.useState)(null),[l,c]=(0,Bn.useState)([]),[u,d]=(0,Bn.useState)(1),[f,m]=(0,Bn.useState)({}),[h,g]=(0,Bn.useState)(t&&!r()),{installFonts:v,isInstalling:y}=(0,Bn.useContext)(li),{record:b,isResolving:w}=(0,Wde.useEntityRecord)("root","fontCollection",e);(0,Bn.useEffect)(()=>{let X=()=>{g(t&&!r())};return X(),window.addEventListener("storage",X),()=>window.removeEventListener("storage",X)},[e,t]);let S=()=>{window.localStorage.setItem(Hde,"false"),window.dispatchEvent(new Event("storage"))};(0,Bn.useEffect)(()=>{n(null)},[e]),(0,Bn.useEffect)(()=>{c([])},[o]);let x=(0,Bn.useMemo)(()=>b?.font_families??[],[b]),_=b?.categories??[],P=[dze,..._],I=(0,Bn.useMemo)(()=>Fde(x,f),[x,f]),A=Math.max(window.innerHeight,fze),k=Math.floor((A-417)/61),D=Math.ceil(I.length/k),E=(u-1)*k,C=u*k,M=I.slice(E,C),B=X=>{m({...f,category:X}),d(1)},z=(0,Ude.debounce)(X=>{m({...f,search:X}),d(1)},300),O=(X,oe)=>{let pe=KO(X,oe,l);c(pe)},F=Lde(l),L=()=>{c([])},H=l.length>0?l[0]?.fontFace?.length??0:0,q=H>0&&H!==o?.fontFace?.length,Q=H===o?.fontFace?.length,J=()=>{let X=[];!Q&&o&&X.push(o),c(X)},te=async()=>{s(null);let X=l[0];try{X?.fontFace&&await Promise.all(X.fontFace.map(async oe=>{oe.src&&(oe.file=await Ade(oe.src))}))}catch{s({type:"error",message:(0,Vr.__)("Error installing the fonts, could not be downloaded.")});return}try{await v([X]),s({type:"success",message:(0,Vr.__)("Fonts were installed successfully.")})}catch(oe){s({type:"error",message:oe.message})}L()},se=X=>X?!X.fontFace||!X.fontFace.length?[{fontFamily:X.fontFamily,fontStyle:"normal",fontWeight:"400"}]:$O(X.fontFace):[];if(h)return(0,qe.jsx)(Vde,{});let $=e==="google-fonts"&&!h&&!o;return(0,qe.jsxs)("div",{className:"font-library__tabpanel-layout",children:[w&&(0,qe.jsx)("div",{className:"font-library__loading",children:(0,qe.jsx)(rt.ProgressBar,{})}),!w&&b&&(0,qe.jsxs)(qe.Fragment,{children:[(0,qe.jsxs)(rt.Navigator,{initialPath:"/",className:"font-library__tabpanel-layout",children:[(0,qe.jsxs)(rt.Navigator.Screen,{path:"/",children:[(0,qe.jsxs)(rt.__experimentalHStack,{justify:"space-between",children:[(0,qe.jsxs)(rt.__experimentalVStack,{children:[(0,qe.jsx)(rt.__experimentalHeading,{level:2,size:13,children:b.name}),(0,qe.jsx)(rt.__experimentalText,{children:b.description})]}),$&&(0,qe.jsx)(rt.DropdownMenu,{icon:to,label:(0,Vr.__)("Actions"),popoverProps:{position:"bottom left"},controls:[{title:(0,Vr.__)("Revoke access to Google Fonts"),onClick:S}]})]}),(0,qe.jsx)(rt.__experimentalSpacer,{margin:4}),(0,qe.jsxs)(rt.__experimentalHStack,{spacing:4,justify:"space-between",children:[(0,qe.jsx)(rt.SearchControl,{value:f.search,placeholder:(0,Vr.__)("Font name\u2026"),label:(0,Vr.__)("Search"),onChange:z,hideLabelFromVision:!1}),(0,qe.jsx)(rt.SelectControl,{__next40pxDefaultSize:!0,label:(0,Vr.__)("Category"),value:f.category,onChange:B,children:P&&P.map(X=>(0,qe.jsx)("option",{value:X.slug,children:X.name},X.slug))})]}),(0,qe.jsx)(rt.__experimentalSpacer,{margin:4}),!!b?.font_families?.length&&!I.length&&(0,qe.jsx)(rt.__experimentalText,{children:(0,Vr.__)("No fonts found. Try with a different search term.")}),(0,qe.jsx)("div",{className:"font-library__fonts-grid__main",children:(0,qe.jsx)("ul",{role:"list",className:"font-library__fonts-list",children:M.map(X=>(0,qe.jsx)("li",{className:"font-library__fonts-list-item",children:(0,qe.jsx)(zC,{font:X.font_family_settings,navigatorPath:"/fontFamily",onClick:()=>{n(X.font_family_settings)}})},X.font_family_settings.slug))})})]}),(0,qe.jsxs)(rt.Navigator.Screen,{path:"/fontFamily",children:[(0,qe.jsxs)(rt.Flex,{justify:"flex-start",children:[(0,qe.jsx)(rt.Navigator.BackButton,{icon:(0,Vr.isRTL)()?hr:pr,size:"small",onClick:()=>{n(null),s(null)},label:(0,Vr.__)("Back")}),(0,qe.jsx)(rt.__experimentalHeading,{level:2,size:13,className:"global-styles-ui-header",children:o?.name})]}),i&&(0,qe.jsxs)(qe.Fragment,{children:[(0,qe.jsx)(rt.__experimentalSpacer,{margin:1}),(0,qe.jsx)(rt.Notice,{status:i.type,onRemove:()=>s(null),children:i.message}),(0,qe.jsx)(rt.__experimentalSpacer,{margin:1})]}),(0,qe.jsx)(rt.__experimentalSpacer,{margin:4}),(0,qe.jsx)(rt.__experimentalText,{children:(0,Vr.__)("Select font variants to install.")}),(0,qe.jsx)(rt.__experimentalSpacer,{margin:4}),(0,qe.jsx)(rt.CheckboxControl,{className:"font-library__select-all",label:(0,Vr.__)("Select all"),checked:Q,onChange:J,indeterminate:q}),(0,qe.jsx)(rt.__experimentalVStack,{spacing:0,children:(0,qe.jsx)("ul",{role:"list",className:"font-library__fonts-list",children:o&&se(o).map((X,oe)=>(0,qe.jsx)("li",{className:"font-library__fonts-list-item",children:(0,qe.jsx)(zde,{font:o,face:X,handleToggleVariant:O,selected:Bde(o.slug,o.fontFace?X:null,F)})},`face${oe}`))})}),(0,qe.jsx)(rt.__experimentalSpacer,{margin:16})]})]}),o&&(0,qe.jsx)(rt.Flex,{justify:"flex-end",className:"font-library__footer",children:(0,qe.jsx)(rt.Button,{__next40pxDefaultSize:!0,variant:"primary",onClick:te,isBusy:y,disabled:l.length===0||y,accessibleWhenDisabled:!0,children:(0,Vr.__)("Install")})}),!o&&(0,qe.jsxs)(rt.__experimentalHStack,{expanded:!1,className:"font-library__footer",justify:"end",spacing:6,children:[(0,qe.jsx)(rt.__experimentalHStack,{justify:"flex-start",expanded:!1,spacing:1,className:"font-library__page-selection",children:(0,Bn.createInterpolateElement)((0,Vr.sprintf)((0,Vr._x)("<div>Page</div>%1$s<div>of %2$d</div>","paging"),"<CurrentPage />",D),{div:(0,qe.jsx)("div",{"aria-hidden":!0}),CurrentPage:(0,qe.jsx)(rt.SelectControl,{"aria-label":(0,Vr.__)("Current page"),value:u.toString(),options:[...Array(D)].map((X,oe)=>({label:(oe+1).toString(),value:(oe+1).toString()})),onChange:X=>d(parseInt(X)),size:"small",variant:"minimal"})})}),(0,qe.jsxs)(rt.__experimentalHStack,{expanded:!1,spacing:1,children:[(0,qe.jsx)(rt.Button,{onClick:()=>d(u-1),disabled:u===1,accessibleWhenDisabled:!0,label:(0,Vr.__)("Previous page"),icon:(0,Vr.isRTL)()?nl:il,showTooltip:!0,size:"compact",tooltipPosition:"top"}),(0,qe.jsx)(rt.Button,{onClick:()=>d(u+1),disabled:u===D,accessibleWhenDisabled:!0,label:(0,Vr.__)("Next page"),icon:(0,Vr.isRTL)()?il:nl,showTooltip:!0,size:"compact",tooltipPosition:"top"})]})]})]})]})}var r5=mze;var gw=a(j(),1),ji=a(W(),1),GC=a(U(),1);var o5=(e=>typeof Fs<"u"?Fs:typeof Proxy<"u"?new Proxy(e,{get:(t,r)=>(typeof Fs<"u"?Fs:t)[r]}):e)(function(e){if(typeof Fs<"u")return Fs.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')}),Gde=(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 o5=="function"&&o5;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 y=n[d][1][v];return l(y||v)},g,g.exports,o,n,i,s)}return i[d].exports}for(var c=typeof o5=="function"&&o5,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,y=16,b=256,w=704,S=26,x=6,_=2,P=8,I=255,A=1080,k=18,D=new Uint8Array([1,2,3,4,0,5,17,6,16,7,8,9,10,11,12,13,14,15]),E=16,C=new Uint8Array([3,2,1,0,3,3,3,3,3,3,2,2,2,2,2,2]),M=new Int8Array([0,0,0,0,-1,1,-2,2,-3,3,-1,1,-2,2,-3,3]),B=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 N(ge){var ie;return ge.readBits(1)===0?16:(ie=ge.readBits(3),ie>0?17+ie:(ie=ge.readBits(3),ie>0?8+ie:17))}function z(ge){if(ge.readBits(1)){var ie=ge.readBits(3);return ie===0?1:ge.readBits(ie)+(1<<ie)}return 0}function O(){this.meta_block_length=0,this.input_end=0,this.is_uncompressed=0,this.is_metadata=!1}function F(ge){var ie=new O,ce,ae,ye;if(ie.input_end=ge.readBits(1),ie.input_end&&ge.readBits(1))return ie;if(ce=ge.readBits(2)+4,ce===7){if(ie.is_metadata=!0,ge.readBits(1)!==0)throw new Error("Invalid reserved bit");if(ae=ge.readBits(2),ae===0)return ie;for(ye=0;ye<ae;ye++){var Ie=ge.readBits(8);if(ye+1===ae&&ae>1&&Ie===0)throw new Error("Invalid size byte");ie.meta_block_length|=Ie<<ye*8}}else for(ye=0;ye<ce;++ye){var Oe=ge.readBits(4);if(ye+1===ce&&ce>4&&Oe===0)throw new Error("Invalid size nibble");ie.meta_block_length|=Oe<<ye*4}return++ie.meta_block_length,!ie.input_end&&!ie.is_metadata&&(ie.is_uncompressed=ge.readBits(1)),ie}function L(ge,ie,ce){var ae=ie,ye;return ce.fillBitWindow(),ie+=ce.val_>>>ce.bit_pos_&I,ye=ge[ie].bits-P,ye>0&&(ce.bit_pos_+=P,ie+=ge[ie].value,ie+=ce.val_>>>ce.bit_pos_&(1<<ye)-1),ce.bit_pos_+=ge[ie].bits,ge[ie].value}function H(ge,ie,ce,ae){for(var ye=0,Ie=v,Oe=0,ke=0,ue=32768,re=[],ne=0;ne<32;ne++)re.push(new d(0,0));for(f(re,0,5,ge,k);ye<ie&&ue>0;){var Te=0,Qe;if(ae.readMoreInput(),ae.fillBitWindow(),Te+=ae.val_>>>ae.bit_pos_&31,ae.bit_pos_+=re[Te].bits,Qe=re[Te].value&255,Qe<y)Oe=0,ce[ye++]=Qe,Qe!==0&&(Ie=Qe,ue-=32768>>Qe);else{var Pt=Qe-14,ft,It,Lt=0;if(Qe===y&&(Lt=Ie),ke!==Lt&&(Oe=0,ke=Lt),ft=Oe,Oe>0&&(Oe-=2,Oe<<=Pt),Oe+=ae.readBits(Pt)+3,It=Oe-ft,ye+It>ie)throw new Error("[ReadHuffmanCodeLengths] symbol + repeat_delta > num_symbols");for(var Cr=0;Cr<It;Cr++)ce[ye+Cr]=ke;ye+=It,ke!==0&&(ue-=It<<15-ke)}}if(ue!==0)throw new Error("[ReadHuffmanCodeLengths] space = "+ue);for(;ye<ie;ye++)ce[ye]=0}function q(ge,ie,ce,ae){var ye=0,Ie,Oe=new Uint8Array(ge);if(ae.readMoreInput(),Ie=ae.readBits(2),Ie===1){for(var ke,ue=ge-1,re=0,ne=new Int32Array(4),Te=ae.readBits(2)+1;ue;)ue>>=1,++re;for(ke=0;ke<Te;++ke)ne[ke]=ae.readBits(re)%ge,Oe[ne[ke]]=2;switch(Oe[ne[0]]=1,Te){case 1:break;case 3:if(ne[0]===ne[1]||ne[0]===ne[2]||ne[1]===ne[2])throw new Error("[ReadHuffmanCode] invalid symbols");break;case 2:if(ne[0]===ne[1])throw new Error("[ReadHuffmanCode] invalid symbols");Oe[ne[1]]=1;break;case 4:if(ne[0]===ne[1]||ne[0]===ne[2]||ne[0]===ne[3]||ne[1]===ne[2]||ne[1]===ne[3]||ne[2]===ne[3])throw new Error("[ReadHuffmanCode] invalid symbols");ae.readBits(1)?(Oe[ne[2]]=3,Oe[ne[3]]=3):Oe[ne[0]]=2;break}}else{var ke,Qe=new Uint8Array(k),Pt=32,ft=0,It=[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(ke=Ie;ke<k&&Pt>0;++ke){var Lt=D[ke],Cr=0,kt;ae.fillBitWindow(),Cr+=ae.val_>>>ae.bit_pos_&15,ae.bit_pos_+=It[Cr].bits,kt=It[Cr].value,Qe[Lt]=kt,kt!==0&&(Pt-=32>>kt,++ft)}if(!(ft===1||Pt===0))throw new Error("[ReadHuffmanCode] invalid num_codes or space");H(Qe,ge,Oe,ae)}if(ye=f(ie,ce,P,Oe,ge),ye===0)throw new Error("[ReadHuffmanCode] BuildHuffmanTable failed: ");return ye}function Q(ge,ie,ce){var ae,ye;return ae=L(ge,ie,ce),ye=h.kBlockLengthPrefixCode[ae].nbits,h.kBlockLengthPrefixCode[ae].offset+ce.readBits(ye)}function J(ge,ie,ce){var ae;return ge<E?(ce+=C[ge],ce&=3,ae=ie[ce]+M[ge]):ae=ge-E+1,ae}function te(ge,ie){for(var ce=ge[ie],ae=ie;ae;--ae)ge[ae]=ge[ae-1];ge[0]=ce}function se(ge,ie){var ce=new Uint8Array(256),ae;for(ae=0;ae<256;++ae)ce[ae]=ae;for(ae=0;ae<ie;++ae){var ye=ge[ae];ge[ae]=ce[ye],ye&&te(ce,ye)}}function $(ge,ie){this.alphabet_size=ge,this.num_htrees=ie,this.codes=new Array(ie+ie*B[ge+31>>>5]),this.htrees=new Uint32Array(ie)}$.prototype.decode=function(ge){var ie,ce,ae=0;for(ie=0;ie<this.num_htrees;++ie)this.htrees[ie]=ae,ce=q(this.alphabet_size,this.codes,ae,ge),ae+=ce};function X(ge,ie){var ce={num_htrees:null,context_map:null},ae,ye=0,Ie,Oe;ie.readMoreInput();var ke=ce.num_htrees=z(ie)+1,ue=ce.context_map=new Uint8Array(ge);if(ke<=1)return ce;for(ae=ie.readBits(1),ae&&(ye=ie.readBits(4)+1),Ie=[],Oe=0;Oe<A;Oe++)Ie[Oe]=new d(0,0);for(q(ke+ye,Ie,0,ie),Oe=0;Oe<ge;){var re;if(ie.readMoreInput(),re=L(Ie,0,ie),re===0)ue[Oe]=0,++Oe;else if(re<=ye)for(var ne=1+(1<<re)+ie.readBits(re);--ne;){if(Oe>=ge)throw new Error("[DecodeContextMap] i >= context_map_size");ue[Oe]=0,++Oe}else ue[Oe]=re-ye,++Oe}return ie.readBits(1)&&se(ue,ge),ce}function oe(ge,ie,ce,ae,ye,Ie,Oe){var ke=ce*2,ue=ce,re=L(ie,ce*A,Oe),ne;re===0?ne=ye[ke+(Ie[ue]&1)]:re===1?ne=ye[ke+(Ie[ue]-1&1)]+1:ne=re-2,ne>=ge&&(ne-=ge),ae[ce]=ne,ye[ke+(Ie[ue]&1)]=ne,++Ie[ue]}function pe(ge,ie,ce,ae,ye,Ie){var Oe=ye+1,ke=ce&ye,ue=Ie.pos_&c.IBUF_MASK,re;if(ie<8||Ie.bit_pos_+(ie<<3)<Ie.bit_end_pos_){for(;ie-- >0;)Ie.readMoreInput(),ae[ke++]=Ie.readBits(8),ke===Oe&&(ge.write(ae,Oe),ke=0);return}if(Ie.bit_end_pos_<32)throw new Error("[CopyUncompressedBlockToOutput] br.bit_end_pos_ < 32");for(;Ie.bit_pos_<32;)ae[ke]=Ie.val_>>>Ie.bit_pos_,Ie.bit_pos_+=8,++ke,--ie;if(re=Ie.bit_end_pos_-Ie.bit_pos_>>3,ue+re>c.IBUF_MASK){for(var ne=c.IBUF_MASK+1-ue,Te=0;Te<ne;Te++)ae[ke+Te]=Ie.buf_[ue+Te];re-=ne,ke+=ne,ie-=ne,ue=0}for(var Te=0;Te<re;Te++)ae[ke+Te]=Ie.buf_[ue+Te];if(ke+=re,ie-=re,ke>=Oe){ge.write(ae,Oe),ke-=Oe;for(var Te=0;Te<ke;Te++)ae[Te]=ae[Oe+Te]}for(;ke+ie>=Oe;){if(re=Oe-ke,Ie.input_.read(ae,ke,re)<re)throw new Error("[CopyUncompressedBlockToOutput] not enough bytes");ge.write(ae,Oe),ie-=re,ke=0}if(Ie.input_.read(ae,ke,ie)<ie)throw new Error("[CopyUncompressedBlockToOutput] not enough bytes");Ie.reset()}function be(ge){var ie=ge.bit_pos_+7&-8,ce=ge.readBits(ie-ge.bit_pos_);return ce==0}function Ce(ge){var ie=new s(ge),ce=new c(ie);N(ce);var ae=F(ce);return ae.meta_block_length}i.BrotliDecompressedSize=Ce;function Ge(ge,ie){var ce=new s(ge);ie==null&&(ie=Ce(ge));var ae=new Uint8Array(ie),ye=new l(ae);return He(ce,ye),ye.pos<ye.buffer.length&&(ye.buffer=ye.buffer.subarray(0,ye.pos)),ye.buffer}i.BrotliDecompressBuffer=Ge;function He(ge,ie){var ce,ae=0,ye=0,Ie=0,Oe,ke=0,ue,re,ne,Te,Qe=[16,15,11,4],Pt=0,ft=0,It=0,Lt=[new $(0,0),new $(0,0),new $(0,0)],Cr,kt,Ze,vi=128+c.READ_SIZE;Ze=new c(ge),Ie=N(Ze),Oe=(1<<Ie)-16,ue=1<<Ie,re=ue-1,ne=new Uint8Array(ue+vi+u.maxDictionaryWordLength),Te=ue,Cr=[],kt=[];for(var Ns=0;Ns<3*A;Ns++)Cr[Ns]=new d(0,0),kt[Ns]=new d(0,0);for(;!ye;){var mr=0,tl,mt=[1<<28,1<<28,1<<28],$t=[0],dr=[1,1,1],K=[0,1,0,1,0,1],fe=[0],V,Pe,St,xe,Dr=null,Re=null,Tr,me=null,de,lu=0,nr=null,Fe=0,Ta=0,kd=null,Fr=0,Nt=0,Yo=0,qo,wn;for(ce=0;ce<3;++ce)Lt[ce].codes=null,Lt[ce].htrees=null;Ze.readMoreInput();var Rd=F(Ze);if(mr=Rd.meta_block_length,ae+mr>ie.buffer.length){var ig=new Uint8Array(ae+mr);ig.set(ie.buffer),ie.buffer=ig}if(ye=Rd.input_end,tl=Rd.is_uncompressed,Rd.is_metadata){for(be(Ze);mr>0;--mr)Ze.readMoreInput(),Ze.readBits(8);continue}if(mr!==0){if(tl){Ze.bit_pos_=Ze.bit_pos_+7&-8,pe(ie,mr,ae,ne,re,Ze),ae+=mr;continue}for(ce=0;ce<3;++ce)dr[ce]=z(Ze)+1,dr[ce]>=2&&(q(dr[ce]+2,Cr,ce*A,Ze),q(S,kt,ce*A,Ze),mt[ce]=Q(kt,ce*A,Ze),fe[ce]=1);for(Ze.readMoreInput(),V=Ze.readBits(2),Pe=E+(Ze.readBits(4)<<V),St=(1<<V)-1,xe=Pe+(48<<V),Re=new Uint8Array(dr[0]),ce=0;ce<dr[0];++ce)Ze.readMoreInput(),Re[ce]=Ze.readBits(2)<<1;var eo=X(dr[0]<<x,Ze);Tr=eo.num_htrees,Dr=eo.context_map;var Xi=X(dr[2]<<_,Ze);for(de=Xi.num_htrees,me=Xi.context_map,Lt[0]=new $(b,Tr),Lt[1]=new $(w,dr[1]),Lt[2]=new $(xe,de),ce=0;ce<3;++ce)Lt[ce].decode(Ze);for(nr=0,kd=0,qo=Re[$t[0]],Nt=m.lookupOffsets[qo],Yo=m.lookupOffsets[qo+1],wn=Lt[1].htrees[0];mr>0;){var ho,Qi,Ms,nb,Z6,Ds,Ea,Ad,Ax,ib,Ix;for(Ze.readMoreInput(),mt[1]===0&&(oe(dr[1],Cr,1,$t,K,fe,Ze),mt[1]=Q(kt,A,Ze),wn=Lt[1].htrees[$t[1]]),--mt[1],ho=L(Lt[1].codes,wn,Ze),Qi=ho>>6,Qi>=2?(Qi-=2,Ea=-1):Ea=0,Ms=h.kInsertRangeLut[Qi]+(ho>>3&7),nb=h.kCopyRangeLut[Qi]+(ho&7),Z6=h.kInsertLengthPrefixCode[Ms].offset+Ze.readBits(h.kInsertLengthPrefixCode[Ms].nbits),Ds=h.kCopyLengthPrefixCode[nb].offset+Ze.readBits(h.kCopyLengthPrefixCode[nb].nbits),ft=ne[ae-1&re],It=ne[ae-2&re],ib=0;ib<Z6;++ib)Ze.readMoreInput(),mt[0]===0&&(oe(dr[0],Cr,0,$t,K,fe,Ze),mt[0]=Q(kt,0,Ze),lu=$t[0]<<x,nr=lu,qo=Re[$t[0]],Nt=m.lookupOffsets[qo],Yo=m.lookupOffsets[qo+1]),Ax=m.lookup[Nt+ft]|m.lookup[Yo+It],Fe=Dr[nr+Ax],--mt[0],It=ft,ft=L(Lt[0].codes,Lt[0].htrees[Fe],Ze),ne[ae&re]=ft,(ae&re)===re&&ie.write(ne,ue),++ae;if(mr-=Z6,mr<=0)break;if(Ea<0){var Ax;if(Ze.readMoreInput(),mt[2]===0&&(oe(dr[2],Cr,2,$t,K,fe,Ze),mt[2]=Q(kt,2*A,Ze),Ta=$t[2]<<_,kd=Ta),--mt[2],Ax=(Ds>4?3:Ds-2)&255,Fr=me[kd+Ax],Ea=L(Lt[2].codes,Lt[2].htrees[Fr],Ze),Ea>=Pe){var X6,JW,Ox;Ea-=Pe,JW=Ea&St,Ea>>=V,X6=(Ea>>1)+1,Ox=(2+(Ea&1)<<X6)-4,Ea=Pe+(Ox+Ze.readBits(X6)<<V)+JW}}if(Ad=J(Ea,Qe,Pt),Ad<0)throw new Error("[BrotliDecompress] invalid distance");if(ae<Oe&&ke!==Oe?ke=ae:ke=Oe,Ix=ae&re,Ad>ke)if(Ds>=u.minDictionaryWordLength&&Ds<=u.maxDictionaryWordLength){var Ox=u.offsetsByLength[Ds],$W=Ad-ke-1,eG=u.sizeBitsByLength[Ds],rke=(1<<eG)-1,oke=$W&rke,tG=$W>>eG;if(Ox+=oke*Ds,tG<g.kNumTransforms){var Q6=g.transformDictionaryWord(ne,Ix,Ox,Ds,tG);if(Ix+=Q6,ae+=Q6,mr-=Q6,Ix>=Te){ie.write(ne,ue);for(var ZE=0;ZE<Ix-Te;ZE++)ne[ZE]=ne[Te+ZE]}}else throw new Error("Invalid backward reference. pos: "+ae+" distance: "+Ad+" len: "+Ds+" bytes left: "+mr)}else throw new Error("Invalid backward reference. pos: "+ae+" distance: "+Ad+" len: "+Ds+" bytes left: "+mr);else{if(Ea>0&&(Qe[Pt&3]=Ad,++Pt),Ds>mr)throw new Error("Invalid backward reference. pos: "+ae+" distance: "+Ad+" len: "+Ds+" bytes left: "+mr);for(ib=0;ib<Ds;++ib)ne[ae&re]=ne[ae-Ad&re],(ae&re)===re&&ie.write(ne,ue),++ae,--mr}ft=ne[ae-1&re],It=ne[ae-2&re]}ae&=1073741823}}ie.write(ne,ae&re)}i.BrotliDecompress=He,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 y=m,b,w,S,x,_,P,I,A,k,D,E,C=new Int32Array(l+1),M=new Int32Array(l+1);for(E=new Int32Array(v),S=0;S<v;S++)C[g[S]]++;for(M[1]=0,w=1;w<l;w++)M[w+1]=M[w]+C[w];for(S=0;S<v;S++)g[S]!==0&&(E[M[g[S]]++]=S);if(A=h,k=1<<A,D=k,M[l]===1){for(x=0;x<D;++x)f[m+x]=new s(0,E[0]&65535);return D}for(x=0,S=0,w=1,_=2;w<=h;++w,_<<=1)for(;C[w]>0;--C[w])b=new s(w&255,E[S++]&65535),u(f,m+x,_,k,b),x=c(x,w);for(I=D-1,P=-1,w=h+1,_=2;w<=l;++w,_<<=1)for(;C[w]>0;--C[w])(x&I)!==P&&(m+=k,A=d(C,w,h),k=1<<A,D+=k,P=x&I,f[y+P]=new s(A+h&255,m-y-P&65535)),b=new s(w-h&255,E[S++]&65535),u(f,m+(x>>h),_,k,b),x=c(x,w);return D}},{}],8:[function(o,n,i){"use strict";i.byteLength=h,i.toByteArray=v,i.fromByteArray=w;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(S){var x=S.length;if(x%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var _=S.indexOf("=");_===-1&&(_=x);var P=_===x?0:4-_%4;return[_,P]}function h(S){var x=m(S),_=x[0],P=x[1];return(_+P)*3/4-P}function g(S,x,_){return(x+_)*3/4-_}function v(S){for(var x,_=m(S),P=_[0],I=_[1],A=new c(g(S,P,I)),k=0,D=I>0?P-4:P,E=0;E<D;E+=4)x=l[S.charCodeAt(E)]<<18|l[S.charCodeAt(E+1)]<<12|l[S.charCodeAt(E+2)]<<6|l[S.charCodeAt(E+3)],A[k++]=x>>16&255,A[k++]=x>>8&255,A[k++]=x&255;return I===2&&(x=l[S.charCodeAt(E)]<<2|l[S.charCodeAt(E+1)]>>4,A[k++]=x&255),I===1&&(x=l[S.charCodeAt(E)]<<10|l[S.charCodeAt(E+1)]<<4|l[S.charCodeAt(E+2)]>>2,A[k++]=x>>8&255,A[k++]=x&255),A}function y(S){return s[S>>18&63]+s[S>>12&63]+s[S>>6&63]+s[S&63]}function b(S,x,_){for(var P,I=[],A=x;A<_;A+=3)P=(S[A]<<16&16711680)+(S[A+1]<<8&65280)+(S[A+2]&255),I.push(y(P));return I.join("")}function w(S){for(var x,_=S.length,P=_%3,I=[],A=16383,k=0,D=_-P;k<D;k+=A)I.push(b(S,k,k+A>D?D:k+A));return P===1?(x=S[_-1],I.push(s[x>>2]+s[x<<4&63]+"==")):P===2&&(x=(S[_-2]<<8)+S[_-1],I.push(s[x>>10]+s[x>>4&63]+s[x<<2&63]+"=")),I.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,y=9,b=10,w=11,S=12,x=13,_=14,P=15,I=16,A=17,k=18,D=19,E=20;function C(N,z,O){this.prefix=new Uint8Array(N.length),this.transform=z,this.suffix=new Uint8Array(O.length);for(var F=0;F<N.length;F++)this.prefix[F]=N.charCodeAt(F);for(var F=0;F<O.length;F++)this.suffix[F]=O.charCodeAt(F)}var M=[new C("",l,""),new C("",l," "),new C(" ",l," "),new C("",S,""),new C("",b," "),new C("",l," the "),new C(" ",l,""),new C("s ",l," "),new C("",l," of "),new C("",b,""),new C("",l," and "),new C("",x,""),new C("",c,""),new C(", ",l," "),new C("",l,", "),new C(" ",b," "),new C("",l," in "),new C("",l," to "),new C("e ",l," "),new C("",l,'"'),new C("",l,"."),new C("",l,'">'),new C("",l,`
`),new C("",d,""),new C("",l,"]"),new C("",l," for "),new C("",_,""),new C("",u,""),new C("",l," a "),new C("",l," that "),new C(" ",b,""),new C("",l,". "),new C(".",l,""),new C(" ",l,", "),new C("",P,""),new C("",l," with "),new C("",l,"'"),new C("",l," from "),new C("",l," by "),new C("",I,""),new C("",A,""),new C(" the ",l,""),new C("",f,""),new C("",l,". The "),new C("",w,""),new C("",l," on "),new C("",l," as "),new C("",l," is "),new C("",g,""),new C("",c,"ing "),new C("",l,`
	`),new C("",l,":"),new C(" ",l,". "),new C("",l,"ed "),new C("",E,""),new C("",k,""),new C("",h,""),new C("",l,"("),new C("",b,", "),new C("",v,""),new C("",l," at "),new C("",l,"ly "),new C(" the ",l," of "),new C("",m,""),new C("",y,""),new C(" ",b,", "),new C("",b,'"'),new C(".",l,"("),new C("",w," "),new C("",b,'">'),new C("",l,'="'),new C(" ",l,"."),new C(".com/",l,""),new C(" the ",l," of the "),new C("",b,"'"),new C("",l,". This "),new C("",l,","),new C(".",l," "),new C("",b,"("),new C("",b,"."),new C("",l," not "),new C(" ",l,'="'),new C("",l,"er "),new C(" ",w," "),new C("",l,"al "),new C(" ",w,""),new C("",l,"='"),new C("",w,'"'),new C("",b,". "),new C(" ",l,"("),new C("",l,"ful "),new C(" ",b,". "),new C("",l,"ive "),new C("",l,"less "),new C("",w,"'"),new C("",l,"est "),new C(" ",b,"."),new C("",w,'">'),new C(" ",l,"='"),new C("",b,","),new C("",l,"ize "),new C("",w,"."),new C("\xC2\xA0",l,""),new C(" ",l,","),new C("",b,'="'),new C("",w,'="'),new C("",l,"ous "),new C("",w,", "),new C("",b,"='"),new C(" ",b,","),new C(" ",w,'="'),new C(" ",w,", "),new C("",w,","),new C("",w,"("),new C("",w,". "),new C(" ",w,"."),new C("",w,"='"),new C(" ",w,". "),new C(" ",b,'="'),new C(" ",w,"='"),new C(" ",b,"='")];i.kTransforms=M,i.kNumTransforms=M.length;function B(N,z){return N[z]<192?(N[z]>=97&&N[z]<=122&&(N[z]^=32),1):N[z]<224?(N[z+1]^=32,2):(N[z+2]^=5,3)}i.transformDictionaryWord=function(N,z,O,F,L){var H=M[L].prefix,q=M[L].suffix,Q=M[L].transform,J=Q<S?0:Q-(S-1),te=0,se=z,$;J>F&&(J=F);for(var X=0;X<H.length;)N[z++]=H[X++];for(O+=J,F-=J,Q<=y&&(F-=Q),te=0;te<F;te++)N[z++]=s.dictionary[O+te];if($=z-F,Q===b)B(N,$);else if(Q===w)for(;F>0;){var oe=B(N,$);$+=oe,F-=oe}for(var pe=0;pe<q.length;)N[z++]=q[pe++];return z-se}},{"./dictionary":6}],12:[function(o,n,i){n.exports=o("./dec/decode").BrotliDecompressBuffer},{"./dec/decode":3}]},{},[12])(12)})();var n5=(e=>typeof Fs<"u"?Fs:typeof Proxy<"u"?new Proxy(e,{get:(t,r)=>(typeof Fs<"u"?Fs:t)[r]}):e)(function(e){if(typeof Fs<"u")return Fs.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')}),Yde=(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 n5=="function"&&n5;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 y=n[d][1][v];return l(y||v)},g,g.exports,o,n,i,s)}return i[d].exports}for(var c=typeof n5=="function"&&n5,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,y;for(h=0,f=0,m=d.length;f<m;f++)h+=d[f].length;for(y=new Uint8Array(h),g=0,f=0,m=d.length;f<m;f++)v=d[f],y.set(v,g),g+=v.length;return y}},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,y,b,w=m.length,S=0;for(y=0;y<w;y++)g=m.charCodeAt(y),(g&64512)===55296&&y+1<w&&(v=m.charCodeAt(y+1),(v&64512)===56320&&(g=65536+(g-55296<<10)+(v-56320),y++)),S+=g<128?1:g<2048?2:g<65536?3:4;for(h=new s.Buf8(S),b=0,y=0;b<S;y++)g=m.charCodeAt(y),(g&64512)===55296&&y+1<w&&(v=m.charCodeAt(y+1),(v&64512)===56320&&(g=65536+(g-55296<<10)+(v-56320),y++)),g<128?h[b++]=g:g<2048?(h[b++]=192|g>>>6,h[b++]=128|g&63):g<65536?(h[b++]=224|g>>>12,h[b++]=128|g>>>6&63,h[b++]=128|g&63):(h[b++]=240|g>>>18,h[b++]=128|g>>>12&63,h[b++]=128|g>>>6&63,h[b++]=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,y,b,w=h||m.length,S=new Array(w*2);for(v=0,g=0;g<w;){if(y=m[g++],y<128){S[v++]=y;continue}if(b=u[y],b>4){S[v++]=65533,g+=b-1;continue}for(y&=b===2?31:b===3?15:7;b>1&&g<w;)y=y<<6|m[g++]&63,b--;if(b>1){S[v++]=65533;continue}y<65536?S[v++]=y:(y-=65536,S[v++]=55296|y>>10&1023,S[v++]=56320|y&1023)}return f(S,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,y,b,w,S,x,_,P,I,A,k,D,E,C,M,B,N,z,O,F,L;f=u.state,m=u.next_in,F=u.input,h=m+(u.avail_in-5),g=u.next_out,L=u.output,v=g-(d-u.avail_out),y=g+(u.avail_out-257),b=f.dmax,w=f.wsize,S=f.whave,x=f.wnext,_=f.window,P=f.hold,I=f.bits,A=f.lencode,k=f.distcode,D=(1<<f.lenbits)-1,E=(1<<f.distbits)-1;e:do{I<15&&(P+=F[m++]<<I,I+=8,P+=F[m++]<<I,I+=8),C=A[P&D];t:for(;;){if(M=C>>>24,P>>>=M,I-=M,M=C>>>16&255,M===0)L[g++]=C&65535;else if(M&16){B=C&65535,M&=15,M&&(I<M&&(P+=F[m++]<<I,I+=8),B+=P&(1<<M)-1,P>>>=M,I-=M),I<15&&(P+=F[m++]<<I,I+=8,P+=F[m++]<<I,I+=8),C=k[P&E];r:for(;;){if(M=C>>>24,P>>>=M,I-=M,M=C>>>16&255,M&16){if(N=C&65535,M&=15,I<M&&(P+=F[m++]<<I,I+=8,I<M&&(P+=F[m++]<<I,I+=8)),N+=P&(1<<M)-1,N>b){u.msg="invalid distance too far back",f.mode=s;break e}if(P>>>=M,I-=M,M=g-v,N>M){if(M=N-M,M>S&&f.sane){u.msg="invalid distance too far back",f.mode=s;break e}if(z=0,O=_,x===0){if(z+=w-M,M<B){B-=M;do L[g++]=_[z++];while(--M);z=g-N,O=L}}else if(x<M){if(z+=w+x-M,M-=x,M<B){B-=M;do L[g++]=_[z++];while(--M);if(z=0,x<B){M=x,B-=M;do L[g++]=_[z++];while(--M);z=g-N,O=L}}}else if(z+=x-M,M<B){B-=M;do L[g++]=_[z++];while(--M);z=g-N,O=L}for(;B>2;)L[g++]=O[z++],L[g++]=O[z++],L[g++]=O[z++],B-=3;B&&(L[g++]=O[z++],B>1&&(L[g++]=O[z++]))}else{z=g-N;do L[g++]=L[z++],L[g++]=L[z++],L[g++]=L[z++],B-=3;while(B>2);B&&(L[g++]=L[z++],B>1&&(L[g++]=L[z++]))}}else if((M&64)===0){C=k[(C&65535)+(P&(1<<M)-1)];continue r}else{u.msg="invalid distance code",f.mode=s;break e}break}}else if((M&64)===0){C=A[(C&65535)+(P&(1<<M)-1)];continue t}else if(M&32){f.mode=l;break e}else{u.msg="invalid literal/length code",f.mode=s;break e}break}}while(m<h&&g<y);B=I>>3,m-=B,I-=B<<3,P&=(1<<I)-1,u.next_in=m,u.next_out=g,u.avail_in=m<h?5+(h-m):5-(m-h),u.avail_out=g<y?257+(y-g):257-(g-y),f.hold=P,f.bits=I}},{}],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,y=6,b=0,w=1,S=2,x=-2,_=-3,P=-4,I=-5,A=8,k=1,D=2,E=3,C=4,M=5,B=6,N=7,z=8,O=9,F=10,L=11,H=12,q=13,Q=14,J=15,te=16,se=17,$=18,X=19,oe=20,pe=21,be=22,Ce=23,Ge=24,He=25,ge=26,ie=27,ce=28,ae=29,ye=30,Ie=31,Oe=32,ke=852,ue=592,re=15,ne=re;function Te(K){return(K>>>24&255)+(K>>>8&65280)+((K&65280)<<8)+((K&255)<<24)}function Qe(){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 Pt(K){var fe;return!K||!K.state?x:(fe=K.state,K.total_in=K.total_out=fe.total=0,K.msg="",fe.wrap&&(K.adler=fe.wrap&1),fe.mode=k,fe.last=0,fe.havedict=0,fe.dmax=32768,fe.head=null,fe.hold=0,fe.bits=0,fe.lencode=fe.lendyn=new s.Buf32(ke),fe.distcode=fe.distdyn=new s.Buf32(ue),fe.sane=1,fe.back=-1,b)}function ft(K){var fe;return!K||!K.state?x:(fe=K.state,fe.wsize=0,fe.whave=0,fe.wnext=0,Pt(K))}function It(K,fe){var V,Pe;return!K||!K.state||(Pe=K.state,fe<0?(V=0,fe=-fe):(V=(fe>>4)+1,fe<48&&(fe&=15)),fe&&(fe<8||fe>15))?x:(Pe.window!==null&&Pe.wbits!==fe&&(Pe.window=null),Pe.wrap=V,Pe.wbits=fe,ft(K))}function Lt(K,fe){var V,Pe;return K?(Pe=new Qe,K.state=Pe,Pe.window=null,V=It(K,fe),V!==b&&(K.state=null),V):x}function Cr(K){return Lt(K,ne)}var kt=!0,Ze,vi;function Ns(K){if(kt){var fe;for(Ze=new s.Buf32(512),vi=new s.Buf32(32),fe=0;fe<144;)K.lens[fe++]=8;for(;fe<256;)K.lens[fe++]=9;for(;fe<280;)K.lens[fe++]=7;for(;fe<288;)K.lens[fe++]=8;for(d(m,K.lens,0,288,Ze,0,K.work,{bits:9}),fe=0;fe<32;)K.lens[fe++]=5;d(h,K.lens,0,32,vi,0,K.work,{bits:5}),kt=!1}K.lencode=Ze,K.lenbits=9,K.distcode=vi,K.distbits=5}function mr(K,fe,V,Pe){var St,xe=K.state;return xe.window===null&&(xe.wsize=1<<xe.wbits,xe.wnext=0,xe.whave=0,xe.window=new s.Buf8(xe.wsize)),Pe>=xe.wsize?(s.arraySet(xe.window,fe,V-xe.wsize,xe.wsize,0),xe.wnext=0,xe.whave=xe.wsize):(St=xe.wsize-xe.wnext,St>Pe&&(St=Pe),s.arraySet(xe.window,fe,V-Pe,St,xe.wnext),Pe-=St,Pe?(s.arraySet(xe.window,fe,V-Pe,Pe,0),xe.wnext=Pe,xe.whave=xe.wsize):(xe.wnext+=St,xe.wnext===xe.wsize&&(xe.wnext=0),xe.whave<xe.wsize&&(xe.whave+=St))),0}function tl(K,fe){var V,Pe,St,xe,Dr,Re,Tr,me,de,lu,nr,Fe,Ta,kd,Fr=0,Nt,Yo,qo,wn,Rd,ig,eo,Xi,ho=new s.Buf8(4),Qi,Ms,nb=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!K||!K.state||!K.output||!K.input&&K.avail_in!==0)return x;V=K.state,V.mode===H&&(V.mode=q),Dr=K.next_out,St=K.output,Tr=K.avail_out,xe=K.next_in,Pe=K.input,Re=K.avail_in,me=V.hold,de=V.bits,lu=Re,nr=Tr,Xi=b;e:for(;;)switch(V.mode){case k:if(V.wrap===0){V.mode=q;break}for(;de<16;){if(Re===0)break e;Re--,me+=Pe[xe++]<<de,de+=8}if(V.wrap&2&&me===35615){V.check=0,ho[0]=me&255,ho[1]=me>>>8&255,V.check=c(V.check,ho,2,0),me=0,de=0,V.mode=D;break}if(V.flags=0,V.head&&(V.head.done=!1),!(V.wrap&1)||(((me&255)<<8)+(me>>8))%31){K.msg="incorrect header check",V.mode=ye;break}if((me&15)!==A){K.msg="unknown compression method",V.mode=ye;break}if(me>>>=4,de-=4,eo=(me&15)+8,V.wbits===0)V.wbits=eo;else if(eo>V.wbits){K.msg="invalid window size",V.mode=ye;break}V.dmax=1<<eo,K.adler=V.check=1,V.mode=me&512?F:H,me=0,de=0;break;case D:for(;de<16;){if(Re===0)break e;Re--,me+=Pe[xe++]<<de,de+=8}if(V.flags=me,(V.flags&255)!==A){K.msg="unknown compression method",V.mode=ye;break}if(V.flags&57344){K.msg="unknown header flags set",V.mode=ye;break}V.head&&(V.head.text=me>>8&1),V.flags&512&&(ho[0]=me&255,ho[1]=me>>>8&255,V.check=c(V.check,ho,2,0)),me=0,de=0,V.mode=E;case E:for(;de<32;){if(Re===0)break e;Re--,me+=Pe[xe++]<<de,de+=8}V.head&&(V.head.time=me),V.flags&512&&(ho[0]=me&255,ho[1]=me>>>8&255,ho[2]=me>>>16&255,ho[3]=me>>>24&255,V.check=c(V.check,ho,4,0)),me=0,de=0,V.mode=C;case C:for(;de<16;){if(Re===0)break e;Re--,me+=Pe[xe++]<<de,de+=8}V.head&&(V.head.xflags=me&255,V.head.os=me>>8),V.flags&512&&(ho[0]=me&255,ho[1]=me>>>8&255,V.check=c(V.check,ho,2,0)),me=0,de=0,V.mode=M;case M:if(V.flags&1024){for(;de<16;){if(Re===0)break e;Re--,me+=Pe[xe++]<<de,de+=8}V.length=me,V.head&&(V.head.extra_len=me),V.flags&512&&(ho[0]=me&255,ho[1]=me>>>8&255,V.check=c(V.check,ho,2,0)),me=0,de=0}else V.head&&(V.head.extra=null);V.mode=B;case B:if(V.flags&1024&&(Fe=V.length,Fe>Re&&(Fe=Re),Fe&&(V.head&&(eo=V.head.extra_len-V.length,V.head.extra||(V.head.extra=new Array(V.head.extra_len)),s.arraySet(V.head.extra,Pe,xe,Fe,eo)),V.flags&512&&(V.check=c(V.check,Pe,Fe,xe)),Re-=Fe,xe+=Fe,V.length-=Fe),V.length))break e;V.length=0,V.mode=N;case N:if(V.flags&2048){if(Re===0)break e;Fe=0;do eo=Pe[xe+Fe++],V.head&&eo&&V.length<65536&&(V.head.name+=String.fromCharCode(eo));while(eo&&Fe<Re);if(V.flags&512&&(V.check=c(V.check,Pe,Fe,xe)),Re-=Fe,xe+=Fe,eo)break e}else V.head&&(V.head.name=null);V.length=0,V.mode=z;case z:if(V.flags&4096){if(Re===0)break e;Fe=0;do eo=Pe[xe+Fe++],V.head&&eo&&V.length<65536&&(V.head.comment+=String.fromCharCode(eo));while(eo&&Fe<Re);if(V.flags&512&&(V.check=c(V.check,Pe,Fe,xe)),Re-=Fe,xe+=Fe,eo)break e}else V.head&&(V.head.comment=null);V.mode=O;case O:if(V.flags&512){for(;de<16;){if(Re===0)break e;Re--,me+=Pe[xe++]<<de,de+=8}if(me!==(V.check&65535)){K.msg="header crc mismatch",V.mode=ye;break}me=0,de=0}V.head&&(V.head.hcrc=V.flags>>9&1,V.head.done=!0),K.adler=V.check=0,V.mode=H;break;case F:for(;de<32;){if(Re===0)break e;Re--,me+=Pe[xe++]<<de,de+=8}K.adler=V.check=Te(me),me=0,de=0,V.mode=L;case L:if(V.havedict===0)return K.next_out=Dr,K.avail_out=Tr,K.next_in=xe,K.avail_in=Re,V.hold=me,V.bits=de,S;K.adler=V.check=1,V.mode=H;case H:if(fe===v||fe===y)break e;case q:if(V.last){me>>>=de&7,de-=de&7,V.mode=ie;break}for(;de<3;){if(Re===0)break e;Re--,me+=Pe[xe++]<<de,de+=8}switch(V.last=me&1,me>>>=1,de-=1,me&3){case 0:V.mode=Q;break;case 1:if(Ns(V),V.mode=oe,fe===y){me>>>=2,de-=2;break e}break;case 2:V.mode=se;break;case 3:K.msg="invalid block type",V.mode=ye}me>>>=2,de-=2;break;case Q:for(me>>>=de&7,de-=de&7;de<32;){if(Re===0)break e;Re--,me+=Pe[xe++]<<de,de+=8}if((me&65535)!==(me>>>16^65535)){K.msg="invalid stored block lengths",V.mode=ye;break}if(V.length=me&65535,me=0,de=0,V.mode=J,fe===y)break e;case J:V.mode=te;case te:if(Fe=V.length,Fe){if(Fe>Re&&(Fe=Re),Fe>Tr&&(Fe=Tr),Fe===0)break e;s.arraySet(St,Pe,xe,Fe,Dr),Re-=Fe,xe+=Fe,Tr-=Fe,Dr+=Fe,V.length-=Fe;break}V.mode=H;break;case se:for(;de<14;){if(Re===0)break e;Re--,me+=Pe[xe++]<<de,de+=8}if(V.nlen=(me&31)+257,me>>>=5,de-=5,V.ndist=(me&31)+1,me>>>=5,de-=5,V.ncode=(me&15)+4,me>>>=4,de-=4,V.nlen>286||V.ndist>30){K.msg="too many length or distance symbols",V.mode=ye;break}V.have=0,V.mode=$;case $:for(;V.have<V.ncode;){for(;de<3;){if(Re===0)break e;Re--,me+=Pe[xe++]<<de,de+=8}V.lens[nb[V.have++]]=me&7,me>>>=3,de-=3}for(;V.have<19;)V.lens[nb[V.have++]]=0;if(V.lencode=V.lendyn,V.lenbits=7,Qi={bits:V.lenbits},Xi=d(f,V.lens,0,19,V.lencode,0,V.work,Qi),V.lenbits=Qi.bits,Xi){K.msg="invalid code lengths set",V.mode=ye;break}V.have=0,V.mode=X;case X:for(;V.have<V.nlen+V.ndist;){for(;Fr=V.lencode[me&(1<<V.lenbits)-1],Nt=Fr>>>24,Yo=Fr>>>16&255,qo=Fr&65535,!(Nt<=de);){if(Re===0)break e;Re--,me+=Pe[xe++]<<de,de+=8}if(qo<16)me>>>=Nt,de-=Nt,V.lens[V.have++]=qo;else{if(qo===16){for(Ms=Nt+2;de<Ms;){if(Re===0)break e;Re--,me+=Pe[xe++]<<de,de+=8}if(me>>>=Nt,de-=Nt,V.have===0){K.msg="invalid bit length repeat",V.mode=ye;break}eo=V.lens[V.have-1],Fe=3+(me&3),me>>>=2,de-=2}else if(qo===17){for(Ms=Nt+3;de<Ms;){if(Re===0)break e;Re--,me+=Pe[xe++]<<de,de+=8}me>>>=Nt,de-=Nt,eo=0,Fe=3+(me&7),me>>>=3,de-=3}else{for(Ms=Nt+7;de<Ms;){if(Re===0)break e;Re--,me+=Pe[xe++]<<de,de+=8}me>>>=Nt,de-=Nt,eo=0,Fe=11+(me&127),me>>>=7,de-=7}if(V.have+Fe>V.nlen+V.ndist){K.msg="invalid bit length repeat",V.mode=ye;break}for(;Fe--;)V.lens[V.have++]=eo}}if(V.mode===ye)break;if(V.lens[256]===0){K.msg="invalid code -- missing end-of-block",V.mode=ye;break}if(V.lenbits=9,Qi={bits:V.lenbits},Xi=d(m,V.lens,0,V.nlen,V.lencode,0,V.work,Qi),V.lenbits=Qi.bits,Xi){K.msg="invalid literal/lengths set",V.mode=ye;break}if(V.distbits=6,V.distcode=V.distdyn,Qi={bits:V.distbits},Xi=d(h,V.lens,V.nlen,V.ndist,V.distcode,0,V.work,Qi),V.distbits=Qi.bits,Xi){K.msg="invalid distances set",V.mode=ye;break}if(V.mode=oe,fe===y)break e;case oe:V.mode=pe;case pe:if(Re>=6&&Tr>=258){K.next_out=Dr,K.avail_out=Tr,K.next_in=xe,K.avail_in=Re,V.hold=me,V.bits=de,u(K,nr),Dr=K.next_out,St=K.output,Tr=K.avail_out,xe=K.next_in,Pe=K.input,Re=K.avail_in,me=V.hold,de=V.bits,V.mode===H&&(V.back=-1);break}for(V.back=0;Fr=V.lencode[me&(1<<V.lenbits)-1],Nt=Fr>>>24,Yo=Fr>>>16&255,qo=Fr&65535,!(Nt<=de);){if(Re===0)break e;Re--,me+=Pe[xe++]<<de,de+=8}if(Yo&&(Yo&240)===0){for(wn=Nt,Rd=Yo,ig=qo;Fr=V.lencode[ig+((me&(1<<wn+Rd)-1)>>wn)],Nt=Fr>>>24,Yo=Fr>>>16&255,qo=Fr&65535,!(wn+Nt<=de);){if(Re===0)break e;Re--,me+=Pe[xe++]<<de,de+=8}me>>>=wn,de-=wn,V.back+=wn}if(me>>>=Nt,de-=Nt,V.back+=Nt,V.length=qo,Yo===0){V.mode=ge;break}if(Yo&32){V.back=-1,V.mode=H;break}if(Yo&64){K.msg="invalid literal/length code",V.mode=ye;break}V.extra=Yo&15,V.mode=be;case be:if(V.extra){for(Ms=V.extra;de<Ms;){if(Re===0)break e;Re--,me+=Pe[xe++]<<de,de+=8}V.length+=me&(1<<V.extra)-1,me>>>=V.extra,de-=V.extra,V.back+=V.extra}V.was=V.length,V.mode=Ce;case Ce:for(;Fr=V.distcode[me&(1<<V.distbits)-1],Nt=Fr>>>24,Yo=Fr>>>16&255,qo=Fr&65535,!(Nt<=de);){if(Re===0)break e;Re--,me+=Pe[xe++]<<de,de+=8}if((Yo&240)===0){for(wn=Nt,Rd=Yo,ig=qo;Fr=V.distcode[ig+((me&(1<<wn+Rd)-1)>>wn)],Nt=Fr>>>24,Yo=Fr>>>16&255,qo=Fr&65535,!(wn+Nt<=de);){if(Re===0)break e;Re--,me+=Pe[xe++]<<de,de+=8}me>>>=wn,de-=wn,V.back+=wn}if(me>>>=Nt,de-=Nt,V.back+=Nt,Yo&64){K.msg="invalid distance code",V.mode=ye;break}V.offset=qo,V.extra=Yo&15,V.mode=Ge;case Ge:if(V.extra){for(Ms=V.extra;de<Ms;){if(Re===0)break e;Re--,me+=Pe[xe++]<<de,de+=8}V.offset+=me&(1<<V.extra)-1,me>>>=V.extra,de-=V.extra,V.back+=V.extra}if(V.offset>V.dmax){K.msg="invalid distance too far back",V.mode=ye;break}V.mode=He;case He:if(Tr===0)break e;if(Fe=nr-Tr,V.offset>Fe){if(Fe=V.offset-Fe,Fe>V.whave&&V.sane){K.msg="invalid distance too far back",V.mode=ye;break}Fe>V.wnext?(Fe-=V.wnext,Ta=V.wsize-Fe):Ta=V.wnext-Fe,Fe>V.length&&(Fe=V.length),kd=V.window}else kd=St,Ta=Dr-V.offset,Fe=V.length;Fe>Tr&&(Fe=Tr),Tr-=Fe,V.length-=Fe;do St[Dr++]=kd[Ta++];while(--Fe);V.length===0&&(V.mode=pe);break;case ge:if(Tr===0)break e;St[Dr++]=V.length,Tr--,V.mode=pe;break;case ie:if(V.wrap){for(;de<32;){if(Re===0)break e;Re--,me|=Pe[xe++]<<de,de+=8}if(nr-=Tr,K.total_out+=nr,V.total+=nr,nr&&(K.adler=V.check=V.flags?c(V.check,St,nr,Dr-nr):l(V.check,St,nr,Dr-nr)),nr=Tr,(V.flags?me:Te(me))!==V.check){K.msg="incorrect data check",V.mode=ye;break}me=0,de=0}V.mode=ce;case ce:if(V.wrap&&V.flags){for(;de<32;){if(Re===0)break e;Re--,me+=Pe[xe++]<<de,de+=8}if(me!==(V.total&4294967295)){K.msg="incorrect length check",V.mode=ye;break}me=0,de=0}V.mode=ae;case ae:Xi=w;break e;case ye:Xi=_;break e;case Ie:return P;case Oe:default:return x}return K.next_out=Dr,K.avail_out=Tr,K.next_in=xe,K.avail_in=Re,V.hold=me,V.bits=de,(V.wsize||nr!==K.avail_out&&V.mode<ye&&(V.mode<ie||fe!==g))&&mr(K,K.output,K.next_out,nr-K.avail_out)?(V.mode=Ie,P):(lu-=K.avail_in,nr-=K.avail_out,K.total_in+=lu,K.total_out+=nr,V.total+=nr,V.wrap&&nr&&(K.adler=V.check=V.flags?c(V.check,St,nr,K.next_out-nr):l(V.check,St,nr,K.next_out-nr)),K.data_type=V.bits+(V.last?64:0)+(V.mode===H?128:0)+(V.mode===oe||V.mode===J?256:0),(lu===0&&nr===0||fe===g)&&Xi===b&&(Xi=I),Xi)}function mt(K){if(!K||!K.state)return x;var fe=K.state;return fe.window&&(fe.window=null),K.state=null,b}function $t(K,fe){var V;return!K||!K.state||(V=K.state,(V.wrap&2)===0)?x:(V.head=fe,fe.done=!1,b)}function dr(K,fe){var V=fe.length,Pe,St,xe;return!K||!K.state||(Pe=K.state,Pe.wrap!==0&&Pe.mode!==L)?x:Pe.mode===L&&(St=1,St=l(St,fe,V,0),St!==Pe.check)?_:(xe=mr(K,fe,V,V),xe?(Pe.mode=Ie,P):(Pe.havedict=1,b))}i.inflateReset=ft,i.inflateReset2=It,i.inflateResetKeep=Pt,i.inflateInit=Cr,i.inflateInit2=Lt,i.inflate=tl,i.inflateEnd=mt,i.inflateGetHeader=$t,i.inflateSetDictionary=dr,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],y=[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(w,S,x,_,P,I,A,k){var D=k.bits,E=0,C=0,M=0,B=0,N=0,z=0,O=0,F=0,L=0,H=0,q,Q,J,te,se,$=null,X=0,oe,pe=new s.Buf16(l+1),be=new s.Buf16(l+1),Ce=null,Ge=0,He,ge,ie;for(E=0;E<=l;E++)pe[E]=0;for(C=0;C<_;C++)pe[S[x+C]]++;for(N=D,B=l;B>=1&&pe[B]===0;B--);if(N>B&&(N=B),B===0)return P[I++]=1<<24|64<<16|0,P[I++]=1<<24|64<<16|0,k.bits=1,0;for(M=1;M<B&&pe[M]===0;M++);for(N<M&&(N=M),F=1,E=1;E<=l;E++)if(F<<=1,F-=pe[E],F<0)return-1;if(F>0&&(w===d||B!==1))return-1;for(be[1]=0,E=1;E<l;E++)be[E+1]=be[E]+pe[E];for(C=0;C<_;C++)S[x+C]!==0&&(A[be[S[x+C]]++]=C);if(w===d?($=Ce=A,oe=19):w===f?($=h,X-=257,Ce=g,Ge-=257,oe=256):($=v,Ce=y,oe=-1),H=0,C=0,E=M,se=I,z=N,O=0,J=-1,L=1<<N,te=L-1,w===f&&L>c||w===m&&L>u)return 1;for(;;){He=E-O,A[C]<oe?(ge=0,ie=A[C]):A[C]>oe?(ge=Ce[Ge+A[C]],ie=$[X+A[C]]):(ge=96,ie=0),q=1<<E-O,Q=1<<z,M=Q;do Q-=q,P[se+(H>>O)+Q]=He<<24|ge<<16|ie|0;while(Q!==0);for(q=1<<E-1;H&q;)q>>=1;if(q!==0?(H&=q-1,H+=q):H=0,C++,--pe[E]===0){if(E===B)break;E=S[x+A[C]]}if(E>N&&(H&te)!==J){for(O===0&&(O=N),se+=M,z=E-O,F=1<<z;z+O<B&&(F-=pe[z+O],!(F<=0));)z++,F<<=1;if(L+=1<<z,w===f&&L>c||w===m&&L>u)return 1;J=H&te,P[J]=N<<24|z<<16|se-I|0}}return H!==0&&(P[se+H]=E-O<<24|64<<16|0),k.bits=N,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(b){if(!(this instanceof g))return new g(b);this.options=l.assign({chunkSize:16384,windowBits:0,to:""},b||{});var w=this.options;w.raw&&w.windowBits>=0&&w.windowBits<16&&(w.windowBits=-w.windowBits,w.windowBits===0&&(w.windowBits=-15)),w.windowBits>=0&&w.windowBits<16&&!(b&&b.windowBits)&&(w.windowBits+=32),w.windowBits>15&&w.windowBits<48&&(w.windowBits&15)===0&&(w.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new f,this.strm.avail_out=0;var S=s.inflateInit2(this.strm,w.windowBits);if(S!==u.Z_OK)throw new Error(d[S]);if(this.header=new m,s.inflateGetHeader(this.strm,this.header),w.dictionary&&(typeof w.dictionary=="string"?w.dictionary=c.string2buf(w.dictionary):h.call(w.dictionary)==="[object ArrayBuffer]"&&(w.dictionary=new Uint8Array(w.dictionary)),w.raw&&(S=s.inflateSetDictionary(this.strm,w.dictionary),S!==u.Z_OK)))throw new Error(d[S])}g.prototype.push=function(b,w){var S=this.strm,x=this.options.chunkSize,_=this.options.dictionary,P,I,A,k,D,E=!1;if(this.ended)return!1;I=w===~~w?w:w===!0?u.Z_FINISH:u.Z_NO_FLUSH,typeof b=="string"?S.input=c.binstring2buf(b):h.call(b)==="[object ArrayBuffer]"?S.input=new Uint8Array(b):S.input=b,S.next_in=0,S.avail_in=S.input.length;do{if(S.avail_out===0&&(S.output=new l.Buf8(x),S.next_out=0,S.avail_out=x),P=s.inflate(S,u.Z_NO_FLUSH),P===u.Z_NEED_DICT&&_&&(P=s.inflateSetDictionary(this.strm,_)),P===u.Z_BUF_ERROR&&E===!0&&(P=u.Z_OK,E=!1),P!==u.Z_STREAM_END&&P!==u.Z_OK)return this.onEnd(P),this.ended=!0,!1;S.next_out&&(S.avail_out===0||P===u.Z_STREAM_END||S.avail_in===0&&(I===u.Z_FINISH||I===u.Z_SYNC_FLUSH))&&(this.options.to==="string"?(A=c.utf8border(S.output,S.next_out),k=S.next_out-A,D=c.buf2string(S.output,A),S.next_out=k,S.avail_out=x-k,k&&l.arraySet(S.output,S.output,A,k,0),this.onData(D)):this.onData(l.shrinkBuf(S.output,S.next_out))),S.avail_in===0&&S.avail_out===0&&(E=!0)}while((S.avail_in>0||S.avail_out===0)&&P!==u.Z_STREAM_END);return P===u.Z_STREAM_END&&(I=u.Z_FINISH),I===u.Z_FINISH?(P=s.inflateEnd(this.strm),this.onEnd(P),this.ended=!0,P===u.Z_OK):(I===u.Z_SYNC_FLUSH&&(this.onEnd(u.Z_OK),S.avail_out=0),!0)},g.prototype.onData=function(b){this.chunks.push(b)},g.prototype.onEnd=function(b){b===u.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=l.flattenChunks(this.chunks)),this.chunks=[],this.err=b,this.msg=this.strm.msg};function v(b,w){var S=new g(w);if(S.push(b,!0),S.err)throw S.msg||d[S.err];return S.result}function y(b,w){return w=w||{},w.raw=!0,v(b,w)}i.Inflate=g,i.inflate=v,i.inflateRaw=y,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 H8t=globalThis.fetch,i5=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]`}},pze=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)}},hze=new Date("1904-01-01T00:00:00+0000").getTime();function gze(e){return Array.from(e).map(t=>String.fromCharCode(t)).join("")}var vze=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 gze([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(hze+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}},uo=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()}},lt=class extends uo{constructor(e,t,r){let{parser:o,start:n}=super(new vze(e,t,r));Object.defineProperty(this,"p",{enumerable:!1,get:()=>o}),Object.defineProperty(this,"tableStart",{enumerable:!1,get:()=>n})}};function De(e,t,r){let o;Object.defineProperty(e,t,{get:()=>o||(o=r(),o),enumerable:!0})}var yze=class extends lt{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 bze(o)),this.tables={},this.directory.forEach(n=>{let i=()=>r(this.tables,{tag:n.tag,offset:n.offset,length:n.length},t);De(this.tables,n.tag.trim(),i)})}},bze=class{constructor(e){this.tag=e.tag,this.checksum=e.uint32,this.offset=e.uint32,this.length=e.uint32}},qde=Yde.inflate||void 0,Kde=void 0,wze=class extends lt{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 Sze(o)),xze(this,t,r)}},Sze=class{constructor(e){this.tag=e.tag,this.offset=e.uint32,this.compLength=e.uint32,this.origLength=e.uint32,this.origChecksum=e.uint32}};function xze(e,t,r){e.tables={},e.directory.forEach(o=>{De(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(qde)l=qde(new Uint8Array(s));else if(Kde)l=Kde(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 Zde=Gde,Xde=void 0,_ze=class extends lt{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 Cze(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(Zde)i=Zde(new Uint8Array(s));else if(Xde)i=new Uint8Array(Xde(s));else{let l="no brotli decoder available to decode WOFF2 font";throw e.onerror&&e.onerror(l),new Error(l)}Tze(this,i,r)}},Cze=class{constructor(e){this.flags=e.uint8;let t=this.tagNumber=this.flags&63;t===63?this.tag=e.tag:this.tag=Eze(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 Tze(e,t,r){e.tables={},e.directory.forEach(o=>{De(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 Eze(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 ofe={},nfe=!1;Promise.all([Promise.resolve().then(function(){return eHe}),Promise.resolve().then(function(){return rHe}),Promise.resolve().then(function(){return nHe}),Promise.resolve().then(function(){return aHe}),Promise.resolve().then(function(){return cHe}),Promise.resolve().then(function(){return pHe}),Promise.resolve().then(function(){return gHe}),Promise.resolve().then(function(){return yHe}),Promise.resolve().then(function(){return kHe}),Promise.resolve().then(function(){return VHe}),Promise.resolve().then(function(){return EUe}),Promise.resolve().then(function(){return kUe}),Promise.resolve().then(function(){return OUe}),Promise.resolve().then(function(){return FUe}),Promise.resolve().then(function(){return BUe}),Promise.resolve().then(function(){return jUe}),Promise.resolve().then(function(){return UUe}),Promise.resolve().then(function(){return GUe}),Promise.resolve().then(function(){return qUe}),Promise.resolve().then(function(){return ZUe}),Promise.resolve().then(function(){return QUe}),Promise.resolve().then(function(){return $Ue}),Promise.resolve().then(function(){return rWe}),Promise.resolve().then(function(){return iWe}),Promise.resolve().then(function(){return sWe}),Promise.resolve().then(function(){return lWe}),Promise.resolve().then(function(){return uWe}),Promise.resolve().then(function(){return fWe}),Promise.resolve().then(function(){return pWe}),Promise.resolve().then(function(){return vWe}),Promise.resolve().then(function(){return _We}),Promise.resolve().then(function(){return PWe}),Promise.resolve().then(function(){return AWe}),Promise.resolve().then(function(){return MWe}),Promise.resolve().then(function(){return FWe}),Promise.resolve().then(function(){return BWe}),Promise.resolve().then(function(){return zWe}),Promise.resolve().then(function(){return UWe}),Promise.resolve().then(function(){return KWe}),Promise.resolve().then(function(){return XWe}),Promise.resolve().then(function(){return $We})]).then(e=>{e.forEach(t=>{let r=Object.keys(t)[0];ofe[r]=t[r]}),nfe=!0});function Pze(e,t,r){let o=t.tag.replace(/[^\w\d]/g,""),n=ofe[o];return n?new n(t,r,e):(console.warn(`lib-font has no definition for ${o}. The table was skipped.`),{})}function kze(){let e=0;function t(r,o){if(!nfe)return e>10?o(new Error("loading took too long")):(e++,setTimeout(()=>t(r),250));r(Pze)}return new Promise((r,o)=>t(r))}function Rze(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 Aze(e,t,r={}){if(!globalThis.document)return;let o=Rze(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=`
@font-face {
    font-family: "${e}";
    ${i.join(`
	`)}
    src: url("${t}") format("${o}");
}`,globalThis.document.head.appendChild(n),n}var Ize=[0,1,0,0],Oze=[79,84,84,79],Nze=[119,79,70,70],Mze=[119,79,70,50];function s5(e,t){if(e.length===t.length){for(let r=0;r<e.length;r++)if(e[r]!==t[r])return;return!0}}function Dze(e){let t=[e.getUint8(0),e.getUint8(1),e.getUint8(2),e.getUint8(3)];if(s5(t,Ize)||s5(t,Oze))return"SFNT";if(s5(t,Nze))return"WOFF";if(s5(t,Mze))return"WOFF2"}function Fze(e){if(!e.ok)throw new Error(`HTTP ${e.status} - ${e.statusText}`);return e}var l5=class extends pze{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 Aze(this.name,e,this.options),this.loadFont(e)))()}async loadFont(e,t){fetch(e).then(r=>Fze(r)&&r.arrayBuffer()).then(r=>this.fromDataBuffer(r,t||e)).catch(r=>{let o=new i5("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=Dze(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 i5("load",{font:this});this.dispatch(o),this.onload&&this.onload(o)}async parseBasicData(e){return kze().then(t=>(e==="SFNT"&&(this.opentype=new yze(this,this.fontData,t)),e==="WOFF"&&(this.opentype=new wze(this,this.fontData,t)),e==="WOFF2"&&(this.opentype=new _ze(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 i5("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 i5("load",{font:this});this.dispatch(e),this.onload&&this.onload(e)}}};globalThis.Font=l5;var Of=class extends uo{constructor(e,t,r){super(e),this.plaformID=t,this.encodingID=r}},Lze=class extends Of{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}]}},Bze=class extends Of{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;De(this,"subHeaders",()=>(e.currentPosition=n,[...new Array(o)].map(s=>new Vze(e))));let i=n+o*8;De(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}))}},Vze=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}},jze=class extends Of{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;De(this,"endCode",()=>e.readBytes(this.segCount,o,16));let n=o+2+this.segCountX2;De(this,"startCode",()=>e.readBytes(this.segCount,n,16));let i=n+this.segCountX2;De(this,"idDelta",()=>e.readBytes(this.segCount,i,16,!0));let s=i+this.segCountX2;De(this,"idRangeOffset",()=>e.readBytes(this.segCount,s,16));let l=s+this.segCountX2,c=this.length-(l-this.tableStart);De(this,"glyphIdArray",()=>e.readBytes(c,l,16)),De(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}))}},zze=class extends Of{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,De(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}]}},Hze=class extends Of{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,De(this,"groups",()=>[...new Array(this.numGroups)].map(n=>new Uze(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}))}},Uze=class{constructor(e){this.startcharCode=e.uint32,this.endcharCode=e.uint32,this.startGlyphID=e.uint32}},Wze=class extends Of{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,De(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}]}},Gze=class extends Of{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,De(this,"groups",()=>[...new Array(this.numGroups)].map(n=>new Yze(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}))}},Yze=class{constructor(e){this.startCharCode=e.uint32,this.endCharCode=e.uint32,this.startGlyphID=e.uint32}},qze=class extends Of{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 Kze(e));De(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}))}},Kze=class{constructor(e){this.startCharCode=e.uint32,this.endCharCode=e.uint32,this.glyphID=e.uint32}},Zze=class extends Of{constructor(e,t,r){super(e,t,r),this.subTableStart=e.currentPosition,this.format=14,this.length=e.uint32,this.numVarSelectorRecords=e.uint32,De(this,"varSelectors",()=>[...new Array(this.numVarSelectorRecords)].map(o=>new Xze(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)}},Xze=class{constructor(e){this.varSelector=e.uint24,this.defaultUVSOffset=e.Offset32,this.nonDefaultUVSOffset=e.Offset32}};function Qze(e,t,r){let o=e.uint16;return o===0?new Lze(e,t,r):o===2?new Bze(e,t,r):o===4?new jze(e,t,r):o===6?new zze(e,t,r):o===8?new Hze(e,t,r):o===10?new Wze(e,t,r):o===12?new Gze(e,t,r):o===13?new qze(e,t,r):o===14?new Zze(e,t,r):{}}var Jze=class extends lt{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 $ze(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})}},$ze=class{constructor(e,t){let r=this.platformID=e.uint16,o=this.encodingID=e.uint16,n=this.offset=e.Offset32;De(this,"table",()=>(e.currentPosition=t+n,Qze(e,r,o)))}},eHe=Object.freeze({__proto__:null,cmap:Jze}),tHe=class extends lt{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})}},rHe=Object.freeze({__proto__:null,head:tHe}),oHe=class extends lt{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()}},nHe=Object.freeze({__proto__:null,hhea:oHe}),iHe=class extends lt{constructor(e,t,r){let{p:o}=super(e,t),n=r.hhea.numberOfHMetrics,i=r.maxp.numGlyphs,s=o.currentPosition;if(De(this,"hMetrics",()=>(o.currentPosition=s,[...new Array(n)].map(l=>new sHe(o.uint16,o.int16)))),n<i){let l=s+n*4;De(this,"leftSideBearings",()=>(o.currentPosition=l,[...new Array(i-n)].map(c=>o.int16)))}}},sHe=class{constructor(e,t){this.advanceWidth=e,this.lsb=t}},aHe=Object.freeze({__proto__:null,hmtx:iHe}),lHe=class extends lt{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()}},cHe=Object.freeze({__proto__:null,maxp:lHe}),uHe=class extends lt{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 fHe(r,this)),this.format===1&&(this.langTagCount=r.uint16,this.langTagRecords=[...new Array(this.langTagCount)].map(o=>new dHe(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}},dHe=class{constructor(e,t){this.length=e,this.offset=t}},fHe=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,De(this,"string",()=>(e.currentPosition=t.stringStart+this.offset,mHe(e,this)))}};function mHe(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 pHe=Object.freeze({__proto__:null,name:uHe}),hHe=class extends lt{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()}},gHe=Object.freeze({__proto__:null,OS2:hHe}),vHe=class extends lt{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]<Qde.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 Qde[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(""))}},Qde=[".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"],yHe=Object.freeze({__proto__:null,post:vHe}),bHe=class extends lt{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,De(this,"horizAxis",()=>new mz({offset:e.offset+this.horizAxisOffset},t)),De(this,"vertAxis",()=>new mz({offset:e.offset+this.vertAxisOffset},t)),this.majorVersion===1&&this.minorVersion===1&&(this.itemVarStoreOffset=r.Offset32,De(this,"itemVarStore",()=>new mz({offset:e.offset+this.itemVarStoreOffset},t)))}},mz=class extends lt{constructor(e,t){let{p:r}=super(e,t,"AxisTable");this.baseTagListOffset=r.Offset16,this.baseScriptListOffset=r.Offset16,De(this,"baseTagList",()=>new wHe({offset:e.offset+this.baseTagListOffset},t)),De(this,"baseScriptList",()=>new SHe({offset:e.offset+this.baseScriptListOffset},t))}},wHe=class extends lt{constructor(e,t){let{p:r}=super(e,t,"BaseTagListTable");this.baseTagCount=r.uint16,this.baselineTags=[...new Array(this.baseTagCount)].map(o=>r.tag)}},SHe=class extends lt{constructor(e,t){let{p:r}=super(e,t,"BaseScriptListTable");this.baseScriptCount=r.uint16;let o=r.currentPosition;De(this,"baseScriptRecords",()=>(r.currentPosition=o,[...new Array(this.baseScriptCount)].map(n=>new xHe(this.start,r))))}},xHe=class{constructor(e,t){this.baseScriptTag=t.tag,this.baseScriptOffset=t.Offset16,De(this,"baseScriptTable",()=>(t.currentPosition=e+this.baseScriptOffset,new _He(t)))}},_He=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 CHe(this.start,e)),De(this,"baseValues",()=>(e.currentPosition=this.start+this.baseValuesOffset,new THe(e))),De(this,"defaultMinMax",()=>(e.currentPosition=this.start+this.defaultMinMaxOffset,new ife(e)))}},CHe=class{constructor(e,t){this.baseLangSysTag=t.tag,this.minMaxOffset=t.Offset16,De(this,"minMax",()=>(t.currentPosition=e+this.minMaxOffset,new ife(t)))}},THe=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 PHe(this.parser)}},ife=class{constructor(e){this.minCoord=e.Offset16,this.maxCoord=e.Offset16,this.featMinMaxCount=e.uint16;let t=e.currentPosition;De(this,"featMinMaxRecords",()=>(e.currentPosition=t,[...new Array(this.featMinMaxCount)].map(r=>new EHe(e))))}},EHe=class{constructor(e){this.featureTableTag=e.tag,this.minCoord=e.Offset16,this.maxCoord=e.Offset16}},PHe=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)}},kHe=Object.freeze({__proto__:null,BASE:bHe}),Jde=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 RHe(e)))}},RHe=class{constructor(e){this.startGlyphID=e.uint16,this.endGlyphID=e.uint16,this.class=e.uint16}},WC=class extends uo{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 AHe(e)))}},AHe=class{constructor(e){this.startGlyphID=e.uint16,this.endGlyphID=e.uint16,this.startCoverageIndex=e.uint16}},IHe=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)}},OHe=class extends lt{constructor(e,t){let{p:r}=super(e,t);this.majorVersion=r.uint16,this.minorVersion=r.uint16,this.glyphClassDefOffset=r.Offset16,De(this,"glyphClassDefs",()=>{if(this.glyphClassDefOffset!==0)return r.currentPosition=this.tableStart+this.glyphClassDefOffset,new Jde(r)}),this.attachListOffset=r.Offset16,De(this,"attachList",()=>{if(this.attachListOffset!==0)return r.currentPosition=this.tableStart+this.attachListOffset,new NHe(r)}),this.ligCaretListOffset=r.Offset16,De(this,"ligCaretList",()=>{if(this.ligCaretListOffset!==0)return r.currentPosition=this.tableStart+this.ligCaretListOffset,new DHe(r)}),this.markAttachClassDefOffset=r.Offset16,De(this,"markAttachClassDef",()=>{if(this.markAttachClassDefOffset!==0)return r.currentPosition=this.tableStart+this.markAttachClassDefOffset,new Jde(r)}),this.minorVersion>=2&&(this.markGlyphSetsDefOffset=r.Offset16,De(this,"markGlyphSetsDef",()=>{if(this.markGlyphSetsDefOffset!==0)return r.currentPosition=this.tableStart+this.markGlyphSetsDefOffset,new BHe(r)})),this.minorVersion===3&&(this.itemVarStoreOffset=r.Offset32,De(this,"itemVarStore",()=>{if(this.itemVarStoreOffset!==0)return r.currentPosition=this.tableStart+this.itemVarStoreOffset,new IHe(r)}))}},NHe=class extends uo{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 MHe(this.parser)}},MHe=class{constructor(e){this.pointCount=e.uint16,this.pointIndices=[...new Array(this.pointCount)].map(t=>e.uint16)}},DHe=class extends uo{constructor(e){super(e),this.coverageOffset=e.Offset16,De(this,"coverage",()=>(e.currentPosition=this.start+this.coverageOffset,new WC(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 FHe(this.parser)}},FHe=class extends uo{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 LHe(this.parser)}},LHe=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)}},BHe=class extends uo{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 WC(this.parser)}},VHe=Object.freeze({__proto__:null,GDEF:OHe}),$de=class extends uo{static EMPTY={scriptCount:0,scriptRecords:[]};constructor(e){super(e),this.scriptCount=e.uint16,this.scriptRecords=[...new Array(this.scriptCount)].map(t=>new jHe(e))}},jHe=class{constructor(e){this.scriptTag=e.tag,this.scriptOffset=e.Offset16}},zHe=class extends uo{constructor(e){super(e),this.defaultLangSys=e.Offset16,this.langSysCount=e.uint16,this.langSysRecords=[...new Array(this.langSysCount)].map(t=>new HHe(e))}},HHe=class{constructor(e){this.langSysTag=e.tag,this.langSysOffset=e.Offset16}},efe=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)}},tfe=class extends uo{static EMPTY={featureCount:0,featureRecords:[]};constructor(e){super(e),this.featureCount=e.uint16,this.featureRecords=[...new Array(this.featureCount)].map(t=>new UHe(e))}},UHe=class{constructor(e){this.featureTag=e.tag,this.featureOffset=e.Offset16}},WHe=class extends uo{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 YHe(e);if(t.startsWith("cc"))return new GHe(e);if(t.startsWith("ss"))return new qHe(e)}}},GHe=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)}},YHe=class{constructor(e){this.designSize=e.uint16,this.subfamilyIdentifier=e.uint16,this.subfamilyNameID=e.uint16,this.smallEnd=e.uint16,this.largeEnd=e.uint16}},qHe=class{constructor(e){this.version=e.uint16,this.UINameID=e.uint16}};function sfe(e){e.parser.currentPosition-=2,delete e.coverageOffset,delete e.getCoverageTable}var Xv=class extends uo{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 WC(e)}},hz=class{constructor(e){this.glyphSequenceIndex=e.uint16,this.lookupListIndex=e.uint16}},KHe=class extends Xv{constructor(e){super(e),this.deltaGlyphID=e.int16}},ZHe=class extends Xv{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 XHe(t)}},XHe=class{constructor(e){this.glyphCount=e.uint16,this.substituteGlyphIDs=[...new Array(this.glyphCount)].map(t=>e.uint16)}},QHe=class extends Xv{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 JHe(t)}},JHe=class{constructor(e){this.glyphCount=e.uint16,this.alternateGlyphIDs=[...new Array(this.glyphCount)].map(t=>e.uint16)}},$He=class extends Xv{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 eUe(t)}},eUe=class extends uo{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 tUe(t)}},tUe=class{constructor(e){this.ligatureGlyph=e.uint16,this.componentCount=e.uint16,this.componentGlyphIDs=[...new Array(this.componentCount-1)].map(t=>e.uint16)}},rUe=class extends Xv{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&&(sfe(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 hz(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 oUe(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 nUe(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 WC(t)}},oUe=class extends uo{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 afe(t)}},afe=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 hz(e))}},nUe=class extends uo{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 iUe(t)}},iUe=class extends afe{constructor(e){super(e)}},sUe=class extends Xv{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&&(sfe(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 lfe(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 aUe(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 cUe(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 WC(t)}},aUe=class extends uo{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 lUe(t)}},lUe=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 hz(e))}},cUe=class extends uo{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 uUe(t)}},uUe=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 lfe(e))}},lfe=class extends uo{constructor(e){super(e),this.sequenceIndex=e.uint16,this.lookupListIndex=e.uint16}},dUe=class extends uo{constructor(e){super(e),this.substFormat=e.uint16,this.extensionLookupType=e.uint16,this.extensionOffset=e.Offset32}},fUe=class extends Xv{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)}},mUe={buildSubtable:function(e,t){let r=new[void 0,KHe,ZHe,QHe,$He,rUe,sUe,dUe,fUe][e](t);return r.type=e,r}},Nf=class extends uo{constructor(e){super(e)}},pUe=class extends Nf{constructor(e){super(e),console.log("lookup type 1")}},hUe=class extends Nf{constructor(e){super(e),console.log("lookup type 2")}},gUe=class extends Nf{constructor(e){super(e),console.log("lookup type 3")}},vUe=class extends Nf{constructor(e){super(e),console.log("lookup type 4")}},yUe=class extends Nf{constructor(e){super(e),console.log("lookup type 5")}},bUe=class extends Nf{constructor(e){super(e),console.log("lookup type 6")}},wUe=class extends Nf{constructor(e){super(e),console.log("lookup type 7")}},SUe=class extends Nf{constructor(e){super(e),console.log("lookup type 8")}},xUe=class extends Nf{constructor(e){super(e),console.log("lookup type 9")}},_Ue={buildSubtable:function(e,t){let r=new[void 0,pUe,hUe,gUe,vUe,yUe,bUe,wUe,SUe,xUe][e](t);return r.type=e,r}},rfe=class extends uo{static EMPTY={lookupCount:0,lookups:[]};constructor(e){super(e),this.lookupCount=e.uint16,this.lookups=[...new Array(this.lookupCount)].map(t=>e.Offset16)}},CUe=class extends uo{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"?mUe:_Ue;return this.parser.currentPosition=this.start+this.subtableOffsets[e],t.buildSubtable(this.lookupType,this.parser)}},cfe=class extends lt{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);De(this,"scriptList",()=>i?$de.EMPTY:(o.currentPosition=n+this.scriptListOffset,new $de(o))),De(this,"featureList",()=>i?tfe.EMPTY:(o.currentPosition=n+this.featureListOffset,new tfe(o))),De(this,"lookupList",()=>i?rfe.EMPTY:(o.currentPosition=n+this.lookupListOffset,new rfe(o))),this.featureVariationsOffset&&De(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 zHe(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 efe(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 efe(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 WHe(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 CUe(this.parser,t)}},TUe=class extends cfe{constructor(e,t){super(e,t,"GSUB")}getLookup(e){return super.getLookup(e,"GSUB")}},EUe=Object.freeze({__proto__:null,GSUB:TUe}),PUe=class extends cfe{constructor(e,t){super(e,t,"GPOS")}getLookup(e){return super.getLookup(e,"GPOS")}},kUe=Object.freeze({__proto__:null,GPOS:PUe}),RUe=class extends lt{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 AUe(r)}},AUe=class extends uo{constructor(e){super(e),this.numEntries=e.uint16,this.documentRecords=[...new Array(this.numEntries)].map(t=>new IUe(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)}},IUe=class{constructor(e){this.startGlyphID=e.uint16,this.endGlyphID=e.uint16,this.svgDocOffset=e.Offset32,this.svgDocLength=e.uint32}},OUe=Object.freeze({__proto__:null,SVG:RUe}),NUe=class extends lt{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;De(this,"axes",()=>(r.currentPosition=o,[...new Array(this.axisCount)].map(i=>new MUe(r))));let n=o+this.axisCount*this.axisSize;De(this,"instances",()=>{let i=[];for(let s=0;s<this.instanceCount;s++)r.currentPosition=n+s*this.instanceSize,i.push(new DUe(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)}},MUe=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}},DUe=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)}},FUe=Object.freeze({__proto__:null,fvar:NUe}),LUe=class extends lt{constructor(e,t){let{p:r}=super(e,t),o=e.length/2;De(this,"items",()=>[...new Array(o)].map(n=>r.fword))}},BUe=Object.freeze({__proto__:null,cvt:LUe}),VUe=class extends lt{constructor(e,t){let{p:r}=super(e,t);De(this,"instructions",()=>[...new Array(e.length)].map(o=>r.uint8))}},jUe=Object.freeze({__proto__:null,fpgm:VUe}),zUe=class extends lt{constructor(e,t){let{p:r}=super(e,t);this.version=r.uint16,this.numRanges=r.uint16,De(this,"gaspRanges",()=>[...new Array(this.numRanges)].map(n=>new HUe(r)))}},HUe=class{constructor(e){this.rangeMaxPPEM=e.uint16,this.rangeGaspBehavior=e.uint16}},UUe=Object.freeze({__proto__:null,gasp:zUe}),WUe=class extends lt{constructor(e,t){super(e,t)}getGlyphData(e,t){return this.parser.currentPosition=this.tableStart+e,this.parser.readBytes(t)}},GUe=Object.freeze({__proto__:null,glyf:WUe}),YUe=class extends lt{constructor(e,t,r){let{p:o}=super(e,t),n=r.maxp.numGlyphs+1;r.head.indexToLocFormat===0?(this.x2=!0,De(this,"offsets",()=>[...new Array(n)].map(i=>o.Offset16))):De(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}}},qUe=Object.freeze({__proto__:null,loca:YUe}),KUe=class extends lt{constructor(e,t){let{p:r}=super(e,t);De(this,"instructions",()=>[...new Array(e.length)].map(o=>r.uint8))}},ZUe=Object.freeze({__proto__:null,prep:KUe}),XUe=class extends lt{constructor(e,t){let{p:r}=super(e,t);De(this,"data",()=>r.readBytes())}},QUe=Object.freeze({__proto__:null,CFF:XUe}),JUe=class extends lt{constructor(e,t){let{p:r}=super(e,t);De(this,"data",()=>r.readBytes())}},$Ue=Object.freeze({__proto__:null,CFF2:JUe}),eWe=class extends lt{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,De(this,"vertORiginYMetrics",()=>[...new Array(this.numVertOriginYMetrics)].map(o=>new tWe(r)))}},tWe=class{constructor(e){this.glyphIndex=e.uint16,this.vertOriginY=e.int16}},rWe=Object.freeze({__proto__:null,VORG:eWe}),oWe=class{constructor(e){this.indexSubTableArrayOffset=e.Offset32,this.indexTablesSize=e.uint32,this.numberofIndexSubTables=e.uint32,this.colorRef=e.uint32,this.hori=new a5(e),this.vert=new a5(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}},nWe=class{constructor(e){this.hori=new a5(e),this.vert=new a5(e),this.ppemX=e.uint8,this.ppemY=e.uint8,this.substitutePpemX=e.uint8,this.substitutePpemY=e.uint8}},a5=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}},ufe=class extends lt{constructor(e,t,r){let{p:o}=super(e,t,r);this.majorVersion=o.uint16,this.minorVersion=o.uint16,this.numSizes=o.uint32,De(this,"bitMapSizes",()=>[...new Array(this.numSizes)].map(n=>new oWe(o)))}},iWe=Object.freeze({__proto__:null,EBLC:ufe}),dfe=class extends lt{constructor(e,t,r){let{p:o}=super(e,t,r);this.majorVersion=o.uint16,this.minorVersion=o.uint16}},sWe=Object.freeze({__proto__:null,EBDT:dfe}),aWe=class extends lt{constructor(e,t){let{p:r}=super(e,t);this.majorVersion=r.uint16,this.minorVersion=r.uint16,this.numSizes=r.uint32,De(this,"bitmapScales",()=>[...new Array(this.numSizes)].map(o=>new nWe(r)))}},lWe=Object.freeze({__proto__:null,EBSC:aWe}),cWe=class extends ufe{constructor(e,t){super(e,t,"CBLC")}},uWe=Object.freeze({__proto__:null,CBLC:cWe}),dWe=class extends dfe{constructor(e,t){super(e,t,"CBDT")}},fWe=Object.freeze({__proto__:null,CBDT:dWe}),mWe=class extends lt{constructor(e,t){let{p:r}=super(e,t);this.version=r.uint16,this.flags=r.flags(16),this.numStrikes=r.uint32,De(this,"strikeOffsets",()=>[...new Array(this.numStrikes)].map(o=>r.Offset32))}},pWe=Object.freeze({__proto__:null,sbix:mWe}),hWe=class extends lt{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 pz(this.parser),o=r.gID,n=this.tableStart+this.layerRecordsOffset-6;this.parser.currentPosition=n;let i=new pz(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 pz(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 gWe(p))}},pz=class{constructor(e){this.gID=e.uint16,this.firstLayerIndex=e.uint16,this.numLayers=e.uint16}},gWe=class{constructor(e){this.gID=e.uint16,this.paletteIndex=e.uint16}},vWe=Object.freeze({__proto__:null,COLR:hWe}),yWe=class extends lt{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),De(this,"colorRecords",()=>(r.currentPosition=this.tableStart+this.offsetFirstColorRecord,[...new Array(this.numColorRecords)].map(n=>new bWe(r)))),this.version===1&&(this.offsetPaletteTypeArray=r.Offset32,this.offsetPaletteLabelArray=r.Offset32,this.offsetPaletteEntryLabelArray=r.Offset32,De(this,"paletteTypeArray",()=>(r.currentPosition=this.tableStart+this.offsetPaletteTypeArray,new wWe(r,o))),De(this,"paletteLabelArray",()=>(r.currentPosition=this.tableStart+this.offsetPaletteLabelArray,new SWe(r,o))),De(this,"paletteEntryLabelArray",()=>(r.currentPosition=this.tableStart+this.offsetPaletteEntryLabelArray,new xWe(r,o))))}},bWe=class{constructor(e){this.blue=e.uint8,this.green=e.uint8,this.red=e.uint8,this.alpha=e.uint8}},wWe=class{constructor(e,t){this.paletteTypes=[...new Array(t)].map(r=>e.uint32)}},SWe=class{constructor(e,t){this.paletteLabels=[...new Array(t)].map(r=>e.uint16)}},xWe=class{constructor(e,t){this.paletteEntryLabels=[...new Array(t)].map(r=>e.uint16)}},_We=Object.freeze({__proto__:null,CPAL:yWe}),CWe=class extends lt{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 TWe(r))}getData(e){let t=this.signatureRecords[e];return this.parser.currentPosition=this.tableStart+t.offset,new EWe(this.parser)}},TWe=class{constructor(e){this.format=e.uint32,this.length=e.uint32,this.offset=e.Offset32}},EWe=class{constructor(e){e.uint16,e.uint16,this.signatureLength=e.uint32,this.signature=e.readBytes(this.signatureLength)}},PWe=Object.freeze({__proto__:null,DSIG:CWe}),kWe=class extends lt{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 RWe(o,n))}},RWe=class{constructor(e,t){this.pixelSize=e.uint8,this.maxWidth=e.uint8,this.widths=e.readBytes(t)}},AWe=Object.freeze({__proto__:null,hdmx:kWe}),IWe=class extends lt{constructor(e,t){let{p:r}=super(e,t);this.version=r.uint16,this.nTables=r.uint16,De(this,"tables",()=>{let o=this.tableStart+4,n=[];for(let i=0;i<this.nTables;i++){r.currentPosition=o;let s=new OWe(r);n.push(s),o+=s}return n})}},OWe=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,De(this,"pairs",()=>[...new Array(this.nPairs)].map(t=>new NWe(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]}},NWe=class{constructor(e){this.left=e.uint16,this.right=e.uint16,this.value=e.fword}},MWe=Object.freeze({__proto__:null,kern:IWe}),DWe=class extends lt{constructor(e,t){let{p:r}=super(e,t);this.version=r.uint16,this.numGlyphs=r.uint16,this.yPels=r.readBytes(this.numGlyphs)}},FWe=Object.freeze({__proto__:null,LTSH:DWe}),LWe=class extends lt{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,De(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.")}},BWe=Object.freeze({__proto__:null,MERG:LWe}),VWe=class extends lt{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 jWe(this.tableStart,r))}},jWe=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)}},zWe=Object.freeze({__proto__:null,meta:VWe}),HWe=class extends lt{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.")}},UWe=Object.freeze({__proto__:null,PCLT:HWe}),WWe=class extends lt{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 GWe(r)),this.offsets=[...new Array(this.numRatios)].map(o=>r.Offset16),this.VDMXGroups=[...new Array(this.numRecs)].map(o=>new YWe(r))}},GWe=class{constructor(e){this.bCharSet=e.uint8,this.xRatio=e.uint8,this.yStartRatio=e.uint8,this.yEndRatio=e.uint8}},YWe=class{constructor(e){this.recs=e.uint16,this.startsz=e.uint8,this.endsz=e.uint8,this.records=[...new Array(this.recs)].map(t=>new qWe(e))}},qWe=class{constructor(e){this.yPelHeight=e.uint16,this.yMax=e.int16,this.yMin=e.int16}},KWe=Object.freeze({__proto__:null,VDMX:WWe}),ZWe=class extends lt{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()}},XWe=Object.freeze({__proto__:null,vhea:ZWe}),QWe=class extends lt{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 JWe(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)))}}},JWe=class{constructor(e,t){this.advanceHeight=e,this.topSideBearing=t}},$We=Object.freeze({__proto__:null,vmtx:QWe});var ffe=a(W(),1);var{kebabCase:eGe}=Tt(ffe.privateApis);function mfe(e){let t=e.reduce((r,o)=>(r[o.fontFamily]||(r[o.fontFamily]={name:o.fontFamily,fontFamily:o.fontFamily,slug:eGe(o.fontFamily.toLowerCase()),fontFace:[]}),r[o.fontFamily].fontFace.push(o),r),{});return Object.values(t)}var sa=a(T(),1);function tGe(){let{installFonts:e}=(0,GC.useContext)(li),[t,r]=(0,GC.useState)(!1),[o,n]=(0,GC.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],y=!1,b=v.map(async S=>{if(!await u(S))return y=!0,null;if(g.has(S.name))return null;let _=(((S.name??"").split(".")??[]).pop()??"").toLowerCase();return cz.includes(_)?(g.add(S.name),S):null}),w=(await Promise.all(b)).filter(S=>S!==null);if(w.length>0)c(w);else{let S=y?(0,gw.__)("Sorry, you are not allowed to upload this file type."):(0,gw.__)("No fonts found to install.");n({type:"error",message:S}),r(!1)}},c=async h=>{let g=await Promise.all(h.map(async v=>{let y=await f(v);return await sh(y,y.file,"all"),y}));m(g)};async function u(h){let g=new l5("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 y=new window.FileReader;y.readAsArrayBuffer(h),y.onload=()=>g(y.result),y.onerror=v})}let f=async h=>{let g=await d(h),v=new l5("Uploaded Font");v.fromDataBuffer(g,h.name);let b=(await new Promise(k=>v.onload=k)).detail.font,{name:w}=b.opentype.tables,S=w.get(16)||w.get(1),x=w.get(2).toLowerCase().includes("italic"),_=b.opentype.tables["OS/2"].usWeightClass||"normal",I=!!b.opentype.tables.fvar&&b.opentype.tables.fvar.axes.find(({tag:k})=>k==="wght"),A=I?`${I.minValue} ${I.maxValue}`:null;return{file:h,fontFamily:S,fontStyle:x?"italic":"normal",fontWeight:A||_}},m=async h=>{let g=mfe(h);try{await e(g),n({type:"success",message:(0,gw.__)("Fonts were installed successfully.")})}catch(v){let y=v;n({type:"error",message:y.message,errors:y?.installationErrors})}r(!1)};return(0,sa.jsxs)("div",{className:"font-library__tabpanel-layout",children:[(0,sa.jsx)(ji.DropZone,{onFilesDrop:i}),(0,sa.jsxs)(ji.__experimentalVStack,{className:"font-library__local-fonts",justify:"start",children:[o&&(0,sa.jsxs)(ji.Notice,{status:o.type,__unstableHTML:!0,onRemove:()=>n(null),children:[o.message,o.errors&&(0,sa.jsx)("ul",{children:o.errors.map((h,g)=>(0,sa.jsx)("li",{children:h},g))})]}),t&&(0,sa.jsx)(ji.FlexItem,{children:(0,sa.jsx)("div",{className:"font-library__upload-area",children:(0,sa.jsx)(ji.ProgressBar,{})})}),!t&&(0,sa.jsx)(ji.FormFileUpload,{accept:cz.map(h=>`.${h}`).join(","),multiple:!0,onChange:s,render:({openFileDialog:h})=>(0,sa.jsx)(ji.Button,{__next40pxDefaultSize:!0,className:"font-library__upload-area",onClick:h,children:(0,gw.__)("Upload font")})}),(0,sa.jsx)(ji.__experimentalText,{className:"font-library__upload-area__text",children:(0,gw.__)("Uploaded fonts appear in your library and can be used in your theme. Supported formats: .ttf, .otf, .woff, and .woff2.")})]})]})}var c5=tGe;var Ic=a(T(),1),{Tabs:u5}=Tt(d5.privateApis),rGe={id:"installed-fonts",title:(0,vw._x)("Library","Font library")},oGe={id:"upload-fonts",title:(0,vw._x)("Upload","noun")},nGe=e=>e.map(({slug:t,name:r})=>({id:t,title:e.length===1&&t==="google-fonts"?(0,vw.__)("Install Fonts"):r}));function iGe({onRequestClose:e,defaultTabId:t="installed-fonts"}){let{records:r=[]}=(0,f5.useEntityRecords)("root","fontCollection",{_fields:"slug,name,description"}),o=(0,pfe.useSelect)(i=>i(f5.store).canUser("create",{kind:"postType",name:"wp_font_family"}),[]),n=[rGe];return o&&(n.push(oGe),n.push(...nGe(r||[]))),(0,Ic.jsx)(d5.Modal,{title:(0,vw.__)("Fonts"),onRequestClose:e,isFullScreen:!0,className:"font-library-modal",children:(0,Ic.jsxs)(u5,{defaultTabId:t,children:[(0,Ic.jsx)("div",{className:"font-library-modal__tablist-container",children:(0,Ic.jsx)(u5.TabList,{children:n.map(({id:i,title:s})=>(0,Ic.jsx)(u5.Tab,{tabId:i,children:s},i))})}),n.map(({id:i})=>{let s;switch(i){case"upload-fonts":s=(0,Ic.jsx)(c5,{});break;case"installed-fonts":s=(0,Ic.jsx)(e5,{});break;default:s=(0,Ic.jsx)(r5,{slug:i})}return(0,Ic.jsx)(u5.TabPanel,{tabId:i,focusable:!1,className:"font-library-modal__tab-panel",children:s},i)})]})})}var hfe=iGe;var m5=a(j(),1),Qv=a(W(),1),gfe=a(U(),1);var yw=a(T(),1);function sGe({font:e}){let{handleSetLibraryFontSelected:t,setModalTabOpen:r}=(0,gfe.useContext)(li),o=e?.fontFace?.length||1,n=()=>{t?.(e),r?.("installed-fonts")},i=zv(e);return(0,yw.jsx)(Qv.__experimentalItem,{onClick:n,children:(0,yw.jsxs)(Qv.__experimentalHStack,{justify:"space-between",children:[(0,yw.jsx)(Qv.FlexItem,{style:i,children:e.name}),(0,yw.jsx)(Qv.FlexItem,{className:"global-styles-ui-screen-typography__font-variants-count",children:(0,m5.sprintf)((0,m5._n)("%d variant","%d variants",o),o)})]})})}var vfe=sGe;var on=a(T(),1);function yfe(e,t){return e?e.map(r=>Af(r,{source:t})):[]}function aGe(){let{baseCustomFonts:e,modalTabOpen:t,setModalTabOpen:r}=(0,bfe.useContext)(li),[o]=Ae("typography.fontFamilies"),[n]=Ae("typography.fontFamilies",void 0,"base"),i=yfe(o?.theme,"theme"),s=yfe(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,on.jsxs)(on.Fragment,{children:[!!t&&(0,on.jsx)(hfe,{onRequestClose:()=>r?.(""),defaultTabId:t}),(0,on.jsxs)(Oc.__experimentalVStack,{spacing:2,children:[(0,on.jsxs)(Oc.__experimentalHStack,{justify:"space-between",children:[(0,on.jsx)(ko,{level:3,children:(0,Jv.__)("Fonts")}),(0,on.jsx)(Oc.Button,{onClick:()=>r?.("installed-fonts"),label:(0,Jv.__)("Manage fonts"),icon:q4,size:"small"})]}),l.length>0&&(0,on.jsx)(on.Fragment,{children:(0,on.jsx)(Oc.__experimentalItemGroup,{size:"large",isBordered:!0,isSeparated:!0,children:l.map(d=>(0,on.jsx)(vfe,{font:d},d.slug))})}),!c&&(0,on.jsxs)(on.Fragment,{children:[(0,on.jsx)(Oc.__experimentalText,{as:"p",children:u?(0,Jv.__)("No fonts activated."):(0,Jv.__)("No fonts installed.")}),(0,on.jsx)(Oc.Button,{className:"global-styles-ui-font-families__manage-fonts",variant:"secondary",__next40pxDefaultSize:!0,onClick:()=>{r?.(u?"installed-fonts":"upload-fonts")},children:u?(0,Jv.__)("Manage fonts"):(0,Jv.__)("Add fonts")})]})]})]})}function wfe({...e}){return(0,on.jsx)(ZO,{children:(0,on.jsx)(aGe,{...e})})}var YC=a(j(),1),Mf=a(W(),1);var Ju=a(T(),1);function lGe(){return(0,Ju.jsxs)(Mf.__experimentalVStack,{spacing:2,children:[(0,Ju.jsx)(Mf.__experimentalHStack,{justify:"space-between",children:(0,Ju.jsx)(ko,{level:3,children:(0,YC.__)("Font Sizes")})}),(0,Ju.jsx)(Mf.__experimentalItemGroup,{isBordered:!0,isSeparated:!0,children:(0,Ju.jsx)(lo,{path:"/typography/font-sizes",children:(0,Ju.jsxs)(Mf.__experimentalHStack,{direction:"row",children:[(0,Ju.jsx)(Mf.FlexItem,{children:(0,YC.__)("Font size presets")}),(0,Ju.jsx)(cn,{icon:(0,YC.isRTL)()?pr:hr})]})})})]})}var Sfe=lGe;var Ml=a(T(),1);function cGe(){let{fontLibraryEnabled:e}=(0,_fe.useContext)(Wo);return(0,Ml.jsxs)(Ml.Fragment,{children:[(0,Ml.jsx)(Qt,{title:(0,p5.__)("Typography"),description:(0,p5.__)("Available fonts, typographic styles, and the application of those styles.")}),(0,Ml.jsx)(nh,{children:(0,Ml.jsxs)(xfe.__experimentalVStack,{spacing:7,children:[(0,Ml.jsx)(fw,{title:(0,p5.__)("Typesets")}),e&&(0,Ml.jsx)(wfe,{}),(0,Ml.jsx)(dde,{}),(0,Ml.jsx)(Sfe,{})]})})]})}var Cfe=cGe;var wr=a(j(),1),Ha=a(W(),1),Ife=a(U(),1);var Tfe=a(he(),1);var Efe=a(T(),1),{useSettingsForBlockElement:uGe,TypographyPanel:dGe}=Tt(Tfe.privateApis);function Pfe({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]=ze(o,"","user",!1),[i,s]=ze(o,"","merged",!1),[l]=Ae(""),u=uGe(l,void 0,e==="heading"?t:e);return(0,Efe.jsx)(dGe,{inheritedValue:i,value:n,onChange:s,settings:u})}var kfe=a(T(),1);function Rfe({name:e,element:t,headingLevel:r}){let o="";t==="heading"?o=`elements.${r}.`:t&&t!=="text"&&(o=`elements.${t}.`);let[n]=ze(o+"typography.fontFamily",e),[i]=ze(o+"color.gradient",e),[s]=ze(o+"color.background",e),[l]=ze("color.background"),[c]=ze(o+"color.text",e),[u]=ze(o+"typography.fontSize",e),[d]=ze(o+"typography.fontStyle",e),[f]=ze(o+"typography.fontWeight",e),[m]=ze(o+"typography.letterSpacing",e);return(0,kfe.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 Vn=a(T(),1),Afe={text:{description:(0,wr.__)("Manage the fonts used on the site."),title:(0,wr.__)("Text")},link:{description:(0,wr.__)("Manage the fonts and typography used on the links."),title:(0,wr.__)("Links")},heading:{description:(0,wr.__)("Manage the fonts and typography used on headings."),title:(0,wr.__)("Headings")},caption:{description:(0,wr.__)("Manage the fonts and typography used on captions."),title:(0,wr.__)("Captions")},button:{description:(0,wr.__)("Manage the fonts and typography used on buttons."),title:(0,wr.__)("Buttons")}};function fGe({element:e}){let[t,r]=(0,Ife.useState)("heading");return(0,Vn.jsxs)(Vn.Fragment,{children:[(0,Vn.jsx)(Qt,{title:Afe[e].title,description:Afe[e].description}),(0,Vn.jsx)(Ha.__experimentalSpacer,{marginX:4,children:(0,Vn.jsx)(Rfe,{element:e,headingLevel:t})}),e==="heading"&&(0,Vn.jsx)(Ha.__experimentalSpacer,{marginX:4,marginBottom:"1em",children:(0,Vn.jsxs)(Ha.__experimentalToggleGroupControl,{label:(0,wr.__)("Select heading level"),hideLabelFromVision:!0,value:t,onChange:o=>r(o),isBlock:!0,size:"__unstable-large",children:[(0,Vn.jsx)(Ha.__experimentalToggleGroupControlOption,{value:"heading",showTooltip:!0,"aria-label":(0,wr.__)("All headings"),label:(0,wr._x)("All","heading levels")}),(0,Vn.jsx)(Ha.__experimentalToggleGroupControlOption,{value:"h1",showTooltip:!0,"aria-label":(0,wr.__)("Heading 1"),label:(0,wr.__)("H1")}),(0,Vn.jsx)(Ha.__experimentalToggleGroupControlOption,{value:"h2",showTooltip:!0,"aria-label":(0,wr.__)("Heading 2"),label:(0,wr.__)("H2")}),(0,Vn.jsx)(Ha.__experimentalToggleGroupControlOption,{value:"h3",showTooltip:!0,"aria-label":(0,wr.__)("Heading 3"),label:(0,wr.__)("H3")}),(0,Vn.jsx)(Ha.__experimentalToggleGroupControlOption,{value:"h4",showTooltip:!0,"aria-label":(0,wr.__)("Heading 4"),label:(0,wr.__)("H4")}),(0,Vn.jsx)(Ha.__experimentalToggleGroupControlOption,{value:"h5",showTooltip:!0,"aria-label":(0,wr.__)("Heading 5"),label:(0,wr.__)("H5")}),(0,Vn.jsx)(Ha.__experimentalToggleGroupControlOption,{value:"h6",showTooltip:!0,"aria-label":(0,wr.__)("Heading 6"),label:(0,wr.__)("H6")})]})}),(0,Vn.jsx)(Pfe,{element:e,headingLevel:t})]})}var bw=fGe;var gz=a(j(),1),Lfe=a(W(),1),Bfe=a(he(),1);var Ua=a(W(),1),ww=a(j(),1);var Dfe=a(U(),1);var Ofe=a(W(),1),Nfe=a(T(),1);function mGe({className:e,children:t,...r}){return(0,Nfe.jsx)(Ofe.Flex,{className:Z("global-styles-ui__color-indicator-wrapper",e),...r,children:t})}var Mfe=mGe;var zi=a(T(),1),h5=[];function pGe({name:e}){let[t]=Ae("color.palette.custom"),[r]=Ae("color.palette.theme"),[o]=Ae("color.palette.default"),[n]=Ae("color.defaultPalette",e),i=t||h5,s=r||h5,l=o||h5,c=n??!0,u=(0,Dfe.useMemo)(()=>[...i,...s,...l&&c?l:h5],[i,s,l,c]),d=e?"/blocks/"+encodeURIComponent(e)+"/colors/palette":"/colors/palette";return(0,zi.jsxs)(Ua.__experimentalVStack,{spacing:3,children:[(0,zi.jsx)(ko,{level:3,children:(0,ww.__)("Palette")}),(0,zi.jsx)(Ua.__experimentalItemGroup,{isBordered:!0,isSeparated:!0,children:(0,zi.jsx)(lo,{path:d,children:(0,zi.jsxs)(Ua.__experimentalHStack,{direction:"row",children:[u.length>0?(0,zi.jsxs)(zi.Fragment,{children:[(0,zi.jsx)(Ua.__experimentalZStack,{isLayered:!1,offset:-8,children:u.slice(0,5).map(({color:f},m)=>(0,zi.jsx)(Mfe,{children:(0,zi.jsx)(Ua.ColorIndicator,{colorValue:f})},`${f}-${m}`))}),(0,zi.jsx)(Ua.FlexItem,{isBlock:!0,children:(0,ww.__)("Edit palette")})]}):(0,zi.jsx)(Ua.FlexItem,{children:(0,ww.__)("Add colors")}),(0,zi.jsx)(cn,{icon:(0,ww.isRTL)()?pr:hr})]})})})]})}var Ffe=pGe;var $u=a(T(),1),{useSettingsForBlockElement:hGe,ColorPanel:gGe}=Tt(Bfe.privateApis);function vGe(){let[e,t]=ze("",void 0,"user",!1),[r]=ze("",void 0,"merged",!1),[o]=Ae(""),n=hGe(o);return(0,$u.jsxs)($u.Fragment,{children:[(0,$u.jsx)(Qt,{title:(0,gz.__)("Colors"),description:(0,gz.__)("Palette colors and the application of those colors on site elements.")}),(0,$u.jsx)(nh,{children:(0,$u.jsx)(Lfe.__experimentalVStack,{spacing:7,children:(0,$u.jsx)(Ffe,{})})}),(0,$u.jsx)(gGe,{inheritedValue:r,value:e,onChange:t,settings:n})]})}var Vfe=vGe;var ZC=a(j(),1),Kfe=a(W(),1);var Wfe=a(_e(),1),Ff=a(W(),1),xw=a(j(),1);var v5=a(W(),1);var g5=a(W(),1);var jfe=a(T(),1);function zfe(){let{paletteColors:e}=aw();return e.slice(0,4).map(({slug:t,color:r},o)=>(0,jfe.jsx)("div",{style:{flexGrow:1,height:"100%",background:r}},`${t}-${o}`))}var qC=a(T(),1),yGe={start:{scale:1,opacity:1},hover:{scale:0,opacity:0}},bGe=({label:e,isFocused:t,withHoverView:r})=>(0,qC.jsx)(cw,{label:e,isFocused:t,withHoverView:r,children:({key:o})=>(0,qC.jsx)(g5.__unstableMotion.div,{variants:yGe,style:{height:"100%",overflow:"hidden"},children:(0,qC.jsx)(g5.__experimentalHStack,{spacing:0,justify:"center",style:{height:"100%",overflow:"hidden"},children:(0,qC.jsx)(zfe,{})})},o)}),Hfe=bGe;var $v=a(T(),1),Ufe=["color"];function Sw({title:e,gap:t=2}){let r=LO(Ufe);return r?.length<=1?null:(0,$v.jsxs)(v5.__experimentalVStack,{spacing:3,children:[e&&(0,$v.jsx)(ko,{level:3,children:e}),(0,$v.jsx)(v5.__experimentalGrid,{gap:t,children:r.map((o,n)=>(0,$v.jsx)(dw,{variation:o,isPill:!0,properties:Ufe,showTooltip:!0,children:()=>(0,$v.jsx)(Hfe,{})},n))})]})}var Df=a(T(),1),wGe={placement:"bottom-start",offset:8};function Gfe({name:e}){let[t,r]=Ae("color.palette.theme",e),[o]=Ae("color.palette.theme",e,"base"),[n,i]=Ae("color.palette.default",e),[s]=Ae("color.palette.default",e,"base"),[l,c]=Ae("color.palette.custom",e),[u]=Ae("color.defaultPalette",e),f=(0,Wfe.useViewportMatch)("small","<")?wGe:void 0,[m]=kue(e);return(0,Df.jsxs)(Ff.__experimentalVStack,{className:"global-styles-ui-color-palette-panel",spacing:8,children:[(0,Df.jsxs)(Ff.__experimentalVStack,{spacing:4,children:[!!t&&!!t.length&&(0,Df.jsx)(Ff.__experimentalPaletteEdit,{canReset:t!==o,canOnlyChangeValues:!0,colors:t,onChange:r,paletteLabel:(0,xw.__)("Theme"),paletteLabelHeadingLevel:3,popoverProps:f}),window.__experimentalEnableColorRandomizer&&t?.length>0&&m&&(0,Df.jsx)(Ff.Button,{__next40pxDefaultSize:!0,variant:"secondary",icon:X4,onClick:m,children:(0,xw.__)("Randomize colors")})]}),!!n&&!!n.length&&!!u&&(0,Df.jsx)(Ff.__experimentalPaletteEdit,{canReset:n!==s,canOnlyChangeValues:!0,colors:n,onChange:i,paletteLabel:(0,xw.__)("Default"),paletteLabelHeadingLevel:3,popoverProps:f}),(0,Df.jsx)(Ff.__experimentalPaletteEdit,{colors:l,onChange:c,paletteLabel:(0,xw.__)("Custom"),paletteLabelHeadingLevel:3,slugPrefix:"custom-",popoverProps:f}),(0,Df.jsx)(Sw,{title:(0,xw.__)("Palettes")})]})}var Yfe=a(_e(),1),td=a(W(),1),KC=a(j(),1);var ed=a(T(),1),SGe={placement:"bottom-start",offset:8},xGe=()=>{};function qfe({name:e}){let[t,r]=Ae("color.gradients.theme",e),[o]=Ae("color.gradients.theme",e,"base"),[n,i]=Ae("color.gradients.default",e),[s]=Ae("color.gradients.default",e,"base"),[l,c]=Ae("color.gradients.custom",e),[u]=Ae("color.defaultGradients",e),[d]=Ae("color.duotone.custom")||[],[f]=Ae("color.duotone.default")||[],[m]=Ae("color.duotone.theme")||[],[h]=Ae("color.defaultDuotone"),g=[...d||[],...m||[],...f&&h?f:[]],y=(0,Yfe.useViewportMatch)("small","<")?SGe:void 0;return(0,ed.jsxs)(td.__experimentalVStack,{className:"global-styles-ui-gradient-palette-panel",spacing:8,children:[!!t&&!!t.length&&(0,ed.jsx)(td.__experimentalPaletteEdit,{canReset:t!==o,canOnlyChangeValues:!0,gradients:t,onChange:r,paletteLabel:(0,KC.__)("Theme"),paletteLabelHeadingLevel:3,popoverProps:y}),!!n&&!!n.length&&!!u&&(0,ed.jsx)(td.__experimentalPaletteEdit,{canReset:n!==s,canOnlyChangeValues:!0,gradients:n,onChange:i,paletteLabel:(0,KC.__)("Default"),paletteLabelHeadingLevel:3,popoverProps:y}),(0,ed.jsx)(td.__experimentalPaletteEdit,{gradients:l,onChange:c,paletteLabel:(0,KC.__)("Custom"),paletteLabelHeadingLevel:3,slugPrefix:"custom-",popoverProps:y}),!!g&&!!g.length&&(0,ed.jsxs)("div",{children:[(0,ed.jsx)(ko,{level:3,children:(0,KC.__)("Duotone")}),(0,ed.jsx)(td.__experimentalSpacer,{margin:3}),(0,ed.jsx)(td.DuotonePicker,{duotonePalette:g,disableCustomDuotone:!0,disableCustomColors:!0,clearable:!1,onChange:xGe,colorPalette:[]})]})]})}var aa=a(T(),1),{Tabs:_w}=Tt(Kfe.privateApis);function _Ge({name:e}){return(0,aa.jsxs)(aa.Fragment,{children:[(0,aa.jsx)(Qt,{title:(0,ZC.__)("Edit palette"),description:(0,ZC.__)("The combination of colors used across the site and in color pickers.")}),(0,aa.jsxs)(_w,{children:[(0,aa.jsxs)(_w.TabList,{children:[(0,aa.jsx)(_w.Tab,{tabId:"color",children:(0,ZC.__)("Color")}),(0,aa.jsx)(_w.Tab,{tabId:"gradient",children:(0,ZC.__)("Gradient")})]}),(0,aa.jsx)(_w.TabPanel,{tabId:"color",focusable:!1,children:(0,aa.jsx)(Gfe,{name:e})}),(0,aa.jsx)(_w.TabPanel,{tabId:"gradient",focusable:!1,children:(0,aa.jsx)(qfe,{name:e})})]})]})}var Zfe=_Ge;var vz=a(j(),1),$fe=a(he(),1),eme=a(W(),1);var Xfe=a(he(),1);var Qfe=a(T(),1),CGe={backgroundSize:"auto"},{BackgroundPanel:TGe}=Tt(Xfe.privateApis);function Jfe(){let[e]=ze("",void 0,"user",!1),[t,r]=ze("",void 0,"merged",!1),[o]=Ae("");return(0,Qfe.jsx)(TGe,{inheritedValue:t,value:e,onChange:r,settings:o,defaultValues:CGe})}var ch=a(T(),1),{useHasBackgroundPanel:EGe}=Tt($fe.privateApis);function PGe(){let[e]=Ae(""),t=EGe(e);return(0,ch.jsxs)(ch.Fragment,{children:[(0,ch.jsx)(Qt,{title:(0,vz.__)("Background"),description:(0,ch.jsx)(eme.__experimentalText,{children:(0,vz.__)("Set styles for the site's background.")})}),t&&(0,ch.jsx)(Jfe,{})]})}var tme=PGe;var Ui=a(W(),1),Hi=a(j(),1);var sme=a(U(),1);var rme=a(W(),1),ome=a(j(),1),nme=a(T(),1);function kGe({text:e,confirmButtonText:t,isOpen:r,toggleOpen:o,onConfirm:n}){let i=async()=>{o(),n()},s=()=>{o()};return(0,nme.jsx)(rme.__experimentalConfirmDialog,{isOpen:r,cancelButtonText:(0,ome.__)("Cancel"),confirmButtonText:t,onCancel:s,onConfirm:i,size:"medium",children:e})}var ime=kGe;var cr=a(T(),1),{Menu:XC}=Tt(Ui.privateApis),bz="6px 6px 9px rgba(0, 0, 0, 0.2)";function ame(){let[e]=Ae("shadow.presets.default"),[t]=Ae("shadow.defaultPresets"),[r]=Ae("shadow.presets.theme"),[o,n]=Ae("shadow.presets.custom"),i=d=>{n([...o||[],d])},s=()=>{n([])},[l,c]=(0,sme.useState)(!1),u=()=>c(!l);return(0,cr.jsxs)(cr.Fragment,{children:[l&&(0,cr.jsx)(ime,{text:(0,Hi.__)("Are you sure you want to remove all custom shadows?"),confirmButtonText:(0,Hi.__)("Remove"),isOpen:l,toggleOpen:u,onConfirm:s}),(0,cr.jsx)(Qt,{title:(0,Hi.__)("Shadows"),description:(0,Hi.__)("Manage and create shadow styles for use across the site.")}),(0,cr.jsx)(nh,{children:(0,cr.jsxs)(Ui.__experimentalVStack,{className:"global-styles-ui__shadows-panel",spacing:7,children:[t&&(0,cr.jsx)(yz,{label:(0,Hi.__)("Default"),shadows:e||[],category:"default"}),r&&r.length>0&&(0,cr.jsx)(yz,{label:(0,Hi.__)("Theme"),shadows:r||[],category:"theme"}),(0,cr.jsx)(yz,{label:(0,Hi.__)("Custom"),shadows:o||[],category:"custom",canCreate:!0,onCreate:i,onReset:u})]})})]})}function yz({label:e,shadows:t,category:r,canCreate:o,onCreate:n,onReset:i}){let s=()=>{let l=FO(t,"shadow-");n?.({name:(0,Hi.sprintf)((0,Hi.__)("Shadow %d"),l),shadow:bz,slug:`shadow-${l}`})};return(0,cr.jsxs)(Ui.__experimentalVStack,{spacing:2,children:[(0,cr.jsxs)(Ui.__experimentalHStack,{justify:"space-between",children:[(0,cr.jsx)(ko,{level:3,children:e}),(0,cr.jsxs)(Ui.FlexItem,{className:"global-styles-ui__shadows-panel__options-container",children:[o&&(0,cr.jsx)(Ui.Button,{size:"small",icon:Md,label:(0,Hi.__)("Add shadow"),onClick:()=>{s()}}),!!t?.length&&r==="custom"&&(0,cr.jsxs)(XC,{children:[(0,cr.jsx)(XC.TriggerButton,{render:(0,cr.jsx)(Ui.Button,{size:"small",icon:to,label:(0,Hi.__)("Shadow options")})}),(0,cr.jsx)(XC.Popover,{children:(0,cr.jsx)(XC.Item,{onClick:i,children:(0,cr.jsx)(XC.ItemLabel,{children:(0,Hi.__)("Remove all custom shadows")})})})]})]})]}),t.length>0&&(0,cr.jsx)(Ui.__experimentalItemGroup,{isBordered:!0,isSeparated:!0,children:t.map(l=>(0,cr.jsx)(RGe,{shadow:l,category:r},l.slug))})]})}function RGe({shadow:e,category:t}){return(0,cr.jsx)(lo,{path:`/shadows/edit/${t}/${e.slug}`,children:(0,cr.jsxs)(Ui.__experimentalHStack,{children:[(0,cr.jsx)(Ui.FlexItem,{children:e.name}),(0,cr.jsx)(cn,{icon:(0,Hi.isRTL)()?pr:hr})]})})}var Xe=a(W(),1),Or=a(j(),1);var Wa=a(U(),1);function lme(e){return(e.match(/(?:[^,(]|\([^)]*\))+/g)||[]).map(r=>r.trim())}function cme(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 ume(e){let t=`${e.x||"0px"} ${e.y||"0px"} ${e.blur||"0px"} ${e.spread||"0px"}`;return`${e.inset?"inset":""} ${t} ${e.color||""}`.trim()}var Be=a(T(),1),{Menu:QC}=Tt(Xe.privateApis),AGe=[{label:(0,Or.__)("Rename"),action:"rename"},{label:(0,Or.__)("Delete"),action:"delete"}],IGe=[{label:(0,Or.__)("Reset"),action:"reset"}];function dme(){let{goBack:e,params:t}=(0,Xe.useNavigator)(),{category:r,slug:o}=t,[n,i]=Ae(`shadow.presets.${r}`);(0,Wa.useEffect)(()=>{let x=n?.some(_=>_.slug===o);o&&!x&&e()},[n,o,e]);let[s]=Ae(`shadow.presets.${r}`,void 0,"base"),[l,c]=(0,Wa.useState)(()=>(n||[]).find(x=>x.slug===o)),u=(0,Wa.useMemo)(()=>(s||[]).find(x=>x.slug===o),[s,o]),[d,f]=(0,Wa.useState)(!1),[m,h]=(0,Wa.useState)(!1),[g,v]=(0,Wa.useState)(l?.name);if(!r||!o)return null;let y=x=>{c({...l,shadow:x});let _=n.map(P=>P.slug===o?{...l,shadow:x}:P);i(_)},b=x=>{if(x==="reset"){let _=n.map(P=>P.slug===o?u:P);c(u),i(_)}else x==="delete"?f(!0):x==="rename"&&h(!0)},w=()=>{i(n.filter(x=>x.slug!==o))},S=x=>{if(!x)return;let _=n.map(P=>P.slug===o?{...l,name:x}:P);c({...l,name:x}),i(_)};return l?(0,Be.jsxs)(Be.Fragment,{children:[(0,Be.jsxs)(Xe.__experimentalHStack,{justify:"space-between",children:[(0,Be.jsx)(Qt,{title:l.name}),(0,Be.jsx)(Xe.FlexItem,{children:(0,Be.jsx)(Xe.__experimentalSpacer,{marginTop:2,marginBottom:0,paddingX:4,children:(0,Be.jsxs)(QC,{children:[(0,Be.jsx)(QC.TriggerButton,{render:(0,Be.jsx)(Xe.Button,{size:"small",icon:to,label:(0,Or.__)("Menu")})}),(0,Be.jsx)(QC.Popover,{children:(r==="custom"?AGe:IGe).map(x=>(0,Be.jsx)(QC.Item,{onClick:()=>b(x.action),disabled:x.action==="reset"&&l.shadow===u?.shadow,children:(0,Be.jsx)(QC.ItemLabel,{children:x.label})},x.action))})]})})})]}),(0,Be.jsxs)(nh,{children:[(0,Be.jsx)(OGe,{shadow:l.shadow}),(0,Be.jsx)(NGe,{shadow:l.shadow,onChange:y})]}),d&&(0,Be.jsx)(Xe.__experimentalConfirmDialog,{isOpen:!0,onConfirm:()=>{w(),f(!1)},onCancel:()=>{f(!1)},confirmButtonText:(0,Or.__)("Delete"),size:"medium",children:(0,Or.sprintf)((0,Or.__)('Are you sure you want to delete "%s" shadow preset?'),l.name)}),m&&(0,Be.jsx)(Xe.Modal,{title:(0,Or.__)("Rename"),onRequestClose:()=>h(!1),size:"small",children:(0,Be.jsxs)("form",{onSubmit:x=>{x.preventDefault(),S(g),h(!1)},children:[(0,Be.jsx)(Xe.__experimentalInputControl,{__next40pxDefaultSize:!0,autoComplete:"off",label:(0,Or.__)("Name"),placeholder:(0,Or.__)("Shadow name"),value:g??"",onChange:v}),(0,Be.jsx)(Xe.__experimentalSpacer,{marginBottom:6}),(0,Be.jsxs)(Xe.Flex,{className:"block-editor-shadow-edit-modal__actions",justify:"flex-end",expanded:!1,children:[(0,Be.jsx)(Xe.FlexItem,{children:(0,Be.jsx)(Xe.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:()=>h(!1),children:(0,Or.__)("Cancel")})}),(0,Be.jsx)(Xe.FlexItem,{children:(0,Be.jsx)(Xe.Button,{__next40pxDefaultSize:!0,variant:"primary",type:"submit",children:(0,Or.__)("Save")})})]})]})})]}):(0,Be.jsx)(Qt,{title:""})}function OGe({shadow:e}){return(0,Be.jsx)(Xe.__experimentalSpacer,{marginBottom:4,marginTop:-2,children:(0,Be.jsx)(Xe.__experimentalHStack,{alignment:"center",justify:"center",className:"global-styles-ui__shadow-preview-panel",children:(0,Be.jsx)("div",{className:"global-styles-ui__shadow-preview-block",style:{boxShadow:e}})})})}function NGe({shadow:e,onChange:t}){let r=(0,Wa.useRef)(null),o=(0,Wa.useMemo)(()=>lme(e),[e]),n=(l,c)=>{let u=[...o];u[l]=c,t(u.join(", "))},i=()=>{t([...o,bz].join(", "))},s=l=>{t(o.filter((c,u)=>u!==l).join(", ")),r.current?.focus()};return(0,Be.jsxs)(Be.Fragment,{children:[(0,Be.jsx)(Xe.__experimentalVStack,{spacing:2,children:(0,Be.jsxs)(Xe.__experimentalHStack,{justify:"space-between",children:[(0,Be.jsx)(ko,{level:3,children:(0,Or.__)("Shadows")}),(0,Be.jsx)(Xe.FlexItem,{className:"global-styles-ui__shadows-panel__options-container",children:(0,Be.jsx)(Xe.Button,{size:"small",icon:Md,label:(0,Or.__)("Add shadow"),onClick:()=>{i()},ref:r})})]})}),(0,Be.jsx)(Xe.__experimentalSpacer,{}),(0,Be.jsx)(Xe.__experimentalItemGroup,{isBordered:!0,isSeparated:!0,children:o.map((l,c)=>(0,Be.jsx)(MGe,{shadow:l,onChange:u=>n(c,u),canRemove:o.length>1,onRemove:()=>s(c)},c))})]})}function MGe({shadow:e,onChange:t,canRemove:r,onRemove:o}){let n={placement:"left-start",offset:36,shift:!0},i=(0,Wa.useMemo)(()=>cme(e),[e]),s=l=>{t(ume(l))};return(0,Be.jsx)(Xe.Dropdown,{popoverProps:n,className:"global-styles-ui__shadow-editor__dropdown",renderToggle:({onToggle:l,isOpen:c})=>{let u={onClick:l,className:Z("global-styles-ui__shadow-editor__dropdown-toggle",{"is-open":c}),"aria-expanded":c},d={onClick:()=>{c&&l(),o()},className:Z("global-styles-ui__shadow-editor__remove-button",{"is-open":c}),label:(0,Or.__)("Remove shadow")};return(0,Be.jsxs)(Be.Fragment,{children:[(0,Be.jsx)(Xe.Button,{__next40pxDefaultSize:!0,icon:t_,...u,children:i.inset?(0,Or.__)("Inner shadow"):(0,Or.__)("Drop shadow")}),r&&(0,Be.jsx)(Xe.Button,{size:"small",icon:j4,...d})]})},renderContent:()=>(0,Be.jsx)(Xe.__experimentalDropdownContentWrapper,{paddingSize:"medium",className:"global-styles-ui__shadow-editor__dropdown-content",children:(0,Be.jsx)(DGe,{shadowObj:i,onChange:s})})})}function DGe({shadowObj:e,onChange:t}){let n=(i,s)=>{let l={...e,[i]:s};t(l)};return(0,Be.jsxs)(Xe.__experimentalVStack,{spacing:4,className:"global-styles-ui__shadow-editor-panel",children:[(0,Be.jsx)(Xe.ColorPalette,{clearable:!1,enableAlpha:!0,__experimentalIsRenderedInSidebar:!0,value:e.color,onChange:i=>n("color",i)}),(0,Be.jsxs)(Xe.__experimentalToggleGroupControl,{label:(0,Or.__)("Shadow Type"),value:e.inset?"inset":"outset",isBlock:!0,onChange:i=>n("inset",i==="inset"),hideLabelFromVision:!0,__next40pxDefaultSize:!0,children:[(0,Be.jsx)(Xe.__experimentalToggleGroupControlOption,{value:"outset",label:(0,Or.__)("Outset")}),(0,Be.jsx)(Xe.__experimentalToggleGroupControlOption,{value:"inset",label:(0,Or.__)("Inset")})]}),(0,Be.jsxs)(Xe.__experimentalGrid,{columns:2,gap:4,children:[(0,Be.jsx)(y5,{label:(0,Or.__)("X Position"),value:e.x,onChange:i=>n("x",i)}),(0,Be.jsx)(y5,{label:(0,Or.__)("Y Position"),value:e.y,onChange:i=>n("y",i)}),(0,Be.jsx)(y5,{label:(0,Or.__)("Blur"),value:e.blur,onChange:i=>n("blur",i)}),(0,Be.jsx)(y5,{label:(0,Or.__)("Spread"),value:e.spread,onChange:i=>n("spread",i)})]})]})}function y5({label:e,value:t,onChange:r}){return(0,Be.jsx)(Xe.__experimentalUnitControl,{label:e,__next40pxDefaultSize:!0,value:t,onChange:n=>{let s=n!==void 0&&!isNaN(parseFloat(n))?n:"0px";r(s)}})}var wz=a(T(),1);function fme(){return(0,wz.jsx)(ame,{})}function mme(){return(0,wz.jsx)(dme,{})}var vme=a(j(),1),yme=a(he(),1);var pme=a(he(),1),Sz=a(U(),1);var hme=a(T(),1),{useSettingsForBlockElement:FGe,DimensionsPanel:LGe}=Tt(pme.privateApis),BGe={contentSize:!0,wideSize:!0,padding:!0,margin:!0,blockGap:!0,height:!0,minHeight:!0,minWidth:!0,width:!0,childLayout:!1};function gme(){let[e]=ze("",void 0,"user",!1),[t,r]=ze("",void 0,"merged",!1),[o]=Ae("",void 0,"user"),[n,i]=Ae(""),s=FGe(n),l=(0,Sz.useMemo)(()=>({...t,layout:s.layout}),[t,s.layout]),c=(0,Sz.useMemo)(()=>({...e,layout:o.layout}),[e,o.layout]);return(0,hme.jsx)(LGe,{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:BGe})}var ey=a(T(),1),{useHasDimensionsPanel:VGe,useSettingsForBlockElement:jGe}=Tt(yme.privateApis);function zGe(){let[e]=Ae(""),t=jGe(e),r=VGe(t);return(0,ey.jsxs)(ey.Fragment,{children:[(0,ey.jsx)(Qt,{title:(0,vme.__)("Layout")}),r&&(0,ey.jsx)(gme,{})]})}var bme=zGe;var x5=a(W(),1),_z=a(j(),1);var xz=a(j(),1),Cme=a(W(),1);var wme=a(ee(),1),Sme=a(G(),1),w5=a(U(),1),xme=a(W(),1),_me=a(j(),1);var b5=a(T(),1);function HGe({gap:e=2}){let{user:t}=(0,w5.useContext)(Wo),r=t?.styles,n=(0,Sme.useSelect)(s=>{let l=s(wme.store).__experimentalGetCurrentThemeGlobalStylesVariations();return Array.isArray(l)?l:void 0},[])?.filter(s=>!MC(s,["color"])&&!MC(s,["typography","spacing"])),i=(0,w5.useMemo)(()=>[...[{title:(0,_me.__)("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,b5.jsx)(xme.__experimentalGrid,{columns:2,className:"global-styles-ui-style-variations-container",gap:e,children:i.map((s,l)=>(0,b5.jsx)(dw,{variation:s,children:c=>(0,b5.jsx)(VO,{label:s?.title,withHoverView:!0,isFocused:c,variation:s})},l))})}var S5=HGe;var Cw=a(T(),1);function Tme(){return(0,Cw.jsxs)(Cme.__experimentalVStack,{spacing:10,className:"global-styles-ui-variation-container",children:[(0,Cw.jsx)(S5,{gap:3}),(0,Cw.jsx)(Sw,{title:(0,xz.__)("Color Variations"),gap:3}),(0,Cw.jsx)(fw,{title:(0,xz.__)("Typography"),gap:3})]})}var Lf=a(T(),1);function UGe(){return(0,Lf.jsxs)(Lf.Fragment,{children:[(0,Lf.jsx)(Qt,{title:(0,_z.__)("Browse styles"),description:(0,_z.__)("Choose a variation to change the look of the site.")}),(0,Lf.jsx)(x5.Card,{size:"small",isBorderless:!0,className:"global-styles-ui-screen-style-variations",children:(0,Lf.jsx)(x5.CardBody,{children:(0,Lf.jsx)(Tme,{})})})]})}var Eme=UGe;var JC=a(j(),1),Pme=a(W(),1),kme=a(he(),1);var Dl=a(T(),1),{AdvancedPanel:WGe}=Tt(kme.privateApis);function GGe(){let[e]=ze("",void 0,"user",!1),[t,r]=ze("",void 0,"merged",!1);return(0,Dl.jsxs)(Dl.Fragment,{children:[(0,Dl.jsx)(Qt,{title:(0,JC.__)("Additional CSS"),description:(0,Dl.jsxs)(Dl.Fragment,{children:[(0,JC.__)("You can add custom CSS to further customize the appearance and layout of your site."),(0,Dl.jsx)("br",{}),(0,Dl.jsx)(Pme.ExternalLink,{href:(0,JC.__)("https://developer.wordpress.org/advanced-administration/wordpress/css/"),className:"global-styles-ui-screen-css-help-link",children:(0,JC.__)("Learn more about CSS")})]})}),(0,Dl.jsx)("div",{className:"global-styles-ui-screen-css",children:(0,Dl.jsx)(WGe,{value:e,onChange:r,inheritedValue:t})})]})}var Rme=GGe;var Bf=a(j(),1),Tw=a(W(),1),ry=a(U(),1);var Ame=a(G(),1),Ime=a(ee(),1),$C=a(U(),1);var YGe={per_page:-1,_fields:"id,name,avatar_urls",context:"view",capabilities:["edit_theme_options"]},qGe={per_page:100,page:1},_5=[];function ty({query:e}={}){let{user:t}=(0,$C.useContext)(Wo),r=(0,$C.useMemo)(()=>({...qGe,...e}),[e]),{authors:o,currentUser:n,isDirty:i,revisions:s,isLoadingGlobalStylesRevisions:l,revisionsCount:c}=(0,Ame.useSelect)(u=>{let{__experimentalGetDirtyEntityRecords:d,getCurrentUser:f,getUsers:m,getRevisions:h,__experimentalGetCurrentGlobalStylesId:g,getEntityRecord:v,isResolving:y}=u(Ime.store),b=d()||[],w=f(),S=b.length>0,x=g(),P=(x?v("root","globalStyles",x):void 0)?._links?.["version-history"]?.[0]?.count??0,I=x&&h("root","globalStyles",x,r)||_5,A=m(YGe)||_5,k=x?y("getRevisions",["root","globalStyles",x,r]):!1;return{authors:A,currentUser:w,isDirty:S,revisions:I,isLoadingGlobalStylesRevisions:k,revisionsCount:P}},[r]);return(0,$C.useMemo)(()=>{if(!o.length||l)return{revisions:_5,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 ci=a(j(),1),eT=a(W(),1),rd=a(go(),1),Ome=a(ee(),1),Nme=a(G(),1);var C5=a(yo(),1),jn=a(T(),1),KGe=3600*1e3*24;function ZGe({revision:e,previousRevision:t}){let r=AC(e,t,{maxResults:7});return r.length?(0,jn.jsx)("ul",{"data-testid":"global-styles-revision-changes",className:"global-styles-ui-screen-revisions__changes",children:r.map(o=>(0,jn.jsx)("li",{children:o},o))}):null}function XGe(e,t,r,o){return e==="parent"?(0,ci.__)("Reset the styles to the theme defaults"):e==="unsaved"?(0,ci.sprintf)((0,ci.__)("Unsaved changes by %s"),t):o?(0,ci.sprintf)((0,ci.__)("Changes saved by %1$s on %2$s. This revision matches current editor styles."),t,r):(0,ci.sprintf)((0,ci.__)("Changes saved by %1$s on %2$s"),t,r)}function QGe({userRevisions:e,selectedRevisionId:t,onChange:r,canApplyRevision:o,onApplyRevision:n}){let{currentThemeName:i,currentUser:s}=(0,Nme.useSelect)(u=>{let{getCurrentTheme:d,getCurrentUser:f}=u(Ome.store),m=d();return{currentThemeName:m?.name?.rendered||m?.stylesheet,currentUser:f()}},[]),l=(0,rd.getDate)(null).getTime(),{datetimeAbbreviated:c}=(0,rd.getSettings)().formats;return(0,jn.jsx)(eT.Composite,{orientation:"vertical",className:"global-styles-ui-screen-revisions__revisions-list","aria-label":(0,ci.__)("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,y=v?.name||(0,ci.__)("User"),b=v?.avatar_urls?.["48"],S=t?t===f:d===0,x=!o&&S,_=f==="parent",P=h instanceof Date?h.toISOString():h,I=(0,rd.getDate)(P??null),A=P&&l-I.getTime()>KGe?(0,rd.dateI18n)(c,I):(0,rd.humanTimeDiff)(P??I,void 0),k=XGe(f,y,(0,rd.dateI18n)(c,I),x);return(0,jn.jsxs)(eT.Composite.Item,{className:"global-styles-ui-screen-revisions__revision-item","aria-current":S,role:"option",onKeyDown:D=>{let{keyCode:E}=D;(E===C5.ENTER||E===C5.SPACE)&&r(u)},onClick:D=>{D.preventDefault(),r(u)},"aria-selected":S,"aria-label":k,render:(0,jn.jsx)("div",{}),children:[(0,jn.jsx)("span",{className:"global-styles-ui-screen-revisions__revision-item-wrapper",children:_?(0,jn.jsxs)("span",{className:"global-styles-ui-screen-revisions__description",children:[(0,ci.__)("Default styles"),(0,jn.jsx)("span",{className:"global-styles-ui-screen-revisions__meta",children:i})]}):(0,jn.jsxs)("span",{className:"global-styles-ui-screen-revisions__description",children:[g?(0,jn.jsx)("span",{className:"global-styles-ui-screen-revisions__date",children:(0,ci.__)("(Unsaved)")}):(0,jn.jsx)("time",{className:"global-styles-ui-screen-revisions__date",dateTime:P,children:A}),(0,jn.jsxs)("span",{className:"global-styles-ui-screen-revisions__meta",children:[(0,jn.jsx)("img",{alt:y,src:b}),y]}),S&&(0,jn.jsx)(ZGe,{revision:u,previousRevision:d<e.length?e[d+1]:void 0})]})}),S&&(x?(0,jn.jsx)("p",{className:"global-styles-ui-screen-revisions__applied-text",children:(0,ci.__)("These styles are already applied to your site.")}):(0,jn.jsx)(eT.Button,{size:"compact",variant:"primary",className:"global-styles-ui-screen-revisions__apply-button",onClick:n,"aria-label":(0,ci.__)("Apply the selected revision to your site."),children:_?(0,ci.__)("Reset to defaults"):(0,ci.__)("Apply")}))]},f)})})}var Mme=QGe;var Fl=a(W(),1),zn=a(j(),1);var Nc=a(T(),1);function Dme({currentPage:e,numPages:t,changePage:r,totalItems:o,className:n,disabled:i=!1,buttonVariant:s="tertiary",label:l=(0,zn.__)("Pagination")}){return(0,Nc.jsxs)(Fl.__experimentalHStack,{expanded:!1,as:"nav","aria-label":l,spacing:3,justify:"flex-start",className:Z("global-styles-ui-pagination",n),children:[(0,Nc.jsx)(Fl.__experimentalText,{variant:"muted",className:"global-styles-ui-pagination__total",children:(0,zn.sprintf)((0,zn._n)("%d item","%d items",o),o)}),(0,Nc.jsxs)(Fl.__experimentalHStack,{expanded:!1,spacing:1,children:[(0,Nc.jsx)(Fl.Button,{variant:s,onClick:()=>r(1),accessibleWhenDisabled:!0,disabled:i||e===1,label:(0,zn.__)("First page"),icon:(0,zn.isRTL)()?nl:il,size:"compact"}),(0,Nc.jsx)(Fl.Button,{variant:s,onClick:()=>r(e-1),accessibleWhenDisabled:!0,disabled:i||e===1,label:(0,zn.__)("Previous page"),icon:(0,zn.isRTL)()?hr:pr,size:"compact"})]}),(0,Nc.jsx)(Fl.__experimentalText,{variant:"muted",children:(0,zn.sprintf)((0,zn._x)("%1$d of %2$d","paging"),e,t)}),(0,Nc.jsxs)(Fl.__experimentalHStack,{expanded:!1,spacing:1,children:[(0,Nc.jsx)(Fl.Button,{variant:s,onClick:()=>r(e+1),accessibleWhenDisabled:!0,disabled:i||e===t,label:(0,zn.__)("Next page"),icon:(0,zn.isRTL)()?pr:hr,size:"compact"}),(0,Nc.jsx)(Fl.Button,{variant:s,onClick:()=>r(t),accessibleWhenDisabled:!0,disabled:i||e===t,label:(0,zn.__)("Last page"),icon:(0,zn.isRTL)()?il:nl,size:"compact"})]})]})}var Mc=a(T(),1),Fme=10;function JGe({onClose:e}={}){let{user:t,onChange:r}=(0,ry.useContext)(Wo),{params:o,goTo:n}=(0,Tw.useNavigator)(),{revisionId:i}=o,[s,l]=(0,ry.useState)(1),{revisions:c,isLoading:u,hasUnsavedChanges:d,revisionsCount:f}=ty({query:{per_page:Fme,page:s}}),m=Math.ceil(f/Fme),[h,g]=(0,ry.useState)(!1),v=(0,ry.useMemo)(()=>i&&c.find(A=>String(A.id)===String(i))||t,[i,c,t]),y=Lv(v,t),b=()=>{e&&e()},w=I=>{r(I),g(!1),b()},S=I=>{n(`/revisions/${I.id}`)},x=v?.id??c[0]?.id,_=!!x&&x!=="unsaved"&&!y,P=!!c.length;return(0,Mc.jsxs)(Mc.Fragment,{children:[(0,Mc.jsx)(Qt,{title:f?(0,Bf.sprintf)((0,Bf.__)("Revisions (%d)"),f):(0,Bf.__)("Revisions"),description:(0,Bf.__)(`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:b}),!P&&(0,Mc.jsx)(Tw.Spinner,{className:"global-styles-ui-screen-revisions__loading"}),(0,Mc.jsx)(Mme,{onChange:S,selectedRevisionId:x,userRevisions:c,canApplyRevision:_,onApplyRevision:()=>d?g(!0):w(v)}),m>1&&(0,Mc.jsx)("div",{className:"global-styles-ui-screen-revisions__footer",children:(0,Mc.jsx)(Dme,{className:"global-styles-ui-screen-revisions__pagination",currentPage:s,numPages:m,changePage:l,totalItems:f,disabled:u,label:(0,Bf.__)("Global Styles pagination")})}),h&&(0,Mc.jsx)(Tw.__experimentalConfirmDialog,{isOpen:h,confirmButtonText:(0,Bf.__)("Apply"),onConfirm:()=>w(v),onCancel:()=>g(!1),size:"medium",children:(0,Bf.__)("Are you sure you want to apply this revision? Any unsaved changes will be lost.")})]})}var Lme=JGe;var hn=a(j(),1),Ro=a(W(),1);var Hme=a(U(),1);var Bme=a(W(),1),Vme=a(j(),1),jme=a(T(),1);function $Ge({text:e,confirmButtonText:t,isOpen:r,toggleOpen:o,onConfirm:n}){let i=async()=>{o(),n()},s=()=>{o()};return(0,jme.jsx)(Bme.__experimentalConfirmDialog,{isOpen:r,cancelButtonText:(0,Vme.__)("Cancel"),confirmButtonText:t,onCancel:s,onConfirm:i,size:"medium",children:e})}var zme=$Ge;var Jt=a(T(),1),{Menu:tT}=Tt(Ro.privateApis);function Cz({label:e,origin:t,sizes:r,handleAddFontSize:o,handleResetFontSizes:n}){let[i,s]=(0,Hme.useState)(!1),l=()=>s(!i),c=t==="custom"?(0,hn.__)("Are you sure you want to remove all custom font size presets?"):(0,hn.__)("Are you sure you want to reset all font size presets to their default values?");return(0,Jt.jsxs)(Jt.Fragment,{children:[n&&i&&(0,Jt.jsx)(zme,{text:c,confirmButtonText:t==="custom"?(0,hn.__)("Remove"):(0,hn.__)("Reset"),isOpen:i,toggleOpen:l,onConfirm:n}),(0,Jt.jsxs)(Ro.__experimentalVStack,{spacing:4,children:[(0,Jt.jsxs)(Ro.__experimentalHStack,{children:[(0,Jt.jsx)(ko,{level:3,children:e}),(0,Jt.jsxs)(Ro.FlexItem,{className:"global-styles-ui__typography-panel__options-container",children:[t==="custom"&&(0,Jt.jsx)(Ro.Button,{label:(0,hn.__)("Add font size"),icon:Md,size:"small",onClick:o}),!!n&&(0,Jt.jsxs)(tT,{children:[(0,Jt.jsx)(tT.TriggerButton,{render:(0,Jt.jsx)(Ro.Button,{size:"small",icon:to,label:(0,hn.__)("Font size presets options")})}),(0,Jt.jsx)(tT.Popover,{children:(0,Jt.jsx)(tT.Item,{onClick:l,children:(0,Jt.jsx)(tT.ItemLabel,{children:t==="custom"?(0,hn.__)("Remove font size presets"):(0,hn.__)("Reset font size presets")})})})]})]})]}),!!r.length&&(0,Jt.jsx)(Ro.__experimentalItemGroup,{isBordered:!0,isSeparated:!0,children:r.map(u=>(0,Jt.jsx)(lo,{path:`/typography/font-sizes/${t}/${u.slug}`,children:(0,Jt.jsxs)(Ro.__experimentalHStack,{children:[(0,Jt.jsx)(Ro.FlexItem,{className:"global-styles-ui-font-size__item",children:u.name}),(0,Jt.jsx)(Ro.FlexItem,{display:"flex",children:(0,Jt.jsx)(cn,{icon:(0,hn.isRTL)()?pr:hr})})]})},u.slug))})]})]})}function eYe(){let[e,t]=Ae("typography.fontSizes.theme"),[r]=Ae("typography.fontSizes.theme","base"),[o,n]=Ae("typography.fontSizes.default"),[i]=Ae("typography.fontSizes.default","base"),[s=[],l]=Ae("typography.fontSizes.custom"),[c]=Ae("typography.defaultFontSizes"),u=()=>{let f=FO(s,"custom-"),m={name:(0,hn.sprintf)((0,hn.__)("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,Jt.jsxs)(Ro.__experimentalVStack,{spacing:2,children:[(0,Jt.jsx)(Qt,{title:(0,hn.__)("Font size presets"),description:(0,hn.__)("Create and edit the presets used for font sizes across the site.")}),(0,Jt.jsx)(Ro.__experimentalView,{children:(0,Jt.jsx)(Ro.__experimentalSpacer,{paddingX:4,children:(0,Jt.jsxs)(Ro.__experimentalVStack,{spacing:8,children:[!!e?.length&&(0,Jt.jsx)(Cz,{label:(0,hn.__)("Theme"),origin:"theme",sizes:e,handleAddFontSize:u,handleResetFontSizes:d(e,r)?void 0:()=>t(r)}),c&&!!o?.length&&(0,Jt.jsx)(Cz,{label:(0,hn.__)("Default"),origin:"default",sizes:o,handleAddFontSize:u,handleResetFontSizes:d(o,i)?void 0:()=>n(i)}),(0,Jt.jsx)(Cz,{label:(0,hn.__)("Custom"),origin:"custom",sizes:s,handleAddFontSize:u,handleResetFontSizes:s.length>0?()=>l([]):void 0})]})})})]})}var Ume=eYe;var la=a(j(),1),Ao=a(W(),1);var rT=a(U(),1);var Wme=a(he(),1),Gme=a(j(),1);var Yme=a(T(),1);function tYe({fontSize:e}){let[t]=ze("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,Wme.getComputedFluidTypographyValue)(r);return(0,Yme.jsx)("div",{className:"global-styles-ui-typography-preview",style:{fontSize:o,fontFamily:t?.fontFamily??"serif"},children:(0,Gme.__)("Aa")})}var qme=tYe;var Kme=a(W(),1),Ew=a(j(),1),Zme=a(T(),1);function rYe({fontSize:e,isOpen:t,toggleOpen:r,handleRemoveFontSize:o}){let n=async()=>{r(),o(e)},i=()=>{r()};return(0,Zme.jsx)(Kme.__experimentalConfirmDialog,{isOpen:t,cancelButtonText:(0,Ew.__)("Cancel"),confirmButtonText:(0,Ew.__)("Delete"),onCancel:i,onConfirm:n,size:"medium",children:e&&(0,Ew.sprintf)((0,Ew.__)('Are you sure you want to delete "%s" font size preset?'),e.name)})}var Xme=rYe;var Dc=a(W(),1),Pw=a(j(),1),Qme=a(U(),1),Vf=a(T(),1);function oYe({fontSize:e,toggleOpen:t,handleRename:r}){let[o,n]=(0,Qme.useState)(e.name),i=()=>{o&&o.trim()&&r(o),t()};return(0,Vf.jsx)(Dc.Modal,{onRequestClose:t,focusOnMount:"firstContentElement",title:(0,Pw.__)("Rename"),size:"small",children:(0,Vf.jsx)("form",{onSubmit:s=>{s.preventDefault(),i(),t()},children:(0,Vf.jsxs)(Dc.__experimentalVStack,{spacing:"3",children:[(0,Vf.jsx)(Dc.__experimentalInputControl,{__next40pxDefaultSize:!0,autoComplete:"off",value:o,onChange:n,label:(0,Pw.__)("Name"),placeholder:(0,Pw.__)("Font size preset name")}),(0,Vf.jsxs)(Dc.__experimentalHStack,{justify:"right",children:[(0,Vf.jsx)(Dc.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:t,children:(0,Pw.__)("Cancel")}),(0,Vf.jsx)(Dc.Button,{__next40pxDefaultSize:!0,variant:"primary",type:"submit",children:(0,Pw.__)("Save")})]})]})})})}var Jme=oYe;var gn=a(W(),1),jf=a(T(),1),nYe=["px","em","rem","vw","vh"];function T5(e){let{baseControlProps:t}=(0,gn.useBaseControlProps)(e),{value:r,onChange:o,fallbackValue:n,disabled:i,label:s}=e,l=(0,gn.__experimentalUseCustomUnits)({availableUnits:nYe}),[c,u="px"]=(0,gn.__experimentalParseQuantityAndUnitFromRawValue)(r,l),d=!!u&&["em","rem","vw","vh"].includes(u);return(0,jf.jsx)(gn.BaseControl,{...t,children:(0,jf.jsxs)(gn.Flex,{children:[(0,jf.jsx)(gn.FlexItem,{isBlock:!0,children:(0,jf.jsx)(gn.__experimentalUnitControl,{__next40pxDefaultSize:!0,label:s,hideLabelFromVision:!0,value:r,onChange:h=>{o?.(h)},units:l,min:0,disabled:i})}),(0,jf.jsx)(gn.FlexItem,{isBlock:!0,children:(0,jf.jsx)(gn.__experimentalSpacer,{marginX:2,marginBottom:0,children:(0,jf.jsx)(gn.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 Wt=a(T(),1),{Menu:oy}=Tt(Ao.privateApis);function iYe(){let[e,t]=(0,rT.useState)(!1),[r,o]=(0,rT.useState)(!1),{params:{origin:n,slug:i},goBack:s}=(0,Ao.useNavigator)(),[l,c]=Ae("typography.fontSizes"),[u]=Ae("typography.fluid"),d=l?.[n]??[],f=d.find(A=>A.slug===i);if((0,rT.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=>{x("name",A)},v=A=>{x("size",A)},y=A=>{x("fluid",A)},b=A=>{A?x("fluid",{min:f.size,max:f.size}):x("fluid",!0)},w=A=>{let k=typeof f.fluid=="object"?f.fluid:{};x("fluid",{...k,min:A})},S=A=>{let k=typeof f.fluid=="object"?f.fluid:{};x("fluid",{...k,max:A})},x=(A,k)=>{let D=d.map(E=>E.slug===i?{...E,[A]:k}:E);c({...l,[n]:D})},_=()=>{let A=d.filter(k=>k.slug!==i);c({...l,[n]:A})},P=()=>{t(!e)},I=()=>{o(!r)};return(0,Wt.jsxs)(Wt.Fragment,{children:[(0,Wt.jsx)(Xme,{fontSize:f,isOpen:e,toggleOpen:P,handleRemoveFontSize:_}),r&&(0,Wt.jsx)(Jme,{fontSize:f,toggleOpen:I,handleRename:g}),(0,Wt.jsxs)(Ao.__experimentalVStack,{spacing:4,children:[(0,Wt.jsxs)(Ao.__experimentalHStack,{justify:"space-between",alignment:"flex-start",children:[(0,Wt.jsx)(Qt,{title:f.name,description:(0,la.sprintf)((0,la.__)("Manage the font size %s."),f.name)}),n==="custom"&&(0,Wt.jsx)(Ao.FlexItem,{children:(0,Wt.jsx)(Ao.__experimentalSpacer,{marginTop:3,marginBottom:0,paddingX:4,children:(0,Wt.jsxs)(oy,{children:[(0,Wt.jsx)(oy.TriggerButton,{render:(0,Wt.jsx)(Ao.Button,{size:"small",icon:to,label:(0,la.__)("Font size options")})}),(0,Wt.jsxs)(oy.Popover,{children:[(0,Wt.jsx)(oy.Item,{onClick:I,children:(0,Wt.jsx)(oy.ItemLabel,{children:(0,la.__)("Rename")})}),(0,Wt.jsx)(oy.Item,{onClick:P,children:(0,Wt.jsx)(oy.ItemLabel,{children:(0,la.__)("Delete")})})]})]})})})]}),(0,Wt.jsx)(Ao.__experimentalView,{children:(0,Wt.jsx)(Ao.__experimentalSpacer,{paddingX:4,marginBottom:0,paddingBottom:6,children:(0,Wt.jsxs)(Ao.__experimentalVStack,{spacing:4,children:[(0,Wt.jsx)(Ao.FlexItem,{children:(0,Wt.jsx)(qme,{fontSize:f})}),(0,Wt.jsx)(T5,{label:(0,la.__)("Size"),value:!h&&f.size?String(f.size):"",onChange:v,disabled:h}),(0,Wt.jsx)(Ao.ToggleControl,{label:(0,la.__)("Fluid typography"),help:(0,la.__)("Scale the font size dynamically to fit the screen or viewport."),checked:m,onChange:y}),m&&(0,Wt.jsx)(Ao.ToggleControl,{label:(0,la.__)("Custom fluid values"),help:(0,la.__)("Set custom min and max values for the fluid font size."),checked:h,onChange:b}),h&&(0,Wt.jsxs)(Wt.Fragment,{children:[(0,Wt.jsx)(T5,{label:(0,la.__)("Minimum"),value:typeof f?.fluid=="object"?f.fluid?.min:void 0,onChange:w}),(0,Wt.jsx)(T5,{label:(0,la.__)("Maximum"),value:typeof f?.fluid=="object"?f.fluid?.max:void 0,onChange:S})]})]})})})]})]})}var $me=iYe;var We=a(T(),1);function sYe({parentMenu:e,blockStyles:t,blockName:r}){return(0,We.jsx)(We.Fragment,{children:t.map((o,n)=>(0,We.jsx)(kw.Navigator.Screen,{path:e+"/variations/"+o.name,children:(0,We.jsx)(az,{name:r,variation:o.name})},n))})}function aYe({name:e,parentMenu:t=""}){let r=(0,epe.useSelect)(o=>{if(!e)return[];let{getBlockStyles:n}=o(E5.store);return n(e)},[e]);return r?.length?(0,We.jsx)(sYe,{parentMenu:t,blockStyles:r,blockName:e||""}):null}function Ez({value:e,baseValue:t,onChange:r,path:o,onPathChange:n,fontLibraryEnabled:i=!1,serverCSS:s,serverSettings:l}){let c=(0,E5.getBlockTypes)(),u=(0,uh.useMemo)(()=>Bi(t,e),[t,e]),[d,f]=Bv(u,[],{styleOptions:{variationStyles:!0}}),m=(0,uh.useMemo)(()=>[...s??[],...d??[]],[s,d]),h=(0,uh.useMemo)(()=>({...l,__experimentalFeatures:f,styles:m}),[f,l,m]);return(0,We.jsx)(OC,{value:e,baseValue:t,onChange:r,fontLibraryEnabled:i,children:(0,We.jsx)(tpe.BlockEditorProvider,{settings:h,children:(0,We.jsxs)(kw.Navigator,{className:"global-styles-ui-sidebar__navigator-provider",initialPath:o||"/",children:[(o||n)&&(0,We.jsx)(lYe,{path:o,onPathChange:n}),(0,We.jsx)(nn,{path:"/",children:(0,We.jsx)(Gue,{})}),(0,We.jsx)(nn,{path:"/colors",children:(0,We.jsx)(Vfe,{})}),(0,We.jsx)(nn,{path:"/typography",children:(0,We.jsx)(Cfe,{})}),(0,We.jsx)(nn,{path:"/typography/font-sizes",children:(0,We.jsx)(Ume,{})}),(0,We.jsx)(nn,{path:"/typography/font-sizes/:origin/:slug",children:(0,We.jsx)($me,{})}),(0,We.jsx)(nn,{path:"/layout",children:(0,We.jsx)(bme,{})}),(0,We.jsx)(nn,{path:"/colors/palette",children:(0,We.jsx)(Zfe,{})}),(0,We.jsx)(nn,{path:"/variations",children:(0,We.jsx)(Eme,{})}),(0,We.jsx)(nn,{path:"/css",children:(0,We.jsx)(Rme,{})}),(0,We.jsx)(nn,{path:"/revisions/:revisionId?",children:(0,We.jsx)(Lme,{})}),(0,We.jsx)(nn,{path:"/shadows",children:(0,We.jsx)(fme,{})}),(0,We.jsx)(nn,{path:"/shadows/edit/:category/:slug",children:(0,We.jsx)(mme,{})}),(0,We.jsx)(nn,{path:"/background",children:(0,We.jsx)(tme,{})}),(0,We.jsx)(nn,{path:"/typography/text",children:(0,We.jsx)(bw,{element:"text"})}),(0,We.jsx)(nn,{path:"/typography/link",children:(0,We.jsx)(bw,{element:"link"})}),(0,We.jsx)(nn,{path:"/typography/heading",children:(0,We.jsx)(bw,{element:"heading"})}),(0,We.jsx)(nn,{path:"/typography/caption",children:(0,We.jsx)(bw,{element:"caption"})}),(0,We.jsx)(nn,{path:"/typography/button",children:(0,We.jsx)(bw,{element:"button"})}),(0,We.jsx)(nn,{path:"/blocks",children:(0,We.jsx)($ue,{})}),c.map(g=>(0,We.jsxs)(uh.Fragment,{children:[(0,We.jsx)(nn,{path:"/blocks/"+encodeURIComponent(g.name),children:(0,We.jsx)(az,{name:g.name})}),(0,We.jsx)(aYe,{name:g.name,parentMenu:"/blocks/"+encodeURIComponent(g.name)})]},g.name))]})})})}function nn({path:e,children:t}){return(0,We.jsx)(kw.Navigator.Screen,{className:"global-styles-ui-sidebar__navigator-screen",path:e,children:t})}function lYe({path:e,onPathChange:t}){let r=(0,kw.useNavigator)(),{path:o}=r.location,n=(0,Tz.usePrevious)(e),i=(0,Tz.usePrevious)(o);return(0,uh.useEffect)(()=>{e&&e!==o&&(e!==n?r.goTo(e):o!==i&&t&&t(o??"/"))},[t,e,i,n,o,r]),null}var Pz=a(T(),1);function Rw(e){return function({value:r,baseValue:o,onChange:n,...i}){return(0,Pz.jsx)(OC,{value:r,baseValue:o,onChange:n,children:(0,Pz.jsx)(e,{...i})})}}var cYe=Rw(S5);var uYe=Rw(Sw);var dYe=Rw(fw);var fYe=a(T(),1);var upe=a(Im(),1);var rpe=a(G(),1),ope=a(U(),1),npe=a(he(),1),ipe=a(_e(),1);function spe({path:e,onPathChange:t}){let{selectedBlockName:r,selectedBlockClientId:o}=(0,rpe.useSelect)(s=>{let{getSelectedBlockClientId:l,getBlockName:c}=s(npe.store),u=l();return{selectedBlockName:c(u),selectedBlockClientId:u}},[]),n=!0,i=(0,ipe.usePrevious)(o);return(0,ope.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 ny=a(U(),1);var Aw=a(ee(),1),Iw=a(G(),1),ape=a(he(),1);var{cleanEmptyObject:kz}=Y(ape.privateApis);function mYe(){let{globalStylesId:e,isReady:t,settings:r,styles:o,_links:n}=(0,Iw.useSelect)(u=>{let{getEntityRecord:d,getEditedEntityRecord:f,hasFinishedResolution:m,canUser:h}=u(Aw.store),g=u(Aw.store).__experimentalGetCurrentGlobalStylesId(),v,y=g?h("update",{kind:"root",name:"globalStyles",id:g}):null;g&&typeof y=="boolean"&&(y?v=f("root","globalStyles",g):v=d("root","globalStyles",g,{context:"view"}));let b=!1;return m("__experimentalGetCurrentGlobalStylesId")&&(g?b=y?m("getEditedEntityRecord",["root","globalStyles",g]):m("getEntityRecord",["root","globalStyles",g,{context:"view"}]):b=!0),{globalStylesId:g,isReady:b,settings:v?.settings,styles:v?.styles,_links:v?._links}},[]),{getEditedEntityRecord:i}=(0,Iw.useSelect)(Aw.store),{editEntityRecord:s}=(0,Iw.useDispatch)(Aw.store),l=(0,ny.useMemo)(()=>({settings:r??{},styles:o??{},_links:n??{}}),[r,o,n]),c=(0,ny.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:kz(h.styles)||{},settings:kz(h.settings)||{},_links:kz(h._links)||{}},d)},[e,s,i]);return[t,l,c]}function pYe(){let e=(0,Iw.useSelect)(t=>t(Aw.store).__experimentalGetCurrentThemeBaseGlobalStyles(),[]);return[!!e,e]}function Zr(){let[e,t,r]=mYe(),[o,n]=pYe();return{merged:(0,ny.useMemo)(()=>!e||!o?{}:Bi(n||{},t),[e,o,n,t]),base:n||{},user:t,setUser:r,isReady:e&&o}}function dh(e,t){let{merged:r}=Zr();return(0,ny.useMemo)(()=>iw(r,e,t),[r,e,t])}function Rz(e,t){let{merged:r}=Zr();return(0,ny.useMemo)(()=>Fv(r,e,t),[r,e,t])}var iy=a(T(),1);function hYe(e){let t=e?.styles,r=e?.__unstableResolvedAssets,o=e?.colors,n=e?.gradients,i=e?.__experimentalDiscussionSettings,s=e?.fontLibraryEnabled??!0,l=(0,cpe.useSelect)(d=>{let{canUser:f}=d(lpe.store);return f("create",{kind:"postType",name:"attachment"})?upe.uploadMedia:void 0},[]),c=(0,Az.useMemo)(()=>t?t.filter(d=>!d.isGlobalStyles):[],[t]),u=(0,Az.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 P5({path:e,onPathChange:t,settings:r}){let{user:o,base:n,setUser:i,isReady:s}=Zr(),{serverCSS:l,serverSettings:c,fontLibraryEnabled:u}=hYe(r);return s?(0,iy.jsxs)(iy.Fragment,{children:[(0,iy.jsx)(Ez,{value:o,baseValue:n||{},onChange:i,path:e,onPathChange:t,fontLibraryEnabled:u,serverCSS:l,serverSettings:c}),(0,iy.jsx)(spe,{path:e,onPathChange:t})]}):null}var{store:gYe}=Y(ow),dpe={};function vYe(e){let{RECEIVE_INTERMEDIATE_RESULTS:t}=Y(ca.privateApis),{getEntityRecords:r}=e(ca.store);return r("postType","wp_block",{per_page:-1,[t]:!0})}function yYe(e){return e(ca.store).getUserPatternCategories()}var bYe=["__experimentalBlockBindingsSupportedAttributes","__experimentalBlockDirectory","__experimentalDiscussionSettings","__experimentalFeatures","__experimentalGlobalStylesBaseStyles","allImageSizes","alignWide","blockInspectorTabs","maxUploadFileSize","allowedMimeTypes","bodyPlaceholder","canEditCSS","canLockBlocks","canUpdateBlockBindings","capabilities","clearBlockSelection","codeEditingEnabled","colors","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:wYe,globalStylesLinksDataKey:SYe,selectBlockPatternsKey:xYe,reusableBlocksSelectKey:_Ye,userPatternCategoriesSelectKey:CYe,sectionRootClientIdKey:TYe,mediaEditKey:EYe,getMediaSelectKey:PYe,isIsolatedEditorKey:kYe,deviceTypeKey:RYe,onViewportStateChangeKey:AYe,isNavigationOverlayContextKey:IYe,isNavigationPostEditorKey:OYe,mediaUploadOnSuccessKey:NYe,openMediaEditorModalKey:MYe}=Y(k5.privateApis);function DYe(e,t,r,o){let n=(0,ppe.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:y,pageOnFront:b,pageForPosts:w,restBlockPatternCategories:S,sectionRootClientId:x,deviceType:_,isNavigationOverlayContext:P,isRevisionsMode:I}=(0,fh.useSelect)(te=>{let{canUser:se,getRawEntityRecord:$,getEntityRecord:X,getBlockPatternCategories:oe}=te(ca.store),{get:pe}=te(mpe.store),{getBlockTypes:be}=te(hpe.store),{getDeviceType:Ce,isRevisionsMode:Ge}=Y(te(R)),{getBlocksByName:He,getBlockAttributes:ge}=te(k5.store),ie=se("read",{kind:"root",name:"site"})?X("root","site"):void 0,ce=X("root","__unstableBase");function ae(){return o==="template-locked"?He("core/post-content")?.[0]??"":He("core/group").find(ye=>ge(ye)?.tagName==="main")??""}return{allImageSizes:ce?.image_sizes,bigImageSizeThreshold:ce?.image_size_threshold,allowRightClickOverrides:pe("core","allowRightClickOverrides"),blockTypes:be(),canUseUnfilteredHTML:$("postType",t,r)?._links?.hasOwnProperty("wp:action-unfiltered-html"),focusMode:pe("core","focusMode"),hasFixedToolbar:pe("core","fixedToolbar")||!n,hiddenBlockTypes:pe("core","hiddenBlockTypes"),isDistractionFree:pe("core","distractionFree"),keepCaretInsideBlock:pe("core","keepCaretInsideBlock"),hasUploadPermissions:se("create",{kind:"postType",name:"attachment"})??!0,userCanCreatePages:se("create",{kind:"postType",name:"page"}),pageOnFront:ie?.page_on_front,pageForPosts:ie?.page_for_posts,restBlockPatternCategories:oe(),sectionRootClientId:ae(),deviceType:Ce(),isNavigationOverlayContext:t==="wp_template_part"&&r?X("postType","wp_template_part",r)?.area==="navigation-overlay":!1,isRevisionsMode:Ge()}},[t,r,n,o]),{merged:A}=Zr(),k=A.styles??dpe,D=A._links??dpe,E=e.__experimentalAdditionalBlockPatterns??e.__experimentalBlockPatterns,C=e.__experimentalAdditionalBlockPatternCategories??e.__experimentalBlockPatternCategories,M=(0,sy.useMemo)(()=>[...E||[]].filter(({postTypes:te})=>!te||Array.isArray(te)&&te.includes(t)),[E,t]),B=(0,sy.useMemo)(()=>[...C||[],...S||[]].filter((te,se,$)=>se===$.findIndex(X=>te.name===X.name)),[C,S]),{undo:N,setIsInserterOpened:z}=(0,fh.useDispatch)(R),{updateDeviceTypeForViewportState:O}=Y((0,fh.useDispatch)(R)),{editMediaEntity:F}=Y((0,fh.useDispatch)(ca.store)),{saveEntityRecord:L}=(0,fh.useDispatch)(ca.store),{openMediaEditorModal:H}=(0,fh.useDispatch)(gYe),q=(0,sy.useCallback)(te=>y?L("postType","page",te):Promise.reject({message:(0,fpe.__)("You do not have permission to create Pages.")}),[L,y]),Q=(0,sy.useMemo)(()=>g&&g.length>0?(e.allowedBlockTypes===!0?c.map(({name:se})=>se):e.allowedBlockTypes||[]).filter(se=>!g.includes(se)):e.allowedBlockTypes,[e.allowedBlockTypes,g,c]),J=e.focusMode===!1;return(0,sy.useMemo)(()=>{let te={...Object.fromEntries(Object.entries(e).filter(([se])=>bYe.includes(se))),[wYe]:k,[SYe]:D,allImageSizes:i,bigImageSizeThreshold:s,allowedBlockTypes:Q,allowRightClickOverrides:l,focusMode:u&&!J,hasFixedToolbar:d,isDistractionFree:f,keepCaretInsideBlock:m,[PYe]:(se,$)=>se(ca.store).getEntityRecord("postType","attachment",$),[EYe]:h?F:void 0,[MYe]:({id:se,onUpdate:$,onClose:X})=>H({id:se,onUpdate:$,onClose:X}),mediaUpload:h?zk:void 0,[NYe]:h?jce:void 0,mediaSideload:h?Hce:void 0,mediaFinalize:h?Gce:void 0,mediaDelete:h?qce:void 0,__experimentalBlockPatterns:M,[xYe]:se=>{let{hasFinishedResolution:$,getBlockPatternsForPostType:X}=Y(se(ca.store)),oe=X(t);return $("getBlockPatterns")?oe:void 0},[_Ye]:vYe,[CYe]:yYe,__experimentalBlockPatternCategories:B,__experimentalFetchLinkSuggestions:(se,$)=>(0,ca.__experimentalFetchLinkSuggestions)(se,$,e),inserterMediaCategories:Lce,__experimentalFetchRichUrlData:ca.__experimentalFetchUrlData,__experimentalCanUserUseUnfilteredHTML:v,__experimentalUndo:N,outlineMode:!f&&t==="wp_template",__experimentalCreatePageEntity:q,__experimentalUserCanCreatePages:y,pageOnFront:b,pageForPosts:w,__experimentalPreferPatternsOnRoot:t==="wp_template",templateLock:t==="wp_navigation"?"insert":e.templateLock,template:t==="wp_navigation"?[["core/navigation",{},[]]]:e.template,__experimentalSetIsInserterOpened:z,[TYe]:x,editorTool:o==="post-only"&&t!=="wp_template"?"edit":void 0,[kYe]:["wp_template_part","wp_block","wp_navigation"].includes(t),[OYe]:t==="wp_navigation",disableContentOnlyForTemplateParts:o==="template-locked",..._?{[RYe]:_}:{},[AYe]:O,[IYe]:P};return I&&(te.isPreviewMode=!0),te},[I,Q,l,u,J,d,f,m,e,h,M,B,v,N,q,y,b,w,t,z,x,k,D,o,F,H,O,_,i,s,P])}var gpe=DYe;var oT=a(G(),1),Ow=a(he(),1),A5=a(U(),1);var vpe=a(U(),1),ype=a(xn(),1),FYe=["core/post-title","core/post-featured-image","core/post-content"];function R5(){return(0,vpe.useMemo)(()=>[...(0,ype.applyFilters)("editor.postContentBlockTypes",FYe)],[])}function bpe(){let e=R5(),{contentOnlyIds:t,templateParts:r}=(0,oT.useSelect)(i=>{let{getPostBlocksByName:s}=Y(i(R)),{getBlocksByName:l}=i(Ow.store);return{contentOnlyIds:s(e),templateParts:l("core/template-part")}},[e]),o=(0,oT.useSelect)(i=>{let{getBlockOrder:s}=i(Ow.store);return r.flatMap(l=>s(l))},[r]),n=(0,oT.useRegistry)();return(0,A5.useEffect)(()=>{let{setBlockEditingMode:i,unsetBlockEditingMode:s}=n.dispatch(Ow.store);return i("","disabled"),()=>{s("")}},[n]),(0,A5.useEffect)(()=>{let{setBlockEditingMode:i,unsetBlockEditingMode:s}=n.dispatch(Ow.store);return n.batch(()=>{for(let l of r)i(l,"contentOnly")}),()=>{n.batch(()=>{for(let l of r)s(l)})}},[r,n]),(0,A5.useEffect)(()=>{let{setBlockEditingMode:i,unsetBlockEditingMode:s}=n.dispatch(Ow.store),l=new Set(t);return n.batch(()=>{for(let c of t)i(c,"contentOnly");for(let c of o)l.has(c)||i(c,"disabled")}),()=>{n.batch(()=>{for(let c of t)s(c);for(let c of o)l.has(c)||s(c)})}},[t,o,n]),null}var wpe=a(U(),1),I5=a(G(),1),Iz=a(he(),1);function Spe(){let e=(0,I5.useSelect)(o=>o(Iz.store).getBlockOrder()?.[0],[]),{setBlockEditingMode:t,unsetBlockEditingMode:r}=(0,I5.useDispatch)(Iz.store);(0,wpe.useEffect)(()=>{if(e)return t(e,"contentOnly"),()=>{r(e)}},[e,r,t])}var _pe=a(U(),1),Nw=a(xn(),1),xpe=["wp_block","wp_template","wp_template_part"];function Cpe(e,t){(0,_pe.useEffect)(()=>((0,Nw.addFilter)("blockEditor.__unstableCanInsertBlockType","removeTemplatePartsFromInserter",(r,o)=>!xpe.includes(e)&&o.name==="core/template-part"&&t==="post-only"?!1:r),(0,Nw.addFilter)("blockEditor.__unstableCanInsertBlockType","removePostContentFromInserter",(r,o,n,{getBlockParentsByBlockName:i})=>!xpe.includes(e)&&o.name==="core/post-content"?i(n,"core/query").length>0:r),()=>{(0,Nw.removeFilter)("blockEditor.__unstableCanInsertBlockType","removeTemplatePartsFromInserter"),(0,Nw.removeFilter)("blockEditor.__unstableCanInsertBlockType","removePostContentFromInserter")}),[e,t])}var Vpe=a(G(),1),N5=a(U(),1),M5=a(bt(),1);var Npe=a(Mz(),1),Bz=a(Fz(),1),Lz=a(Ape(),1),O5=a(bt(),1),vn=a(aT(),1),Wi=a(j(),1);var{parseRawBlock:Mpe}=Y(O5.privateApis);function Ope(e){return e==null?"":typeof e=="object"?JSON.stringify(e,null,2):String(e)}function KYe(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 ZYe(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],y=JSON.stringify(d.block.attrs)===JSON.stringify(v.block.attrs);(!((d.block.innerHTML||"")===(v.block.innerHTML||""))||!y)&&(g=v)}else{let v=0;for(let y of h){let b=KYe(d.block.innerHTML||"",y.block.innerHTML||""),w=JSON.stringify(d.block.attrs)===JSON.stringify(y.block.attrs);b>v&&b>s&&(b<1||!w)&&(v=b,g=y)}}if(g){u=g.index;let v={...g.block,__revisionDiffStatus:{status:"modified"},__previousRawBlock:d.block},y=Math.min(d.index,g.index),b=Math.max(d.index,g.index),w=!1;for(let S=y+1;S<b;S++)if(e[S].__revisionDiffStatus?.status==="added"&&!n.has(S)){w=!0;break}w?(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 Dpe(e,t){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=(0,Npe.diffArrays)(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=Dpe(f.innerBlocks||[],m.innerBlocks||[]);s.push({...f,innerBlocks:h})}return ZYe(s)}function XYe(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 QYe(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,Wi.sprintf)((0,Wi._n)("%d format added","%d formats added",s),s)};if(l>0&&s===0&&c===0)return{type:"removed",description:(0,Wi.sprintf)((0,Wi._n)("%d format removed","%d formats removed",l),l)};let u=[];return s>0&&u.push((0,Wi.sprintf)((0,Wi._n)("%d format added","%d formats added",s),s)),l>0&&u.push((0,Wi.sprintf)((0,Wi._n)("%d format removed","%d formats removed",l),l)),c>0&&u.push((0,Wi.sprintf)((0,Wi._n)("%d format changed","%d formats changed",c),c)),{type:"changed",description:u.join(", ")||(0,Wi.__)("Formatting changed")}}function JYe(e,t){let r=e.toPlainText(),o=t.toPlainText(),n=(0,Bz.diffWords)(o,r),i=(0,vn.create)({text:""}),s=0,l=0;for(let c of n)if(c.removed){let u=(0,vn.slice)(t,l,l+c.value.length),d=(0,vn.applyFormat)(u,{type:"revision/diff-removed",attributes:{title:(0,Wi.__)("Removed")}},0,c.value.length);i=(0,vn.concat)(i,d),l+=c.value.length}else if(c.added){let u=(0,vn.slice)(e,s,s+c.value.length),d=(0,vn.applyFormat)(u,{type:"revision/diff-added",attributes:{title:(0,Wi.__)("Added")}},0,c.value.length);i=(0,vn.concat)(i,d),s+=c.value.length}else{let u=e.formats||[],d=t.formats||[],f=c.value.length,m=v=>XYe(u,d,s+v,l+v),h=0,g=m(0);for(let v=1;v<=f;v++){let y=v<f&&m(v);if(v===f||y!==g){let b=(0,vn.slice)(e,s+h,s+v);if(g){let{type:w,description:S}=QYe(u,d,s+h,l+h),x={added:"revision/diff-format-added",removed:"revision/diff-format-removed",changed:"revision/diff-format-changed"}[w],_=(0,vn.applyFormat)(b,{type:x,attributes:{title:S}},0,v-h);i=(0,vn.concat)(i,_)}else i=(0,vn.concat)(i,b);h=v,g=y}}s+=c.value.length,l+=c.value.length}return new vn.RichTextData(i)}function $Ye(e,t,r){let o=(0,O5.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 vn.RichTextData&&c instanceof vn.RichTextData&&(e.attributes[i]=JYe(l,c))}else{let l=Ope(e.attributes[i]),c=Ope(t.attributes[i]);l!==c&&(n[i]=(0,Bz.diffWords)(c,l))}Object.keys(n).length>0&&(r.changedAttributes=n)}function Fpe(e,t){if(t.__revisionDiffStatus){if(t.__revisionDiffStatus.status==="modified"&&t.__previousRawBlock){let r=Mpe(t.__previousRawBlock);r&&$Ye(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&&Fpe(o,n)}}function Lpe(e,t){let r=(0,Lz.parse)(e||""),o=(0,Lz.parse)(t||"");return Dpe(r,o).map(i=>{let s=Mpe(i);return s&&Fpe(s,i),s}).filter(Boolean)}var Bpe=a(Mz(),1);function Vz(e,t){if(!t?.length||!e?.length)return e;let r=e.map(c=>c.name),o=t.map(c=>c.name),n=(0,Bpe.diffArrays)(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:Vz(d.innerBlocks,f.innerBlocks)})}return l}function jpe(){let{isInRevisionsMode:e,showDiff:t,revision:r,previousRevision:o,postType:n}=(0,Vpe.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,N5.useRef)([]);return(0,N5.useMemo)(()=>{if(!e)return i.current=[],null;if(!r)return[];let l=r?.content?.raw??"",c;if(t){let d=o?.content?.raw||"";c=Lpe(l,d)}else c=(0,M5.parse)(l);n==="wp_navigation"&&(c=[(0,M5.createBlock)("core/navigation",{templateLock:!1},c)]);let u=Vz(c,i.current);return i.current=u,u},[e,r,r?.content?.raw,o?.content?.raw,n,t])}var ua=a(G(),1),Et=a(j(),1);var uT=a(jz(),1),Uz=a(Rt(),1),Xpe=a(xt(),1),Qpe=a(he(),1),Dw=a(ee(),1);var D5=a(Ot(),1);var lT=a(G(),1),Hpe=a(ic(),1),Upe=a(ee(),1);var Wpe=a(T(),1),{RenamePatternModal:eqe}=Y(Hpe.privateApis),zz="editor/pattern-rename";function Gpe(){let e=(0,lT.useSelect)(n=>n(Le).isModalActive(zz)),{record:t,postType:r}=(0,lT.useSelect)(n=>{if(!e)return{};let{getCurrentPostType:i,getCurrentPostId:s}=n(R),{getEditedEntityRecord:l}=n(Upe.store),c=i();return{record:l("postType",c,s()),postType:c}},[e]),{closeModal:o}=(0,lT.useDispatch)(Le);return!e||r!==ol?null:(0,Wpe.jsx)(eqe,{onClose:o,pattern:t})}var cT=a(G(),1),Ype=a(ic(),1),qpe=a(ee(),1);var Kpe=a(T(),1),{DuplicatePatternModal:tqe}=Y(Ype.privateApis),Hz="editor/pattern-duplicate";function Zpe(){let e=(0,cT.useSelect)(n=>n(Le).isModalActive(Hz)),{record:t,postType:r}=(0,cT.useSelect)(n=>{if(!e)return{};let{getCurrentPostType:i,getCurrentPostId:s}=n(R),{getEditedEntityRecord:l}=n(qpe.store),c=i();return{record:l("postType",c,s()),postType:c}},[e]),{closeModal:o}=(0,cT.useDispatch)(Le);return!e||r!==ol?null:(0,Kpe.jsx)(tqe,{onClose:o,onSuccess:()=>o(),pattern:t})}var rqe=()=>function(){let{editorMode:t,isListViewOpen:r,showBlockBreadcrumbs:o,isDistractionFree:n,isFocusMode:i,isPreviewMode:s,isViewable:l,isCodeEditingEnabled:c,isRichEditingEnabled:u,isPublishSidebarEnabled:d}=(0,ua.useSelect)(D=>{let{get:E}=D(Uz.store),{isListViewOpened:C,getCurrentPostType:M,getEditorSettings:B}=D(R),{getSettings:N}=D(Qpe.store),{getPostType:z}=D(Dw.store);return{editorMode:E("core","editorMode")??"visual",isListViewOpen:C(),showBlockBreadcrumbs:E("core","showBlockBreadcrumbs"),isDistractionFree:E("core","distractionFree"),isFocusMode:E("core","focusMode"),isPreviewMode:N().isPreviewMode,isViewable:z(M())?.viewable??!1,isCodeEditingEnabled:B().codeEditingEnabled,isRichEditingEnabled:B().richEditingEnabled,isPublishSidebarEnabled:D(R).isPublishSidebarEnabled()}},[]),{getActiveComplementaryArea:f}=(0,ua.useSelect)(Le),{toggle:m}=(0,ua.useDispatch)(Uz.store),{createInfoNotice:h}=(0,ua.useDispatch)(Xpe.store),{__unstableSaveForPreview:g,setIsListViewOpened:v,switchEditorMode:y,toggleDistractionFree:b,toggleSpotlightMode:w,toggleTopToolbar:S}=(0,ua.useDispatch)(R),{openModal:x,enableComplementaryArea:_,disableComplementaryArea:P}=(0,ua.useDispatch)(Le),{getCurrentPostId:I}=(0,ua.useSelect)(R),A=c&&u;if(s)return{commands:[],isLoading:!1};let k=[];return k.push({name:"core/open-shortcut-help",label:(0,Et.__)("Keyboard shortcuts"),icon:Ux,category:"view",callback:({close:D})=>{D(),x("editor/keyboard-shortcut-help")}}),k.push({name:"core/toggle-distraction-free",label:n?(0,Et.__)("Exit Distraction free"):(0,Et.__)("Enter Distraction free"),category:"command",callback:({close:D})=>{b(),D()}}),k.push({name:"core/open-preferences",label:(0,Et.__)("Editor preferences"),category:"view",callback:({close:D})=>{D(),x("editor/preferences")}}),k.push({name:"core/toggle-spotlight-mode",label:i?(0,Et.__)("Exit Spotlight mode"):(0,Et.__)("Enter Spotlight mode"),category:"command",callback:({close:D})=>{w(),D()}}),k.push({name:"core/toggle-list-view",label:r?(0,Et.__)("Close List View"):(0,Et.__)("Open List View"),icon:Wx,category:"command",callback:({close:D})=>{v(!r),D(),h(r?(0,Et.__)("List View off."):(0,Et.__)("List View on."),{id:"core/editor/toggle-list-view/notice",type:"snackbar"})}}),k.push({name:"core/toggle-top-toolbar",label:(0,Et.__)("Top toolbar"),category:"command",callback:({close:D})=>{S(),D()}}),A&&k.push({name:"core/toggle-code-editor",label:t==="visual"?(0,Et.__)("Open code editor"):(0,Et.__)("Exit code editor"),icon:V3,category:"command",callback:({close:D})=>{y(t==="visual"?"text":"visual"),D()}}),k.push({name:"core/toggle-breadcrumbs",label:o?(0,Et.__)("Hide block breadcrumbs"):(0,Et.__)("Show block breadcrumbs"),category:"command",callback:({close:D})=>{m("core","showBlockBreadcrumbs"),D(),h(o?(0,Et.__)("Breadcrumbs hidden."):(0,Et.__)("Breadcrumbs visible."),{id:"core/editor/toggle-breadcrumbs/notice",type:"snackbar"})}}),k.push({name:"core/open-settings-sidebar",label:(0,Et.__)("Show or hide the Settings panel"),icon:(0,Et.isRTL)()?sg:Od,category:"command",callback:({close:D})=>{let E=f("core");D(),E==="edit-post/document"?P("core"):_("core","edit-post/document")}}),k.push({name:"core/open-block-inspector",label:(0,Et.__)("Show or hide the Block settings panel"),icon:b3,category:"command",callback:({close:D})=>{let E=f("core");D(),E==="edit-post/block"?P("core"):_("core","edit-post/block")}}),k.push({name:"core/toggle-publish-sidebar",label:d?(0,Et.__)("Disable pre-publish checks"):(0,Et.__)("Enable pre-publish checks"),icon:Bx,category:"command",callback:({close:D})=>{D(),m("core","isPublishSidebarEnabled"),h(d?(0,Et.__)("Pre-publish checks disabled."):(0,Et.__)("Pre-publish checks enabled."),{id:"core/editor/publish-sidebar/notice",type:"snackbar"})}}),l&&k.push({name:"core/preview-link",label:(0,Et.__)("Preview in a new tab"),icon:Bs,category:"view",callback:async({close:D})=>{D();let E=I(),C=await g();window.open(C,`wp-preview-${E}`)}}),{commands:k,isLoading:!1}},oqe=()=>function(){let{postType:t}=(0,ua.useSelect)(n=>{let{getCurrentPostType:i}=n(R);return{postType:i()}},[]),{openModal:r}=(0,ua.useDispatch)(Le),o=[];return t===ol&&(o.push({name:"core/rename-pattern",label:(0,Et.__)("Rename pattern"),icon:Zx,category:"edit",callback:({close:n})=>{r(zz),n()}}),o.push({name:"core/duplicate-pattern",label:(0,Et.__)("Duplicate pattern"),icon:o_,category:"command",callback:({close:n})=>{r(Hz),n()}})),{isLoading:!1,commands:o}},nqe=()=>function(){let{onNavigateToEntityRecord:t,goBack:r,templateId:o,isPreviewMode:n,canEditTemplate:i}=(0,ua.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(Dw.store).canUser("update",{kind:"postType",name:"wp_template",id:g})}},[]),{editedRecord:s,hasResolved:l}=(0,Dw.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,Et.sprintf)((0,Et.__)("Edit template: %s"),(0,D5.decodeEntities)(s.title)),icon:oc,category:"edit",callback:({close:u})=>{t({postId:o,postType:"wp_template"}),u()}}),r&&c.push({name:"core/switch-to-previous-entity",label:(0,Et.__)("Go back"),icon:Tm,category:"view",callback:({close:u})=>{r(),u()}}),{isLoading:!1,commands:c}},iqe=()=>function(){let{postType:t,postId:r}=(0,ua.useSelect)(l=>{let{getCurrentPostId:c,getCurrentPostType:u}=l(R);return{postType:u(),postId:c()}},[]),{editedRecord:o,hasResolved:n}=(0,Dw.useEntityRecord)("postType",t,r),{revertTemplate:i}=Y((0,ua.useDispatch)(R));if(!n||![Ko,er].includes(t))return{isLoading:!0,commands:[]};let s=[];if(jk(o)){let l=o.type===er?(0,Et.sprintf)((0,Et.__)("Reset template: %s"),(0,D5.decodeEntities)(o.title)):(0,Et.sprintf)((0,Et.__)("Reset template part: %s"),(0,D5.decodeEntities)(o.title));s.push({name:"core/reset-template",label:l,icon:(0,Et.isRTL)()?Jx:Qx,category:"command",callback:({close:c})=>{i(o),c()}})}return{isLoading:!n,commands:s}};function Jpe(){(0,uT.useCommandLoader)({name:"core/editor/edit-ui",hook:rqe()}),(0,uT.useCommandLoader)({name:"core/editor/contextual-commands",hook:oqe(),context:"entity-edit"}),(0,uT.useCommandLoader)({name:"core/editor/page-content-focus",hook:nqe(),context:"entity-edit"}),(0,uT.useCommandLoader)({name:"core/edit-site/manipulate-document",hook:iqe()})}var F5=a(G(),1),$pe=a(U(),1),ehe=a(kL(),1);var Fw="upload-in-progress";function the(){let e=(0,F5.useSelect)(i=>i(ehe.store).isUploading(),[]),{lockPostSaving:t,unlockPostSaving:r,lockPostAutosaving:o,unlockPostAutosaving:n}=(0,F5.useDispatch)(R);(0,$pe.useEffect)(()=>(e?(t(Fw),o(Fw)):(r(Fw),n(Fw)),()=>{r(Fw),n(Fw)}),[e,t,r,o,n])}var ay=a(j(),1),ohe=a(he(),1),nhe=a(G(),1),ihe=a(U(),1);var she=a(T(),1),{BlockRemovalWarningModal:rhe}=Y(ohe.privateApis),sqe=["core/post-content","core/post-template","core/query"],aqe=[{postTypes:["wp_template","wp_template_part"],callback(e){if(e.filter(({name:o})=>o==="core/post-content").length)return{description:(0,ay.__)("This block displays the content of posts and pages using this template."),warning:(0,ay.__)("If you delete it, posts or pages using this template will not display any content."),subtext:(0,ay.__)("Visitors will see blank pages."),requireConfirmation:!0};if(e.filter(({name:o})=>sqe.includes(o)).length)return(0,ay._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,ay._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 ahe(){let e=(0,nhe.useSelect)(r=>r(R).getCurrentPostType(),[]),t=(0,ihe.useMemo)(()=>aqe.filter(r=>r.postTypes.includes(e)),[e]);return!rhe||!t?null:(0,she.jsx)(rhe,{rules:t})}var mh=a(W(),1),Wz=a(j(),1),ly=a(U(),1),L5=a(he(),1),nd=a(G(),1),Gz=a(ee(),1),lhe=a(bt(),1),Yz=a(Rt(),1);var od=a(T(),1);function lqe(){let{blockPatternsWithPostContentBlockType:e,postType:t}=(0,nd.useSelect)(r=>{let{getPatternsByBlockTypes:o,getBlocksByName:n}=r(L5.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,ly.useMemo)(()=>e?.length?e.filter(r=>t==="page"&&!r.postTypes||Array.isArray(r.postTypes)&&r.postTypes.includes(t)):[],[t,e])}function cqe({blockPatterns:e,onChoosePattern:t}){let{editEntityRecord:r}=(0,nd.useDispatch)(Gz.store),{postType:o,postId:n}=(0,nd.useSelect)(i=>{let{getCurrentPostType:s,getCurrentPostId:l}=i(R);return{postType:s(),postId:l()}},[]);return(0,od.jsx)(L5.__experimentalBlockPatternsList,{blockPatterns:e,onClickPattern:(i,s)=>{r("postType",o,n,{blocks:s,content:({blocks:l=[]})=>(0,lhe.__unstableSerializeAndClean)(l)}),t()}})}function uqe({onClose:e}){let[t,r]=(0,ly.useState)(!0),{set:o}=(0,nd.useDispatch)(Yz.store),n=lqe();if(!(n.length>0))return null;function s(){e(),o("core","enableChoosePatternModal",t)}return(0,od.jsxs)(mh.Modal,{className:"editor-start-page-options__modal",title:(0,Wz.__)("Choose a pattern"),isFullScreen:!0,onRequestClose:s,children:[(0,od.jsx)("div",{className:"editor-start-page-options__modal-content",children:(0,od.jsx)(cqe,{blockPatterns:n,onChoosePattern:s})}),(0,od.jsx)(mh.Flex,{className:"editor-start-page-options__modal__actions",justify:"flex-start",expanded:!1,children:(0,od.jsx)(mh.FlexItem,{children:(0,od.jsx)(mh.CheckboxControl,{checked:t,label:(0,Wz.__)("Always show starter patterns for new pages"),onChange:l=>{r(l)}})})})]})}function che(){let[e,t]=(0,ly.useState)(!1),{isEditedPostEmpty:r}=(0,nd.useSelect)(R),{getEntityRecordNonTransientEdits:o}=(0,nd.useSelect)(Gz.store),{isModalActive:n}=(0,nd.useSelect)(Le),{enabled:i,postType:s,postId:l}=(0,nd.useSelect)(c=>{let{getCurrentPostId:u,getCurrentPostType:d}=c(R),f=c(Yz.store).get("core","enableChoosePatternModal"),m=d();return{postType:m,postId:u(),enabled:f&&Ls!==m&&er!==m&&Ko!==m}},[]);return(0,ly.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,od.jsx)(uqe,{onClose:()=>t(!1)}):null}var yhe=a(W(),1),id=a(j(),1),z5=a(ta(),1),dT=a(G(),1);var Ll=a(j(),1),uhe=[{keyCombination:{modifier:"primary",character:"b"},description:(0,Ll.__)("Make the selected text bold.")},{keyCombination:{modifier:"primary",character:"i"},description:(0,Ll.__)("Make the selected text italic.")},{keyCombination:{modifier:"primary",character:"k"},description:(0,Ll.__)("Convert the selected text into a link.")},{keyCombination:{modifier:"primaryShift",character:"k"},description:(0,Ll.__)("Remove a link.")},{keyCombination:{character:"[["},description:(0,Ll.__)("Insert a link to a post or page.")},{keyCombination:{modifier:"primary",character:"u"},description:(0,Ll.__)("Underline the selected text.")},{keyCombination:{modifier:"access",character:"d"},description:(0,Ll.__)("Strikethrough the selected text.")},{keyCombination:{modifier:"access",character:"x"},description:(0,Ll.__)("Make the selected text inline code.")},{keyCombination:{modifier:"access",character:"0"},aliases:[{modifier:"access",character:"7"}],description:(0,Ll.__)("Convert the current heading to a paragraph.")},{keyCombination:{modifier:"access",character:"1-6"},description:(0,Ll.__)("Convert the current paragraph or heading to a heading of level 1 to 6.")},{keyCombination:{modifier:"primaryShift",character:"SPACE"},description:(0,Ll.__)("Add non breaking space.")}];var fhe=a(U(),1),B5=a(yo(),1),Bl=a(T(),1);function dhe({keyCombination:e,forceAriaLabel:t}){let r=e.modifier?B5.displayShortcutList[e.modifier](e.character):e.character,o=e.modifier?B5.shortcutAriaLabel[e.modifier](e.character):e.character;return(0,Bl.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,Bl.jsx)(fhe.Fragment,{children:n},i):(0,Bl.jsx)("kbd",{className:"editor-keyboard-shortcut-help-modal__shortcut-key",children:n},i))})}function dqe({description:e,keyCombination:t,aliases:r=[],ariaLabel:o}){return(0,Bl.jsxs)(Bl.Fragment,{children:[(0,Bl.jsx)("div",{className:"editor-keyboard-shortcut-help-modal__shortcut-description",children:e}),(0,Bl.jsxs)("div",{className:"editor-keyboard-shortcut-help-modal__shortcut-term",children:[(0,Bl.jsx)(dhe,{keyCombination:t,forceAriaLabel:o}),r.map((n,i)=>(0,Bl.jsx)(dhe,{keyCombination:n,forceAriaLabel:o},i))]})]})}var V5=dqe;var mhe=a(G(),1),phe=a(ta(),1);var hhe=a(T(),1);function fqe({name:e}){let{keyCombination:t,description:r,aliases:o}=(0,mhe.useSelect)(n=>{let{getShortcutKeyCombination:i,getShortcutDescription:s,getShortcutAliases:l}=n(phe.store);return{keyCombination:i(e),aliases:l(e),description:s(e)}},[e]);return t?(0,hhe.jsx)(V5,{keyCombination:t,description:r,aliases:o}):null}var ghe=fqe;var ui=a(T(),1),vhe="editor/keyboard-shortcut-help",mqe=({shortcuts:e})=>(0,ui.jsx)("ul",{className:"editor-keyboard-shortcut-help-modal__shortcut-list",role:"list",children:e.map((t,r)=>(0,ui.jsx)("li",{className:"editor-keyboard-shortcut-help-modal__shortcut",children:typeof t=="string"?(0,ui.jsx)(ghe,{name:t}):(0,ui.jsx)(V5,{...t})},r))}),qz=({title:e,shortcuts:t,className:r})=>(0,ui.jsxs)("section",{className:Z("editor-keyboard-shortcut-help-modal__section",r),children:[!!e&&(0,ui.jsx)("h2",{className:"editor-keyboard-shortcut-help-modal__section-title",children:e}),(0,ui.jsx)(mqe,{shortcuts:t})]}),j5=({title:e,categoryName:t,additionalShortcuts:r=[]})=>{let o=(0,dT.useSelect)(n=>n(z5.store).getCategoryShortcuts(t),[t]);return(0,ui.jsx)(qz,{title:e,shortcuts:o.concat(r)})};function pqe(){let e=(0,dT.useSelect)(n=>n(Le).isModalActive(vhe),[]),{openModal:t,closeModal:r}=(0,dT.useDispatch)(Le),o=()=>{e?r():t(vhe)};return(0,z5.useShortcut)("core/editor/keyboard-shortcuts",o),e?(0,ui.jsxs)(yhe.Modal,{className:"editor-keyboard-shortcut-help-modal",title:(0,id.__)("Keyboard shortcuts"),closeButtonLabel:(0,id.__)("Close"),onRequestClose:o,children:[(0,ui.jsx)(qz,{className:"editor-keyboard-shortcut-help-modal__main-shortcuts",shortcuts:["core/editor/keyboard-shortcuts"]}),(0,ui.jsx)(j5,{title:(0,id.__)("Global shortcuts"),categoryName:"global"}),(0,ui.jsx)(j5,{title:(0,id.__)("Selection shortcuts"),categoryName:"selection"}),(0,ui.jsx)(j5,{title:(0,id.__)("Block shortcuts"),categoryName:"block",additionalShortcuts:[{keyCombination:{character:"/"},description:(0,id.__)("Change the block type after adding a new paragraph."),ariaLabel:(0,id.__)("Forward-slash")}]}),(0,ui.jsx)(qz,{title:(0,id.__)("Text formatting"),shortcuts:uhe}),(0,ui.jsx)(j5,{title:(0,id.__)("List View shortcuts"),categoryName:"list-view"})]}):null}var bhe=pqe;var ph=a(W(),1),fT=a(j(),1),Lw=a(U(),1),whe=a(he(),1),mT=a(G(),1),Kz=a(bt(),1),cy=a(ee(),1);var sd=a(T(),1);function hqe(e,t=!1){return(0,mT.useSelect)(r=>{let{getEntityRecord:o,getDefaultTemplateId:n}=r(cy.store),i=n({slug:e,is_custom:t,ignore_empty:!0});return i?o("postType",er,i)?.content?.raw:void 0},[e,t])}function gqe(e){let{slug:t,patterns:r}=(0,mT.useSelect)(i=>{let{getCurrentPostType:s,getCurrentPostId:l}=i(R),{getEntityRecord:c,getBlockPatterns:u}=i(cy.store),d=l(),f=s();return{slug:c("postType",f,d).slug,patterns:u()}},[]),o=(0,mT.useSelect)(i=>i(cy.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,Lw.useMemo)(()=>[{name:"fallback",blocks:(0,Kz.parse)(e),title:(0,fT.__)("Fallback content")},...r.filter(i=>Array.isArray(i.templateTypes)&&i.templateTypes.some(s=>t.startsWith(s))).map(i=>({...i,blocks:(0,Kz.parse)(i.content).map(s=>n(s))}))],[e,t,r])}function vqe({fallbackContent:e,onChoosePattern:t,postType:r}){let[,,o]=(0,cy.useEntityBlockEditor)("postType",r),n=gqe(e);return(0,sd.jsx)(whe.__experimentalBlockPatternsList,{blockPatterns:n,onClickPattern:(i,s)=>{o(s,{selection:void 0}),t()}})}function yqe({slug:e,isCustom:t,onClose:r,postType:o}){let n=hqe(e,t);return n?(0,sd.jsxs)(ph.Modal,{className:"editor-start-template-options__modal",title:(0,fT.__)("Choose a pattern"),closeLabel:(0,fT.__)("Cancel"),focusOnMount:"firstElement",onRequestClose:r,isFullScreen:!0,children:[(0,sd.jsx)("div",{className:"editor-start-template-options__modal-content",children:(0,sd.jsx)(vqe,{fallbackContent:n,slug:e,isCustom:t,postType:o,onChoosePattern:()=>{r()}})}),(0,sd.jsx)(ph.Flex,{className:"editor-start-template-options__modal__actions",justify:"flex-end",expanded:!1,children:(0,sd.jsx)(ph.FlexItem,{children:(0,sd.jsx)(ph.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:r,children:(0,fT.__)("Skip")})})})]}):null}function She(){let[e,t]=(0,Lw.useState)(!1),{shouldOpenModal:r,slug:o,isCustom:n,postType:i,postId:s}=(0,mT.useSelect)(l=>{let{getCurrentPostType:c,getCurrentPostId:u}=l(R),d=c(),f=u(),{getEditedEntityRecord:m,getEntityRecordNonTransientEdits:h}=l(cy.store),g=m("postType",d,f);return{shouldOpenModal:!(Object.keys(h("postType",d,f)??{}).length>0)&&g.content===""&&er===d,slug:g.slug,isCustom:g.is_custom,postType:d,postId:f}},[]);return(0,Lw.useEffect)(()=>{t(!1)},[i,s]),!r||e?null:(0,sd.jsx)(yqe,{slug:o,isCustom:n,postType:i,onClose:()=>t(!0)})}var hh=a(ta(),1),gh=a(G(),1);var xhe=a(he(),1);function Bw(){let e=(0,gh.useSelect)(v=>{let{richEditingEnabled:y,codeEditingEnabled:b}=v(R).getEditorSettings();return!y||!b},[]),{getBlockSelectionStart:t}=(0,gh.useSelect)(xhe.store),{getActiveComplementaryArea:r}=(0,gh.useSelect)(Le),{enableComplementaryArea:o,disableComplementaryArea:n}=(0,gh.useDispatch)(Le),{redo:i,undo:s,savePost:l,setIsListViewOpened:c,switchEditorMode:u,toggleDistractionFree:d}=(0,gh.useDispatch)(R),{isEditedPostDirty:f,isPostSavingLocked:m,isListViewOpened:h,getEditorMode:g}=(0,gh.useSelect)(R);return(0,hh.useShortcut)("core/editor/toggle-mode",()=>{u(g()==="visual"?"text":"visual")},{isDisabled:e}),(0,hh.useShortcut)("core/editor/toggle-distraction-free",()=>{d()}),(0,hh.useShortcut)("core/editor/undo",v=>{s(),v.preventDefault()}),(0,hh.useShortcut)("core/editor/redo",v=>{i(),v.preventDefault()}),(0,hh.useShortcut)("core/editor/save",v=>{v.preventDefault(),!m()&&f()&&l()}),(0,hh.useShortcut)("core/editor/toggle-list-view",v=>{h()||(v.preventDefault(),c(!0))}),(0,hh.useShortcut)("core/editor/toggle-sidebar",v=>{if(v.preventDefault(),["edit-post/document","edit-post/block"].includes(r("core")))n("core");else{let b=t()?"edit-post/block":"edit-post/document";o("core",b)}}),null}var Nhe=a(G(),1),W5=a(he(),1);var pT=a(G(),1),H5=a(he(),1),_he=a(ee(),1),U5=a(W(),1),ad=a(j(),1),Che=a(Ot(),1),The=a(U(),1),uy=a(T(),1);function Ehe({clientId:e,onClose:t}){let[r,o]=(0,The.useState)(!1),{getBlocks:n}=(0,pT.useSelect)(H5.store),{replaceBlocks:i}=(0,pT.useDispatch)(H5.store),{canRemove:s,templatePartTitle:l}=(0,pT.useSelect)(d=>{let{canRemoveBlock:f,getBlock:m}=d(H5.store),{getEntityRecord:h,getCurrentTheme:g}=d(_he.store),v=m(e),{slug:y,theme:b}=v?.attributes??{},w=b||g()?.stylesheet,S=w&&y?`${w}//${y}`:null,x=S?h("postType","wp_template_part",S):null;return{canRemove:f(e),templatePartTitle:x?.title?.rendered?(0,Che.decodeEntities)(x.title.rendered):null}},[e]);if(!s)return null;let c=l?(0,ad.sprintf)((0,ad.__)("Detach %s?"),l):(0,ad.__)("Detach template part?"),u=l?(0,ad.sprintf)((0,ad.__)("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,ad.__)("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,uy.jsxs)(uy.Fragment,{children:[(0,uy.jsx)(U5.MenuItem,{onClick:()=>o(!0),children:(0,ad.__)("Detach")}),(0,uy.jsx)(U5.__experimentalConfirmDialog,{isOpen:r,onConfirm:()=>{i(e,n(e)),t()},onCancel:()=>o(!1),confirmButtonText:(0,ad.__)("Detach"),size:"medium",title:c,__experimentalHideHeader:!1,children:u})]})}var hT=a(G(),1),Zz=a(he(),1),Phe=a(W(),1),khe=a(bt(),1),Xz=a(j(),1),Rhe=a(U(),1),Ahe=a(xt(),1);var Ihe=a(ee(),1);var dy=a(T(),1);function Ohe({clientIds:e,blocks:t}){let[r,o]=(0,Rhe.useState)(!1),{replaceBlocks:n}=(0,hT.useDispatch)(Zz.store),{createSuccessNotice:i}=(0,hT.useDispatch)(Ahe.store),{isBlockBasedTheme:s,canCreate:l}=(0,hT.useSelect)(u=>({isBlockBasedTheme:u(Ihe.store).getCurrentTheme()?.is_block_theme,canCreate:u(Zz.store).canInsertBlockType("core/template-part")}),[]);if(!s||!l)return null;let c=async u=>{n(e,(0,khe.createBlock)("core/template-part",{slug:u.slug,theme:u.theme})),i((0,Xz.__)("Template part created."),{type:"snackbar"})};return(0,dy.jsxs)(dy.Fragment,{children:[(0,dy.jsx)(Phe.MenuItem,{icon:dg,onClick:()=>{o(!0)},"aria-expanded":r,"aria-haspopup":"dialog",children:(0,Xz.__)("Create template part")}),r&&(0,dy.jsx)(i0,{closeModal:()=>{o(!1)},blocks:t,onCreate:c})]})}var gT=a(T(),1);function Mhe(){return(0,gT.jsx)(W5.BlockSettingsMenuControls,{children:({selectedClientIds:e,onClose:t})=>(0,gT.jsx)(bqe,{clientIds:e,onClose:t})})}function bqe({clientIds:e,onClose:t}){let{blocks:r}=(0,Nhe.useSelect)(o=>{let{getBlocksByClientId:n}=o(W5.store);return{blocks:n(e)}},[e]);return r.length===1&&r[0]?.name==="core/template-part"?(0,gT.jsx)(Ehe,{clientId:e[0],onClose:t}):(0,gT.jsx)(Ohe,{clientIds:e,blocks:r})}var Fhe=a(he(),1),Lhe=a(G(),1),Bhe=a(U(),1);var Dhe=a(U(),1),G5=a(G(),1);function wqe({postType:e}){let{registerPostTypeSchema:t}=Y((0,G5.useDispatch)(R));(0,Dhe.useEffect)(()=>{t(e)},[t,e]);let{fields:r}=(0,G5.useSelect)(o=>{let{getEntityFields:n}=Y(o(R));return{fields:n("postType",e)}},[e]);return r}var Vw=wqe;var Qz=a(T(),1),{MediaEditorModal:Sqe,store:xqe}=Y(ow);function _qe(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 Cqe({name:e,ratio:t}={}){let r=_qe(t);return!e||!Number.isFinite(r)||r<=0?null:{label:e,value:r}}function Vhe(){return(0,Lhe.useSelect)(t=>t(xqe).isOpen(),[])?(0,Qz.jsx)(Tqe,{}):null}function Tqe(){let e=Vw({postType:"attachment"}),[t,r,o]=(0,Fhe.useSettings)("dimensions.aspectRatios.default","dimensions.aspectRatios.theme","dimensions.defaultAspectRatios"),n=(0,Bhe.useMemo)(()=>{if(!(Array.isArray(t)||Array.isArray(r)||typeof o=="boolean"))return;let l=[...o&&Array.isArray(t)?t:[],...Array.isArray(r)?r:[]].map(Cqe).filter(Boolean);if(l.length||o===!1)return l},[t,r,o]);return(0,Qz.jsx)(Sqe,{fields:e,aspectRatioPresets:n})}var Io=a(T(),1),{ExperimentalBlockEditorProvider:Eqe}=Y(jw.privateApis),{PatternsMenuItems:Pqe}=Y(zhe.privateApis),vT=()=>{},kqe=["wp_block","wp_navigation","wp_template_part"];function Rqe(e,t,r){let o=jpe(),n=r==="template-locked"?"template":"post",[i,s,l]=(0,zf.useEntityBlockEditor)("postType",e.type,{id:e.id}),[c,u,d]=(0,zf.useEntityBlockEditor)("postType",t?.type,{id:t?.id}),f=(0,Ga.useMemo)(()=>{if(e.type==="wp_navigation")return[(0,Hhe.createBlock)("core/navigation",{ref:e.id,templateLock:!1})]},[e.type,e.id]),m=(0,Ga.useMemo)(()=>f||(n==="template"?c:i),[f,n,c,i]);return o!==null?[o,vT,vT]:!!t&&r==="template-locked"||e.type==="wp_navigation"?[m,vT,vT]:[m,n==="post"?s:u,n==="post"?l:d]}var $z=Qee(({post:e,settings:t,recovery:r,initialEdits:o,children:n,BlockEditorProviderComponent:i=Eqe,__unstableTemplate:s})=>{let l=!!s,{editorSettings:c,selection:u,isReady:d,mode:f,defaultMode:m,postTypeEntities:h,isInRevisionsMode:g,currentRevisionId:v}=(0,vh.useSelect)(H=>{let{getEditorSettings:q,getRenderingMode:Q,__unstableIsEditorReady:J,getDefaultRenderingMode:te,isRevisionsMode:se,getCurrentRevisionId:$}=Y(H(R)),{getEntitiesConfig:X,getEntityRecordEdits:oe}=H(zf.store),pe=Q(),be=te(e.type),Ce=be==="template-locked"?l:be!==void 0,Ge=be!==void 0,He=oe("postType",e.type,e.id);return{editorSettings:q(),isReady:J(),mode:Ge?pe:void 0,defaultMode:Ce?be:void 0,selection:He?.selection,postTypeEntities:e.type==="wp_template"?X("postType"):null,isInRevisionsMode:se(),currentRevisionId:$()}},[e.type,e.id,l]),y=l&&f!=="post-only",b=y?s:e,w=(0,Ga.useMemo)(()=>{let H={};if(e.type==="wp_template"){if(e.slug==="page")H.postType="page";else if(e.slug==="single")H.postType="post";else if(e.slug.split("-")[0]==="single"){let q=h?.map(J=>J.name)||[],Q=e.slug.match(`^single-(${q.join("|")})(?:-.+)?$`);Q&&(H.postType=Q[1])}}else(!kqe.includes(b.type)||y)&&(H.postId=e.id,H.postType=e.type);return{...H,templateSlug:b.type==="wp_template"?b.slug:void 0}},[y,e.id,e.type,e.slug,b.type,b.slug,h]),{id:S,type:x}=b,_=gpe(c,x,S,f),[P,I,A]=Rqe(e,s,f),{updatePostLock:k,setupEditor:D,updateEditorSettings:E,setCurrentTemplateId:C,setEditedPost:M,setRenderingMode:B}=Y((0,vh.useDispatch)(R)),{editEntityRecord:N}=(0,vh.useDispatch)(zf.store),z=(0,vh.useRegistry)(),O=(0,Ga.useCallback)(H=>{N("postType",e.type,e.id,{selection:H},{undoIgnore:!0})},[N,e.type,e.id]),{createWarningNotice:F,removeNotice:L}=(0,vh.useDispatch)(jhe.store);return(0,Ga.useLayoutEffect)(()=>{r||(k(t.postLock),z.select(R).__unstableIsEditorReady()||D(e,o,t.template),t.autosave&&F((0,Jz.__)("There is an autosave of this post that is more recent than the version below."),{id:"autosave-exists",actions:[{label:(0,Jz.__)("View the autosave"),url:t.autosave.editLink}]}))},[]),(0,Ga.useEffect)(()=>(M(e.type,e.id),typeof window<"u"&&window.__experimentalTemplateActivate&&L("template-activate-notice"),()=>M(null,null)),[e.type,e.id,M,L]),(0,Ga.useEffect)(()=>{E(t)},[t,E]),(0,Ga.useEffect)(()=>{C(s?.id)},[s?.id,C]),(0,Ga.useEffect)(()=>{m&&B(m)},[m,B]),Cpe(e.type,f),Jpe(),the(),!d||!f?null:(0,Io.jsx)(zf.EntityProvider,{kind:"root",type:"site",children:(0,Io.jsx)(zf.EntityProvider,{kind:"postType",type:e.type,id:e.id,revisionId:v??void 0,children:(0,Io.jsx)(jw.BlockContextProvider,{value:w,children:(0,Io.jsxs)(i,{value:P,onChange:A,onInput:I,selection:g?void 0:u,onChangeSelection:g?vT:O,settings:_,useSubRegistry:!1,children:[n,!t.isPreviewMode&&(0,Io.jsxs)(Io.Fragment,{children:[(0,Io.jsx)(Pqe,{}),(0,Io.jsx)(Mhe,{}),f==="template-locked"&&(0,Io.jsx)(bpe,{}),x==="wp_navigation"&&(0,Io.jsx)(Spe,{}),(0,Io.jsx)(Bw,{}),(0,Io.jsx)(bhe,{}),(0,Io.jsx)(ahe,{}),(0,Io.jsx)(che,{}),(0,Io.jsx)(She,{}),(0,Io.jsx)(Gpe,{}),(0,Io.jsx)(Zpe,{}),(0,Io.jsx)(Vhe,{})]})]})})})})});function eH(e){return(0,Io.jsx)($z,{...e,BlockEditorProviderComponent:jw.BlockEditorProvider,children:e.children})}var Uhe=eH;var yh=a(T(),1);function Aqe({template:e,post:t}){let[r="white"]=dh("color.background"),[o]=(0,yT.useEntityBlockEditor)("postType",t.type,{id:t.id}),[n]=(0,yT.useEntityBlockEditor)("postType",e?.type,{id:e?.id}),i=e&&n?n:o,s=!i?.length;return(0,yh.jsxs)("div",{className:"editor-fields-content-preview",style:{backgroundColor:r},children:[s&&(0,yh.jsx)("span",{className:"editor-fields-content-preview__empty",children:(0,Whe.__)("Empty content")}),!s&&(0,yh.jsx)(tH.BlockPreview.Async,{children:(0,yh.jsx)(tH.BlockPreview,{blocks:i})})]})}function Yhe({item:e}){let{settings:t,template:r}=(0,Ghe.useSelect)(o=>{let{canUser:n,getPostType:i,getTemplateId:s,getEntityRecord:l}=Y(o(yT.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,yh.jsx)(eH,{post:e,settings:t,__unstableTemplate:r,children:(0,yh.jsx)(Aqe,{template:r,post:e})})}var Iqe={type:"media",id:"content-preview",label:(0,qhe.__)("Content preview"),render:Yhe,enableSorting:!1},Khe=Iqe;function Oqe(e){let t=e?.editor;return Array.isArray(t)?!!t[0]?.notes:!1}function Nqe(e,t,r){return{type:"REGISTER_ENTITY_ACTION",kind:e,name:t,config:r}}function Mqe(e,t,r){return{type:"UNREGISTER_ENTITY_ACTION",kind:e,name:t,actionId:r}}function Dqe(e,t,r){return{type:"REGISTER_ENTITY_FIELD",kind:e,name:t,config:r}}function Fqe(e,t,r){return{type:"UNREGISTER_ENTITY_FIELD",kind:e,name:t,fieldId:r}}function Lqe(e,t){return{type:"SET_IS_READY",kind:e,name:t}}var Bqe=[w7,y7,_7,E7,C7,T7,v7,Kk,p7,b7,x7],Vqe=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(Y5.store).getPostType(e),n=await t.resolveSelect(Y5.store).canUser("create",{kind:"postType",name:e}),i=await t.resolveSelect(Y5.store).getCurrentTheme(),{disablePostFormats:s}=t.select(R).getEditorSettings(),l=!["wp_block","wp_template_part"].includes(o.slug)&&n&&K8;o.slug==="wp_template"&&!window?.__experimentalTemplateActivate&&(l=void 0);let c=[o.viewable?U8:void 0,o.supports?.revisions?o7:void 0,l,o.slug==="wp_template_part"&&n&&i?.is_block_theme?m7:void 0,n&&o.slug==="wp_block"?J8:void 0,o.supports?.title?X8:void 0,o.supports?.["page-attributes"]?G8:void 0,o.slug==="wp_block"?r7:void 0,s7,Q8,d7,l7,i7].filter(Boolean),u;if(e===Ls)u=Bqe;else if(u=[o.supports?.thumbnail&&i?.theme_supports?.["post-thumbnails"]&&v8,o.supports?.author&&d1,k8,!rc.includes(o.slug)&&N8,!rc.includes(o.slug)&&M8,NL,!rc.includes(o.slug)&&o.supports?.excerpt&&B8,o.supports?.["page-attributes"]&&E8,o.supports?.comments&&R8,o.supports?.trackbacks&&I8,(o.supports?.comments||o.supports?.trackbacks)&&O8,x8,o.supports?.["post-formats"]&&!s&&V8,!rc.includes(o.slug)&&o.supports?.editor&&j8,P8,o.slug==="post"&&H8,o.supports?.editor&&o.viewable&&Khe,Oqe(o.supports)&&D8].filter(Boolean),o.supports?.title){let d;e==="page"?d=BL:e==="wp_template"?d=h_:e==="wp_block"?d=g_:d=Kk,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,Zhe.doAction)("core.registerPostTypeSchema",e)};var jqe={mobile:"Mobile",tablet:"Tablet"},zqe=({viewport:e="default",showStateOnCanvas:t=!0}={})=>({dispatch:r,registry:o})=>{t&&(r.setDeviceType(jqe[e]??"Desktop"),Y(o.dispatch(oH.store)).resetZoomLevel())};function Hqe(e){return{type:"SET_CURRENT_TEMPLATE_ID",id:e}}var Uqe=e=>async({select:t,dispatch:r,registry:o})=>{let n=await o.dispatch(Hn.store).saveEntityRecord("postType","wp_template",e);return o.dispatch(Hn.store).editEntityRecord("postType",t.getCurrentPostType(),t.getCurrentPostId(),{template:n.slug}),o.dispatch(Ps.store).createSuccessNotice((0,Ft.__)("Custom template created. You're in template mode now."),{type:"snackbar",actions:[{label:(0,Ft.__)("Go back"),onClick:()=>r.setRenderingMode(t.getEditorSettings().defaultRenderingMode)}]}),n},Wqe=e=>({registry:t})=>{let o=(t.select(fy.store).get("core","hiddenBlockTypes")??[]).filter(n=>!(Array.isArray(e)?e:[e]).includes(n));t.dispatch(fy.store).set("core","hiddenBlockTypes",o)},Gqe=e=>({registry:t})=>{let r=t.select(fy.store).get("core","hiddenBlockTypes")??[],o=new Set([...r,...Array.isArray(e)?e:[e]]);t.dispatch(fy.store).set("core","hiddenBlockTypes",[...o])},Yqe=({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(Hn.store).getEntityRecord("root","__unstableBase")?.home;i.dispatch(Ps.store).removeNotice(l);let u=t.filter(({kind:m,name:h,key:g,property:v})=>!r.some(y=>y.kind===m&&y.name===h&&y.key===g&&y.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(y=>y.kind===m&&y.name===h)&&i.dispatch(Hn.store).editEntityRecord(m,h,g,{status:"publish"}),f.push(i.dispatch(Hn.store).saveEditedEntityRecord(m,h,g)))}),d.length&&f.push(i.dispatch(Hn.store).__experimentalSaveSpecifiedEntityEdits("root","site",void 0,d)),i.dispatch(oH.store).__unstableMarkLastChangeAsPersistent(),Promise.all(f).then(m=>e?e(m):m).then(m=>{m.some(h=>typeof h>"u")?i.dispatch(Ps.store).createErrorNotice((0,Ft.__)("Saving failed.")):i.dispatch(Ps.store).createSuccessNotice(n||(0,Ft.__)("Site updated."),{type:"snackbar",id:l,actions:[{label:(0,Ft.__)("View site"),url:c,openInNewTab:!0}]})}).catch(m=>i.dispatch(Ps.store).createErrorNotice(`${(0,Ft.__)("Saving failed.")} ${m}`))},qqe=(e,{allowUndo:t=!0}={})=>async({registry:r})=>{let o="edit-site-template-reverted";if(r.dispatch(Ps.store).removeNotice(o),!jk(e)){r.dispatch(Ps.store).createErrorNotice((0,Ft.__)("This template is not revertable."),{type:"snackbar"});return}try{let n=r.select(Hn.store).getEntityConfig("postType",e.type);if(!n){r.dispatch(Ps.store).createErrorNotice((0,Ft.__)("The editor has encountered an unexpected error. Please reload."),{type:"snackbar"});return}let i=(0,Xhe.addQueryArgs)(`${n.baseURL}/${e.id}`,{context:"edit",source:e.origin}),s=await(0,Qhe.default)({path:i});if(!s){r.dispatch(Ps.store).createErrorNotice((0,Ft.__)("The editor has encountered an unexpected error. Please reload."),{type:"snackbar"});return}let l=({blocks:d=[]})=>(0,q5.__unstableSerializeAndClean)(d),c=r.select(Hn.store).getEditedEntityRecord("postType",e.type,e.id);r.dispatch(Hn.store).editEntityRecord("postType",e.type,e.id,{content:l,blocks:c.blocks,source:"custom"},{undoIgnore:!0});let u=(0,q5.parse)(s?.content?.raw);if(r.dispatch(Hn.store).editEntityRecord("postType",e.type,s.id,{content:l,blocks:u,source:"theme"}),t){let d=()=>{r.dispatch(Hn.store).editEntityRecord("postType",e.type,c.id,{content:l,blocks:c.blocks,source:"custom"})};r.dispatch(Ps.store).createSuccessNotice((0,Ft.__)("Template reset."),{type:"snackbar",id:o,actions:[{label:(0,Ft.__)("Undo"),onClick:d}]})}}catch(n){let i=n.message&&n.code!=="unknown_error"?n.message:(0,Ft.__)("Template revert failed. Please reload.");r.dispatch(Ps.store).createErrorNotice(i,{type:"snackbar"})}},Kqe=e=>async({registry:t})=>{let r=e.every(n=>n?.has_theme_file),o=await Promise.allSettled(e.map(n=>t.dispatch(Hn.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,Ft.sprintf)((0,Ft.__)('"%s" reset.'),(0,rH.decodeEntities)(i)):(0,Ft.sprintf)((0,Ft._x)('"%s" deleted.',"template part"),(0,rH.decodeEntities)(i))}else n=r?(0,Ft.__)("Items reset."):(0,Ft.__)("Items deleted.");t.dispatch(Ps.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,Ft.__)("An error occurred while reverting the item."):(0,Ft.__)("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,Ft.__)("An error occurred while deleting the items."):i.size===1?n=r?(0,Ft.sprintf)((0,Ft.__)("An error occurred while reverting the items: %s"),[...i][0]):(0,Ft.sprintf)((0,Ft.__)("An error occurred while deleting the items: %s"),[...i][0]):n=r?(0,Ft.sprintf)((0,Ft.__)("Some errors occurred while reverting the items: %s"),[...i].join(",")):(0,Ft.sprintf)((0,Ft.__)("Some errors occurred while deleting the items: %s"),[...i].join(","))}t.dispatch(Ps.store).createErrorNotice(n,{type:"snackbar"})}},Zqe=e=>({select:t,registry:r})=>{let o=t.getCurrentPostType(),n=r.select(Hn.store).getCurrentTheme()?.stylesheet,i=r.select(fy.store).get("core","renderingModes")?.[n]??{};if(i[o]===e)return;let s={[n]:{...i,[o]:e}};r.dispatch(fy.store).set("core","renderingModes",s)};function Xqe(e){return{type:"SET_STYLES_PATH",path:e}}function Qqe(e){return{type:"SET_SHOW_STYLEBOOK",show:e}}function Jqe(){return{type:"RESET_STYLES_NAVIGATION"}}function $qe(e){return{type:"SET_CURRENT_REVISION_ID",revisionId:e}}var eKe=e=>async({dispatch:t,select:r,registry:o})=>{let n=r.getCurrentPostType(),i=r.getCurrentPostId(),l=o.select(Hn.store).getEntityConfig("postType",n)?.revisionKey||"id",c=await o.resolveSelect(Hn.store).getRevisions("postType",n,i,mg(l,e));o.batch(()=>{t({type:"SET_REVISION_PAGE",page:e}),c?.length&&t.setCurrentRevisionId(c[0][l])})};function tKe(e){return{type:"SET_SHOW_REVISION_DIFF",showDiff:e}}var rKe=e=>async({select:t,dispatch:r,registry:o})=>{let n=t.getCurrentPostType(),i=t.getCurrentPostId(),l=o.select(Hn.store).getEntityConfig("postType",n)?.revisionKey||"id",c=await o.resolveSelect(Hn.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(Ps.store).createSuccessNotice((0,Ft.sprintf)((0,Ft.__)("Restored to revision from %s."),(0,K5.dateI18n)((0,K5.getSettings)().formats.datetime,c.date)),{type:"snackbar",id:"editor-revision-restored"})};function oKe(e,t={focus:!1}){return{type:"SELECT_NOTE",noteId:e,options:t}}var p1={reducer:pG,selectors:_L,actions:EL},R=(0,Z5.createReduxStore)(SG,{...p1});(0,Z5.register)(R);Y(R).registerPrivateActions(nH);Y(R).registerPrivateSelectors(OL);var oge=a(T(),1),nKe=e=>(0,tge.createHigherOrderComponent)(t=>({attributes:r,setAttributes:o,...n})=>{let i=(0,Jhe.useSelect)(u=>u(R).getCurrentPostType(),[]),[s,l]=(0,$he.useEntityProp)("postType",i,"meta"),c=(0,ege.useMemo)(()=>({...r,...Object.fromEntries(Object.entries(e).map(([u,d])=>[u,s[d]]))}),[r,s]);return(0,oge.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 iKe(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=nKe(t)(e.edit)),e}(0,rge.addFilter)("blocks.registerBlockType","core/editor/custom-sources-backwards-compatibility/shim-attribute-source",iKe);var mxe=a(xn(),1);var nge=a(Fd(),1),ige=a(vo(),1);var sge=a(Ot(),1),my=a(T(),1),sKe=10,X5={name:"links",className:"editor-autocompleters__link",triggerPrefix:"[[",isDebounced:!0,async options(e){return(await(0,nge.default)({path:(0,ige.addQueryArgs)("/wp/v2/search",{per_page:sKe,search:e,type:"post"})})).filter(r=>r.title!=="")},getOptionKeywords(e){return[...e.title.split(/\s+/)]},getOptionLabel(e){return(0,my.jsxs)(my.Fragment,{children:[(0,my.jsx)(cn,{icon:e.subtype==="page"?Tm:D4}),(0,sge.decodeEntities)(e.title)]})},getOptionCompletion(e){return(0,my.jsx)("a",{href:e.url,children:e.title})}};var age=a(U(),1),lge=a(G(),1),cge=a(ee(),1),Hf=a(T(),1);function aKe(e){let t=e.avatar_urls&&e.avatar_urls[24]?(0,Hf.jsx)("img",{className:"editor-autocompleters__user-avatar",alt:"",src:e.avatar_urls[24]}):(0,Hf.jsx)("span",{className:"editor-autocompleters__no-avatar"});return(0,Hf.jsxs)(Hf.Fragment,{children:[t,(0,Hf.jsx)("span",{className:"editor-autocompleters__user-name",children:e.name}),(0,Hf.jsx)("span",{className:"editor-autocompleters__user-slug",children:e.slug})]})}var Q5={name:"users",className:"editor-autocompleters__user",triggerPrefix:"@",useItems(e){let t=(0,lge.useSelect)(o=>{let{getUsers:n}=o(cge.store);return n({context:"view",search:encodeURIComponent(e)})},[e]);return[(0,age.useMemo)(()=>t?t.map(o=>({key:`user-${o.slug}`,value:o,label:aKe(o)})):[],[t])]},getOptionCompletion(e){return`@${e.slug}`}};var uge=a(U(),1),dge=a(_e(),1),J5=a(G(),1),fge=a(ee(),1);var lKe=class extends uge.Component{constructor(e){super(e),this.needsAutosave=!!(e.isDirty&&e.isAutosaveable)}componentDidMount(){this.props.disableIntervalChecks||this.setAutosaveTimer()}componentDidUpdate(e){if(this.props.disableIntervalChecks){this.props.editsReference!==e.editsReference&&this.props.autosave();return}if(this.props.interval!==e.interval&&(clearTimeout(this.timerId),this.setAutosaveTimer()),!this.props.isDirty){this.needsAutosave=!1;return}if(this.props.isAutosaving&&!e.isAutosaving){this.needsAutosave=!1;return}this.props.editsReference!==e.editsReference&&(this.needsAutosave=!0)}componentWillUnmount(){clearTimeout(this.timerId)}setAutosaveTimer(e=this.props.interval*1e3){this.timerId=setTimeout(()=>{this.autosaveTimerHandler()},e)}autosaveTimerHandler(){if(!this.props.isAutosaveable){this.setAutosaveTimer(1e3);return}this.needsAutosave&&(this.needsAutosave=!1,this.props.autosave()),this.setAutosaveTimer()}render(){return null}},$5=(0,dge.compose)([(0,J5.withSelect)((e,t)=>{let{getReferenceByDistinctEdits:r}=e(fge.store),{isEditedPostDirty:o,isEditedPostAutosaveable:n,isAutosavingPost:i,getEditorSettings:s}=e(R),{interval:l=s().autosaveInterval}=t;return{editsReference:r(),isDirty:o(),isAutosaveable:n(),isAutosaving:i(),interval:l}}),(0,J5.withDispatch)((e,t)=>({autosave(){let{autosave:r=e(R).autosave}=t;r()}}))])(lKe);var _h=a(j(),1),_T=a(G(),1),Bc=a(W(),1),CT=a(he(),1);var Kge=a(yo(),1),Zge=a(ee(),1),Xge=a(jz(),1),pN=a(U(),1),Qge=a(_e(),1),Jge=a(Ot(),1),$ge=a(py(),1);var iH=a(j(),1),pge=a(G(),1),hge=a(ee(),1);function eN(e){let{isFrontPage:t,isPostsPage:r}=(0,pge.useSelect)(o=>{let{canUser:n,getEditedEntityRecord:i}=o(hge.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,iH.__)("Homepage"):r?(0,iH.__)("Posts Page"):!1}var zge=a(W(),1),Hge=a(yo(),1),fN=a(j(),1),xT=a(G(),1);var mN=a(_e(),1),Uge=a(Rt(),1);var wT=a(U(),1);var Uf=a(W(),1),Fc=a(j(),1),yn=a(he(),1),gy=a(G(),1);var Mr=a(U(),1),lN=a(yo(),1),Tge=a(Im(),1),Ege=a(ee(),1);var Nr=a(j(),1),zw=[{slug:"theme-colors",title:(0,Nr.__)("Theme Colors"),origin:"theme",type:"colors"},{slug:"theme-gradients",title:(0,Nr.__)("Theme Gradients"),origin:"theme",type:"gradients"},{slug:"custom-colors",title:(0,Nr.__)("Custom Colors"),origin:"custom",type:"colors"},{slug:"custom-gradients",title:(0,Nr.__)("Custom Gradients"),origin:"custom",type:"gradients"},{slug:"duotones",title:(0,Nr.__)("Duotones"),origin:"theme",type:"duotones"},{slug:"default-colors",title:(0,Nr.__)("Default Colors"),origin:"default",type:"colors"},{slug:"default-gradients",title:(0,Nr.__)("Default Gradients"),origin:"default",type:"gradients"}],tN=[{slug:"site-identity",title:(0,Nr.__)("Site Identity"),blocks:["core/site-logo","core/site-title","core/site-tagline"]},{slug:"design",title:(0,Nr.__)("Design"),blocks:["core/navigation","core/avatar","core/post-time-to-read"],exclude:["core/home-link","core/navigation-link"]},{slug:"posts",title:(0,Nr.__)("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,Nr.__)("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"]}],sH=[{slug:"overview",title:(0,Nr.__)("Overview"),blocks:[]},{slug:"text",title:(0,Nr.__)("Text"),blocks:["core/post-content","core/home-link","core/navigation-link"]},{slug:"colors",title:(0,Nr.__)("Colors"),blocks:[]},{slug:"theme",title:(0,Nr.__)("Theme"),subcategories:tN},{slug:"media",title:(0,Nr.__)("Media"),blocks:["core/post-featured-image"]},{slug:"widgets",title:(0,Nr.__)("Widgets"),blocks:[]},{slug:"embed",title:(0,Nr.__)("Embeds"),include:[]}],cKe=[...tN,{slug:"media",title:(0,Nr.__)("Media"),blocks:["core/post-featured-image"]},{slug:"widgets",title:(0,Nr.__)("Widgets"),blocks:[]},{slug:"embed",title:(0,Nr.__)("Embeds"),include:[]}],gge=[{slug:"overview",title:(0,Nr.__)("Overview"),blocks:[]},{slug:"text",title:(0,Nr.__)("Text"),blocks:["core/post-content","core/home-link","core/navigation-link"]},{slug:"colors",title:(0,Nr.__)("Colors"),blocks:[]},{slug:"blocks",title:(0,Nr.__)("All Blocks"),blocks:[],subcategories:cKe}],uKe=`
	.is-root-container {
		display: flow-root;
	}
`,vge=`
	body {
		position: relative;
		padding: 32px !important;
	}

	${uKe}

	.editor-style-book__examples {
		max-width: 1200px;
		margin: 0 auto;
	}

	.editor-style-book__example {
	    max-width: 900px;
		border-radius: 2px;
		cursor: var(--wpds-cursor-control, pointer);
		display: flex;
		flex-direction: column;
		gap: 40px;
		padding: 16px;
		width: 100%;
		box-sizing: border-box;
		scroll-margin-top: 32px;
		scroll-margin-bottom: 32px;
		margin: 0 auto 40px auto;
	}

	.editor-style-book__example.is-selected {
		box-shadow: 0 0 0 1px var(--wp-components-color-accent, var(--wp-admin-theme-color, #007cba));
	}

	.editor-style-book__example.is-disabled-example {
		pointer-events: none;
	}

	.editor-style-book__example:focus:not(:disabled) {
		box-shadow: 0 0 0 var(--wp-admin-border-width-focus) var(--wp-components-color-accent, var(--wp-admin-theme-color, #007cba));
		outline: 3px solid transparent;
	}

	.editor-style-book__duotone-example > div:first-child {
		display: flex;
		aspect-ratio: 16 / 9;
		grid-row: span 1;
		grid-column: span 2;
	}
	.editor-style-book__duotone-example img {
		width: 100%;
		height: 100%;
		object-fit: cover;
	}
	.editor-style-book__duotone-example > div:not(:first-child) {
		height: 20px;
		border: 1px solid color-mix( in srgb, currentColor 10%, transparent );
	}

	.editor-style-book__color-example {
		border: 1px solid color-mix( in srgb, currentColor 10%, transparent );
	}

	.editor-style-book__subcategory-title,
	.editor-style-book__example-title {
		font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
		font-size: 13px;
		font-weight: normal;
		line-height: normal;
		margin: 0;
		text-align: left;
		padding-top: 8px;
		border-top: 1px solid color-mix( in srgb, currentColor 10%, transparent );
		color: color-mix( in srgb, currentColor 60%, transparent );
	}

	.editor-style-book__subcategory-title {
		font-size: 16px;
		margin-bottom: 40px;
    	padding-bottom: 8px;
	}

	.editor-style-book__example-preview {
		width: 100%;
	}

	.editor-style-book__example-preview .block-editor-block-list__insertion-point,
	.editor-style-book__example-preview .block-list-appender {
		display: none;
	}
	:where(.is-root-container > .wp-block:first-child) {
		margin-top: 0;
	}
	:where(.is-root-container > .wp-block:last-child) {
		margin-bottom: 0;
	}
`;var yge=a(bt(),1);function bT(e,t){if(!e?.slug||!t?.length)return;let r=e?.subcategories??[];if(r.length)return r.reduce((s,l)=>{let c=bT(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 aH(){let e=[...tN,...sH].map(({slug:o})=>o),r=(0,yge.getCategories)().filter(({slug:o})=>!e.includes(o));return[...sH,...r]}var ld=a(j(),1),di=a(bt(),1);var bge=a(W(),1),rN=a(he(),1),lH=a(T(),1),dKe=({colors:e,type:t,templateColumns:r="1fr 1fr",itemHeight:o="52px"})=>e?(0,lH.jsx)(bge.__experimentalGrid,{templateColumns:r,rowGap:8,columnGap:16,children:e.map(n=>{let i=t==="gradients"?(0,rN.__experimentalGetGradientClass)(n.slug):(0,rN.getColorClassName)("background-color",n.slug),s=Z("editor-style-book__color-example",i);return(0,lH.jsx)("div",{className:s,style:{height:o}},n.slug)})}):null,cH=dKe;var uH=a(W(),1),hy=a(T(),1),fKe=({duotones:e})=>e?(0,hy.jsx)(uH.__experimentalGrid,{columns:2,rowGap:16,columnGap:16,children:e.map(t=>(0,hy.jsxs)(uH.__experimentalGrid,{className:"editor-style-book__duotone-example",columns:2,rowGap:8,columnGap:8,children:[(0,hy.jsx)("div",{children:(0,hy.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,hy.jsx)("div",{className:"editor-style-book__color-example",style:{backgroundColor:r}},r))]},t.slug))}):null,wge=fKe;var oN=a(T(),1);function mKe(e){if(!e)return[];let t=[];return zw.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,oN.jsx)(wge,{duotones:n[r.type]}),t.push(i)):(i.content=(0,oN.jsx)(cH,{colors:n[r.type],type:r.type}),t.push(i))}}),t}function pKe(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,ld.__)("Colors"),category:"overview",content:(0,oN.jsx)(cH,{colors:r.colors,type:"colors",templateColumns:"repeat(auto-fill, minmax( 200px, 1fr ))",itemHeight:"32px"})};t.push(i)}let o=[];if((0,di.getBlockType)("core/heading")){let i=(0,di.createBlock)("core/heading",{content:(0,ld.__)("AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz0123456789X{(\u2026)},.-<>?!*&:/A@HELFO\u2122\xA9"),level:1});o.push(i)}if((0,di.getBlockType)("core/paragraph")){let i=(0,di.createBlock)("core/paragraph",{content:(0,ld.__)("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,di.createBlock)("core/paragraph",{content:(0,ld.__)("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,di.getBlockType)("core/group")){let l=(0,di.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,ld.__)("Typography"),category:"overview",blocks:o}),["core/image","core/separator","core/buttons","core/pullquote","core/search"].forEach(i=>{let s=(0,di.getBlockType)(i);if(s&&s.example){let l={name:i,title:s.title,category:"overview",blocks:(0,di.getBlockFromExample)(i,{...s.example,attributes:{...s.example.attributes,style:void 0}})};t.push(l)}}),t}function dH(e){let t=(0,di.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,di.getBlockFromExample)(s.name,{...s.example,attributes:{...s.example?.attributes,style:void 0}})}));if(!!!(0,di.getBlockType)("core/heading"))return t;let o={name:"core/heading",title:(0,ld.__)("Headings"),category:"text",blocks:[1,2,3,4,5,6].map(s=>(0,di.createBlock)("core/heading",{content:(0,ld.sprintf)((0,ld.__)("Heading %d"),s),level:s}))},n=mKe(e),i=pKe(e);return[o,...n,...t,...i]}var Cge=a(U(),1),iN=a(G(),1);var nN=a(bt(),1),Sge=a(G(),1),xge=a(U(),1);function Hw(e={},t=!1){let o=Rz("spacing.blockGap")!==null,n=!o,{disableLayoutStyles:i,getBlockStyles:s}=(0,Sge.useSelect)(l=>{let{getEditorSettings:c}=l(R),{getBlockStyles:u}=l(nN.store);return{disableLayoutStyles:!!c()?.disableLayoutStyles,getBlockStyles:u}},[]);return(0,xge.useMemo)(()=>{if(!e?.styles||!e?.settings)return[[],{}];let l=(0,nN.getBlockTypes)();return Bv(e,l,{hasBlockGapSupport:o,hasFallbackGapSupport:n,disableLayoutStyles:i,disableRootPadding:t,getBlockStyles:s})},[o,n,e,i,t,s])}function _ge(e=!1){let{merged:t}=Zr();return Hw(t,e)}function hKe(e){let[t,r]=_ge(e),{getEditorSettings:o}=(0,iN.useSelect)(R),{updateEditorSettings:n}=(0,iN.useDispatch)(R);(0,Cge.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 sN({disableRootPadding:e}){return hKe(e),null}var Dt=a(T(),1),{ExperimentalBlockEditorProvider:gKe}=Y(yn.privateApis),{Tabs:aN}=Y(Uf.privateApis);function bh(e){return!e||Object.keys(e).length===0}var vKe=(e,t)=>{if(!e||!t||!t?.contentDocument)return;let r=e==="top"?t.contentDocument.body:t.contentDocument.getElementById(e);r&&r.scrollIntoView({behavior:"smooth"})},Pge=e=>e&&typeof e=="string"&&(e==="/"||e.startsWith("/typography")||e.startsWith("/colors")||e.startsWith("/blocks"))?{top:!0}:null;function kge(){let{colors:e,gradients:t}=(0,yn.__experimentalUseMultipleOriginColorsAndGradients)(),[r,o,n,i]=(0,yn.useSettings)("color.defaultDuotone","color.duotone.custom","color.duotone.theme","color.duotone.default");return(0,Mr.useMemo)(()=>{let l={colors:e,gradients:t,duotones:[]};return n&&n.length&&l.duotones.push({name:(0,Fc._x)("Theme","Indicates these duotone filters come from the theme."),slug:"theme",duotones:n}),r&&i&&i.length&&l.duotones.push({name:(0,Fc._x)("Default","Indicates these duotone filters come from WordPress."),slug:"default",duotones:i}),o&&o.length&&l.duotones.push({name:(0,Fc._x)("Custom","Indicates these doutone filters are created by the user."),slug:"custom",duotones:o}),l},[e,t,o,n,i,r])}function Rge(e){let t=[],r=bT({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 yKe(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 bKe({isSelected:e,onClick:t,onSelect:r,showTabs:o=!0,userConfig:n={},path:i=""},s){let l=dh("color.text"),c=dh("color.background"),u=kge(),d=(0,Mr.useMemo)(()=>dH(u),[u]),f=(0,Mr.useMemo)(()=>aH().filter(S=>d.some(x=>x.category===S.slug)),[d]),m=Rge(d),{base:h}=Zr(),g=Pge(i),v=(0,Mr.useMemo)(()=>!bh(n)&&!bh(h)?Bi(h,n):{},[h,n]),y=(0,gy.useSelect)(S=>S(yn.store).getSettings(),[]),[b]=Hw(v),w=(0,Mr.useMemo)(()=>({...y,styles:!bh(b)&&!bh(n)?b:y.styles,isPreviewMode:!0}),[b,y,n]);return(0,Dt.jsx)("div",{ref:s,className:Z("editor-style-book",{"is-button":!!t}),style:{color:l,background:c},children:o?(0,Dt.jsxs)(aN,{children:[(0,Dt.jsx)("div",{className:"editor-style-book__tablist-container",children:(0,Dt.jsx)(aN.TabList,{children:f.map(S=>(0,Dt.jsx)(aN.Tab,{tabId:S.slug,children:S.title},S.slug))})}),f.map(S=>{let x=S.slug?aH().find(P=>P.slug===S.slug):null,_=x?bT(x,d):{examples:d};return(0,Dt.jsx)(aN.TabPanel,{tabId:S.slug,focusable:!1,className:"editor-style-book__tabpanel",children:(0,Dt.jsx)(fH,{category:S.slug,examples:_,isSelected:e,onSelect:r,settings:w,title:S.title,goTo:g})},S.slug)})]}):(0,Dt.jsx)(fH,{examples:{examples:m},isSelected:e,onClick:t,onSelect:r,settings:w,goTo:g})})}var Age=({userConfig:e={},isStatic:t=!1,path:r,onPathChange:o,settings:n})=>{let i=(0,gy.useSelect)(D=>n??D(R).getEditorSettings(),[n]),s=(0,gy.useSelect)(D=>D(Ege.store).canUser("create",{kind:"postType",name:"attachment"}),[]);(0,Mr.useEffect)(()=>{(0,gy.dispatch)(yn.store).updateSettings({...i,mediaUpload:s?Tge.uploadMedia:void 0})},[i,s]);let[l,c]=(0,Mr.useState)("/"),u=r??l,d=o??c,f=D=>u===`/blocks/${encodeURIComponent(D)}`||u.startsWith(`/blocks/${encodeURIComponent(D)}/`),m=(D,E=!1)=>{if(zw.find(C=>C.slug===D)){d("/colors/palette");return}if(D==="typography"){d("/typography");return}E||d(`/blocks/${encodeURIComponent(D)}`)},h=kge(),g=dH(h),v=Rge(g),y=null,b=null;if(u.includes("/colors"))y="colors";else if(u.includes("/typography"))y="text";else if(u.includes("/blocks")){y="blocks";let D=decodeURIComponent(u).split("/blocks/")[1];D?.includes("/variations")&&([D,b]=D.split("/variations/")),D&&g.find(E=>E.name===D)&&(y=D)}else t||(y="overview");let w=gge.find(D=>D.slug===y),S=(0,Mr.useMemo)(()=>w?bT(w,g):{examples:[g.find(D=>D.name===y)]},[w,g,y]),x=(0,Mr.useMemo)(()=>y?b?{examples:yKe(S.examples,b)}:S:{examples:v},[y,v,b,S]),{base:_}=Zr(),P=Pge(u),I=(0,Mr.useMemo)(()=>!bh(e)&&!bh(_)?Bi(_,e):{},[_,e]),[A]=Hw(I),k=(0,Mr.useMemo)(()=>({...i,styles:!bh(A)&&!bh(e)?A:i.styles,isPreviewMode:!0}),[A,i,e]);return(0,Dt.jsx)("div",{className:"editor-style-book",children:(0,Dt.jsxs)(yn.BlockEditorProvider,{settings:k,children:[(0,Dt.jsx)(sN,{disableRootPadding:!0}),(0,Dt.jsx)(fH,{examples:x,settings:k,goTo:P,isSelected:t?null:f,onSelect:t?null:m})]})})},fH=({examples:e,isSelected:t,onClick:r,onSelect:o,settings:n,title:i,goTo:s})=>{let[l,c]=(0,Mr.useState)(!1),[u,d]=(0,Mr.useState)(!1),f=(0,Mr.useRef)(null),m={role:"button",onFocus:()=>c(!0),onBlur:()=>c(!1),onKeyDown:g=>{if(g.defaultPrevented)return;let{keyCode:v}=g;r&&(v===lN.ENTER||v===lN.SPACE)&&(g.preventDefault(),r(g))},onClick:g=>{g.defaultPrevented||r&&(g.preventDefault(),r(g))},readonly:!0},h=()=>d(!0);return(0,Mr.useLayoutEffect)(()=>{u&&f.current&&s?.top&&vKe("top",f.current)},[s?.top,u]),(0,Dt.jsxs)(yn.__unstableIframe,{onLoad:h,ref:f,className:Z("editor-style-book__iframe",{"is-focused":l&&!!r,"is-button":!!r}),name:"style-book-canvas",tabIndex:0,...r?m:{},children:[(0,Dt.jsx)(yn.__unstableEditorStyles,{styles:n.styles}),(0,Dt.jsxs)("style",{children:[vge,!!r&&"body { cursor: var(--wpds-cursor-control, pointer); } body * { pointer-events: none; }"]}),(0,Dt.jsx)(wKe,{className:"editor-style-book__examples",filteredExamples:e,label:i?(0,Fc.sprintf)((0,Fc.__)("Examples of blocks in the %s category"),i):(0,Fc.__)("Examples of blocks"),isSelected:t,onSelect:o},i)]})},wKe=(0,Mr.memo)(({className:e,filteredExamples:t,label:r,isSelected:o,onSelect:n})=>(0,Dt.jsxs)(Uf.Composite,{orientation:"vertical",className:e,"aria-label":r,role:"grid",children:[!!t?.examples?.length&&t.examples.map(i=>(0,Dt.jsx)(Ige,{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,Dt.jsxs)(Uf.Composite.Group,{className:"editor-style-book__subcategory",children:[(0,Dt.jsx)(Uf.Composite.GroupLabel,{children:(0,Dt.jsx)("h2",{className:"editor-style-book__subcategory-title",children:i.title})}),(0,Dt.jsx)(SKe,{examples:i.examples,isSelected:o,onSelect:n})]},`subcategory-${i.slug}`))]})),SKe=({examples:e,isSelected:t,onSelect:r})=>!!e?.length&&e.map(o=>(0,Dt.jsx)(Ige,{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)),xKe=["example-duotones"],Ige=({id:e,title:t,blocks:r,isSelected:o,onClick:n,content:i})=>{let s=(0,gy.useSelect)(d=>d(yn.store).getSettings(),[]),l=(0,Mr.useMemo)(()=>({...s,focusMode:!1,isPreviewMode:!0}),[s]),c=(0,Mr.useMemo)(()=>Array.isArray(r)?r:[r],[r]),u=xKe.includes(e)||!n?{disabled:!0,accessibleWhenDisabled:!!n}:{};return(0,Dt.jsx)("div",{role:"row",children:(0,Dt.jsx)("div",{role:"gridcell",children:(0,Dt.jsxs)(Uf.Composite.Item,{className:Z("editor-style-book__example",{"is-selected":o,"is-disabled-example":!!u?.disabled}),id:e,"aria-label":n?(0,Fc.sprintf)((0,Fc.__)("Open %s styles in Styles panel"),t):void 0,render:(0,Dt.jsx)("div",{}),role:n?"button":null,onClick:n,...u,children:[(0,Dt.jsx)("span",{className:"editor-style-book__example-title",children:t}),(0,Dt.jsx)("div",{className:"editor-style-book__example-preview","aria-hidden":!0,children:(0,Dt.jsx)(Uf.Disabled,{className:"editor-style-book__example-preview__content",children:i||(0,Dt.jsxs)(gKe,{value:c,settings:l,children:[(0,Dt.jsx)(yn.__unstableEditorStyles,{}),(0,Dt.jsx)(yn.BlockList,{renderAppender:!1})]})})})]})})})},Oge=(0,Mr.forwardRef)(bKe);var ST=a(T(),1);function Nge({path:e,onPathChange:t,userConfig:r,forwardedRef:o}){return(0,ST.jsx)(Oge,{ref:o,path:e,userConfig:r,isSelected:n=>e===`/blocks/${encodeURIComponent(n)}`||e?.startsWith(`/blocks/${encodeURIComponent(n)}/`),onSelect:n=>{if(zw.find(i=>i.slug===n)){t?.("/colors/palette");return}if(n==="typography"){t?.("/typography");return}t?.("/blocks/"+encodeURIComponent(n))}})}function _Ke({path:e,onPathChange:t,forwardedRef:r}){let{user:o}=Zr(),{revisions:n,isLoading:i}=ty(),s=(0,wT.useMemo)(()=>{let c=e?.match(/^\/revisions\/(.+)$/);return c?c[1]:null},[e]),l=(0,wT.useMemo)(()=>!s||!n.length?null:n.find(c=>String(c.id)===String(s)),[s,n]);return i?null:(0,ST.jsx)(Nge,{forwardedRef:r,path:e,onPathChange:t,userConfig:l||o})}function CKe({path:e,onPathChange:t},r){return e?.startsWith("/revisions")?(0,ST.jsx)(_Ke,{forwardedRef:r,path:e,onPathChange:t}):(0,ST.jsx)(Nge,{forwardedRef:r,path:e,onPathChange:t})}var Mge=(0,wT.forwardRef)(CKe);var Dge=a(W(),1),Lc=a(he(),1),mH=a(G(),1),wh=a(U(),1);var Wf=a(T(),1),{ExperimentalBlockEditorProvider:TKe,BlockStyleVariationOverridesWithConfig:EKe}=Y(Lc.privateApis);function cN(e){return!e||Object.keys(e).length===0}function PKe({path:e},t){let r=(0,mH.useSelect)(y=>y(Lc.store).getBlocks(),[]),{user:o,base:n}=Zr(),{revisions:i,isLoading:s}=ty(),l=(0,wh.useMemo)(()=>{let y=e?.match(/^\/revisions\/(.+)$/);return y?y[1]:null},[e]),u=(0,wh.useMemo)(()=>!l||!i.length?null:i.find(y=>String(y.id)===String(l)),[l,i])||o,d=(0,wh.useMemo)(()=>!cN(u)&&!cN(n)?Bi(n,u):{},[n,u]),f=(0,wh.useMemo)(()=>Array.isArray(r)?r:[r],[r]),m=(0,mH.useSelect)(y=>y(Lc.store).getSettings(),[]),h=(0,wh.useMemo)(()=>({...m,isPreviewMode:!0}),[m]),[g]=Hw(d),v=!cN(g)&&!cN(u)?g:h.styles;return s?null:(0,Wf.jsxs)(Lc.__unstableIframe,{ref:t,className:"editor-revisions__iframe",name:"revisions",tabIndex:0,children:[(0,Wf.jsx)("style",{children:".is-root-container { display: flow-root; }"}),(0,Wf.jsx)(Dge.Disabled,{className:"editor-revisions__example-preview__content",children:(0,Wf.jsxs)(TKe,{value:f,settings:h,children:[(0,Wf.jsx)(Lc.BlockList,{renderAppender:!1}),(0,Wf.jsx)(Lc.__unstableEditorStyles,{styles:v}),(0,Wf.jsx)(EKe,{config:d})]})})]})}var Fge=(0,wh.forwardRef)(PKe);var Uw=a(U(),1),jge=a(W(),1);var uN=a(j(),1),Sh=a(yo(),1),Bge=a(W(),1);var cd=a(T(),1),Lge=20;function pH({direction:e,resizeWidthBy:t}){function r(i){let{keyCode:s}=i;s!==Sh.LEFT&&s!==Sh.RIGHT||(i.preventDefault(),e==="left"&&s===Sh.LEFT||e==="right"&&s===Sh.RIGHT?t(Lge):(e==="left"&&s===Sh.RIGHT||e==="right"&&s===Sh.LEFT)&&t(-Lge))}let o={active:{opacity:1,scaleY:1.3}},n=`resizable-editor__resize-help-${e}`;return(0,cd.jsxs)(cd.Fragment,{children:[(0,cd.jsxs)(ht.Root,{children:[(0,cd.jsx)(ht.Trigger,{render:(0,cd.jsx)(Bge.__unstableMotion.button,{className:`editor-resizable-editor__resize-handle is-${e}`,"aria-label":(0,uN.__)("Drag to resize"),"aria-describedby":n,onKeyDown:r,variants:o,whileFocus:"active",whileHover:"active",whileTap:"active",role:"separator","aria-orientation":"vertical"},"handle")}),(0,cd.jsx)(ht.Popup,{children:(0,uN.__)("Drag to resize")})]}),(0,cd.jsx)(tr,{id:n,children:(0,uN.__)("Use left and right arrow keys to resize the canvas.")})]})}var dN=a(T(),1),Vge={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 kKe({className:e,enableResizing:t,height:r,children:o}){let[n,i]=(0,Uw.useState)("100%"),s=(0,Uw.useRef)(),l=(0,Uw.useCallback)(c=>{s.current&&i(s.current.offsetWidth+c)},[]);return(0,dN.jsx)(jge.ResizableBox,{className:Z("editor-resizable-editor",e,{"is-resizable":t}),ref:c=>{s.current=c?.resizable},size:{width:t?n:"100%",height:t&&r?r:"100%"},onResizeStop:(c,u,d)=>{i(d.style.width)},minWidth:300,maxWidth:"100%",maxHeight:"100%",enable:{left:t,right:t},showHandle:t,resizeRatio:2,handleComponent:{left:(0,dN.jsx)(pH,{direction:"left",resizeWidthBy:l}),right:(0,dN.jsx)(pH,{direction:"right",resizeWidthBy:l})},handleClasses:void 0,handleStyles:{left:Vge,right:Vge},children:o})}var Ww=kKe;var xh=a(T(),1);function hH(e,t){return t?(0,fN.__)("Style Book"):e?.startsWith("/revisions")?(0,fN.__)("Style Revisions"):""}function Wge(){let{stylesPath:e,showStylebook:t,showListViewByDefault:r}=(0,xT.useSelect)(m=>{let{getStylesPath:h,getShowStylebook:g}=Y(m(R)),v=m(Uge.store).get("core","showListViewByDefault");return{stylesPath:h(),showStylebook:g(),showListViewByDefault:v}},[]),{resetStylesNavigation:o,setStylesPath:n}=Y((0,xT.useDispatch)(R)),{setIsListViewOpened:i}=(0,xT.useDispatch)(R),s=(0,mN.useFocusOnMount)("firstElement"),l=(0,mN.useFocusReturn)(),c=null;t?c=(0,xh.jsx)(Mge,{path:e,onPathChange:n,ref:l}):e?.startsWith("/revisions")&&(c=(0,xh.jsx)(Fge,{path:e,ref:l}));let u=hH(e,t),d=()=>{i(r),o()};return(0,xh.jsx)("div",{className:"editor-styles-canvas",children:(0,xh.jsx)(Ww,{enableResizing:!1,children:(0,xh.jsxs)("section",{className:"editor-styles-canvas__section",ref:s,onKeyDown:m=>{m.keyCode===Hge.ESCAPE&&!m.defaultPrevented&&(m.preventDefault(),d())},"aria-label":u,children:[(0,xh.jsx)(zge.Button,{size:"compact",className:"editor-styles-canvas__close-button",icon:_n,label:(0,fN.__)("Close"),onClick:d}),c]})})})}var Gge=a(G(),1),gH=a(Ot(),1),vH=a(he(),1),Yge=a(ee(),1);function qge(){return(0,Gge.useSelect)(e=>{let{getBlockAttributes:t,getBlockName:r,__experimentalGetParsedPattern:o}=e(vH.store),{getEditedEntityRecord:n,getCurrentTheme:i}=e(Yge.store),{getEditedContentOnlySection:s}=Y(e(vH.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,gH.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,gH.decodeEntities)(h.title),type:"template-part"}}}return null},[])}var Gi=a(T(),1),RKe=Bc.__unstableMotion.create(Bc.Button);function hN(e){let{stopEditingContentOnlySection:t}=Y((0,_T.useDispatch)(CT.store)),r=qge(),{postId:o,postType:n,postTypeLabel:i,documentTitle:s,isNotFound:l,templateTitle:c,onNavigateToPreviousEntityRecord:u,isTemplatePreview:d,stylesCanvasTitle:f}=(0,_T.useSelect)(P=>{let{getCurrentPostType:I,getCurrentPostId:A,getEditorSettings:k,getRenderingMode:D}=P(R),{getEditedEntityRecord:E,getPostType:C,getCurrentTheme:M,isResolving:B}=P(Zge.store),N=I(),z=A(),O=E("postType",N,z),{default_template_types:F=[]}=M()??{},L=sl({templateTypes:F,template:O}),H=C(N)?.labels?.singular_name,{getStylesPath:q,getShowStylebook:Q}=Y(P(R)),J=q(),te=Q(),se=hH(J,te);return{postId:z,postType:N,postTypeLabel:H,documentTitle:O.title,isNotFound:!O&&!B("getEditedEntityRecord","postType",N,z),templateTitle:L.title,onNavigateToPreviousEntityRecord:k().onNavigateToPreviousEntityRecord,isTemplatePreview:D()==="template-locked",stylesCanvasTitle:se}},[]),{open:m}=(0,_T.useDispatch)(Xge.store),h=(0,Qge.useReducedMotion)(),g=e3.includes(n),v=!!u||!!r,y=g?c:s,b=r?.patternTitle||e.title||f||y,w=e.icon,S=P=>{P.stopPropagation(),r?t():u&&u()},x=eN(o),_=(0,pN.useRef)(!1);return(0,pN.useEffect)(()=>{_.current=!0},[]),(0,Gi.jsxs)("div",{className:Z("editor-document-bar",{"has-back-button":v}),children:[(0,Gi.jsx)(Bc.__unstableAnimatePresence,{children:v&&(0,Gi.jsx)(RKe,{className:"editor-document-bar__back",icon:(0,_h.isRTL)()?k3:T3,onClick:S,size:"compact",initial:_.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,_h.__)("Back")})}),!g&&d&&!v&&(0,Gi.jsx)(CT.BlockIcon,{icon:oc,className:"editor-document-bar__icon-layout"}),l?(0,Gi.jsx)(Bc.__experimentalText,{children:(0,_h.__)("Document not found")}):(0,Gi.jsxs)(Bc.Button,{className:"editor-document-bar__command",onClick:()=>m(),size:"compact",children:[(0,Gi.jsxs)(Bc.__unstableMotion.div,{className:"editor-document-bar__title",initial:_.current?{opacity:0,transform:v?"translateX(15%)":"translateX(-15%)"}:!1,animate:{opacity:1,transform:"translateX(0%)"},transition:h?{duration:0}:void 0,children:[w&&(0,Gi.jsx)(CT.BlockIcon,{icon:w}),(0,Gi.jsxs)(Bc.__experimentalText,{size:"body",as:"h1",children:[(0,Gi.jsx)("span",{className:"editor-document-bar__post-title",children:b?(0,$ge.__unstableStripHTML)(b):(0,_h.__)("No title")}),r&&(0,Gi.jsx)("span",{className:"editor-document-bar__post-type-label",children:r.type==="template-part"?`\xB7 ${(0,_h.__)("Template Part")}`:`\xB7 ${(0,_h.__)("Pattern")}`}),!r&&x&&(0,Gi.jsx)("span",{className:"editor-document-bar__post-type-label",children:`\xB7 ${x}`}),!r&&i&&!e.title&&!x&&(0,Gi.jsx)("span",{className:"editor-document-bar__post-type-label",children:`\xB7 ${(0,Jge.decodeEntities)(i)}`})]})]},v),(0,Gi.jsx)("span",{className:"editor-document-bar__shortcut",children:Kge.displayShortcut.primary("k")})]})]})}var yy=a(j(),1),Gw=a(G(),1),vN=a(U(),1),yN=a(aT(),1),gN=a(he(),1),eve=a(ee(),1),Un=a(W(),1);var vy=a(T(),1),AKe=({children:e,isValid:t,isDisabled:r,level:o,href:n,onSelect:i})=>{function s(l){if(r){l.preventDefault();return}i()}return(0,vy.jsx)("li",{className:Z("document-outline__item",`is-${o.toLowerCase()}`,{"is-invalid":!t,"is-disabled":r}),children:(0,vy.jsxs)("a",{href:n,className:"document-outline__button","aria-disabled":r,onClick:s,children:[(0,vy.jsx)("span",{className:"document-outline__emdash","aria-hidden":"true"}),(0,vy.jsx)("strong",{className:"document-outline__level",children:o}),(0,vy.jsx)("span",{className:"document-outline__item-content",children:e})]})})},yH=AKe;var or=a(T(),1),IKe=(0,or.jsx)("em",{children:(0,yy.__)("(Empty heading)")}),OKe=[(0,or.jsx)("br",{},"incorrect-break"),(0,or.jsx)("em",{children:(0,yy.__)("(Incorrect heading level)")},"incorrect-message")],NKe=[(0,or.jsx)("br",{},"incorrect-break-h1"),(0,or.jsx)("em",{children:(0,yy.__)("(Your theme may already use a H1 for the post title)")},"incorrect-message-h1")],MKe=[(0,or.jsx)("br",{},"incorrect-break-multiple-h1"),(0,or.jsx)("em",{children:(0,yy.__)("(Multiple H1 headings are not recommended)")},"incorrect-message-multiple-h1")];function DKe(){return(0,or.jsxs)(Un.SVG,{width:"138",height:"148",viewBox:"0 0 138 148",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,or.jsx)(Un.Rect,{width:"138",height:"148",rx:"4",fill:"#F0F6FC"}),(0,or.jsx)(Un.Line,{x1:"44",y1:"28",x2:"24",y2:"28",stroke:"#DDDDDD"}),(0,or.jsx)(Un.Rect,{x:"48",y:"16",width:"27",height:"23",rx:"4",fill:"#DDDDDD"}),(0,or.jsx)(Un.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,or.jsx)(Un.Line,{x1:"55",y1:"59",x2:"24",y2:"59",stroke:"#DDDDDD"}),(0,or.jsx)(Un.Rect,{x:"59",y:"47",width:"29",height:"23",rx:"4",fill:"#DDDDDD"}),(0,or.jsx)(Un.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,or.jsx)(Un.Line,{x1:"80",y1:"90",x2:"24",y2:"90",stroke:"#DDDDDD"}),(0,or.jsx)(Un.Rect,{x:"84",y:"78",width:"30",height:"23",rx:"4",fill:"#F0B849"}),(0,or.jsx)(Un.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,or.jsx)(Un.Line,{x1:"66",y1:"121",x2:"24",y2:"121",stroke:"#DDDDDD"}),(0,or.jsx)(Un.Rect,{x:"70",y:"109",width:"29",height:"23",rx:"4",fill:"#DDDDDD"}),(0,or.jsx)(Un.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 FKe=(e=[])=>e.filter(t=>t.name==="core/heading").map(t=>({...t,level:t.attributes.level,isEmpty:LKe(t)})),LKe=e=>!e.attributes.content||e.attributes.content.trim().length===0;function Yw({onSelect:e,hasOutlineItemsDisabled:t}){let{selectBlock:r}=(0,Gw.useDispatch)(gN.store),{title:o,isTitleSupported:n}=(0,Gw.useSelect)(g=>{let{getEditedPostAttribute:v}=g(R),{getPostType:y}=g(eve.store),b=y(v("type"));return{title:v("title"),isTitleSupported:b?.supports?.title??!1}}),i=(0,Gw.useSelect)(g=>{let{getClientIdsWithDescendants:v,getBlock:y}=g(gN.store);return v().map(w=>y(w))}),s=(0,Gw.useSelect)(g=>{if(g(R).getRenderingMode()==="post-only")return;let{getBlocksByName:v,getClientIdsOfDescendants:y}=g(gN.store),[b]=v("core/post-content");if(b)return y(b)},[]),l=(0,vN.useRef)(1),c=(0,vN.useMemo)(()=>FKe(i),[i]);if(c.length<1)return(0,or.jsxs)("div",{className:"editor-document-outline has-no-headings",children:[(0,or.jsx)(DKe,{}),(0,or.jsx)("p",{children:(0,yy.__)("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,or.jsx)("div",{className:"document-outline",children:(0,or.jsxs)("ul",{children:[d&&(0,or.jsx)(yH,{level:(0,yy.__)("Title"),isValid:!0,onSelect:e,href:`#${u.id}`,isDisabled:t,children:o}),c.map(g=>{let v=g.level>l.current+1,y=!g.isEmpty&&!v&&!!g.level&&(g.level!==1||!m&&!d);return l.current=g.level,(0,or.jsxs)(yH,{level:`H${g.level}`,isValid:y,isDisabled:t||!h(g.clientId),href:`#block-${g.clientId}`,onSelect:()=>{r(g.clientId),e?.()},children:[g.isEmpty?IKe:(0,yN.getTextContent)((0,yN.create)({html:g.attributes.content})),v&&OKe,g.level===1&&m&&MKe,d&&g.level===1&&!m&&NKe]},g.clientId)})]})})}var tve=a(G(),1),rve=a(he(),1);function ove({children:e}){return(0,tve.useSelect)(r=>{let{getGlobalBlockCount:o}=r(rve.store);return o("core/heading")>0})?e:null}var nve=a(U(),1),ive=a(G(),1),Vl=a(j(),1),sve=a(he(),1),ave=a(ta(),1),lve=a(yo(),1),cve=a(T(),1);function BKe(){let{registerShortcut:e}=(0,ive.useDispatch)(ave.store);return(0,nve.useEffect)(()=>{e({name:"core/editor/toggle-mode",category:"global",description:(0,Vl.__)("Switch between visual editor and code editor."),keyCombination:{modifier:"secondary",character:"m"}}),e({name:"core/editor/save",category:"global",description:(0,Vl.__)("Save your changes."),keyCombination:{modifier:"primary",character:"s"}}),e({name:"core/editor/undo",category:"global",description:(0,Vl.__)("Undo your last changes."),keyCombination:{modifier:"primary",character:"z"}}),e({name:"core/editor/redo",category:"global",description:(0,Vl.__)("Redo your last undo."),keyCombination:{modifier:"primaryShift",character:"z"},aliases:(0,lve.isAppleOS)()?[]:[{modifier:"primary",character:"y"}]}),e({name:"core/editor/toggle-list-view",category:"global",description:(0,Vl.__)("Show or hide the List View."),keyCombination:{modifier:"access",character:"o"}}),e({name:"core/editor/toggle-distraction-free",category:"global",description:(0,Vl.__)("Enter or exit distraction free mode."),keyCombination:{modifier:"primaryShift",character:"\\"}}),e({name:"core/editor/toggle-sidebar",category:"global",description:(0,Vl.__)("Show or hide the Settings panel."),keyCombination:{modifier:"primaryShift",character:","}}),e({name:"core/editor/keyboard-shortcuts",category:"main",description:(0,Vl.__)("Display these keyboard shortcuts."),keyCombination:{modifier:"access",character:"h"}}),e({name:"core/editor/new-note",category:"block",description:(0,Vl.__)("Add a new note."),keyCombination:{modifier:"primaryAlt",character:"m"}}),e({name:"core/editor/next-region",category:"global",description:(0,Vl.__)("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,Vl.__)("Navigate to the previous part of the editor."),keyCombination:{modifier:"ctrlShift",character:"`"},aliases:[{modifier:"access",character:"p"},{modifier:"ctrlShift",character:"~"}]})},[e]),(0,cve.jsx)(sve.BlockEditorKeyboardShortcuts.Register,{})}var uve=BKe;var bN=a(j(),1),dve=a(W(),1),wN=a(G(),1),TT=a(yo(),1);var fve=a(U(),1);var mve=a(T(),1);function VKe(e,t){let r=(0,TT.isAppleOS)()?TT.displayShortcut.primaryShift("z"):TT.displayShortcut.primary("y"),o=(0,wN.useSelect)(i=>i(R).hasEditorRedo(),[]),{redo:n}=(0,wN.useDispatch)(R);return(0,mve.jsx)(dve.Button,{__next40pxDefaultSize:!0,...e,ref:t,icon:(0,bN.isRTL)()?fg:lg,label:(0,bN.__)("Redo"),shortcut:r,"aria-disabled":!o,onClick:o?n:void 0,className:"editor-history__redo"})}var SN=(0,fve.forwardRef)(VKe);var xN=a(j(),1),pve=a(W(),1),_N=a(G(),1),hve=a(yo(),1);var gve=a(U(),1);var vve=a(T(),1);function jKe(e,t){let r=(0,_N.useSelect)(n=>n(R).hasEditorUndo(),[]),{undo:o}=(0,_N.useDispatch)(R);return(0,vve.jsx)(pve.Button,{__next40pxDefaultSize:!0,...e,ref:t,icon:(0,xN.isRTL)()?lg:fg,label:(0,xN.__)("Undo"),shortcut:hve.displayShortcut.primary("z"),"aria-disabled":!r,onClick:r?o:void 0,className:"editor-history__undo"})}var CN=(0,gve.forwardRef)(jKe);var bve=a(rl(),1),wve=a(G(),1),Sve=a(he(),1),xve=a(xt(),1);var TN=a(W(),1),qw=a(j(),1),EN=a(G(),1),yve=a(U(),1),bH=a(he(),1),by=a(T(),1);function PN(){let[e,t]=(0,yve.useState)(!1),r=(0,EN.useSelect)(i=>i(bH.store).isValidTemplate(),[]),{setTemplateValidity:o,synchronizeTemplate:n}=(0,EN.useDispatch)(bH.store);return r?null:(0,by.jsxs)(by.Fragment,{children:[(0,by.jsx)(TN.Notice,{className:"editor-template-validation-notice",isDismissible:!1,status:"warning",actions:[{label:(0,qw.__)("Keep it as is"),onClick:()=>o(!0)},{label:(0,qw.__)("Reset the template"),onClick:()=>t(!0)}],children:(0,qw.__)("The content of your post doesn\u2019t match the template assigned to your post type.")}),(0,by.jsx)(TN.__experimentalConfirmDialog,{isOpen:e,confirmButtonText:(0,qw.__)("Reset"),onConfirm:()=>{t(!1),n()},onCancel:()=>t(!1),size:"medium",children:(0,qw.__)("Resetting the template may result in loss of content, do you want to continue?")})]})}var wH=a(T(),1);function zKe(){(0,bve.default)("wp.editor.EditorNotices",{since:"7.0",version:"7.2",alternative:"wp.notices.InlineNotices"});let e=(0,wve.useSelect)(t=>t(Sve.store).isValidTemplate(),[]);return(0,wH.jsx)(xve.InlineNotices,{pinnedNoticesClassName:"components-editor-notices__pinned",dismissibleNoticesClassName:"components-editor-notices__dismissible",children:!e&&(0,wH.jsx)(PN,{})})}var _ve=zKe;var Cve=a(rl(),1),Tve=a(xt(),1),Eve=a(T(),1);function Pve(){return(0,Cve.default)("wp.editor.EditorSnackbars",{since:"7.0",version:"7.2",alternative:"wp.notices.SnackbarNotices"}),(0,Eve.jsx)(Tve.SnackbarNotices,{className:"components-editor-notices__snackbar"})}var Kf=a(W(),1),qf=a(j(),1),Kw=a(U(),1),ET=a(_e(),1),Mve=a(G(),1);var wy=a(j(),1),_H=a(G(),1),RN=a(W(),1),CH=a(ee(),1);var kN=a(W(),1),SH=a(j(),1),kve=a(G(),1),xH=a(ee(),1),Rve=a(Ot(),1);var Gf=a(T(),1);function Ave({record:e,checked:t,onChange:r}){let{name:o,kind:n,title:i,key:s}=e,{entityRecordTitle:l,hasPostMetaChanges:c}=(0,kve.useSelect)(u=>{if(n!=="postType"||o!=="wp_template")return{entityRecordTitle:i,hasPostMetaChanges:Y(u(R)).hasPostMetaChanges(o,s)};let d=u(xH.store).getEditedEntityRecord(n,o,s),{default_template_types:f=[]}=u(xH.store).getCurrentTheme()??{};return{entityRecordTitle:sl({template:d,templateTypes:f}).title,hasPostMetaChanges:Y(u(R)).hasPostMetaChanges(o,s)}},[o,n,i,s]);return(0,Gf.jsxs)(Gf.Fragment,{children:[(0,Gf.jsx)(kN.PanelRow,{children:(0,Gf.jsx)(kN.CheckboxControl,{label:(0,Rve.decodeEntities)(l)||(0,SH.__)("Untitled"),checked:t,onChange:r,className:"entities-saved-states__change-control"})}),c&&(0,Gf.jsx)("ul",{className:"entities-saved-states__changes",children:(0,Gf.jsx)("li",{children:(0,SH.__)("Post Meta.")})})]})}var Yf=a(T(),1);function HKe(e,t){switch(e){case"site":return t===1?(0,wy.__)("This change will affect your whole site."):(0,wy.__)("These changes will affect your whole site.");case"wp_template":return(0,wy.__)("This change will affect other parts of your site that use this template.");case"page":case"post":return(0,wy.__)("The following has been modified.")}}function UKe({record:e}){let{editedRecord:t,savedRecord:r}=(0,_H.useSelect)(n=>{let{getEditedEntityRecord:i,getEntityRecord:s}=n(CH.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=AC(t,r,{maxResults:10});return o.length?(0,Yf.jsx)("ul",{className:"entities-saved-states__changes",children:o.map(n=>(0,Yf.jsx)("li",{children:n},n))}):null}function WKe({record:e,count:t}){if(e?.name==="globalStyles")return null;let r=HKe(e?.name,t);return r?(0,Yf.jsx)(RN.PanelRow,{children:r}):null}function Ive({list:e,unselectedEntities:t,setUnselectedEntities:r}){let o=e.length,n=e[0],s=(0,_H.useSelect)(l=>l(CH.store).getEntityConfig(n.kind,n.name),[n.kind,n.name]).label;return n?.name==="wp_template_part"&&(s=o===1?(0,wy.__)("Template Part"):(0,wy.__)("Template Parts")),(0,Yf.jsxs)(RN.PanelBody,{title:s,initialOpen:!0,className:"entities-saved-states__panel-body",children:[(0,Yf.jsx)(WKe,{record:n,count:o}),e.map(l=>(0,Yf.jsx)(Ave,{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,Yf.jsx)(UKe,{record:n})]})}var Ove=a(G(),1),Nve=a(ee(),1),AN=a(U(),1),IN=()=>{let{editedEntities:e,siteEdits:t,siteEntityConfig:r}=(0,Ove.useSelect)(c=>{let{__experimentalGetDirtyEntityRecords:u,getEntityRecordEdits:d,getEntityConfig:f}=c(Nve.store);return{editedEntities:u(),siteEdits:d("root","site"),siteEntityConfig:f("root","site")}},[]),o=(0,AN.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,AN.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 Wn=a(T(),1);function GKe(e){return e}function ON({close:e,renderDialog:t,variant:r}){let o=IN();return(0,Wn.jsx)(PT,{close:e,renderDialog:t,variant:r,...o})}function PT({additionalPrompt:e=void 0,close:t,onSave:r=GKe,saveEnabled:o=void 0,saveLabel:n=(0,qf.__)("Save"),renderDialog:i,dirtyEntityRecords:s,isDirty:l,setUnselectedEntities:c,unselectedEntities:u,variant:d="default",successNoticeContent:f}){let m=(0,Kw.useRef)(),{saveDirtyEntities:h}=Y((0,Mve.useDispatch)(R)),g=s.reduce((M,B)=>{let{name:N}=B;return M[N]||(M[N]=[]),M[N].push(B),M},{}),{site:v,wp_template:y,wp_template_part:b,...w}=g,S=[v,y,b,...Object.values(w)].filter(Array.isArray),x=o??l,_=(0,Kw.useCallback)(()=>t(),[t]),[P,I]=(0,ET.__experimentalUseDialog)({onClose:()=>_()}),A=(0,ET.useInstanceId)(PT,"entities-saved-states__panel-label"),k=(0,ET.useInstanceId)(PT,"entities-saved-states__panel-description"),D=s.length?(0,qf.__)("Select the items you want to save."):void 0,E=d==="inline",C=(0,Wn.jsxs)(Wn.Fragment,{children:[(0,Wn.jsx)(Kf.FlexItem,{isBlock:!E,as:Kf.Button,variant:E?"tertiary":"secondary",size:E?void 0:"compact",onClick:_,children:(0,qf.__)("Cancel")}),(0,Wn.jsx)(Kf.FlexItem,{isBlock:!E,as:Kf.Button,ref:m,variant:"primary",size:E?void 0:"compact",disabled:!x,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,Wn.jsxs)("div",{ref:i?P:void 0,...i&&I,className:Z("entities-saved-states__panel",{"is-inline":E}),role:i?"dialog":void 0,"aria-labelledby":i?A:void 0,"aria-describedby":i?k:void 0,children:[!E&&(0,Wn.jsx)(Kf.Flex,{className:"entities-saved-states__panel-header",gap:2,children:C}),(0,Wn.jsxs)("div",{className:"entities-saved-states__text-prompt",children:[(0,Wn.jsx)("div",{className:"entities-saved-states__text-prompt--header-wrapper",children:(0,Wn.jsx)("strong",{id:i?A:void 0,className:"entities-saved-states__text-prompt--header",children:(0,qf.__)("Are you ready to save?")})}),(0,Wn.jsxs)("div",{id:i?k:void 0,children:[e,(0,Wn.jsx)("p",{className:"entities-saved-states__text-prompt--changes-count",children:l?(0,Kw.createInterpolateElement)((0,qf.sprintf)((0,qf._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,Wn.jsx)("strong",{})}):D})]})]}),S.map(M=>(0,Wn.jsx)(Ive,{list:M,unselectedEntities:u,setUnselectedEntities:c},M[0].name)),E&&(0,Wn.jsx)(Kf.Flex,{direction:"row",justify:"flex-end",className:"entities-saved-states__panel-footer",children:C})]})}var Fve=a(U(),1),NN=a(j(),1),Sy=a(W(),1),Lve=a(G(),1),Bve=a(_e(),1),Vve=a(xn(),1);var Ch=a(T(),1);function YKe(){try{return(0,Lve.select)(R).getEditedPostContent()}catch{}}function Dve({text:e,children:t,variant:r="secondary"}){let o=(0,Bve.useCopyToClipboard)(e);return(0,Ch.jsx)(Sy.Button,{__next40pxDefaultSize:!0,variant:r,ref:o,children:t})}var qKe=class extends Fve.Component{constructor(){super(...arguments),this.state={error:null}}componentDidCatch(e){(0,Vve.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,Ch.jsxs)(Sy.__experimentalHStack,{className:"editor-error-boundary",alignment:"baseline",spacing:4,justify:"space-between",expanded:!1,wrap:!0,children:[(0,Ch.jsx)(Sy.__experimentalText,{as:"p",children:(0,NN.__)("The editor has encountered an unexpected error.")}),(0,Ch.jsxs)(Sy.__experimentalHStack,{expanded:!1,children:[t&&(0,Ch.jsx)(Dve,{text:YKe,children:(0,NN.__)("Copy contents")}),(0,Ch.jsx)(Dve,{variant:"primary",text:e?.stack,children:(0,NN.__)("Copy error")})]})]}):this.props.children}},jve=qKe;var Zf=a(U(),1),RT=a(_e(),1),Xf=a(G(),1),TH=a(j(),1),zve=a(bt(),1),Hve=a(xt(),1);var Uve=a(T(),1),KKe=window.requestIdleCallback?window.requestIdleCallback:window.requestAnimationFrame,kT,ZKe=()=>{if(kT!==void 0)return kT;try{window.sessionStorage.setItem("__wpEditorTestSessionStorage",""),window.sessionStorage.removeItem("__wpEditorTestSessionStorage"),kT=!0}catch{kT=!1}return kT};function XKe(){let{postId:e,isEditedPostNew:t,hasRemoteAutosave:r}=(0,Xf.useSelect)(c=>({postId:c(R).getCurrentPostId(),isEditedPostNew:c(R).isEditedPostNew(),hasRemoteAutosave:!!c(R).getEditorSettings().autosave}),[]),{getEditedPostAttribute:o}=(0,Xf.useSelect)(R),{createWarningNotice:n,removeNotice:i}=(0,Xf.useDispatch)(Hve.store),{editPost:s,resetEditorBlocks:l}=(0,Xf.useDispatch)(R);(0,Zf.useEffect)(()=>{let c=WG(e,t);if(!c)return;try{c=JSON.parse(c)}catch{return}let{post_title:u,content:d,excerpt:f}=c,m={title:u,content:d,excerpt:f};if(!Object.keys(m).some(v=>m[v]!==o(v))){Vk(e,t);return}if(r)return;let h="wpEditorAutosaveRestore";n((0,TH.__)("The backup of this post in your browser is different from the version below."),{id:h,actions:[{label:(0,TH.__)("Restore the backup"),onClick(){let{content:g,...v}=m;s(v),l((0,zve.parse)(m.content)),i(h)}}]})},[t,e])}function QKe(){let{postId:e,isEditedPostNew:t,isDirty:r,isAutosaving:o,didError:n}=(0,Xf.useSelect)(u=>({postId:u(R).getCurrentPostId(),isEditedPostNew:u(R).isEditedPostNew(),isDirty:u(R).isEditedPostDirty(),isAutosaving:u(R).isAutosavingPost(),didError:u(R).didPostSaveRequestFail()}),[]),i=(0,Zf.useRef)(r),s=(0,Zf.useRef)(o);(0,Zf.useEffect)(()=>{!n&&(s.current&&!o||i.current&&!r)&&Vk(e,t),i.current=r,s.current=o},[r,o,n]);let l=(0,RT.usePrevious)(t),c=(0,RT.usePrevious)(e);(0,Zf.useEffect)(()=>{c===e&&l&&!t&&Vk(e,!0)},[t,e])}function JKe(){let{autosave:e}=(0,Xf.useDispatch)(R),t=(0,Zf.useCallback)(()=>{KKe(()=>e({local:!0}))},[]);XKe(),QKe();let r=(0,Xf.useSelect)(o=>o(R).getEditorSettings().localAutosaveInterval,[]);return(0,Uve.jsx)($5,{interval:r,autosave:t})}var Wve=(0,RT.ifCondition)(ZKe)(JKe);var Gve=a(G(),1),Yve=a(ee(),1);function $Ke({children:e}){return(0,Gve.useSelect)(r=>{let{getEditedPostAttribute:o}=r(R),{getPostType:n}=r(Yve.store);return!!n(o("type"))?.supports?.["page-attributes"]},[])?e:null}var Zw=$Ke;var EH=a(j(),1),Qw=a(W(),1),MN=a(G(),1),Zve=a(U(),1);var qve=a(G(),1),Kve=a(ee(),1);function eZe(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 tZe({children:e,supportKeys:t}){let r=(0,qve.useSelect)(n=>{let{getEditedPostAttribute:i}=n(R),{getPostType:s}=n(Kve.store);return s(i("type"))},[]),o=!!r;return r&&(o=(Array.isArray(t)?t:[t]).some(n=>eZe(r.supports,n))),o?e:null}var Xr=tZe;var Xw=a(T(),1);function rZe(){let e=(0,MN.useSelect)(s=>s(R).getEditedPostAttribute("menu_order")??0,[]),{editPost:t}=(0,MN.useDispatch)(R),[r,o]=(0,Zve.useState)(null),n=s=>{o(s);let l=Number(s);Number.isInteger(l)&&s.trim?.()!==""&&t({menu_order:l})},i=r??e;return(0,Xw.jsx)(Qw.Flex,{children:(0,Xw.jsx)(Qw.FlexBlock,{children:(0,Xw.jsx)(Qw.__experimentalNumberControl,{__next40pxDefaultSize:!0,label:(0,EH.__)("Order"),help:(0,EH.__)("Set the page order."),value:i,onChange:n,hideLabelFromVision:!0,onBlur:()=>{o(null)}})})})}function Xve(){return(0,Xw.jsx)(Xr,{supportKeys:"page-attributes",children:(0,Xw.jsx)(rZe,{})})}var lye=a(G(),1),cye=a(ee(),1);var kH=a(s1(),1),fa=a(j(),1),Th=a(W(),1),rye=a(_e(),1),ud=a(U(),1),$w=a(G(),1),AH=a(Ot(),1),FN=a(ee(),1),oye=a(he(),1),nye=a(vo(),1);var Qve=a(W(),1),Jve=a(U(),1),AT=a(T(),1),oZe=(0,Jve.forwardRef)(({className:e,label:t,children:r},o)=>(0,AT.jsxs)(Qve.__experimentalHStack,{className:Z("editor-post-panel__row",e),ref:o,children:[t&&(0,AT.jsx)("div",{className:"editor-post-panel__row-label",children:t}),(0,AT.jsx)("div",{className:"editor-post-panel__row-control",children:r})]})),Gt=oZe;var $ve=a(Ot(),1);function DN(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 Jw=e=>(0,$ve.decodeEntities)(e),PH=e=>({...e,name:Jw(e.name)}),eye=e=>(e??[]).map(PH);var da=a(T(),1);function RH(e){return e?.title?.rendered?(0,AH.decodeEntities)(e.title.rendered):`#${e.id} (${(0,fa.__)("no title")})`}var tye=(e,t)=>{let r=(0,kH.default)(e||"").toLowerCase(),o=(0,kH.default)(t||"").toLowerCase();return r===o?0:r.startsWith(o)?r.length:1/0};function iye(){let{editPost:e}=(0,$w.useDispatch)(R),[t,r]=(0,ud.useState)(""),{isHierarchical:o,parentPostId:n,parentPostTitle:i,pageItems:s,isLoading:l}=(0,$w.useSelect)(f=>{let{getPostType:m,getEntityRecords:h,getEntityRecord:g,isResolving:v}=f(FN.store),{getCurrentPostId:y,getEditedPostAttribute:b}=f(R),w=b("type"),S=b("parent"),x=m(w),_=y(),P=x?.hierarchical??!1,I={per_page:100,exclude:_,parent_exclude:_,orderby:"menu_order",order:"asc",_fields:"id,title,parent"};t&&(I.search=t,I.orderby="relevance");let A=S?g("postType",w,S):null;return{isHierarchical:P,parentPostId:S,parentPostTitle:A?RH(A):"",pageItems:P?h("postType",w,I):null,isLoading:P?v("getEntityRecords",["postType",w,I]):!1}},[t]),c=(0,ud.useMemo)(()=>{let f=(v,y=0)=>v.map(S=>[{value:S.id,label:"\u2014 ".repeat(y)+(0,AH.decodeEntities)(S.name),rawName:S.name},...f(S.children||[],y+1)]).sort(([S],[x])=>{let _=tye(S.rawName,t),P=tye(x.rawName,t);return _>=P?1:-1}).flat();if(!s)return[];let m=s.map(v=>({id:v.id,parent:v.parent,name:RH(v)}));t||(m=DN(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,da.jsx)(Th.ComboboxControl,{__next40pxDefaultSize:!0,className:"editor-page-attributes__parent",label:(0,fa.__)("Parent"),help:(0,fa.__)("Choose a parent page."),value:n,options:c,onFilterValueChange:(0,rye.debounce)(u,300),onChange:d,hideLabelFromVision:!0,isLoading:l})}function nZe({isOpen:e,onClick:t}){let r=(0,$w.useSelect)(n=>{let{getEditedPostAttribute:i}=n(R),s=i("parent");if(!s)return null;let{getEntityRecord:l}=n(FN.store),c=i("type");return l("postType",c,s)},[]),o=(0,ud.useMemo)(()=>r?RH(r):(0,fa.__)("None"),[r]);return(0,da.jsx)(Th.Button,{size:"compact",className:"editor-post-parent__panel-toggle",variant:"tertiary","aria-expanded":e,"aria-label":(0,fa.sprintf)((0,fa.__)("Change parent: %s"),o),onClick:t,children:o})}function sye(){let e=(0,$w.useSelect)(n=>n(FN.store).getEntityRecord("root","__unstableBase")?.home,[]),[t,r]=(0,ud.useState)(null),o=(0,ud.useMemo)(()=>({anchor:t,placement:"left-start",offset:36,shift:!0}),[t]);return(0,da.jsx)(Gt,{label:(0,fa.__)("Parent"),ref:r,children:(0,da.jsx)(Th.Dropdown,{popoverProps:o,className:"editor-post-parent__panel-dropdown",contentClassName:"editor-post-parent__panel-dialog",focusOnMount:!0,renderToggle:({isOpen:n,onToggle:i})=>(0,da.jsx)(nZe,{isOpen:n,onClick:i}),renderContent:({onClose:n})=>(0,da.jsxs)("div",{className:"editor-post-parent",children:[(0,da.jsx)(oye.__experimentalInspectorPopoverHeader,{title:(0,fa.__)("Parent"),onClose:n}),(0,da.jsxs)("div",{children:[(0,ud.createInterpolateElement)((0,fa.sprintf)((0,fa.__)('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,nye.filterURLForDisplay)(e).replace(/([/.])/g,"<wbr />$1")),{wbr:(0,da.jsx)("wbr",{})}),(0,da.jsx)("p",{children:(0,ud.createInterpolateElement)((0,fa.__)("They also show up as sub-items in the default navigation menu. <a>Learn more.</a>"),{a:(0,da.jsx)(Th.ExternalLink,{href:(0,fa.__)("https://wordpress.org/documentation/article/page-post-settings-sidebar/#page-attributes")})})})]}),(0,da.jsx)(iye,{})]})})})}var aye=iye;var LN=a(T(),1),iZe="page-attributes";function sZe(){let{isEnabled:e,postType:t}=(0,lye.useSelect)(r=>{let{getEditedPostAttribute:o,isEditorPanelEnabled:n}=r(R),{getPostType:i}=r(cye.store);return{isEnabled:n(iZe),postType:i(o("type"))}},[]);return!e||!t?null:(0,LN.jsx)(sye,{})}function BN(){return(0,LN.jsx)(Zw,{children:(0,LN.jsx)(sZe,{})})}var jl=a(j(),1),Jf=a(W(),1),tS=a(G(),1),MH=a(ee(),1),fye=a(he(),1),rS=a(U(),1);var mye=a(xt(),1);var VN=a(G(),1),OH=a(U(),1),Vc=a(bt(),1),jc=a(W(),1),xy=a(j(),1);var Qf=a(T(),1),IH=(0,xy.__)("Custom Template");function Eh({onClose:e}){let{defaultBlockTemplate:t,onNavigateToEntityRecord:r}=(0,VN.useSelect)(d=>{let{getEditorSettings:f,getCurrentTemplateId:m}=d(R);return{defaultBlockTemplate:f().defaultBlockTemplate,onNavigateToEntityRecord:f().onNavigateToEntityRecord,getTemplateId:m}}),{createTemplate:o}=Y((0,VN.useDispatch)(R)),[n,i]=(0,OH.useState)(""),[s,l]=(0,OH.useState)(!1),c=()=>{i(""),e()},u=async d=>{if(d.preventDefault(),s)return;l(!0);let f=t??(0,Vc.serialize)([(0,Vc.createBlock)("core/group",{tagName:"header",layout:{inherit:!0}},[(0,Vc.createBlock)("core/site-title"),(0,Vc.createBlock)("core/site-tagline")]),(0,Vc.createBlock)("core/separator"),(0,Vc.createBlock)("core/group",{tagName:"main"},[(0,Vc.createBlock)("core/group",{layout:{inherit:!0}},[(0,Vc.createBlock)("core/post-title")]),(0,Vc.createBlock)("core/post-content",{layout:{inherit:!0}})])]),m=await o({slug:Hg(n||IH)||"wp-custom-template",content:f,title:n||IH,status:"publish"});l(!1),r({postId:m.id,postType:"wp_template"}),c()};return(0,Qf.jsx)(jc.Modal,{title:(0,xy.__)("Create custom template"),onRequestClose:c,focusOnMount:"firstContentElement",size:"small",overlayClassName:"editor-post-template__create-template-modal",children:(0,Qf.jsx)("form",{onSubmit:u,children:(0,Qf.jsxs)(jc.__experimentalVStack,{spacing:"3",children:[(0,Qf.jsx)(jc.TextControl,{__next40pxDefaultSize:!0,label:(0,xy.__)("Name"),value:n,onChange:i,placeholder:IH,disabled:s,help:(0,xy.__)('Describe the template, e.g. "Post with sidebar". A custom template can be manually applied to any post or page.')}),(0,Qf.jsxs)(jc.__experimentalHStack,{justify:"right",children:[(0,Qf.jsx)(jc.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:c,children:(0,xy.__)("Cancel")}),(0,Qf.jsx)(jc.Button,{__next40pxDefaultSize:!0,variant:"primary",type:"submit",isBusy:s,"aria-disabled":s,children:(0,xy.__)("Create")})]})]})})})}var _y=a(G(),1),uye=a(U(),1),Ph=a(ee(),1),jN=a(j(),1);function Cy(){return(0,_y.useSelect)(e=>{let{getCurrentPostId:t,getCurrentPostType:r}=e(R);return{postId:t(),postType:r()}},[])}function Ty(){let{postType:e,postId:t}=Cy();return(0,_y.useSelect)(r=>{let{canUser:o,getEntityRecord:n,getEntityRecords:i}=r(Ph.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 dye(e){return(0,_y.useSelect)(t=>t(Ph.store).getEntityRecords("postType","wp_template",{per_page:-1,post_type:e}),[e])}function IT(){let{postType:e,postId:t}=Cy(),[r]=(0,Ph.useEntityProp)("postType",e,"slug",t),o=NH(),n=Ty(),i=dye(e),s=(0,_y.useSelect)(l=>{if(!window?.__experimentalDataFormInspector||!o)return null;let{getDefaultTemplateId:c,getEntityRecord:u}=l(Ph.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,uye.useMemo)(()=>n&&[...(i||[]).filter(l=>l.is_custom&&l.slug!==o&&!!l.content.raw),s&&{...s,title:{rendered:(0,jN.sprintf)((0,jN.__)("%s (default)"),s.title.rendered)},isDefault:!0}].filter(Boolean),[i,s,o,n])}function eS(){return(0,_y.useSelect)(e=>{let{getEditorSettings:t,getCurrentTemplateId:r,getCurrentPostType:o}=e(R),{getPostType:n,canUser:i}=e(Ph.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 NH(){let{postType:e,postId:t}=Cy(),r=dye(e),o=(0,_y.useSelect)(n=>n(Ph.store).getEditedEntityRecord("postType",e,t)?.template,[e,t]);if(o)return r?.find(n=>n.slug===o)?.slug}var ma=a(T(),1);function aZe({isOpen:e,onClick:t}){let r=(0,tS.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(MH.store).canUser("create",{kind:"postType",name:"wp_template"})&&o(R).getCurrentTemplateId();return l?.title||l?.slug||s?.[n]},[]);return(0,ma.jsx)(Jf.Button,{__next40pxDefaultSize:!0,variant:"tertiary","aria-expanded":e,"aria-label":(0,jl.__)("Template options"),onClick:t,children:r??(0,jl.__)("Default template")})}function lZe({onClose:e}){let t=Ty(),{availableTemplates:r,fetchedTemplates:o,selectedTemplateSlug:n,canCreate:i,canEdit:s,currentTemplateId:l,onNavigateToEntityRecord:c,getEditorSettings:u}=(0,tS.useSelect)(y=>{let{canUser:b,getEntityRecords:w}=y(MH.store),S=y(R).getEditorSettings(),x=b("create",{kind:"postType",name:"wp_template"}),_=y(R).getCurrentTemplateId();return{availableTemplates:S.availableTemplates,fetchedTemplates:x?w("postType","wp_template",{post_type:y(R).getCurrentPostType(),per_page:-1}):void 0,selectedTemplateSlug:y(R).getEditedPostAttribute("template"),canCreate:t&&x&&S.supportsTemplateMode,canEdit:t&&x&&S.supportsTemplateMode&&!!_,currentTemplateId:_,onNavigateToEntityRecord:S.onNavigateToEntityRecord,getEditorSettings:y(R).getEditorSettings}},[t]),d=(0,rS.useMemo)(()=>Object.entries({...r,...Object.fromEntries((o??[]).map(({slug:y,title:b})=>[y,b.rendered]))}).map(([y,b])=>({value:y,label:b})),[r,o]),f=d.find(y=>y.value===n)??d.find(y=>!y.value),{editPost:m}=(0,tS.useDispatch)(R),{createSuccessNotice:h}=(0,tS.useDispatch)(mye.store),[g,v]=(0,rS.useState)(!1);return(0,ma.jsxs)("div",{className:"editor-post-template__classic-theme-dropdown",children:[(0,ma.jsx)(fye.__experimentalInspectorPopoverHeader,{title:(0,jl.__)("Template"),help:(0,jl.__)("Templates define the way content is displayed when viewing your site."),actions:i?[{icon:r3,label:(0,jl.__)("Add template"),onClick:()=>v(!0)}]:[],onClose:e}),t?(0,ma.jsx)(Jf.SelectControl,{__next40pxDefaultSize:!0,hideLabelFromVision:!0,label:(0,jl.__)("Template"),value:f?.value??"",options:d,onChange:y=>m({template:y||""})}):(0,ma.jsx)(Jf.Notice,{status:"warning",isDismissible:!1,children:(0,jl.__)("The posts page template cannot be changed.")}),s&&c&&(0,ma.jsx)("p",{children:(0,ma.jsx)(Jf.Button,{__next40pxDefaultSize:!0,variant:"link",onClick:()=>{c({postId:l,postType:"wp_template"}),e(),h((0,jl.__)("Editing template. Changes made here affect all posts and pages that use the template."),{type:"snackbar",actions:[{label:(0,jl.__)("Go back"),onClick:()=>u().onNavigateToPreviousEntityRecord()}]})},children:(0,jl.__)("Edit template")})}),g&&(0,ma.jsx)(Eh,{onClose:()=>v(!1)})]})}function cZe(){let[e,t]=(0,rS.useState)(null),r=(0,rS.useMemo)(()=>({anchor:e,className:"editor-post-template__dropdown",placement:"left-start",offset:36,shift:!0}),[e]);return(0,ma.jsx)(Gt,{label:(0,jl.__)("Template"),ref:t,children:(0,ma.jsx)(Jf.Dropdown,{popoverProps:r,focusOnMount:!0,renderToggle:({isOpen:o,onToggle:n})=>(0,ma.jsx)(aZe,{isOpen:o,onClick:n}),renderContent:({onClose:o})=>(0,ma.jsx)(lZe,{onClose:o})})})}var zN=cZe;var WN=a(W(),1),yye=a(zp(),1),GN=a(G(),1),bye=a(U9(),1);var gye=a(W(),1);var HN=a(G(),1),pye=a(Rt(),1);var hye=a(T(),1),{PreferenceBaseOption:uZe}=Y(pye.privateApis);function kh(e){let{toggleEditorPanelEnabled:t}=(0,HN.useDispatch)(R),{isChecked:r,isRemoved:o}=(0,HN.useSelect)(n=>{let{isEditorPanelEnabled:i,isEditorPanelRemoved:s}=n(R);return{isChecked:i(e.panelName),isRemoved:s(e.panelName)}},[e.panelName]);return o?null:(0,hye.jsx)(uZe,{isChecked:r,onChange:()=>t(e.panelName),...e})}var DH=a(T(),1),{Fill:dZe,Slot:fZe}=(0,gye.createSlotFill)("EnablePluginDocumentSettingPanelOption"),vye=({label:e,panelName:t})=>(0,DH.jsx)(dZe,{children:(0,DH.jsx)(kh,{label:e,panelName:t})});vye.Slot=fZe;var UN=vye;var Rh=a(T(),1),{Fill:mZe,Slot:pZe}=(0,WN.createSlotFill)("PluginDocumentSettingPanel"),wye=({name:e,className:t,title:r,icon:o,children:n})=>{let{name:i}=(0,yye.usePluginContext)(),s=`${i}/${e}`,{opened:l,isEnabled:c}=(0,GN.useSelect)(d=>{let{isEditorPanelOpened:f,isEditorPanelEnabled:m}=d(R);return{opened:f(s),isEnabled:m(s)}},[s]),{toggleEditorPanelOpened:u}=(0,GN.useDispatch)(R);return e===void 0&&(0,bye.default)("PluginDocumentSettingPanel requires a name property."),(0,Rh.jsxs)(Rh.Fragment,{children:[(0,Rh.jsx)(UN,{label:r,panelName:s}),(0,Rh.jsx)(mZe,{children:c&&(0,Rh.jsx)(WN.PanelBody,{className:t,title:r,icon:o,opened:l,onToggle:()=>u(s),children:n})})]})};wye.Slot=pZe;var YN=wye;var Sye=a(he(),1),xye=a(W(),1),_ye=a(_e(),1),FH=a(T(),1),hZe=(e,t)=>e.filter(r=>!t.includes(r)).length===0,gZe=(e,t)=>!Array.isArray(t)||hZe(e,t),vZe=({allowedBlocks:e,icon:t,label:r,onClick:o,small:n,role:i})=>(0,FH.jsx)(Sye.BlockSettingsMenuControls,{children:({selectedBlocks:s,onClose:l})=>gZe(s,e)?(0,FH.jsx)(xye.MenuItem,{onClick:(0,_ye.compose)(o,l),icon:t,label:n?r:void 0,role:i,children:!n&&r}):null}),Cye=vZe;var Tye=a(W(),1),Eye=a(zp(),1);var Pye=a(T(),1);function kye(e){let t=(0,Eye.usePluginContext)();return(0,Pye.jsx)(Cl,{name:"core/plugin-more-menu",as:e.as??Tye.MenuItem,icon:e.icon||t.icon,...e})}var Rye=a(zp(),1),qN=a(W(),1),LH=a(T(),1),{Fill:yZe,Slot:bZe}=(0,qN.createSlotFill)("PluginPostPublishPanel"),Aye=({children:e,className:t,title:r,initialOpen:o=!1,icon:n})=>{let{icon:i}=(0,Rye.usePluginContext)();return(0,LH.jsx)(yZe,{children:(0,LH.jsx)(qN.PanelBody,{className:t,initialOpen:o||!r,title:r,icon:n??i,children:e})})};Aye.Slot=bZe;var KN=Aye;var ZN=a(W(),1),BH=a(T(),1),{Fill:wZe,Slot:SZe}=(0,ZN.createSlotFill)("PluginPostStatusInfo"),Iye=({children:e,className:t})=>(0,BH.jsx)(wZe,{children:(0,BH.jsx)(ZN.PanelRow,{className:t,children:e})});Iye.Slot=SZe;var XN=Iye;var QN=a(W(),1),Oye=a(zp(),1),VH=a(T(),1),{Fill:xZe,Slot:_Ze}=(0,QN.createSlotFill)("PluginPrePublishPanel"),Nye=({children:e,className:t,title:r,initialOpen:o=!1,icon:n})=>{let{icon:i}=(0,Oye.usePluginContext)();return(0,VH.jsx)(xZe,{children:(0,VH.jsx)(QN.PanelBody,{className:t,initialOpen:o||!r,title:r,icon:n??i,children:e})})};Nye.Slot=_Ze;var JN=Nye;var Mye=a(W(),1),Dye=a(zp(),1);var Fye=a(T(),1);function Lye(e){let t=(0,Dye.usePluginContext)();return(0,Fye.jsx)(Cl,{name:"core/plugin-preview-menu",as:e.as??Mye.MenuItem,icon:e.icon||t.icon,...e})}var Bye=a(T(),1);function Ey({className:e,...t}){return(0,Bye.jsx)(El,{panelClassName:e,className:"editor-sidebar",scope:"core",...t})}var Vye=a(T(),1);function jye(e){return(0,Vye.jsx)(Up,{__unstableExplicitMenuItem:!0,scope:"core",...e})}var $f=a(G(),1),lbe=a(Ot(),1),Ah=a(W(),1),$N=a(U(),1),ky=a(j(),1),sS=a(ee(),1);var cbe=a(xt(),1),ube=a(Rt(),1);var nS=a(U(),1),Wye=a(Ot(),1),Gye=a(he(),1),iS=a(W(),1),oS=a(j(),1),Yye=a(G(),1),qye=a(ee(),1),Kye=a(bt(),1);var Hye=a(s1(),1);function zye(e=""){return e=(0,Hye.default)(e),e=e.trim().toLowerCase(),e}function CZe(e,t){let r=zye(t),o=zye(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 Uye(e=[],t=""){if(!t)return e;let r=e.map(o=>[o,CZe(o,t)]).filter(([,o])=>o>0);return r.sort(([,o],[,n])=>n-o),r.map(([o])=>o)}var pa=a(T(),1);function jH({onRequestClose:e,onSelect:t}){let{postType:r,postId:o}=Cy(),{editEntityRecord:n}=(0,Yye.useDispatch)(qye.store),i=async s=>{n("postType",r,o,{template:s.isDefault?"":s.name},{undoIgnore:!0}),e(),t?.()};return(0,pa.jsx)(iS.Modal,{title:(0,oS.__)("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)(TZe,{onSelect:i})})})}function Zye({onClick:e}){let[t,r]=(0,nS.useState)(!1),o=IT();return(0,pa.jsxs)(pa.Fragment,{children:[(0,pa.jsx)(iS.MenuItem,{disabled:!o?.length,accessibleWhenDisabled:!0,onClick:()=>r(!0),children:(0,oS.__)("Change template")}),t&&(0,pa.jsx)(jH,{onRequestClose:()=>r(!1),onSelect:e})]})}function TZe({onSelect:e}){let[t,r]=(0,nS.useState)(""),o=IT(),n=(0,nS.useMemo)(()=>o.map(s=>({name:s.slug,blocks:(0,Kye.parse)(s.content.raw),title:(0,Wye.decodeEntities)(s.title.rendered),id:s.id,isDefault:s.isDefault})),[o]),i=(0,nS.useMemo)(()=>Uye(n,t),[n,t]);return(0,pa.jsxs)(pa.Fragment,{children:[(0,pa.jsx)(iS.SearchControl,{onChange:r,value:t,label:(0,oS.__)("Search"),placeholder:(0,oS.__)("Search"),className:"editor-post-template__swap-template-search"}),(0,pa.jsx)(Gye.__experimentalBlockPatternsList,{label:(0,oS.__)("Templates"),blockPatterns:i,onClickPattern:e})]})}var Xye=a(W(),1),Qye=a(j(),1),Jye=a(G(),1),$ye=a(ee(),1);var ebe=a(T(),1);function tbe({onClick:e}){let t=NH(),r=Ty(),{postType:o,postId:n}=Cy(),{editEntityRecord:i}=(0,Jye.useDispatch)($ye.store);return!t||!r?null:(0,ebe.jsx)(Xye.MenuItem,{onClick:()=>{i("postType",o,n,{template:""},{undoIgnore:!0}),e()},children:(0,Qye.__)("Use default template")})}var rbe=a(W(),1),obe=a(j(),1),nbe=a(G(),1),ibe=a(ee(),1),sbe=a(U(),1);var Py=a(T(),1);function abe(){let{canCreateTemplates:e}=(0,nbe.useSelect)(n=>{let{canUser:i}=n(ibe.store);return{canCreateTemplates:i("create",{kind:"postType",name:"wp_template"})}},[]),[t,r]=(0,sbe.useState)(!1),o=Ty();return!e||!o?null:(0,Py.jsxs)(Py.Fragment,{children:[(0,Py.jsx)(rbe.MenuItem,{onClick:()=>{r(!0)},children:(0,obe.__)("Create new template")}),t&&(0,Py.jsx)(Eh,{onClose:()=>{r(!1)}})]})}var ha=a(T(),1);function dbe(){let{isTemplateHidden:e,onNavigateToEntityRecord:t,getEditorSettings:r,hasGoBack:o,hasSpecificTemplate:n,id:i}=(0,$f.useSelect)(x=>{let{getRenderingMode:_,getEditorSettings:P,getCurrentPost:I,getCurrentTemplateId:A}=Y(x(R)),k=P(),D=I();return{isTemplateHidden:_()==="post-only",onNavigateToEntityRecord:k.onNavigateToEntityRecord,getEditorSettings:P,hasGoBack:k.hasOwnProperty("onNavigateToPreviousEntityRecord"),hasSpecificTemplate:!!D.template,id:A()}},[]),{get:s}=(0,$f.useSelect)(ube.store),{editedRecord:l,hasResolved:c}=(0,sS.useEntityRecord)("postType","wp_template",i),{getEntityRecord:u}=(0,$f.useSelect)(sS.store),{editEntityRecord:d}=(0,$f.useDispatch)(sS.store),{createSuccessNotice:f}=(0,$f.useDispatch)(cbe.store),{setRenderingMode:m,setDefaultRenderingMode:h}=Y((0,$f.useDispatch)(R)),g=(0,$f.useSelect)(x=>!!x(sS.store).canUser("create",{kind:"postType",name:"wp_template"}),[]),[v,y]=(0,$N.useState)(null),b=(0,$N.useMemo)(()=>({anchor:v,className:"editor-post-template__dropdown",placement:"left-start",offset:36,shift:!0}),[v]);if(!c)return null;let w=o?[{label:(0,ky.__)("Go back"),onClick:()=>r().onNavigateToPreviousEntityRecord()}]:void 0,S=()=>{s("core/edit-site","welcomeGuideTemplate")||f((0,ky.__)("Editing template. Changes made here affect all posts and pages that use the template."),{type:"snackbar",actions:w})};return(0,ha.jsx)(Gt,{label:(0,ky.__)("Template"),ref:y,children:(0,ha.jsx)(Ah.DropdownMenu,{popoverProps:b,focusOnMount:!0,toggleProps:{size:"compact",variant:"tertiary",tooltipPosition:"middle left"},label:(0,ky.__)("Template options"),text:(0,lbe.decodeEntities)(l.title),icon:null,children:({onClose:x})=>(0,ha.jsxs)(ha.Fragment,{children:[(0,ha.jsxs)(Ah.MenuGroup,{children:[g&&(0,ha.jsx)(Ah.MenuItem,{onClick:async()=>{if(t({postId:l.id,postType:"wp_template"}),!n&&window?.__experimentalTemplateActivate){let _=await u("root","site").active_templates;_[l.slug]!==l.id&&d("root","site",void 0,{active_templates:{..._,[l.slug]:l.id}})}x(),S()},children:(0,ky.__)("Edit template")}),(0,ha.jsx)(Zye,{onClick:x}),(0,ha.jsx)(tbe,{onClick:x}),g&&(0,ha.jsx)(abe,{})]}),(0,ha.jsx)(Ah.MenuGroup,{children:(0,ha.jsx)(Ah.MenuItem,{icon:e?void 0:Qn,isSelected:!e,role:"menuitemcheckbox",onClick:()=>{let _=e?"template-locked":"post-only";m(_),h(_)},children:(0,ky.__)("Show template")})})]})})})}var zH=a(T(),1);function eM(){let e=eS();return e==="classic"?(0,zH.jsx)(zN,{}):e==="block-theme"?(0,zH.jsx)(dbe,{}):null}var kbe=a(G(),1),Rbe=a(ee(),1);var gbe=a(_e(),1),vbe=a(U(),1),ybe=a(G(),1),bbe=a(j(),1),wbe=a(W(),1);var fbe=a(j(),1),mbe=a(U(),1),pbe=a(G(),1),HH=a(Ot(),1),hbe=a(ee(),1);var OT={_fields:"id,name",context:"view"},tM={who:"authors",per_page:100,...OT};function rM(e){let{authorId:t,authors:r,postAuthor:o,isLoading:n}=(0,pbe.useSelect)(s=>{let{getUser:l,getUsers:c,isResolving:u}=s(hbe.store),{getEditedPostAttribute:d}=s(R),f=d("author"),m={...tM};return e&&(m.search=e,m.search_columns=["name"]),{authorId:f,authors:c(m),postAuthor:l(f,OT),isLoading:u("getUsers",[m])}},[e]),i=(0,mbe.useMemo)(()=>{let s=(r??[]).map(u=>({value:u.id,label:(0,HH.decodeEntities)(u.name)})),l=s.findIndex(({value:u})=>o?.id===u),c=[];return l<0&&o?c=[{value:o.id,label:(0,HH.decodeEntities)(o.name)}]:l<0&&!o&&(c=[{value:0,label:(0,fbe.__)("(No author)")}]),[...c,...s]},[r,o]);return{authorId:t,authorOptions:i,postAuthor:o,isLoading:n}}var Sbe=a(T(),1);function xbe(){let[e,t]=(0,vbe.useState)(),{editPost:r}=(0,ybe.useDispatch)(R),{authorId:o,authorOptions:n,isLoading:i}=rM(e),s=l=>{l&&r({author:l})};return(0,Sbe.jsx)(wbe.ComboboxControl,{__next40pxDefaultSize:!0,label:(0,bbe.__)("Author"),options:n,value:o,onFilterValueChange:(0,gbe.debounce)(t,300),onChange:s,allowReset:!1,hideLabelFromVision:!0,isLoading:i})}var _be=a(j(),1),Cbe=a(G(),1),Tbe=a(W(),1);var Ebe=a(T(),1);function Pbe(){let{editPost:e}=(0,Cbe.useDispatch)(R),{authorId:t,authorOptions:r}=rM(),o=n=>{let i=Number(n);e({author:i})};return(0,Ebe.jsx)(Tbe.SelectControl,{__next40pxDefaultSize:!0,className:"post-author-selector",label:(0,_be.__)("Author"),options:r,onChange:o,value:t,hideLabelFromVision:!0})}var UH=a(T(),1),EZe=25;function PZe(){return(0,kbe.useSelect)(t=>t(Rbe.store).getUsers(tM)?.length>=EZe,[])?(0,UH.jsx)(xbe,{}):(0,UH.jsx)(Pbe,{})}var oM=PZe;var Abe=a(G(),1);var Ibe=a(T(),1);function nM({children:e}){let{hasAssignAuthorAction:t}=(0,Abe.useSelect)(r=>({hasAssignAuthorAction:!!r(R).getCurrentPost()?._links?.["wp:action-assign-author"]}),[]);return t?(0,Ibe.jsx)(Xr,{supportKeys:"author",children:e}):null}var Ry=a(j(),1),iM=a(W(),1),sM=a(U(),1),Obe=a(Ot(),1),Nbe=a(he(),1),Mbe=a(G(),1),Dbe=a(ee(),1);var dd=a(T(),1);function kZe({isOpen:e,onClick:t}){let{postAuthor:r}=(0,Mbe.useSelect)(n=>{let i=n(R).getEditedPostAttribute("author");return{postAuthor:n(Dbe.store).getUser(i,OT)}},[]),o=(0,Obe.decodeEntities)(r?.name)||(0,Ry.__)("(No author)");return(0,dd.jsx)(iM.Button,{size:"compact",variant:"tertiary","aria-expanded":e,"aria-label":(0,Ry.sprintf)((0,Ry.__)("Change author: %s"),o),onClick:t,children:o})}function RZe(){let[e,t]=(0,sM.useState)(null),r=(0,sM.useMemo)(()=>({anchor:e,placement:"left-start",offset:36,shift:!0}),[e]);return(0,dd.jsx)(nM,{children:(0,dd.jsx)(Gt,{label:(0,Ry.__)("Author"),ref:t,children:(0,dd.jsx)(iM.Dropdown,{popoverProps:r,contentClassName:"editor-post-author__panel-dialog",focusOnMount:!0,renderToggle:({isOpen:o,onToggle:n})=>(0,dd.jsx)(kZe,{isOpen:o,onClick:n}),renderContent:({onClose:o})=>(0,dd.jsxs)("div",{className:"editor-post-author",children:[(0,dd.jsx)(Nbe.__experimentalInspectorPopoverHeader,{title:(0,Ry.__)("Author"),onClose:o}),(0,dd.jsx)(oM,{onClose:o})]})})})})}var aM=RZe;var Ih=a(j(),1),cM=a(W(),1),uM=a(G(),1);var lM=a(T(),1),AZe=[{label:(0,Ih._x)("Open",'Adjective: e.g. "Comments are open"'),value:"open",description:(0,Ih.__)("Visitors can add new comments and replies.")},{label:(0,Ih.__)("Closed"),value:"closed",description:[(0,Ih.__)("Visitors cannot add new comments or replies."),(0,Ih.__)("Existing comments remain visible.")].join(" ")}];function IZe(){let e=(0,uM.useSelect)(o=>o(R).getEditedPostAttribute("comment_status")??"open",[]),{editPost:t}=(0,uM.useDispatch)(R),r=o=>t({comment_status:o});return(0,lM.jsx)("form",{children:(0,lM.jsx)(cM.__experimentalVStack,{spacing:4,children:(0,lM.jsx)(cM.RadioControl,{className:"editor-change-status__options",hideLabelFromVision:!0,label:(0,Ih.__)("Comment status"),options:AZe,onChange:r,selected:e})})})}var dM=IZe;var zc=a(j(),1),aS=a(W(),1),GH=a(G(),1),gM=a(U(),1),Fbe=a(he(),1),Lbe=a(ee(),1);var fM=a(j(),1),mM=a(W(),1),pM=a(G(),1);var WH=a(T(),1);function OZe(){let e=(0,pM.useSelect)(o=>o(R).getEditedPostAttribute("ping_status")??"open",[]),{editPost:t}=(0,pM.useDispatch)(R),r=()=>t({ping_status:e==="open"?"closed":"open"});return(0,WH.jsx)(mM.CheckboxControl,{label:(0,fM.__)("Enable pingbacks & trackbacks"),checked:e==="open",onChange:r,help:(0,WH.jsx)(mM.ExternalLink,{href:(0,fM.__)("https://wordpress.org/documentation/article/trackbacks-and-pingbacks/"),children:(0,fM.__)("Learn more about pingbacks & trackbacks")})})}var hM=OZe;var ks=a(T(),1),NZe="discussion-panel";function MZe({onClose:e}){return(0,ks.jsxs)("div",{className:"editor-post-discussion",children:[(0,ks.jsx)(Fbe.__experimentalInspectorPopoverHeader,{title:(0,zc.__)("Discussion"),onClose:e}),(0,ks.jsxs)(aS.__experimentalVStack,{spacing:4,children:[(0,ks.jsx)(Xr,{supportKeys:"comments",children:(0,ks.jsx)(dM,{})}),(0,ks.jsx)(Xr,{supportKeys:"trackbacks",children:(0,ks.jsx)(hM,{})})]})]})}function DZe({isOpen:e,onClick:t}){let{commentStatus:r,pingStatus:o,commentsSupported:n,trackbacksSupported:i}=(0,GH.useSelect)(l=>{let{getEditedPostAttribute:c}=l(R),{getPostType:u}=l(Lbe.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,zc._x)("Open",'Adjective: e.g. "Comments are open"'):s=i?(0,zc.__)("Comments only"):(0,zc._x)("Open",'Adjective: e.g. "Comments are open"'):o==="open"?s=n?(0,zc.__)("Pings only"):(0,zc.__)("Pings enabled"):s=(0,zc.__)("Closed"),(0,ks.jsx)(aS.Button,{size:"compact",className:"editor-post-discussion__panel-toggle",variant:"tertiary","aria-label":(0,zc.__)("Change discussion options"),"aria-expanded":e,onClick:t,children:s})}function vM(){let{isEnabled:e}=(0,GH.useSelect)(n=>{let{isEditorPanelEnabled:i}=n(R);return{isEnabled:i(NZe)}},[]),[t,r]=(0,gM.useState)(null),o=(0,gM.useMemo)(()=>({anchor:t,placement:"left-start",offset:36,shift:!0}),[t]);return e?(0,ks.jsx)(Xr,{supportKeys:["comments","trackbacks"],children:(0,ks.jsx)(Gt,{label:(0,zc.__)("Discussion"),ref:r,children:(0,ks.jsx)(aS.Dropdown,{popoverProps:o,className:"editor-post-discussion__panel-dropdown",contentClassName:"editor-post-discussion__panel-dialog",focusOnMount:!0,renderToggle:({isOpen:n,onToggle:i})=>(0,ks.jsx)(DZe,{isOpen:n,onClick:i}),renderContent:({onClose:n})=>(0,ks.jsx)(MZe,{onClose:n})})})}):null}var lS=a(j(),1),bM=a(W(),1),wM=a(G(),1),Bbe=a(U(),1),Vbe=a(Ot(),1);var yM=a(T(),1);function NT({hideLabelFromVision:e=!1,updateOnBlur:t=!1}){let{excerpt:r,shouldUseDescriptionLabel:o,usedAttribute:n}=(0,wM.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,wM.useDispatch)(R),[s,l]=(0,Bbe.useState)((0,Vbe.decodeEntities)(r)),c=d=>{i({[n]:d})},u=o?(0,lS.__)("Write a description (optional)"):(0,lS.__)("Write an excerpt (optional)");return(0,yM.jsx)("div",{className:"editor-post-excerpt",children:(0,yM.jsx)(bM.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,lS.__)("Write a description"):(0,yM.jsx)(bM.ExternalLink,{href:(0,lS.__)("https://wordpress.org/documentation/article/page-post-settings-sidebar/#excerpt"),children:(0,lS.__)("Learn more about manual excerpts")})})})}var jbe=a(T(),1);function FZe({children:e}){return(0,jbe.jsx)(Xr,{supportKeys:"excerpt",children:e})}var Ay=FZe;var em=a(j(),1),Hc=a(W(),1),DT=a(G(),1),_M=a(U(),1),Hbe=a(he(),1),qH=a(ee(),1),Ube=a(Ot(),1);var SM=a(W(),1),YH=a(T(),1),{Fill:LZe,Slot:BZe}=(0,SM.createSlotFill)("PluginPostExcerpt"),zbe=({children:e,className:t})=>(0,YH.jsx)(LZe,{children:(0,YH.jsx)(SM.PanelRow,{className:t,children:e})});zbe.Slot=BZe;var MT=zbe;var Qr=a(T(),1),xM="post-excerpt";function VZe(){let{isOpened:e,isEnabled:t,postType:r}=(0,DT.useSelect)(s=>{let{isEditorPanelOpened:l,isEditorPanelEnabled:c,getCurrentPostType:u}=s(R);return{isOpened:l(xM),isEnabled:c(xM),postType:u()}},[]),{toggleEditorPanelOpened:o}=(0,DT.useDispatch)(R),n=()=>o(xM);if(!t)return null;let i=["wp_template","wp_template_part","wp_block"].includes(r);return(0,Qr.jsx)(Hc.PanelBody,{title:i?(0,em.__)("Description"):(0,em.__)("Excerpt"),opened:e,onToggle:n,children:(0,Qr.jsx)(MT.Slot,{children:s=>(0,Qr.jsxs)(Qr.Fragment,{children:[(0,Qr.jsx)(NT,{}),s]})})})}function Wbe(){return(0,Qr.jsx)(Ay,{children:(0,Qr.jsx)(VZe,{})})}function Gbe(){return(0,Qr.jsx)(Ay,{children:(0,Qr.jsx)(jZe,{})})}function jZe(){let{shouldRender:e,excerpt:t,shouldBeUsedAsDescription:r,allowEditing:o}=(0,DT.useSelect)(f=>{let{getCurrentPostType:m,getCurrentPostId:h,getEditedPostAttribute:g,isEditorPanelEnabled:v}=f(R),y=m(),b=["wp_template","wp_template_part"].includes(y),w=y==="wp_block",S=b||w,_=g(b?"description":"excerpt"),P=b&&f(qH.store).getEntityRecord("postType",y,h()),I=!_&&b?sl({template:P,templateTypes:f(qH.store).getCurrentTheme()?.default_template_types})?.description:void 0,A=v(xM)||S;return{excerpt:_??I,shouldRender:A,shouldBeUsedAsDescription:S,allowEditing:A&&(!S||w||P&&P.source===JE.custom&&!P.has_theme_file&&P.is_custom)}},[]),[n,i]=(0,_M.useState)(null),s=r?(0,em.__)("Description"):(0,em.__)("Excerpt"),l=(0,_M.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,Qr.jsx)(Hc.__experimentalText,{align:"left",numberOfLines:4,truncate:o,children:(0,Ube.decodeEntities)(t)});if(!o)return c;let u=r?(0,em.__)("Add a description\u2026"):(0,em.__)("Add an excerpt\u2026"),d=r?(0,em.__)("Edit description"):(0,em.__)("Edit excerpt");return(0,Qr.jsxs)(Hc.__experimentalVStack,{children:[c,(0,Qr.jsx)(Hc.Dropdown,{className:"editor-post-excerpt__dropdown",contentClassName:"editor-post-excerpt__dropdown__content",popoverProps:l,focusOnMount:!0,ref:i,renderToggle:({onToggle:f})=>(0,Qr.jsx)(Hc.Button,{__next40pxDefaultSize:!0,onClick:f,variant:"link",children:c?d:u}),renderContent:({onClose:f})=>(0,Qr.jsxs)(Qr.Fragment,{children:[(0,Qr.jsx)(Hbe.__experimentalInspectorPopoverHeader,{title:s,onClose:f}),(0,Qr.jsx)(Hc.__experimentalVStack,{spacing:4,children:(0,Qr.jsx)(MT.Slot,{children:m=>(0,Qr.jsxs)(Qr.Fragment,{children:[(0,Qr.jsx)(NT,{hideLabelFromVision:!0,updateOnBlur:!0}),m]})})})]})})]})}var Ya=a(j(),1),ZH=a(xn(),1),Yi=a(W(),1),Zbe=a(v_(),1),TM=a(U(),1),Xbe=a(_e(),1),cS=a(G(),1),Iy=a(he(),1),Qbe=a(ee(),1);var Ybe=a(G(),1),qbe=a(ee(),1);function CM({children:e,supportKeys:t}){let{postType:r,themeSupports:o}=(0,Ybe.useSelect)(i=>({postType:i(R).getEditedPostAttribute("type"),themeSupports:i(qbe.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 KH=a(T(),1);function zZe({children:e}){return(0,KH.jsx)(CM,{supportKeys:"post-thumbnails",children:(0,KH.jsx)(Xr,{supportKeys:"thumbnail",children:e})})}var tm=zZe;var fi=a(T(),1),Kbe=["image"],HZe=(0,Ya.__)("Featured image"),UZe=(0,Ya.__)("Add a featured image"),WZe=(0,fi.jsx)("p",{children:(0,Ya.__)("To edit the featured image, you need permission to upload media.")});function GZe(e,t){if(!e)return{};let r=(0,ZH.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,ZH.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 YZe({currentPostId:e,featuredImageId:t,onUpdateImage:r,onRemoveImage:o,media:n,postType:i,noticeUI:s,noticeOperations:l,isRequestingFeaturedImageMedia:c}){let u=(0,TM.useRef)(!1),[d,f]=(0,TM.useState)(!1),{getSettings:m}=(0,cS.useSelect)(Iy.store),{mediaSourceUrl:h}=GZe(n,e);function g(w){m().mediaUpload({allowedTypes:Kbe,filesList:w,onFileChange([S]){if((0,Zbe.isBlobURL)(S?.url)){f(!0);return}S&&r(S),f(!1)},onError(S){l.removeAllNotices(),l.createErrorNotice(S)},multiple:!1})}function v(w){return w.alt_text?(0,Ya.sprintf)((0,Ya.__)("Current image: %s"),w.alt_text):(0,Ya.sprintf)((0,Ya.__)("The current image has no alternative text. The file name is: %s"),w.media_details.sizes?.full?.file||w.slug)}function y(w){u.current&&w&&(w.focus(),u.current=!1)}let b=!c&&!!t&&!n;return(0,fi.jsxs)(tm,{children:[s,(0,fi.jsxs)("div",{className:"editor-post-featured-image",children:[n&&(0,fi.jsx)("div",{id:`editor-post-featured-image-${t}-describedby`,className:"hidden",children:v(n)}),(0,fi.jsx)(Iy.MediaUploadCheck,{fallback:WZe,children:(0,fi.jsx)(Iy.MediaUpload,{title:i?.labels?.featured_image||HZe,onSelect:r,unstableFeaturedImageFlow:!0,allowedTypes:Kbe,modalClass:"editor-post-featured-image__media-modal",render:({open:w})=>(0,fi.jsxs)("div",{className:"editor-post-featured-image__container",children:[b?(0,fi.jsx)(Yi.Notice,{status:"warning",isDismissible:!1,children:(0,Ya.__)("Could not retrieve the featured image data.")}):(0,fi.jsxs)(Yi.Button,{__next40pxDefaultSize:!0,ref:y,className:t?"editor-post-featured-image__preview":"editor-post-featured-image__toggle",onClick:w,"aria-label":t?(0,Ya.__)("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,fi.jsx)("img",{className:"editor-post-featured-image__preview-image",src:h,alt:v(n)}),(d||c)&&(0,fi.jsx)(Yi.Spinner,{}),!t&&!d&&(i?.labels?.set_featured_image||UZe)]}),!!t&&(0,fi.jsxs)(Yi.__experimentalHStack,{className:Z("editor-post-featured-image__actions",{"editor-post-featured-image__actions-missing-image":b,"editor-post-featured-image__actions-is-requesting-image":c}),children:[(0,fi.jsx)(Yi.Button,{__next40pxDefaultSize:!0,className:"editor-post-featured-image__action",onClick:w,"aria-haspopup":"dialog",variant:b?"secondary":void 0,children:(0,Ya.__)("Replace")}),(0,fi.jsx)(Yi.Button,{__next40pxDefaultSize:!0,className:"editor-post-featured-image__action",onClick:()=>{o(),u.current=!0},variant:b?"secondary":void 0,isDestructive:b,children:(0,Ya.__)("Remove")})]}),(0,fi.jsx)(Yi.DropZone,{onFilesDrop:g})]}),value:t})})]})]})}var qZe=(0,cS.withSelect)(e=>{let{getEntityRecord:t,getPostType:r,hasFinishedResolution:o}=e(Qbe.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"}])}}),KZe=(0,cS.withDispatch)((e,{noticeOperations:t},{select:r})=>{let{editPost:o}=e(R);return{onUpdateImage(n){o({featured_media:n.id})},onDropImage(n){r(Iy.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})}}}),FT=(0,Xbe.compose)(Yi.withNotices,qZe,KZe,(0,Yi.withFilters)("editor.PostFeaturedImage"))(YZe);var Jbe=a(j(),1),$be=a(W(),1),EM=a(G(),1),e0e=a(ee(),1);var uS=a(T(),1),XH="featured-image";function PM({withPanelBody:e=!0}){let{postType:t,isEnabled:r,isOpened:o}=(0,EM.useSelect)(i=>{let{getEditedPostAttribute:s,isEditorPanelEnabled:l,isEditorPanelOpened:c}=i(R),{getPostType:u}=i(e0e.store);return{postType:u(s("type")),isEnabled:l(XH),isOpened:c(XH)}},[]),{toggleEditorPanelOpened:n}=(0,EM.useDispatch)(R);return r?e?(0,uS.jsx)(tm,{children:(0,uS.jsx)($be.PanelBody,{title:t?.labels?.featured_image??(0,Jbe.__)("Featured image"),opened:o,onToggle:()=>n(XH),children:(0,uS.jsx)(FT,{})})}):(0,uS.jsx)(tm,{children:(0,uS.jsx)(FT,{})}):null}var Rs=a(j(),1),kM=a(W(),1),RM=a(G(),1),o0e=a(_e(),1),n0e=a(ee(),1);var t0e=a(G(),1);var r0e=a(T(),1);function dS({children:e}){return(0,t0e.useSelect)(r=>r(R).getEditorSettings().disablePostFormats,[])?null:(0,r0e.jsx)(Xr,{supportKeys:"post-formats",children:e})}var Oy=a(T(),1),LT=[{id:"aside",caption:(0,Rs.__)("Aside")},{id:"audio",caption:(0,Rs.__)("Audio")},{id:"chat",caption:(0,Rs.__)("Chat")},{id:"gallery",caption:(0,Rs.__)("Gallery")},{id:"image",caption:(0,Rs.__)("Image")},{id:"link",caption:(0,Rs.__)("Link")},{id:"quote",caption:(0,Rs.__)("Quote")},{id:"standard",caption:(0,Rs.__)("Standard")},{id:"status",caption:(0,Rs.__)("Status")},{id:"video",caption:(0,Rs.__)("Video")}].sort((e,t)=>{let r=e.caption.toUpperCase(),o=t.caption.toUpperCase();return r<o?-1:r>o?1:0});function BT(){let t=`post-format-selector-${(0,o0e.useInstanceId)(BT)}`,{postFormat:r,suggestedFormat:o,supportedFormats:n}=(0,RM.useSelect)(u=>{let{getEditedPostAttribute:d,getSuggestedPostFormat:f}=u(R),m=d("format"),h=u(n0e.store).getThemeSupports();return{postFormat:m??"standard",suggestedFormat:f(),supportedFormats:h.formats}},[]),i=LT.filter(u=>n?.includes(u.id)||r===u.id),s=i.find(u=>u.id===o),{editPost:l}=(0,RM.useDispatch)(R),c=u=>l({format:u});return(0,Oy.jsx)(dS,{children:(0,Oy.jsxs)("div",{className:"editor-post-format",children:[(0,Oy.jsx)(kM.RadioControl,{className:"editor-post-format__options",label:(0,Rs.__)("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,Oy.jsx)("p",{className:"editor-post-format__suggestion",children:(0,Oy.jsx)(kM.Button,{__next40pxDefaultSize:!0,variant:"link",onClick:()=>c(s.id),children:(0,Rs.sprintf)((0,Rs.__)("Apply suggested format: %s"),s.caption)})})]})})}var Oh=a(j(),1),QH=a(W(),1),VT=a(G(),1);var JH=a(vo(),1);var i0e=a(G(),1);var s0e=a(T(),1);function ZZe({children:e}){let{lastRevisionId:t,revisionsCount:r}=(0,i0e.useSelect)(o=>{let{getCurrentPostLastRevisionId:n,getCurrentPostRevisionsCount:i}=o(R);return{lastRevisionId:n(),revisionsCount:i()}},[]);return!t||r<2?null:(0,s0e.jsx)(Xr,{supportKeys:"revisions",children:e})}var rm=ZZe;var fS=a(T(),1);function a0e(){return(0,VT.useSelect)(e=>{let{getCurrentPostLastRevisionId:t,getCurrentPostRevisionsCount:r,getEditorSettings:o}=e(R);return{lastRevisionId:t(),revisionsCount:r(),disableVisualRevisions:!!o().disableVisualRevisions}},[])}function XZe(){let{lastRevisionId:e,revisionsCount:t,disableVisualRevisions:r}=a0e(),{setCurrentRevisionId:o}=Y((0,VT.useDispatch)(R)),n=r?{href:(0,JH.addQueryArgs)("revision.php",{revision:e})}:{onClick:()=>o(e)};return(0,fS.jsx)(rm,{children:(0,fS.jsx)(QH.Button,{__next40pxDefaultSize:!0,...n,className:"editor-post-last-revision__title",icon:Id,iconPosition:"right",text:(0,Oh.sprintf)((0,Oh.__)("Revisions (%s)"),t)})})}function l0e(){let{lastRevisionId:e,revisionsCount:t,disableVisualRevisions:r}=a0e(),{setCurrentRevisionId:o}=Y((0,VT.useDispatch)(R)),n=r?{href:(0,JH.addQueryArgs)("revision.php",{revision:e})}:{onClick:()=>o(e)};return(0,fS.jsx)(rm,{children:(0,fS.jsx)(Gt,{label:(0,Oh.__)("Revisions"),children:(0,fS.jsx)(QH.Button,{...n,className:"editor-private-post-last-revision__button",text:t,"aria-label":(0,Oh.sprintf)((0,Oh._n)("Open revisions screen: %d revision","Open revisions screen: %d revisions",t),t),variant:"tertiary",size:"compact"})})})}var AM=XZe;var c0e=a(W(),1);var IM=a(T(),1);function QZe(){return(0,IM.jsx)(rm,{children:(0,IM.jsx)(c0e.PanelBody,{className:"editor-post-last-revision__panel",children:(0,IM.jsx)(AM,{})})})}var u0e=QZe;var Gn=a(j(),1),qa=a(W(),1),zT=a(G(),1),tU=a(vo(),1),jT=a(U(),1),mS=a(xn(),1),h0e=a(_e(),1),rU=a(ee(),1);var Uc=a(j(),1),JZe="authentication-failed",$Ze="connection-expired",eXe="connection-limit-exceeded",d0e="document-size-limit-exceeded",eU="protocol-mismatch",f0e="unknown-error",$H={[JZe]:{title:(0,Uc.__)("Unable to connect"),description:(0,Uc.__)("Real-time collaboration couldn't verify your permissions. Check that you have access to edit this post or contact your site administrator.")},[$Ze]:{title:(0,Uc.__)("Connection expired"),description:(0,Uc.__)("Your connection to real-time collaboration has timed out. Editing is paused to prevent conflicts with other editors.")},[eXe]:{title:(0,Uc.__)("Too many editors connected"),description:(0,Uc.__)("Real-time collaboration has reached its connection limit. Try again later or contact your site administrator.")},[eU]:{title:(0,Uc.__)("Protocol update"),description:(0,Uc.__)("Real-time collaboration has been updated. Please refresh the page to continue editing.")},[f0e]:{title:(0,Uc.__)("Connection lost"),description:(0,Uc.__)("The connection to real-time collaboration was interrupted. Editing is paused to prevent conflicts with other editors.")}};function m0e(e){return e?.code&&$H[e?.code]?$H[e.code]:$H[f0e]}var jr=a(T(),1);function p0e(){let{isCollaborationSupported:e,syncConnectionStatus:t}=(0,zT.useSelect)(r=>{let{isCollaborationSupported:o,getSyncConnectionStatus:n}=Y(r(rU.store));return{isCollaborationSupported:o(),syncConnectionStatus:n()}},[]);return e?null:d0e===t?.error?.code?(0,jr.jsx)("p",{children:(0,Gn.__)("Because this post is too large for real-time collaboration, only one person can edit at a time.")}):(0,jr.jsx)("p",{children:(0,Gn.__)("Because this post uses plugins that aren\u2019t compatible with real-time collaboration, only one person can edit at a time.")})}function g0e(){let t="core/editor/post-locked-modal-"+(0,h0e.useInstanceId)(g0e),{autosave:r,updatePostLock:o}=(0,zT.useDispatch)(R),{isCollaborationEnabled:n,isLocked:i,isTakeover:s,user:l,postId:c,postLockUtils:u,activePostLock:d,postType:f,previewLink:m}=(0,zT.useSelect)(w=>{let{isPostLocked:S,isPostLockTakeover:x,getPostLockUser:_,getCurrentPostId:P,getActivePostLock:I,getEditedPostAttribute:A,getEditedPostPreviewLink:k,getEditorSettings:D,isCollaborationEnabledForCurrentPost:E}=Y(w(R)),{getPostType:C}=w(rU.store);return{isCollaborationEnabled:E(),isLocked:S(),isTakeover:x(),user:_(),postId:P(),postLockUtils:D().postLockUtils,activePostLock:I(),postType:C(A("type")),previewLink:k()}},[]);if((0,jT.useEffect)(()=>{function w(_){i||(_["wp-refresh-post-lock"]={lock:d,post_id:c})}function S(_){if(!_["wp-refresh-post-lock"])return;let P=_["wp-refresh-post-lock"];P.lock_error?(r(),o({isLocked:!0,isTakeover:!0,user:{name:P.lock_error.name,avatar:P.lock_error.avatar_src_2x}})):P.new_lock&&o({isLocked:!1,activePostLock:P.new_lock})}function x(){if(i||!d)return;let _=new window.FormData;if(_.append("action","wp-remove-post-lock"),_.append("_wpnonce",u.unlockNonce),_.append("post_ID",c),_.append("active_post_lock",d),window.navigator.sendBeacon)window.navigator.sendBeacon(u.ajaxUrl,_);else{let P=new window.XMLHttpRequest;P.open("POST",u.ajaxUrl,!1),P.send(_)}}return(0,mS.addAction)("heartbeat.send",t,w),(0,mS.addAction)("heartbeat.tick",t,S),window.addEventListener("beforeunload",x),()=>{(0,mS.removeAction)("heartbeat.send",t),(0,mS.removeAction)("heartbeat.tick",t),window.removeEventListener("beforeunload",x)}},[]),!i||n)return null;let h=l.name,g=l.avatar,v=(0,tU.addQueryArgs)("post.php",{"get-post-lock":"1",lockKey:!0,post:c,action:"edit",_wpnonce:u.nonce}),y=(0,tU.addQueryArgs)("edit.php",{post_type:f?.slug}),b=(0,Gn.__)("Exit editor");return(0,jr.jsx)(qa.Modal,{title:s?(0,Gn.__)("Someone else has taken over this post"):(0,Gn.__)("This post is already being edited"),focusOnMount:!0,shouldCloseOnClickOutside:!1,shouldCloseOnEsc:!1,isDismissible:!1,className:"editor-post-locked-modal",size:"medium",children:(0,jr.jsxs)(qa.__experimentalHStack,{alignment:"top",spacing:6,children:[!!g&&(0,jr.jsx)("img",{src:g,alt:(0,Gn.__)("Avatar"),className:"editor-post-locked-modal__avatar",width:64,height:64}),(0,jr.jsxs)("div",{children:[!!s&&(0,jr.jsxs)(jr.Fragment,{children:[(0,jr.jsx)("p",{children:(0,jT.createInterpolateElement)(h?(0,Gn.sprintf)((0,Gn.__)("<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,Gn.__)("Another user now has editing control of this post (<PreviewLink />). Don\u2019t worry, your changes up to this moment have been saved."),{strong:(0,jr.jsx)("strong",{}),PreviewLink:(0,jr.jsx)(qa.ExternalLink,{href:m,children:(0,Gn.__)("preview")})})}),(0,jr.jsx)(p0e,{})]}),!s&&(0,jr.jsxs)(jr.Fragment,{children:[(0,jr.jsx)("p",{children:(0,jT.createInterpolateElement)(h?(0,Gn.sprintf)((0,Gn.__)("<strong>%s</strong> is currently working on this post (<PreviewLink />), which means you cannot make changes, unless you take over."),h):(0,Gn.__)("Another user is currently working on this post (<PreviewLink />), which means you cannot make changes, unless you take over."),{strong:(0,jr.jsx)("strong",{}),PreviewLink:(0,jr.jsx)(qa.ExternalLink,{href:m,children:(0,Gn.__)("preview")})})}),(0,jr.jsx)(p0e,{}),(0,jr.jsx)("p",{children:(0,Gn.__)("If you take over, the other user will lose editing control to the post, but their changes will be saved.")})]}),(0,jr.jsxs)(qa.__experimentalHStack,{className:"editor-post-locked-modal__buttons",justify:"flex-end",children:[!s&&(0,jr.jsx)(qa.Button,{__next40pxDefaultSize:!0,variant:"tertiary",href:v,children:(0,Gn.__)("Take over")}),(0,jr.jsx)(qa.Button,{__next40pxDefaultSize:!0,variant:"primary",href:y,children:b})]})]})]})})}var v0e=(0,qa.withFilters)("editor.PostLockedModal")(g0e);var b0e=a(j(),1),w0e=a(W(),1),NM=a(G(),1);var y0e=a(G(),1);function tXe({children:e}){let{hasPublishAction:t,isPublished:r}=(0,y0e.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 OM=tXe;var oU=a(T(),1);function rXe(){let e=(0,NM.useSelect)(o=>o(R).getEditedPostAttribute("status"),[]),{editPost:t}=(0,NM.useDispatch)(R),r=()=>{t({status:e==="pending"?"draft":"pending"})};return(0,oU.jsx)(OM,{children:(0,oU.jsx)(w0e.CheckboxControl,{label:(0,b0e.__)("Pending review"),checked:e==="pending",onChange:r})})}var S0e=rXe;var x0e=a(U(),1),Ny=a(W(),1),pS=a(j(),1),MM=a(G(),1),_0e=a(xn(),1),C0e=a(ee(),1);var Ka=a(T(),1);function oXe(e){let t=(0,x0e.renderToString)((0,Ka.jsxs)("div",{className:"editor-post-preview-button__interstitial-message",children:[(0,Ka.jsxs)(Ny.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 96 96",children:[(0,Ka.jsx)(Ny.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,Ka.jsx)(Ny.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,Ka.jsx)("p",{children:(0,pS.__)("Generating preview\u2026")})]}));t+=`
		<style>
			body {
				margin: 0;
			}
			.editor-post-preview-button__interstitial-message {
				display: flex;
				flex-direction: column;
				align-items: center;
				justify-content: center;
				height: 100vh;
				width: 100vw;
			}
			@-webkit-keyframes paint {
				0% {
					stroke-dashoffset: 0;
				}
			}
			@-moz-keyframes paint {
				0% {
					stroke-dashoffset: 0;
				}
			}
			@-o-keyframes paint {
				0% {
					stroke-dashoffset: 0;
				}
			}
			@keyframes paint {
				0% {
					stroke-dashoffset: 0;
				}
			}
			.editor-post-preview-button__interstitial-message svg {
				width: 192px;
				height: 192px;
				stroke: #555d66;
				stroke-width: 0.75;
			}
			.editor-post-preview-button__interstitial-message svg .outer,
			.editor-post-preview-button__interstitial-message svg .inner {
				stroke-dasharray: 280;
				stroke-dashoffset: 280;
				-webkit-animation: paint 1.5s ease infinite alternate;
				-moz-animation: paint 1.5s ease infinite alternate;
				-o-animation: paint 1.5s ease infinite alternate;
				animation: paint 1.5s ease infinite alternate;
			}
			p {
				text-align: center;
				font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
			}
		</style>
	`,t=(0,_0e.applyFilters)("editor.PostPreview.interstitialMarkup",t),e.write(t),e.title=(0,pS.__)("Generating preview\u2026"),e.close()}function Nh({className:e,textContent:t,forceIsAutosaveable:r,role:o,onPreview:n}){let{postId:i,currentPostLink:s,previewLink:l,isSaveable:c,isViewable:u}=(0,MM.useSelect)(g=>{let v=g(R),w=g(C0e.store).getPostType(v.getCurrentPostType("type"))?.viewable??!1;return w?{postId:v.getCurrentPostId(),currentPostLink:v.getCurrentPostAttribute("link"),previewLink:v.getEditedPostPreviewLink(),isSaveable:v.isEditedPostSaveable(),isViewable:w}:{isViewable:w}},[]),{__unstableSaveForPreview:d}=(0,MM.useDispatch)(R);if(!u)return null;let f=`wp-preview-${i}`;return(0,Ka.jsx)(Ny.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(),oXe(v.document);let y=await d({forceIsAutosaveable:r});v.location=y,n?.()},role:o,size:"compact",children:t||(0,Ka.jsxs)(Ka.Fragment,{children:[(0,pS._x)("Preview","imperative verb"),(0,Ka.jsx)(tr,{render:(0,Ka.jsx)("span",{}),children:(0,pS.__)("(opens in a new tab)")})]})})}var k0e=a(W(),1),R0e=a(U(),1),FM=a(G(),1),A0e=a(_e(),1);var Mh=a(j(),1),T0e=a(G(),1),E0e=a(_e(),1);function DM(){let e=(0,E0e.useViewportMatch)("medium","<"),{isPublished:t,isBeingScheduled:r,isSaving:o,isPublishing:n,hasPublishAction:i,isAutosaving:s,hasNonPostEntityChanges:l,postStatusHasChanged:c,postStatus:u,isPostSavingLocked:d}=(0,T0e.useSelect)(f=>{let{isCurrentPostPublished:m,isEditedPostBeingScheduled:h,isSavingPost:g,isPublishingPost:v,getCurrentPost:y,isAutosavingPost:b,getPostEdits:w,getEditedPostAttribute:S}=f(R);return{isPublished:m(),isBeingScheduled:h(),isSaving:g(),isPublishing:v(),hasPublishAction:y()._links?.["wp:action-publish"]??!1,isAutosaving:b(),hasNonPostEntityChanges:f(R).hasNonPostEntityChanges(),isPostSavingLocked:f(R).isPostSavingLocked(),postStatusHasChanged:!!w()?.status,postStatus:S("status")}},[]);return n?(0,Mh.__)("Publishing\u2026"):(t||r)&&o&&!s?(0,Mh.__)("Saving\u2026"):i?l&&!d||t||c&&!["future","publish"].includes(u)||!c&&u==="future"?(0,Mh.__)("Save"):r?(0,Mh.__)("Schedule"):(0,Mh.__)("Publish"):e?(0,Mh.__)("Publish"):(0,Mh.__)("Submit for Review")}var hS=a(T(),1),P0e=()=>{},nXe=class extends R0e.Component{constructor(e){super(e),this.createOnClick=this.createOnClick.bind(this),this.closeEntitiesSavedStates=this.closeEntitiesSavedStates.bind(this),this.state={entitiesSavedStatesCallback:!1}}createOnClick(e){return(...t)=>{let{hasNonPostEntityChanges:r,setEntitiesSavedStatesCallback:o}=this.props;return r&&o?(this.setState({entitiesSavedStatesCallback:()=>e(...t)}),o(()=>this.closeEntitiesSavedStates),P0e):e(...t)}}closeEntitiesSavedStates(e){let{postType:t,postId:r}=this.props,{entitiesSavedStatesCallback:o}=this.state;this.setState({entitiesSavedStatesCallback:!1},()=>{e&&e.some(n=>n.kind==="postType"&&n.name===t&&n.key===r)&&o()})}render(){let{forceIsDirty:e,hasPublishAction:t,isBeingScheduled:r,isOpen:o,isPostSavingLocked:n,isPublishable:i,isPublished:s,isSaveable:l,isSaving:c,isAutoSaving:u,isToggle:d,savePostStatus:f,onSubmit:m=P0e,onToggle:h,visibility:g,hasNonPostEntityChanges:v,isSavingNonPostEntityChanges:y,postStatus:b,postStatusHasChanged:w}=this.props,S=n||(c||!l||!i&&!e)&&(!v||y),x=n||(s||c||!l||!i&&!e)&&(!v||y),_="publish";w?_=b:t?g==="private"?_="private":r&&(_="future"):_="pending";let P=()=>{S||(m(),f(_))},I=()=>{x||h()},A={"aria-disabled":S,className:"editor-post-publish-button",isBusy:!u&&c,variant:"primary",onClick:this.createOnClick(P),"aria-haspopup":v?"dialog":void 0},k={"aria-disabled":x,"aria-expanded":o,className:"editor-post-publish-panel__toggle",isBusy:c&&s,variant:"primary",size:"compact",onClick:this.createOnClick(I),"aria-haspopup":v?"dialog":void 0},D=d?k:A;return(0,hS.jsx)(hS.Fragment,{children:(0,hS.jsx)(k0e.Button,{...D,className:`${D.className} editor-post-publish-button__button`,size:"compact",children:(0,hS.jsx)(DM,{})})})}},gS=(0,A0e.compose)([(0,FM.withSelect)(e=>{let{isSavingPost:t,isAutosavingPost:r,isEditedPostBeingScheduled:o,getEditedPostVisibility:n,isCurrentPostPublished:i,isEditedPostSaveable:s,isEditedPostPublishable:l,isPostSavingLocked:c,getCurrentPost:u,getCurrentPostType:d,getCurrentPostId:f,hasNonPostEntityChanges:m,isSavingNonPostEntityChanges:h,getEditedPostAttribute:g,getPostEdits:v}=e(R);return{isSaving:t(),isAutoSaving:r(),isBeingScheduled:o(),visibility:n(),isSaveable:s(),isPostSavingLocked:c(),isPublishable:l(),isPublished:i(),hasPublishAction:u()._links?.["wp:action-publish"]??!1,postType:d(),postId:f(),postStatus:g("status"),postStatusHasChanged:v()?.status,hasNonPostEntityChanges:m(),isSavingNonPostEntityChanges:h()}}),(0,FM.withDispatch)(e=>{let{editPost:t,savePost:r}=e(R);return{savePostStatus:o=>{t({status:o},{undoIgnore:!0}),r()}}})])(nXe);var JM=a(j(),1),TS=a(U(),1),Hy=a(W(),1),$M=a(G(),1),Bh=a(_e(),1);var kwe=a(ee(),1);var Wc=a(j(),1),KT=a(W(),1),gwe=a(G(),1);var vwe=a(vo(),1),ywe=a(ee(),1),bwe=a(Ot(),1);var vS=a(j(),1),I0e=a(U(),1),yS=a(W(),1),O0e=a(_e(),1),BM=a(G(),1),N0e=a(he(),1);var My=a(j(),1),LM=[{label:(0,My.__)("Public"),value:"public",description:(0,My.__)("Visible to everyone.")},{label:(0,My.__)("Private"),value:"private",description:(0,My.__)("Only visible to site admins and editors.")},{label:(0,My.__)("Password protected"),value:"password",description:(0,My.__)("Only visible to those who know the password.")}];var Dy=a(T(),1);function HT({onClose:e}){let t=(0,O0e.useInstanceId)(HT),{status:r,visibility:o,password:n}=(0,BM.useSelect)(d=>({status:d(R).getEditedPostAttribute("status"),visibility:d(R).getEditedPostVisibility(),password:d(R).getEditedPostAttribute("password")})),{editPost:i}=(0,BM.useDispatch)(R),[s,l]=(0,I0e.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,Dy.jsxs)("div",{className:"editor-post-visibility",children:[(0,Dy.jsx)(N0e.__experimentalInspectorPopoverHeader,{title:(0,vS.__)("Visibility"),help:(0,vS.__)("Control how this post is viewed."),onClose:e}),(0,Dy.jsxs)(yS.__experimentalVStack,{spacing:4,children:[(0,Dy.jsx)(yS.RadioControl,{label:(0,vS.__)("Visibility"),hideLabelFromVision:!0,options:LM,selected:s?"password":o,onChange:c}),s&&(0,Dy.jsx)(yS.TextControl,{label:(0,vS.__)("Password"),onChange:u,value:n,placeholder:(0,vS.__)("Use a secure password"),type:"text",id:`editor-post-visibility__password-input-${t}`,__next40pxDefaultSize:!0,maxLength:255})]})]})}var M0e=a(G(),1);function VM(){return nU()}function nU(){let e=(0,M0e.useSelect)(t=>t(R).getEditedPostVisibility(),[]);return LM.find(t=>t.value===e)?.label}var D0e=a(go(),1),F0e=a(j(),1),UT=a(G(),1),L0e=a(he(),1),jM=a(U(),1),B0e=a(ee(),1);var iU=a(T(),1),{PrivatePublishDateTimePicker:iXe}=Y(L0e.privateApis);function bS(e){return(0,iU.jsx)(sU,{...e,showPopoverHeaderActions:!0,isCompact:!1})}function sU({onClose:e,showPopoverHeaderActions:t,isCompact:r}){let{postDate:o,postType:n}=(0,UT.useSelect)(h=>({postDate:h(R).getEditedPostAttribute("date"),postType:h(R).getCurrentPostType()}),[]),{editPost:i}=(0,UT.useDispatch)(R),s=h=>i({date:h}),[l,c]=(0,jM.useState)(H1(new Date(o))),u=(0,UT.useSelect)(h=>h(B0e.store).getEntityRecords("postType",n,{status:"publish,future",after:H1(l).toISOString(),before:une(l).toISOString(),exclude:[h(R).getCurrentPostId()],per_page:100,_fields:"id,date"}),[l,n]),d=(0,jM.useMemo)(()=>(u||[]).map(({date:h})=>({date:new Date(h)})),[u]),f=(0,D0e.getSettings)(),m=/a(?!\\)/i.test(f.formats.time.toLowerCase().replace(/\\\\/g,"").split("").reverse().join(""));return(0,iU.jsx)(iXe,{currentDate:o,onChange:s,is12Hour:m,dateOrder:(0,F0e._x)("dmy","date order"),events:d,onMonthPreviewed:h=>c(Rne(h)),onClose:e,isCompact:r,showPopoverHeaderActions:t})}var As=a(j(),1),zl=a(go(),1),j0e=a(G(),1);function wS(e){return SS(e)}function SS({full:e=!1}={}){let{date:t,isFloating:r}=(0,j0e.useSelect)(o=>({date:o(R).getEditedPostAttribute("date"),isFloating:o(R).isEditedPostDateFloating()}),[]);return e?z0e(t):sXe(t,{isFloating:r})}function z0e(e){let t=(0,zl.getDate)(e),r=aXe(),o=(0,zl.dateI18n)((0,As._x)("F j, Y g:i\xA0a","post schedule full date format"),t);return(0,As.isRTL)()?`${r} ${o}`:`${o} ${r}`}function sXe(e,{isFloating:t=!1,now:r=new Date}={}){if(!e||t)return(0,As.__)("Immediately");if(!lXe(r))return z0e(e);let o=(0,zl.getDate)(e);if(V0e(o,r))return(0,As.sprintf)((0,As.__)("Today at %s"),(0,zl.dateI18n)((0,As._x)("g:i\xA0a","post schedule time format"),o));let n=new Date(r);return n.setDate(n.getDate()+1),V0e(o,n)?(0,As.sprintf)((0,As.__)("Tomorrow at %s"),(0,zl.dateI18n)((0,As._x)("g:i\xA0a","post schedule time format"),o)):o.getFullYear()===r.getFullYear()?(0,zl.dateI18n)((0,As._x)("F j g:i\xA0a","post schedule date format without year"),o):(0,zl.dateI18n)((0,As._x)("F j, Y g:i\xA0a","post schedule full date format"),o)}function aXe(){let{timezone:e}=(0,zl.getSettings)();return e.abbr&&isNaN(Number(e.abbr))?e.abbr:`UTC${e.offset<0?"":"+"}${e.offsetFormatted}`}function lXe(e){let{timezone:t}=(0,zl.getSettings)(),r=Number(t.offset),o=-1*(e.getTimezoneOffset()/60);return r===o}function V0e(e,t){return e.getDate()===t.getDate()&&e.getMonth()===t.getMonth()&&e.getFullYear()===t.getFullYear()}var Vy=a(j(),1),Q0e=a(U(),1),uU=a(G(),1),J0e=a(W(),1),WM=a(ee(),1);var mi=a(j(),1),By=a(U(),1),xS=a(W(),1),Ly=a(G(),1),HM=a(ee(),1),Y0e=a(_e(),1),q0e=a(ub(),1),K0e=a(xt(),1);var zM=a(W(),1),H0e=a(G(),1),U0e=a(ee(),1);var Fy=a(T(),1),cXe=3,uXe={per_page:10,orderby:"count",order:"desc",hide_empty:!0,_fields:"id,name,count",context:"view"};function W0e({onSelect:e,taxonomy:t}){let{_terms:r,showTerms:o}=(0,H0e.useSelect)(i=>{let s=i(U0e.store).getEntityRecords("taxonomy",t.slug,uXe);return{_terms:s,showTerms:s?.length>=cXe}},[t.slug]);if(!o)return null;let n=eye(r);return(0,Fy.jsxs)("div",{className:"editor-post-taxonomies__flat-term-most-used",children:[(0,Fy.jsx)(zM.BaseControl.VisualLabel,{as:"h3",className:"editor-post-taxonomies__flat-term-most-used-label",children:t.labels.most_used}),(0,Fy.jsx)("ul",{role:"list",className:"editor-post-taxonomies__flat-term-most-used-list",children:n.map(i=>(0,Fy.jsx)("li",{children:(0,Fy.jsx)(zM.Button,{__next40pxDefaultSize:!0,variant:"link",onClick:()=>e(i),children:i.name})},i.id))})]})}var WT=a(T(),1),aU=[],Z0e=100,G0e={per_page:Z0e,_fields:"id,name",context:"view"},X0e=(e,t)=>Jw(e).toLowerCase()===Jw(t).toLowerCase(),lU=(e,t)=>e.map(r=>t.find(o=>X0e(o.name,r))?.id).filter(r=>r!==void 0);function cU({slug:e}){let[t,r]=(0,By.useState)([]),[o,n]=(0,By.useState)(""),i=(0,Y0e.useDebounce)(n,500),{terms:s,termIds:l,taxonomy:c,hasAssignAction:u,hasCreateAction:d,hasResolvedTerms:f}=(0,Ly.useSelect)(D=>{let{getCurrentPost:E,getEditedPostAttribute:C}=D(R),{getEntityRecords:M,getEntityRecord:B,hasFinishedResolution:N}=D(HM.store),z=E(),O=B("root","taxonomy",e),F=O?C(O.rest_base):aU,L={...G0e,include:F?.join(","),per_page:-1};return{hasCreateAction:O?z._links?.["wp:action-create-"+O.rest_base]??!1:!1,hasAssignAction:O?z._links?.["wp:action-assign-"+O.rest_base]??!1:!1,taxonomy:O,termIds:F,terms:F?.length?M("taxonomy",e,L):aU,hasResolvedTerms:N("getEntityRecords",["taxonomy",e,L])}},[e]),{searchResults:m}=(0,Ly.useSelect)(D=>{let{getEntityRecords:E}=D(HM.store);return{searchResults:o?E("taxonomy",e,{...G0e,search:o}):aU}},[o,e]);(0,By.useEffect)(()=>{if(f){let D=(s??[]).map(E=>Jw(E.name));r(D)}},[s,f]);let h=(0,By.useMemo)(()=>(m??[]).map(D=>Jw(D.name)),[m]),{editPost:g}=(0,Ly.useDispatch)(R),{saveEntityRecord:v}=(0,Ly.useDispatch)(HM.store),{createErrorNotice:y}=(0,Ly.useDispatch)(K0e.store);if(!u)return null;async function b(D){try{let E=await v("taxonomy",e,D,{throwOnError:!0});return PH(E)}catch(E){if(E.code!=="term_exists")throw E;return{id:E.data.term_id,name:D.name}}}function w(D){g({[c.rest_base]:D})}function S(D){let E=[...s??[],...m??[]],C=D.reduce((B,N)=>(B.some(z=>z.toLowerCase()===N.toLowerCase())||B.push(N),B),[]),M=C.filter(B=>!E.find(N=>X0e(N.name,B)));if(r(C),M.length===0){w(lU(C,E));return}d&&Promise.all(M.map(B=>b({name:B}))).then(B=>{let N=E.concat(B);w(lU(C,N))}).catch(B=>{y(B.message,{type:"snackbar"}),w(lU(C,E))})}function x(D){if(l.includes(D.id))return;let E=[...l,D.id],C=e==="post_tag"?(0,mi.__)("Tag"):(0,mi.__)("Term"),M=(0,mi.sprintf)((0,mi._x)("%s added","term"),c?.labels?.singular_name??C);(0,q0e.speak)(M,"assertive"),w(E)}let _=c?.labels?.add_new_item??(e==="post_tag"?(0,mi.__)("Add Tag"):(0,mi.__)("Add Term")),P=c?.labels?.singular_name??(e==="post_tag"?(0,mi.__)("Tag"):(0,mi.__)("Term")),I=(0,mi.sprintf)((0,mi._x)("%s added","term"),P),A=(0,mi.sprintf)((0,mi._x)("%s removed","term"),P),k=(0,mi.sprintf)((0,mi._x)("Remove %s","term"),P);return(0,WT.jsxs)(xS.__experimentalVStack,{spacing:4,children:[(0,WT.jsx)(xS.FormTokenField,{__next40pxDefaultSize:!0,value:t,suggestions:h,onChange:S,onInputChange:i,maxSuggestions:Z0e,label:_,messages:{added:I,removed:A,remove:k}}),(0,WT.jsx)(W0e,{taxonomy:c,onSelect:x})]})}var UM=(0,xS.withFilters)("editor.PostTaxonomyType")(cU);var jy=a(T(),1),dXe=()=>{let e=(0,uU.useSelect)(n=>n(WM.store).getTaxonomy("post_tag")?.labels,[]),t=e?.add_new_item??(0,Vy.__)("Add tag"),r=e?.name??(0,Vy.__)("Tags"),o=[(0,Vy.__)("Suggestion:"),(0,jy.jsx)("span",{className:"editor-post-publish-panel__link",children:t},"label")];return(0,jy.jsxs)(J0e.PanelBody,{initialOpen:!1,title:o,children:[(0,jy.jsx)("p",{children:(0,Vy.sprintf)((0,Vy.__)("%s help users and search engines navigate your site and find your content. Add a few keywords to describe your post."),r)}),(0,jy.jsx)(UM,{slug:"post_tag"})]})},fXe=()=>{let{postHasTags:e,siteHasTags:t,isPostTypeSupported:r}=(0,uU.useSelect)(n=>{let i=n(R).getCurrentPostType(),s=n(WM.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(WM.store).getEntityRecords("taxonomy","post_tag",{per_page:1})?.length:!1;return{postHasTags:!!u?.length,siteHasTags:d,isPostTypeSupported:c&&l}},[]),[o]=(0,Q0e.useState)(e);return!r||!t||o?null:(0,jy.jsx)(dXe,{})},$0e=fXe;var GM=a(W(),1),YM=a(G(),1),zy=a(j(),1),ewe=a(ee(),1);var Dh=a(T(),1),mXe=(e,t)=>LT.filter(o=>e?.includes(o.id)).find(o=>o.id===t),pXe=({suggestedPostFormat:e,suggestionText:t,onUpdatePostFormat:r})=>(0,Dh.jsx)(GM.Button,{__next40pxDefaultSize:!0,variant:"link",onClick:()=>r(e),children:t});function twe(){let{currentPostFormat:e,suggestion:t}=(0,YM.useSelect)(i=>{let{getEditedPostAttribute:s,getSuggestedPostFormat:l}=i(R),c=i(ewe.store).getThemeSupports().formats??[];return{currentPostFormat:s("format"),suggestion:mXe(c,l())}},[]),{editPost:r}=(0,YM.useDispatch)(R),o=i=>r({format:i}),n=[(0,zy.__)("Suggestion:"),(0,Dh.jsx)("span",{className:"editor-post-publish-panel__link",children:(0,zy.__)("Use a post format")},"label")];return!t||t.id===e?null:(0,Dh.jsxs)(GM.PanelBody,{initialOpen:!1,title:n,children:[(0,Dh.jsx)("p",{children:(0,zy.__)("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,Dh.jsx)("p",{children:(0,Dh.jsx)(pXe,{onUpdatePostFormat:o,suggestedPostFormat:t.id,suggestionText:(0,zy.sprintf)((0,zy.__)('Apply the "%1$s" format.'),t.caption)})})]})}var KM=a(j(),1),lwe=a(G(),1),cwe=a(W(),1),mU=a(ee(),1),ZM=a(U(),1);var qn=a(j(),1),om=a(U(),1),iwe=a(xt(),1),Jr=a(W(),1),_S=a(G(),1),swe=a(_e(),1),GT=a(ee(),1),dU=a(ub(),1),awe=a(Ot(),1);var Yn=a(T(),1),{normalizeTextString:rwe}=Y(Jr.privateApis),{RECEIVE_INTERMEDIATE_RESULTS:hXe}=Y(GT.privateApis),owe={per_page:-1,orderby:"name",order:"asc",_fields:"id,name,parent",context:"view",[hXe]:!0},gXe=8,nwe=[];function vXe(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 yXe(e,t,r){return e.find(o=>(!o.parent&&!t||parseInt(o.parent)===parseInt(t))&&o.name.toLowerCase()===r.toLowerCase())}function bXe(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)),rwe(o.name).indexOf(rwe(e))!==-1||o.children.length>0?o:!1};return t}function fU({slug:e}){let[t,r]=(0,om.useState)(!1),[o,n]=(0,om.useState)(""),[i,s]=(0,om.useState)(""),[l,c]=(0,om.useState)(!1),[u,d]=(0,om.useState)(""),[f,m]=(0,om.useState)([]),h=(0,swe.useDebounce)(dU.speak,500),{hasCreateAction:g,hasAssignAction:v,terms:y,loading:b,availableTerms:w,taxonomy:S}=(0,_S.useSelect)($=>{let{getCurrentPost:X,getEditedPostAttribute:oe}=$(R),{getEntityRecord:pe,getEntityRecords:be,isResolving:Ce}=$(GT.store),Ge=pe("root","taxonomy",e),He=X();return{hasCreateAction:Ge?!!He._links?.["wp:action-create-"+Ge.rest_base]:!1,hasAssignAction:Ge?!!He._links?.["wp:action-assign-"+Ge.rest_base]:!1,terms:Ge?oe(Ge.rest_base):nwe,loading:Ce("getEntityRecords",["taxonomy",e,owe]),availableTerms:be("taxonomy",e,owe)||nwe,taxonomy:Ge}},[e]),{editPost:x}=(0,_S.useDispatch)(R),{saveEntityRecord:_}=(0,_S.useDispatch)(GT.store),P=(0,om.useMemo)(()=>vXe(DN(w),y),[w]),{createErrorNotice:I}=(0,_S.useDispatch)(iwe.store);if(!v)return null;let A=$=>_("taxonomy",e,$,{throwOnError:!0}),k=$=>{x({[S.rest_base]:$})},D=$=>{let oe=y.includes($)?y.filter(pe=>pe!==$):[...y,$];k(oe)},E=$=>{n($)},C=$=>{s($)},M=()=>{c(!l)},B=async $=>{if($.preventDefault(),o===""||t)return;let X=yXe(w,i,o);if(X){y.some(Ce=>Ce===X.id)||k([...y,X.id]),n(""),s("");return}r(!0);let oe;try{oe=await A({name:o,parent:i||void 0})}catch(Ce){I(Ce.message,{type:"snackbar"});return}let pe=e==="category"?(0,qn.__)("Category"):(0,qn.__)("Term"),be=(0,qn.sprintf)((0,qn._x)("%s added","term"),S?.labels?.singular_name??pe);(0,dU.speak)(be,"assertive"),r(!1),n(""),s(""),k([...y,oe.id])},N=$=>{let X=P.map(bXe($)).filter(Ce=>Ce),oe=Ce=>{let Ge=0;for(let He=0;He<Ce.length;He++)Ge++,Ce[He].children!==void 0&&(Ge+=oe(Ce[He].children));return Ge};d($),m(X);let pe=oe(X),be=(0,qn.sprintf)((0,qn._n)("%d result found.","%d results found.",pe),pe);h(be,"assertive")},z=$=>$.map(X=>(0,Yn.jsxs)("div",{className:"editor-post-taxonomies__hierarchical-terms-choice",children:[(0,Yn.jsx)(Jr.CheckboxControl,{checked:y.indexOf(X.id)!==-1,onChange:()=>{let oe=parseInt(X.id,10);D(oe)},label:(0,awe.decodeEntities)(X.name)}),!!X.children.length&&(0,Yn.jsx)("div",{className:"editor-post-taxonomies__hierarchical-terms-subchoices",children:z(X.children)})]},X.id)),O=($,X,oe)=>S?.labels?.[$]??(e==="category"?X:oe),F=O("add_new_item",(0,qn.__)("Add Category"),(0,qn.__)("Add Term")),L=O("new_item_name",(0,qn.__)("Add Category"),(0,qn.__)("Add Term")),H=O("parent_item",(0,qn.__)("Parent Category"),(0,qn.__)("Parent Term")),q=`\u2014 ${H} \u2014`,Q=F,J=S?.labels?.search_items??(0,qn.__)("Search Terms"),te=S?.name??(0,qn.__)("Terms"),se=w.length>=gXe;return(0,Yn.jsxs)(Jr.Flex,{direction:"column",gap:"4",children:[se&&!b&&(0,Yn.jsx)(Jr.SearchControl,{__next40pxDefaultSize:!0,label:J,placeholder:J,value:u,onChange:N}),b&&(0,Yn.jsx)(Jr.Flex,{justify:"center",style:{height:"40px"},children:(0,Yn.jsx)(Jr.Spinner,{})}),(0,Yn.jsx)("div",{className:"editor-post-taxonomies__hierarchical-terms-list",tabIndex:"0",role:"group","aria-label":te,children:z(u!==""?f:P)}),!b&&g&&(0,Yn.jsx)(Jr.FlexItem,{children:(0,Yn.jsx)(Jr.Button,{__next40pxDefaultSize:!0,onClick:M,className:"editor-post-taxonomies__hierarchical-terms-add","aria-expanded":l,variant:"link",children:F})}),l&&(0,Yn.jsx)("form",{onSubmit:B,children:(0,Yn.jsxs)(Jr.Flex,{direction:"column",gap:"4",children:[(0,Yn.jsx)(Jr.TextControl,{__next40pxDefaultSize:!0,className:"editor-post-taxonomies__hierarchical-terms-input",label:L,value:o,onChange:E,required:!0}),!!w.length&&(0,Yn.jsx)(Jr.TreeSelect,{__next40pxDefaultSize:!0,label:H,noOptionLabel:q,onChange:C,selectedId:i,tree:P}),(0,Yn.jsx)(Jr.FlexItem,{children:(0,Yn.jsx)(Jr.Button,{__next40pxDefaultSize:!0,variant:"secondary",type:"submit",className:"editor-post-taxonomies__hierarchical-terms-submit",children:Q})})]})})]})}var qM=(0,Jr.withFilters)("editor.PostTaxonomyType")(fU);var CS=a(T(),1);function wXe(){let{hasNoCategory:e,hasSiteCategories:t}=(0,lwe.useSelect)(i=>{let s=i(R).getCurrentPostType(),{canUser:l,getEntityRecord:c}=i(mU.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(y=>y===s),h=u&&i(R).getEditedPostAttribute(u.rest_base),g=m?!!i(mU.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,ZM.useState)(!1);if((0,ZM.useEffect)(()=>{e&&o(!0)},[e]),!r||!t)return null;let n=[(0,KM.__)("Suggestion:"),(0,CS.jsx)("span",{className:"editor-post-publish-panel__link",children:(0,KM.__)("Assign a category")},"label")];return(0,CS.jsxs)(cwe.PanelBody,{initialOpen:!1,title:n,children:[(0,CS.jsx)("p",{children:(0,KM.__)("Categories provide a helpful way to group related posts together and to quickly tell readers what a post is about.")}),(0,CS.jsx)(qM,{slug:"category"})]})}var uwe=wXe;var fd=a(W(),1),qT=a(G(),1),Fh=a(j(),1),YT=a(he(),1),XM=a(U(),1),mwe=a(v_(),1);var dwe=a(vo(),1);function SXe(e){let t=new Set;return Object.fromEntries(e.map(r=>{let o=(0,dwe.getFilename)(r),n="";if(o){let i=o.split(".");i.length>1&&i.pop(),n=i.join(".")}return n||(n=mb()),t.has(n)&&(n=`${n}-${mb()}`),t.add(n),[r,n]}))}function fwe(e){return Object.fromEntries(Object.entries(SXe(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 Hl=a(T(),1);function pwe(e){let t=[];return e.forEach(r=>{t.push(r),t.push(...pwe(r.innerBlocks))}),t}function xXe(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 pU(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 _Xe({clientId:e,alt:t,url:r}){let{selectBlock:o}=(0,qT.useDispatch)(YT.store);return(0,Hl.jsx)(fd.__unstableMotion.img,{tabIndex:0,role:"button","aria-label":(0,Fh.__)("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 hwe(){let[e,t]=(0,XM.useState)(!1),[r,o]=(0,XM.useState)(!1),[n,i]=(0,XM.useState)(!1),{editorBlocks:s,mediaUpload:l}=(0,qT.useSelect)(h=>({editorBlocks:h(YT.store).getBlocks(),mediaUpload:h(YT.store).getSettings().mediaUpload}),[]),c=pwe(s).filter(h=>xXe(h)),{updateBlockAttributes:u}=(0,qT.useDispatch)(YT.store);if(!l||!c.length)return null;let d=[(0,Fh.__)("Suggestion:"),(0,Hl.jsx)("span",{className:"editor-post-publish-panel__link",children:(0,Fh.__)("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:y}=pU(v);return y})),g=Object.fromEntries(Object.entries(fwe([...h])).map(([v,y])=>{let b=y.then(w=>new Promise((S,x)=>{l({filesList:[w],onFileChange:([_])=>{(0,mwe.isBlobURL)(_.url)||S(_)},onError(){x()}})}));return[v,b]}));Promise.allSettled(c.map(v=>{let{url:y}=pU(v);return g[y].then(b=>f(v,b)).then(()=>o(!0)).catch(()=>i(!0))})).finally(()=>{t(!1)})}return(0,Hl.jsxs)(fd.PanelBody,{initialOpen:!0,title:d,children:[(0,Hl.jsx)("p",{children:(0,Fh.__)("Upload external images to the Media Library. Images from different domains may load slowly, display incorrectly, or be removed unexpectedly.")}),(0,Hl.jsxs)("div",{style:{display:"inline-flex",flexWrap:"wrap",gap:"8px"},children:[(0,Hl.jsx)(fd.__unstableAnimatePresence,{onExitComplete:()=>o(!1),children:c.map(h=>{let{url:g,alt:v}=pU(h);return(0,Hl.jsx)(_Xe,{clientId:h.clientId,url:g,alt:v},h.clientId)})}),e||r?(0,Hl.jsx)(fd.Spinner,{}):(0,Hl.jsx)(fd.Button,{size:"compact",variant:"primary",onClick:m,children:(0,Fh._x)("Upload","verb")})]}),n&&(0,Hl.jsx)("p",{children:(0,Fh.__)("Upload failed, try again.")})]})}var Sr=a(T(),1);function CXe({children:e}){let{isBeingScheduled:t,isRequestingSiteIcon:r,hasPublishAction:o,siteIconUrl:n,siteTitle:i,siteHome:s}=(0,gwe.useSelect)(d=>{let{getCurrentPost:f,isEditedPostBeingScheduled:m}=d(R),{getEntityRecord:h,isResolving:g}=d(ywe.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,vwe.filterURLForDisplay)(v.home)}},[]),l=(0,Sr.jsx)(KT.Icon,{className:"components-site-icon",size:"36px",icon:bL});n&&(l=(0,Sr.jsx)("img",{alt:(0,Wc.__)("Site Icon"),className:"components-site-icon",src:n})),r&&(l=null);let c,u;return o?t?(c=(0,Wc.__)("Are you ready to schedule?"),u=(0,Wc.__)("Your work will be published at the specified date and time.")):(c=(0,Wc.__)("Are you ready to publish?"),u=(0,Wc.__)("Double-check your settings before publishing.")):(c=(0,Wc.__)("Are you ready to submit for review?"),u=(0,Wc.__)("Your work will be reviewed and then approved.")),(0,Sr.jsxs)("div",{className:"editor-post-publish-panel__prepublish",children:[(0,Sr.jsx)("div",{children:(0,Sr.jsx)("strong",{children:c})}),(0,Sr.jsx)("p",{children:u}),(0,Sr.jsxs)("div",{className:"components-site-card",children:[l,(0,Sr.jsxs)("div",{className:"components-site-info",children:[(0,Sr.jsx)("span",{className:"components-site-name",children:(0,bwe.decodeEntities)(i)||(0,Wc.__)("(Untitled)")}),(0,Sr.jsx)("span",{className:"components-site-home",children:s})]})]}),(0,Sr.jsx)(hwe,{}),o&&(0,Sr.jsxs)(Sr.Fragment,{children:[(0,Sr.jsx)(KT.PanelBody,{initialOpen:!1,title:[(0,Wc.__)("Visibility:"),(0,Sr.jsx)("span",{className:"editor-post-publish-panel__link",children:(0,Sr.jsx)(VM,{})},"label")],children:(0,Sr.jsx)(HT,{})}),(0,Sr.jsx)(KT.PanelBody,{initialOpen:!1,title:[(0,Wc.__)("Publish:"),(0,Sr.jsx)("span",{className:"editor-post-publish-panel__link",children:(0,Sr.jsx)(wS,{})},"label")],children:(0,Sr.jsx)(bS,{})})]}),(0,Sr.jsx)(twe,{}),(0,Sr.jsx)($0e,{}),(0,Sr.jsx)(uwe,{}),e]})}var wwe=CXe;var Yc=a(W(),1),Gc=a(j(),1),Lh=a(U(),1),_we=a(G(),1),QM=a(vo(),1),Cwe=a(Ot(),1),Twe=a(_e(),1),Ewe=a(ee(),1);var Oo=a(T(),1),Swe="%postname%",xwe="%pagename%",TXe=e=>{let{slug:t}=e;return e.permalink_template.includes(Swe)?e.permalink_template.replace(Swe,t):e.permalink_template.includes(xwe)?e.permalink_template.replace(xwe,t):e.permalink_template};function EXe({text:e}){let[t,r]=(0,Lh.useState)(!1),o=(0,Lh.useRef)(),n=(0,Twe.useCopyToClipboard)(e,()=>{r(!0),o.current&&clearTimeout(o.current),o.current=setTimeout(()=>{r(!1)},4e3)});return(0,Lh.useEffect)(()=>()=>{o.current&&clearTimeout(o.current)},[]),(0,Oo.jsx)(Yc.Button,{__next40pxDefaultSize:!0,variant:"secondary",ref:n,children:t?(0,Gc.__)("Copied!"):(0,Gc.__)("Copy")})}function Pwe({focusOnMount:e,children:t}){let{post:r,postType:o,isScheduled:n}=(0,_we.useSelect)(m=>{let{getEditedPostAttribute:h,getCurrentPost:g,isCurrentPostScheduled:v}=m(R),{getPostType:y}=m(Ewe.store);return{post:g(),postType:y(h("type")),isScheduled:v()}},[]),i=o?.labels?.singular_name,s=o?.labels?.view_item,l=o?.labels?.add_new_item,c=r.status==="future"?TXe(r):r.link,u=(0,QM.addQueryArgs)("post-new.php",{post_type:r.type}),d=(0,Lh.useCallback)(m=>{e&&m&&m.focus()},[e]),f=n?(0,Oo.jsxs)(Oo.Fragment,{children:[(0,Gc.__)("is now scheduled. It will go live on")," ",(0,Oo.jsx)(wS,{}),"."]}):(0,Gc.__)("is now live.");return(0,Oo.jsxs)("div",{className:"post-publish-panel__postpublish",children:[(0,Oo.jsxs)(Yc.PanelBody,{className:"post-publish-panel__postpublish-header",children:[(0,Oo.jsx)(Yc.ExternalLink,{ref:d,href:c,children:(0,Cwe.decodeEntities)(r.title)||(0,Gc.__)("(no title)")})," ",f]}),(0,Oo.jsxs)(Yc.PanelBody,{children:[(0,Oo.jsx)("p",{className:"post-publish-panel__postpublish-subheader",children:(0,Oo.jsx)("strong",{children:(0,Gc.__)("What\u2019s next?")})}),(0,Oo.jsxs)("div",{className:"post-publish-panel__postpublish-post-address-container",children:[(0,Oo.jsx)(Yc.TextControl,{__next40pxDefaultSize:!0,className:"post-publish-panel__postpublish-post-address",readOnly:!0,label:(0,Gc.sprintf)((0,Gc.__)("%s address"),i),value:(0,QM.safeDecodeURIComponent)(c),onFocus:m=>m.target.select()}),(0,Oo.jsx)("div",{className:"post-publish-panel__postpublish-post-address__copy-button-wrap",children:(0,Oo.jsx)(EXe,{text:c})})]}),(0,Oo.jsxs)("div",{className:"post-publish-panel__postpublish-buttons",children:[!n&&(0,Oo.jsxs)(Yc.Button,{variant:"primary",href:c,__next40pxDefaultSize:!0,icon:Bs,iconPosition:"right",target:"_blank",children:[s,(0,Oo.jsx)(tr,{render:(0,Oo.jsx)("span",{}),children:(0,Gc.__)("(opens in a new tab)")})]}),(0,Oo.jsx)(Yc.Button,{variant:n?"primary":"secondary",__next40pxDefaultSize:!0,href:u,children:l})]})]}),t]})}var sn=a(T(),1);function eD({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,$M.useSelect)(D=>{let{getPostType:E}=D(kwe.store),{getCurrentPost:C,getCurrentPostId:M,getEditedPostAttribute:B,isCurrentPostPublished:N,isCurrentPostScheduled:z,isEditedPostBeingScheduled:O,isEditedPostDirty:F,isAutosavingPost:L,isSavingPost:H,isSavingNonPostEntityChanges:q,isPublishSidebarEnabled:Q}=D(R),J=E(B("type"));return{hasPublishAction:C()._links?.["wp:action-publish"]??!1,isPostTypeViewable:J?.viewable,isBeingScheduled:O(),isDirty:F(),isPublished:N(),isPublishSidebarEnabled:Q(),isSaving:H()&&!L(),isSavingNonPostEntityChanges:q(),isScheduled:z(),currentPostId:M()}},[]),{disablePublishSidebar:v,enablePublishSidebar:y}=(0,$M.useDispatch)(R),b=(0,TS.useRef)(null),w=(0,Bh.useMergeRefs)([(0,Bh.useFocusReturn)(),(0,Bh.useConstrainedTabbing)()]);(0,TS.useEffect)(()=>{b.current?.focus()},[]);let S=(0,TS.useRef)(g),x=(0,Bh.useEvent)(t);(0,TS.useEffect)(()=>{let D=g!==S.current;S.current=g,(D||u&&!f&&c)&&x()},[u,f,c,g,x]);function _(){d?v():y()}function P(){(!i||!s)&&t()}let I=u||h&&l,A=!I&&!f,k=I&&!f;return(0,sn.jsxs)("div",{ref:w,tabIndex:-1,className:"editor-post-publish-panel",...n,children:[(0,sn.jsx)("div",{className:"editor-post-publish-panel__header",children:k?(0,sn.jsx)(Hy.Button,{size:"compact",onClick:t,icon:_n,label:(0,JM.__)("Close panel")}):(0,sn.jsxs)(sn.Fragment,{children:[(0,sn.jsx)("div",{className:"editor-post-publish-panel__header-cancel-button",children:(0,sn.jsx)(Hy.Button,{ref:b,accessibleWhenDisabled:!0,disabled:m,onClick:t,variant:"secondary",size:"compact",children:(0,JM.__)("Cancel")})}),(0,sn.jsx)("div",{className:"editor-post-publish-panel__header-publish-button",children:(0,sn.jsx)(gS,{onSubmit:P,forceIsDirty:e})})]})}),(0,sn.jsxs)("div",{className:"editor-post-publish-panel__content",children:[A&&(0,sn.jsx)(wwe,{children:o&&(0,sn.jsx)(o,{})}),k&&(0,sn.jsx)(Pwe,{focusOnMount:!0,children:r&&(0,sn.jsx)(r,{})}),f&&(0,sn.jsx)(Hy.Spinner,{})]}),(0,sn.jsx)("div",{className:"editor-post-publish-panel__footer",children:(0,sn.jsx)(Hy.CheckboxControl,{label:(0,JM.__)("Always show pre-publish checks."),checked:d,onChange:_})})]})}var sD=a(W(),1),aD=a(_e(),1),lD=a(G(),1),cD=a(U(),1),Uy=a(j(),1);var Mwe=a(yo(),1),Dwe=a(Rt(),1);var Za=a(W(),1),ur=a(j(),1),iD=a(G(),1),ZT=a(U(),1),Iwe=a(ee(),1),Owe=a(he(),1),Nwe=a(_e(),1);var hU=a(j(),1),Awe=a(W(),1),rD=a(G(),1);var Rwe=a(G(),1);function tD({children:e}){let{hasStickyAction:t,postType:r}=(0,Rwe.useSelect)(o=>({hasStickyAction:o(R).getCurrentPost()._links?.["wp:action-sticky"]??!1,postType:o(R).getCurrentPostType()}),[]);return r!=="post"||!t?null:e}var gU=a(T(),1);function oD(){let e=(0,rD.useSelect)(r=>r(R).getEditedPostAttribute("sticky")??!1,[]),{editPost:t}=(0,rD.useDispatch)(R);return(0,gU.jsx)(tD,{children:(0,gU.jsx)(Awe.CheckboxControl,{className:"editor-post-sticky__checkbox-control",label:(0,hU.__)("Sticky"),help:(0,hU.__)("Pin this post to the top of the blog."),checked:e,onChange:()=>t({sticky:!e})})})}var an=a(T(),1),nD={"auto-draft":{label:(0,ur.__)("Draft"),icon:sb},draft:{label:(0,ur.__)("Draft"),icon:sb},pending:{label:(0,ur.__)("Pending"),icon:Xx},private:{label:(0,ur.__)("Private"),icon:Yx},future:{label:(0,ur.__)("Scheduled"),icon:cg},publish:{label:(0,ur.__)("Published"),icon:ag}},vU=[{label:(0,ur.__)("Draft"),value:"draft",description:(0,ur.__)("Not ready to publish.")},{label:(0,ur.__)("Pending"),value:"pending",description:(0,ur.__)("Waiting for review before publishing.")},{label:(0,ur.__)("Private"),value:"private",description:(0,ur.__)("Only visible to site admins and editors.")},{label:(0,ur.__)("Scheduled"),value:"future",description:(0,ur.__)("Publish automatically on a chosen date.")},{label:(0,ur.__)("Published"),value:"publish",description:(0,ur.__)("Visible to everyone.")}];function yU(){let{status:e,date:t,password:r,postId:o,postType:n,canEdit:i}=(0,iD.useSelect)(y=>{let{getEditedPostAttribute:b,getCurrentPostId:w,getCurrentPostType:S,getCurrentPost:x}=y(R);return{status:b("status"),date:b("date"),password:b("password"),postId:w(),postType:S(),canEdit:x()._links?.["wp:action-publish"]??!1}},[]),[s,l]=(0,ZT.useState)(!!r),c=(0,Nwe.useInstanceId)(yU,"editor-change-status__password-input"),{editEntityRecord:u}=(0,iD.useDispatch)(Iwe.store),[d,f]=(0,ZT.useState)(null),m=(0,ZT.useMemo)(()=>({anchor:d,"aria-label":(0,ur.__)("Status & visibility"),headerTitle:(0,ur.__)("Status & visibility"),placement:"left-start",offset:36,shift:!0}),[d]);if(rc.includes(n))return null;let h=({status:y=e,password:b=r,date:w=t})=>{u("postType",n,o,{status:y,date:w,password:b})},g=y=>{l(y),y||h({password:""})},v=y=>{let b=t,w=r;e==="future"&&new Date(t)>new Date&&(b=null),y==="private"&&r&&(w=""),h({status:y,date:b,password:w})};return(0,an.jsx)(Gt,{label:(0,ur.__)("Status"),ref:f,children:i?(0,an.jsx)(Za.Dropdown,{className:"editor-post-status",contentClassName:"editor-change-status__content",popoverProps:m,focusOnMount:!0,renderToggle:({onToggle:y,isOpen:b})=>(0,an.jsx)(Za.Button,{className:"editor-post-status__toggle",variant:"tertiary",size:"compact",onClick:y,icon:nD[e]?.icon,"aria-label":(0,ur.sprintf)((0,ur.__)("Change status: %s"),nD[e]?.label),"aria-expanded":b,children:nD[e]?.label}),renderContent:({onClose:y})=>(0,an.jsxs)(an.Fragment,{children:[(0,an.jsx)(Owe.__experimentalInspectorPopoverHeader,{title:(0,ur.__)("Status & visibility"),onClose:y}),(0,an.jsx)("form",{onSubmit:b=>{b.preventDefault(),y()},children:(0,an.jsxs)(Za.__experimentalVStack,{spacing:4,children:[(0,an.jsx)(Za.RadioControl,{className:"editor-change-status__options",hideLabelFromVision:!0,label:(0,ur.__)("Status"),options:vU,onChange:v,selected:e==="auto-draft"?"draft":e}),e==="future"&&(0,an.jsx)("div",{className:"editor-change-status__publish-date-wrapper",children:(0,an.jsx)(sU,{showPopoverHeaderActions:!1,isCompact:!0})}),e!=="private"&&(0,an.jsxs)(Za.__experimentalVStack,{as:"fieldset",spacing:4,className:"editor-change-status__password-fieldset",children:[(0,an.jsx)(Za.CheckboxControl,{label:(0,ur.__)("Password protected"),help:(0,ur.__)("Only visible to those who know the password."),checked:s,onChange:g}),s&&(0,an.jsx)("div",{className:"editor-change-status__password-input",children:(0,an.jsx)(Za.TextControl,{label:(0,ur.__)("Password"),onChange:b=>h({password:b}),value:r,placeholder:(0,ur.__)("Use a secure password"),type:"text",id:c,__next40pxDefaultSize:!0,maxLength:255})})]}),(0,an.jsx)(oD,{})]})})]})}):(0,an.jsx)("div",{className:"editor-post-status is-read-only",children:nD[e]?.label})})}var uD=a(T(),1);function dD({forceIsDirty:e}){let[t,r]=(0,cD.useState)(!1),o=(0,aD.useViewportMatch)("small"),{isAutosaving:n,isDirty:i,isNew:s,isPublished:l,isSaveable:c,isSaving:u,isSavingLocked:d,isScheduled:f,hasPublishAction:m,showIconLabels:h,postStatus:g,postStatusHasChanged:v,postType:y}=(0,lD.useSelect)(E=>{let{isEditedPostNew:C,isCurrentPostPublished:M,isCurrentPostScheduled:B,isEditedPostDirty:N,isSavingPost:z,isEditedPostSaveable:O,isPostSavingLocked:F,getCurrentPost:L,isAutosavingPost:H,getEditedPostAttribute:q,getPostEdits:Q}=E(R),{get:J}=E(Dwe.store);return{isAutosaving:H(),isDirty:e||N(),isNew:C(),isPublished:M(),isSaving:z(),isSaveable:O(),isSavingLocked:F(),isScheduled:B(),hasPublishAction:L()?._links?.["wp:action-publish"]??!1,showIconLabels:J("core","showIconLabels"),postStatus:q("status"),postStatusHasChanged:!!Q()?.status,postType:E(R).getCurrentPostType()}},[e]),b=g==="pending",{savePost:w}=(0,lD.useDispatch)(R),S=(0,aD.usePrevious)(u);if((0,cD.useEffect)(()=>{let E;return S&&!u&&(r(!0),E=setTimeout(()=>{r(!1)},1e3)),()=>clearTimeout(E)},[u]),y===Ls||!m&&b)return null;let x=!["pending","draft","auto-draft"].includes(g)&&vU.map(({value:E})=>E).includes(g);if(l||f||x||v&&["pending","draft"].includes(g))return null;let _=b?(0,Uy.__)("Save as pending"):(0,Uy.__)("Save draft"),P=(0,Uy.__)("Save"),I=t||!s&&!i,A=u||I,k=u||I||!c||d,D;return u?D=n?(0,Uy.__)("Autosaving"):(0,Uy.__)("Saving"):I?D=(0,Uy.__)("Saved"):o?D=_:h&&(D=P),(0,uD.jsxs)(sD.Button,{className:c||u?Z({"editor-post-save-draft":!A,"editor-post-saved-state":A,"is-saving":u,"is-autosaving":n,"is-saved":I,[(0,sD.__unstableGetAnimateClassName)({type:"loading"})]:u}):void 0,onClick:k?void 0:()=>w(),shortcut:k?void 0:Mwe.displayShortcut.primary("s"),variant:"tertiary",size:"compact",icon:o?void 0:D3,label:D||_,"aria-disabled":k,children:[A&&(0,uD.jsx)(cn,{icon:I?Qn:L3}),D]})}var Fwe=a(G(),1);function fD({children:e}){return(0,Fwe.useSelect)(r=>r(R).getCurrentPost()._links?.["wp:action-publish"]??!1,[])?e:null}var mD=a(W(),1),PS=a(j(),1),pD=a(U(),1),Lwe=a(G(),1);var ES=a(T(),1);function hD(){let[e,t]=(0,pD.useState)(null),r=(0,Lwe.useSelect)(s=>s(R).getCurrentPostType(),[]),o=(0,pD.useMemo)(()=>({anchor:e,"aria-label":(0,PS.__)("Change publish date"),placement:"left-start",offset:36,shift:!0}),[e]),n=SS(),i=SS({full:!0});return rc.includes(r)?null:(0,ES.jsx)(fD,{children:(0,ES.jsx)(Gt,{label:(0,PS.__)("Publish"),ref:t,children:(0,ES.jsx)(mD.Dropdown,{popoverProps:o,focusOnMount:!0,className:"editor-post-schedule__panel-dropdown",contentClassName:"editor-post-schedule__dialog",renderToggle:({onToggle:s,isOpen:l})=>(0,ES.jsx)(mD.Button,{size:"compact",className:"editor-post-schedule__dialog-toggle",variant:"tertiary",tooltipPosition:"middle left",onClick:s,"aria-label":(0,PS.sprintf)((0,PS.__)("Change date: %s"),n),label:i,showTooltip:n!==i,"aria-expanded":l,children:n}),renderContent:({onClose:s})=>(0,ES.jsx)(bS,{onClose:s})})})})}var gD=a(W(),1),kS=a(j(),1),vD=a(G(),1),Bwe=a(U(),1),Vwe=a(rl(),1);var Wy=a(T(),1);function jwe(){(0,Vwe.default)("wp.editor.PostSwitchToDraftButton",{since:"6.7",version:"6.9"});let[e,t]=(0,Bwe.useState)(!1),{editPost:r,savePost:o}=(0,vD.useDispatch)(R),{isSaving:n,isPublished:i,isScheduled:s}=(0,vD.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,kS.__)("Are you sure you want to unpublish this post?"),u=(0,kS.__)("Unpublish")):s&&(c=(0,kS.__)("Are you sure you want to unschedule this post?"),u=(0,kS.__)("Unschedule"));let d=()=>{t(!1),r({status:"draft"}),o()};return(0,Wy.jsxs)(Wy.Fragment,{children:[(0,Wy.jsx)(gD.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,kS.__)("Switch to draft")}),(0,Wy.jsx)(gD.__experimentalConfirmDialog,{isOpen:e,onConfirm:d,onCancel:()=>t(!1),confirmButtonText:u,children:c})]})}var zwe=a(G(),1),XT=a(j(),1);var bU=a(T(),1);function yD(){let{syncStatus:e,postType:t}=(0,zwe.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,bU.jsx)(Gt,{label:(0,XT.__)("Sync status"),children:(0,bU.jsx)("div",{className:"editor-post-sync-status__value",children:e==="unsynced"?(0,XT._x)("Not synced","pattern (singular)"):(0,XT._x)("Synced","pattern (singular)")})})}var Hwe=a(U(),1),Uwe=a(G(),1),Wwe=a(ee(),1);var wU=a(T(),1),PXe=e=>e;function kXe({taxonomyWrapper:e=PXe}){let{postType:t,taxonomies:r}=(0,Uwe.useSelect)(n=>({postType:n(R).getCurrentPostType(),taxonomies:n(Wwe.store).getEntityRecords("root","taxonomy")}),[]);return(r??[]).filter(n=>n.types.includes(t)&&n.visibility?.show_ui).map(n=>{let i=n.hierarchical?qM:UM;return(0,wU.jsx)(Hwe.Fragment,{children:e((0,wU.jsx)(i,{slug:n.slug}),n)},`taxonomy-${n.slug}`)})}var RS=kXe;var Gwe=a(G(),1),Ywe=a(ee(),1);function bD({children:e}){return(0,Gwe.useSelect)(r=>{let o=r(R).getCurrentPostType();return r(Ywe.store).getEntityRecords("root","taxonomy")?.some(i=>i.types.includes(o))},[])?e:null}var qwe=a(W(),1),wD=a(G(),1);var QT=a(T(),1);function RXe({taxonomy:e,children:t}){let r=e?.slug,o=r?`taxonomy-panel-${r}`:"",{isEnabled:n,isOpened:i}=(0,wD.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,wD.useDispatch)(R);if(!n)return null;let l=e?.labels?.menu_name;return l?(0,QT.jsx)(qwe.PanelBody,{title:l,opened:i,onToggle:()=>s(o),children:t}):null}function SD(){return(0,QT.jsx)(bD,{children:(0,QT.jsx)(RS,{taxonomyWrapper:(e,t)=>(0,QT.jsx)(RXe,{taxonomy:t,children:e})})})}var dSe=a(_U(),1),CU=a(j(),1),fSe=a(ee(),1),TD=a(G(),1),mSe=a(_e(),1);var Vh=a(T(),1);function $T(){let e=(0,mSe.useInstanceId)($T),{value:t,type:r,id:o}=(0,TD.useSelect)(i=>{let{getCurrentPostType:s,getCurrentPostId:l,getEditedPostContent:c}=i(R);return{value:c(),type:s(),id:l()}},[]),{editEntityRecord:n}=(0,TD.useDispatch)(fSe.store);return(0,Vh.jsxs)(Vh.Fragment,{children:[(0,Vh.jsx)(tr,{render:(0,Vh.jsx)("label",{htmlFor:`post-content-${e}`}),children:(0,CU.__)("Type text or HTML")}),(0,Vh.jsx)(dSe.default,{autoComplete:"off",dir:"auto",value:t,onChange:i=>{n("postType",r,o,{content:i.target.value,blocks:void 0,selection:void 0})},className:"editor-post-text-editor",id:`post-content-${e}`,placeholder:(0,CU.__)("Start writing with text or HTML")})]})}var hSe=a(j(),1),IS=a(U(),1),gSe=a(Ot(),1),OD=a(G(),1),TU=a(he(),1),vSe=a(yo(),1),ySe=a(bt(),1),OS=a(aT(),1),bSe=a(_e(),1),EU=a(py(),1);var ED="wp-block wp-block-post-title block-editor-block-list__block editor-post-title editor-post-title__input rich-text",PD=/[\r\n]+/g;var AS=a(U(),1),pSe=a(G(),1);function kD(e){let t=(0,AS.useRef)(),{isCleanNewPost:r}=(0,pSe.useSelect)(o=>{let{isCleanNewPost:n}=o(R);return{isCleanNewPost:n()}},[]);return(0,AS.useImperativeHandle)(e,()=>({focus:()=>{t?.current?.focus()}})),(0,AS.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 RD=a(G(),1);function AD(){let{editPost:e}=(0,RD.useDispatch)(R),{title:t}=(0,RD.useSelect)(o=>{let{getEditedPostAttribute:n}=o(R);return{title:n("title")}},[]);function r(o){e({title:o})}return{title:t,setTitle:r}}var ID=a(T(),1),{useRichText:jXe}=Y(OS.privateApis),zXe=(0,IS.forwardRef)((e,t)=>{let{placeholder:r,isEditingContentOnlySection:o,isPreview:n}=(0,OD.useSelect)(E=>{let{getSettings:C,getEditedContentOnlySection:M}=Y(E(TU.store)),{titlePlaceholder:B,isPreviewMode:N}=C();return{placeholder:B,isEditingContentOnlySection:!!M(),isPreview:N}},[]),[i,s]=(0,IS.useState)(!1),{ref:l}=kD(t),{title:c,setTitle:u}=AD(),[d,f]=(0,IS.useState)({}),{clearSelectedBlock:m,insertBlocks:h,insertDefaultBlock:g}=(0,OD.useDispatch)(TU.store),v=(0,gSe.decodeEntities)(r)||(0,hSe.__)("Add title"),{value:y,onChange:b,ref:w}=jXe({value:c,onChange(E){u(E.replace(PD," "))},placeholder:v,selectionStart:d.start,selectionEnd:d.end,onSelectionChange(E,C){f(M=>{let{start:B,end:N}=M;return B===E&&N===C?M:{start:E,end:C}})},__unstableDisableFormats:!1});function S(E){h(E,0)}function x(){s(!0),m()}function _(){s(!1),f({})}function P(){g(void 0,void 0,0)}function I(E){E.keyCode===vSe.ENTER&&(E.preventDefault(),P())}function A(E){let C=E.clipboardData,M="",B="";try{M=C.getData("text/plain"),B=C.getData("text/html")}catch{return}let N=(0,ySe.pasteHandler)({HTML:B,plainText:M});if(E.preventDefault(),!!N.length)if(typeof N!="string"){let[z]=N;if(!c&&(z.name==="core/heading"||z.name==="core/paragraph")){let O=(0,EU.__unstableStripHTML)(z.attributes.content);u(O),S(N.slice(1))}else S(N)}else{let z=(0,EU.__unstableStripHTML)(N);b((0,OS.insert)(y,(0,OS.create)({html:z})))}}let k=Z(ED,{"is-selected":i}),D=o?{opacity:.2}:void 0;return(0,ID.jsx)("h1",{ref:(0,bSe.useMergeRefs)([w,l]),contentEditable:!o&&!n,className:k,"aria-label":v,role:"textbox","aria-multiline":"true",onFocus:x,onBlur:_,onKeyDown:I,onPaste:A,style:D})}),ND=(0,IS.forwardRef)((e,t)=>(0,ID.jsx)(Xr,{supportKeys:"title",children:(0,ID.jsx)(zXe,{ref:t})}));var wSe=a(W(),1),SSe=a(j(),1),xSe=a(Ot(),1),_Se=a(G(),1),CSe=a(he(),1),MD=a(U(),1);var TSe=a(T(),1);function HXe(e,t){let{placeholder:r}=(0,_Se.useSelect)(h=>{let{getSettings:g}=h(CSe.store),{titlePlaceholder:v}=g();return{placeholder:v}},[]),[o,n]=(0,MD.useState)(!1),{title:i,setTitle:s}=AD(),{ref:l}=kD(t);function c(h){s(h.replace(PD," "))}function u(){n(!0)}function d(){n(!1)}let f=Z(ED,{"is-selected":o,"is-raw-text":!0}),m=(0,xSe.decodeEntities)(r)||(0,SSe.__)("Add title");return(0,TSe.jsx)(wSe.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 DD=(0,MD.forwardRef)(HXe);var NS=a(j(),1),LD=a(W(),1),MS=a(G(),1),kSe=a(U(),1);var ESe=a(G(),1),PSe=a(ee(),1);function FD({children:e}){let{canTrashPost:t}=(0,ESe.useSelect)(r=>{let{isEditedPostNew:o,getCurrentPostId:n,getCurrentPostType:i}=r(R),{canUser:s}=r(PSe.store),l=i(),c=n(),u=o(),d=c?s("delete",{kind:"postType",name:l,id:c}):!1;return{canTrashPost:(!u||c)&&d&&!_G.includes(l)}},[]);return t?e:null}var eE=a(T(),1);function DS({onActionPerformed:e}){let t=(0,MS.useRegistry)(),{isNew:r,isDeleting:o,postId:n,title:i}=(0,MS.useSelect)(d=>{let f=d(R);return{isNew:f.isEditedPostNew(),isDeleting:f.isDeletingPost(),postId:f.getCurrentPostId(),title:f.getCurrentPostAttribute("title")}},[]),{trashPost:s}=(0,MS.useDispatch)(R),[l,c]=(0,kSe.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,eE.jsxs)(FD,{children:[(0,eE.jsx)(LD.Button,{__next40pxDefaultSize:!0,className:"editor-post-trash",isDestructive:!0,variant:"secondary",isBusy:o,"aria-disabled":o,onClick:o?void 0:()=>c(!0),children:(0,NS.__)("Move to trash")}),(0,eE.jsx)(LD.__experimentalConfirmDialog,{isOpen:l,onConfirm:u,onCancel:()=>c(!1),confirmButtonText:(0,NS.__)("Move to trash"),size:"small",children:(0,NS.sprintf)((0,NS.__)('Are you sure you want to move "%s" to the trash?'),i)})]})}var tE=a(G(),1),rE=a(vo(),1),BD=a(U(),1),RSe=a(he(),1),Gy=a(j(),1),ga=a(W(),1),ASe=a(xt(),1);var ISe=a(ee(),1),VD=a(_e(),1);var fo=a(T(),1);function oE({onClose:e}){let{isEditable:t,postSlug:r,postLink:o,permalinkPrefix:n,permalinkSuffix:i,permalink:s}=(0,tE.useSelect)(h=>{let g=h(R).getCurrentPost(),v=h(R).getCurrentPostType(),y=h(ISe.store).getPostType(v),b=h(R).getPermalinkParts(),w=g?._links?.["wp:action-publish"]??!1;return{isEditable:h(R).isPermalinkEditable()&&w,postSlug:(0,rE.safeDecodeURIComponent)(h(R).getEditedPostSlug()),viewPostLabel:y?.labels.view_item,postLink:g.link,permalinkPrefix:b?.prefix,permalinkSuffix:b?.suffix,permalink:(0,rE.safeDecodeURIComponent)(h(R).getPermalink())}},[]),{editPost:l}=(0,tE.useDispatch)(R),{createNotice:c}=(0,tE.useDispatch)(ASe.store),[u,d]=(0,BD.useState)(!1),f=(0,VD.useCopyToClipboard)(s,()=>{c("info",(0,Gy.__)("Copied Permalink to clipboard."),{isDismissible:!0,type:"snackbar"})}),m="editor-post-url__slug-description-"+(0,VD.useInstanceId)(oE);return(0,fo.jsxs)("div",{className:"editor-post-url",children:[(0,fo.jsx)(RSe.__experimentalInspectorPopoverHeader,{title:(0,Gy.__)("Slug"),onClose:e}),(0,fo.jsxs)(ga.__experimentalVStack,{spacing:3,children:[t&&(0,fo.jsx)("p",{className:"editor-post-url__intro",children:(0,BD.createInterpolateElement)((0,Gy.__)("<span>Customize the last part of the Permalink.</span> <a>Learn more.</a>"),{span:(0,fo.jsx)("span",{id:m}),a:(0,fo.jsx)(ga.ExternalLink,{href:(0,Gy.__)("https://wordpress.org/documentation/article/page-post-settings-sidebar/#permalink")})})}),(0,fo.jsxs)("div",{children:[t&&(0,fo.jsxs)(fo.Fragment,{children:[(0,fo.jsx)(ga.__experimentalInputControl,{__next40pxDefaultSize:!0,prefix:(0,fo.jsx)(ga.__experimentalInputControlPrefixWrapper,{children:"/"}),suffix:(0,fo.jsx)(ga.__experimentalInputControlSuffixWrapper,{variant:"control",children:(0,fo.jsx)(ga.Button,{icon:Fx,ref:f,size:"small",label:"Copy"})}),label:(0,Gy.__)("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,rE.cleanForSlug)(h.target.value)}),u&&d(!1)},"aria-describedby":m}),(0,fo.jsxs)("p",{className:"editor-post-url__permalink",children:[(0,fo.jsx)("span",{className:"editor-post-url__permalink-visual-label",children:(0,Gy.__)("Permalink:")}),(0,fo.jsxs)(ga.ExternalLink,{className:"editor-post-url__link",href:o,target:"_blank",children:[(0,fo.jsx)("span",{className:"editor-post-url__link-prefix",children:n}),(0,fo.jsx)("span",{className:"editor-post-url__link-slug",children:r}),(0,fo.jsx)("span",{className:"editor-post-url__link-suffix",children:i})]})]})]}),!t&&(0,fo.jsx)(ga.ExternalLink,{className:"editor-post-url__link",href:o,target:"_blank",children:o})]})]})]})}var OSe=a(G(),1),NSe=a(ee(),1);function jD({children:e}){return(0,OSe.useSelect)(r=>{let o=r(R).getCurrentPostType();return!(!r(NSe.store).getPostType(o)?.viewable||!r(R).getCurrentPost().link||!r(R).getPermalinkParts())},[])?e:null}var MSe=a(G(),1),zD=a(vo(),1);function DSe(){return PU()}function PU(){let e=(0,MSe.useSelect)(t=>t(R).getPermalink(),[]);return(0,zD.filterURLForDisplay)((0,zD.safeDecodeURIComponent)(e))}var HD=a(U(),1),UD=a(G(),1),LS=a(W(),1),FS=a(j(),1),FSe=a(vo(),1),LSe=a(ee(),1);var Xa=a(T(),1);function WD(){let{isFrontPage:e}=(0,UD.useSelect)(i=>{let{getCurrentPostId:s}=i(R),{getEditedEntityRecord:l,canUser:c}=i(LSe.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,HD.useState)(null),o=(0,HD.useMemo)(()=>({anchor:t,placement:"left-start",offset:36,shift:!0}),[t]),n=e?(0,FS.__)("Link"):(0,FS.__)("Slug");return(0,Xa.jsx)(jD,{children:(0,Xa.jsxs)(Gt,{label:n,ref:r,children:[!e&&(0,Xa.jsx)(LS.Dropdown,{popoverProps:o,className:"editor-post-url__panel-dropdown",contentClassName:"editor-post-url__panel-dialog",focusOnMount:!0,renderToggle:({isOpen:i,onToggle:s})=>(0,Xa.jsx)(UXe,{isOpen:i,onClick:s}),renderContent:({onClose:i})=>(0,Xa.jsx)(oE,{onClose:i})}),e&&(0,Xa.jsx)(WXe,{})]})})}function UXe({isOpen:e,onClick:t}){let{slug:r}=(0,UD.useSelect)(n=>({slug:n(R).getEditedPostSlug()}),[]),o=(0,FSe.safeDecodeURIComponent)(r);return(0,Xa.jsx)(LS.Button,{size:"compact",className:"editor-post-url__panel-toggle",variant:"tertiary","aria-expanded":e,"aria-label":(0,FS.sprintf)((0,FS.__)("Change link: %s"),o),onClick:t,children:(0,Xa.jsx)(Xa.Fragment,{children:o})})}function WXe(){let{postLink:e}=(0,UD.useSelect)(t=>{let{getCurrentPost:r}=t(R);return{postLink:r()?.link}},[]);return(0,Xa.jsx)(LS.ExternalLink,{className:"editor-post-url__front-page-link",href:e,target:"_blank",children:e})}var BSe=a(G(),1);function VSe({render:e}){let t=(0,BSe.useSelect)(r=>r(R).getCurrentPost()._links?.["wp:action-publish"]??!1);return e({canEdit:t})}var QSe=a(j(),1),qD=a(W(),1),JSe=a(G(),1);var $Se=a(U(),1),exe=a(he(),1);var im=a(j(),1),KSe=a(G(),1),ZSe=a(he(),1);var jSe=a(G(),1),zSe=a(j(),1),HSe=a($b(),1);var USe=a(T(),1);function BS(){let e=(0,jSe.useSelect)(r=>r(R).getEditedPostAttribute("content"),[]),t=(0,zSe._x)("words","Word count type. Do not translate!");return(0,USe.jsx)("span",{className:"word-count",children:(0,HSe.count)(e,t)})}var WSe=a(G(),1),jh=a(j(),1),GSe=a($b(),1),kU=a(U(),1);var GD=a(T(),1),GXe=189;function VS(){let e=(0,WSe.useSelect)(n=>n(R).getEditedPostAttribute("content"),[]),t=(0,jh._x)("words","Word count type. Do not translate!"),r=Math.round((0,GSe.count)(e,t)/GXe),o=r===0?(0,kU.createInterpolateElement)((0,jh.__)("<span>< 1</span> minute"),{span:(0,GD.jsx)("span",{})}):(0,kU.createInterpolateElement)((0,jh.sprintf)((0,jh._n)("<span>%s</span> minute","<span>%s</span> minutes",r),r),{span:(0,GD.jsx)("span",{})});return(0,GD.jsx)("span",{className:"time-to-read",children:o})}var YSe=a(G(),1),qSe=a($b(),1);function jS(){let e=(0,YSe.useSelect)(t=>t(R).getEditedPostAttribute("content"),[]);return(0,qSe.count)(e,"characters_including_spaces")}var zr=a(T(),1);function YXe({hasOutlineItemsDisabled:e,onRequestClose:t}){let{headingCount:r,paragraphCount:o,numberOfBlocks:n}=(0,KSe.useSelect)(i=>{let{getGlobalBlockCount:s}=i(ZSe.store);return{headingCount:s("core/heading"),paragraphCount:s("core/paragraph"),numberOfBlocks:s()}},[]);return(0,zr.jsxs)(zr.Fragment,{children:[(0,zr.jsx)("div",{className:"table-of-contents__wrapper",role:"note","aria-label":(0,im.__)("Document Statistics"),tabIndex:"0",children:(0,zr.jsxs)("ul",{role:"list",className:"table-of-contents__counts",children:[(0,zr.jsxs)("li",{className:"table-of-contents__count",children:[(0,im.__)("Words"),(0,zr.jsx)(BS,{})]}),(0,zr.jsxs)("li",{className:"table-of-contents__count",children:[(0,im.__)("Characters"),(0,zr.jsx)("span",{className:"table-of-contents__number",children:(0,zr.jsx)(jS,{})})]}),(0,zr.jsxs)("li",{className:"table-of-contents__count",children:[(0,im.__)("Time to read"),(0,zr.jsx)(VS,{})]}),(0,zr.jsxs)("li",{className:"table-of-contents__count",children:[(0,im.__)("Headings"),(0,zr.jsx)("span",{className:"table-of-contents__number",children:r})]}),(0,zr.jsxs)("li",{className:"table-of-contents__count",children:[(0,im.__)("Paragraphs"),(0,zr.jsx)("span",{className:"table-of-contents__number",children:o})]}),(0,zr.jsxs)("li",{className:"table-of-contents__count",children:[(0,im.__)("Blocks"),(0,zr.jsx)("span",{className:"table-of-contents__number",children:n})]})]})}),r>0&&(0,zr.jsxs)(zr.Fragment,{children:[(0,zr.jsx)("hr",{}),(0,zr.jsx)("h2",{className:"table-of-contents__title",children:(0,im.__)("Document Outline")}),(0,zr.jsx)(Yw,{onSelect:t,hasOutlineItemsDisabled:e})]})]})}var XSe=YXe;var YD=a(T(),1);function qXe({hasOutlineItemsDisabled:e,repositionDropdown:t,...r},o){let n=(0,JSe.useSelect)(i=>!!i(exe.store).getBlockCount(),[]);return(0,YD.jsx)(qD.Dropdown,{popoverProps:{placement:t?"right":"bottom"},className:"table-of-contents",contentClassName:"table-of-contents__popover",renderToggle:({isOpen:i,onToggle:s})=>(0,YD.jsx)(qD.Button,{__next40pxDefaultSize:!0,...r,ref:o,onClick:n?s:void 0,icon:v4,"aria-expanded":i,"aria-haspopup":"true",label:(0,QSe.__)("Details"),tooltipPosition:"bottom","aria-disabled":!n}),renderContent:({onClose:i})=>(0,YD.jsx)(XSe,{onRequestClose:i,hasOutlineItemsDisabled:e})})}var txe=(0,$Se.forwardRef)(qXe);var rxe=a(j(),1),oxe=a(U(),1),nxe=a(G(),1),ixe=a(ee(),1);function sxe(){let{__experimentalGetDirtyEntityRecords:e}=(0,nxe.useSelect)(ixe.store);return(0,oxe.useEffect)(()=>{let t=r=>{if(e().length>0)return r.returnValue=(0,rxe.__)("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 RU=a(rl(),1),cxe=a(U(),1),ve=a(he(),1),uxe=a(lxe(),1),dxe=a(T(),1);function ct(e,t,r=[]){let o=(0,cxe.forwardRef)((n,i)=>((0,RU.default)("wp.editor."+e,{since:"5.3",alternative:"wp.blockEditor."+e,version:"6.2"}),(0,dxe.jsx)(t,{ref:i,...n})));return r.forEach(n=>{o[n]=ct(e+"."+n,t[n])}),o}function md(e,t){return(...r)=>((0,RU.default)("wp.editor."+e,{since:"5.3",alternative:"wp.blockEditor."+e,version:"6.2"}),t(...r))}var fxe=ct("RichText",ve.RichText,["Content"]);fxe.isEmpty=md("RichText.isEmpty",ve.RichText.isEmpty);var KXe=ct("Autocomplete",ve.Autocomplete),ZXe=ct("AlignmentToolbar",ve.AlignmentToolbar),XXe=ct("BlockAlignmentToolbar",ve.BlockAlignmentToolbar),QXe=ct("BlockControls",ve.BlockControls,["Slot"]),JXe=ct("BlockEdit",ve.BlockEdit),$Xe=ct("BlockEditorKeyboardShortcuts",ve.BlockEditorKeyboardShortcuts),eQe=ct("BlockFormatControls",ve.BlockFormatControls,["Slot"]),tQe=ct("BlockIcon",ve.BlockIcon),rQe=ct("BlockInspector",ve.BlockInspector),oQe=ct("BlockList",ve.BlockList),nQe=ct("BlockMover",ve.BlockMover),iQe=ct("BlockNavigationDropdown",ve.BlockNavigationDropdown),sQe=ct("BlockSelectionClearer",ve.BlockSelectionClearer),aQe=ct("BlockSettingsMenu",ve.BlockSettingsMenu),lQe=ct("BlockTitle",ve.BlockTitle),cQe=ct("BlockToolbar",ve.BlockToolbar),uQe=ct("ColorPalette",ve.ColorPalette),dQe=ct("ContrastChecker",ve.ContrastChecker),fQe=ct("CopyHandler",ve.CopyHandler),mQe=ct("DefaultBlockAppender",ve.DefaultBlockAppender),pQe=ct("FontSizePicker",ve.FontSizePicker),hQe=ct("Inserter",ve.Inserter),gQe=ct("InnerBlocks",ve.InnerBlocks,["ButtonBlockAppender","DefaultBlockAppender","Content"]),vQe=ct("InspectorAdvancedControls",ve.InspectorAdvancedControls,["Slot"]),yQe=ct("InspectorControls",ve.InspectorControls,["Slot"]),bQe=ct("PanelColorSettings",ve.PanelColorSettings),wQe=ct("PlainText",ve.PlainText),SQe=ct("RichTextShortcut",ve.RichTextShortcut),xQe=ct("RichTextToolbarButton",ve.RichTextToolbarButton),_Qe=ct("__unstableRichTextInputEvent",ve.__unstableRichTextInputEvent),CQe=ct("MediaPlaceholder",ve.MediaPlaceholder),TQe=ct("MediaUpload",ve.MediaUpload),EQe=ct("MediaUploadCheck",ve.MediaUploadCheck),PQe=ct("MultiSelectScrollIntoView",ve.MultiSelectScrollIntoView),kQe=ct("NavigableToolbar",ve.NavigableToolbar),RQe=ct("ObserveTyping",ve.ObserveTyping),AQe=ct("SkipToSelectedBlock",ve.SkipToSelectedBlock),IQe=ct("URLInput",ve.URLInput),OQe=ct("URLInputButton",ve.URLInputButton),NQe=ct("URLPopover",ve.URLPopover),MQe=ct("Warning",ve.Warning),DQe=ct("WritingFlow",ve.WritingFlow),FQe=md("createCustomColorsHOC",ve.createCustomColorsHOC),LQe=md("getColorClassName",ve.getColorClassName),BQe=md("getColorObjectByAttributeValues",ve.getColorObjectByAttributeValues),VQe=md("getColorObjectByColorValue",ve.getColorObjectByColorValue),jQe=md("getFontSize",ve.getFontSize),zQe=md("getFontSizeClass",ve.getFontSizeClass),HQe=md("withColorContext",ve.withColorContext),UQe=md("withColors",ve.withColors),WQe=md("withFontSizes",ve.withFontSizes);var GQe=Bw,YQe=Bw;function qQe(e=[]){return e.push({...X5},{...Q5}),e}(0,mxe.addFilter)("editor.Autocomplete.completers","editor/autocompleters/set-default-completers",qQe);var pxe=a(U(),1),AU=a(xn(),1),hxe=a(rl(),1),KD=a(Im(),1);var zS=a(T(),1),{MediaUploadModal:KQe}=Y(KD.privateApis),ZQe=class extends pxe.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,zS.jsxs)(zS.Fragment,{children:[s({open:this.openModal}),(0,zS.jsx)(KQe,{allowedTypes:e,multiple:t,value:r,onSelect:c=>{o(c),this.closeModal()},onClose:this.closeModal,title:n,isOpen:l,modalClass:i})]})}};window.__experimentalDataViewsMediaModal?(0,AU.addFilter)("editor.MediaUpload","core/editor/components/media-upload",()=>((0,hxe.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."}),ZQe)):(0,AU.addFilter)("editor.MediaUpload","core/editor/components/media-upload",()=>KD.MediaUpload);var vxe=a(xn(),1),yxe=a(ic(),1),bxe=a(_e(),1),ZD=a(he(),1),IU=a(G(),1),wxe=a(bt(),1);var qc=a(T(),1),{PatternOverridesControls:XQe,ResetOverridesControl:QQe,PATTERN_TYPES:JQe,PATTERN_SYNC_TYPES:gxe}=Y(yxe.privateApis),$Qe=(0,bxe.createHigherOrderComponent)(e=>t=>{let r=(0,IU.useSelect)(o=>{let{__experimentalBlockBindingsSupportedAttributes:n}=o(ZD.store).getSettings();return!!n?.[t.name]},[t.name]);return(0,qc.jsxs)(qc.Fragment,{children:[(0,qc.jsx)(e,{...t},"edit"),t.isSelected&&r&&(0,qc.jsx)(eJe,{...t})]})},"withPatternOverrideControls");function eJe(e){let t=(0,ZD.useBlockEditingMode)(),{hasPatternOverridesSource:r,isEditingSyncedPattern:o}=(0,IU.useSelect)(c=>{let{getCurrentPostType:u,getEditedPostAttribute:d}=c(R);return{hasPatternOverridesSource:!!(0,wxe.getBlockBindingsSource)("core/pattern-overrides"),isEditingSyncedPattern:u()===JQe.user&&d("meta")?.wp_pattern_sync_status!==gxe.unsynced&&d("wp_pattern_sync_status")!==gxe.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,qc.jsxs)(qc.Fragment,{children:[s&&(0,qc.jsx)(XQe,{...e}),l&&(0,qc.jsx)(QQe,{...e})]}):null}(0,vxe.addFilter)("editor.BlockEdit","core/editor/with-pattern-override-controls",$Qe);var Sxe=a(xn(),1),xxe=a(_e(),1),_xe=a(U(),1),OU=a(j(),1),HS=a(he(),1),XD=a(W(),1),Cxe=a(G(),1),pd=a(T(),1),tJe=["core/navigation-link","core/navigation-submenu"];function rJe({attributes:e}){let{kind:t,id:r,type:o}=e,n=(0,HS.useBlockEditingMode)(),i=(0,Cxe.useSelect)(l=>l(HS.store).getSettings().onNavigateToEntityRecord,[]),s=(0,_xe.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,pd.jsx)(HS.__unstableBlockToolbarLastItem,{children:(0,pd.jsx)(XD.ToolbarGroup,{children:(0,pd.jsx)(XD.ToolbarButton,{name:"view",title:(0,OU.__)("View"),onClick:s,children:(0,OU.__)("View")})})})}var oJe=(0,xxe.createHigherOrderComponent)(e=>t=>{let r=tJe.includes(t.name);return(0,pd.jsxs)(pd.Fragment,{children:[(0,pd.jsx)(e,{...t},"edit"),t.isSelected&&r&&(0,pd.jsx)(rJe,{...t})]})},"withNavigationViewButton");(0,Sxe.addFilter)("editor.BlockEdit","core/editor/with-navigation-view-button",oJe);var Txe=a(xn(),1),Exe=a(_e(),1),Pxe=a(U(),1),NU=a(j(),1),US=a(he(),1),QD=a(W(),1),zh=a(G(),1);var hd=a(T(),1),nJe="core/navigation",iJe="core/template-part",sJe="edit-post/block";function aJe({clientId:e}){let t=(0,zh.useRegistry)(),{selectBlock:r,flashBlock:o}=(0,zh.useDispatch)(US.store),{requestInspectorTab:n}=Y((0,zh.useDispatch)(US.store)),{enableComplementaryArea:i}=(0,zh.useDispatch)(Le),{hasNavigationBlocks:s,firstNavigationBlockId:l,isNavigationEditable:c}=(0,zh.useSelect)(d=>{let{getClientIdsOfDescendants:f,getBlockName:m,getBlockEditingMode:h}=d(US.store),v=f(e).filter(w=>m(w)===nJe),y=v.length>0,b=y?v[0]:null;return{hasNavigationBlocks:y,firstNavigationBlockId:b,isNavigationEditable:h(b)!=="disabled"}},[e]),u=(0,Pxe.useCallback)(()=>{l&&t.batch(()=>{r(l),o(l,500),i("core",sJe),n("list",{openPanel:l})})},[l,t,r,o,i,n]);return!s||!c?null:(0,hd.jsx)(US.__unstableBlockToolbarLastItem,{children:(0,hd.jsx)(QD.ToolbarGroup,{children:(0,hd.jsx)(QD.ToolbarButton,{label:(0,NU.__)("Edit navigation"),onClick:u,children:(0,NU.__)("Edit navigation")})})})}var lJe=(0,Exe.createHigherOrderComponent)(e=>t=>{let r=t.name===iJe;return(0,hd.jsxs)(hd.Fragment,{children:[(0,hd.jsx)(e,{...t},"edit"),t.isSelected&&r&&(0,hd.jsx)(aJe,{clientId:t.clientId})]})},"withTemplatePartNavigationEditButton");(0,Txe.addFilter)("editor.BlockEdit","core/editor/with-template-part-navigation-edit-button",lJe);var Axe=a(xn(),1),Ixe=a(_e(),1),Hh=a(he(),1),nE=a(W(),1),sm=a(j(),1),am=a(bt(),1),$D=a(U(),1),WS=a(G(),1),Oxe=a(xt(),1),Nxe=a(ee(),1);function MU(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 Ul=a(T(),1),{cleanEmptyObject:cJe}=Y(Hh.privateApis),kxe={...am.__EXPERIMENTAL_STYLE_PROPERTY,blockGap:{value:["spacing","blockGap"]}},uJe={"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"},dJe={"border.color":"borderColor","color.background":"backgroundColor","color.text":"textColor","color.gradient":"gradient","typography.fontSize":"fontSize","typography.fontFamily":"fontFamily"},fJe=["border","color","spacing","typography"],Rxe=(e,t)=>{let r=e;return t.forEach(o=>{r=r?.[o]}),r},mJe=["borderColor","borderWidth","borderStyle"],Mxe=["top","right","bottom","left"];function pJe(e,t,r){if(!e&&!t)return[];let o=[...JD("top",e,r),...JD("right",e,r),...JD("bottom",e,r),...JD("left",e,r)],{color:n,style:i,width:s}=e||{};return(t||n||s)&&!i&&Mxe.forEach(c=>{r?.[c]?.style||o.push({path:["border",c,"style"],value:"solid"})}),o}function JD(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 hJe(e,t,r){let o=(0,WS.useSelect)(i=>Y(i(am.store)).getSupportedStyles(e),[e]),n=r?.styles?.blocks?.[e];return(0,$D.useMemo)(()=>{let i=o.flatMap(s=>{if(!kxe[s])return[];let{value:l}=kxe[s],c=l.join("."),u=t[dJe[c]],d=u?`var:preset|${uJe[c]}|${u}`:Rxe(t.style,l);if(s==="linkColor"){let f=d?[{path:l,value:d}]:[],m=["elements","link",":hover","color","text"],h=Rxe(t.style,m);return h&&f.push({path:m,value:h}),f}if(mJe.includes(s)&&d){let f=[{path:l,value:d}];return Mxe.forEach(m=>{let h=[...l];h.splice(-1,0,m),f.push({path:h,value:d})}),f}return d?[{path:l,value:d}]:[]});return pJe(t.style?.border,t.borderColor,n?.border).forEach(s=>i.push(s)),i},[o,t,n])}function gJe({name:e,attributes:t,setAttributes:r}){let{user:o,setUser:n}=Zr(),i=hJe(e,t,o),{__unstableMarkNextChangeAsNotPersistent:s}=(0,WS.useDispatch)(Hh.store),{createSuccessNotice:l}=(0,WS.useDispatch)(Oxe.store),c=(0,$D.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)MU(d,h,void 0),MU(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:cJe(d)};s(),r(m),n(f,{undoIgnore:!0}),l((0,sm.sprintf)((0,sm.__)("%s styles applied."),(0,am.getBlockType)(e).title),{type:"snackbar",actions:[{label:(0,sm.__)("Undo"),onClick(){s(),r(t),n(o,{undoIgnore:!0})}}]})}},[s,t,i,l,e,r,n,o]);return(0,Ul.jsxs)(nE.BaseControl,{className:"editor-push-changes-to-global-styles-control",help:(0,sm.sprintf)((0,sm.__)("Apply this block\u2019s typography, spacing, dimensions, and color styles to all %s blocks."),(0,am.getBlockType)(e).title),children:[(0,Ul.jsx)(nE.BaseControl.VisualLabel,{children:(0,sm.__)("Styles")}),(0,Ul.jsx)(nE.Button,{__next40pxDefaultSize:!0,variant:"secondary",accessibleWhenDisabled:!0,disabled:i.length===0,onClick:c,children:(0,sm.__)("Apply globally")})]})}function vJe(e){let t=(0,Hh.useBlockEditingMode)(),r=(0,WS.useSelect)(i=>i(Nxe.store).getCurrentTheme()?.is_block_theme,[]),o=fJe.some(i=>(0,am.hasBlockSupport)(e.name,i));return t==="default"&&o&&r?(0,Ul.jsx)(Hh.InspectorAdvancedControls,{children:(0,Ul.jsx)(gJe,{...e})}):null}var yJe=(0,Ixe.createHigherOrderComponent)(e=>t=>(0,Ul.jsxs)(Ul.Fragment,{children:[(0,Ul.jsx)(e,{...t},"edit"),t.isSelected&&(0,Ul.jsx)(vJe,{...t})]}));(0,Axe.addFilter)("editor.BlockEdit","core/editor/push-changes-to-global-styles",yJe);var iE=a(W(),1),Dxe=a(T(),1),DU="__experimentalMainDashboardButton",Fxe=()=>{let e=(0,iE.__experimentalUseSlotFills)(DU);return!!(e&&e.length)},{Fill:bJe,Slot:wJe}=(0,iE.createSlotFill)(DU),Lxe=bJe,SJe=()=>{let e=(0,iE.__experimentalUseSlotFills)(DU);return(0,Dxe.jsx)(wJe,{bubblesVirtually:!0,fillProps:{length:e?e.length:0}})};Lxe.Slot=SJe;var eF=Lxe;var APe=a(G(),1),IPe=a(ee(),1),OPe=a(W(),1),NPe=a(j(),1);var _E=a(G(),1),Qh=a(j(),1),_Ce=a(Rt(),1),tx=a(he(),1),CCe=a(_e(),1),e6=a(U(),1),TCe=a(Ot(),1),ECe=a(xt(),1);var h1e=a(he(),1),g1e=a(G(),1),pE=a(_e(),1),v1e=a(Rt(),1),y1e=a(U(),1);var GS=a(he(),1),Bxe=a(U(),1),tF=a(W(),1),FU=a(j(),1);var Vxe=a(G(),1);var lm=a(T(),1),{useHasBlockToolbar:xJe}=Y(GS.privateApis);function jxe({isCollapsed:e,onToggle:t}){let{blockSelectionStart:r}=(0,Vxe.useSelect)(i=>({blockSelectionStart:i(GS.store).getBlockSelectionStart()}),[]),o=xJe(),n=!!r;return(0,Bxe.useEffect)(()=>{r&&t(!1)},[r,t]),o?(0,lm.jsxs)(lm.Fragment,{children:[(0,lm.jsx)("div",{className:Z("editor-collapsible-block-toolbar",{"is-collapsed":e||!n}),children:(0,lm.jsx)(GS.BlockToolbar,{hideDragHandle:!0})}),(0,lm.jsx)(tF.Popover.Slot,{name:"block-toolbar"}),(0,lm.jsx)(tF.Button,{className:"editor-collapsible-block-toolbar__toggle",icon:e?nl:il,onClick:()=>{t(!e)},label:e?(0,FU.__)("Show block tools"):(0,FU.__)("Hide block tools"),size:"compact"})]}):null}var zxe=a(_e(),1),rF=a(G(),1),Yy=a(j(),1),Hxe=a(he(),1),YS=a(W(),1);var LU=a(U(),1),Uxe=a(ta(),1),Wxe=a(Rt(),1);var Kc=a(T(),1);function _Je({className:e,disableBlockTools:t=!1}){let{setIsInserterOpened:r,setIsListViewOpened:o}=(0,rF.useDispatch)(R),{isDistractionFree:n,isInserterOpened:i,isListViewOpen:s,listViewShortcut:l,inserterSidebarToggleRef:c,listViewToggleRef:u,showIconLabels:d}=(0,rF.useSelect)(w=>{let{get:S}=w(Wxe.store),{isListViewOpened:x,getEditorMode:_,getInserterSidebarToggleRef:P,getListViewToggleRef:I}=Y(w(R)),{getShortcutRepresentation:A}=w(Uxe.store);return{isInserterOpened:w(R).isInserterOpened(),isListViewOpen:x(),listViewShortcut:A("core/editor/toggle-list-view"),inserterSidebarToggleRef:P(),listViewToggleRef:I(),showIconLabels:S("core","showIconLabels"),isDistractionFree:S("core","distractionFree"),isVisualMode:_()==="visual"}},[]),f=w=>{i&&w.preventDefault()},m=(0,zxe.useViewportMatch)("wide"),h=(0,Yy.__)("Document tools"),g=(0,LU.useCallback)(()=>o(!s),[o,s]),v=(0,LU.useCallback)(()=>r(!i),[i,r]),y=(0,Yy._x)("Block Inserter","Generic label for block inserter button"),b=i?(0,Yy.__)("Close"):(0,Yy.__)("Add");return(0,Kc.jsx)(Hxe.NavigableToolbar,{className:Z("editor-document-tools","edit-post-header-toolbar",e),"aria-label":h,variant:"unstyled",children:(0,Kc.jsxs)("div",{className:"editor-document-tools__left",children:[!n&&(0,Kc.jsx)(YS.ToolbarButton,{ref:c,className:"editor-document-tools__inserter-toggle",variant:"primary",isPressed:i,onMouseDown:f,onClick:v,disabled:t,icon:Md,label:d?b:y,showTooltip:!d,"aria-expanded":i}),(m||!d)&&(0,Kc.jsxs)(Kc.Fragment,{children:[(0,Kc.jsx)(YS.ToolbarItem,{as:CN,showTooltip:!d,variant:d?"tertiary":void 0,size:"compact"}),(0,Kc.jsx)(YS.ToolbarItem,{as:SN,showTooltip:!d,variant:d?"tertiary":void 0,size:"compact"}),!n&&(0,Kc.jsx)(YS.ToolbarButton,{className:"editor-document-tools__document-overview-toggle",icon:Wx,disabled:t,isPressed:s,label:(0,Yy.__)("Document Overview"),onClick:g,shortcut:l,showTooltip:!d,variant:d?"tertiary":void 0,"aria-expanded":s,ref:u})]})]})})}var Gxe=_Je;var sE=a(W(),1);var Uh=a(T(),1),BU={distractionFreeDisabled:{y:"-50px"},distractionFreeHover:{y:0},distractionFreeHidden:{y:"-50px"},visible:{y:0},hidden:{y:0}},CJe={distractionFreeDisabled:{x:"-100%"},distractionFreeHover:{x:0},distractionFreeHidden:{x:"-100%"},visible:{x:0},hidden:{x:0}};function oF({className:e,toolbar:t,center:r,settings:o}){let n=Fxe();return(0,Uh.jsxs)("div",{className:Z("editor-header edit-post-header",e),children:[n&&(0,Uh.jsx)(sE.__unstableMotion.div,{className:"editor-header__back-button",variants:CJe,transition:{type:"tween"},children:(0,Uh.jsx)(eF.Slot,{})}),(0,Uh.jsx)(sE.__unstableMotion.div,{variants:BU,className:"editor-header__toolbar",transition:{type:"tween"},children:t}),r&&(0,Uh.jsx)(sE.__unstableMotion.div,{variants:BU,className:"editor-header__center",transition:{type:"tween"},children:r}),(0,Uh.jsx)(sE.__unstableMotion.div,{variants:BU,transition:{type:"tween"},className:"editor-header__settings",children:o})]})}var mo=a(j(),1),qS=a(G(),1),zU=a(yo(),1);var gd=a(W(),1),qy=a(Rt(),1);var Yxe=a(W(),1),nF=a(G(),1),VU=a(j(),1),qxe=a(_e(),1),Kxe=a(xt(),1);var Zxe=a(T(),1);function Xxe(){let{createNotice:e}=(0,nF.useDispatch)(Kxe.store),{getEditedPostContent:t}=(0,nF.useSelect)(R);function r(){return t()}function o(){e("info",(0,VU.__)("All content copied."),{isDismissible:!0,type:"snackbar"})}let n=(0,qxe.useCopyToClipboard)(r,o);return(0,Zxe.jsx)(Yxe.MenuItem,{ref:n,children:(0,VU.__)("Copy all blocks")})}var aE=a(j(),1),iF=a(W(),1),sF=a(G(),1),Qxe=a(ta(),1);var jU=a(T(),1),TJe=[{value:"visual",label:(0,aE.__)("Visual editor")},{value:"text",label:(0,aE.__)("Code editor")}];function EJe(){let{shortcut:e,isRichEditingEnabled:t,isCodeEditingEnabled:r,mode:o}=(0,sF.useSelect)(l=>({shortcut:l(Qxe.store).getShortcutRepresentation("core/editor/toggle-mode"),isRichEditingEnabled:l(R).getEditorSettings().richEditingEnabled,isCodeEditingEnabled:l(R).getEditorSettings().codeEditingEnabled,mode:l(R).getEditorMode()}),[]),{switchEditorMode:n}=(0,sF.useDispatch)(R),i=o;!t&&o==="visual"&&(i="text"),!r&&o==="text"&&(i="visual");let s=TJe.map(l=>(!r&&l.value==="text"&&(l={...l,disabled:!0}),!t&&l.value==="visual"&&(l={...l,disabled:!0,info:(0,aE.__)("You can enable the visual editor in your profile settings.")}),l.value!==i&&!l.disabled?{...l,shortcut:e}:l));return(0,jU.jsx)(iF.MenuGroup,{label:(0,aE.__)("Editor"),children:(0,jU.jsx)(iF.MenuItemsChoice,{choices:s,value:i,onSelect:n})})}var Jxe=EJe;var $xe=a(W(),1),e_e=a(T(),1),{Fill:t_e,Slot:PJe}=(0,$xe.createSlotFill)("ToolsMoreMenuGroup");t_e.Slot=({fillProps:e})=>(0,e_e.jsx)(PJe,{fillProps:e});var aF=t_e;var r_e=a(W(),1),o_e=a(U(),1),n_e=a(T(),1),{Fill:i_e,Slot:kJe}=(0,r_e.createSlotFill)(o_e.Platform.OS==="web"?Symbol("ViewMoreMenuGroup"):"ViewMoreMenuGroup");i_e.Slot=({fillProps:e})=>(0,n_e.jsx)(kJe,{fillProps:e});var lF=i_e;var $r=a(T(),1);function cF({disabled:e=!1}){let{openModal:t}=(0,qS.useDispatch)(Le),{set:r}=(0,qS.useDispatch)(qy.store),{toggleDistractionFree:o}=(0,qS.useDispatch)(R),n=(0,qS.useSelect)(s=>s(qy.store).get("core","showIconLabels"),[]),i=()=>{r("core","distractionFree",!1)};return(0,$r.jsx)($r.Fragment,{children:(0,$r.jsx)(gd.DropdownMenu,{icon:to,label:(0,mo.__)("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,$r.jsxs)($r.Fragment,{children:[(0,$r.jsxs)(gd.MenuGroup,{label:(0,mo._x)("View","noun"),children:[(0,$r.jsx)(qy.PreferenceToggleMenuItem,{scope:"core",name:"fixedToolbar",onToggle:i,label:(0,mo.__)("Top toolbar"),info:(0,mo.__)("Access all block and document tools in a single place"),messageActivated:(0,mo.__)("Top toolbar activated."),messageDeactivated:(0,mo.__)("Top toolbar deactivated.")}),(0,$r.jsx)(qy.PreferenceToggleMenuItem,{scope:"core",name:"distractionFree",label:(0,mo.__)("Distraction free"),info:(0,mo.__)("Write with calmness"),handleToggling:!1,onToggle:()=>o({createNotice:!1}),messageActivated:(0,mo.__)("Distraction free mode activated."),messageDeactivated:(0,mo.__)("Distraction free mode deactivated."),shortcut:zU.displayShortcut.primaryShift("\\")}),(0,$r.jsx)(qy.PreferenceToggleMenuItem,{scope:"core",name:"focusMode",label:(0,mo.__)("Spotlight mode"),info:(0,mo.__)("Focus on one block at a time"),messageActivated:(0,mo.__)("Spotlight mode activated."),messageDeactivated:(0,mo.__)("Spotlight mode deactivated.")}),(0,$r.jsx)(lF.Slot,{fillProps:{onClose:s}})]}),(0,$r.jsx)(Jxe,{}),(0,$r.jsx)(Cl.Slot,{name:"core/plugin-more-menu",label:(0,mo.__)("Panels"),fillProps:{onClick:s}}),(0,$r.jsxs)(gd.MenuGroup,{label:(0,mo.__)("Tools"),children:[(0,$r.jsx)(gd.MenuItem,{onClick:()=>t("editor/keyboard-shortcut-help"),shortcut:zU.displayShortcut.access("h"),children:(0,mo.__)("Keyboard shortcuts")}),(0,$r.jsx)(Xxe,{}),(0,$r.jsxs)(gd.MenuItem,{icon:Bs,href:(0,mo.__)("https://wordpress.org/documentation/article/wordpress-block-editor/"),target:"_blank",rel:"noopener",children:[(0,mo.__)("Help"),(0,$r.jsx)(tr,{render:(0,$r.jsx)("span",{}),children:(0,mo.__)("(opens in a new tab)")})]}),(0,$r.jsx)(aF.Slot,{fillProps:{onClose:s}})]}),(0,$r.jsx)(gd.MenuGroup,{children:(0,$r.jsx)(gd.MenuItem,{onClick:()=>t("editor/preferences"),children:(0,mo.__)("Preferences")})})]})})})}var a_e=a(_e(),1),uF=a(G(),1);var l_e=a(T(),1),s_e="toggle",HU="button";function c_e({forceIsDirty:e,setEntitiesSavedStatesCallback:t}){let r,o=(0,a_e.useViewportMatch)("medium","<"),{togglePublishSidebar:n}=(0,uF.useDispatch)(R),{hasPublishAction:i,isBeingScheduled:s,isPending:l,isPublished:c,isPublishSidebarEnabled:u,isPublishSidebarOpened:d,isScheduled:f,postStatus:m,postStatusHasChanged:h,postType:g}=(0,uF.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===Ls||c||h&&!["future","publish"].includes(m)||f&&s||l&&!i&&!o?r=HU:o||u?r=s_e:r=HU,(0,l_e.jsx)(gS,{forceIsDirty:e,isOpen:d,isToggle:r===s_e,onToggle:n,setEntitiesSavedStatesCallback:t})}var u_e=a(j(),1),d_e=a(W(),1);var f_e=a(ee(),1),m_e=a(G(),1),p_e=a(Rt(),1);var h_e=a(T(),1);function g_e(){let{hasLoaded:e,permalink:t,isPublished:r,label:o,showIconLabels:n}=(0,m_e.useSelect)(i=>{let s=i(R).getCurrentPostType(),l=i(f_e.store).getPostType(s),{get:c}=i(p_e.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,h_e.jsx)(d_e.Button,{icon:Bs,label:o||(0,u_e.__)("View post"),href:t,target:"_blank",showTooltip:!n,size:"compact"})}var v_e=a(_e(),1),va=a(W(),1),Zc=a(j(),1);var lE=a(G(),1),y_e=a(ee(),1),b_e=a(Rt(),1);var w_e=a(he(),1);var ln=a(T(),1);function S_e({forceIsAutosaveable:e,disabled:t}){let{deviceType:r,homeUrl:o,isTemplate:n,isViewable:i,showIconLabels:s,isTemplateHidden:l,templateId:c}=(0,lE.useSelect)(x=>{let{getDeviceType:_,getCurrentPostType:P,getCurrentTemplateId:I,getRenderingMode:A}=x(R),{getEntityRecord:k,getPostType:D}=x(y_e.store),{get:E}=x(b_e.store),C=P();return{deviceType:_(),homeUrl:k("root","__unstableBase")?.home,isTemplate:C==="wp_template",isViewable:D(C)?.viewable??!1,showIconLabels:E("core","showIconLabels"),isTemplateHidden:A()==="post-only",templateId:I()}},[]),{setDeviceType:u,setRenderingMode:d,setDefaultRenderingMode:f}=Y((0,lE.useDispatch)(R)),{resetZoomLevel:m}=Y((0,lE.useDispatch)(w_e.store)),h=x=>{u(x),m()};if((0,v_e.useViewportMatch)("medium","<"))return null;let v={placement:"bottom-end"},y={className:"editor-preview-dropdown__toggle",iconPosition:"right",size:"compact",showTooltip:!s,disabled:t,accessibleWhenDisabled:t},b={"aria-label":(0,Zc.__)("View options")},w={desktop:OP,mobile:ab,tablet:kk},S=[{value:"Desktop",label:(0,Zc.__)("Desktop"),icon:OP},{value:"Tablet",label:(0,Zc.__)("Tablet"),icon:kk},{value:"Mobile",label:(0,Zc.__)("Mobile"),icon:ab}];return(0,ln.jsx)(va.DropdownMenu,{className:Z("editor-preview-dropdown",`editor-preview-dropdown--${r.toLowerCase()}`),popoverProps:v,toggleProps:y,menuProps:b,icon:w[r.toLowerCase()],label:(0,Zc.__)("View"),disableOpenOnArrowDown:t,children:({onClose:x})=>(0,ln.jsxs)(ln.Fragment,{children:[(0,ln.jsx)(va.MenuGroup,{children:(0,ln.jsx)(va.MenuItemsChoice,{choices:S,value:r,onSelect:h})}),n&&(0,ln.jsx)(va.MenuGroup,{children:(0,ln.jsxs)(va.MenuItem,{href:o,target:"_blank",icon:Bs,onClick:x,children:[(0,Zc.__)("View site"),(0,ln.jsx)(tr,{render:(0,ln.jsx)("span",{}),children:(0,Zc.__)("(opens in a new tab)")})]})}),!n&&!!c&&(0,ln.jsx)(va.MenuGroup,{children:(0,ln.jsx)(va.MenuItem,{icon:l?void 0:Qn,isSelected:!l,role:"menuitemcheckbox",onClick:()=>{let _=l?"template-locked":"post-only";d(_),f(_),m()},children:(0,Zc.__)("Show template")})}),i&&(0,ln.jsx)(va.MenuGroup,{children:(0,ln.jsx)(Nh,{className:"editor-preview-dropdown__button-external",role:"menuitem",forceIsAutosaveable:e,"aria-label":(0,Zc.__)("Preview in new tab"),textContent:(0,ln.jsxs)(ln.Fragment,{children:[(0,Zc.__)("Preview in new tab"),(0,ln.jsx)(va.Icon,{icon:Bs})]}),onPreview:x})}),(0,ln.jsx)(Cl.Slot,{name:"core/plugin-preview-menu",fillProps:{onClick:x}})]})})}var x_e=a(W(),1),UU=a(j(),1),__e=a(U(),1),cE=a(G(),1),WU=a(he(),1);var GU=a(Rt(),1),dF=a(ta(),1),C_e=a(yo(),1);var T_e=a(T(),1),RJe=({disabled:e})=>{let{isZoomOut:t,showIconLabels:r,isDistractionFree:o}=(0,cE.useSelect)(u=>({isZoomOut:Y(u(WU.store)).isZoomOut(),showIconLabels:u(GU.store).get("core","showIconLabels"),isDistractionFree:u(GU.store).get("core","distractionFree")})),{resetZoomLevel:n,setZoomLevel:i}=Y((0,cE.useDispatch)(WU.store)),{registerShortcut:s,unregisterShortcut:l}=(0,cE.useDispatch)(dF.store);return(0,__e.useEffect)(()=>(s({name:"core/editor/zoom",category:"global",description:(0,UU.__)("Enter or exit zoom out."),keyCombination:{modifier:(0,C_e.isAppleOS)()?"primaryShift":"secondary",character:"0"}}),()=>{l("core/editor/zoom")}),[s,l]),(0,dF.useShortcut)("core/editor/zoom",()=>{t?n():i("auto-scaled")},{isDisabled:o}),(0,T_e.jsx)(x_e.Button,{accessibleWhenDisabled:!0,disabled:e,onClick:()=>{t?n():i("auto-scaled")},icon:$4,label:(0,UU.__)("Zoom Out"),isPressed:t,size:"compact",showTooltip:!r,className:"editor-zoom-out-toggle"})},E_e=RJe;var m1e=a(W(),1),JS=a(U(),1),p1e=a(ee(),1),TF=a(j(),1);var R_e=a(W(),1),A_e=a(U(),1);var KS=a(U(),1);function P_e(e){let[t,r]=(0,KS.useState)(e),[o,n]=(0,KS.useState)(e?"loading":"idle");t!==e&&(r(e),n(e?"loading":"idle"));let i=(0,KS.useCallback)(()=>n("loaded"),[]),s=(0,KS.useCallback)(()=>n("error"),[]);return{status:o,handleLoad:i,handleError:s}}var Xc=a(T(),1);yI([MO]);var k_e="#1e1e1e",AJe="#fff";function IJe({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}=P_e(t),g=f==="loaded",v=n==="badge"&&!!r,y=r?r.split(/\s+/).slice(0,2).map(x=>x[0]).join("").toUpperCase():void 0,b=(0,A_e.useMemo)(()=>s&&_o(s).isReadable(k_e,{level:"AA",size:"normal"})?k_e:AJe,[s]),w={...u,...s?{"--editor-avatar-outline-color":s,"--editor-avatar-name-color":b}:{}},S=(0,Xc.jsxs)("div",{className:Z("editor-avatar",e,{"has-avatar-border-color":!!s,"has-src":g,"is-badge":v,"is-small":i==="small","is-dimmed":l}),style:w,role:r?"img":void 0,"aria-label":r||void 0,...d,children:[(0,Xc.jsxs)("span",{className:"editor-avatar__image",children:[t&&(0,Xc.jsx)("img",{src:t,alt:"",crossOrigin:"anonymous",className:"editor-avatar__img",onLoad:m,onError:h}),!g&&y]}),l&&!!c&&(0,Xc.jsx)("span",{className:"editor-avatar__status-indicator",children:(0,Xc.jsx)(R_e.Icon,{icon:c})}),v&&(0,Xc.jsx)("span",{className:"editor-avatar__name",children:o||r})]});return r&&(!v||o)?(0,Xc.jsxs)(ht.Root,{children:[(0,Xc.jsx)(ht.Trigger,{render:S}),(0,Xc.jsx)(ht.Popup,{children:r})]}):S}var cm=IJe;var I_e=a(U(),1),fF=a(j(),1),mF=a(T(),1);function OJe({className:e,max:t=3,children:r,...o}){let n=I_e.Children.toArray(r),i=n.slice(0,t),s=n.length-t;return(0,mF.jsxs)("div",{role:"group",className:Z("editor-avatar-group",e),...o,children:[i,s>0&&(0,mF.jsx)("span",{className:"editor-avatar-group__overflow","aria-label":(0,fF.sprintf)((0,fF._n)("%d more collaborator","%d more collaborators",s),s),children:`+${s}`})]})}var YU=OJe;var fE=a(j(),1),pF=a(W(),1);var H_e=a(ub(),1);function um(e){return e?.["48"]||e?.["96"]||e?.["24"]}var M_e=a(j(),1);function D_e(e){return e.trim()}var uE=-16,NJe=16,O_e=20,N_e=["#C36EFF","#D94145","#E4780A","#FF35EE","#879F11","#46A494","#00A2C3"];function Wl(e){return N_e[e%N_e.length]}function F_e(e,t=10){if(!e)return"";let r=(0,M_e._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 Wh(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 L_e(e,t){let r=new Set(Wh(e)),o=Number(t);return r.has(o)?e:(r.add(o),{...e,noteId:[...r]})}function dE(e){return e.find(t=>t.status==="hold")??e[0]??null}function B_e(e,t){let r=new Set(Wh(e));return r.delete(Number(t)),{...e,noteId:r.size>0?[...r]:void 0}}function V_e({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]=uE;let f=u+uE,m=d;for(let v=s+1;v<e.length;v++){let y=e[v],b=r[y.id];if(!b)continue;let w=b.top||0,S=o[y.id]||0,x=uE,_=f+m;w<_+NJe&&(x=_-w+O_e),i[y.id]=x,f=w+x,m=S}let h=u+uE;for(let v=s-1;v>=0;v--){let y=e[v],b=r[y.id];if(!b)continue;let w=b.top||0,S=o[y.id]||0,x=uE;w+S>h&&(x=h-w-S-O_e),i[y.id]=x,h=w+x}let g={};for(let v of e){let y=r[v.id];y&&i[v.id]!==void 0&&(g[v.id]=y.top+n+i[v.id])}return{positions:g}}function j_e(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 qi(e,t,r){return j_e(e,t,r).then(o=>{o&&(o.focus(),o.scrollIntoView({block:"nearest"}))})}function z_e(e,t){return j_e(e,t).then(r=>{r?.scrollIntoView({block:"nearest"})})}var ya=a(T(),1);function U_e({activeCollaborators:e,popoverAnchor:t,setIsPopoverVisible:r,cursorRegistry:o}){let n=i=>{o.scrollToCursor(i,{behavior:"smooth",block:"center",highlightDuration:2e3})&&((0,H_e.speak)((0,fE.__)("Scrolled to cursor"),"polite"),r(!1))};return(0,ya.jsx)(pF.Popover,{anchor:t,placement:"bottom",offset:8,className:"editor-collaborators-presence__list",onClose:()=>r(!1),children:(0,ya.jsxs)("div",{className:"editor-collaborators-presence__list-content",children:[(0,ya.jsxs)("div",{className:"editor-collaborators-presence__list-header",children:[(0,ya.jsxs)("div",{className:"editor-collaborators-presence__list-header-title",children:[(0,fE.__)("Collaborators"),(0,ya.jsx)("span",{children:e.length})]}),(0,ya.jsx)("div",{className:"editor-collaborators-presence__list-header-action",children:(0,ya.jsx)(pF.Button,{__next40pxDefaultSize:!0,icon:_n,iconSize:24,label:(0,fE.__)("Close Collaborators List"),onClick:()=>r(!1)})})]}),(0,ya.jsx)("div",{className:"editor-collaborators-presence__list-items",children:e.map(i=>{let s=i.isMe;return(0,ya.jsxs)("button",{className:"editor-collaborators-presence__list-item",disabled:s,onClick:()=>n(i.clientId),children:[(0,ya.jsx)(cm,{src:um(i.collaboratorInfo.avatar_urls),name:i.collaboratorInfo.name,borderColor:s?"var(--wp-admin-theme-color)":Wl(i.collaboratorInfo.id),dimmed:!i.isConnected}),(0,ya.jsx)("div",{className:"editor-collaborators-presence__list-item-info",children:(0,ya.jsx)("div",{className:"editor-collaborators-presence__list-item-name",children:s?(0,fE.__)("You"):i.collaboratorInfo.name})})]},i.clientId)})})]})})}function MJe(e,t){e.classList.add("collaborators-overlay-cursor-highlighted"),setTimeout(()=>{e.classList.remove("collaborators-overlay-cursor-highlighted")},t)}function W_e(){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&&MJe(o,r.highlightDuration),!0):!1},removeAll(){e.clear()}}}var f1e=a(he(),1);var _F=a(_e(),1),Qc=a(U(),1),u1e=a(j(),1);var hF="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)",qU="9999px",KU="32px",ZU="24px",gF="4px",vF="8px",XU="1px",G_e="2px",Gh="#fff",Y_e="11px",q_e="13px",QU="499",K_e="20px";var Z_e=`
.editor-avatar {
	position: relative;
	display: inline-flex;
	align-items: center;
	border-radius: ${qU};
	flex-shrink: 0;
	box-shadow: 0 0 0 var(--wp-admin-border-width-focus, 2px) ${Gh}, ${hF};
}
.editor-avatar__image {
	box-sizing: border-box;
	position: relative;
	width: ${KU};
	height: ${KU};
	border-radius: ${qU};
	border: 0;
	background-color: var(--wp-admin-theme-color, #3858e9);
	overflow: hidden;
	overflow: clip;
	flex-shrink: 0;
	font-size: 0;
	color: ${Gh};
}
.is-small > .editor-avatar__image {
	width: ${ZU};
	height: ${ZU};
}
.has-avatar-border-color > .editor-avatar__image {
	border: var(--wp-admin-border-width-focus, 2px) solid var(--editor-avatar-outline-color);
	background-clip: padding-box;
}
.has-avatar-border-color > .editor-avatar__image::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: inherit;
	box-shadow: inset 0 0 0 var(--wp-admin-border-width-focus, 2px) ${Gh};
	pointer-events: none;
	z-index: 1;
}
.editor-avatar__img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: inherit;
	opacity: 0;
}
.has-src > .editor-avatar__image > .editor-avatar__img {
	opacity: 1;
}
.editor-avatar:not(.has-src) > .editor-avatar__image {
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: ${Y_e};
	font-weight: ${QU};
	border: 0;
	background-clip: border-box;
}
.editor-avatar:not(.has-src) > .editor-avatar__image::after {
	content: none;
}
.editor-avatar:not(.has-src).has-avatar-border-color > .editor-avatar__image {
	background-color: var(--editor-avatar-outline-color);
}
.editor-avatar__name {
	font-size: ${q_e};
	font-weight: ${QU};
	line-height: ${K_e};
	color: var(--editor-avatar-name-color, ${Gh});
	min-width: 0;
	padding-bottom: 2px; /* $grid-unit-05 / 2 */
	overflow: hidden;
	opacity: 0;
	white-space: nowrap;
	transition: opacity 0.15s cubic-bezier(0.15, 0, 0.15, 1);
}
.editor-avatar.is-badge {
	display: inline-grid;
	grid-template-columns: min-content 0fr;
	column-gap: 0;
	padding-inline-end: 0;
	background-color: var(--wp-admin-theme-color, #3858e9);
	transition:
		grid-template-columns 0.3s cubic-bezier(0.15, 0, 0.15, 1),
		column-gap 0.3s cubic-bezier(0.15, 0, 0.15, 1),
		padding-inline-end 0.3s cubic-bezier(0.15, 0, 0.15, 1);
}
.editor-avatar.is-badge:hover {
	grid-template-columns: min-content 1fr;
	column-gap: ${gF};
	padding-inline-end: ${vF};
	transition-timing-function: cubic-bezier(0.85, 0, 0.85, 1);
}
.editor-avatar.is-badge:hover .editor-avatar__name {
	opacity: 1;
	transition-timing-function: cubic-bezier(0.85, 0, 0.85, 1);
}
.editor-avatar.is-badge.has-avatar-border-color {
	background-color: var(--editor-avatar-outline-color);
}
@media (prefers-reduced-motion: reduce) {
	.editor-avatar.is-badge,
	.editor-avatar__name {
		transition: none;
	}
}
`;var X_e=`
.block-canvas-cover {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	pointer-events: none;
	z-index: 20000;
}
.block-canvas-cover .collaborators-overlay-full {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
}
.block-canvas-cover .collaborators-overlay-fixed {
	position: fixed;
	width: 100%;
	height: 100%;
}
.collaborators-overlay-user {
	position: absolute;
}
/* Cursor lines render below avatar labels across all users. The parent
   .collaborators-overlay-user has no z-index so it does not create a
   stacking context \u2014 children participate in the shared overlay context. */
.collaborators-overlay-user-cursor {
	position: absolute;
	z-index: 0;
	width: ${G_e};
	border-radius: ${XU};
	outline: ${XU} solid ${Gh};
	box-shadow: ${hF};
	animation: collaborators-overlay-cursor-blink 1s infinite;
}
.collaborators-overlay-selection-rect {
	position: absolute;
	opacity: 0.15;
	pointer-events: none;
	border-radius: 2px;
}

/* Overlay-specific positioning applied to the Avatar cursor label. */
.collaborators-overlay-user-label.editor-avatar {
	position: absolute;
	z-index: 1;
	transform: translate(-11px, -100%);
	margin-top: -${gF};
	pointer-events: auto;
	overflow: visible;
	width: max-content;
}
/* Avatar positioned above a highlighted block as a label. */
.collaborators-overlay-block-label.editor-avatar {
	position: absolute;
	z-index: 1;
	transform: translateY(calc(-100% - ${vF}));
	pointer-events: auto;
	overflow: visible;
	width: max-content;
}

@keyframes collaborators-overlay-cursor-blink {
	0%, 45% { opacity: 1; }
	55%, 95% { opacity: 0; }
	100% { opacity: 1; }
}
.collaborators-overlay-cursor-highlighted .collaborators-overlay-user-cursor {
	animation: collaborators-overlay-cursor-highlight 0.6s ease-in-out 3;
}
.collaborators-overlay-cursor-highlighted .collaborators-overlay-user-label {
	animation: collaborators-overlay-label-highlight 0.6s ease-in-out 3;
}
@keyframes collaborators-overlay-cursor-highlight {
	0%, 100% {
		transform: scale(1);
		filter: drop-shadow(0 0 0 transparent);
	}
	50% {
		transform: scale(1.2);
		filter: drop-shadow(0 0 8px currentColor);
	}
}
@keyframes collaborators-overlay-label-highlight {
	0%, 100% {
		transform: translate(-11px, -100%) scale(1);
		filter: drop-shadow(0 0 0 transparent);
	}
	50% {
		transform: translate(-11px, -100%) scale(1.1);
		filter: drop-shadow(0 0 6px currentColor);
	}
}
.block-editor-block-list__block.is-collaborator-selected:not(:focus)::after {
	content: "";
	position: absolute;
	pointer-events: none;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	outline-color: var(--collaborator-outline-color);
	outline-style: solid;
	outline-width: calc(var(--wp-admin-border-width-focus) / var(--wp-block-editor-iframe-zoom-out-scale, 1));
	outline-offset: calc(-1 * var(--wp-admin-border-width-focus) / var(--wp-block-editor-iframe-zoom-out-scale, 1));
	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(${Gh}, 0.7);
	z-index: 1;
}
@media (prefers-reduced-motion: reduce) {
	.collaborators-overlay-user-label,
	.collaborators-overlay-user-cursor {
		animation: none;
	}
}
`;function Q_e(e,t){let r=null,o=()=>{try{e()}catch{}r=setTimeout(o,t)};return r=setTimeout(o,t),()=>{r&&clearTimeout(r)}}var J_e=a(he(),1),$U=a(ee(),1),$_e=a(G(),1),XS=a(U(),1);var ZS=a(U(),1);function yF(e){let[t,r]=(0,ZS.useState)(0),o=(0,ZS.useRef)(null),n=(0,ZS.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:DJe,useResolvedSelection:FJe}=Y($U.privateApis),{SelectionType:LJe}=Y($U.privateApis);function e1e(e,t,r,o,n){let i=(0,XS.useRef)(new Set),s=DJe(r??null,o??null),l=FJe(r??null,o??null),[c,u]=(0,XS.useState)([]),[d,f]=yF(n),m=(0,$_e.useSelect)(h=>h(J_e.store).getClientIdsWithDescendants(),[]);return(0,XS.useEffect)(()=>{if(!t){u([]);return}let h=i.current,g=new Set,v=s.filter(S=>{let x=S.editorState?.selection?.type===LJe.WholeBlock;return!S.isMe&&x}).map(S=>{let x;try{({localClientId:x}=l(S.editorState?.selection))}catch{return null}return x?{blockId:x,color:S.isMe?"var(--wp-admin-theme-color)":Wl(S.collaboratorInfo.id),userName:S.collaboratorInfo.name,avatarUrl:um(S.collaboratorInfo.avatar_urls)}:null}).filter(S=>!S||g.has(S.blockId)?!1:(g.add(S.blockId),!0)),y=new Set(v.map(S=>S.blockId));for(let S of h)if(!y.has(S)){let x=JU(t,S);x&&(x.classList.remove("is-collaborator-selected"),x.style.removeProperty("--collaborator-outline-color")),h.delete(S)}let b=[],w=e?.getBoundingClientRect()??null;return v.forEach(S=>{let{color:x,blockId:_,userName:P,avatarUrl:I}=S,A=JU(t,_);if(A&&(A.classList.add("is-collaborator-selected"),A.style.setProperty("--collaborator-outline-color",x),h.add(_),w)){let k=A.getBoundingClientRect();b.push({blockId:_,userName:P,avatarUrl:I,color:x,x:k.left-w.left,y:k.top-w.top})}}),u(b),()=>{for(let S of h){let x=JU(t,S);x&&(x.classList.remove("is-collaborator-selected"),x.style.removeProperty("--collaborator-outline-color"))}h.clear()}},[s,t,e,d,l,m]),{highlights:c,rerenderHighlightsAfterDelay:f}}var JU=(e,t)=>e.querySelector(`[data-block="${t}"]`);var s1e=a(he(),1),rW=a(ee(),1),tW=a(G(),1),xF=a(U(),1),a1e=a(Rt(),1);var n1e=a(ee(),1);var BJe=500,bF=(e,t,r,o)=>e===null||!t?null:VJe(t,e,r,o)??null,VJe=(e,t,r,o)=>{let{node:n,offset:i}=eW(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}},wF=(e,t,r,o,n)=>{let i=t,s=r;i>s&&([i,s]=[s,i]);let l=eW(e,i,o),c=eW(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(y=>y.x===h&&y.y===g&&y.width===m.width&&y.height===m.height)||f.push({x:h,y:g,width:m.width,height:m.height})}return f.length>0?f:null},t1e=(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},r1e=(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},eW=(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>BJe)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}},o1e=(e,t)=>e.compareDocumentPosition(t)===Node.DOCUMENT_POSITION_FOLLOWING;var{SelectionDirection:jJe,SelectionType:SF}=Y(n1e.privateApis);function mE(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 i1e(e,t,r,o){return e.type===SF.None||e.type===SF.WholeBlock?{}:e.type===SF.Cursor?zJe(t,o):r?HJe(e,t,r,o):{}}function zJe(e,t){if(!e.localClientId)return{};let r=mE(t.editorDocument,e);return{coords:bF(e.richTextOffset,r,t.editorDocument,t.overlayRect)}}function HJe(e,t,r,o){if(!t.localClientId||!r.localClientId||t.richTextOffset===null||r.richTextOffset===null)return{};let i=e.selectionDirection===jJe.Backward?t:r,s,l=null;if(e.type===SF.SelectionInOneBlock){let u=UJe(t,r,o);s=u.rects,l=u.blockElement}else{let u=WJe(t,r,o);s=u.rects,l=i.localClientId===u.firstBlockClientId?u.firstBlock:u.lastBlock}if(s.length>0)return{coords:bF(i.richTextOffset,l,o.editorDocument,o.overlayRect),selectionRects:s};let c=mE(o.editorDocument,t);return{coords:bF(t.richTextOffset,c,o.editorDocument,o.overlayRect)}}function UJe(e,t,r){let o=mE(r.editorDocument,e);return!o||e.richTextOffset===null||t.richTextOffset===null?{rects:[],blockElement:null}:{rects:wF(o,e.richTextOffset,t.richTextOffset,r.editorDocument,r.overlayRect)??[],blockElement:o}}function WJe(e,t,r){let o=e,n=t,i=mE(r.editorDocument,o),s=mE(r.editorDocument,n);if(i&&s&&o1e(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=wF(i,o.richTextOffset,Number.MAX_SAFE_INTEGER,r.editorDocument,r.overlayRect);c&&l.push(...c);let u=r1e(o.localClientId,n.localClientId,r.editorDocument);for(let f of u){let m=t1e(f,r.editorDocument,r.overlayRect);l.push(...m)}let d=wF(s,0,n.richTextOffset,r.editorDocument,r.overlayRect);return d&&l.push(...d),{rects:l,firstBlock:i,lastBlock:s,firstBlockClientId:o.localClientId}}var{useActiveCollaborators:GJe,useResolvedSelection:YJe}=Y(rW.privateApis),{SelectionType:QS}=Y(rW.privateApis);function l1e(e,t,r,o,n){let i=GJe(r??null,o??null),s=YJe(r??null,o??null),l=(0,tW.useSelect)(h=>h(a1e.store).get("core","showCollaborationCursor"),[]),c=(0,tW.useSelect)(h=>h(s1e.store).getClientIdsWithDescendants(),[]),[u,d]=(0,xF.useState)([]),[f,m]=yF(n);return(0,xF.useEffect)(()=>{if(!e||!t){d([]);return}let h=e.getBoundingClientRect(),g={editorDocument:t,overlayRect:h},v=[],y=i.some(b=>!b.isMe);i.forEach(b=>{if(b.isMe&&(!l||!y))return;let w=b.editorState?.selection??{type:QS.None},S={richTextOffset:null,localClientId:null,attributeKey:null},x;if(w.type===QS.Cursor)try{S=s(w)}catch{return}else if(w.type===QS.SelectionInOneBlock||w.type===QS.SelectionInMultipleBlocks)try{S=s({type:QS.Cursor,cursorPosition:w.cursorStartPosition}),x=s({type:QS.Cursor,cursorPosition:w.cursorEndPosition})}catch{return}let _=b.collaboratorInfo.name,P=b.clientId,I=b.isMe?"var(--wp-admin-theme-color)":Wl(b.collaboratorInfo.id),A=um(b.collaboratorInfo.avatar_urls),k=i1e(w,S,x,g);if(k.coords){let D={userName:_,clientId:P,color:I,avatarUrl:A,isMe:b.isMe,...k.coords};k.selectionRects&&(D.selectionRects=k.selectionRects),v.push(D)}}),d(v)},[t,s,e,i,l,f,c]),{cursors:u,rerenderCursorsAfterDelay:m}}var vd=a(T(),1),c1e=500,qJe=1e4;function d1e({blockEditorDocument:e,postId:t,postType:r,cursorRegistry:o}){let[n,i]=(0,Qc.useState)(null),{cursors:s,rerenderCursorsAfterDelay:l}=l1e(n,e??null,t??null,r??null,c1e),{highlights:c,rerenderHighlightsAfterDelay:u}=e1e(n,e??null,t??null,r??null,c1e),d=(0,Qc.useCallback)(()=>{l(),u()},[l,u]),f=(0,_F.useResizeObserver)(d);(0,Qc.useEffect)(()=>{let v=l(),y=u();return()=>{v(),y()}},[l,u]),(0,Qc.useEffect)(()=>{if(s.length!==0)return Q_e(l,qJe)},[s.length,l]);let m=(0,_F.useMergeRefs)([i,f]),h=(0,Qc.useRef)(new Map);(0,Qc.useEffect)(()=>{if(!o)return;let v=h.current,y=new Set(s.map(b=>b.clientId));for(let b of v.keys())y.has(b)||(o.unregisterCursor(b),v.delete(b));for(let[b,w]of v.entries())o.registerCursor(b,w);return()=>o.removeAll()},[s,o]);let g=(0,Qc.useCallback)(v=>y=>{y?h.current.set(v,y):h.current.delete(v)},[]);return(0,vd.jsxs)("div",{className:"collaborators-overlay-full",ref:m,children:[(0,vd.jsx)("style",{children:Z_e+X_e}),s.map(v=>(0,vd.jsxs)("div",{children:[!v.isMe&&v.selectionRects?.map((y,b)=>(0,vd.jsx)("div",{className:"collaborators-overlay-selection-rect",style:{left:`${y.x}px`,top:`${y.y}px`,width:`${y.width}px`,height:`${y.height}px`,backgroundColor:v.color}},`${v.clientId}-sel-${b}`)),(0,vd.jsxs)("div",{ref:g(v.clientId),className:"collaborators-overlay-user",style:{left:`${v.x}px`,top:`${v.y}px`},children:[!v.isMe&&(0,vd.jsx)("div",{className:"collaborators-overlay-user-cursor",style:{backgroundColor:v.color,height:`${v.height}px`}}),(0,vd.jsx)(cm,{className:"collaborators-overlay-user-label",variant:"badge",size:"small",src:v.avatarUrl,name:v.userName,label:v.isMe?(0,u1e.__)("You"):void 0,borderColor:v.color})]})]},v.clientId)),c.map(v=>(0,vd.jsx)(cm,{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 oW=a(T(),1),{BlockCanvasCover:KJe}=Y(f1e.privateApis);function CF({postId:e,postType:t,cursorRegistry:r}){return(0,oW.jsx)(KJe.Fill,{children:({containerRef:o})=>(0,oW.jsx)(d1e,{blockEditorDocument:o.current?.ownerDocument,postId:e,postType:t,cursorRegistry:r})})}var Gl=a(T(),1),{useActiveCollaborators:ZJe}=Y(p1e.privateApis);function nW({postId:e,postType:t}){let r=ZJe(e,t),o=r.filter(f=>!f.isMe),n=(0,JS.useMemo)(()=>[...r].sort((f,m)=>f.isMe&&!m.isMe?-1:!f.isMe&&m.isMe?1:0),[r]),[i]=(0,JS.useState)(W_e),[s,l]=(0,JS.useState)(!1),[c,u]=(0,JS.useState)(null);if(o.length===0)return null;let d=r.find(f=>f.isMe);return(0,Gl.jsxs)(Gl.Fragment,{children:[(0,Gl.jsxs)("div",{className:"editor-collaborators-presence",children:[(0,Gl.jsx)(m1e.Button,{__next40pxDefaultSize:!0,className:"editor-collaborators-presence__button",onClick:()=>l(!s),isPressed:s,ref:u,"aria-label":(0,TF.sprintf)((0,TF.__)("Collaborators list, %d online"),n.length),children:(0,Gl.jsxs)(YU,{max:4,children:[d&&(0,Gl.jsx)(cm,{src:um(d.collaboratorInfo.avatar_urls),name:d.collaboratorInfo.name,borderColor:"var(--wp-admin-theme-color)",size:"small"},d.clientId),o.map(f=>(0,Gl.jsx)(cm,{src:um(f.collaboratorInfo.avatar_urls),name:f.collaboratorInfo.name,borderColor:Wl(f.collaboratorInfo.id),size:"small"},f.clientId))]})}),s&&(0,Gl.jsx)(U_e,{activeCollaborators:n,popoverAnchor:c,setIsPopoverVisible:l,cursorRegistry:i})]}),(0,Gl.jsx)(CF,{postId:e,postType:t,cursorRegistry:i})]})}var po=a(T(),1);function XJe({customSaveButton:e,forceIsDirty:t,setEntitiesSavedStatesCallback:r}){let o=(0,pE.useViewportMatch)("large"),n=(0,pE.useViewportMatch)("medium"),i=(0,pE.useMediaQuery)("(max-width: 403px)"),{postId:s,postType:l,isTextEditor:c,isPublishSidebarOpened:u,showIconLabels:d,hasFixedToolbar:f,hasBlockSelection:m,hasSectionRootClientId:h,isStylesCanvasActive:g}=(0,g1e.useSelect)(x=>{let{get:_}=x(v1e.store),{getEditorMode:P,getCurrentPostType:I,getCurrentPostId:A,isPublishSidebarOpened:k}=x(R),{getStylesPath:D,getShowStylebook:E}=Y(x(R)),{getBlockSelectionStart:C,getSectionRootClientId:M}=Y(x(h1e.store));return{postId:A(),postType:I(),isTextEditor:P()==="text",isPublishSidebarOpened:k(),showIconLabels:_("core","showIconLabels"),hasFixedToolbar:_("core","fixedToolbar"),hasBlockSelection:!!C(),hasSectionRootClientId:!!M(),isStylesCanvasActive:!!D()?.startsWith("/revisions")||E()}},[]),v=["post","page","wp_template"].includes(l)&&h,y=[Ls,Cm,Ko,ol].includes(l)||g,[b,w]=(0,y1e.useState)(!0),S=!i&&(!f||f&&(!m||b));return(0,po.jsx)(oF,{toolbar:(0,po.jsxs)(po.Fragment,{children:[(0,po.jsx)(Gxe,{disableBlockTools:g||c}),f&&n&&(0,po.jsx)(jxe,{isCollapsed:b,onToggle:w})]}),center:S?(0,po.jsxs)(po.Fragment,{children:[(0,po.jsx)(nW,{postType:l,postId:s}),(0,po.jsx)(hN,{})]}):void 0,settings:(0,po.jsxs)(po.Fragment,{children:[!S&&!i&&(0,po.jsx)(nW,{postType:l,postId:s}),!e&&!u&&(0,po.jsx)(dD,{forceIsDirty:t}),(0,po.jsx)(g_e,{}),(0,po.jsx)(S_e,{forceIsAutosaveable:t,disabled:y}),(0,po.jsx)(Nh,{className:"editor-header__post-preview-button",forceIsAutosaveable:t}),o&&v&&(0,po.jsx)(E_e,{disabled:g}),(o||!d)&&(0,po.jsx)(Wp.Slot,{scope:"core"}),!e&&(0,po.jsx)(c_e,{forceIsDirty:t,setEntitiesSavedStatesCallback:r}),e,(0,po.jsx)(cF,{})]})})}var b1e=XJe;var hE=a(G(),1),PF=a(he(),1),w1e=a(_e(),1),gE=a(U(),1),S1e=a(Rt(),1),x1e=a(yo(),1);var EF=a(T(),1),{PrivateInserterLibrary:QJe}=Y(PF.privateApis);function _1e(){let{blockSectionRootClientId:e,inserterSidebarToggleRef:t,inserter:r,showMostUsedBlocks:o,sidebarIsOpened:n}=(0,hE.useSelect)(m=>{let{getInserterSidebarToggleRef:h,getInserter:g,isPublishSidebarOpened:v}=Y(m(R)),{getBlockRootClientId:y,isZoomOut:b,getSectionRootClientId:w}=Y(m(PF.store)),{get:S}=m(S1e.store),{getActiveComplementaryArea:x}=m(Le),_=()=>{if(b()){let P=w();if(P)return P}return y()};return{inserterSidebarToggleRef:h(),inserter:g(),showMostUsedBlocks:S("core","mostUsedBlocks"),blockSectionRootClientId:_(),sidebarIsOpened:!!(x("core")||v())}},[]),{setIsInserterOpened:i}=(0,hE.useDispatch)(R),{disableComplementaryArea:s}=(0,hE.useDispatch)(Le),l=(0,w1e.useViewportMatch)("medium","<"),c=(0,gE.useRef)(),u=(0,gE.useCallback)(()=>{i(!1),t.current?.focus()},[t,i]),d=(0,gE.useCallback)(m=>{m.keyCode===x1e.ESCAPE&&!m.defaultPrevented&&(m.preventDefault(),u())},[u]),f=(0,EF.jsx)("div",{className:"editor-inserter-sidebar__content",children:(0,EF.jsx)(QJe,{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,EF.jsx)("div",{onKeyDown:d,className:"editor-inserter-sidebar",children:f})}var RF=a(he(),1),AF=a(_e(),1),IF=a(G(),1),iW=a(py(),1),Jc=a(U(),1),yE=a(j(),1),T1e=a(ta(),1),E1e=a(yo(),1);var vE=a(W(),1),kF=a(j(),1);var pi=a(T(),1);function C1e(){return(0,pi.jsxs)(pi.Fragment,{children:[(0,pi.jsxs)("div",{className:"editor-list-view-sidebar__outline",children:[(0,pi.jsxs)("div",{children:[(0,pi.jsx)(vE.__experimentalText,{children:(0,kF.__)("Characters:")}),(0,pi.jsx)(vE.__experimentalText,{children:(0,pi.jsx)(jS,{})})]}),(0,pi.jsxs)("div",{children:[(0,pi.jsx)(vE.__experimentalText,{children:(0,kF.__)("Words:")}),(0,pi.jsx)(BS,{})]}),(0,pi.jsxs)("div",{children:[(0,pi.jsx)(vE.__experimentalText,{children:(0,kF.__)("Time to read:")}),(0,pi.jsx)(VS,{})]})]}),(0,pi.jsx)(Yw,{})]})}var Yh=a(T(),1),{TabbedSidebar:JJe}=Y(RF.privateApis);function P1e(){let{setIsListViewOpened:e}=(0,IF.useDispatch)(R),{getListViewToggleRef:t}=Y((0,IF.useSelect)(R)),r=(0,AF.useFocusOnMount)("firstElement"),o=(0,Jc.useCallback)(()=>{e(!1),t().current?.focus()},[t,e]),n=(0,Jc.useCallback)(v=>{v.keyCode===E1e.ESCAPE&&!v.defaultPrevented&&(v.preventDefault(),o())},[o]),[i,s]=(0,Jc.useState)(null),[l,c]=(0,Jc.useState)("list-view"),u=(0,Jc.useRef)(),d=(0,Jc.useRef)(),f=(0,Jc.useRef)(),m=(0,AF.useMergeRefs)([r,f,s]);function h(v){let y=iW.focus.tabbable.find(d.current)[0];if(v==="list-view"){let b=iW.focus.tabbable.find(f.current)[0];(u.current.contains(b)?b:y).focus()}else y.focus()}let g=(0,Jc.useCallback)(()=>{u.current.contains(u.current.ownerDocument.activeElement)?o():h(l)},[o,l]);return(0,T1e.useShortcut)("core/editor/toggle-list-view",g),(0,Yh.jsx)("div",{className:"editor-list-view-sidebar",onKeyDown:n,ref:u,children:(0,Yh.jsx)(JJe,{tabs:[{name:"list-view",title:(0,yE._x)("List View","Post overview"),panel:(0,Yh.jsx)("div",{className:"editor-list-view-sidebar__list-view-container",children:(0,Yh.jsx)("div",{className:"editor-list-view-sidebar__list-view-panel-content",children:(0,Yh.jsx)(RF.__experimentalListView,{dropZoneElement:i})})}),panelRef:m},{name:"outline",title:(0,yE._x)("Outline","Post overview"),panel:(0,Yh.jsx)("div",{className:"editor-list-view-sidebar__list-view-container",children:(0,Yh.jsx)(C1e,{})})}],onClose:o,onSelect:v=>c(v),defaultTabId:"list-view",ref:d,closeButtonLabel:(0,yE.__)("Close")})})}var wE=a(G(),1),bE=a(W(),1);var Kh=a(j(),1);var OF=a(G(),1),qh=a(W(),1),k1e=a(ee(),1),dm=a(j(),1),NF=a(go(),1),R1e=a(U(),1);var $c=a(T(),1);function $Je(){let{revisions:e,perPage:t,currentRevisionId:r,revisionKey:o,revisionPage:n,totalRevisions:i}=(0,OF.useSelect)(w=>{let{getCurrentRevisionId:S,getRevisionPage:x,getPageRevisions:_,getRevisionsPerPage:P}=Y(w(R)),I=w(R).getCurrentPostType();if(!I)return{};let k=w(k1e.store).getEntityConfig("postType",I)?.revisionKey||"id",D=x();return{revisions:_(D),perPage:P(),currentRevisionId:S(),revisionKey:k,revisionPage:D,totalRevisions:w(R).getCurrentPostRevisionsCount()}},[]),{setCurrentRevisionId:s,setRevisionPage:l}=Y((0,OF.useDispatch)(R)),c=!e,u=Math.ceil(i/t)||1,d=(0,R1e.useMemo)(()=>e&&[...e].reverse(),[e]),f=d?.findIndex(w=>w[o]===r),m=w=>{let S=d?.[w];S&&s(S[o])},h=(0,NF.getSettings)(),g=w=>{let S=d?.[w];return S?(0,NF.dateI18n)(h.formats.datetime,S.date):w},v=u>1;if(c&&!v)return(0,$c.jsx)(qh.Spinner,{});if(!c&&!d?.length)return(0,$c.jsx)("span",{className:"editor-revisions-header__no-revisions",children:(0,dm.__)("No revisions found.")});if(i<=1)return(0,$c.jsx)("span",{className:"editor-revisions-header__no-revisions",children:(0,dm.__)("Only one revision found.")});let y=w=>{let S=i-(w-1)*t,x=Math.max(1,S-t+1);return(0,dm.sprintf)((0,dm.__)("Revisions %1$s\u2013%2$s"),x,S)},b=c||f===-1?(0,$c.jsx)(qh.Spinner,{}):(0,$c.jsx)(qh.RangeControl,{__next40pxDefaultSize:!0,"aria-valuetext":g(f),className:"editor-revisions-header__slider",hideLabelFromVision:!0,label:(0,dm.__)("Revision"),max:d?.length-1,min:0,marks:!0,onChange:m,renderTooltipContent:g,value:f,withInputField:!1});return v?(0,$c.jsxs)(le,{direction:"row",gap:"sm",align:"center",style:{flex:1},children:[(0,$c.jsx)(qh.Button,{icon:pr,label:n<u?y(n+1):(0,dm.__)("No older revisions"),onClick:()=>l(n+1),disabled:c||n>=u,size:"compact",accessibleWhenDisabled:!0}),(0,$c.jsx)("div",{style:{flex:1,minWidth:0,display:"flex",justifyContent:"center"},children:b}),(0,$c.jsx)(qh.Button,{icon:hr,label:n>1?y(n-1):(0,dm.__)("No newer revisions"),onClick:()=>l(n-1),disabled:c||n<=1,size:"compact",accessibleWhenDisabled:!0})]}):b}var A1e=$Je;var ba={document:"edit-post/document",block:"edit-post/block"};var Qa=a(T(),1);function e$e({showDiff:e,onToggleDiff:t}){let{currentRevisionId:r,sidebarIsOpened:o}=(0,wE.useSelect)(d=>({currentRevisionId:Y(d(R)).getCurrentRevisionId(),sidebarIsOpened:!!d(Le).getActiveComplementaryArea("core")}),[]),{setCurrentRevisionId:n,restoreRevision:i}=Y((0,wE.useDispatch)(R)),{enableComplementaryArea:s,disableComplementaryArea:l}=(0,wE.useDispatch)(Le),c=!!r,u=()=>{r&&i(r)};return(0,Qa.jsx)(oF,{className:"editor-revisions-header",toolbar:(0,Qa.jsx)(bE.Button,{__next40pxDefaultSize:!0,size:"compact",icon:ug,label:(0,Kh._x)("Show changes","revisions"),isPressed:e,onClick:t}),center:(0,Qa.jsx)(A1e,{}),settings:(0,Qa.jsxs)(Qa.Fragment,{children:[(0,Qa.jsx)(Nh,{className:"editor-header__post-preview-button"}),(0,Qa.jsx)(bE.Button,{__next40pxDefaultSize:!0,icon:(0,Kh.isRTL)()?sg:Od,label:(0,Kh._x)("Settings","panel button label"),isPressed:o,"aria-expanded":o,onClick:()=>{o?l("core"):s("core",ba.document)},size:"compact"}),(0,Qa.jsx)(bE.Button,{__next40pxDefaultSize:!0,variant:"secondary",size:"compact",onClick:()=>n(null),children:(0,Kh.__)("Exit")}),(0,Qa.jsx)(bE.Button,{__next40pxDefaultSize:!0,accessibleWhenDisabled:!0,variant:"primary",size:"compact",className:"editor-revisions-header__restore-button",disabled:!c,onClick:u,children:(0,Kh.__)("Restore")}),(0,Qa.jsx)(cF,{disabled:!0})]})})}var sW=e$e;var aCe=a(W(),1),lCe=a(he(),1),cCe=a(G(),1),uCe=a(U(),1),dCe=a(xn(),1);var Ki=a(he(),1),ru=a(U(),1),UF=a(G(),1),fW=a(bt(),1),J1e=a(ee(),1),WF=a(_e(),1);var aW=a(G(),1),I1e=a(ee(),1),MF=a(U(),1),lW=a(j(),1),O1e=a(W(),1);var N1e=a(T(),1);function M1e({contentRef:e}){let{onNavigateToEntityRecord:t,templateId:r}=(0,aW.useSelect)(s=>{let{getEditorSettings:l,getCurrentTemplateId:c}=s(R);return{onNavigateToEntityRecord:l().onNavigateToEntityRecord,templateId:c()}},[]),o=(0,aW.useSelect)(s=>!!s(I1e.store).canUser("create",{kind:"postType",name:"wp_template"}),[]),[n,i]=(0,MF.useState)(!1);return(0,MF.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,N1e.jsx)(O1e.__experimentalConfirmDialog,{isOpen:n,confirmButtonText:(0,lW.__)("Edit template"),onConfirm:()=>{i(!1),t({postId:r,postType:"wp_template"})},onCancel:()=>i(!1),size:"medium",children:(0,lW.__)("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 F1e=a(_e(),1),DF=a(G(),1),cW=a(he(),1);var t$e=500;function D1e(e,t,r){return Math.min(Math.max(e,t),r)}function r$e(e,t,r){let o=e-D1e(e,r.left,r.right),n=t-D1e(t,r.top,r.bottom);return Math.sqrt(o*o+n*n)}function L1e({isEnabled:e=!0}={}){let{getEnabledClientIdsTree:t,getBlockName:r,getBlockOrder:o}=Y((0,DF.useSelect)(cW.store)),{selectBlock:n}=(0,DF.useDispatch)(cW.store);return(0,F1e.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(),y=r$e(c,u,v);y<f&&y<t$e&&(f=y,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 FF=a(G(),1),B1e=a(_e(),1),uW=a(he(),1);function V1e(){let{getSettings:e,isZoomOut:t}=Y((0,FF.useSelect)(uW.store)),{resetZoomLevel:r}=Y((0,FF.useDispatch)(uW.store));return(0,B1e.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 j1e=a(G(),1),z1e=a(_e(),1),LF=a(he(),1),H1e=a(bt(),1),o$e=':root :where(.editor-styles-wrapper)::after {content: ""; display: block; height: 40vh;}';function U1e(e){let t=(0,j1e.useRegistry)(),r=(0,z1e.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(LF.store).getBlockOrder(""),d=u[u.length-1],f=t.select(LF.store).getBlock(d),{selectBlock:m,insertDefaultBlock:h}=t.dispatch(LF.store);f&&(0,H1e.isUnmodifiedDefaultBlock)(f)?m(d):h()}let{ownerDocument:i}=o;return i.addEventListener("pointerdown",n),()=>{i.removeEventListener("pointerdown",n)}},[t]);return e?[r,o$e]:[]}var BF=a(G(),1),W1e=a(_e(),1),dW=a(he(),1);function G1e(){let{getEditedContentOnlySection:e}=Y((0,BF.useSelect)(dW.store)),{stopEditingContentOnlySection:t}=Y((0,BF.useDispatch)(dW.store));return(0,W1e.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 VF=a(G(),1),q1e=a(_e(),1),K1e=a(bt(),1),jF=a(ee(),1),zF=a(he(),1),yd=a(W(),1),Z1e=a(xn(),1),Zh=a(U(),1),tu=a(j(),1);var $S=a(U(),1);function Y1e(e){let[t,r]=(0,$S.useState)(),o=(0,$S.useRef)(!1);return(0,$S.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 eu=a(T(),1),{BlockCanvasCover:n$e}=Y(zF.privateApis),{retrySyncConnection:i$e}=Y(jF.privateApis),s$e=2e4;function X1e(){let[e,t]=(0,Zh.useState)(!1),[r,o]=(0,Zh.useState)(!1),[n,i]=(0,Zh.useState)(!1),{connectionStatus:s,isCollaborationEnabled:l,postType:c}=(0,VF.useSelect)(x=>{let{getSyncConnectionStatus:_,getPostType:P}=Y(x(jF.store)),{getCurrentPostType:I,isCollaborationEnabledForCurrentPost:A}=Y(x(R)),k=I();return{connectionStatus:_()||null,isCollaborationEnabled:A(),postType:k?P(k):null}},[]),{onManualRetry:u,secondsRemaining:d}=Y1e(s),f=(0,q1e.useCopyToClipboard)(()=>{let x=(0,VF.select)(zF.store).getBlocks();return(0,K1e.serialize)(x)});(0,Zh.useEffect)(()=>{let x=setTimeout(()=>{t(!0)},s$e);return()=>clearTimeout(x)},[]),(0,Zh.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,Zh.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===eU;if(!l||!e&&!h||!r)return null;let g=s&&"error"in s?s?.error:void 0;if(!m&&(0,Z1e.applyFilters)("editor.isSyncConnectionErrorHandled",!1,g?.code)!==!1)return null;let v=n?()=>{u(),i$e()}:void 0,y=m0e(g),b="",w=!1;d&&d>0?b=(0,tu.sprintf)((0,tu._n)("Retrying connection in %d second\u2026","Retrying connection in %d seconds\u2026",d),d):d===0&&(w=!0,b=(0,tu.__)("Retrying\u2026"));let S="edit.php";return c?.slug&&(S=`edit.php?post_type=${c.slug}`),(0,eu.jsx)(n$e.Fill,{children:(0,eu.jsx)(yd.Modal,{overlayClassName:"editor-sync-connection-error-modal",isDismissible:!1,onRequestClose:()=>{},shouldCloseOnClickOutside:!1,shouldCloseOnEsc:!1,size:"medium",title:y.title,children:(0,eu.jsxs)(yd.__experimentalVStack,{spacing:6,children:[(0,eu.jsx)("p",{children:y.description}),b&&(0,eu.jsx)("p",{className:"editor-sync-connection-error-modal__retry-countdown",children:b}),(0,eu.jsxs)(yd.__experimentalHStack,{justify:"right",children:[(0,eu.jsx)(yd.Button,{__next40pxDefaultSize:!0,href:S,isDestructive:!0,variant:"tertiary",children:(0,tu.sprintf)((0,tu.__)("Back to %s"),c?.labels?.name??(0,tu.__)("Posts"))}),(0,eu.jsx)(yd.Button,{__next40pxDefaultSize:!0,ref:f,variant:v?"secondary":"primary",children:(0,tu.__)("Copy Post Content")}),v&&(0,eu.jsx)(yd.Button,{__next40pxDefaultSize:!0,accessibleWhenDisabled:!0,"aria-disabled":w,disabled:w,isBusy:w,variant:"primary",onClick:v,children:(0,tu.__)("Retry")})]})]})})})}var Kn=a(T(),1),{LayoutStyle:HF,useLayoutClasses:a$e,useLayoutStyles:l$e,ExperimentalBlockCanvas:c$e,useFlashEditableBlocks:u$e}=Y(Ki.privateApis);function mW(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=mW(e[t].innerBlocks);if(r)return r}}}function Q1e(e){for(let t=0;t<e.length;t++)if(e[t].name==="core/post-content")return!0;return!1}function d$e({autoFocus:e,disableIframe:t=!1,iframeProps:r,contentRef:o,className:n}){let i=(0,WF.useViewportMatch)("small","<"),{renderingMode:s,postContentAttributes:l,editedPostTemplate:c={},wrapperBlockName:u,wrapperUniqueId:d,deviceType:f,isFocusedEntity:m,isDesignPostType:h,postType:g,isPreview:v,styles:y}=(0,UF.useSelect)(be=>{let{getCurrentPostId:Ce,getCurrentPostType:Ge,getCurrentTemplateId:He,getEditorSettings:ge,getRenderingMode:ie,getDeviceType:ce}=Y(be(R)),{getPostType:ae,getEditedEntityRecord:ye}=be(J1e.store),Ie=Ge(),Oe=ie(),ke;Ie===ol?ke="core/block":Oe==="post-only"&&(ke="core/post-content");let ue=ge(),re=ue.supportsTemplateMode,ne=ae(Ie),Te=He(),Qe=Te?ye("postType",er,Te):void 0;return{renderingMode:Oe,postContentAttributes:ue.postContentAttributes,isDesignPostType:rc.includes(Ie),editedPostTemplate:ne?.viewable&&re?Qe:void 0,wrapperBlockName:ke,wrapperUniqueId:Ce(),deviceType:ce(),isFocusedEntity:!!ue.onNavigateToPreviousEntityRecord,postType:Ie,isPreview:ue.isPreviewMode,styles:ue.styles}},[]),{isCleanNewPost:b}=(0,UF.useSelect)(R),{hasRootPaddingAwareAlignments:w,themeHasDisabledLayoutStyles:S,themeSupportsLayout:x,isZoomedOut:_}=(0,UF.useSelect)(be=>{let{getSettings:Ce,isZoomOut:Ge}=Y(be(Ki.store)),He=Ce();return{themeHasDisabledLayoutStyles:He.disableLayoutStyles,themeSupportsLayout:He.supportsLayout,hasRootPaddingAwareAlignments:He.__experimentalFeatures?.useRootPaddingAwareAlignments,isZoomedOut:Ge()}},[]),P=(0,ru.useRef)(),I=(0,Ki.__experimentalUseResizeCanvas)(f),[A]=(0,Ki.useSettings)("layout"),k=(0,ru.useMemo)(()=>s!=="post-only"||h?{type:"default"}:x?{...A,type:"constrained"}:{type:"default"},[s,x,A,h]),D=(0,ru.useMemo)(()=>{if(!c?.content&&!c?.blocks&&l)return l;if(c?.blocks)return mW(c?.blocks);let be=typeof c?.content=="string"?c?.content:"";return mW((0,fW.parse)(be))||{}},[c?.content,c?.blocks,l]),E=(0,ru.useMemo)(()=>{if(!c?.content&&!c?.blocks)return!1;if(c?.blocks)return Q1e(c?.blocks);let be=typeof c?.content=="string"?c?.content:"";return Q1e((0,fW.parse)(be))||!1},[c?.content,c?.blocks]),{layout:C={},align:M=""}=D||{},B=a$e(D,"core/post-content"),N=Z({"is-layout-flow":!x},x&&B,M&&`align${M}`),z=l$e(D,"core/post-content",".block-editor-block-list__layout.is-root-container"),O=(0,ru.useMemo)(()=>C&&(C?.type==="constrained"||C?.inherit||C?.contentSize||C?.wideSize)?{...A,...C,type:"constrained"}:{...A,...C,type:"default"},[C?.type,C?.inherit,C?.contentSize,C?.wideSize,A]),F=l?O:k,L=F?.type==="default"&&!E?k:F,H=(0,Ki.__unstableUseTypingObserver)(),q=(0,ru.useRef)();(0,ru.useEffect)(()=>{!e||!b()||q?.current?.focus()},[e,b]);let Q=`.is-root-container.alignwide { max-width: var(--wp--style--global--wide-size); margin-left: auto; margin-right: auto;}
		.is-root-container.alignwide:where(.is-layout-flow) > :not(.alignleft):not(.alignright) { max-width: var(--wp--style--global--wide-size);}
		.is-root-container.alignfull { max-width: none; margin-left: auto; margin-right: auto;}
		.is-root-container.alignfull:where(.is-layout-flow) > :not(.alignleft):not(.alignright) { max-width: none;}`,J=[Cm,Ko,ol].includes(g)&&!v&&!i&&!_,te=g===Cm&&v,[se,$]=U1e(!v&&s==="post-only"&&!h),X="display:flex;align-items:center;justify-content:center;",oe=(0,ru.useMemo)(()=>[...y??[],{css:`:where(.block-editor-iframe__body){display:flow-root;}.is-root-container{display:flow-root;${J||te?"min-height:0!important;":""}}
				${$||""}
				${J?`.block-editor-iframe__html{background:var(--wp-editor-canvas-background);min-height:100vh;${X}}.block-editor-iframe__body{width:100%;}`:""}${te?`.block-editor-iframe__body{${X}padding:var(--wp--style--block-gap,2em);}`:""}`}],[y,J,te,$]),pe=(0,Ki.__unstableUseTypewriter)();return o=(0,WF.useMergeRefs)([P,o,s==="post-only"?pe:null,u$e({isEnabled:s==="template-locked"}),L1e({isEnabled:s==="template-locked"}),V1e(),se,G1e()]),(0,Kn.jsxs)("div",{className:Z("editor-visual-editor","edit-post-visual-editor",n,{"has-padding":m||J,"is-resizable":J,"is-iframed":!t}),children:[(0,Kn.jsx)(X1e,{}),(0,Kn.jsx)(Ww,{enableResizing:J,height:"100%",children:(0,Kn.jsxs)(c$e,{shouldIframe:!t,contentRef:o,styles:oe,height:"100%",iframeProps:{...r,style:{...r?.style,...I}},children:[x&&!S&&s==="post-only"&&!h&&(0,Kn.jsxs)(Kn.Fragment,{children:[(0,Kn.jsx)(HF,{selector:".editor-visual-editor__post-title-wrapper",layout:k}),(0,Kn.jsx)(HF,{selector:".block-editor-block-list__layout.is-root-container",layout:L}),M&&(0,Kn.jsx)(HF,{css:Q}),z&&(0,Kn.jsx)(HF,{layout:O,css:z})]}),s==="post-only"&&!h&&(0,Kn.jsx)("div",{className:Z("editor-visual-editor__post-title-wrapper","edit-post-visual-editor__post-title-wrapper",{"has-global-padding":w}),contentEditable:!1,ref:H,style:{marginTop:"4rem"},children:(0,Kn.jsx)(ND,{ref:q})}),(0,Kn.jsxs)(Ki.RecursionProvider,{blockName:u,uniqueId:d,children:[(0,Kn.jsx)(Ki.BlockList,{className:Z("is-"+f.toLowerCase()+"-preview",s!=="post-only"||h?"wp-site-blocks":`${N} wp-block-post-content`,{"has-global-padding":s==="post-only"&&!h&&w}),layout:F,dropZoneElement:t?P.current:P.current?.parentNode,__unstableDisableDropZone:s==="template-locked"}),s==="template-locked"&&(0,Kn.jsx)(M1e,{contentRef:P})]})]})})]})}var GF=d$e;var ex=a(j(),1),YF=a(aT(),1),$1e=[{name:"revision/diff-removed",title:(0,ex.__)("Removed"),tagName:"del",className:"revision-diff-removed"},{name:"revision/diff-added",title:(0,ex.__)("Added"),tagName:"ins",className:"revision-diff-added"},{name:"revision/diff-format-added",title:(0,ex.__)("Format added"),tagName:"span",className:"revision-diff-format-added"},{name:"revision/diff-format-removed",title:(0,ex.__)("Format removed"),tagName:"span",className:"revision-diff-format-removed"},{name:"revision/diff-format-changed",title:(0,ex.__)("Format changed"),tagName:"span",className:"revision-diff-format-changed"}];function eCe(){for(let e of $1e)(0,YF.registerFormatType)(e.name,{...e,attributes:{title:"title"},edit:()=>null})}function tCe(){for(let e of $1e)(0,YF.unregisterFormatType)(e.name)}var Ja=a(U(),1),qF=a(_e(),1),oCe=a(G(),1),KF=a(he(),1),SE=a(j(),1);var Xh=a(T(),1),{useBlockElementRef:f$e}=Y(KF.privateApis);function nCe(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(...nCe(r.innerBlocks));return t}var rCe={added:(0,SE.__)("Go to added block"),removed:(0,SE.__)("Go to removed block"),modified:(0,SE.__)("Go to modified block")};function pW(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 m$e({clientId:e,status:t,subscribe:r}){let o=(0,Ja.useRef)();f$e(e,o);let[n,i]=(0,Ja.useState)(()=>pW(o.current));return(0,Ja.useEffect)(()=>r(()=>{i(pW(o.current))}),[r]),(0,Ja.useEffect)(()=>{i(pW(o.current))},[t]),n?(0,Xh.jsxs)(ht.Root,{children:[(0,Xh.jsx)(ht.Trigger,{render:(0,Xh.jsx)("button",{className:`revision-diff-marker is-${t}`,style:{top:`${n.top}%`,height:`${Math.max(n.height,.5)}%`},onClick:()=>o.current?.focus(),"aria-label":rCe[t]})}),(0,Xh.jsx)(ht.Popup,{children:rCe[t]})]}):null}function iCe(){let[e,t]=(0,Ja.useState)(!1),r=(0,Ja.useRef)(new Set),o=(0,oCe.useSelect)(l=>l(KF.store).getBlocks(),[]),n=(0,Ja.useMemo)(()=>nCe(o),[o]),i=(0,Ja.useCallback)(l=>(r.current.add(l),()=>r.current.delete(l)),[]),s=(0,qF.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,qF.useMergeRefs)([s,t]),(0,Xh.jsx)("div",{className:"revision-diff-markers",role:"navigation","aria-label":(0,SE.__)("Document changes"),children:e&&n.map(({clientId:l,status:c})=>(0,Xh.jsx)(m$e,{clientId:l,status:c,subscribe:i},l))},"diff-markers")]}var wa=a(T(),1),{usePrivateStyleOverride:sCe}=Y(lCe.privateApis),p$e=`
<svg
	xmlns="http://www.w3.org/2000/svg"
	viewBox="0 0 0 0"
	width="0"
	height="0"
	focusable="false"
	role="none"
	aria-hidden="true"
	style="visibility: hidden; position: absolute; left: -9999px; overflow: hidden;"
>
	<defs>
		<filter id="revision-removed-filter" x="0" y="0" width="100%" height="100%">
			<!-- Desaturate and add red tint -->
			<feColorMatrix type="matrix"
				values="0.5 0.3 0.2 0 0.15
				        0.2 0.2 0.1 0 0
				        0.2 0.2 0.1 0 0
				        0   0   0   0.8 0"/>
		</filter>
	</defs>
</svg>
`,h$e=`
	.is-revision-added {
		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%);
		outline: 3px solid #00a32a;
		outline-offset: 2px;
	}
	.is-revision-removed,
	.revision-diff-removed {
		text-decoration: line-through;
		filter: url(#revision-removed-filter);
	}
	.is-revision-removed {
		outline: 3px dashed #d63638;
		outline-offset: 2px;
	}
	.is-revision-modified {
		outline: 3px dotted #9a7000 !important;
		outline-offset: 2px;
	}
	.revision-diff-added {
		background-color: color-mix(in srgb, currentColor 5%, #00a32a 15%);
		text-decoration: none;
	}
	.revision-diff-format-added {
		text-decoration: underline wavy color-mix(in srgb, currentColor 30%, #00a32a 70%);
		text-decoration-thickness: 2px;
	}
	.revision-diff-format-removed {
		text-decoration: underline wavy color-mix(in srgb, currentColor 20%, #d63638 80%);
		text-decoration-thickness: 2px;
	}
	.revision-diff-format-changed {
		text-decoration: underline wavy color-mix(in srgb, currentColor 30%, #dba617 70%);
		text-decoration-thickness: 2px;
	}
`;function g$e(e){return t=>{let{block:r,className:o}=t,n=r?.__revisionDiffStatus?.status,i=Z(o,{"is-revision-added":n==="added","is-revision-removed":n==="removed","is-revision-modified":n==="modified"});return(0,wa.jsx)(e,{...t,className:i})}}var v$e="editor/revisions-canvas/withRevisionDiffClasses";(0,dCe.addFilter)("editor.BlockListBlock",v$e,g$e);function y$e({showDiff:e}){return sCe({css:e?h$e:""}),sCe({assets:e?p$e:"",__unstableType:"svgs"}),null}function b$e({showDiff:e}){let[t,r]=iCe();return(0,wa.jsxs)(wa.Fragment,{children:[(0,wa.jsx)(GF,{contentRef:t}),e&&r]})}function hW(){(0,uCe.useEffect)(()=>(eCe(),()=>{tCe()}),[]);let{revision:e,showDiff:t}=(0,cCe.useSelect)(r=>{let{getCurrentRevision:o,isShowingRevisionDiff:n}=Y(r(R));return{revision:o(),showDiff:n()}},[]);return e?(0,wa.jsxs)(wa.Fragment,{children:[(0,wa.jsx)(y$e,{showDiff:t}),(0,wa.jsx)("div",{className:"editor-revisions-canvas__content",children:(0,wa.jsx)(b$e,{showDiff:t})})]}):(0,wa.jsx)("div",{className:"editor-revisions-canvas__loading",children:(0,wa.jsx)(aCe.Spinner,{})})}var XF=a(G(),1),ZF=a(U(),1),Yl=a(j(),1),fCe=a(xt(),1),mCe=a(ee(),1),pCe=a(Rt(),1);var{useOnCollaboratorJoin:w$e,useOnCollaboratorLeave:S$e,useOnPostSave:x$e}=Y(mCe.privateApis),gW={COLLAB_POST_UPDATED:"collab-post-updated",COLLAB_USER_ENTERED:"collab-user-entered",COLLAB_USER_EXITED:"collab-user-exited"},vW=["publish","private","future"];function _$e(e,t,r){return r?(0,Yl.sprintf)((0,Yl.__)("Post published by %s."),e):vW.includes(t)?(0,Yl.sprintf)((0,Yl.__)("Post updated by %s."),e):(0,Yl.sprintf)((0,Yl.__)("Draft saved by %s."),e)}function hCe(e,t){let{postStatus:r,isCollaborationEnabled:o,showNotifications:n}=(0,XF.useSelect)(u=>{let{getCurrentPostAttribute:d,isCollaborationEnabledForCurrentPost:f}=Y(u(R));return{postStatus:d("status"),isCollaborationEnabled:f(),showNotifications:u(pCe.store).get("core","showCollaborationNotifications")??!0}},[]),{createNotice:i}=(0,XF.useDispatch)(fCe.store),s=o&&n,l=s?e:null,c=s?t:null;w$e(l,c,(0,ZF.useCallback)((u,d)=>{d&&u.collaboratorInfo.enteredAt<d.collaboratorInfo.enteredAt||i("info",(0,Yl.sprintf)((0,Yl.__)("%s has joined the post."),u.collaboratorInfo.name),{id:`${gW.COLLAB_USER_ENTERED}-${u.collaboratorInfo.id}`,type:"snackbar",isDismissible:!1})},[i])),S$e(l,c,(0,ZF.useCallback)(u=>{i("info",(0,Yl.sprintf)((0,Yl.__)("%s has left the post."),u.collaboratorInfo.name),{id:`${gW.COLLAB_USER_EXITED}-${u.collaboratorInfo.id}`,type:"snackbar",isDismissible:!1})},[i])),x$e(l,c,(0,ZF.useCallback)((u,d,f)=>{if(!r)return;let m=u.postStatus??r??"draft",h=f?.postStatus??r,g=!(h&&vW.includes(h))&&vW.includes(m),v=_$e(d.collaboratorInfo.name,m,g);i("info",v,{id:`${gW.COLLAB_POST_UPDATED}-${d.collaboratorInfo.id}`,type:"snackbar",isDismissible:!1})},[i,r]))}var QF=a(G(),1),xE=a(W(),1),yW=a(j(),1),gCe=a(U(),1);var ql=a(T(),1),{Fill:zar,Slot:C$e}=(0,xE.createSlotFill)("ActionsPanel");function vCe({setEntitiesSavedStatesCallback:e,closeEntitiesSavedStates:t,isEntitiesSavedStatesOpen:r,forceIsDirtyPublishPanel:o}){let{closePublishSidebar:n,togglePublishSidebar:i}=(0,QF.useDispatch)(R),{publishSidebarOpened:s,isPublishable:l,isDirty:c,hasOtherEntitiesChanges:u}=(0,QF.useSelect)(m=>{let{isPublishSidebarOpened:h,isEditedPostPublishable:g,isCurrentPostPublished:v,isEditedPostDirty:y,hasNonPostEntityChanges:b}=m(R),w=b();return{publishSidebarOpened:h(),isPublishable:!v()&&g(),isDirty:w||y(),hasOtherEntitiesChanges:w}},[]),d=(0,gCe.useCallback)(()=>e(!0),[]),f;return s?f=(0,ql.jsx)(eD,{onClose:n,forceIsDirty:o,PrePublishExtension:JN.Slot,PostPublishExtension:KN.Slot}):l&&!u?f=(0,ql.jsx)("div",{className:"editor-layout__toggle-publish-panel",children:(0,ql.jsx)(xE.Button,{__next40pxDefaultSize:!0,variant:"secondary",onClick:i,"aria-expanded":!1,children:(0,yW.__)("Open publish panel")})}):f=(0,ql.jsx)("div",{className:"editor-layout__toggle-entities-saved-states-panel",children:(0,ql.jsx)(xE.Button,{__next40pxDefaultSize:!0,variant:"secondary",onClick:d,"aria-expanded":!1,"aria-haspopup":"dialog",disabled:!c,accessibleWhenDisabled:!0,children:(0,yW.__)("Open save panel")})}),(0,ql.jsxs)(ql.Fragment,{children:[r&&(0,ql.jsx)(ON,{close:t,renderDialog:!0}),(0,ql.jsx)(C$e,{bubblesVirtually:!0}),!r&&f]})}var yCe=a(W(),1),JF=a(G(),1),bW=a(j(),1),bCe=a(ta(),1),$F=a(U(),1);var fm=a(T(),1);function wCe({autoFocus:e=!1}){let{switchEditorMode:t}=(0,JF.useDispatch)(R),{shortcut:r,isRichEditingEnabled:o}=(0,JF.useSelect)(i=>{let{getEditorSettings:s}=i(R),{getShortcutRepresentation:l}=i(bCe.store);return{shortcut:l("core/editor/toggle-mode"),isRichEditingEnabled:s().richEditingEnabled}},[]),n=(0,$F.useRef)();return(0,$F.useEffect)(()=>{e||n?.current?.focus()},[e]),(0,fm.jsxs)("div",{className:"editor-text-editor",children:[o&&(0,fm.jsxs)("div",{className:"editor-text-editor__toolbar",children:[(0,fm.jsx)("h2",{children:(0,bW.__)("Editing code")}),(0,fm.jsx)(yCe.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:()=>t("visual"),shortcut:r,children:(0,bW.__)("Exit code editor")})]}),(0,fm.jsxs)("div",{className:"editor-text-editor__body",children:[(0,fm.jsx)(DD,{ref:n}),(0,fm.jsx)($T,{})]})]})}var xr=a(T(),1),SCe={header:(0,Qh.__)("Editor top bar"),body:(0,Qh.__)("Editor content"),sidebar:(0,Qh.__)("Editor settings"),actions:(0,Qh.__)("Editor publish"),footer:(0,Qh.__)("Editor footer")};function xCe(){let e=(0,_E.useSelect)(t=>t(tx.store).isValidTemplate(),[]);return(0,xr.jsx)(ECe.InlineNotices,{className:"editor-notices",pinnedNoticesClassName:"editor-notices__pinned",dismissibleNoticesClassName:"editor-notices__dismissible",children:!e&&(0,xr.jsx)(PN,{})})}function PCe({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:y,showBlockBreadcrumbs:b,postTypeLabel:w,stylesPath:S,showStylebook:x,isRevisionsMode:_,showDiff:P}=(0,_E.useSelect)(N=>{let{get:z}=N(_Ce.store),{getEditorSettings:O,getPostTypeLabel:F,getCurrentPostType:L,getCurrentPostId:H}=N(R),{getStylesPath:q,getShowStylebook:Q,isRevisionsMode:J,isShowingRevisionDiff:te}=Y(N(R)),se=O(),$=N(R).getEditorMode();return!se.richEditingEnabled&&$==="visual"&&($="text"),!se.codeEditingEnabled&&$==="text"&&($="visual"),{mode:$,postId:H(),postType:L(),isInserterOpened:N(R).isInserterOpened(),isListViewOpened:N(R).isListViewOpened(),isDistractionFree:z("core","distractionFree"),isPreviewMode:se.isPreviewMode,showBlockBreadcrumbs:z("core","showBlockBreadcrumbs"),postTypeLabel:F(),stylesPath:q(),showStylebook:Q(),isRevisionsMode:J(),showDiff:te()}},[]),{setShowRevisionDiff:I}=Y((0,_E.useDispatch)(R));hCe(f,m);let A=(0,CCe.useViewportMatch)("medium"),k=g?(0,Qh.__)("Document Overview"):(0,Qh.__)("Block Library"),D=x||S?.startsWith("/revisions"),E=!D,[C,M]=(0,e6.useState)(!1),B=(0,e6.useCallback)(N=>{typeof C=="function"&&C(N),M(!1)},[C]);return _?(0,xr.jsx)(Ev,{className:Z("editor-editor-interface",e),labels:SCe,header:(0,xr.jsx)(sW,{showDiff:P,onToggleDiff:()=>I(!P)}),content:(0,xr.jsx)(hW,{}),sidebar:(0,xr.jsx)(El.Slot,{scope:"core"})}):(0,xr.jsx)(Ev,{isDistractionFree:v,className:Z("editor-editor-interface",e,{"is-entity-save-view-open":!!C,"is-distraction-free":v&&!y}),labels:{...SCe,secondarySidebar:k},header:!y&&(0,xr.jsx)(b1e,{forceIsDirty:r,setEntitiesSavedStatesCallback:M,customSaveButton:s,forceDisableBlockTools:c}),editorNotices:(0,xr.jsx)(xCe,{}),secondarySidebar:!y&&d==="visual"&&(h&&(0,xr.jsx)(_1e,{})||g&&(0,xr.jsx)(P1e,{})),sidebar:!y&&!v&&(0,xr.jsx)(El.Slot,{scope:"core"}),content:(0,xr.jsxs)(xr.Fragment,{children:[!v&&!y&&(0,xr.jsx)(xCe,{}),D&&(0,xr.jsx)(Wge,{}),E&&(0,xr.jsxs)(xr.Fragment,{children:[!y&&d==="text"&&(0,xr.jsx)(wCe,{autoFocus:i}),!y&&!A&&d==="visual"&&(0,xr.jsx)(tx.BlockToolbar,{hideDragHandle:!0}),(y||d==="visual")&&(0,xr.jsx)(GF,{contentRef:o,disableIframe:n,autoFocus:i,iframeProps:u}),t,(0,xr.jsx)(CF,{postId:f,postType:m})]})]}),footer:!y&&!v&&A&&b&&d==="visual"&&(0,xr.jsx)(tx.BlockBreadcrumb,{rootLabelText:w?(0,TCe.decodeEntities)(w):void 0}),actions:y?void 0:l||(0,xr.jsx)(vCe,{closeEntitiesSavedStates:B,isEntitiesSavedStatesOpen:C,setEntitiesSavedStatesCallback:M,forceIsDirtyPublishPanel:r})})}var T6=a(he(),1),ME=a(G(),1),_d=a(U(),1),bx=a(j(),1);var VEe=a(ta(),1),jEe=a(W(),1);var kCe=a(G(),1),RCe=a(ic(),1);var ACe=a(T(),1),{OverridesPanel:T$e}=Y(RCe.privateApis);function ICe(){return(0,kCe.useSelect)(t=>t(R).getCurrentPostType()==="wp_block",[])?(0,ACe.jsx)(T$e,{}):null}var EE=a(W(),1),kW=a(G(),1);var tTe=a(j(),1),lx=a(G(),1),a6=a(ee(),1);var rTe=a(W(),1),SW=a(U(),1);var OCe=a(U(),1),NCe=a(G(),1),k$e=a(Rt(),1);var R$e=a(G(),1),A$e=a(Rt(),1);var FCe=a(G(),1),LCe=a(ee(),1);var MCe=a(Pm(),1),{lock:Clr,unlock:DCe}=(0,MCe.__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 wW({kind:e,name:t}){return(0,FCe.useSelect)(r=>DCe(r(LCe.store)).getViewConfig(e,t),[e,t])}var $a=a(W(),1);var ZCe=a(ee(),1),XCe=a(G(),1),QCe=a(U(),1),eg=a(j(),1),JCe=a(py(),1);var s6=a(G(),1),TE=a(U(),1),YCe=a(j(),1),sx=a(W(),1);var qCe=a(ee(),1);var CE=a(G(),1),n6=a(U(),1),WCe=a(ee(),1);var Kl=a(j(),1),BCe=a(U(),1),mm=a(W(),1),ox=a(G(),1),r6=a(ee(),1),VCe=a(xt(),1);var t6=a(Ot(),1);function rx(e){return typeof e.title=="string"?(0,t6.decodeEntities)(e.title):e.title&&"rendered"in e.title?(0,t6.decodeEntities)(e.title.rendered):e.title&&"raw"in e.title?(0,t6.decodeEntities)(e.title.raw):""}var Jh=a(T(),1),I$e=({items:e,closeModal:t})=>{let[r]=e,o=rx(r),{showOnFront:n,currentHomePage:i,isSaving:s}=(0,ox.useSelect)(g=>{let{getEntityRecord:v,isSavingEntityRecord:y}=g(r6.store),b=v("root","site"),w=v("postType","page",b?.page_on_front);return{showOnFront:b?.show_on_front,currentHomePage:w,isSaving:y("root","site")}}),{saveEntityRecord:l}=(0,ox.useDispatch)(r6.store),{createSuccessNotice:c,createErrorNotice:u}=(0,ox.useDispatch)(VCe.store);async function d(g){g.preventDefault();try{await l("root","site",{page_on_front:r.id,show_on_front:"page"}),c((0,Kl.__)("Homepage updated."),{type:"snackbar"})}catch(v){let y=v.message&&v.code!=="unknown_error"?v.message:(0,Kl.__)("An error occurred while setting the homepage.");u(y,{type:"snackbar"})}finally{t?.()}}let f="";n==="posts"?f=(0,Kl.__)("This will replace the current homepage which is set to display latest posts."):i&&(f=(0,Kl.sprintf)((0,Kl.__)('This will replace the current homepage: "%s"'),rx(i)));let m=(0,Kl.sprintf)((0,Kl.__)('Set "%1$s" as the site homepage? %2$s'),o,f).trim(),h=(0,Kl.__)("Set homepage");return(0,Jh.jsx)("form",{onSubmit:d,children:(0,Jh.jsxs)(mm.__experimentalVStack,{spacing:"5",children:[(0,Jh.jsx)(mm.__experimentalText,{children:m}),(0,Jh.jsxs)(mm.__experimentalHStack,{justify:"right",children:[(0,Jh.jsx)(mm.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:()=>{t?.()},disabled:s,accessibleWhenDisabled:!0,children:(0,Kl.__)("Cancel")}),(0,Jh.jsx)(mm.Button,{__next40pxDefaultSize:!0,variant:"primary",type:"submit",disabled:s,accessibleWhenDisabled:!0,children:h})]})]})})},jCe=()=>{let{pageOnFront:e,pageForPosts:t}=(0,ox.useSelect)(r=>{let{getEntityRecord:o,canUser:n}=r(r6.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,BCe.useMemo)(()=>({id:"set-as-homepage",label:(0,Kl.__)("Set as homepage"),isEligible(r){return!(r.status!=="publish"||r.type!=="page"||e===r.id||t===r.id)},modalFocusOnMount:"firstContentElement",RenderModal:I$e}),[t,e])};var Zl=a(j(),1),zCe=a(U(),1),pm=a(W(),1),nx=a(G(),1),o6=a(ee(),1),HCe=a(xt(),1);var $h=a(T(),1),O$e=({items:e,closeModal:t})=>{let[r]=e,o=rx(r),{currentPostsPage:n,isPageForPostsSet:i,isSaving:s}=(0,nx.useSelect)(g=>{let{getEntityRecord:v,isSavingEntityRecord:y}=g(o6.store),b=v("root","site");return{currentPostsPage:v("postType","page",b?.page_for_posts),isPageForPostsSet:b?.page_for_posts!==0,isSaving:y("root","site")}}),{saveEntityRecord:l}=(0,nx.useDispatch)(o6.store),{createSuccessNotice:c,createErrorNotice:u}=(0,nx.useDispatch)(HCe.store);async function d(g){g.preventDefault();try{await l("root","site",{page_for_posts:r.id,show_on_front:"page"}),c((0,Zl.__)("Posts page updated."),{type:"snackbar"})}catch(v){let y=v.message&&v.code!=="unknown_error"?v.message:(0,Zl.__)("An error occurred while setting the posts page.");u(y,{type:"snackbar"})}finally{t?.()}}let f=i&&n?(0,Zl.sprintf)((0,Zl.__)('This will replace the current posts page: "%s"'),rx(n)):(0,Zl.__)("This page will show the latest posts."),m=(0,Zl.sprintf)((0,Zl.__)('Set "%1$s" as the posts page? %2$s'),o,f),h=(0,Zl.__)("Set posts page");return(0,$h.jsx)("form",{onSubmit:d,children:(0,$h.jsxs)(pm.__experimentalVStack,{spacing:"5",children:[(0,$h.jsx)(pm.__experimentalText,{children:m}),(0,$h.jsxs)(pm.__experimentalHStack,{justify:"right",children:[(0,$h.jsx)(pm.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:()=>{t?.()},disabled:s,accessibleWhenDisabled:!0,children:(0,Zl.__)("Cancel")}),(0,$h.jsx)(pm.Button,{__next40pxDefaultSize:!0,variant:"primary",type:"submit",disabled:s,accessibleWhenDisabled:!0,children:h})]})]})})},UCe=()=>{let{pageOnFront:e,pageForPosts:t}=(0,nx.useSelect)(r=>{let{getEntityRecord:o,canUser:n}=r(o6.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,zCe.useMemo)(()=>({id:"set-as-posts-page",label:(0,Zl.__)("Set as posts page"),isEligible(r){return!(r.status!=="publish"||r.type!=="page"||e===r.id||t===r.id)},modalFocusOnMount:"firstContentElement",RenderModal:O$e}),[t,e])};var GCe=a(T(),1);function i6({postType:e,onActionPerformed:t,context:r}){let{defaultActions:o}=(0,CE.useSelect)(c=>{let{getEntityActions:u}=Y(c(R));return{defaultActions:u("postType",e)}},[e]),n=(0,CE.useSelect)(c=>{if(e!=="page")return!1;let{getDefaultTemplateId:u,getEntityRecord:d,canUser:f}=c(WCe.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=jCe(),s=UCe(),{registerPostTypeSchema:l}=Y((0,CE.useDispatch)(R));return(0,n6.useEffect)(()=>{l(e)},[l,e]),(0,n6.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,GCe.jsx)(d,{...f,onActionPerformed:m=>{f.onActionPerformed&&f.onActionPerformed(m),t(c[u].id,m)}})}}}return c},[r,o,t,i,s,n])}var hi=a(T(),1),{Menu:ix,kebabCase:N$e}=Y(sx.privateApis);function KCe({postType:e,postId:t,onActionPerformed:r}){let[o,n]=(0,TE.useState)(null),{item:i,permissions:s}=(0,s6.useSelect)(d=>{let{getEditedEntityRecord:f,getEntityRecordPermissions:m}=Y(d(qCe.store));return{item:f("postType",e,t),permissions:m("postType",e,t)}},[t,e]),l=(0,TE.useMemo)(()=>({...i,permissions:s}),[i,s]),c=i6({postType:e,onActionPerformed:r}),u=(0,TE.useMemo)(()=>c.filter(d=>!d.isEligible||d.isEligible(l)),[c,l]);return(0,hi.jsxs)(hi.Fragment,{children:[(0,hi.jsxs)(ix,{placement:"bottom-end",children:[(0,hi.jsx)(ix.TriggerButton,{render:(0,hi.jsx)(sx.Button,{size:"small",icon:to,label:(0,YCe.__)("Actions"),disabled:!u.length,accessibleWhenDisabled:!0,className:"editor-all-actions-button"})}),(0,hi.jsx)(ix.Popover,{children:(0,hi.jsx)(F$e,{actions:u,items:[l],setActiveModalAction:n})})]}),!!o&&(0,hi.jsx)(D$e,{action:o,items:[l],closeModal:()=>n(null)})]})}function M$e({action:e,onClick:t,items:r}){let o=typeof e.label=="string"?e.label:e.label(r);return(0,hi.jsx)(ix.Item,{onClick:t,children:(0,hi.jsx)(ix.ItemLabel,{children:o})})}function D$e({action:e,items:t,closeModal:r}){let o=typeof e.label=="string"?e.label:e.label(t);return(0,hi.jsx)(sx.Modal,{title:e.modalHeader||o,__experimentalHideHeader:!!e.hideModalHeader,onRequestClose:r??(()=>{}),focusOnMount:"firstContentElement",size:"medium",overlayClassName:`editor-action-modal editor-action-modal__${N$e(e.id)}`,children:(0,hi.jsx)(e.RenderModal,{items:t,closeModal:r})})}function F$e({actions:e,items:t,setActiveModalAction:r}){let o=(0,s6.useRegistry)();return(0,hi.jsx)(ix.Group,{children:e.map(n=>(0,hi.jsx)(M$e,{action:n,onClick:()=>{if("RenderModal"in n){r(n);return}n.callback(t,{registry:o})},items:t},n.id))})}var ou=a(T(),1),{Badge:L$e}=Y($a.privateApis);function tg({postType:e,postId:t,hideActions:r=!1,onActionPerformed:o,onClose:n}){let i=(0,QCe.useMemo)(()=>Array.isArray(t)?t:[t],[t]),{postTitle:s,icon:l,labels:c}=(0,XCe.useSelect)(f=>{let{getEditedEntityRecord:m,getCurrentTheme:h,getPostType:g}=f(ZCe.store),{getPostIcon:v,getCurrentPostType:y,isRevisionsMode:b,getCurrentRevision:w}=Y(f(R)),S="";if(b()){let _=y(),P=w();return S=P?.title?.rendered||P?.title?.raw||"",{postTitle:S,icon:v(_,{area:P?.area}),labels:g(_)?.labels}}let x=m("postType",e,i[0]);if(i.length===1){let{default_template_types:_=[]}=h()??{};S=([er,Ko].includes(e)?sl({template:x,templateTypes:_}):{})?.title||x?.title}return{postTitle:S,icon:v(e,{area:x?.area}),labels:g(e)?.labels}},[i,e]),u=eN(t),d=(0,eg.__)("No title");return c?.name&&i.length>1?d=(0,eg.sprintf)((0,eg.__)("%1$d %2$s"),i.length,c?.name):s&&(d=(0,JCe.__unstableStripHTML)(s)),(0,ou.jsxs)($a.__experimentalVStack,{spacing:1,className:"editor-post-card-panel",children:[(0,ou.jsxs)($a.__experimentalHStack,{spacing:2,className:"editor-post-card-panel__header",alignment:"flex-start",children:[(0,ou.jsx)($a.Icon,{className:"editor-post-card-panel__icon",icon:l}),(0,ou.jsxs)($a.__experimentalText,{numberOfLines:2,truncate:!0,className:"editor-post-card-panel__title",as:"h2",children:[(0,ou.jsx)("span",{className:"editor-post-card-panel__title-name",children:d}),u&&i.length===1&&(0,ou.jsx)(L$e,{children:u})]}),!r&&i.length===1&&(0,ou.jsx)(KCe,{postType:e,postId:i[0],onActionPerformed:o}),n&&(0,ou.jsx)($a.Button,{size:"small",icon:Mx,label:(0,eg.__)("Close"),onClick:n})]}),i.length>1&&(0,ou.jsx)($a.__experimentalText,{className:"editor-post-card-panel__description",children:(0,eg.sprintf)((0,eg.__)("Changes will be applied to all selected %s."),c?.name.toLowerCase())})]})}var $Ce=a(W(),1),eTe=a(T(),1);function B$e({className:e,children:t}){return(0,eTe.jsx)($Ce.__experimentalVStack,{className:Z("editor-post-panel__section",e),children:t})}var ax=B$e;var Ky=a(T(),1),V$e={layout:{type:"panel"},fields:[]};function oTe({onActionPerformed:e}){let{postType:t,postId:r}=(0,lx.useSelect)(h=>{let{getCurrentPostType:g,getCurrentPostId:v}=h(R);return{postType:g(),postId:v()}},[]),{form:o}=wW({kind:"postType",name:t}),n=o??V$e,i=(0,lx.useSelect)(h=>!t||!r?null:h(a6.store).getEditedEntityRecord("postType",t,r),[t,r]),s=eS(),l=(0,lx.useSelect)(h=>h(a6.store).getCurrentTheme()?.is_block_theme?null:h(R).getEditorSettings().availableTemplates??{},[]),c=(0,SW.useMemo)(()=>!i||!l?i:{...i,available_templates:l},[i,l]),{editEntityRecord:u}=(0,lx.useDispatch)(a6.store),d=Vw({postType:t}),f=(0,SW.useMemo)(()=>d?.map(h=>h.id==="status"?{...h,elements:h.elements.filter(g=>g.value!=="trash")}:h.id==="template"?s?s==="classic"&&Object.keys(l??{}).length===0?{...h,readOnly:!0,render:()=>(0,tTe.__)("Default template")}:h:null:h).filter(Boolean),[d,s,l]);return(0,Ky.jsx)(ax,{className:"editor-post-summary",children:(0,Ky.jsxs)(rTe.__experimentalVStack,{spacing:4,children:[(0,Ky.jsx)(tg,{postType:t,postId:r,onActionPerformed:e}),(0,Ky.jsx)(nC,{data:c,fields:f,form:n,onChange:h=>{h.status&&h.status!=="future"&&i?.status==="future"&&new Date(i.date)>new Date&&(h.date=null),h.status&&h.status==="private"&&i?.password&&(h.password=""),u("postType",t,r,h)}}),(0,Ky.jsx)(DS,{onActionPerformed:e})]})})}var nTe=a(W(),1),iTe=a(G(),1),Xl=a(j(),1),sTe=a($b(),1),aTe=a(U(),1),xW=a(ee(),1);var l6=a(T(),1),j$e=189;function lTe(){let e=(0,iTe.useSelect)(t=>{let{getEditedPostAttribute:r,getCurrentPostType:o,getCurrentPostId:n}=t(R),{canUser:i}=t(xW.store),{getEntityRecord:s}=t(xW.store),l=i("read",{kind:"root",name:"site"})?s("root","site"):void 0,c=o();return!(+n()===l?.page_for_posts)&&![er,Ko].includes(c)&&r("content")},[]);return(0,l6.jsx)(_W,{postContent:e})}function _W({postContent:e}){let t=(0,Xl._x)("words","Word count type. Do not translate!"),r=(0,aTe.useMemo)(()=>e?(0,sTe.count)(e,t):0,[e,t]);if(!r)return null;let o=Math.round(r/j$e),n=(0,Xl.sprintf)((0,Xl._n)("%s word","%s words",r),r.toLocaleString()),i=o<=1?(0,Xl.__)("1 minute"):(0,Xl.sprintf)((0,Xl._n)("%s minute","%s minutes",o),o.toLocaleString());return(0,l6.jsx)("div",{className:"editor-post-content-information",children:(0,l6.jsx)(nTe.__experimentalText,{children:(0,Xl.sprintf)((0,Xl.__)("%1$s, %2$s read time."),n,i)})})}var c6=a(W(),1),cx=a(j(),1),cTe=a(G(),1),u6=a(U(),1),uTe=a(he(),1);var hm=a(T(),1);function z$e(){let{postFormat:e}=(0,cTe.useSelect)(i=>{let{getEditedPostAttribute:s}=i(R);return{postFormat:s("format")??"standard"}},[]),t=LT.find(i=>i.id===e),[r,o]=(0,u6.useState)(null),n=(0,u6.useMemo)(()=>({anchor:r,placement:"left-start",offset:36,shift:!0}),[r]);return(0,hm.jsx)(dS,{children:(0,hm.jsx)(Gt,{label:(0,cx.__)("Format"),ref:o,children:(0,hm.jsx)(c6.Dropdown,{popoverProps:n,contentClassName:"editor-post-format__dialog",focusOnMount:!0,renderToggle:({isOpen:i,onToggle:s})=>(0,hm.jsx)(c6.Button,{size:"compact",variant:"tertiary","aria-expanded":i,"aria-label":(0,cx.sprintf)((0,cx.__)("Change format: %s"),t?.caption),onClick:s,children:t?.caption}),renderContent:({onClose:i})=>(0,hm.jsxs)("div",{className:"editor-post-format__dialog-content",children:[(0,hm.jsx)(uTe.__experimentalInspectorPopoverHeader,{title:(0,cx.__)("Format"),onClose:i}),(0,hm.jsx)(BT,{})]})})})})}var dTe=z$e;var fTe=a(W(),1),mTe=a(G(),1),d6=a(j(),1),pTe=a(go(),1);var CW=a(T(),1);function hTe(){let e=(0,mTe.useSelect)(t=>t(R).getEditedPostAttribute("modified"),[]);return e?(0,CW.jsx)("div",{className:"editor-post-last-edited-panel",children:(0,CW.jsx)(fTe.__experimentalText,{children:(0,d6.sprintf)((0,d6.__)("Last edited %s."),(0,pTe.humanTimeDiff)(e))})}):null}var gm=a(j(),1),gTe=a(_e(),1),f6=a(G(),1),TW=a(ee(),1),vTe=a(Ot(),1),ux=a(W(),1),m6=a(U(),1),yTe=a(he(),1);var bd=a(T(),1),H$e={};function bTe(){let{editEntityRecord:e}=(0,f6.useDispatch)(TW.store),{postsPageTitle:t,postsPageId:r,isTemplate:o,postSlug:n}=(0,f6.useSelect)(d=>{let{getEntityRecord:f,getEditedEntityRecord:m,canUser:h}=d(TW.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):H$e,{getEditedPostAttribute:y,getCurrentPostType:b}=d(R);return{postsPageId:v?.id,postsPageTitle:v?.title,isTemplate:b()===er,postSlug:y("slug")}},[]),[i,s]=(0,m6.useState)(null),l=(0,m6.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,vTe.decodeEntities)(t);return(0,bd.jsx)(Gt,{label:(0,gm.__)("Blog title"),ref:s,children:(0,bd.jsx)(ux.Dropdown,{popoverProps:l,contentClassName:"editor-blog-title-dropdown__content",focusOnMount:!0,renderToggle:({isOpen:d,onToggle:f})=>(0,bd.jsx)(ux.Button,{size:"compact",variant:"tertiary","aria-expanded":d,"aria-label":(0,gm.sprintf)((0,gm.__)("Change blog title: %s"),u),onClick:f,children:u}),renderContent:({onClose:d})=>(0,bd.jsxs)(bd.Fragment,{children:[(0,bd.jsx)(yTe.__experimentalInspectorPopoverHeader,{title:(0,gm.__)("Blog title"),onClose:d}),(0,bd.jsx)(ux.__experimentalInputControl,{placeholder:(0,gm.__)("No title"),size:"__unstable-large",value:t,onChange:(0,gTe.debounce)(c,300),label:(0,gm.__)("Blog title"),help:(0,gm.__)("Set the Posts Page title. Appears in search results, and when the page is shared on social media."),hideLabelFromVision:!0})]})})})}var dx=a(j(),1),p6=a(G(),1),EW=a(ee(),1),fx=a(W(),1),h6=a(U(),1),wTe=a(he(),1);var wd=a(T(),1);function STe(){let{editEntityRecord:e}=(0,p6.useDispatch)(EW.store),{postsPerPage:t,isTemplate:r,postSlug:o}=(0,p6.useSelect)(c=>{let{getEditedPostAttribute:u,getCurrentPostType:d}=c(R),{getEditedEntityRecord:f,canUser:m}=c(EW.store),h=m("read",{kind:"root",name:"site"})?f("root","site"):void 0;return{isTemplate:d()===er,postSlug:u("slug"),postsPerPage:h?.posts_per_page||1}},[]),[n,i]=(0,h6.useState)(null),s=(0,h6.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,wd.jsx)(Gt,{label:(0,dx.__)("Posts per page"),ref:i,children:(0,wd.jsx)(fx.Dropdown,{popoverProps:s,contentClassName:"editor-posts-per-page-dropdown__content",focusOnMount:!0,renderToggle:({isOpen:c,onToggle:u})=>(0,wd.jsx)(fx.Button,{size:"compact",variant:"tertiary","aria-expanded":c,"aria-label":(0,dx.__)("Change posts per page"),onClick:u,children:t}),renderContent:({onClose:c})=>(0,wd.jsxs)(wd.Fragment,{children:[(0,wd.jsx)(wTe.__experimentalInspectorPopoverHeader,{title:(0,dx.__)("Posts per page"),onClose:c}),(0,wd.jsx)(fx.__experimentalNumberControl,{placeholder:0,value:t,size:"__unstable-large",spinControls:"custom",step:"1",min:"1",onChange:l,label:(0,dx.__)("Posts per page"),help:(0,dx.__)("Set the default number of posts to display on blog pages, including categories and tags. Some templates may override this setting."),hideLabelFromVision:!0})]})})})}var Sa=a(j(),1),g6=a(G(),1),PW=a(ee(),1),Sd=a(W(),1),v6=a(U(),1),xTe=a(he(),1);var Ql=a(T(),1),U$e=[{label:(0,Sa._x)("Open",'Adjective: e.g. "Comments are open"'),value:"open",description:(0,Sa.__)("Visitors can add new comments and replies.")},{label:(0,Sa.__)("Closed"),value:"",description:[(0,Sa.__)("Visitors cannot add new comments or replies."),(0,Sa.__)("Existing comments remain visible.")].join(" ")}];function _Te(){let{editEntityRecord:e}=(0,g6.useDispatch)(PW.store),{allowCommentsOnNewPosts:t,isTemplate:r,postSlug:o}=(0,g6.useSelect)(c=>{let{getEditedPostAttribute:u,getCurrentPostType:d}=c(R),{getEditedEntityRecord:f,canUser:m}=c(PW.store),h=m("read",{kind:"root",name:"site"})?f("root","site"):void 0;return{isTemplate:d()===er,postSlug:u("slug"),allowCommentsOnNewPosts:h?.default_comment_status||""}},[]),[n,i]=(0,v6.useState)(null),s=(0,v6.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,Ql.jsx)(Gt,{label:(0,Sa.__)("Discussion"),ref:i,children:(0,Ql.jsx)(Sd.Dropdown,{popoverProps:s,contentClassName:"editor-site-discussion-dropdown__content",focusOnMount:!0,renderToggle:({isOpen:c,onToggle:u})=>(0,Ql.jsx)(Sd.Button,{size:"compact",variant:"tertiary","aria-expanded":c,"aria-label":(0,Sa.__)("Change discussion settings"),onClick:u,children:t?(0,Sa.__)("Comments open"):(0,Sa.__)("Comments closed")}),renderContent:({onClose:c})=>(0,Ql.jsxs)(Ql.Fragment,{children:[(0,Ql.jsx)(xTe.__experimentalInspectorPopoverHeader,{title:(0,Sa.__)("Discussion"),onClose:c}),(0,Ql.jsxs)(Sd.__experimentalVStack,{spacing:3,children:[(0,Ql.jsx)(Sd.__experimentalText,{children:(0,Sa.__)("Changes will apply to new posts only. Individual posts may override these settings.")}),(0,Ql.jsx)(Sd.RadioControl,{className:"editor-site-discussion__options",hideLabelFromVision:!0,label:(0,Sa.__)("Comment status"),options:U$e,onChange:l,selected:t})]})]})})})}var Yt=a(T(),1),W$e="post-status";function CTe({onActionPerformed:e}){let t=(0,kW.useSelect)(r=>r(R).getCurrentPostType(),[]);return window?.__experimentalDataFormInspector&&["page","post"].includes(t)?(0,Yt.jsx)(oTe,{onActionPerformed:e}):(0,Yt.jsx)(G$e,{onActionPerformed:e})}function G$e({onActionPerformed:e}){let{isRemovedPostStatusPanel:t,postType:r,postId:o}=(0,kW.useSelect)(n=>{let{isEditorPanelRemoved:i,getCurrentPostType:s,getCurrentPostId:l}=n(R);return{isRemovedPostStatusPanel:i(W$e),postType:s(),postId:l()}},[]);return(0,Yt.jsx)(ax,{className:"editor-post-summary",children:(0,Yt.jsx)(XN.Slot,{children:n=>(0,Yt.jsx)(Yt.Fragment,{children:(0,Yt.jsxs)(EE.__experimentalVStack,{spacing:4,children:[(0,Yt.jsx)(tg,{postType:r,postId:o,onActionPerformed:e}),(0,Yt.jsx)(PM,{withPanelBody:!1}),(0,Yt.jsx)(Gbe,{}),(0,Yt.jsxs)(EE.__experimentalVStack,{spacing:1,children:[(0,Yt.jsx)(lTe,{}),(0,Yt.jsx)(hTe,{})]}),!t&&(0,Yt.jsxs)(EE.__experimentalVStack,{spacing:4,children:[(0,Yt.jsxs)(EE.__experimentalVStack,{spacing:1,children:[(0,Yt.jsx)(yU,{}),(0,Yt.jsx)(hD,{}),(0,Yt.jsx)(WD,{}),(0,Yt.jsx)(aM,{}),(0,Yt.jsx)(eM,{}),(0,Yt.jsx)(vM,{}),(0,Yt.jsx)(l0e,{}),(0,Yt.jsx)(BN,{}),(0,Yt.jsx)(yD,{}),(0,Yt.jsx)(bTe,{}),(0,Yt.jsx)(STe,{}),(0,Yt.jsx)(_Te,{}),(0,Yt.jsx)(dTe,{}),n]}),(0,Yt.jsx)(DS,{onActionPerformed:e})]})]})})})})}var UTe=a(G(),1),PE=a(W(),1),WTe=a(j(),1),GTe=a(vo(),1);var TTe=a(G(),1),ETe=a(ee(),1),PTe=a(Ot(),1),kTe=a(j(),1);var RTe=a(T(),1);function ATe(){let e=(0,TTe.useSelect)(t=>{let{getCurrentRevision:r}=Y(t(R)),o=r();return o?.author?t(ETe.store).getUser(o.author)?.name:null},[]);return e?(0,RTe.jsx)(Gt,{label:(0,kTe.__)("Author"),children:(0,PTe.decodeEntities)(e)}):null}var ITe=a(W(),1),OTe=a(G(),1),y6=a(j(),1),NTe=a(go(),1);var RW=a(T(),1);function MTe(){let e=(0,OTe.useSelect)(t=>{let{getCurrentRevision:r}=Y(t(R));return r()?.date},[]);return e?(0,RW.jsx)("div",{className:"editor-post-last-edited-panel",children:(0,RW.jsx)(ITe.__experimentalText,{children:(0,y6.sprintf)((0,y6.__)("Created %s."),(0,NTe.humanTimeDiff)(e))})}):null}var LTe=a(Fz(),1),BTe=a(G(),1),VTe=a(U(),1),jTe=a(j(),1);var DTe=a(W(),1);var Zy=a(T(),1);function b6({title:e,entries:t,initialOpen:r}){if(!t)return null;let o=Object.entries(t).map(([n,i])=>(0,Zy.jsx)(Gt,{label:n,children:(0,Zy.jsx)("span",{className:"editor-revision-fields-diff__value",children:i.map((s,l)=>s.added?(0,Zy.jsx)("ins",{className:"editor-revision-fields-diff__added",children:s.value},l):s.removed?(0,Zy.jsx)("del",{className:"editor-revision-fields-diff__removed",children:s.value},l):(0,Zy.jsx)("span",{children:s.value},l))})},n));return(0,Zy.jsx)(DTe.PanelBody,{title:e,initialOpen:r,children:o})}var zTe=a(T(),1);function FTe(e){return e==null?"":typeof e=="object"?JSON.stringify(e,null,2):String(e)}function HTe(){let{revision:e,previousRevision:t}=(0,BTe.useSelect)(o=>{let{getCurrentRevision:n,getPreviousRevision:i}=Y(o(R));return{revision:n(),previousRevision:i()}},[]),r=(0,VTe.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=FTe(o[l]),u=FTe(n[l]);!c&&!u||(s[l]=(0,LTe.diffWords)(u,c))}return Object.keys(s).length===0?null:s},[e,t]);return(0,zTe.jsx)(b6,{title:(0,jTe.__)("Meta"),entries:r,initialOpen:!1})}var xa=a(T(),1);function YTe(){let{revisionId:e,postId:t,postContent:r}=(0,UTe.useSelect)(o=>{let{getCurrentRevisionId:n,getCurrentRevision:i,getCurrentPostId:s}=Y(o(R)),l=n();return{revisionId:l,postId:s(),postContent:l&&i()?.content?.raw}},[]);return e?(0,xa.jsxs)(xa.Fragment,{children:[(0,xa.jsx)(ax,{className:"editor-post-summary",children:(0,xa.jsxs)(PE.__experimentalVStack,{spacing:4,children:[(0,xa.jsx)(tg,{postId:t,hideActions:!0}),(0,xa.jsxs)(PE.__experimentalVStack,{spacing:1,children:[(0,xa.jsx)(_W,{postContent:r}),(0,xa.jsx)(MTe,{})]}),(0,xa.jsx)(PE.ExternalLink,{href:(0,GTe.addQueryArgs)("revision.php",{revision:e}),children:(0,WTe.__)("Open classic revisions screen")}),(0,xa.jsx)(ATe,{})]})}),(0,xa.jsx)(HTe,{})]}):null}var RE=a(G(),1),IW=a(ee(),1),$Te=a(W(),1),OW=a(j(),1),eEe=a(he(),1),tEe=a(bt(),1);var qTe=a(G(),1),KTe=a(U(),1),AW=a(ee(),1),ZTe=a(bt(),1),XTe=a(ic(),1);var{EXCLUDED_PATTERN_SOURCES:Y$e,PATTERN_TYPES:q$e}=Y(XTe.privateApis);function QTe(e,t){return e.innerBlocks=e.innerBlocks.map(r=>QTe(r,t)),e.name==="core/template-part"&&e.attributes.theme===void 0&&(e.attributes.theme=t),e}function K$e(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:!Y$e.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 Z$e(e,t){return e.map(r=>({...r,keywords:r.keywords||[],type:q$e.theme,blocks:(0,ZTe.parse)(r.content,{__unstableSkipMigrationLogs:!0}).map(o=>QTe(o,t))}))}function JTe({area:e,name:t,slug:r}){let{blockPatterns:o,restBlockPatterns:n,currentThemeStylesheet:i}=(0,qTe.useSelect)(s=>{let{getEditorSettings:l}=s(R),c=l();return{blockPatterns:c.__experimentalAdditionalBlockPatterns??c.__experimentalBlockPatterns,restBlockPatterns:s(AW.store).getBlockPatterns(),currentThemeStylesheet:s(AW.store).getCurrentTheme().stylesheet}},[]);return(0,KTe.useMemo)(()=>{let s=[...o||[],...n||[]],l=K$e(s,{area:e,name:t,slug:r});return Z$e(l,i)},[e,t,r,o,n,i])}var kE=a(T(),1);function X$e({availableTemplates:e,onSelect:t}){return!e||e?.length===0?null:(0,kE.jsx)(eEe.__experimentalBlockPatternsList,{label:(0,OW.__)("Templates"),blockPatterns:e,onClickPattern:t,showTitlesAsTooltip:!0})}function Q$e(){let{area:e,name:t,slug:r,postType:o,postId:n}=(0,RE.useSelect)(c=>{let{getCurrentPostType:u,getCurrentPostId:d}=c(R),{getEditedEntityRecord:f}=c(IW.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,RE.useDispatch)(IW.store),s=JTe({area:e,name:t,slug:r}),l=async c=>{await i("postType",o,n,{blocks:c.blocks,content:(0,tEe.serialize)(c.blocks)})};return s?.length?(0,kE.jsx)($Te.PanelBody,{title:(0,OW.__)("Design"),initialOpen:o===Ko,children:(0,kE.jsx)(X$e,{availableTemplates:s,onSelect:l})}):null}function rEe(){let{postType:e}=(0,RE.useSelect)(t=>{let{getCurrentPostType:r}=t(R);return{postType:r()}},[]);return[Ko,er].includes(e)?(0,kE.jsx)(Q$e,{}):null}var oEe=a(W(),1),AE=a(j(),1),nEe=a(G(),1),iEe=a(U(),1),sEe=a(Ot(),1);var IE=a(T(),1),{Tabs:NW}=Y(oEe.privateApis),J$e=(e,t)=>{let{postTypeLabel:r,isRevisionsMode:o}=(0,nEe.useSelect)(i=>{let{getPostTypeLabel:s}=i(R),{isRevisionsMode:l}=Y(i(R));return{postTypeLabel:s(),isRevisionsMode:l()}},[]),n;return o?n=(0,AE.__)("Revision"):r?n=(0,sEe.decodeEntities)(r):n=(0,AE._x)("Document","noun, panel"),(0,IE.jsxs)(NW.TabList,{ref:t,children:[(0,IE.jsx)(NW.Tab,{tabId:ba.document,"data-tab-id":ba.document,children:n}),(0,IE.jsx)(NW.Tab,{tabId:ba.block,"data-tab-id":ba.block,children:(0,AE.__)("Block")})]})},aEe=(0,iEe.forwardRef)(J$e);var vEe=a(G(),1);var mx=a(G(),1),px=a(ee(),1),MW=a(he(),1),ym=a(W(),1),DW=a(U(),1),vm=a(j(),1),lEe=a(Ot(),1),cEe=a(xt(),1),uEe=a(Rt(),1);var bn=a(T(),1);function dEe(){let e=(0,mx.useSelect)(_=>_(R).getCurrentTemplateId(),[]),[t,r]=(0,DW.useState)(!1),[o,n]=(0,DW.useState)(!1),s=!!IT()?.length,{onNavigateToEntityRecord:l,canCreateTemplate:c,hasGoBack:u,getEditorSettings:d}=(0,mx.useSelect)(_=>{let{getEditorSettings:P}=_(R),I=P();return{onNavigateToEntityRecord:I.onNavigateToEntityRecord,canCreateTemplate:!!_(px.store).canUser("create",{kind:"postType",name:"wp_template"}),hasGoBack:I.hasOwnProperty("onNavigateToPreviousEntityRecord"),getEditorSettings:P}},[]),{get:f}=(0,mx.useSelect)(uEe.store),{createSuccessNotice:m}=(0,mx.useDispatch)(cEe.store),{editedRecord:h,hasResolved:g}=(0,px.useEntityRecord)("postType","wp_template",e),[v]=(0,px.useEntityBlockEditor)("postType","wp_template",{id:e});if(!g)return null;let y=u?[{label:(0,vm.__)("Go back"),onClick:()=>d().onNavigateToPreviousEntityRecord()}]:void 0,b=()=>{f("core/edit-site","welcomeGuideTemplate")||m((0,vm.__)("Editing template. Changes made here affect all posts and pages that use the template."),{type:"snackbar",actions:y})},w=(0,lEe.decodeEntities)(h.title),S=!!v?.length&&(0,bn.jsx)(MW.BlockPreview.Async,{children:(0,bn.jsx)(MW.BlockPreview,{blocks:v})}),x=()=>{if(!S)return null;if(s){let _=(0,vm.__)("Change template");return(0,bn.jsxs)(ht.Root,{children:[(0,bn.jsx)(ht.Trigger,{render:(0,bn.jsx)("div",{className:"editor-template-actions-panel__preview",role:"button",tabIndex:0,"aria-label":_,onClick:()=>n(!0),onKeyPress:()=>n(!0),children:S})}),(0,bn.jsx)(ht.Popup,{children:_})]})}return(0,bn.jsx)("div",{className:"editor-template-actions-panel__preview",children:S})};return(0,bn.jsxs)(bn.Fragment,{children:[(0,bn.jsx)(ym.PanelBody,{title:(0,vm.sprintf)((0,vm.__)("Template: %s"),w),initialOpen:!1,children:(0,bn.jsxs)(ym.__experimentalVStack,{children:[x(),(0,bn.jsxs)(ym.__experimentalHStack,{children:[l&&(0,bn.jsx)(ym.Button,{className:"editor-template-actions-panel__action",__next40pxDefaultSize:!0,variant:"secondary",onClick:()=>{l({postId:h.id,postType:"wp_template"}),b()},children:(0,vm.__)("Edit")}),c&&(0,bn.jsx)(ym.Button,{className:"editor-template-actions-panel__action",__next40pxDefaultSize:!0,variant:"secondary",onClick:()=>r(!0),children:(0,vm.__)("Create new")})]})]})}),t&&(0,bn.jsx)(Eh,{onClose:()=>r(!1)}),o&&(0,bn.jsx)(jH,{onRequestClose:()=>n(!1)})]})}var hx=a(G(),1),gx=a(ee(),1),FW=a(he(),1),iu=a(W(),1),fEe=a(U(),1),nu=a(j(),1),mEe=a(Ot(),1),pEe=a(xt(),1),hEe=a(Rt(),1);var Is=a(T(),1);function gEe(){let e=(0,hx.useSelect)(v=>v(R).getCurrentTemplateId(),[]),[t,r]=(0,fEe.useState)(!1),{onNavigateToEntityRecord:o,canCreateTemplate:n,hasGoBack:i,getEditorSettings:s}=(0,hx.useSelect)(v=>{let{getEditorSettings:y}=v(R),b=y();return{onNavigateToEntityRecord:b.onNavigateToEntityRecord,canCreateTemplate:!!v(gx.store).canUser("create",{kind:"postType",name:"wp_template"})&&b.supportsTemplateMode,hasGoBack:b.hasOwnProperty("onNavigateToPreviousEntityRecord"),getEditorSettings:y}},[]),{get:l}=(0,hx.useSelect)(hEe.store),{createSuccessNotice:c}=(0,hx.useDispatch)(pEe.store),{editedRecord:u}=(0,gx.useEntityRecord)("postType","wp_template",e),[d]=(0,gx.useEntityBlockEditor)("postType","wp_template",{id:e});if(!e&&!n)return null;let f=i?[{label:(0,nu.__)("Go back"),onClick:()=>s().onNavigateToPreviousEntityRecord()}]:void 0,m=()=>{l("core/edit-site","welcomeGuideTemplate")||c((0,nu.__)("Editing template. Changes made here affect all posts and pages that use the template."),{type:"snackbar",actions:f})},h=u?(0,mEe.decodeEntities)(u.title):void 0,g=!!d?.length&&(0,Is.jsx)(FW.BlockPreview.Async,{children:(0,Is.jsx)(FW.BlockPreview,{blocks:d})});return(0,Is.jsxs)(Is.Fragment,{children:[(0,Is.jsx)(iu.PanelBody,{title:u?(0,nu.sprintf)((0,nu.__)("Template: %s"),h):(0,nu.__)("Template"),initialOpen:!1,children:(0,Is.jsxs)(iu.__experimentalVStack,{children:[!e&&(0,Is.jsx)(iu.__experimentalText,{children:(0,nu.__)("This page uses a classic template. To edit this template with blocks, create a block template.")}),u&&g&&(0,Is.jsx)("div",{className:"editor-template-actions-panel__preview",children:g}),(0,Is.jsxs)(iu.__experimentalHStack,{children:[u&&o&&(0,Is.jsx)(iu.Button,{className:"editor-template-actions-panel__action",__next40pxDefaultSize:!0,variant:"secondary",onClick:()=>{o({postId:u.id,postType:"wp_template"}),m()},children:(0,nu.__)("Edit")}),n&&(0,Is.jsx)(iu.Button,{className:"editor-template-actions-panel__action",__next40pxDefaultSize:!0,variant:"secondary",onClick:()=>r(!0),children:e?(0,nu.__)("Create new"):(0,nu.__)("Create block template")})]})]})}),t&&(0,Is.jsx)(Eh,{onClose:()=>r(!1)})]})}var LW=a(T(),1);function yEe(){let e=(0,vEe.useSelect)(r=>r(R).getCurrentPostType(),[]),t=eS();return["page","post"].includes(e)?t==="classic"?(0,LW.jsx)(gEe,{}):t==="block-theme"?(0,LW.jsx)(dEe,{}):null:null}var OE=a(G(),1),bEe=a(he(),1),wEe=a(W(),1),SEe=a(j(),1);var w6=a(T(),1),{BlockQuickNavigation:$$e}=Y(bEe.privateApis),eet="core/template-part";function tet({postType:e}){let t=R5(),r=(0,OE.useSelect)(n=>{let{getPostBlocksByName:i}=Y(n(R));return i(er===e?eet:t)},[e,t]),{enableComplementaryArea:o}=(0,OE.useDispatch)(Le);return r.length===0?null:(0,w6.jsx)(wEe.PanelBody,{title:(0,SEe.__)("Content"),children:(0,w6.jsx)($$e,{clientIds:r,onSelect:()=>{o("core","edit-post/document")}})})}function xEe(){let{postType:e,renderingMode:t}=(0,OE.useSelect)(r=>{let{getCurrentPostType:o,getRenderingMode:n}=Y(r(R));return{postType:o(),renderingMode:n()}},[]);return t==="post-only"&&e!==er?null:(0,w6.jsx)(tet,{postType:e})}var S6=a(G(),1),_Ee=a(U(),1),CEe=a(bt(),1),_6=a(he(),1),TEe=a(W(),1),EEe=a(j(),1);var x6=a(T(),1),{BlockQuickNavigation:ret}=Y(_6.privateApis);function oet(){let e=(0,S6.useSelect)(o=>{let{getBlockTypes:n}=o(CEe.store);return n()},[]),t=(0,_Ee.useMemo)(()=>e.filter(o=>o.category==="theme").map(({name:o})=>o),[e]),r=(0,S6.useSelect)(o=>{let{getBlocksByName:n}=o(_6.store);return n(t)},[t]);return r.length===0?null:(0,x6.jsx)(TEe.PanelBody,{title:(0,EEe.__)("Content"),children:(0,x6.jsx)(ret,{clientIds:r})})}function PEe(){return(0,S6.useSelect)(t=>{let{getCurrentPostType:r}=t(R);return r()},[])!==Ko?null:(0,x6.jsx)(oet,{})}var xd=a(W(),1),kEe=a(ee(),1);var bm=a(go(),1),NE=a(G(),1),C6=a(j(),1);var el=a(T(),1),{Badge:net}=Y(xd.privateApis),iet=864e5,set=[],aet={activity:!0},cet=()=>{},uet={},det={type:"activity",titleField:"date",fields:["author"],layout:{density:"compact"}},fet=[{id:"date",label:(0,C6.__)("Date"),render:({item:e,field:t})=>{let r=(0,bm.getDate)(null).getTime(),o=t.getValue({item:e}),n=(0,bm.getDate)(o??null),i=r-n.getTime()>iet?(0,bm.dateI18n)((0,bm.getSettings)().formats.datetimeAbbreviated,n):(0,bm.humanTimeDiff)(n);return(0,el.jsx)("time",{className:"editor-post-revisions-panel__revision-date",dateTime:o,children:i})},enableSorting:!1,enableHiding:!1},d1];function met(){let{setCurrentRevisionId:e}=Y((0,NE.useDispatch)(R)),{revisionsCount:t,revisions:r,revisionKey:o,isLoading:n,lastRevisionId:i}=(0,NE.useSelect)(s=>{let{getCurrentPostId:l,getCurrentPostType:c}=s(R),{getCurrentPostRevisionsCount:u,getCurrentPostLastRevisionId:d}=s(R),{getRevisions:f,getEntityConfig:m,isResolving:h}=s(kEe.store),g=c(),y=m("postType",g)?.revisionKey||"id",b={per_page:3,orderby:"date",order:"desc",_fields:`${y},date,author`},w=["postType",g,l(),b],S=f(...w);return{revisionsCount:u(),lastRevisionId:d(),revisions:S,revisionKey:y,isLoading:h("getRevisions",w)}},[]);return(0,el.jsx)(xd.PanelBody,{title:(0,el.jsxs)(xd.__experimentalHStack,{justify:"space-between",align:"center",as:"span",children:[(0,el.jsx)("span",{children:(0,C6.__)("Revisions")}),(0,el.jsx)(net,{className:"editor-post-revisions-panel__revisions-count",children:t})]}),initialOpen:!1,children:(0,el.jsxs)(xd.__experimentalVStack,{className:"editor-post-revisions-panel",children:[(0,el.jsx)(AI,{view:det,onChangeView:cet,fields:fet,data:r||set,isLoading:n,paginationInfo:uet,defaultLayouts:aet,getItemId:s=>s[o],isItemClickable:()=>!0,onClickItem:s=>{e(s[o])},children:(0,el.jsx)(AI.Layout,{})}),(0,el.jsx)(xd.Button,{className:"editor-post-revisions-panel__view-all",__next40pxDefaultSize:!0,variant:"secondary",onClick:()=>e(i),children:(0,C6.__)("View all revisions")})]})})}function REe(){return(0,NE.useSelect)(t=>!!t(R).getEditorSettings().disableVisualRevisions,[])?null:(0,el.jsx)(rm,{children:(0,el.jsx)(met,{})})}var AEe=a(he(),1),IEe=a(G(),1),OEe=a(j(),1);var NEe=a(T(),1);function MEe(){let{block:e}=(0,IEe.useSelect)(r=>{let{getSelectedBlock:o}=r(AEe.store);return{block:o()}},[]);if(!e)return null;let t=e.attributes?.__revisionDiffStatus?.changedAttributes;return(0,NEe.jsx)(b6,{title:(0,OEe.__)("Changed attributes"),entries:t,initialOpen:!0})}var vx=a(G(),1),DEe=a(U(),1),FEe=a(he(),1),LEe=a(Rt(),1);function pet(){let{hasBlockSelection:e}=(0,vx.useSelect)(n=>({hasBlockSelection:!!n(FEe.store).getBlockSelectionStart()}),[]),{getActiveComplementaryArea:t}=(0,vx.useSelect)(Le),{enableComplementaryArea:r}=(0,vx.useDispatch)(Le),{get:o}=(0,vx.useSelect)(LEe.store);(0,DEe.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 BEe=pet;var _r=a(T(),1),{Tabs:yx}=Y(jEe.privateApis),het=_d.Platform.select({web:!0,native:!1}),get=({tabName:e,keyboardShortcut:t,onActionPerformed:r,extraPanels:o,postType:n})=>{let i=(0,_d.useRef)(null),s=(0,_d.useContext)(yx.Context),l=(0,ME.useSelect)(u=>Y(u(R)).isRevisionsMode());(0,_d.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,_r.jsx)(YTe,{}):c=(0,_r.jsxs)(_r.Fragment,{children:[(0,_r.jsx)(CTe,{onActionPerformed:r}),(0,_r.jsx)(YN.Slot,{}),(0,_r.jsx)(xEe,{}),window?.__experimentalDataFormInspector&&["post","page","wp_template","wp_template_part","wp_block"].includes(n)&&(0,_r.jsxs)(_r.Fragment,{children:[(0,_r.jsx)(yEe,{}),(0,_r.jsx)(REe,{})]}),(0,_r.jsx)(PEe,{}),(0,_r.jsx)(rEe,{}),(0,_r.jsx)(SD,{}),(0,_r.jsx)(ICe,{}),o]}),(0,_r.jsx)(Ey,{identifier:e,header:(0,_r.jsx)(yx.Context.Provider,{value:s,children:(0,_r.jsx)(aEe,{ref:i})}),closeLabel:(0,bx.__)("Close Settings"),className:"editor-sidebar__panel",headerClassName:"editor-sidebar__panel-tabs",title:(0,bx._x)("Settings","panel button label"),toggleShortcut:t,icon:(0,bx.isRTL)()?sg:Od,isActiveByDefault:het,children:(0,_r.jsxs)(yx.Context.Provider,{value:s,children:[(0,_r.jsx)(yx.TabPanel,{tabId:ba.document,focusable:!1,children:c}),(0,_r.jsxs)(yx.TabPanel,{tabId:ba.block,focusable:!1,children:[(0,_r.jsx)(T6.BlockInspector,{}),l&&(0,_r.jsx)(MEe,{})]})]})})},vet=({extraPanels:e,onActionPerformed:t})=>{BEe();let{tabName:r,keyboardShortcut:o,showSummary:n,postType:i}=(0,ME.useSelect)(c=>{let u=c(VEe.store).getShortcutRepresentation("core/editor/toggle-sidebar"),d=c(Le).getActiveComplementaryArea("core"),f=[ba.block,ba.document].includes(d),m=d;f||(m=c(T6.store).getBlockSelectionStart()?ba.block:ba.document);let h=c(R).getCurrentPostType();return{tabName:m,keyboardShortcut:u,showSummary:![er,Ko,Cm].includes(h),postType:h}},[]),{enableComplementaryArea:s}=(0,ME.useDispatch)(Le),l=(0,_d.useCallback)(c=>{c&&s("core",c)},[s]);return(0,_r.jsx)(yx,{selectedTabId:r,onSelect:l,selectOnMove:!1,children:(0,_r.jsx)(get,{tabName:r,keyboardShortcut:o,showSummary:n,onActionPerformed:t,extraPanels:e,postType:i})})},zEe=vet;var L6=a(j(),1),Ed=a(G(),1),yPe=a(U(),1),bPe=a(_e(),1),wPe=a(ta(),1);var GW=a(he(),1);var SPe=a(Rt(),1);var wx="edit-post/collab-history-sidebar",rg="edit-post/collab-sidebar",BW=[wx,rg];var og=a(U(),1),zW=a(j(),1),Tx=a(G(),1);var BE=a(he(),1);var Cx=a(U(),1),I6=a(W(),1);var $Ee=a(_e(),1),Zi=a(j(),1),jW=a(G(),1),ePe=a(py(),1),O6=a(he(),1);var VW=a(j(),1),JEe=a(U(),1),_x=a(G(),1),DE=a(he(),1);var YEe=a(W(),1);var E6=a(j(),1),Cd=a(go(),1),HEe=a(ee(),1),UEe=a(G(),1),WEe=a(he(),1);var Jl=a(T(),1);function GEe({avatar:e,name:t,date:r,userId:o}){let n=!!e,i=(0,Cd.getSettings)(),{currentUserAvatar:s,currentUserName:l,currentUserId:c,dateFormat:u=i.formats.date}=(0,UEe.useSelect)(v=>{let{canUser:y,getCurrentUser:b,getEntityRecord:w}=v(HEe.store),S=y("read",{kind:"root",name:"site"})?w("root","site"):void 0;if(n)return{dateFormat:S?.date_format};let{getSettings:x}=v(WEe.store),{__experimentalDiscussionSettings:_}=x(),P=_?.avatarURL,I=b();return{currentUserAvatar:I?.avatar_urls?.[48]??P,currentUserName:I?.name,currentUserId:I?.id,dateFormat:S?.date_format}},[n]),d=(0,Cd.getDate)(r),f=(0,Cd.dateI18n)("c",d),h=Math.floor((new Date-d)/(1e3*60*60*24))<30?(0,Cd.humanTimeDiff)(d):(0,Cd.dateI18n)(u,d),g=(0,Cd.dateI18n)((0,E6._x)("F j, Y g:i\xA0a","Note date full date format"),r);return(0,Jl.jsxs)(Jl.Fragment,{children:[(0,Jl.jsx)("img",{src:e||s,className:"editor-collab-sidebar-panel__user-avatar",alt:(0,E6.__)("User avatar"),width:32,height:32,style:{borderColor:Wl(o??c)}}),(0,Jl.jsxs)(le,{direction:"column",children:[(0,Jl.jsx)("span",{className:"editor-collab-sidebar-panel__user-name",children:t??l}),r&&(0,Jl.jsxs)(ht.Root,{children:[(0,Jl.jsx)(ht.Trigger,{render:(0,Jl.jsx)("time",{dateTime:f,className:"editor-collab-sidebar-panel__user-time",children:h})}),(0,Jl.jsx)(ht.Popup,{children:g})]})]})]})}var Xy=a(T(),1);function Sx({note:e,actions:t,className:r,children:o,...n}){return(0,Xy.jsxs)(le,{direction:"column",gap:"sm",className:r,...n,children:[(0,Xy.jsxs)(le,{direction:"row",align:"center",justify:"flex-start",gap:"md",children:[(0,Xy.jsx)(GEe,{avatar:e?.author_avatar_urls?.[48],name:e?.author_name,date:e?.date,userId:e?.author}),t&&(0,Xy.jsx)(YEe.FlexItem,{className:"editor-collab-sidebar-panel__note-actions",onClick:i=>i.stopPropagation(),children:(0,Xy.jsx)(le,{direction:"row",align:"center",children:t})})]}),o]})}var qEe=a(_U(),1),KEe=a(U(),1),xx=a(W(),1);var P6=a(j(),1),ZEe=a(_e(),1),XEe=a(yo(),1);var $l=a(T(),1);function Qy({onSubmit:e,onCancel:t,note:r,labels:o}){let[n,i]=(0,KEe.useState)(r?.content?.raw??""),s=(0,ZEe.useInstanceId)(Qy,"comment-input"),l=n===r?.content?.raw||!D_e(n).length;return(0,$l.jsxs)(le,{className:"editor-collab-sidebar-panel__note-form",direction:"column",gap:"lg",render:(0,$l.jsx)("form",{}),onSubmit:c=>{c.preventDefault(),e(n),i("")},children:[(0,$l.jsx)(tr,{render:(0,$l.jsx)("label",{htmlFor:s}),children:o?.input??(0,P6.__)("Note")}),(0,$l.jsx)(qEe.default,{id:s,value:n??"",onChange:c=>i(c.target.value),rows:1,maxRows:20,onKeyDown:c=>{XEe.isKeyboardEvent.primary(c,"Enter")&&!l&&c.target.parentNode.requestSubmit(),c.key==="Escape"&&(c.preventDefault(),t(c))}}),(0,$l.jsxs)(le,{direction:"row",align:"center",justify:"flex-end",gap:"sm",wrap:"wrap",children:[(0,$l.jsx)(xx.Button,{size:"compact",variant:"tertiary",onClick:t,children:(0,$l.jsx)(xx.__experimentalTruncate,{children:(0,P6.__)("Cancel")})}),(0,$l.jsx)(xx.Button,{size:"compact",accessibleWhenDisabled:!0,variant:"primary",type:"submit",disabled:l,children:(0,$l.jsx)(xx.__experimentalTruncate,{children:o?.submit??(0,P6.__)("Add note")})})]})]})}var QEe=a(T(),1);function k6({floating:e,className:t,style:r,children:o,...n}){let i=!!e;return(0,QEe.jsx)(le,{direction:"column",className:Z(t,{"is-floating":i}),ref:i?e.ref:void 0,style:i?{top:e.y,...r}:r,...n,children:o})}var R6=a(T(),1),{useBlockElement:yet}=Y(DE.privateApis);function FE({onSubmit:e,sidebarRef:t,floating:r}){let{clientId:o}=(0,_x.useSelect)(d=>{let{getSelectedBlockClientId:f}=d(DE.store);return{clientId:f()}},[]),n=(0,_x.useSelect)(d=>Y(d(R)).getSelectedNote(),[]),i=yet(o),{toggleBlockSpotlight:s}=Y((0,_x.useDispatch)(DE.store)),{selectNote:l}=Y((0,_x.useDispatch)(R)),c=(0,JEe.useRef)(!1),u=()=>{l(void 0),i?.focus(),s(o,!1)};return n!=="new"||!o?null:(0,R6.jsx)(k6,{floating:r,className:"editor-collab-sidebar-panel__thread is-selected",gap:"md",tabIndex:0,"aria-label":(0,VW.__)("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,R6.jsx)(Sx,{children:(0,R6.jsx)(Qy,{onSubmit:async d=>{c.current=!0;let{id:f}=await e({content:d});l(f),qi(f,t.current)},onCancel:u,labels:{input:(0,VW.__)("New note")}})})})}var Jy=a(U(),1),$y=a(W(),1),Zn=a(j(),1);var Xn=a(T(),1),{Menu:LE}=Y($y.privateApis);function bet({items:e,buttonRef:t}){return(0,Xn.jsxs)(LE,{placement:"bottom-end",children:[(0,Xn.jsx)(LE.TriggerButton,{render:(0,Xn.jsx)($y.Button,{ref:t,size:"small",icon:to,label:(0,Zn.__)("Actions"),disabled:!e.length,accessibleWhenDisabled:!0})}),(0,Xn.jsx)(LE.Popover,{modal:!1,children:e.map(r=>(0,Xn.jsx)(LE.Item,{onClick:r.onClick,children:(0,Xn.jsx)(LE.ItemLabel,{children:r.title})},r.id))})]})}function A6({note:e,parentNote:t,isSelected:r,onEditNote:o,onDeleteNote:n,onResolve:i}){let[s,l]=(0,Jy.useState)(null),c=(0,Jy.useRef)(null),u=e.parent===0,d=e.type==="note"&&e.meta&&(e.meta._wp_note_status==="resolved"||e.meta._wp_note_status==="reopen"),f=[{id:"edit",title:(0,Zn.__)("Edit"),isEligible:({status:b})=>b!=="approved",onClick:()=>l("edit")},{id:"reopen",title:(0,Zn._x)("Reopen","Reopen note"),isEligible:({status:b})=>b==="approved",onClick:()=>o({id:e.id,status:"hold"})},{id:"delete",title:(0,Zn.__)("Delete"),isEligible:()=>!0,onClick:()=>l("delete")}],m=t?.status!=="approved"?f.filter(b=>b.isEligible(e)):[],h=e.parent===0?(0,Zn.__)("Are you sure you want to delete this note? This will also delete all of this note's replies."):(0,Zn.__)("Are you sure you want to delete this reply?"),g=()=>{l(null),c.current?.focus()},v;if(s==="edit")v=(0,Xn.jsx)(Qy,{onSubmit:b=>{o({id:e.id,content:b}),l(null),c.current?.focus()},onCancel:g,note:e,labels:{submit:(0,Zn._x)("Update","verb"),input:(0,Zn.sprintf)((0,Zn.__)("Edit note %1$s by %2$s"),e.id,e.author_name)}});else if(d){let b=e.meta._wp_note_status==="resolved"?(0,Zn.__)("Marked as resolved"):(0,Zn.__)("Reopened"),w=e?.content?.raw,S=w&&typeof w=="string"&&w.trim()!==""?(0,Zn.sprintf)((0,Zn.__)("%1$s: %2$s"),b,w):b;v=(0,Xn.jsx)(Jy.RawHTML,{className:Z("editor-collab-sidebar-panel__note-content","editor-collab-sidebar-panel__resolution-text"),children:S})}else v=(0,Xn.jsx)(Jy.RawHTML,{className:"editor-collab-sidebar-panel__note-content",children:e?.content?.rendered});let y=r?(0,Xn.jsxs)(Xn.Fragment,{children:[u&&i&&(0,Xn.jsx)($y.Button,{label:(0,Zn._x)("Resolve","Mark note as resolved"),size:"small",icon:ag,disabled:e.status==="approved",accessibleWhenDisabled:e.status==="approved",onClick:i}),(0,Xn.jsx)(bet,{items:m,buttonRef:c})]}):null;return(0,Xn.jsxs)(Sx,{note:e,actions:y,role:e.parent!==0?"treeitem":void 0,children:[v,s==="delete"&&(0,Xn.jsx)($y.__experimentalConfirmDialog,{isOpen:!0,onConfirm:()=>{n(e),l(null)},onCancel:g,confirmButtonText:(0,Zn.__)("Delete"),children:h})]})}var _a=a(T(),1),{useBlockElement:wet}=Y(O6.privateApis);function tPe({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,jW.useDispatch)(O6.store)),{selectNote:m}=Y((0,jW.useDispatch)(R)),h=wet(e.blockClientId),g=(0,$Ee.useDebounce)(u,50),v=(0,Cx.useRef)(null),y=(0,Cx.useRef)(!1),b=s?.registerThread,w=s?.unregisterThread;(0,Cx.useEffect)(()=>{let N=v.current;return N&&b&&b(e.id,h,N),()=>w?.(e.id)},[h,e.id,b,w]),(0,Cx.useEffect)(()=>{!n||e.id==="new"||z_e(e.id,i.current)},[n,s?.y,e.id,i]);let S=()=>{g(e.blockClientId,!0)},x=()=>{g(e.blockClientId,!1)},_=()=>{u(e.blockClientId,!0)},P=N=>{if(!document.hasFocus())return;let z=N.relatedTarget?.closest(".editor-collab-sidebar-panel__thread"),O=N.relatedTarget?.closest('[role="dialog"]'),F=y.current;z&&!F||O||F&&N.currentTarget.contains(N.relatedTarget)||(u(e.blockClientId,!1),A())},I=()=>{n||(m(e.id),qi(e.id,i.current),f(e.blockClientId,!0),e.blockClientId&&d(e.blockClientId,null))},A=()=>{m(void 0),f(e.blockClientId,!1)},k=()=>{t({id:e.id,status:"approved"}),A(),c?h?.focus():qi(e.id,i.current)},D=e?.reply||[],E=D.length>0?D[D.length-1]:void 0,C=D.length>0?D.slice(0,-1):[],M=F_e((0,ePe.__unstableStripHTML)(e.content?.rendered),10),B=e.blockClientId?(0,Zi.sprintf)((0,Zi.__)("Note: %s"),M):(0,Zi.sprintf)((0,Zi.__)("Original block deleted. Note: %s"),M);return c&&e.id==="new"?(0,_a.jsx)(FE,{onSubmit:r,sidebarRef:i,floating:{y:s.y,ref:v}}):(0,_a.jsxs)(k6,{floating:c?{y:s.y,ref:v}:void 0,className:Z("editor-collab-sidebar-panel__thread",{"is-selected":n}),id:`note-thread-${e.id}`,gap:"md",onClick:I,onMouseEnter:S,onMouseLeave:x,onFocus:_,onBlur:P,onKeyUp:N=>{N.key==="Tab"&&(y.current=!1)},onKeyDown:N=>{N.key==="Tab"?y.current=!0:l(N)},tabIndex:0,role:"treeitem","aria-label":B,"aria-expanded":n,children:[(0,_a.jsx)(I6.Button,{className:"editor-collab-sidebar-panel__skip-to-note",variant:"secondary",size:"compact",onClick:()=>{qi(e.id,i.current,"textarea")},children:(0,Zi.__)("Add new reply")}),!e.blockClientId&&(0,_a.jsx)("p",{className:"editor-collab-sidebar-panel__deleted-block-notice",children:(0,Zi.__)("Original block deleted.")}),(0,_a.jsx)(A6,{note:e,isSelected:n,onEditNote:t,onDeleteNote:o,onResolve:k}),n&&D.map(N=>(0,_a.jsx)(A6,{note:N,parentNote:e,isSelected:n,onEditNote:t,onDeleteNote:o},N.id)),!n&&C.length>0&&(0,_a.jsx)(le,{direction:"row",align:"center",justify:"space-between",className:"editor-collab-sidebar-panel__more-reply-separator",children:(0,_a.jsx)(I6.Button,{size:"compact",variant:"tertiary",className:"editor-collab-sidebar-panel__more-reply-button",onClick:N=>{N.stopPropagation(),I()},children:(0,Zi.sprintf)((0,Zi._n)("%s more reply","%s more replies",C.length),C.length)})}),!n&&E&&(0,_a.jsx)(A6,{note:E,parentNote:e,isSelected:!1,onEditNote:t,onDeleteNote:o}),n&&(0,_a.jsx)(Sx,{role:"treeitem",children:(0,_a.jsx)(Qy,{onSubmit:N=>{e.status==="approved"?t({id:e.id,status:"hold",content:N}):r({content:N,parent:e.id})},onCancel:N=>{N.stopPropagation(),A(),qi(e.id,i.current)},labels:{submit:e.status==="approved"?(0,Zi.__)("Reopen & Reply"):(0,Zi.__)("Reply"),input:(0,Zi.sprintf)((0,Zi.__)("Reply to note %1$s by %2$s"),e.id,e.author_name)}})}),!!e.blockClientId&&(0,_a.jsx)(I6.Button,{className:"editor-collab-sidebar-panel__skip-to-block",variant:"secondary",size:"compact",onClick:N=>{N.stopPropagation(),h?.focus()},children:(0,Zi.__)("Back to block")})]})}var wm=a(j(),1),Td=a(U(),1),N6=a(ee(),1),su=a(G(),1),eb=a(he(),1),nPe=a(xt(),1),iPe=a(py(),1),sPe=a(Ot(),1);function rPe(){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:oPe}=Y(eb.privateApis);function aPe(e){let t={post:e,type:"note",status:"all",per_page:-1},{records:r}=(0,N6.useEntityRecords)("root","comment",t,{enabled:!!e&&typeof e=="number"}),{getBlockAttributes:o}=(0,su.useSelect)(eb.store),{clientIds:n}=(0,su.useSelect)(l=>{let{getClientIdsWithDescendants:c}=l(eb.store);return{clientIds:c()}},[]),{notes:i,unresolvedNotes:s}=(0,Td.useMemo)(()=>{if(!r||r.length===0)return{notes:[],unresolvedNotes:[]};let l={},c=new Map;for(let g of n){let v=o(g)?.metadata,y=Wh(v);if(y.length>0){l[g]=y;for(let b of y)c.set(b,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 y=u.get(v);y&&(y.status==="hold"?f.push(y):y.status==="approved"&&m.push(y))}let h=d.filter(g=>!g.blockClientId);return{notes:[...f,...m,...h],unresolvedNotes:f}},[n,r,o]);return{notes:i,unresolvedNotes:s}}function lPe(){let{createNotice:e}=(0,su.useDispatch)(nPe.store),{saveEntityRecord:t,deleteEntityRecord:r}=(0,su.useDispatch)(N6.store),{getCurrentPostId:o}=(0,su.useSelect)(R),{getBlockAttributes:n,getSelectedBlockClientId:i}=(0,su.useSelect)(eb.store),{updateBlockAttributes:s}=(0,su.useDispatch)(eb.store),l=f=>{let m=f.message&&f.code!=="unknown_error"?(0,sPe.decodeEntities)(f.message):(0,wm.__)("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,y=L_e(v,h.id);s(g,{metadata:oPe(y)})}return e("snackbar",m?(0,wm.__)("Reply added."):(0,wm.__)("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,wm.__)("Note marked as resolved."),hold:(0,wm.__)("Note reopened."),updated:(0,wm.__)("Note updated.")};try{if(h==="approved"||h==="hold"){await t("root","comment",{id:f,status:h},{throwOnError:!0});let y={post:o(),content:m||"",type:"note",status:h,parent:f,meta:{_wp_note_status:h==="approved"?"resolved":"reopen"}};await t("root","comment",y,{throwOnError:!0})}else await t("root","comment",{id:f,content:m,status:h},{throwOnError:!0});e("snackbar",v[g]??(0,wm.__)("Note updated."),{type:"snackbar",isDismissible:!0})}catch(y){l(y)}},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=B_e(h,f.id);s(m,{metadata:oPe(g)})}e("snackbar",(0,wm.__)("Note deleted."),{type:"snackbar",isDismissible:!0})}catch(m){l(m)}}}}function cPe(e=!1){let t=(0,su.useRegistry)();(0,Td.useEffect)(()=>{if(!e)return;let{getActiveComplementaryArea:r}=t.select(Le),{disableComplementaryArea:o,enableComplementaryArea:n}=t.dispatch(Le),i=t.subscribe(()=>{r("core")===null&&n("core",rg)});return()=>{i(),r("core")===rg&&o("core",rg)}},[e,t])}function uPe({threads:e,selectedNoteId:t,isFloating:r,sidebarRef:o}){let[n,i]=(0,Td.useState)({}),[s]=(0,Td.useState)(rPe),l=(0,Td.useSyncExternalStore)(s.subscribe,s.getSnapshot);return(0,Td.useEffect)(()=>{if(!r||!o?.current)return;let c=o.current,u=s.getFirstBlockElement(),d=u?.closest(".is-root-container")??u,f=d?(0,iPe.getScrollContainer)(d):null,m=()=>{c.style.setProperty("--canvas-scroll",`${-(f?.scrollTop??0)}px`)},h=window.requestAnimationFrame(()=>{let y=V_e({threads:e,selectedNoteId:t,blockRects:s.getBlockRects(),heights:l,scrollTop:f?.scrollTop??0});i(y.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 Sm=a(T(),1),{useBlockElement:xet}=Y(BE.privateApis);function HW({notes:e,sidebarRef:t,isFloating:r=!1,styles:o}){let{onCreate:n,onEdit:i,onDelete:s}=lPe(),{selectNote:l}=Y((0,Tx.useDispatch)(R)),{selectBlock:c,toggleBlockSpotlight:u}=Y((0,Tx.useDispatch)(BE.store)),{noteId:d,selectedBlockClientId:f,orderedBlockIds:m}=(0,Tx.useSelect)(k=>{let{getBlockAttributes:D,getSelectedBlockClientId:E,getClientIdsWithDescendants:C}=k(BE.store),M=E();return{noteId:M?D(M)?.metadata?.noteId:null,selectedBlockClientId:M,orderedBlockIds:C()}},[]),{selectedNote:h,noteFocused:g}=(0,Tx.useSelect)(k=>{let{getSelectedNote:D,isNoteFocused:E}=Y(k(R));return{selectedNote:D(),noteFocused:E()}},[]),v=xet(f),y=(0,og.useMemo)(()=>{if(!r||h!=="new")return e;let k={id:"new",blockClientId:f,content:{rendered:""}},D=[];return m.forEach(E=>{let C=e.filter(M=>M.blockClientId===E);D.push(...C),E===f&&D.push(k)}),D},[e,r,h,f,m]),b=async k=>{let D=y.findIndex(B=>B.id===k.id),E=y[D+1],C=y[D-1];if(await s(k),k.parent!==0){l(k.parent),qi(k.parent,t.current);return}let M=E??C;M?(l(M.id),qi(M.id,t.current),M.blockClientId&&(u(M.blockClientId,!0),c(M.blockClientId,null))):(l(void 0),u(k.blockClientId,!1),v?.focus())},w=(0,og.useMemo)(()=>{let k=Wh({noteId:d}),D=e.filter(E=>k.includes(E.id));return dE(D)?.id},[d,e]),S=(0,og.useRef)(f);(0,og.useEffect)(()=>{S.current!==f&&(S.current=f,l(w))},[f,w,l]),(0,og.useEffect)(()=>{g&&h&&(qi(h,t.current,h==="new"?"textarea":void 0),l(h))},[g,h,l,t]);let{notePositions:x,registerThread:_,unregisterThread:P}=uPe({threads:y,selectedNoteId:h,isFloating:r,sidebarRef:t}),I=Array.isArray(y)&&y.length>0,A=(k,D,E)=>{if(k.defaultPrevented)return;let C=y.findIndex(B=>B.id===D.id),M=k.currentTarget===k.target;(k.key==="Enter"||k.key==="ArrowRight")&&M&&!E?(l(D.id),D.blockClientId&&(c(D.blockClientId,null),u(D.blockClientId,!0))):(k.key==="Enter"||k.key==="ArrowLeft")&&M&&E||k.key==="Escape"?(l(void 0),D.blockClientId&&u(D.blockClientId,!1),qi(D.id,t.current)):k.key==="ArrowDown"&&C<y.length-1&&M?qi(y[C+1].id,t.current):k.key==="ArrowUp"&&C>0&&M?qi(y[C-1].id,t.current):k.key==="Home"&&M?qi(y[0].id,t.current):k.key==="End"&&M&&qi(y[y.length-1].id,t.current)};return(0,Sm.jsx)(le,{className:"editor-collab-sidebar-panel",style:o,role:"tree",direction:"column",gap:"md",justify:"flex-start",ref:k=>{k&&(t.current=k)},"aria-label":r?(0,zW.__)("Unresolved notes"):(0,zW.__)("All notes"),children:!I&&!r?(0,Sm.jsx)(FE,{onSubmit:n,sidebarRef:t}):(0,Sm.jsxs)(Sm.Fragment,{children:[!r&&h==="new"&&(0,Sm.jsx)(FE,{onSubmit:n,sidebarRef:t}),y.map(k=>(0,Sm.jsx)(tPe,{note:k,onAddReply:n,onDeleteNote:b,onEditNote:i,isSelected:h===k.id,sidebarRef:t,floating:r?{y:x[k.id],registerThread:_,unregisterThread:P}:void 0,onKeyDown:D=>A(D,k,h===k.id)},k.id))]})})}var dPe=a(W(),1),M6=a(j(),1),F6=a(he(),1),UW=a(G(),1),fPe=a(bt(),1),mPe=a(ta(),1);var D6=a(T(),1),{NoteIconSlotFill:_et}=Y(F6.privateApis);function Cet({clientId:e,onClick:t,isDistractionFree:r}){let o=(0,UW.useSelect)(l=>l(F6.store).getBlock(e),[e]),n=(0,UW.useSelect)(l=>l(mPe.store).getShortcutRepresentation("core/editor/new-note"),[]);if(!o?.isValid||o?.name===(0,fPe.getUnregisteredTypeHandlerName)())return null;let i=r||o?.name==="core/freeform",s;return r?s=(0,M6.__)("Notes are disabled in distraction free mode."):o?.name==="core/freeform"&&(s=(0,M6.__)("Convert to blocks to add notes.")),(0,D6.jsx)(dPe.MenuItem,{onClick:t,"aria-haspopup":"dialog",disabled:i,info:s,shortcut:n,children:(0,M6.__)("Add note")})}function WW({onClick:e,isDistractionFree:t}){return(0,D6.jsx)(_et.Fill,{children:({clientId:r,onClose:o})=>(0,D6.jsx)(Cet,{clientId:r,isDistractionFree:t,onClick:()=>{e(r),o()}})})}var pPe=a(W(),1);var Ex=a(j(),1),hPe=a(U(),1),gPe=a(he(),1);var tb=a(T(),1),{NoteIconToolbarSlotFill:Tet}=Y(gPe.privateApis);function vPe({onClick:e,note:t}){let r=(0,hPe.useMemo)(()=>{if(!t)return[];let u=new Map,d=[t,...t.reply];return d.sort((f,m)=>new Date(f.date)-new Date(m.date)),d.forEach(f=>{f.author_name&&f.author_avatar_urls&&(u.has(f.author)||u.set(f.author,{name:f.author_name,avatar:f.author_avatar_urls?.["48"]||f.author_avatar_urls?.["96"],id:f.author,date:f.date}))}),Array.from(u.values())},[t]);if(!r.length)return null;let o=3,i=r.length>o?r.slice(0,o-1):r,s=Math.max(0,r.length-i.length),c=r.length>100&&s>0?(0,Ex.__)("100+"):(0,Ex.sprintf)((0,Ex.__)("+%s"),s);return(0,tb.jsx)(Tet.Fill,{children:(0,tb.jsx)(pPe.ToolbarButton,{className:"editor-note-indicator",label:(0,Ex.__)("View notes"),onClick:()=>e(),showTooltip:!0,children:(0,tb.jsxs)(le,{direction:"row",align:"center",gap:"xs",children:[i.map(u=>(0,tb.jsx)("img",{src:u.avatar,alt:u.name,className:"editor-note-indicator__avatar",style:{borderColor:Wl(u.id)}},u.id)),s>0&&(0,tb.jsx)("span",{className:"editor-note-indicator__overflow",children:c})]})})})}var Os=a(T(),1);function Eet({postId:e}){let{getActiveComplementaryArea:t}=(0,Ed.useSelect)(Le),{enableComplementaryArea:r}=(0,Ed.useDispatch)(Le),{toggleBlockSpotlight:o,selectBlock:n}=Y((0,Ed.useDispatch)(GW.store)),{selectNote:i}=Y((0,Ed.useDispatch)(R)),s=(0,bPe.useViewportMatch)("medium"),l=(0,yPe.useRef)(null),{clientId:c,noteId:u,isClassicBlock:d}=(0,Ed.useSelect)(k=>{let{getBlockAttributes:D,getSelectedBlockClientId:E,getBlockName:C}=k(GW.store),M=E();return{clientId:M,noteId:M?D(M)?.metadata?.noteId:null,isClassicBlock:M?C(M)==="core/freeform":!1}},[]),f=Wh({noteId:u}),{isDistractionFree:m}=(0,Ed.useSelect)(k=>{let{get:D}=k(SPe.store);return{isDistractionFree:D("core","distractionFree")}},[]),h=(0,Ed.useSelect)(k=>Y(k(R)).getSelectedNote(),[]),{notes:g,unresolvedNotes:v}=aPe(e),y=s,b=g.length>0||!y;cPe(y&&(v.length>0||h!==void 0));async function w({targetClientId:k,noteId:D,isApproved:E}){if(!k)return;let C=await t("core");E?r("core",wx):(!BW.includes(C)||!b)&&r("core",y?rg:wx);let M=await t("core");BW.includes(M)&&(n(k,null),o(k,!0),i(D,{focus:!0}))}function S(k){let D=g.filter(C=>C.blockClientId===k),E=dE(D);return w({targetClientId:k,noteId:E?.id??"new",isApproved:E?.status==="approved"})}function x(k){return w({targetClientId:k,noteId:"new",isApproved:!1})}(0,wPe.useShortcut)("core/editor/new-note",k=>{k.preventDefault(),x(c)},{isDisabled:m||d||!c});let{merged:_}=Zr(),P=_?.styles?.color?.background,I=f.length>0?g.filter(k=>f.includes(k.id)):[],A=dE(I);return m?(0,Os.jsx)(WW,{isDistractionFree:!0}):(0,Os.jsxs)(Os.Fragment,{children:[!!A&&(0,Os.jsx)(vPe,{note:A,onClick:()=>S(c)}),(0,Os.jsx)(WW,{onClick:k=>x(k)}),b&&(0,Os.jsx)(Ey,{identifier:wx,name:wx,title:(0,L6.__)("All notes"),header:(0,Os.jsx)("h2",{className:"interface-complementary-area-header__title",children:(0,L6.__)("All notes")}),icon:Y3,closeLabel:(0,L6.__)("Close Notes"),children:(0,Os.jsx)(HW,{notes:g,sidebarRef:l})}),s&&(0,Os.jsx)(Ey,{isPinnable:!1,header:!1,identifier:rg,className:"editor-collab-sidebar",headerClassName:"editor-collab-sidebar__header",backgroundColor:P,children:(0,Os.jsx)(HW,{notes:v,sidebarRef:l,styles:{backgroundColor:P},isFloating:!0})})]})}function xPe(){let{postId:e,editorMode:t,revisionsMode:r}=(0,Ed.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,Os.jsx)(Xr,{supportKeys:"editor.notes",children:(0,Os.jsx)(Eet,{postId:e})})}var Pd=a(W(),1),Px=a(j(),1);var HE=a(G(),1),qW=a(U(),1),PPe=a(Rt(),1),H6=a(_e(),1),kPe=a(ee(),1);var xm=a(W(),1),B6=a(G(),1),VE=a(j(),1),_Pe=a(Rt(),1);var CPe=a(ee(),1);var au=a(T(),1);function V6({hideWelcomeGuide:e=!1,onChangePath:t}){let{user:r,setUser:o}=Zr(),n=!!r&&(Object.keys(r?.styles??{}).length>0||Object.keys(r?.settings??{}).length>0),i=()=>{o({styles:{},settings:{}})},{toggle:s}=(0,B6.useDispatch)(_Pe.store),{canEditCSS:l}=(0,B6.useSelect)(u=>{let{getEntityRecord:d,__experimentalGetCurrentGlobalStylesId:f}=u(CPe.store),m=f();return{canEditCSS:!!(m?d("root","globalStyles",m):void 0)?._links?.["wp:action-edit-css"]}},[]),c=()=>{t("/css")};return(0,au.jsx)(xm.DropdownMenu,{icon:to,label:(0,VE.__)("More"),toggleProps:{size:"compact"},children:({onClose:u})=>(0,au.jsxs)(au.Fragment,{children:[(0,au.jsxs)(xm.MenuGroup,{children:[l&&(0,au.jsx)(xm.MenuItem,{onClick:c,children:(0,VE.__)("Additional CSS")}),!e&&(0,au.jsx)(xm.MenuItem,{onClick:()=>{s("core/edit-site","welcomeGuideStyles"),u()},children:(0,VE.__)("Welcome Guide")})]}),(0,au.jsx)(xm.MenuGroup,{children:(0,au.jsx)(xm.MenuItem,{onClick:()=>{i(),u()},disabled:!n,children:(0,VE.__)("Reset styles")})})]})})}var rb=a(T(),1);function TPe({className:e,identifier:t,title:r,icon:o,children:n,closeLabel:i,header:s,headerClassName:l,panelClassName:c,isActiveByDefault:u}){return(0,rb.jsxs)(rb.Fragment,{children:[(0,rb.jsx)(El,{className:e,scope:"core",identifier:t,title:r,icon:o,closeLabel:i,header:s,headerClassName:l,panelClassName:c,isActiveByDefault:u,children:n}),(0,rb.jsx)(Up,{scope:"core",identifier:t,icon:o,children:r})]})}var j6=a(G(),1),z6=a(W(),1),ec=a(j(),1),YW=a(Rt(),1);var jE=a(T(),1);function zE({nonAnimatedSrc:e,animatedSrc:t}){return(0,jE.jsxs)("picture",{className:"editor-welcome-guide__image",children:[(0,jE.jsx)("source",{srcSet:e,media:"(prefers-reduced-motion: reduce)"}),(0,jE.jsx)("img",{src:t,width:"312",height:"240",alt:""})]})}var Hr=a(T(),1);function EPe(){let{toggle:e}=(0,j6.useDispatch)(YW.store),{isActive:t,isStylesOpen:r}=(0,j6.useSelect)(n=>{let i=n(Le).getActiveComplementaryArea("core");return{isActive:!!n(YW.store).get("core/edit-site","welcomeGuideStyles"),isStylesOpen:i==="edit-site/global-styles"}},[]);if(!t||!r)return null;let o=(0,ec.__)("Welcome to Styles");return(0,Hr.jsx)(z6.Guide,{className:"editor-welcome-guide guide-styles",contentLabel:o,finishButtonText:(0,ec.__)("Get started"),onFinish:()=>e("core/edit-site","welcomeGuideStyles"),pages:[{image:(0,Hr.jsx)(zE,{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,Hr.jsxs)(Hr.Fragment,{children:[(0,Hr.jsx)("h1",{className:"editor-welcome-guide__heading",children:o}),(0,Hr.jsx)("p",{className:"editor-welcome-guide__text",children:(0,ec.__)("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,Hr.jsx)(zE,{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,Hr.jsxs)(Hr.Fragment,{children:[(0,Hr.jsx)("h1",{className:"editor-welcome-guide__heading",children:(0,ec.__)("Set the design")}),(0,Hr.jsx)("p",{className:"editor-welcome-guide__text",children:(0,ec.__)("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,Hr.jsx)(zE,{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,Hr.jsxs)(Hr.Fragment,{children:[(0,Hr.jsx)("h1",{className:"editor-welcome-guide__heading",children:(0,ec.__)("Personalize blocks")}),(0,Hr.jsx)("p",{className:"editor-welcome-guide__text",children:(0,ec.__)("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,Hr.jsx)(zE,{nonAnimatedSrc:"https://s.w.org/images/block-editor/welcome-documentation.svg",animatedSrc:"https://s.w.org/images/block-editor/welcome-documentation.gif"}),content:(0,Hr.jsxs)(Hr.Fragment,{children:[(0,Hr.jsx)("h1",{className:"editor-welcome-guide__heading",children:(0,ec.__)("Learn more")}),(0,Hr.jsxs)("p",{className:"editor-welcome-guide__text",children:[(0,ec.__)("New to block themes and styling your site?")," ",(0,Hr.jsx)(z6.ExternalLink,{href:(0,ec.__)("https://wordpress.org/documentation/article/styles-overview/"),children:(0,ec.__)("Here\u2019s a detailed guide to learn how to make the most of it.")})]})]})}]})}var gi=a(T(),1);function RPe(){let{shouldResetNavigation:e,stylesPath:t,showStylebook:r,showListViewByDefault:o,hasRevisions:n,activeComplementaryArea:i,editorSettings:s}=(0,HE.useSelect)(b=>{let{getActiveComplementaryArea:w}=b(Le),{getStylesPath:S,getShowStylebook:x}=Y(b(R)),_=b(R).getEditorMode()==="visual",P=b(PPe.store).get("core","showListViewByDefault"),{getEntityRecord:I,__experimentalGetCurrentGlobalStylesId:A}=b(kPe.store),k=A(),D=k?I("root","globalStyles",k):void 0;return{stylesPath:S(),showStylebook:x(),shouldResetNavigation:w("core")!=="edit-site/global-styles"||!_,showListViewByDefault:P,hasRevisions:!!D?._links?.["version-history"]?.[0]?.count,activeComplementaryArea:b(Le).getActiveComplementaryArea("core"),editorSettings:b(R).getEditorSettings()}},[]),{setStylesPath:l,setShowStylebook:c,resetStylesNavigation:u}=Y((0,HE.useDispatch)(R)),d=(0,H6.useViewportMatch)("medium","<"),f=t.startsWith("/revisions")&&!r,m=t.startsWith("/revisions")&&r,h=(0,H6.usePrevious)(i);(0,qW.useEffect)(()=>{i==="edit-site/global-styles"&&h!=="edit-site/global-styles"&&u()},[i,h,u]),(0,qW.useEffect)(()=>{e&&u()},[e,u]);let{setIsListViewOpened:g}=(0,HE.useDispatch)(R),v=()=>{g(!1),l(f||m?"/":"/revisions")},y=()=>{g(r&&o),c(!r)};return(0,gi.jsxs)(gi.Fragment,{children:[(0,gi.jsx)(TPe,{className:"editor-global-styles-sidebar",identifier:"edit-site/global-styles",title:(0,Px.__)("Styles"),icon:iL,closeLabel:(0,Px.__)("Close Styles"),panelClassName:"editor-global-styles-sidebar__panel",header:(0,gi.jsxs)(Pd.Flex,{className:"editor-global-styles-sidebar__header",gap:1,children:[(0,gi.jsx)(Pd.FlexItem,{children:(0,gi.jsx)("h2",{className:"editor-global-styles-sidebar__header-title",children:(0,Px.__)("Styles")})}),(0,gi.jsxs)(Pd.Flex,{justify:"flex-end",gap:1,className:"editor-global-styles-sidebar__header-actions",children:[!d&&(0,gi.jsx)(Pd.FlexItem,{children:(0,gi.jsx)(Pd.Button,{icon:ug,label:(0,Px.__)("Style Book"),isPressed:r,accessibleWhenDisabled:!0,disabled:e,onClick:y,size:"compact"})}),(0,gi.jsx)(Pd.FlexItem,{children:(0,gi.jsx)(Pd.Button,{label:(0,Px.__)("Revisions"),icon:Id,onClick:v,accessibleWhenDisabled:!0,disabled:!n,isPressed:f||m,size:"compact"})}),(0,gi.jsx)(V6,{onChangePath:l})]})]}),children:(0,gi.jsx)(P5,{path:t,onPathChange:l,settings:s})}),(0,gi.jsx)(EPe,{})]})}var tc=a(T(),1);function Pet({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,APe.useSelect)(y=>{let{getEntityRecord:b,getResolutionError:w,hasFinishedResolution:S,getCurrentTheme:x,__experimentalGetCurrentGlobalStylesId:_,canUser:P}=y(IPe.store),{getRenderingMode:I,getCurrentPostType:A}=y(R),k=["postType",e,t],D=I(),E=A(),C=x()?.is_block_theme,M=_(),B=M?P("update",{kind:"root",name:"globalStyles",id:M}):!1;return{post:b(...k),template:r?b("postType",er,r):void 0,hasLoadedPost:S("getEntityRecord",k),error:w("getEntityRecord",k)?.message,isBlockTheme:C,showGlobalStyles:C&&B&&(E==="wp_template"||D==="template-locked")}},[e,t,r]);return(0,tc.jsxs)(tc.Fragment,{children:[m&&!d&&(0,tc.jsx)(OPe.Notice,{status:h?"error":"warning",isDismissible:!1,children:h||(0,NPe.__)("You attempted to edit an item that doesn't exist. Perhaps it was deleted?")}),!!d&&(0,tc.jsxs)($z,{post:d,__unstableTemplate:f,settings:o,initialEdits:i,useSubRegistry:!1,children:[(0,tc.jsx)(PCe,{...u,children:l}),n,(0,tc.jsx)(zEe,{onActionPerformed:s,extraPanels:c}),(0,tc.jsx)(xPe,{}),g&&(0,tc.jsx)(sN,{}),v&&(0,tc.jsx)(RPe,{})]})]})}var MPe=Pet;var Ke=a(j(),1),UPe=a(_e(),1),ob=a(G(),1),WPe=a(U(),1),UE=a(Rt(),1);var U6=a(G(),1),DPe=a(Rt(),1);var FPe=a(T(),1),{PreferenceBaseOption:ket}=Y(DPe.privateApis);function LPe(e){let t=(0,U6.useSelect)(n=>n(R).isPublishSidebarEnabled(),[]),{enablePublishSidebar:r,disablePublishSidebar:o}=(0,U6.useDispatch)(R);return(0,FPe.jsx)(ket,{isChecked:t,onChange:n=>n?r():o(),...e})}var W6=a(G(),1),BPe=a(Rt(),1),G6=a(bt(),1),VPe=a(U(),1),jPe=a(W(),1),Rx=a(j(),1),zPe=a(he(),1);var kx=a(T(),1),{BlockManager:Ret}=Y(zPe.privateApis),Aet=[];function HPe(){let{showBlockTypes:e,hideBlockTypes:t}=Y((0,W6.useDispatch)(R)),{blockTypes:r,allowedBlockTypes:o,hiddenBlockTypes:n}=(0,W6.useSelect)(m=>({blockTypes:m(G6.store).getBlockTypes(),allowedBlockTypes:m(R).getEditorSettings().allowedBlockTypes,hiddenBlockTypes:m(BPe.store).get("core","hiddenBlockTypes")??Aet}),[]),s=(0,VPe.useMemo)(()=>o===!0?r:r.filter(({name:m})=>o?.includes(m)),[o,r]).filter(m=>(0,G6.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,kx.jsxs)("div",{className:"editor-block-visibility",children:[!!u&&(0,kx.jsxs)("div",{className:"editor-block-visibility__disabled-blocks-count",children:[(0,Rx.sprintf)((0,Rx._n)("%d block is hidden.","%d blocks are hidden.",u),u),(0,kx.jsx)(jPe.Button,{__next40pxDefaultSize:!0,variant:"link",onClick:d,children:(0,Rx.__)("Reset")})]}),(0,kx.jsx)(Ret,{blockTypes:s,selectedBlockTypes:c,onChange:f,showSelectAll:!1})]})}var $e=a(T(),1),{PreferencesModal:Iet,PreferencesModalTabs:Oet,PreferencesModalSection:_m,PreferenceToggleControl:Ca}=Y(UE.privateApis);function GPe({extraSections:e={}}){let t=(0,ob.useSelect)(o=>o(Le).isModalActive("editor/preferences"),[]),{closeModal:r}=(0,ob.useDispatch)(Le);return t?(0,$e.jsx)(Iet,{closeModal:r,children:(0,$e.jsx)(Net,{extraSections:e})}):null}function Net({extraSections:e={}}){let t=(0,UPe.useViewportMatch)("medium"),{showBlockBreadcrumbsOption:r,showCollaborationOptions:o}=(0,ob.useSelect)(c=>{let{getEditorSettings:u,isCollaborationEnabledForCurrentPost:d}=Y(c(R)),{get:f}=c(UE.store),m=u().richEditingEnabled;return{showBlockBreadcrumbsOption:!f("core","distractionFree")&&t&&m,showCollaborationOptions:d()}},[t]),{setIsListViewOpened:n,setIsInserterOpened:i}=(0,ob.useDispatch)(R),{set:s}=(0,ob.useDispatch)(UE.store),l=(0,WPe.useMemo)(()=>[{name:"general",tabLabel:(0,Ke.__)("General"),content:(0,$e.jsxs)($e.Fragment,{children:[(0,$e.jsxs)(_m,{title:(0,Ke.__)("Interface"),children:[(0,$e.jsx)(Ca,{scope:"core",featureName:"showListViewByDefault",help:(0,Ke.__)("Opens the List View panel by default."),label:(0,Ke.__)("Always open List View")}),r&&(0,$e.jsx)(Ca,{scope:"core",featureName:"showBlockBreadcrumbs",help:(0,Ke.__)("Display the block hierarchy trail at the bottom of the editor."),label:(0,Ke.__)("Show block breadcrumbs")}),(0,$e.jsx)(Ca,{scope:"core",featureName:"allowRightClickOverrides",help:(0,Ke.__)("Allows contextual List View menus via right-click, overriding browser defaults."),label:(0,Ke.__)("Allow right-click contextual menus")}),(0,$e.jsx)(Ca,{scope:"core",featureName:"enableChoosePatternModal",help:(0,Ke.__)("Pick from starter content when creating a new page."),label:(0,Ke.__)("Show starter patterns")}),o&&(0,$e.jsxs)($e.Fragment,{children:[(0,$e.jsx)(Ca,{scope:"core",featureName:"showCollaborationCursor",help:(0,Ke.__)("Show your own avatar inside blocks during collaborative editing sessions."),label:(0,Ke.__)("Show avatar in blocks")}),(0,$e.jsx)(Ca,{scope:"core",featureName:"showCollaborationNotifications",help:(0,Ke.__)("Show notifications when collaborators join, leave, or save the post."),label:(0,Ke.__)("Show collaboration notifications")})]})]}),(0,$e.jsxs)(_m,{title:(0,Ke.__)("Document settings"),description:(0,Ke.__)("Select what settings are shown in the document panel."),children:[(0,$e.jsx)(UN.Slot,{}),(0,$e.jsx)(RS,{taxonomyWrapper:(c,u)=>(0,$e.jsx)(kh,{label:u.labels.menu_name,panelName:`taxonomy-panel-${u.slug}`})}),(0,$e.jsx)(tm,{children:(0,$e.jsx)(kh,{label:(0,Ke.__)("Featured image"),panelName:"featured-image"})}),(0,$e.jsx)(Ay,{children:(0,$e.jsx)(kh,{label:(0,Ke.__)("Excerpt"),panelName:"post-excerpt"})}),(0,$e.jsx)(Xr,{supportKeys:["comments","trackbacks"],children:(0,$e.jsx)(kh,{label:(0,Ke.__)("Discussion"),panelName:"discussion-panel"})}),(0,$e.jsx)(Zw,{children:(0,$e.jsx)(kh,{label:(0,Ke.__)("Page attributes"),panelName:"page-attributes"})})]}),t&&(0,$e.jsx)(_m,{title:(0,Ke.__)("Publishing"),children:(0,$e.jsx)(LPe,{help:(0,Ke.__)("Review settings, such as visibility and tags."),label:(0,Ke.__)("Enable pre-publish checks")})}),e?.general]})},{name:"appearance",tabLabel:(0,Ke.__)("Appearance"),content:(0,$e.jsxs)(_m,{title:(0,Ke.__)("Appearance"),description:(0,Ke.__)("Customize the editor interface to suit your needs."),children:[(0,$e.jsx)(Ca,{scope:"core",featureName:"fixedToolbar",onToggle:()=>s("core","distractionFree",!1),help:(0,Ke.__)("Access all block and document tools in a single place."),label:(0,Ke.__)("Top toolbar")}),(0,$e.jsx)(Ca,{scope:"core",featureName:"distractionFree",onToggle:()=>{s("core","fixedToolbar",!0),i(!1),n(!1)},help:(0,Ke.__)("Reduce visual distractions by hiding the toolbar and other elements to focus on writing."),label:(0,Ke.__)("Distraction free")}),(0,$e.jsx)(Ca,{scope:"core",featureName:"focusMode",help:(0,Ke.__)("Highlights the current block and fades other content."),label:(0,Ke.__)("Spotlight mode")}),e?.appearance]})},{name:"accessibility",tabLabel:(0,Ke.__)("Accessibility"),content:(0,$e.jsxs)($e.Fragment,{children:[(0,$e.jsx)(_m,{title:(0,Ke.__)("Navigation"),description:(0,Ke.__)("Optimize the editing experience for enhanced control."),children:(0,$e.jsx)(Ca,{scope:"core",featureName:"keepCaretInsideBlock",help:(0,Ke.__)("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,Ke.__)("Contain text cursor inside block")})}),(0,$e.jsx)(_m,{title:(0,Ke.__)("Interface"),children:(0,$e.jsx)(Ca,{scope:"core",featureName:"showIconLabels",label:(0,Ke.__)("Show button text labels"),help:(0,Ke.__)("Show text instead of icons on buttons across the interface.")})})]})},{name:"blocks",tabLabel:(0,Ke.__)("Blocks"),content:(0,$e.jsxs)($e.Fragment,{children:[(0,$e.jsx)(_m,{title:(0,Ke.__)("Inserter"),children:(0,$e.jsx)(Ca,{scope:"core",featureName:"mostUsedBlocks",help:(0,Ke.__)("Adds a category with the most frequently used blocks in the inserter."),label:(0,Ke.__)("Show most used blocks")})}),(0,$e.jsx)(_m,{title:(0,Ke.__)("Manage block visibility"),description:(0,Ke.__)("Disable blocks that you don't want to appear in the inserter. They can always be toggled back on later."),children:(0,$e.jsx)(HPe,{})})]})},window.__clientSideMediaProcessing&&{name:"media",tabLabel:(0,Ke.__)("Media"),content:(0,$e.jsx)($e.Fragment,{children:(0,$e.jsxs)(_m,{title:(0,Ke.__)("General"),description:(0,Ke.__)("Customize options related to the media upload flow."),children:[(0,$e.jsx)(Ca,{scope:"core/media",featureName:"optimizeOnUpload",help:(0,Ke.__)("Compress media items before uploading to the server."),label:(0,Ke.__)("Pre-upload compression")}),(0,$e.jsx)(Ca,{scope:"core/media",featureName:"requireApproval",help:(0,Ke.__)("Require approval step when optimizing existing media."),label:(0,Ke.__)("Approval step")})]})})}].filter(Boolean),[r,o,e,i,n,s,t]);return(0,$e.jsx)(Oet,{sections:l})}var qE=a(bt(),1);var WE=a(he(),1),YPe="content",qPe={name:"core/pattern-overrides",getValues({select:e,clientId:t,context:r,bindings:o}){let n=r["pattern/overrides"],{getBlockAttributes:i}=e(WE.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(WE.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(WE.store).updateBlockAttributes(g.clientId,d),m(g.innerBlocks)};m(s());return}let f=n(u)?.[YPe];t(WE.store).updateBlockAttributes(u,{[YPe]:{...f,[c]:{...f?.[c],...Object.entries(d).reduce((m,[h,g])=>(m[h]=g===void 0?"":g,m),{})}}})},canUserEditValue:()=>!0};var Y6=a(j(),1),q6=a(ee(),1),GE=a(he(),1),KW=["core/navigation-link","core/navigation-submenu"],KPe=[{label:(0,Y6.__)("Post Date"),args:{field:"date"},type:"string"},{label:(0,Y6.__)("Post Modified Date"),args:{field:"modified"},type:"string"},{label:(0,Y6.__)("Post Link"),args:{field:"link"},type:"string"}],ZPe={name:"core/post-data",getValues({select:e,context:t,bindings:r,clientId:o}){let{getBlockAttributes:n,getBlockName:i}=e(GE.store),s=i(o),l=KW.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(q6.store),f=d("postType",u,c),m={};for(let[h,g]of Object.entries(r)){let v=KPe.find(y=>y.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(GE.store),s=i(o);if(KW.includes(s))return!1;let l={};Object.values(r).forEach(({args:c,newValue:u})=>{l[c.field]=u}),e(q6.store).editEntityRecord("postType",t?.postType,t?.postId,l)},canUserEditValue({select:e,context:t}){let{getBlockName:r,getSelectedBlockClientId:o}=e(GE.store),n=o(),i=r(n);return!(KW.includes(i)||t?.query||t?.queryId||!t?.postType||!e(q6.store).canUser("update",{kind:"postType",name:t?.postType,id:t?.postId}))},getFieldsList({context:e,select:t}){return t(GE.store).getSelectedBlock()?.name!=="core/post-date"?[]:!e||!e.postId||!e.postType?[]:KPe}};var YE=a(ee(),1);function ZW(e,t){let{getRegisteredPostMeta:r}=Y(e(YE.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 Met({select:e,context:t,args:r}){let n=ZW(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(YE.store);return i("postType",t?.postType,t?.postId).meta?.[r.key]??n?.label??r.key}var XPe={name:"core/post-meta",getValues({select:e,context:t,bindings:r}){let o={};for(let[n,i]of Object.entries(r))o[n]=Met({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(YE.store).editEntityRecord("postType",t?.postType,t?.postId,{meta:o})},canUserEditValue({select:e,context:t,args:r}){return!(t?.query||t?.queryId||!t?.postType||!ZW(e,t).some(l=>l.args.key===r.key)||e(R).getEditorSettings().enableCustomFields||!e(YE.store).canUser("update",{kind:"postType",name:t?.postType,id:t?.postId}))},getFieldsList({select:e,context:t}){return ZW(e,t).map(({default:o,...n})=>({...n}))}};var ng=a(j(),1),QPe=a(ee(),1),K6=a(he(),1),XW=["core/navigation-link","core/navigation-submenu"],QW=[{label:(0,ng.__)("Term ID"),args:{field:"id"},type:"string"},{label:(0,ng.__)("Name"),args:{field:"name"},type:"string"},{label:(0,ng.__)("Slug"),args:{field:"slug"},type:"string"},{label:(0,ng.__)("Link"),args:{field:"link"},type:"string"},{label:(0,ng.__)("Description"),args:{field:"description"},type:"string"},{label:(0,ng.__)("Parent ID"),args:{field:"parent"},type:"string"},{label:(0,ng.__)("Count"),args:{field:"count"},type:"string"}],JPe={name:"core/term-data",usesContext:["taxonomy","termId","termData"],getValues({select:e,context:t,bindings:r,clientId:o}){let{getEntityRecord:n}=e(QPe.store),{getBlockAttributes:i,getBlockName:s}=e(K6.store),l=s(o),c=XW.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=QW.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(K6.store),n=o(),i=r(n);return XW.includes(i)||t?.termQuery||!t?.taxonomy||!t?.termId,!1},getFieldsList({context:e,select:t}){let{getBlockAttributes:r,getBlockName:o,getSelectedBlockClientId:n}=t(K6.store),i=n(),s=o(i);if(XW.includes(s)){let l=r(i);return!l||!l.id||!l.type?[]:QW}return e?e.taxonomy&&e.termId||e.termData?QW:[]:[]}};function $Pe(){(0,qE.registerBlockBindingsSource)(qPe),(0,qE.registerBlockBindingsSource)(ZPe),(0,qE.registerBlockBindingsSource)(XPe),(0,qE.registerBlockBindingsSource)(JPe)}var{store:Det,...Fet}=xj,eke={};kG(eke,{CreateTemplatePartModal:i0,patternTitleField:g_,templateTitleField:h_,BackButton:eF,EntitiesSavedStatesExtensible:PT,Editor:MPe,PluginPostExcerpt:MT,PostCardPanel:tg,PreferencesModal:GPe,usePostActions:i6,usePostFields:Vw,ToolsMoreMenuGroup:aF,ViewMoreMenuGroup:lF,ResizableEditor:Ww,registerCoreBlockBindingsSources:$Pe,getTemplateInfo:sl,GlobalStylesUIWrapper:P5,GlobalStylesActionMenu:V6,StyleBookPreview:Age,useGlobalStyles:Zr,useStyle:dh,interfaceStore:Det,...Fet});var KE=a(G(),1);function Let(e,t,r){let{registerEntityAction:o}=Y((0,KE.dispatch)(R));o(e,t,r)}function Bet(e,t,r){let{unregisterEntityAction:o}=Y((0,KE.dispatch)(R));o(e,t,r)}function Vet(e,t,r){let{registerEntityField:o}=Y((0,KE.dispatch)(R));o(e,t,r)}function jet(e,t,r){let{unregisterEntityField:o}=Y((0,KE.dispatch)(R));o(e,t,r)}var tke=a(he(),1);return cke(zet);})();
/*! Bundled license information:

use-sync-external-store/cjs/use-sync-external-store-shim.production.js:
  (**
   * @license React
   * use-sync-external-store-shim.production.js
   *
   * Copyright (c) Meta Platforms, Inc. and affiliates.
   *
   * This source code is licensed under the MIT license found in the
   * LICENSE file in the root directory of this source tree.
   *)

use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.js:
  (**
   * @license React
   * use-sync-external-store-shim/with-selector.production.js
   *
   * Copyright (c) Meta Platforms, Inc. and affiliates.
   *
   * This source code is licensed under the MIT license found in the
   * LICENSE file in the root directory of this source tree.
   *)

autosize/dist/autosize.js:
  (*!
  	autosize 4.0.2
  	license: MIT
  	http://www.jacklmoore.com/autosize
  *)

is-plain-object/dist/is-plain-object.mjs:
  (*!
   * is-plain-object <https://github.com/jonschlinkert/is-plain-object>
   *
   * Copyright (c) 2014-2017, Jon Schlinkert.
   * Released under the MIT License.
   *)
*/
//# sourceMappingURL=index.min.js.map